From ca43cb7a7da14c5bd715dde7084d3a19a9f1674d Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Thu, 20 Jul 2023 14:50:55 +0200 Subject: [PATCH 01/79] Added scopes and executed_for to booking service --- clients/api/js/package-lock.json | 1333 ++++++++++++++- services/booking/dist/openapi.json | 111 +- services/booking/package-lock.json | 1500 ++++++++++++++++- .../src/booking-backend/api/component.yml | 14 +- .../src/booking-backend/src/internal.ts | 10 +- .../src/booking-frontend/api/component.yml | 65 +- .../src/booking-frontend/src/operations.ts | 5 +- .../src/schedule-service/api/component.yml | 11 +- services/openapi/dist/openapi.json | 111 +- 9 files changed, 3009 insertions(+), 151 deletions(-) diff --git a/clients/api/js/package-lock.json b/clients/api/js/package-lock.json index 2158940b..4cab9ee2 100644 --- a/clients/api/js/package-lock.json +++ b/clients/api/js/package-lock.json @@ -23,37 +23,9 @@ "typescript": "^4.7.4" } }, - "../../../helper/crosslab-typescript-addon": { - "name": "@cross-lab-project/codegen-typescript-addon", - "dev": true, - "license": "UNLICENSED", - "devDependencies": { - "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.0.0", - "@types/node": "^17.0.35", - "@types/nunjucks": "^3.2.1", - "@types/prettier": "^2.6.3", - "@types/seedrandom": "^3.0.2", - "@typescript-eslint/eslint-plugin": "^5.51.0", - "@typescript-eslint/parser": "^5.51.0", - "copyfiles": "^2.4.1", - "eslint": "^8.34.0", - "openapi-types": "^12.0.0", - "tsc-watch": "^5.0.3", - "typescript": "^4.6.4" - }, - "peerDependencies": { - "@apidevtools/swagger-parser": "^10.1.0", - "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", - "ajv": "^8.11.0", - "ajv-formats": "^2.1.1", - "nunjucks": "^3.2.3", - "prettier": "^2.6.2" - } - }, "../../../helper/openapi-codegeneration": { "name": "@cross-lab-project/openapi-codegen", - "dev": true, + "extraneous": true, "license": "UNLICENSED", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", @@ -86,22 +58,6 @@ "typescript": "^4.6.4" } }, - "../../../helper/tsdoc-theme": { - "name": "@cross-lab-project/tsdoc-theme", - "dev": true, - "license": "UNLICENSED", - "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.0.0", - "@typescript-eslint/eslint-plugin": "^5.51.0", - "@typescript-eslint/parser": "^5.51.0", - "eslint": "^8.34.0", - "typedoc": "^0.23.20", - "typescript": "^4.8.4" - }, - "peerDependencies": { - "typedoc": "^0.23.20" - } - }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -115,6 +71,50 @@ "node": ">=6.0.0" } }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", + "integrity": "sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==", + "dev": true, + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.13.1" + } + }, + "node_modules/@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==", + "dev": true + }, + "node_modules/@apidevtools/swagger-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.1.0.tgz", + "integrity": "sha512-9Kt7EuS/7WbMAUv2gSziqjvxwDbFSg3Xeyfuj5laUODX8o/k/CpsAKiQ8W7/R88eXFTMbJYg6+7uAmOWNKmwnw==", + "dev": true, + "dependencies": { + "@apidevtools/json-schema-ref-parser": "9.0.6", + "@apidevtools/openapi-schemas": "^2.1.0", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "ajv": "^8.6.3", + "ajv-draft-04": "^1.0.0", + "call-me-maybe": "^1.0.1" + }, + "peerDependencies": { + "openapi-types": ">=7" + } + }, "node_modules/@babel/code-frame": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", @@ -648,16 +648,47 @@ } }, "node_modules/@cross-lab-project/codegen-typescript-addon": { - "resolved": "../../../helper/crosslab-typescript-addon", - "link": true + "resolved": "file:../../../helper/crosslab-typescript-addon", + "dev": true, + "license": "UNLICENSED", + "peerDependencies": { + "@apidevtools/swagger-parser": "^10.1.0", + "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", + "ajv": "^8.11.0", + "ajv-formats": "^2.1.1", + "nunjucks": "^3.2.3", + "prettier": "^2.6.2" + } }, "node_modules/@cross-lab-project/openapi-codegen": { - "resolved": "../../../helper/openapi-codegeneration", - "link": true + "resolved": "file:../../../helper/openapi-codegeneration", + "dev": true, + "license": "UNLICENSED", + "dependencies": { + "@apidevtools/swagger-parser": "^10.1.0", + "ajv": "^8.11.0", + "ajv-formats": "^2.1.1", + "commander": "^9.4.1", + "deterministic-json-schema-faker": "^0.5.0-rcv.46", + "json-schema-merge-allof": "^0.8.1", + "json-schema-to-typescript": "^10.1.5", + "nunjucks": "^3.2.3", + "prettier": "^2.6.2", + "quicktype-core": "^6.1.0", + "seedrandom": "^3.0.5", + "tiny-typed-emitter": "^2.1.0" + }, + "bin": { + "openapi-codegen": "lib/cjs/index.js" + } }, "node_modules/@cross-lab-project/tsdoc-theme": { - "resolved": "../../../helper/tsdoc-theme", - "link": true + "resolved": "file:../../../helper/tsdoc-theme", + "dev": true, + "license": "UNLICENSED", + "peerDependencies": { + "typedoc": "^0.23.20" + } }, "node_modules/@eslint/eslintrc": { "version": "1.4.1", @@ -861,6 +892,22 @@ "@jridgewell/sourcemap-codec": "1.4.14" } }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true + }, + "node_modules/@mark.probst/unicode-properties": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mark.probst/unicode-properties/-/unicode-properties-1.1.0.tgz", + "integrity": "sha512-7AQsO0hMmpqDledV7AhBuSYqYPFsKP9PaltMecX9nlnsyFxqtsqUg9/pvB2L/jxvskrDrNkdKYz2KTbQznCtng==", + "dev": true, + "dependencies": { + "brfs": "^1.4.0", + "unicode-trie": "^0.3.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -915,17 +962,45 @@ "prettier": "2.x" } }, + "node_modules/@types/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==", + "dev": true, + "dependencies": { + "@types/minimatch": "^5.1.2", + "@types/node": "*" + } + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "node_modules/@types/lodash": { + "version": "4.14.195", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", + "integrity": "sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==", + "dev": true + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true + }, "node_modules/@types/node": { "version": "18.13.0", "dev": true, "license": "MIT" }, + "node_modules/@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true + }, "node_modules/@types/semver": { "version": "7.3.13", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", @@ -1314,12 +1389,17 @@ "dev": true, "peer": true }, + "node_modules/a-sync-waterfall": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", + "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==", + "dev": true + }, "node_modules/acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true, - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1350,6 +1430,20 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", + "dev": true, + "peerDependencies": { + "ajv": "^8.5.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, "node_modules/ajv-formats": { "version": "2.1.1", "license": "MIT", @@ -1386,6 +1480,21 @@ "node": ">=4" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -1395,6 +1504,12 @@ "node": ">=8" } }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true + }, "node_modules/balanced-match": { "version": "1.0.2", "dev": true, @@ -1421,6 +1536,27 @@ "node": ">=8" } }, + "node_modules/brfs": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/brfs/-/brfs-1.6.1.tgz", + "integrity": "sha512-OfZpABRQQf+Xsmju8XE9bDjs+uU4vLREGolP7bDgcpsI17QREyZ4Bl+2KLxxx1kCgA0fAIhKQBaBYh+PEcCqYQ==", + "dev": true, + "dependencies": { + "quote-stream": "^1.0.1", + "resolve": "^1.1.5", + "static-module": "^2.2.0", + "through2": "^2.0.0" + }, + "bin": { + "brfs": "bin/cmd.js" + } + }, + "node_modules/browser-or-node": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-1.3.0.tgz", + "integrity": "sha512-0F2z/VSnLbmEeBcUrSuDH5l0HxTXdQQzLjkmBR4cYfvg1zJrKSlmIZFqyFR8oX0NrwPhy3c3HQ6i3OxMbew4Tg==", + "dev": true + }, "node_modules/browserslist": { "version": "4.21.5", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", @@ -1449,12 +1585,27 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer-equal": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", + "integrity": "sha512-RgSV6InVQ9ODPdLWJ5UAqBqJBOg370Nz6ZQtRzpt6nUjc8v0St97uJ4PYC6NztqIScrAXafKM3mZPMygSe1ggA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dev": true + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1494,6 +1645,28 @@ "node": ">=4" } }, + "node_modules/cli-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", + "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.61", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/collection-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collection-utils/-/collection-utils-1.0.1.tgz", + "integrity": "sha512-LA2YTIlR7biSpXkKYwwuzGjwL5rjWEZVOSnvdUc7gObvWe4WkjxOpfrdhoP7Hs09YWDVfg0Mal9BpAqLfVEzQg==", + "dev": true + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -1509,12 +1682,59 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, + "node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/compute-gcd": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.1.tgz", + "integrity": "sha512-TwMbxBNz0l71+8Sc4czv13h4kEqnchV9igQZBi6QUaz09dnz13juGnnaWWJTRsP3brxOoxeB4SA2WELLw1hCtg==", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, + "node_modules/compute-lcm": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/compute-lcm/-/compute-lcm-1.1.2.tgz", + "integrity": "sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ==", + "dev": true, + "dependencies": { + "compute-gcd": "^1.2.1", + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", @@ -1548,6 +1768,16 @@ "node": ">= 8" } }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1571,6 +1801,19 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/deterministic-json-schema-faker": { + "version": "0.5.0-rcv.46", + "resolved": "https://registry.npmjs.org/deterministic-json-schema-faker/-/deterministic-json-schema-faker-0.5.0-rcv.46.tgz", + "integrity": "sha512-pp7iiuue97ysVTMLXyLofpDembEepoGbdv79ie2Mdhqj4dtVQFpI9c6ecxjUiDFDBxScqWpPvVpWX88PxMPZGA==", + "dev": true, + "dependencies": { + "json-schema-ref-parser": "^6.1.0", + "jsonpath-plus": "^5.1.0" + }, + "bin": { + "jsf": "bin/gen.cjs" + } + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -1595,6 +1838,15 @@ "node": ">=6.0.0" } }, + "node_modules/duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.2" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.295", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.295.tgz", @@ -1605,12 +1857,59 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "optional": true, - "peer": true, + "devOptional": true, "dependencies": { "iconv-lite": "^0.6.2" } }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -1629,6 +1928,41 @@ "node": ">=0.8.0" } }, + "node_modules/escodegen": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", + "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", + "dev": true, + "dependencies": { + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha512-AWwVMNxwhN8+NIPQzAQZCm7RkLC4RbM3B1OobMuyp3i+w73X57KCKaVIxaRZb+DYCojq7rspo+fmuQfAboyhFg==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/eslint": { "version": "8.34.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.34.0.tgz", @@ -1995,6 +2329,19 @@ "node": ">=0.4.0" } }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/esquery": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", @@ -2062,9 +2409,53 @@ "node": ">=0.10.0" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + }, + "node_modules/falafel": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.2.5.tgz", + "integrity": "sha512-HuC1qF9iTnHDnML9YZAdCDQwT0yKl/U55K4XSUXqGAA2GLoafFgWRqdAbhWJxXaYD4pyoVxAJ8wH670jMpI9DQ==", + "dev": true, + "dependencies": { + "acorn": "^7.1.1", + "isarray": "^2.0.1" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/falafel/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "license": "MIT" }, "node_modules/fast-glob": { "version": "3.2.12", @@ -2174,12 +2565,24 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "node_modules/format-util": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/format-util/-/format-util-1.0.5.tgz", + "integrity": "sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg==", + "dev": true + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -2189,6 +2592,18 @@ "node": ">=6.9.0" } }, + "node_modules/get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -2221,6 +2636,21 @@ "node": ">=10.13.0" } }, + "node_modules/glob-promise": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-3.4.0.tgz", + "integrity": "sha512-q08RJ6O+eJn+dVanerAndJwIcumgbDdYiUT7zFQl3Wm1xD6fBKtah7H8ZJChj4wP+8C+QfeVy8xautR7rdmKEw==", + "dev": true, + "dependencies": { + "@types/glob": "*" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "glob": "*" + } + }, "node_modules/glob/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2278,6 +2708,18 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -2291,8 +2733,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "optional": true, - "peer": true, + "devOptional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -2350,6 +2791,18 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/is-core-module": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2389,6 +2842,27 @@ "node": ">=8" } }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-url": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", + "dev": true + }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -2401,12 +2875,38 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA==", + "dev": true, + "dependencies": { + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" + } + }, + "node_modules/isomorphic-fetch/node_modules/node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, + "dependencies": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + }, "node_modules/javascript-natural-sort": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==", "dev": true }, + "node_modules/js-base64": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", + "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==", + "dev": true + }, "node_modules/js-sdsl": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", @@ -2423,6 +2923,19 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -2435,6 +2948,113 @@ "node": ">=4" } }, + "node_modules/json-schema-compare": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", + "integrity": "sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ==", + "dev": true, + "dependencies": { + "lodash": "^4.17.4" + } + }, + "node_modules/json-schema-merge-allof": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/json-schema-merge-allof/-/json-schema-merge-allof-0.8.1.tgz", + "integrity": "sha512-CTUKmIlPJbsWfzRRnOXz+0MjIqvnleIXwFTzz+t9T86HnYX/Rozria6ZVGLktAU9e+NygNljveP+yxqtQp/Q4w==", + "dev": true, + "dependencies": { + "compute-lcm": "^1.1.2", + "json-schema-compare": "^0.2.2", + "lodash": "^4.17.20" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/json-schema-ref-parser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz", + "integrity": "sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw==", + "deprecated": "Please switch to @apidevtools/json-schema-ref-parser", + "dev": true, + "dependencies": { + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.12.1", + "ono": "^4.0.11" + } + }, + "node_modules/json-schema-to-typescript": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-10.1.5.tgz", + "integrity": "sha512-X8bNNksfCQo6LhEuqNxmZr4eZpPjXZajmimciuk8eWXzZlif9Brq7WuMGD/SOhBKcRKP2SGVDNZbC28WQqx9Rg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.6", + "@types/lodash": "^4.14.168", + "@types/prettier": "^2.1.5", + "cli-color": "^2.0.0", + "get-stdin": "^8.0.0", + "glob": "^7.1.6", + "glob-promise": "^3.4.0", + "is-glob": "^4.0.1", + "json-schema-ref-parser": "^9.0.6", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.20", + "minimist": "^1.2.5", + "mkdirp": "^1.0.4", + "mz": "^2.7.0", + "prettier": "^2.2.0" + }, + "bin": { + "json2ts": "dist/src/cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/json-schema-to-typescript/node_modules/@apidevtools/json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", + "dev": true, + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + } + }, + "node_modules/json-schema-to-typescript/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/json-schema-to-typescript/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-to-typescript/node_modules/json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q==", + "deprecated": "Please switch to @apidevtools/json-schema-ref-parser", + "dev": true, + "dependencies": { + "@apidevtools/json-schema-ref-parser": "9.0.9" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "license": "MIT" @@ -2445,6 +3065,12 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -2462,6 +3088,28 @@ "dev": true, "license": "MIT" }, + "node_modules/jsonpath-plus": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-5.1.0.tgz", + "integrity": "sha512-890w2Pjtj0iswAxalRlt2kHthi6HKrXEfZcn+ZNZptv7F3rUGIeDuZo+C+h4vXBHLEsVjJrHeCm35nYeZLzSBQ==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -2498,11 +3146,29 @@ "yallist": "^3.0.2" } }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.2" + } + }, "node_modules/lunr": { "version": "2.3.9", "dev": true, "license": "MIT" }, + "node_modules/magic-string": { + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", + "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", + "dev": true, + "dependencies": { + "vlq": "^0.2.2" + } + }, "node_modules/marked": { "version": "4.2.12", "dev": true, @@ -2514,6 +3180,40 @@ "node": ">= 12" } }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, + "node_modules/merge-source-map": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", + "integrity": "sha512-PGSmS0kfnTnMJCzJ16BLLCEe6oeYCamKFFdQKshi4BmM6FUwipjVOcBFGxqtQtirtAG4iZvHlqST9CpZKqlRjA==", + "dev": true, + "dependencies": { + "source-map": "^0.5.6" + } + }, + "node_modules/merge-source-map/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2548,12 +3248,44 @@ "node": ">=10" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.4", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", @@ -2579,6 +3311,12 @@ "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "node_modules/node-fetch": { "version": "2.6.7", "license": "MIT", @@ -2603,6 +3341,55 @@ "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", "dev": true }, + "node_modules/nunjucks": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz", + "integrity": "sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==", + "dev": true, + "dependencies": { + "a-sync-waterfall": "^1.0.0", + "asap": "^2.0.3", + "commander": "^5.1.0" + }, + "bin": { + "nunjucks-precompile": "bin/precompile" + }, + "engines": { + "node": ">= 6.9.0" + }, + "peerDependencies": { + "chokidar": "^3.3.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/nunjucks/node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.4.1.tgz", + "integrity": "sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw==", + "dev": true + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2612,6 +3399,39 @@ "wrappy": "1" } }, + "node_modules/ono": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/ono/-/ono-4.0.11.tgz", + "integrity": "sha512-jQ31cORBFE6td25deYeD80wxKBMj+zBmHTrVxnc6CKhx8gho6ipmWM5zj/oeoqioZ99yqBls9Z/9Nss7J26G2g==", + "dev": true, + "dependencies": { + "format-util": "^1.0.3" + } + }, + "node_modules/openapi-types": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", + "dev": true, + "peer": true + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -2642,6 +3462,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2681,6 +3507,12 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -2708,6 +3540,15 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss": { "version": "8.4.21", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", @@ -2733,12 +3574,20 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/prettier": { "version": "2.8.4", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", "dev": true, - "peer": true, "bin": { "prettier": "bin-prettier.js" }, @@ -2782,6 +3631,40 @@ } ] }, + "node_modules/quicktype-core": { + "version": "6.1.12", + "resolved": "https://registry.npmjs.org/quicktype-core/-/quicktype-core-6.1.12.tgz", + "integrity": "sha512-pBV0VbYZEKIG49xaKGHCat6zlUbg1w15fDf3rnbV2IbG3Ec3T7e46V/dIgL+OGWFphjEZ6n7dcWZiogOk9Adtg==", + "dev": true, + "dependencies": { + "@mark.probst/unicode-properties": "~1.1.0", + "browser-or-node": "^1.2.1", + "collection-utils": "^1.0.1", + "is-url": "^1.2.4", + "isomorphic-fetch": "^2.2.1", + "js-base64": "^2.4.3", + "pako": "^1.0.6", + "pluralize": "^7.0.0", + "readable-stream": "2.3.0", + "urijs": "^1.19.1", + "wordwrap": "^1.0.0", + "yaml": "^1.5.0" + } + }, + "node_modules/quote-stream": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz", + "integrity": "sha512-kKr2uQ2AokadPjvTyKJQad9xELbZwYzWlNfI3Uz2j/ib5u6H9lDP7fUUR//rMycd0gv4Z5P1qXMfXR8YpIxrjQ==", + "dev": true, + "dependencies": { + "buffer-equal": "0.0.1", + "minimist": "^1.1.3", + "through2": "^2.0.0" + }, + "bin": { + "quote-stream": "bin/cmd.js" + } + }, "node_modules/readable-stream": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz", @@ -2816,6 +3699,23 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "dev": true, + "dependencies": { + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2883,8 +3783,13 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "optional": true, - "peer": true + "devOptional": true + }, + "node_modules/seedrandom": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", + "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==", + "dev": true }, "node_modules/semver": { "version": "6.3.0", @@ -2895,6 +3800,12 @@ "semver": "bin/semver.js" } }, + "node_modules/shallow-copy": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz", + "integrity": "sha512-b6i4ZpVuUxB9h5gfCxPiusKYkqTMOjEbBs4wMaFbkfia4yFv92UKZ6Df8WXcKbn08JNL/abvg3FnMAOfakDvUw==", + "dev": true + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2940,7 +3851,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -2963,6 +3873,95 @@ "dev": true, "peer": true }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/static-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.1.0.tgz", + "integrity": "sha512-agtxZ/kWSsCkI5E4QifRwsaPs0P0JmZV6dkLz6ILYfFYQGn+5plctanRN+IC8dJRiFkyXHrwEE3W9Wmx67uDbw==", + "dev": true, + "dependencies": { + "escodegen": "^1.11.1" + } + }, + "node_modules/static-eval/node_modules/escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/static-module": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/static-module/-/static-module-2.2.5.tgz", + "integrity": "sha512-D8vv82E/Kpmz3TXHKG8PPsCPg+RAX6cbCOyvjM6x04qZtQ47EtJFVwRsdov3n5d6/6ynrOY9XB4JkaZwB2xoRQ==", + "dev": true, + "dependencies": { + "concat-stream": "~1.6.0", + "convert-source-map": "^1.5.1", + "duplexer2": "~0.1.4", + "escodegen": "~1.9.0", + "falafel": "^2.1.0", + "has": "^1.0.1", + "magic-string": "^0.22.4", + "merge-source-map": "1.0.4", + "object-inspect": "~1.4.0", + "quote-stream": "~1.0.2", + "readable-stream": "~2.3.3", + "shallow-copy": "~0.0.1", + "static-eval": "^2.0.0", + "through2": "~2.0.3" + } + }, + "node_modules/static-module/node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/static-module/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/static-module/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/string_decoder": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", @@ -3008,12 +4007,107 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, + "node_modules/tiny-inflate": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", + "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", + "dev": true + }, + "node_modules/tiny-typed-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz", + "integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==", + "dev": true + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -3060,6 +4154,24 @@ "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -3110,6 +4222,22 @@ "node": ">=4.2.0" } }, + "node_modules/unicode-trie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-0.3.1.tgz", + "integrity": "sha512-WgVuO0M2jDl7hVfbPgXv2LUrD81HM0bQj/bvLGiw6fJ4Zo8nNFnDrA0/hU2Te/wz6pjxCm5cxJwtLjo2eyV51Q==", + "dev": true, + "dependencies": { + "pako": "^0.2.5", + "tiny-inflate": "^1.0.0" + } + }, + "node_modules/unicode-trie/node_modules/pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", + "dev": true + }, "node_modules/update-browserslist-db": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", @@ -3143,12 +4271,61 @@ "punycode": "^2.1.0" } }, + "node_modules/urijs": { + "version": "1.19.11", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", + "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==", + "dev": true + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "node_modules/validate.io-array": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", + "integrity": "sha512-DeOy7CnPEziggrOO5CZhVKJw6S3Yi7e9e65R1Nl/RTN1vTQKnzjfvks0/8kQ40FP/dsjRAOd4hxmJ7uLa6vxkg==", + "dev": true + }, + "node_modules/validate.io-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz", + "integrity": "sha512-LlFybRJEriSuBnUhQyG5bwglhh50EpTL2ul23MPIuR1odjO7XaMLFV8vHGwp7AZciFxtYOeiSCT5st+XSPONiQ==", + "dev": true + }, + "node_modules/validate.io-integer": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/validate.io-integer/-/validate.io-integer-1.0.5.tgz", + "integrity": "sha512-22izsYSLojN/P6bppBqhgUDjCkr5RY2jd+N2a3DCAUey8ydvrZ/OkGvFPR7qfOpwR2LC5p4Ngzxz36g5Vgr/hQ==", + "dev": true, + "dependencies": { + "validate.io-number": "^1.0.3" + } + }, + "node_modules/validate.io-integer-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/validate.io-integer-array/-/validate.io-integer-array-1.0.0.tgz", + "integrity": "sha512-mTrMk/1ytQHtCY0oNO3dztafHYyGU88KL+jRxWuzfOmQb+4qqnWmI+gykvGp8usKZOM0H7keJHEbRaFiYA0VrA==", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-integer": "^1.0.4" + } + }, + "node_modules/validate.io-number": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/validate.io-number/-/validate.io-number-1.0.3.tgz", + "integrity": "sha512-kRAyotcbNaSYoDnXvb4MHg/0a1egJdLwS6oJ38TJY7aw9n93Fl/3blIXdyYvPOp55CNxywooG/3BcrwNrBpcSg==", + "dev": true + }, + "node_modules/vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", + "dev": true + }, "node_modules/vscode-oniguruma": { "version": "1.7.0", "dev": true, @@ -3163,6 +4340,12 @@ "version": "3.0.1", "license": "BSD-2-Clause" }, + "node_modules/whatwg-fetch": { + "version": "3.6.16", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.16.tgz", + "integrity": "sha512-83avoGbZ0qtjtNrU3UTT3/Xd3uZ7DyfSYLuc1fL5iYs+93P+UkIVF6/6xpRVWeQcvbc7kSnVybSAVbd6QFW5Fg==", + "dev": true + }, "node_modules/whatwg-url": { "version": "5.0.0", "license": "MIT", @@ -3195,18 +4378,42 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/services/booking/dist/openapi.json b/services/booking/dist/openapi.json index a400eec2..913c3c3d 100644 --- a/services/booking/dist/openapi.json +++ b/services/booking/dist/openapi.json @@ -35,7 +35,10 @@ "operationId": "schedule", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "tags": [ @@ -63,6 +66,11 @@ "type": "boolean", "description": "If true, show only one timetable per device instead of one for all available physical devices." }, + "Execute_for": { + "description": "Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'.", + "type": "string", + "format": "url" + }, "onlyOwn": { "type": "boolean", "description": "(private) Show only devices of this institution. Give an error if a device of an other institution is requested." @@ -117,6 +125,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown type IDs. The first unknown ID will be returned.", "content": { @@ -161,7 +172,10 @@ "operationId": "newBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "tags": [ @@ -195,6 +209,11 @@ "enum": [ "normal" ] + }, + "Execute_for": { + "description": "Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'.", + "type": "string", + "format": "url" } } } @@ -225,6 +244,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "500": { "description": "Request could not be answered. An error string containing the reason will be returned.", "content": { @@ -264,7 +286,7 @@ "tags": [ "booking-frontend" ], - "summary": "Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks.", + "summary": "Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required.", "requestBody": { "content": { "application/json": { @@ -284,6 +306,11 @@ "items": { "$ref": "#/components/schemas/Device" } + }, + "Execute_for": { + "description": "Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'.", + "type": "string", + "format": "url" } } }, @@ -327,6 +354,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown booking ID." }, @@ -353,7 +383,10 @@ "operationId": "deleteBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "parameters": [ @@ -371,6 +404,23 @@ "booking-frontend" ], "summary": "Cancels a booking, as long as the booking was originally done by you.", + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "Execute_for": { + "description": "Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'.", + "type": "string", + "format": "url" + } + } + } + } + } + }, "responses": { "200": { "description": "The booking was cancelled. All associated devices were released." @@ -378,6 +428,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown booking ID." }, @@ -404,7 +457,10 @@ "operationId": "getBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "parameters": [ @@ -421,7 +477,24 @@ "tags": [ "booking-frontend" ], - "summary": "Returns whether a list of devices is currently booked for a user", + "summary": "Returns whether a list of devices is currently booked for a user.", + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "Execute_for": { + "description": "Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'.", + "type": "string", + "format": "url" + } + } + } + } + } + }, "responses": { "200": { "description": "Returns the current booking.", @@ -449,6 +522,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown ID" }, @@ -474,7 +550,10 @@ "operationId": "destroyBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:destroy" + ] } ], "parameters": [ @@ -500,7 +579,7 @@ "description": "No authorisation header found." }, "403": { - "description": "User is not allowed to destroy bookings." + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." }, "404": { "description": "Request contains unknown booking ID." @@ -530,7 +609,10 @@ "operationId": "lockBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "parameters": [ @@ -580,6 +662,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown ID" }, @@ -606,7 +691,10 @@ "operationId": "unlockBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "parameters": [ @@ -631,6 +719,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown ID" }, diff --git a/services/booking/package-lock.json b/services/booking/package-lock.json index 66127e81..397ae9bc 100644 --- a/services/booking/package-lock.json +++ b/services/booking/package-lock.json @@ -1,52 +1,18 @@ { "name": "@crosslab/service-booking", - "version": "0.0.1", + "version": "0.2.3-dev.ddf69f9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@crosslab/service-booking", - "version": "0.0.1", + "version": "0.2.3-dev.ddf69f9", "license": "UNLICENSED", "devDependencies": { "@cross-lab-project/openapi-codegen": "../../helper/openapi-codegeneration", "@redocly/cli": "^1.0.0-beta.131" } }, - "../../helper/openapi-codegeneration": { - "dev": true, - "license": "UNLICENSED", - "dependencies": { - "@apidevtools/swagger-parser": "^10.1.0", - "ajv": "^8.11.0", - "ajv-formats": "^2.1.1", - "commander": "^9.4.1", - "deterministic-json-schema-faker": "^0.5.0-rcv.46", - "json-schema-merge-allof": "^0.8.1", - "json-schema-to-typescript": "^10.1.5", - "nunjucks": "^3.2.3", - "prettier": "^2.6.2", - "quicktype-core": "^6.1.0", - "seedrandom": "^3.0.5", - "tiny-typed-emitter": "^2.1.0" - }, - "bin": { - "openapi-codegen": "lib/cjs/index.js" - }, - "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.0.0", - "@types/node": "^17.0.45", - "@types/nunjucks": "^3.2.1", - "@types/prettier": "^2.6.3", - "@types/seedrandom": "^3.0.2", - "@typescript-eslint/eslint-plugin": "^5.51.0", - "@typescript-eslint/parser": "^5.51.0", - "eslint": "^8.34.0", - "openapi-types": "^12.0.0", - "tsc-watch": "^5.0.3", - "typescript": "^4.6.4" - } - }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -61,6 +27,50 @@ "node": ">=6.0.0" } }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", + "integrity": "sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==", + "dev": true, + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.13.1" + } + }, + "node_modules/@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==", + "dev": true + }, + "node_modules/@apidevtools/swagger-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.1.0.tgz", + "integrity": "sha512-9Kt7EuS/7WbMAUv2gSziqjvxwDbFSg3Xeyfuj5laUODX8o/k/CpsAKiQ8W7/R88eXFTMbJYg6+7uAmOWNKmwnw==", + "dev": true, + "dependencies": { + "@apidevtools/json-schema-ref-parser": "9.0.6", + "@apidevtools/openapi-schemas": "^2.1.0", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "ajv": "^8.6.3", + "ajv-draft-04": "^1.0.0", + "call-me-maybe": "^1.0.1" + }, + "peerDependencies": { + "openapi-types": ">=7" + } + }, "node_modules/@babel/code-frame": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", @@ -492,8 +502,26 @@ } }, "node_modules/@cross-lab-project/openapi-codegen": { - "resolved": "../../helper/openapi-codegeneration", - "link": true + "resolved": "file:../../helper/openapi-codegeneration", + "dev": true, + "license": "UNLICENSED", + "dependencies": { + "@apidevtools/swagger-parser": "^10.1.0", + "ajv": "^8.11.0", + "ajv-formats": "^2.1.1", + "commander": "^9.4.1", + "deterministic-json-schema-faker": "^0.5.0-rcv.46", + "json-schema-merge-allof": "^0.8.1", + "json-schema-to-typescript": "^10.1.5", + "nunjucks": "^3.2.3", + "prettier": "^2.6.2", + "quicktype-core": "^6.1.0", + "seedrandom": "^3.0.5", + "tiny-typed-emitter": "^2.1.0" + }, + "bin": { + "openapi-codegen": "lib/cjs/index.js" + } }, "node_modules/@emotion/is-prop-valid": { "version": "1.2.1", @@ -593,6 +621,22 @@ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true + }, + "node_modules/@mark.probst/unicode-properties": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mark.probst/unicode-properties/-/unicode-properties-1.1.0.tgz", + "integrity": "sha512-7AQsO0hMmpqDledV7AhBuSYqYPFsKP9PaltMecX9nlnsyFxqtsqUg9/pvB2L/jxvskrDrNkdKYz2KTbQznCtng==", + "dev": true, + "dependencies": { + "brfs": "^1.4.0", + "unicode-trie": "^0.3.0" + } + }, "node_modules/@redocly/ajv": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.0.tgz", @@ -751,6 +795,12 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "node_modules/@types/lodash": { + "version": "4.14.195", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", + "integrity": "sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==", + "dev": true + }, "node_modules/@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", @@ -763,6 +813,12 @@ "integrity": "sha512-IOXCvVRToe7e0ny7HpT/X9Rb2RYtElG1a+VshjwT00HxrM2dWBApHQoqsI6WiY7Q03vdf2bCrIGzVrkF/5t10w==", "dev": true }, + "node_modules/@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", @@ -938,6 +994,12 @@ "dev": true, "peer": true }, + "node_modules/a-sync-waterfall": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", + "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==", + "dev": true + }, "node_modules/acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", @@ -961,6 +1023,53 @@ "acorn": "^8" } }, + "node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", + "dev": true, + "peerDependencies": { + "ajv": "^8.5.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -982,6 +1091,12 @@ "node": ">=4" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -995,6 +1110,21 @@ "node": ">= 8" } }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true + }, "node_modules/assert-node-version": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/assert-node-version/-/assert-node-version-1.0.3.tgz", @@ -1079,6 +1209,27 @@ "node": ">=8" } }, + "node_modules/brfs": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/brfs/-/brfs-1.6.1.tgz", + "integrity": "sha512-OfZpABRQQf+Xsmju8XE9bDjs+uU4vLREGolP7bDgcpsI17QREyZ4Bl+2KLxxx1kCgA0fAIhKQBaBYh+PEcCqYQ==", + "dev": true, + "dependencies": { + "quote-stream": "^1.0.1", + "resolve": "^1.1.5", + "static-module": "^2.2.0", + "through2": "^2.0.0" + }, + "bin": { + "brfs": "bin/cmd.js" + } + }, + "node_modules/browser-or-node": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-1.3.0.tgz", + "integrity": "sha512-0F2z/VSnLbmEeBcUrSuDH5l0HxTXdQQzLjkmBR4cYfvg1zJrKSlmIZFqyFR8oX0NrwPhy3c3HQ6i3OxMbew4Tg==", + "dev": true + }, "node_modules/browserslist": { "version": "4.21.9", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", @@ -1112,12 +1263,20 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer-equal": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", + "integrity": "sha512-RgSV6InVQ9ODPdLWJ5UAqBqJBOg370Nz6ZQtRzpt6nUjc8v0St97uJ4PYC6NztqIScrAXafKM3mZPMygSe1ggA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/call-me-maybe": { "version": "1.0.1", @@ -1212,6 +1371,22 @@ "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==", "dev": true }, + "node_modules/cli-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", + "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.61", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -1232,6 +1407,12 @@ "node": ">=6" } }, + "node_modules/collection-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collection-utils/-/collection-utils-1.0.1.tgz", + "integrity": "sha512-LA2YTIlR7biSpXkKYwwuzGjwL5rjWEZVOSnvdUc7gObvWe4WkjxOpfrdhoP7Hs09YWDVfg0Mal9BpAqLfVEzQg==", + "dev": true + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -1253,18 +1434,100 @@ "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", "dev": true }, + "node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/compute-gcd": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.1.tgz", + "integrity": "sha512-TwMbxBNz0l71+8Sc4czv13h4kEqnchV9igQZBi6QUaz09dnz13juGnnaWWJTRsP3brxOoxeB4SA2WELLw1hCtg==", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, + "node_modules/compute-lcm": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/compute-lcm/-/compute-lcm-1.1.2.tgz", + "integrity": "sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ==", + "dev": true, + "dependencies": { + "compute-gcd": "^1.2.1", + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/concat-stream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/concat-stream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/concat-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/concat-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true, - "peer": true + "dev": true }, "node_modules/core-js": { "version": "3.31.1", @@ -1278,6 +1541,12 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, "node_modules/css-color-keywords": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", @@ -1298,6 +1567,16 @@ "postcss-value-parser": "^4.0.2" } }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "node_modules/debug": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", @@ -1313,12 +1592,76 @@ "integrity": "sha512-m8FnyHXV1QX+S1cl+KPFDIl6NMkxtKsy6+U/aYyjrOqWMuwAwYWu7ePqrsUHtDR5Y8Yk2pi/KIDSgF+vT4cPOQ==", "dev": true }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/deterministic-json-schema-faker": { + "version": "0.5.0-rcv.46", + "resolved": "https://registry.npmjs.org/deterministic-json-schema-faker/-/deterministic-json-schema-faker-0.5.0-rcv.46.tgz", + "integrity": "sha512-pp7iiuue97ysVTMLXyLofpDembEepoGbdv79ie2Mdhqj4dtVQFpI9c6ecxjUiDFDBxScqWpPvVpWX88PxMPZGA==", + "dev": true, + "dependencies": { + "json-schema-ref-parser": "^6.1.0", + "jsonpath-plus": "^5.1.0" + }, + "bin": { + "jsf": "bin/gen.cjs" + } + }, "node_modules/dompurify": { "version": "2.4.7", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.7.tgz", "integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ==", "dev": true }, + "node_modules/duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/duplexer2/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/duplexer2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/duplexer2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/duplexer2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.459", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.459.tgz", @@ -1332,6 +1675,15 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, "node_modules/enhanced-resolve": { "version": "5.15.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", @@ -1353,12 +1705,60 @@ "dev": true, "peer": true }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, "node_modules/es6-promise": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", "dev": true }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -1377,18 +1777,66 @@ "node": ">=0.8.0" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/escodegen": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", + "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", "dev": true, - "peer": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" }, "engines": { - "node": ">=8.0.0" + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha512-AWwVMNxwhN8+NIPQzAQZCm7RkLC4RbM3B1OobMuyp3i+w73X57KCKaVIxaRZb+DYCojq7rspo+fmuQfAboyhFg==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" } }, "node_modules/esrecurse": { @@ -1419,11 +1867,29 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, - "peer": true, "engines": { "node": ">=4.0" } }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -1449,6 +1915,46 @@ "node": ">=0.10.0" } }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + }, + "node_modules/falafel": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.2.5.tgz", + "integrity": "sha512-HuC1qF9iTnHDnML9YZAdCDQwT0yKl/U55K4XSUXqGAA2GLoafFgWRqdAbhWJxXaYD4pyoVxAJ8wH670jMpI9DQ==", + "dev": true, + "dependencies": { + "acorn": "^7.1.1", + "isarray": "^2.0.1" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/falafel/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1462,6 +1968,12 @@ "dev": true, "peer": true }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, "node_modules/fast-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", @@ -1486,6 +1998,12 @@ "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", "dev": true }, + "node_modules/format-util": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/format-util/-/format-util-1.0.5.tgz", + "integrity": "sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg==", + "dev": true + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1506,6 +2024,12 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -1525,6 +2049,18 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -1616,6 +2152,18 @@ "uglify-js": "^3.1.4" } }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -1646,6 +2194,18 @@ "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==", "dev": true }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -1674,6 +2234,18 @@ "node": ">=8" } }, + "node_modules/is-core-module": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1713,6 +2285,53 @@ "node": ">=0.12.0" } }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-url": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", + "dev": true + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA==", + "dev": true, + "dependencies": { + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" + } + }, + "node_modules/isomorphic-fetch/node_modules/node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, + "dependencies": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + }, "node_modules/jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", @@ -1754,6 +2373,12 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/js-base64": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", + "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==", + "dev": true + }, "node_modules/js-levenshtein": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", @@ -1769,6 +2394,19 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -1797,12 +2435,125 @@ "foreach": "^2.0.4" } }, + "node_modules/json-schema-compare": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", + "integrity": "sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ==", + "dev": true, + "dependencies": { + "lodash": "^4.17.4" + } + }, + "node_modules/json-schema-merge-allof": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/json-schema-merge-allof/-/json-schema-merge-allof-0.8.1.tgz", + "integrity": "sha512-CTUKmIlPJbsWfzRRnOXz+0MjIqvnleIXwFTzz+t9T86HnYX/Rozria6ZVGLktAU9e+NygNljveP+yxqtQp/Q4w==", + "dev": true, + "dependencies": { + "compute-lcm": "^1.1.2", + "json-schema-compare": "^0.2.2", + "lodash": "^4.17.20" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/json-schema-ref-parser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz", + "integrity": "sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw==", + "deprecated": "Please switch to @apidevtools/json-schema-ref-parser", + "dev": true, + "dependencies": { + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.12.1", + "ono": "^4.0.11" + } + }, + "node_modules/json-schema-to-typescript": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-10.1.5.tgz", + "integrity": "sha512-X8bNNksfCQo6LhEuqNxmZr4eZpPjXZajmimciuk8eWXzZlif9Brq7WuMGD/SOhBKcRKP2SGVDNZbC28WQqx9Rg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.6", + "@types/lodash": "^4.14.168", + "@types/prettier": "^2.1.5", + "cli-color": "^2.0.0", + "get-stdin": "^8.0.0", + "glob": "^7.1.6", + "glob-promise": "^3.4.0", + "is-glob": "^4.0.1", + "json-schema-ref-parser": "^9.0.6", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.20", + "minimist": "^1.2.5", + "mkdirp": "^1.0.4", + "mz": "^2.7.0", + "prettier": "^2.2.0" + }, + "bin": { + "json2ts": "dist/src/cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/json-schema-to-typescript/node_modules/@apidevtools/json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", + "dev": true, + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + } + }, + "node_modules/json-schema-to-typescript/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/json-schema-to-typescript/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-to-typescript/node_modules/json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q==", + "deprecated": "Please switch to @apidevtools/json-schema-ref-parser", + "dev": true, + "dependencies": { + "@apidevtools/json-schema-ref-parser": "9.0.9" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -1816,6 +2567,28 @@ "node": ">=6" } }, + "node_modules/jsonpath-plus": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-5.1.0.tgz", + "integrity": "sha512-890w2Pjtj0iswAxalRlt2kHthi6HKrXEfZcn+ZNZptv7F3rUGIeDuZo+C+h4vXBHLEsVjJrHeCm35nYeZLzSBQ==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", @@ -1862,12 +2635,30 @@ "node": ">=10" } }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.2" + } + }, "node_modules/lunr": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", "dev": true }, + "node_modules/magic-string": { + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", + "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", + "dev": true, + "dependencies": { + "vlq": "^0.2.2" + } + }, "node_modules/mark.js": { "version": "8.11.1", "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", @@ -1886,6 +2677,40 @@ "node": ">= 12" } }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, + "node_modules/merge-source-map": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", + "integrity": "sha512-PGSmS0kfnTnMJCzJ16BLLCEe6oeYCamKFFdQKshi4BmM6FUwipjVOcBFGxqtQtirtAG4iZvHlqST9CpZKqlRjA==", + "dev": true, + "dependencies": { + "source-map": "^0.5.6" + } + }, + "node_modules/merge-source-map/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -1937,6 +2762,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/mobx": { "version": "6.9.1", "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.9.1.tgz", @@ -2000,12 +2837,29 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "node_modules/node-fetch": { "version": "2.6.12", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", @@ -2063,6 +2917,40 @@ "node": ">=0.10.0" } }, + "node_modules/nunjucks": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz", + "integrity": "sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==", + "dev": true, + "dependencies": { + "a-sync-waterfall": "^1.0.0", + "asap": "^2.0.3", + "commander": "^5.1.0" + }, + "bin": { + "nunjucks-precompile": "bin/precompile" + }, + "engines": { + "node": ">= 6.9.0" + }, + "peerDependencies": { + "chokidar": "^3.3.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/nunjucks/node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/oas-kit-common": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", @@ -2142,6 +3030,12 @@ "node": ">=0.10.0" } }, + "node_modules/object-inspect": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.4.1.tgz", + "integrity": "sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw==", + "dev": true + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2151,6 +3045,15 @@ "wrappy": "1" } }, + "node_modules/ono": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/ono/-/ono-4.0.11.tgz", + "integrity": "sha512-jQ31cORBFE6td25deYeD80wxKBMj+zBmHTrVxnc6CKhx8gho6ipmWM5zj/oeoqioZ99yqBls9Z/9Nss7J26G2g==", + "dev": true, + "dependencies": { + "format-util": "^1.0.3" + } + }, "node_modules/openapi-sampler": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.3.1.tgz", @@ -2161,6 +3064,36 @@ "json-pointer": "0.6.2" } }, + "node_modules/openapi-types": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", + "dev": true, + "peer": true + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -2176,6 +3109,12 @@ "node": ">=0.10.0" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/perfect-scrollbar": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.5.5.tgz", @@ -2254,6 +3193,30 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/prismjs": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", @@ -2263,6 +3226,12 @@ "node": ">=6" } }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -2309,6 +3278,91 @@ } ] }, + "node_modules/quicktype-core": { + "version": "6.1.12", + "resolved": "https://registry.npmjs.org/quicktype-core/-/quicktype-core-6.1.12.tgz", + "integrity": "sha512-pBV0VbYZEKIG49xaKGHCat6zlUbg1w15fDf3rnbV2IbG3Ec3T7e46V/dIgL+OGWFphjEZ6n7dcWZiogOk9Adtg==", + "dev": true, + "dependencies": { + "@mark.probst/unicode-properties": "~1.1.0", + "browser-or-node": "^1.2.1", + "collection-utils": "^1.0.1", + "is-url": "^1.2.4", + "isomorphic-fetch": "^2.2.1", + "js-base64": "^2.4.3", + "pako": "^1.0.6", + "pluralize": "^7.0.0", + "readable-stream": "2.3.0", + "urijs": "^1.19.1", + "wordwrap": "^1.0.0", + "yaml": "^1.5.0" + } + }, + "node_modules/quicktype-core/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/quicktype-core/node_modules/pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/quicktype-core/node_modules/process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha512-yN0WQmuCX63LP/TMvAg31nvT6m4vDqJEiiv2CAZqWOGNWutc9DfDk1NPYYmKUFmaVM2UwDowH4u5AHWYP/jxKw==", + "dev": true + }, + "node_modules/quicktype-core/node_modules/readable-stream": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz", + "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "safe-buffer": "~5.1.0", + "string_decoder": "~1.0.0", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/quicktype-core/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/quicktype-core/node_modules/string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/quote-stream": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz", + "integrity": "sha512-kKr2uQ2AokadPjvTyKJQad9xELbZwYzWlNfI3Uz2j/ib5u6H9lDP7fUUR//rMycd0gv4Z5P1qXMfXR8YpIxrjQ==", + "dev": true, + "dependencies": { + "buffer-equal": "0.0.1", + "minimist": "^1.1.3", + "through2": "^2.0.0" + }, + "bin": { + "quote-stream": "bin/cmd.js" + } + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -2465,6 +3519,23 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "dev": true, + "dependencies": { + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -2485,6 +3556,12 @@ } ] }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "node_modules/scheduler": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", @@ -2548,6 +3625,12 @@ "dev": true, "peer": true }, + "node_modules/seedrandom": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", + "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==", + "dev": true + }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -2573,6 +3656,12 @@ "randombytes": "^2.1.0" } }, + "node_modules/shallow-copy": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz", + "integrity": "sha512-b6i4ZpVuUxB9h5gfCxPiusKYkqTMOjEbBs4wMaFbkfia4yFv92UKZ6Df8WXcKbn08JNL/abvg3FnMAOfakDvUw==", + "dev": true + }, "node_modules/shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", @@ -2712,6 +3801,101 @@ "source-map": "^0.6.0" } }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/static-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.1.0.tgz", + "integrity": "sha512-agtxZ/kWSsCkI5E4QifRwsaPs0P0JmZV6dkLz6ILYfFYQGn+5plctanRN+IC8dJRiFkyXHrwEE3W9Wmx67uDbw==", + "dev": true, + "dependencies": { + "escodegen": "^1.11.1" + } + }, + "node_modules/static-eval/node_modules/escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/static-module": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/static-module/-/static-module-2.2.5.tgz", + "integrity": "sha512-D8vv82E/Kpmz3TXHKG8PPsCPg+RAX6cbCOyvjM6x04qZtQ47EtJFVwRsdov3n5d6/6ynrOY9XB4JkaZwB2xoRQ==", + "dev": true, + "dependencies": { + "concat-stream": "~1.6.0", + "convert-source-map": "^1.5.1", + "duplexer2": "~0.1.4", + "escodegen": "~1.9.0", + "falafel": "^2.1.0", + "has": "^1.0.1", + "magic-string": "^0.22.4", + "merge-source-map": "1.0.4", + "object-inspect": "~1.4.0", + "quote-stream": "~1.0.2", + "readable-stream": "~2.3.3", + "shallow-copy": "~0.0.1", + "static-eval": "^2.0.0", + "through2": "~2.0.3" + } + }, + "node_modules/static-module/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/static-module/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/static-module/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/static-module/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/stickyfill": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stickyfill/-/stickyfill-1.1.1.tgz", @@ -2811,6 +3995,18 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/swagger2openapi": { "version": "7.0.8", "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-7.0.8.tgz", @@ -2909,6 +4105,95 @@ "dev": true, "peer": true }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, + "node_modules/tiny-inflate": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", + "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", + "dev": true + }, + "node_modules/tiny-typed-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz", + "integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==", + "dev": true + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -2936,6 +4221,30 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true + }, "node_modules/uglify-js": { "version": "3.17.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", @@ -2949,6 +4258,22 @@ "node": ">=0.8.0" } }, + "node_modules/unicode-trie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-0.3.1.tgz", + "integrity": "sha512-WgVuO0M2jDl7hVfbPgXv2LUrD81HM0bQj/bvLGiw6fJ4Zo8nNFnDrA0/hU2Te/wz6pjxCm5cxJwtLjo2eyV51Q==", + "dev": true, + "dependencies": { + "pako": "^0.2.5", + "tiny-inflate": "^1.0.0" + } + }, + "node_modules/unicode-trie/node_modules/pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", + "dev": true + }, "node_modules/update-browserslist-db": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", @@ -2989,6 +4314,12 @@ "punycode": "^2.1.0" } }, + "node_modules/urijs": { + "version": "1.19.11", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", + "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==", + "dev": true + }, "node_modules/url-template": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", @@ -3001,6 +4332,49 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "node_modules/validate.io-array": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", + "integrity": "sha512-DeOy7CnPEziggrOO5CZhVKJw6S3Yi7e9e65R1Nl/RTN1vTQKnzjfvks0/8kQ40FP/dsjRAOd4hxmJ7uLa6vxkg==", + "dev": true + }, + "node_modules/validate.io-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz", + "integrity": "sha512-LlFybRJEriSuBnUhQyG5bwglhh50EpTL2ul23MPIuR1odjO7XaMLFV8vHGwp7AZciFxtYOeiSCT5st+XSPONiQ==", + "dev": true + }, + "node_modules/validate.io-integer": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/validate.io-integer/-/validate.io-integer-1.0.5.tgz", + "integrity": "sha512-22izsYSLojN/P6bppBqhgUDjCkr5RY2jd+N2a3DCAUey8ydvrZ/OkGvFPR7qfOpwR2LC5p4Ngzxz36g5Vgr/hQ==", + "dev": true, + "dependencies": { + "validate.io-number": "^1.0.3" + } + }, + "node_modules/validate.io-integer-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/validate.io-integer-array/-/validate.io-integer-array-1.0.0.tgz", + "integrity": "sha512-mTrMk/1ytQHtCY0oNO3dztafHYyGU88KL+jRxWuzfOmQb+4qqnWmI+gykvGp8usKZOM0H7keJHEbRaFiYA0VrA==", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-integer": "^1.0.4" + } + }, + "node_modules/validate.io-number": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/validate.io-number/-/validate.io-number-1.0.3.tgz", + "integrity": "sha512-kRAyotcbNaSYoDnXvb4MHg/0a1egJdLwS6oJ38TJY7aw9n93Fl/3blIXdyYvPOp55CNxywooG/3BcrwNrBpcSg==", + "dev": true + }, + "node_modules/vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", + "dev": true + }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", @@ -3079,6 +4453,12 @@ "node": ">=10.13.0" } }, + "node_modules/whatwg-fetch": { + "version": "3.6.16", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.16.tgz", + "integrity": "sha512-83avoGbZ0qtjtNrU3UTT3/Xd3uZ7DyfSYLuc1fL5iYs+93P+UkIVF6/6xpRVWeQcvbc7kSnVybSAVbd6QFW5Fg==", + "dev": true + }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", @@ -3089,6 +4469,15 @@ "webidl-conversions": "^3.0.0" } }, + "node_modules/word-wrap": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -3172,6 +4561,15 @@ } } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/services/booking/src/booking-backend/api/component.yml b/services/booking/src/booking-backend/api/component.yml index 1acac189..0a2d925e 100644 --- a/services/booking/src/booking-backend/api/component.yml +++ b/services/booking/src/booking-backend/api/component.yml @@ -2,7 +2,9 @@ put: operationId: 'lockBooking' security: - - JWT: [] + - JWT: + - booking + - booking:use parameters: - $ref: '#/components/parameters/ID' name: ID @@ -36,6 +38,9 @@ format: uri '401': description: No authorisation header found. + '403': + description: >- + Caller is not allowed to call this method. Usually, caller is missing required scopes. '404': description: Request contains unknown ID '412': @@ -55,7 +60,9 @@ delete: operationId: 'unlockBooking' security: - - JWT: [] + - JWT: + - booking + - booking:use parameters: - $ref: '#/components/parameters/ID' name: ID @@ -72,6 +79,9 @@ description: Unlocking was successful. '401': description: No authorisation header found. + '403': + description: >- + Caller is not allowed to call this method. Usually, caller is missing required scopes. '404': description: Request contains unknown ID '412': diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 686a9654..24be1ef0 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -37,7 +37,7 @@ export async function handleCallback(type: callbackType, targetBooking: bigint, try { await db.beginTransaction(); // Lock booking - let [bookingRow, bookingFields]: [any, any] = await db.execute("SELECT `start`,`end`,`type`,`status` FROM booking WHERE `id`=? FOR UPDATE", [targetBooking]); + let [bookingRow, bookingFields]: [any, any] = await db.execute("SELECT `start`,`end`,`type`,`status`,`user` FROM booking WHERE `id`=? FOR UPDATE", [targetBooking]); if (bookingRow.length == 0) { throw Error("Booking (" + targetBooking + ") not known"); } @@ -63,7 +63,7 @@ export async function handleCallback(type: callbackType, targetBooking: bigint, throw Error("Booking must be local for device update"); } - let device = await api.getDevice(rows[0].bookeddevice); + let device = await api.getDevice(rows[0].bookeddevice, {execute_for: bookingRow[0].user}); if (device.type == "group") { throw Error("Booked device " + rows[0].bookeddevice + " is group"); } @@ -89,7 +89,7 @@ export async function handleCallback(type: callbackType, targetBooking: bigint, throw Error("Booking must be remote for device update"); } - let getReturn = await api.getBooking(rows[0].remotereference); + let getReturn = await api.getBooking(rows[0].remotereference, {execute_for: bookingRow[0].user}); if (getReturn.Booking.Status == "cancelled" || getReturn.Booking.Status == "rejected") { available = false; } @@ -356,7 +356,7 @@ export async function reservateDevice(r: DeviceBookingRequest) { if (!url.endsWith("/")) { url = url + "/"; } - url = url + "booking/manage/" + r.BookingID + url = url + "booking/" + r.BookingID m.BookingReference = new URL(url); m.Start = r.Start; m.End = r.End; @@ -411,7 +411,7 @@ export async function reservateDevice(r: DeviceBookingRequest) { } await sleep(1000); - let getReturn = await api.getBooking(institution + "/booking/manage/" + ID); + let getReturn = await api.getBooking(institution + "/booking/" + ID); switch (getReturn.Booking.Status) { case "pending": diff --git a/services/booking/src/booking-frontend/api/component.yml b/services/booking/src/booking-frontend/api/component.yml index 291b0ead..4e4acffb 100644 --- a/services/booking/src/booking-frontend/api/component.yml +++ b/services/booking/src/booking-frontend/api/component.yml @@ -2,7 +2,9 @@ post: operationId: 'newBooking' security: - - JWT: [] + - JWT: + - booking + - booking:use tags: - booking-frontend summary: Books an experiment. @@ -28,6 +30,10 @@ type: string enum: - normal + Execute_for: + description: Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'. + type: string + format: url responses: '200': description: The booking was accepted. The booking status will display whether the booking of all devices was successful. @@ -44,6 +50,9 @@ description: ID at which the booking can be managed. '401': description: No authorisation header found. + '403': + description: >- + Caller is not allowed to call this method. Usually, caller is missing required scopes. '500': description: >- Request could not be answered. An error string containing the reason @@ -70,7 +79,7 @@ description: ID of Booking tags: - booking-frontend - summary: Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. + summary: Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. requestBody: content: application/json: @@ -87,6 +96,10 @@ description: List of devices which should be added. items: $ref: '#/components/schemas/Device' + Execute_for: + description: Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'. + type: string + format: url - type: object description: Use this request for adding callbacks. properties: @@ -110,6 +123,9 @@ format: uri '401': description: No authorisation header found. + '403': + description: >- + Caller is not allowed to call this method. Usually, caller is missing required scopes. '404': description: Request contains unknown booking ID. '423': @@ -130,7 +146,9 @@ delete: operationId: 'deleteBooking' security: - - JWT: [] + - JWT: + - booking + - booking:use parameters: - $ref: '#/components/parameters/ID' name: ID @@ -141,12 +159,26 @@ tags: - booking-frontend summary: Cancels a booking, as long as the booking was originally done by you. + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + Execute_for: + description: Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'. + type: string + format: url responses: '200': description: >- The booking was cancelled. All associated devices were released. '401': description: No authorisation header found. + '403': + description: >- + Caller is not allowed to call this method. Usually, caller is missing required scopes. '404': description: Request contains unknown booking ID. '423': @@ -167,7 +199,9 @@ get: operationId: 'getBooking' security: - - JWT: [] + - JWT: + - booking + - booking:use parameters: - $ref: '#/components/parameters/ID' name: ID @@ -178,7 +212,18 @@ tags: - booking-frontend summary: >- - Returns whether a list of devices is currently booked for a user + Returns whether a list of devices is currently booked for a user. + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + Execute_for: + description: Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'. + type: string + format: url responses: '200': description: Returns the current booking. @@ -197,6 +242,9 @@ description: Shows if the booking is in a locked status. '401': description: No authorisation header found. + '403': + description: >- + Caller is not allowed to call this method. Usually, caller is missing required scopes. '404': description: Request contains unknown ID '500': @@ -215,7 +263,9 @@ delete: operationId: 'destroyBooking' security: - - JWT: [] + - JWT: + - booking + - booking:destroy parameters: - $ref: '#/components/parameters/ID' name: ID @@ -233,7 +283,8 @@ '401': description: No authorisation header found. '403': - description: User is not allowed to destroy bookings. + description: >- + Caller is not allowed to call this method. Usually, caller is missing required scopes. '404': description: Request contains unknown booking ID. '423': diff --git a/services/booking/src/booking-frontend/src/operations.ts b/services/booking/src/booking-frontend/src/operations.ts index 43faed64..fad4fbde 100644 --- a/services/booking/src/booking-frontend/src/operations.ts +++ b/services/booking/src/booking-frontend/src/operations.ts @@ -68,7 +68,7 @@ export const postBooking: postBookingSignature = async (body, user) => { return { status: 200, body: { - BookingID: r.origin + "/booking/manage/" + bookingID.toString(), + BookingID: r.origin + "/booking/" + bookingID.toString(), } } } catch (err) { @@ -255,6 +255,7 @@ export const patchBookingByID: patchBookingByIDSignature = async (parameters, bo // this is adding a callback await db.execute("INSERT INTO bookingcallbacks (`booking`, `url`) VALUES (?,?)", [requestID, body.Callback]); } else if (typeof(body.Devices) !== undefined) { + // TODO: Check for scopes 'booking' and 'booking:use' let Devices: Device[] = body.Devices as Device[]; if (user.JWT === undefined || rows[0].user != user.JWT.username) { return { @@ -346,7 +347,7 @@ export const patchBookingByID: patchBookingByIDSignature = async (parameters, bo if (!url.endsWith("/")) { url = url + "/"; } - url = url + "booking/manage/" + requestID; + url = url + "booking/" + requestID; return { status: 200, diff --git a/services/booking/src/schedule-service/api/component.yml b/services/booking/src/schedule-service/api/component.yml index 586d239f..ce088a56 100644 --- a/services/booking/src/schedule-service/api/component.yml +++ b/services/booking/src/schedule-service/api/component.yml @@ -2,7 +2,9 @@ post: operationId: 'schedule' security: - - JWT: [] + - JWT: + - booking + - booking:use tags: - schedule-service summary: Returns the free / booked times for given experiment. @@ -23,6 +25,10 @@ Combined: type: boolean description: If true, show only one timetable per device instead of one for all available physical devices. + Execute_for: + description: Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'. + type: string + format: url onlyOwn: type: boolean description: (private) Show only devices of this institution. Give an error if a device of an other institution is requested. @@ -57,6 +63,9 @@ description: onlyOwn was set, but devices not belonging to that institution were requested. '401': description: No authorisation header found. + '403': + description: >- + Caller is not allowed to call this method. Usually, caller is missing required scopes. '404': description: Request contains unknown type IDs. The first unknown ID will be returned. content: diff --git a/services/openapi/dist/openapi.json b/services/openapi/dist/openapi.json index 4aa8e4b0..44a4def8 100644 --- a/services/openapi/dist/openapi.json +++ b/services/openapi/dist/openapi.json @@ -1175,7 +1175,10 @@ "operationId": "schedule", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "tags": [ @@ -1203,6 +1206,11 @@ "type": "boolean", "description": "If true, show only one timetable per device instead of one for all available physical devices." }, + "Execute_for": { + "description": "Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'.", + "type": "string", + "format": "url" + }, "onlyOwn": { "type": "boolean", "description": "(private) Show only devices of this institution. Give an error if a device of an other institution is requested." @@ -1257,6 +1265,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown type IDs. The first unknown ID will be returned.", "content": { @@ -1302,7 +1313,10 @@ "operationId": "newBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "tags": [ @@ -1336,6 +1350,11 @@ "enum": [ "normal" ] + }, + "Execute_for": { + "description": "Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'.", + "type": "string", + "format": "url" } } } @@ -1366,6 +1385,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "500": { "description": "Request could not be answered. An error string containing the reason will be returned.", "content": { @@ -1406,7 +1428,7 @@ "tags": [ "booking-frontend" ], - "summary": "Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks.", + "summary": "Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required.", "requestBody": { "content": { "application/json": { @@ -1426,6 +1448,11 @@ "items": { "$ref": "#/components/schemas/Device" } + }, + "Execute_for": { + "description": "Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'.", + "type": "string", + "format": "url" } } }, @@ -1469,6 +1496,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown booking ID." }, @@ -1496,7 +1526,10 @@ "operationId": "deleteBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "parameters": [ @@ -1514,6 +1547,23 @@ "booking-frontend" ], "summary": "Cancels a booking, as long as the booking was originally done by you.", + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "Execute_for": { + "description": "Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'.", + "type": "string", + "format": "url" + } + } + } + } + } + }, "responses": { "200": { "description": "The booking was cancelled. All associated devices were released." @@ -1521,6 +1571,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown booking ID." }, @@ -1548,7 +1601,10 @@ "operationId": "getBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "parameters": [ @@ -1565,7 +1621,24 @@ "tags": [ "booking-frontend" ], - "summary": "Returns whether a list of devices is currently booked for a user", + "summary": "Returns whether a list of devices is currently booked for a user.", + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "Execute_for": { + "description": "Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'.", + "type": "string", + "format": "url" + } + } + } + } + } + }, "responses": { "200": { "description": "Returns the current booking.", @@ -1593,6 +1666,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown ID" }, @@ -1619,7 +1695,10 @@ "operationId": "destroyBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:destroy" + ] } ], "parameters": [ @@ -1645,7 +1724,7 @@ "description": "No authorisation header found." }, "403": { - "description": "User is not allowed to destroy bookings." + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." }, "404": { "description": "Request contains unknown booking ID." @@ -1676,7 +1755,10 @@ "operationId": "lockBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "parameters": [ @@ -1726,6 +1808,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown ID" }, @@ -1753,7 +1838,10 @@ "operationId": "unlockBooking", "security": [ { - "JWT": [] + "JWT": [ + "booking", + "booking:use" + ] } ], "parameters": [ @@ -1778,6 +1866,9 @@ "401": { "description": "No authorisation header found." }, + "403": { + "description": "Caller is not allowed to call this method. Usually, caller is missing required scopes." + }, "404": { "description": "Request contains unknown ID" }, From da913da56bf60efd0d6f23f9202925fe55ce6c64 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 28 Feb 2024 11:34:48 +0000 Subject: [PATCH 02/79] Buildable and testable schedule-service --- .../src/booking-backend/api/component.yml | 38 ++-- .../src/booking-frontend/api/component.yml | 30 --- .../src/schedule-service/api/component.yml | 4 - .../src/schedule-service/package-lock.json | 72 ++++++- .../booking/src/schedule-service/package.json | 2 +- .../booking/src/schedule-service/src/index.ts | 37 ++-- .../{operations.ts => operations/index.ts} | 10 +- .../src/{ => operations}/operations_test.ts | 201 ++++-------------- .../booking/src/test_common/package-lock.json | 55 ++++- services/booking/src/test_common/package.json | 1 + .../src/test_common/src/fakerequest.ts | 8 + .../booking/src/test_common/src/fakeserver.ts | 22 +- services/booking/src/test_common/src/index.ts | 1 + services/openapi/generate.js | 1 + 14 files changed, 221 insertions(+), 261 deletions(-) rename services/booking/src/schedule-service/src/{operations.ts => operations/index.ts} (97%) rename services/booking/src/schedule-service/src/{ => operations}/operations_test.ts (85%) create mode 100644 services/booking/src/test_common/src/fakerequest.ts diff --git a/services/booking/src/booking-backend/api/component.yml b/services/booking/src/booking-backend/api/component.yml index dc836415..0a2d925e 100644 --- a/services/booking/src/booking-backend/api/component.yml +++ b/services/booking/src/booking-backend/api/component.yml @@ -112,22 +112,22 @@ description: ID of Booking tags: - booking-backend - summary: >- - Callback used for updating device info / booking info. - responses: - '200': - description: Update was processed. - '404': - description: Callback is no longer needed. - '500': - description: >- - Request could not be answered. An error string containing the reason - will be returned. - content: - application/json: - schema: - type: string - description: Error description. - '503': - description: >- - Service is unable to respond in time, possibly overloaded. Try again in a few minutes. + summary: >- + Callback used for updating device info / booking info. + responses: + '200': + description: Update was processed. + '404': + description: Callback is no longer needed. + '500': + description: >- + Request could not be answered. An error string containing the reason + will be returned. + content: + application/json: + schema: + type: string + description: Error description. + '503': + description: >- + Service is unable to respond in time, possibly overloaded. Try again in a few minutes. diff --git a/services/booking/src/booking-frontend/api/component.yml b/services/booking/src/booking-frontend/api/component.yml index 4e4acffb..b025954e 100644 --- a/services/booking/src/booking-frontend/api/component.yml +++ b/services/booking/src/booking-frontend/api/component.yml @@ -30,10 +30,6 @@ type: string enum: - normal - Execute_for: - description: Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'. - type: string - format: url responses: '200': description: The booking was accepted. The booking status will display whether the booking of all devices was successful. @@ -96,10 +92,6 @@ description: List of devices which should be added. items: $ref: '#/components/schemas/Device' - Execute_for: - description: Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'. - type: string - format: url - type: object description: Use this request for adding callbacks. properties: @@ -159,17 +151,6 @@ tags: - booking-frontend summary: Cancels a booking, as long as the booking was originally done by you. - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - Execute_for: - description: Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'. - type: string - format: url responses: '200': description: >- @@ -213,17 +194,6 @@ - booking-frontend summary: >- Returns whether a list of devices is currently booked for a user. - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - Execute_for: - description: Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'. - type: string - format: url responses: '200': description: Returns the current booking. diff --git a/services/booking/src/schedule-service/api/component.yml b/services/booking/src/schedule-service/api/component.yml index ce088a56..2b9101cd 100644 --- a/services/booking/src/schedule-service/api/component.yml +++ b/services/booking/src/schedule-service/api/component.yml @@ -25,10 +25,6 @@ Combined: type: boolean description: If true, show only one timetable per device instead of one for all available physical devices. - Execute_for: - description: Do the booking for the user in this field instead of the caller. For this to be accepted, caller must have the scope 'internal:execute_for'. - type: string - format: url onlyOwn: type: boolean description: (private) Show only devices of this institution. Give an error if a device of an other institution is requested. diff --git a/services/booking/src/schedule-service/package-lock.json b/services/booking/src/schedule-service/package-lock.json index bad8f071..ed72a4c7 100644 --- a/services/booking/src/schedule-service/package-lock.json +++ b/services/booking/src/schedule-service/package-lock.json @@ -28,7 +28,9 @@ "devDependencies": { "@types/mocha": "^10.0.0", "env-cmd": "^10.1.0", + "express-request-mock": "^4.0.0", "mocha": "^10.0.0", + "node-mocks-http": "^1.14.1", "nyc": "^15.1.0", "prettier": "^3.0.3" } @@ -43,7 +45,7 @@ "devDependencies": { "@cross-lab-project/codegen-typescript-addon": "file:../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../helper/openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.0.0", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/node": "^20.5.9", "@typescript-eslint/eslint-plugin": "^6.6.0", "@typescript-eslint/parser": "^6.6.0", @@ -9537,6 +9539,7 @@ "dependencies": { "express": "^4.18.1", "express-winston": "^4.2.0", + "fetch-retry": "^5.0.6", "jose": "^4.14.6", "mysql": "^2.18.1", "sqlite3": "^5.1.6", @@ -14264,6 +14267,9 @@ "name": "@crosslab/booking-service-common", "version": "0.0.1", "license": "Apache-2.0", + "dependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0" + }, "devDependencies": { "@types/node": "^20.5.9", "prettier": "^3.0.3", @@ -14293,6 +14299,7 @@ "license": "Apache-2.0", "dependencies": { "@crosslab/booking-service-common": "file:../common", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "amqplib": "^0.10.0", "async-mutex": "^0.4.0", @@ -16792,6 +16799,7 @@ "dependencies": { "@crosslab/booking-service-common": "file:../common", "@crosslab/service-device-reservation": "file:../device-reservation", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "@types/express": "^4.17.13", "amqplib": "^0.10.3", @@ -18324,8 +18332,9 @@ } }, "node_modules/@types/express": { - "version": "4.17.17", - "license": "MIT", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -18362,8 +18371,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" + "version": "20.11.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", + "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/qs": { "version": "6.9.7", @@ -18994,6 +19007,18 @@ "node": ">= 0.10.0" } }, + "node_modules/express-request-mock": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/express-request-mock/-/express-request-mock-4.0.0.tgz", + "integrity": "sha512-ctHyja2yJKRjjehoWm6ZikvGrtDDrB2qT5NOvmvkkOwqIf61bYxsA6DNJq8Jm0jnXHkI2TOQjdSyE6Tb1IEw+Q==", + "dev": true, + "dependencies": { + "node-mocks-http": "^1.13.0" + }, + "engines": { + "node": ">= 18.0.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "license": "MIT" @@ -19865,6 +19890,38 @@ "node": ">= 0.6" } }, + "node_modules/node-mocks-http": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/node-mocks-http/-/node-mocks-http-1.14.1.tgz", + "integrity": "sha512-mfXuCGonz0A7uG1FEjnypjm34xegeN5+HI6xeGhYKecfgaZhjsmYoLE9LEFmT+53G1n8IuagPZmVnEL/xNsFaA==", + "dev": true, + "dependencies": { + "@types/express": "^4.17.21", + "@types/node": "^20.10.6", + "accepts": "^1.3.7", + "content-disposition": "^0.5.3", + "depd": "^1.1.0", + "fresh": "^0.5.2", + "merge-descriptors": "^1.0.1", + "methods": "^1.1.2", + "mime": "^1.3.4", + "parseurl": "^1.3.3", + "range-parser": "^1.2.0", + "type-is": "^1.6.18" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/node-mocks-http/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/node-preload": { "version": "0.2.1", "dev": true, @@ -20704,6 +20761,11 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/unpipe": { "version": "1.0.0", "license": "MIT", diff --git a/services/booking/src/schedule-service/package.json b/services/booking/src/schedule-service/package.json index a5197bb1..fcfbe238 100644 --- a/services/booking/src/schedule-service/package.json +++ b/services/booking/src/schedule-service/package.json @@ -4,7 +4,7 @@ "description": "Part of booking service. Shows schedule of devices - horizontal scaleable.", "main": "app/index.js", "scripts": { - "test": "npm run build && env-cmd -e development nyc --include=\"app/schedule.js\" --include=\"app/timetable.js\" mocha app/*_test.js", + "test": "npm run build && env-cmd -e development nyc --include=\"app/operations/index.js\" --include=\"app/timetable.js\" mocha app/*_test.js app/operations/*_test.js", "build:generate": "openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", "build:compile": "tsc", "build": "npm run build:generate && npm run build:compile", diff --git a/services/booking/src/schedule-service/src/index.ts b/services/booking/src/schedule-service/src/index.ts index ab78a28e..65db3adb 100644 --- a/services/booking/src/schedule-service/src/index.ts +++ b/services/booking/src/schedule-service/src/index.ts @@ -1,27 +1,28 @@ -import { - JWTVerify, - parseJwtFromRequestAuthenticationHeader, -} from '@cross-lab-project/service-common'; +import { authorization, error, logging } from '@cross-lab-project/service-common'; +import express from 'express'; import { config } from './config'; import { app } from './generated'; -import { isUserTypeJWT } from './generated/types'; if (require.main === module) { - app.initService({ - security: { - JWT: JWTVerify( - { - JWKS_URL: config.JWKS_URL, - SECURITY_AUDIENCE: config.SECURITY_AUDIENCE, - SECURITY_ISSUER: config.SECURITY_ISSUER, - }, - isUserTypeJWT, - parseJwtFromRequestAuthenticationHeader, - ), - }, + app.initService({ + preHandlers: [ + application => { + application.use(express.json()); + application.use(express.urlencoded({ extended: false })); + application.use(logging.middleware()); + application.use(authorization.middleware()); + }, + ], + postHandlers: [ + application => { + application.get('/federation/status', (_req, res) => { + res.send({ status: 'ok' }); + }); + }, + ], + errorHandler: error.middleware, }); - console.log('Starting schedule-service'); app.listen(config.PORT); } diff --git a/services/booking/src/schedule-service/src/operations.ts b/services/booking/src/schedule-service/src/operations/index.ts similarity index 97% rename from services/booking/src/schedule-service/src/operations.ts rename to services/booking/src/schedule-service/src/operations/index.ts index 512e9f36..93454465 100644 --- a/services/booking/src/schedule-service/src/operations.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -5,17 +5,17 @@ import dayjs from 'dayjs'; import { cloneDeep, map } from 'lodash'; import * as mysql from 'mysql2/promise'; -import { config } from './config'; +import { config } from '../config'; import { postScheduleRequestBodyType, postScheduleSignature, postScheduleSuccessResponseType, -} from './generated/signatures'; -import { Timeslot } from './generated/types'; -import { timetableAnd, timetableNot } from './timetable'; +} from '../generated/signatures'; +import { Timeslot } from '../generated/types'; +import { timetableAnd, timetableNot } from '../timetable'; // TODO: Missing availability since it is not yet well defined -export const postSchedule: postScheduleSignature = async (body, user) => { +export const postSchedule: postScheduleSignature = async (request, body) => { let api: APIClient = new APIClient(config.OwnURL, config.API_TOKEN); const laterReq = new Map(); // Device in request, device list, request diff --git a/services/booking/src/schedule-service/src/operations_test.ts b/services/booking/src/schedule-service/src/operations/operations_test.ts similarity index 85% rename from services/booking/src/schedule-service/src/operations_test.ts rename to services/booking/src/schedule-service/src/operations/operations_test.ts index 2726b095..0142e231 100644 --- a/services/booking/src/schedule-service/src/operations_test.ts +++ b/services/booking/src/schedule-service/src/operations/operations_test.ts @@ -8,12 +8,13 @@ import { startFakeServer, stopFakeServer, tearDownDummySql, + getFakeRequest, } from '@crosslab/booking-service-test-common'; import dayjs from 'dayjs'; import * as mocha from 'mocha'; -import { config } from './config'; -import { getTimetables, postSchedule } from './operations'; +import { config } from '../config'; +import { getTimetables, postSchedule } from './index'; mocha.describe('operations.ts', function () { this.timeout(10000); @@ -56,7 +57,7 @@ mocha.describe('operations.ts', function () { { Start: '2022-06-27T06:00:00Z', End: '2022-06-27T07:00:00Z' }, ]; - let r = await postSchedule( + let r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -72,14 +73,6 @@ mocha.describe('operations.ts', function () { Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, ); if (r.status !== 200) { throw Error('Response error: ' + r.status); @@ -174,7 +167,7 @@ mocha.describe('operations.ts', function () { } } - r = await postSchedule( + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -189,15 +182,7 @@ mocha.describe('operations.ts', function () { Combined: true, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 200) { throw Error('Response error: ' + r.status); @@ -271,7 +256,7 @@ mocha.describe('operations.ts', function () { } } - r = await postSchedule( + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -283,15 +268,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 200) { throw Error('Response error: ' + r.status); @@ -370,7 +347,7 @@ mocha.describe('operations.ts', function () { }); mocha.it('postBookingSchedule (completely free)', async function () { - let r = await postSchedule( + let r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -382,15 +359,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '1999-06-25T00:00:00Z', End: '1999-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 200) { throw Error('Response error: ' + r.status); @@ -436,7 +405,7 @@ mocha.describe('operations.ts', function () { }); mocha.it('postBookingSchedule (completely free)', async function () { - let r = await postSchedule( + let r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -448,15 +417,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '1999-06-25T00:00:00Z', End: '1999-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 200) { throw Error('Response error: ' + r.status); @@ -509,7 +470,7 @@ mocha.describe('operations.ts', function () { device_service_status = 503; proxy_server_status = 200; - let r = await postSchedule({ Experiment: { Devices: [{ ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000001" }, { ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000002" }] }, Combined: false, Time: { Start: "2022-06-25T00:00:00Z", End: "2022-06-28T23:59:59Z" }, onlyOwn: undefined }, {"JWT":{ username: "test", url: "localhost/user/test", scopes: [""] }}); + let r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [{ ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000001" }, { ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000002" }] }, Combined: false, Time: { Start: "2022-06-25T00:00:00Z", End: "2022-06-28T23:59:59Z" }, onlyOwn: undefined }); if (r.status !== 503) { throw Error("Response error (device overloaded): " + r.status); } @@ -521,7 +482,7 @@ mocha.describe('operations.ts', function () { proxy_server_status = 200; proxy_device_service_status = 503; - r = await postSchedule({ Experiment: { Devices: [{ ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000001" }, { ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000002" }] }, Combined: false, Time: { Start: "2022-06-25T00:00:00Z", End: "2022-06-28T23:59:59Z" }, onlyOwn: undefined }, {"JWT":{ username: "test", url: "localhost/user/test", scopes: [""] }}); + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [{ ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000001" }, { ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000002" }] }, Combined: false, Time: { Start: "2022-06-25T00:00:00Z", End: "2022-06-28T23:59:59Z" }, onlyOwn: undefined }); if (r.status !== 503) { throw Error("Response error (device overloaded): " + r.status); } @@ -533,7 +494,7 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_device_service_status = 200; fakeServerConfig.device_wrong_device = true; - let r = await postSchedule( + let r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -548,15 +509,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 500) { throw Error('Response error (device wrong device): ' + r.status); @@ -569,7 +522,7 @@ mocha.describe('operations.ts', function () { fakeServerConfig.device_wrong_device = false; fakeServerConfig.device_single_is_group = true; - r = await postSchedule( + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -584,16 +537,8 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, - ); + } + ); if (r.status !== 500) { throw Error('Response error (device is group): ' + r.status); } @@ -604,7 +549,7 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_device_service_status = 200; fakeServerConfig.device_single_is_group = false; - r = await postSchedule( + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -619,15 +564,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 503) { throw Error('Response error (proxy overloaded): ' + r.status); @@ -637,7 +574,7 @@ mocha.describe('operations.ts', function () { fakeServerConfig.device_service_status = 404; fakeServerConfig.proxy_server_status = 200; - r = await postSchedule( + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -652,15 +589,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 404) { throw Error('Response error (proxy 404): ' + r.status); @@ -670,7 +599,7 @@ mocha.describe('operations.ts', function () { fakeServerConfig.device_service_status = 200; fakeServerConfig.proxy_server_status = 404; - r = await postSchedule( + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -685,15 +614,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 404) { throw Error('Response error (proxy 404): ' + r.status); @@ -704,7 +625,7 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_server_status = 200; fakeServerConfig.proxy_device_service_status = 500; - r = await postSchedule( + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -719,15 +640,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 500) { throw Error('Response error (device generic error): ' + r.status); @@ -738,7 +651,7 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_server_status = 200; fakeServerConfig.proxy_device_service_status = 200; - r = await postSchedule( + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -753,15 +666,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 500) { throw Error('Response error (device generic error): ' + r.status); @@ -772,7 +677,7 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_server_status = 500; fakeServerConfig.proxy_device_service_status = 200; - r = await postSchedule( + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -787,15 +692,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 500) { throw Error('Response error (proxy 500): ' + r.status); @@ -806,7 +703,7 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_server_status = 200; fakeServerConfig.proxy_schedule_short_body = true; - r = await postSchedule( + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -821,15 +718,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 500) { throw Error('Response error (wrong number of devices): ' + r.status); @@ -841,7 +730,7 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_schedule_short_body = false; fakeServerConfig.proxy_schedule_wrong_device = true; - r = await postSchedule( + r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -856,15 +745,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: undefined, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 500) { throw Error('Response error (wrong devices): ' + r.status); @@ -874,7 +755,7 @@ mocha.describe('operations.ts', function () { mocha.it('postBookingSchedule (bad requests)', async function () { this.timeout(10000); - let r = await postSchedule( + let r = await postSchedule(getFakeRequest(), { Experiment: { Devices: [ @@ -889,15 +770,7 @@ mocha.describe('operations.ts', function () { Combined: false, Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, onlyOwn: true, - }, - { - JWT: { - jwt: '', - username: 'test', - url: 'localhost/user/test', - scopes: [''], - }, - }, + } ); if (r.status !== 400) { throw Error('Response error (onlyOwn wrong usage): ' + r.status); diff --git a/services/booking/src/test_common/package-lock.json b/services/booking/src/test_common/package-lock.json index 40d68f91..f80f3e77 100644 --- a/services/booking/src/test_common/package-lock.json +++ b/services/booking/src/test_common/package-lock.json @@ -21,6 +21,7 @@ "typescript": "^5.2.2" }, "devDependencies": { + "node-mocks-http": "^1.14.1", "prettier": "^3.0.3" } }, @@ -28,6 +29,9 @@ "name": "@crosslab/booking-service-common", "version": "0.0.1", "license": "Apache-2.0", + "dependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0" + }, "devDependencies": { "@types/node": "^20.5.9", "prettier": "^3.0.3", @@ -57,6 +61,7 @@ "license": "Apache-2.0", "dependencies": { "@crosslab/booking-service-common": "file:../common", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "amqplib": "^0.10.0", "async-mutex": "^0.4.0", @@ -2818,8 +2823,9 @@ } }, "node_modules/@types/express": { - "version": "4.17.17", - "license": "MIT", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -2846,8 +2852,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" + "version": "20.11.20", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz", + "integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/qs": { "version": "6.9.7", @@ -3478,6 +3488,38 @@ "node": ">= 0.6" } }, + "node_modules/node-mocks-http": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/node-mocks-http/-/node-mocks-http-1.14.1.tgz", + "integrity": "sha512-mfXuCGonz0A7uG1FEjnypjm34xegeN5+HI6xeGhYKecfgaZhjsmYoLE9LEFmT+53G1n8IuagPZmVnEL/xNsFaA==", + "dev": true, + "dependencies": { + "@types/express": "^4.17.21", + "@types/node": "^20.10.6", + "accepts": "^1.3.7", + "content-disposition": "^0.5.3", + "depd": "^1.1.0", + "fresh": "^0.5.2", + "merge-descriptors": "^1.0.1", + "methods": "^1.1.2", + "mime": "^1.3.4", + "parseurl": "^1.3.3", + "range-parser": "^1.2.0", + "type-is": "^1.6.18" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/node-mocks-http/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/object-inspect": { "version": "1.12.3", "license": "MIT", @@ -3734,6 +3776,11 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/unpipe": { "version": "1.0.0", "license": "MIT", diff --git a/services/booking/src/test_common/package.json b/services/booking/src/test_common/package.json index a1b19981..c28e1ac4 100644 --- a/services/booking/src/test_common/package.json +++ b/services/booking/src/test_common/package.json @@ -23,6 +23,7 @@ "typescript": "^5.2.2" }, "devDependencies": { + "node-mocks-http": "^1.14.1", "prettier": "^3.0.3" } } diff --git a/services/booking/src/test_common/src/fakerequest.ts b/services/booking/src/test_common/src/fakerequest.ts new file mode 100644 index 00000000..9ae08b70 --- /dev/null +++ b/services/booking/src/test_common/src/fakerequest.ts @@ -0,0 +1,8 @@ +import * as nodeMocksHttp from "node-mocks-http" + +type FakeRequestOptions = { +}; + +export function getFakeRequest(options?: FakeRequestOptions) { + return nodeMocksHttp.createRequest(); +} \ No newline at end of file diff --git a/services/booking/src/test_common/src/fakeserver.ts b/services/booking/src/test_common/src/fakeserver.ts index 5ef8366c..0fc92ac4 100644 --- a/services/booking/src/test_common/src/fakeserver.ts +++ b/services/booking/src/test_common/src/fakeserver.ts @@ -57,12 +57,12 @@ export async function startFakeServer() { case 200: if (fakeServerConfig.device_wrong_device) { res.send( - '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-111111111110", "name": "Test Group", "description": "Test group for unit tests", "type": "group", "owner": "http://localhost", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-111111111110", "name": "Test Group", "description": "Test group for unit tests", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); return; } res.send( - '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000001", "name": "Test Group", "description": "Test group for unit tests", "type": "group", "owner": "http://localhost", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000001", "name": "Test Group", "description": "Test group for unit tests", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); case 404: res.status(404).send(); @@ -85,7 +85,7 @@ export async function startFakeServer() { switch (fakeServerConfig.device_service_status) { case 200: res.send( - '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000002", "name": "Test Group 2", "description": "Test group two for unit tests", "type": "group", "owner": "http://localhost", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000002", "name": "Test Group 2", "description": "Test group two for unit tests", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); return; case 404: @@ -109,7 +109,7 @@ export async function startFakeServer() { switch (fakeServerConfig.device_service_status) { case 200: res.send( - '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010", "name": "Test Group Booking", "description": "Test group containing two local devices. Used in booking-backend/bookng-frontend tests.", "type": "group", "owner": "http://localhost", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010", "name": "Test Group Booking", "description": "Test group containing two local devices. Used in booking-backend/bookng-frontend tests.", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); return; case 404: @@ -134,18 +134,18 @@ export async function startFakeServer() { case 200: if (fakeServerConfig.device_single_is_group) { res.send( - '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Group 2", "description": "Test group two for unit tests", "type": "group", "owner": "http://localhost", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Group 2", "description": "Test group two for unit tests", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); return; } if (fakeServerConfig.device_not_available) { res.send( - '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Device", "description": "Test device for unit tests", "type": "device", "owner": "http://localhost", "connected": true, "announcedAvailability": [], "isPublic": true}', + '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Device", "description": "Test device for unit tests", "type": "device", "connected": true, "announcedAvailability": [], "isPublic": true}', ); return; } res.send( - '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Device", "description": "Test device for unit tests", "type": "device", "owner": "http://localhost", "connected": true, "announcedAvailability": [{"start":"1999-01-01T00:00:00Z", "end": "1999-12-31T23:59:59Z"},{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Device", "description": "Test device for unit tests", "type": "device", "connected": true, "announcedAvailability": [{"start":"1999-01-01T00:00:00Z", "end": "1999-12-31T23:59:59Z"},{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', ); return; case 404: @@ -170,18 +170,18 @@ export async function startFakeServer() { case 200: if (fakeServerConfig.device_single_is_group) { res.send( - '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Group 3", "description": "Test group two for unit tests", "type": "group", "owner": "http://localhost", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Group 3", "description": "Test group two for unit tests", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); return; } if (fakeServerConfig.device_not_available) { res.send( - '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Device 2", "description": "Test device for unit tests", "type": "device", "owner": "http://localhost", "connected": true, "announcedAvailability": [], "isPublic": true}', + '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Device 2", "description": "Test device for unit tests", "type": "device", "connected": true, "announcedAvailability": [], "isPublic": true}', ); return; } res.send( - '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Device 2", "description": "Test device for unit tests", "type": "device", "owner": "http://localhost", "connected": true, "announcedAvailability": [{"start":"1999-01-01T00:00:00Z", "end": "1999-12-31T23:59:59Z"},{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Device 2", "description": "Test device for unit tests", "type": "device", "connected": true, "announcedAvailability": [{"start":"1999-01-01T00:00:00Z", "end": "1999-12-31T23:59:59Z"},{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', ); return; case 404: @@ -357,7 +357,7 @@ export async function startFakeServer() { switch (fakeServerConfig.proxy_device_service_status) { case 200: res.send( - '{"url": "http://localhost:10801/devices/a0000000-0000-0000-0000-000000000000", "name": "Remote Fake", "description": "Remote Fake test device for unit tests", "type": "device", "owner": "http://127.0.0.1:10802/", "connected": true, "announcedAvailability": [{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/a0000000-0000-0000-0000-000000000000", "name": "Remote Fake", "description": "Remote Fake test device for unit tests", "type": "device", "connected": true, "announcedAvailability": [{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', ); return; case 404: diff --git a/services/booking/src/test_common/src/index.ts b/services/booking/src/test_common/src/index.ts index 1b76a674..e760d841 100644 --- a/services/booking/src/test_common/src/index.ts +++ b/services/booking/src/test_common/src/index.ts @@ -1,3 +1,4 @@ export * from './devicereservationhelper'; export * from './fakeserver'; export * from './setup'; +export * from './fakerequest' \ No newline at end of file diff --git a/services/openapi/generate.js b/services/openapi/generate.js index 4ae42d5b..6d1790e6 100644 --- a/services/openapi/generate.js +++ b/services/openapi/generate.js @@ -5,6 +5,7 @@ const api_documents = [ '../device/dist/openapi.json', '../experiment/dist/openapi.json', '../federation/dist/openapi.json', + '../booking/dist/openapi.json', ]; // Make sure the ./gen directory exists From ee2137f18e237215394c72afa5b0a7c85c611521 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 28 Feb 2024 12:45:15 +0000 Subject: [PATCH 03/79] Reenable measurement of covered lines --- .../src/schedule-service/package-lock.json | 6114 ++++++----------- .../booking/src/schedule-service/package.json | 4 +- 2 files changed, 2097 insertions(+), 4021 deletions(-) diff --git a/services/booking/src/schedule-service/package-lock.json b/services/booking/src/schedule-service/package-lock.json index ed72a4c7..a60e221b 100644 --- a/services/booking/src/schedule-service/package-lock.json +++ b/services/booking/src/schedule-service/package-lock.json @@ -27,11 +27,9 @@ }, "devDependencies": { "@types/mocha": "^10.0.0", + "c8": "^9.1.0", "env-cmd": "^10.1.0", - "express-request-mock": "^4.0.0", "mocha": "^10.0.0", - "node-mocks-http": "^1.14.1", - "nyc": "^15.1.0", "prettier": "^3.0.3" } }, @@ -451,7 +449,7 @@ "license": "MIT" }, "../../../../clients/api/js/node_modules/@types/node": { - "version": "18.17.12", + "version": "20.5.9", "dev": true, "license": "MIT" }, @@ -461,31 +459,32 @@ "license": "MIT" }, "../../../../clients/api/js/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/type-utils": "6.6.0", + "@typescript-eslint/utils": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4", "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -494,24 +493,25 @@ } }, "../../../../clients/api/js/node_modules/@typescript-eslint/parser": { - "version": "5.62.0", + "version": "6.6.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -520,15 +520,15 @@ } }, "../../../../clients/api/js/node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -536,24 +536,24 @@ } }, "../../../../clients/api/js/node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/utils": "6.6.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -562,11 +562,11 @@ } }, "../../../../clients/api/js/node_modules/@typescript-eslint/types": { - "version": "5.62.0", + "version": "6.6.0", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -574,20 +574,20 @@ } }, "../../../../clients/api/js/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", + "version": "6.6.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -600,40 +600,39 @@ } }, "../../../../clients/api/js/node_modules/@typescript-eslint/utils": { - "version": "5.62.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" } }, "../../../../clients/api/js/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.6.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -790,7 +789,7 @@ "license": "MIT" }, "../../../../clients/api/js/node_modules/cross-fetch": { - "version": "3.1.8", + "version": "4.0.0", "license": "MIT", "dependencies": { "node-fetch": "^2.6.12" @@ -913,18 +912,6 @@ "url": "https://opencollective.com/eslint" } }, - "../../../../clients/api/js/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, "../../../../clients/api/js/node_modules/eslint-visitor-keys": { "version": "3.4.3", "dev": true, @@ -1122,14 +1109,6 @@ "node": ">=4.0" } }, - "../../../../clients/api/js/node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "../../../../clients/api/js/node_modules/esutils": { "version": "2.0.3", "dev": true, @@ -1564,11 +1543,6 @@ "dev": true, "license": "MIT" }, - "../../../../clients/api/js/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, "../../../../clients/api/js/node_modules/node-fetch": { "version": "2.7.0", "license": "MIT", @@ -1922,23 +1896,15 @@ "version": "0.0.3", "license": "MIT" }, - "../../../../clients/api/js/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../../clients/api/js/node_modules/tsutils": { - "version": "3.21.0", + "../../../../clients/api/js/node_modules/ts-api-utils": { + "version": "1.0.2", "dev": true, "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, "engines": { - "node": ">= 6" + "node": ">=16.13.0" }, "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + "typescript": ">=4.2.0" } }, "../../../../clients/api/js/node_modules/type-check": { @@ -1964,23 +1930,23 @@ } }, "../../../../clients/api/js/node_modules/typedoc": { - "version": "0.23.28", + "version": "0.25.1", "dev": true, "license": "Apache-2.0", "dependencies": { "lunr": "^2.3.9", - "marked": "^4.2.12", - "minimatch": "^7.1.3", + "marked": "^4.3.0", + "minimatch": "^9.0.3", "shiki": "^0.14.1" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { - "node": ">= 14.14" + "node": ">= 16" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x" } }, "../../../../clients/api/js/node_modules/typedoc/node_modules/brace-expansion": { @@ -1992,21 +1958,21 @@ } }, "../../../../clients/api/js/node_modules/typedoc/node_modules/minimatch": { - "version": "7.4.6", + "version": "9.0.3", "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "../../../../clients/api/js/node_modules/typescript": { - "version": "4.9.5", + "version": "5.2.2", "dev": true, "license": "Apache-2.0", "bin": { @@ -2014,7 +1980,7 @@ "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "../../../../clients/api/js/node_modules/uri-js": { @@ -2110,16 +2076,12 @@ "ajv-formats": "^2.1.1" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@ampproject/remapping": { - "version": "2.2.0", + "../../../../helper/crosslab-typescript-addon/node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, + "license": "MIT", "engines": { - "node": ">=6.0.0" + "node": ">=0.10.0" } }, "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/json-schema-ref-parser": { @@ -2159,51 +2121,15 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/@babel/code-frame": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/compat-data": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/core": { - "version": "7.17.8", + "version": "7.22.13", "dev": true, "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" } }, "../../../../helper/crosslab-typescript-addon/node_modules/@babel/generator": { @@ -2219,26 +2145,8 @@ "node": ">=6.9.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", + "version": "7.22.5", "dev": true, "license": "MIT", "engines": { @@ -2246,24 +2154,24 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-function-name": { - "version": "7.19.0", + "version": "7.22.5", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.20.7", + "version": "7.22.15", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2271,86 +2179,84 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", + "version": "7.22.5", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.20.7", + "version": "7.22.15", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-imports": { - "version": "7.18.6", + "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-imports/node_modules/@babel/types": { - "version": "7.20.7", + "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { + "version": "7.22.15", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms": { - "version": "7.20.11", + "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-string-parser": { + "version": "7.22.5", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.10", - "@babel/types": "^7.20.7" - }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/generator": { - "version": "7.20.14", + "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-validator-identifier": { + "version": "7.22.15", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../../../helper/crosslab-typescript-addon/node_modules/@babel/highlight": { + "version": "7.22.13", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/parser": { - "version": "7.20.15", + "../../../../helper/crosslab-typescript-addon/node_modules/@babel/parser": { + "version": "7.22.16", "dev": true, "license": "MIT", "bin": { @@ -2360,353 +2266,139 @@ "node": ">=6.0.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/traverse": { - "version": "7.20.13", + "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template": { + "version": "7.22.15", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", - "globals": "^11.1.0" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/types": { - "version": "7.20.7", + "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.22.15", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", + "../../../../helper/crosslab-typescript-addon/node_modules/@babel/traverse": { + "version": "7.17.3", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", + "debug": "^4.1.0", + "globals": "^11.1.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=6.9.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-simple-access": { - "version": "7.20.2", + "../../../../helper/crosslab-typescript-addon/node_modules/@babel/types": { + "version": "7.17.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.20.2" + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-simple-access/node_modules/@babel/types": { - "version": "7.20.7", + "../../../../helper/crosslab-typescript-addon/node_modules/@cross-lab-project/openapi-codegen": { + "resolved": "../../../../helper/openapi-codegeneration", + "link": true + }, + "../../../../helper/crosslab-typescript-addon/node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": ">=6.9.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", + "../../../../helper/crosslab-typescript-addon/node_modules/@eslint-community/regexpp": { + "version": "4.8.0", "dev": true, "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, "engines": { - "node": ">=6.9.0" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.20.7", + "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc": { + "version": "2.1.2", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">=6.9.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-string-parser": { - "version": "7.19.4", + "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", "dev": true, "license": "MIT", - "engines": { - "node": ">=6.9.0" + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", + "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } + "license": "Python-2.0" }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-validator-option": { - "version": "7.18.6", + "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.21.0", "dev": true, "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.13", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/generator": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/traverse": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/highlight": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/parser": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@cross-lab-project/openapi-codegen": { - "resolved": "../../../../helper/openapi-codegeneration", - "link": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { "node": ">=8" }, @@ -2730,8 +2422,16 @@ "dev": true, "license": "MIT" }, + "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/js": { + "version": "8.48.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "../../../../helper/crosslab-typescript-addon/node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", + "version": "0.11.11", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2760,48 +2460,6 @@ "dev": true, "license": "BSD-3-Clause" }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/@jsdevtools/ono": { "version": "7.1.3", "license": "MIT" @@ -2839,74 +2497,79 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.0.0", + "version": "4.2.0", "dev": true, "license": "Apache-2.0", "dependencies": { - "@babel/core": "7.17.8", "@babel/generator": "7.17.7", - "@babel/parser": "7.18.9", + "@babel/parser": "^7.20.5", "@babel/traverse": "7.17.3", "@babel/types": "7.17.0", "javascript-natural-sort": "0.7.1", - "lodash": "4.17.21" + "lodash": "^4.17.21" }, "peerDependencies": { "@vue/compiler-sfc": "3.x", - "prettier": "2.x" + "prettier": "2.x - 3.x" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } } }, "../../../../helper/crosslab-typescript-addon/node_modules/@types/json-schema": { - "version": "7.0.11", + "version": "7.0.12", "dev": true, "license": "MIT" }, "../../../../helper/crosslab-typescript-addon/node_modules/@types/node": { - "version": "17.0.45", + "version": "20.5.9", "dev": true, "license": "MIT" }, "../../../../helper/crosslab-typescript-addon/node_modules/@types/nunjucks": { - "version": "3.2.1", + "version": "3.2.3", "dev": true, "license": "MIT" }, "../../../../helper/crosslab-typescript-addon/node_modules/@types/seedrandom": { - "version": "3.0.4", + "version": "3.0.5", "dev": true, "license": "MIT" }, "../../../../helper/crosslab-typescript-addon/node_modules/@types/semver": { - "version": "7.3.13", + "version": "7.5.1", "dev": true, "license": "MIT" }, "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.52.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/type-utils": "5.52.0", - "@typescript-eslint/utils": "5.52.0", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/type-utils": "6.6.0", + "@typescript-eslint/utils": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -2914,99 +2577,26 @@ } } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/parser": { - "version": "5.51.0", + "version": "6.6.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/typescript-estree": "5.51.0", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -3015,15 +2605,15 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/scope-manager": { - "version": "5.51.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0" + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -3031,24 +2621,24 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils": { - "version": "5.52.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "5.52.0", - "@typescript-eslint/utils": "5.52.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/utils": "6.6.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -3056,33 +2646,33 @@ } } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "5.52.0", + "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/types": { + "version": "6.6.0", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.52.0", + "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree": { + "version": "6.6.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -3094,343 +2684,136 @@ } } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.52.0", + "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils": { + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.52.0", - "eslint-visitor-keys": "^3.3.0" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" }, - "engines": { - "node": ">=10" + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/semver": { - "version": "7.3.8", + "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.6.0", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "@typescript-eslint/types": "6.6.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/types": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.51.0", + "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-core": { + "version": "3.2.47", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "@babel/parser": "^7.16.4", + "@vue/shared": "3.2.47", + "estree-walker": "^2.0.2", + "source-map": "^0.6.1" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.8", + "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-core/node_modules/source-map": { + "version": "0.6.1", "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, + "license": "BSD-3-Clause", + "optional": true, + "peer": true, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", + "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-dom": { + "version": "3.2.47", "dev": true, - "license": "ISC", + "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" + "@vue/compiler-core": "3.2.47", + "@vue/shared": "3.2.47" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils": { - "version": "5.52.0", + "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc": { + "version": "3.2.47", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/typescript-estree": "5.52.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@babel/parser": "^7.16.4", + "@vue/compiler-core": "3.2.47", + "@vue/compiler-dom": "3.2.47", + "@vue/compiler-ssr": "3.2.47", + "@vue/reactivity-transform": "3.2.47", + "@vue/shared": "3.2.47", + "estree-walker": "^2.0.2", + "magic-string": "^0.25.7", + "postcss": "^8.1.10", + "source-map": "^0.6.1" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "5.52.0", + "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc/node_modules/magic-string": { + "version": "0.25.9", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "sourcemap-codec": "^1.4.8" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "5.52.0", + "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc/node_modules/source-map": { + "version": "0.6.1", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", + "optional": true, + "peer": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">=0.10.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.52.0", + "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-ssr": { + "version": "3.2.47", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "@vue/compiler-dom": "3.2.47", + "@vue/shared": "3.2.47" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.52.0", + "../../../../helper/crosslab-typescript-addon/node_modules/@vue/reactivity-transform": { + "version": "3.2.47", "dev": true, "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-core": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-core/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-dom": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-ssr": "3.2.47", - "@vue/reactivity-transform": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-ssr": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@vue/compiler-dom": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/reactivity-transform": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, + "optional": true, + "peer": true, "dependencies": { "@babel/parser": "^7.16.4", "@vue/compiler-core": "3.2.47", @@ -3443,6 +2826,7 @@ "version": "0.25.9", "dev": true, "license": "MIT", + "optional": true, "peer": true, "dependencies": { "sourcemap-codec": "^1.4.8" @@ -3452,6 +2836,7 @@ "version": "3.2.47", "dev": true, "license": "MIT", + "optional": true, "peer": true }, "../../../../helper/crosslab-typescript-addon/node_modules/a-sync-waterfall": { @@ -3459,7 +2844,7 @@ "license": "MIT" }, "../../../../helper/crosslab-typescript-addon/node_modules/acorn": { - "version": "8.8.2", + "version": "8.10.0", "dev": true, "license": "MIT", "bin": { @@ -3585,33 +2970,6 @@ "node": ">=8" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/browserslist": { - "version": "4.21.5", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/call-me-maybe": { "version": "1.0.2", "license": "MIT" @@ -3624,21 +2982,6 @@ "node": ">=6" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/caniuse-lite": { - "version": "1.0.30001452", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ], - "license": "CC-BY-4.0" - }, "../../../../helper/crosslab-typescript-addon/node_modules/chalk": { "version": "2.4.2", "dev": true, @@ -3671,11 +3014,6 @@ "color-name": "1.1.3" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, "../../../../helper/crosslab-typescript-addon/node_modules/cliui": { "version": "7.0.4", "dev": true, @@ -3692,13 +3030,13 @@ "dev": true, "license": "MIT" }, - "../../../../helper/crosslab-typescript-addon/node_modules/concat-map": { - "version": "0.0.1", + "../../../../helper/crosslab-typescript-addon/node_modules/color-name": { + "version": "1.1.3", "dev": true, "license": "MIT" }, - "../../../../helper/crosslab-typescript-addon/node_modules/convert-source-map": { - "version": "1.9.0", + "../../../../helper/crosslab-typescript-addon/node_modules/concat-map": { + "version": "0.0.1", "dev": true, "license": "MIT" }, @@ -3786,11 +3124,6 @@ "dev": true, "license": "MIT" }, - "../../../../helper/crosslab-typescript-addon/node_modules/electron-to-chromium": { - "version": "1.4.295", - "dev": true, - "license": "ISC" - }, "../../../../helper/crosslab-typescript-addon/node_modules/emoji-regex": { "version": "8.0.0", "dev": true, @@ -3813,48 +3146,46 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/eslint": { - "version": "8.34.0", + "version": "8.48.0", "dev": true, "license": "MIT", "dependencies": { - "@eslint/eslintrc": "^1.4.1", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "8.48.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { @@ -3868,48 +3199,29 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/eslint-scope": { - "version": "5.1.1", + "version": "7.2.2", "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-utils": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" + "estraverse": "^5.2.0" }, "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" + "url": "https://opencollective.com/eslint" } }, "../../../../helper/crosslab-typescript-addon/node_modules/eslint-visitor-keys": { - "version": "3.3.0", + "version": "3.4.3", "dev": true, "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/ajv": { @@ -3958,28 +3270,8 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/globals": { - "version": "13.20.0", + "version": "13.21.0", "dev": true, "license": "MIT", "dependencies": { @@ -4016,22 +3308,6 @@ "dev": true, "license": "MIT" }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/optionator": { - "version": "0.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", "dev": true, @@ -4044,13 +3320,13 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/espree": { - "version": "9.4.1", + "version": "9.6.1", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -4071,7 +3347,7 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/esquery": { - "version": "1.4.0", + "version": "1.5.0", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -4081,14 +3357,6 @@ "node": ">=0.10" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/esrecurse": { "version": "4.3.0", "dev": true, @@ -4100,16 +3368,8 @@ "node": ">=4.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/estraverse": { - "version": "4.3.0", + "version": "5.3.0", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -4120,6 +3380,7 @@ "version": "2.0.2", "dev": true, "license": "MIT", + "optional": true, "peer": true }, "../../../../helper/crosslab-typescript-addon/node_modules/esutils": { @@ -4149,7 +3410,7 @@ "license": "MIT" }, "../../../../helper/crosslab-typescript-addon/node_modules/fast-glob": { - "version": "3.2.12", + "version": "3.3.1", "dev": true, "license": "MIT", "dependencies": { @@ -4230,15 +3491,16 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/flat-cache": { - "version": "3.0.4", + "version": "3.1.0", "dev": true, "license": "MIT", "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.7", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=12.0.0" } }, "../../../../helper/crosslab-typescript-addon/node_modules/flatted": { @@ -4256,14 +3518,6 @@ "dev": true, "license": "ISC" }, - "../../../../helper/crosslab-typescript-addon/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/get-caller-file": { "version": "2.0.5", "dev": true, @@ -4329,8 +3583,8 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/grapheme-splitter": { - "version": "1.0.4", + "../../../../helper/crosslab-typescript-addon/node_modules/graphemer": { + "version": "1.4.0", "dev": true, "license": "MIT" }, @@ -4445,15 +3699,6 @@ "dev": true, "license": "MIT" }, - "../../../../helper/crosslab-typescript-addon/node_modules/js-sdsl": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/js-tokens": { "version": "4.0.0", "dev": true, @@ -4481,6 +3726,11 @@ "node": ">=4" } }, + "../../../../helper/crosslab-typescript-addon/node_modules/json-buffer": { + "version": "3.0.1", + "dev": true, + "license": "MIT" + }, "../../../../helper/crosslab-typescript-addon/node_modules/json-schema-traverse": { "version": "1.0.0", "license": "MIT" @@ -4490,15 +3740,12 @@ "dev": true, "license": "MIT" }, - "../../../../helper/crosslab-typescript-addon/node_modules/json5": { - "version": "2.2.3", + "../../../../helper/crosslab-typescript-addon/node_modules/keyv": { + "version": "4.5.3", "dev": true, "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" + "dependencies": { + "json-buffer": "3.0.1" } }, "../../../../helper/crosslab-typescript-addon/node_modules/levn": { @@ -4538,11 +3785,14 @@ "license": "MIT" }, "../../../../helper/crosslab-typescript-addon/node_modules/lru-cache": { - "version": "5.1.1", + "version": "6.0.0", "dev": true, "license": "ISC", "dependencies": { - "yallist": "^3.0.2" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, "../../../../helper/crosslab-typescript-addon/node_modules/map-stream": { @@ -4600,6 +3850,7 @@ "version": "3.3.4", "dev": true, "license": "MIT", + "optional": true, "peer": true, "bin": { "nanoid": "bin/nanoid.cjs" @@ -4613,21 +3864,11 @@ "dev": true, "license": "MIT" }, - "../../../../helper/crosslab-typescript-addon/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, "../../../../helper/crosslab-typescript-addon/node_modules/node-cleanup": { "version": "2.1.2", "dev": true, "license": "MIT" }, - "../../../../helper/crosslab-typescript-addon/node_modules/node-releases": { - "version": "2.0.10", - "dev": true, - "license": "MIT" - }, "../../../../helper/crosslab-typescript-addon/node_modules/noms": { "version": "0.0.0", "dev": true, @@ -4697,9 +3938,25 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/openapi-types": { - "version": "12.1.0", + "version": "12.1.3", "license": "MIT" }, + "../../../../helper/crosslab-typescript-addon/node_modules/optionator": { + "version": "0.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "../../../../helper/crosslab-typescript-addon/node_modules/p-limit": { "version": "3.1.0", "dev": true, @@ -4785,7 +4042,9 @@ "../../../../helper/crosslab-typescript-addon/node_modules/picocolors": { "version": "1.0.0", "dev": true, - "license": "ISC" + "license": "ISC", + "optional": true, + "peer": true }, "../../../../helper/crosslab-typescript-addon/node_modules/picomatch": { "version": "2.3.1", @@ -4812,6 +4071,7 @@ } ], "license": "MIT", + "optional": true, "peer": true, "dependencies": { "nanoid": "^3.3.4", @@ -4831,14 +4091,14 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/prettier": { - "version": "2.8.4", + "version": "3.0.3", "dev": true, "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -4903,17 +4163,6 @@ "util-deprecate": "~1.0.1" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/require-directory": { "version": "2.1.1", "dev": true, @@ -4988,11 +4237,17 @@ "license": "MIT" }, "../../../../helper/crosslab-typescript-addon/node_modules/semver": { - "version": "6.3.0", + "version": "7.5.4", "dev": true, "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "../../../../helper/crosslab-typescript-addon/node_modules/shebang-command": { @@ -5034,6 +4289,7 @@ "version": "1.0.2", "dev": true, "license": "BSD-3-Clause", + "optional": true, "peer": true, "engines": { "node": ">=0.10.0" @@ -5043,6 +4299,7 @@ "version": "1.4.8", "dev": true, "license": "MIT", + "optional": true, "peer": true }, "../../../../helper/crosslab-typescript-addon/node_modules/split": { @@ -5077,7 +4334,7 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/string-argv": { - "version": "0.1.2", + "version": "0.3.2", "dev": true, "license": "MIT", "engines": { @@ -5168,44 +4425,35 @@ "node": ">=8.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/tsc-watch": { - "version": "5.0.3", + "../../../../helper/crosslab-typescript-addon/node_modules/ts-api-utils": { + "version": "1.0.2", "dev": true, "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "node-cleanup": "^2.1.2", - "ps-tree": "^1.2.0", - "string-argv": "^0.1.1", - "strip-ansi": "^6.0.0" - }, - "bin": { - "tsc-watch": "index.js" - }, "engines": { - "node": ">=8.17.0" + "node": ">=16.13.0" }, "peerDependencies": { - "typescript": "*" + "typescript": ">=4.2.0" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/tsutils": { - "version": "3.21.0", + "../../../../helper/crosslab-typescript-addon/node_modules/tsc-watch": { + "version": "6.0.4", "dev": true, "license": "MIT", "dependencies": { - "tslib": "^1.8.1" + "cross-spawn": "^7.0.3", + "node-cleanup": "^2.1.2", + "ps-tree": "^1.2.0", + "string-argv": "^0.3.1" + }, + "bin": { + "tsc-watch": "dist/lib/tsc-watch.js" }, "engines": { - "node": ">= 6" + "node": ">=12.12.0" }, "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + "typescript": "*" } }, "../../../../helper/crosslab-typescript-addon/node_modules/type-check": { @@ -5231,7 +4479,7 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/typescript": { - "version": "4.9.5", + "version": "5.2.2", "dev": true, "license": "Apache-2.0", "bin": { @@ -5239,7 +4487,7 @@ "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "../../../../helper/crosslab-typescript-addon/node_modules/untildify": { @@ -5250,31 +4498,6 @@ "node": ">=8" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/update-browserslist-db": { - "version": "1.0.10", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/uri-js": { "version": "4.4.1", "license": "BSD-2-Clause", @@ -5301,14 +4524,6 @@ "node": ">= 8" } }, - "../../../../helper/crosslab-typescript-addon/node_modules/word-wrap": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "../../../../helper/crosslab-typescript-addon/node_modules/wrap-ansi": { "version": "7.0.0", "dev": true, @@ -5347,7 +4562,7 @@ } }, "../../../../helper/crosslab-typescript-addon/node_modules/yallist": { - "version": "3.1.1", + "version": "4.0.0", "dev": true, "license": "ISC" }, @@ -5423,16 +4638,12 @@ "typescript": "^5.2.2" } }, - "../../../../helper/openapi-codegeneration/node_modules/@ampproject/remapping": { - "version": "2.2.0", + "../../../../helper/openapi-codegeneration/node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, + "license": "MIT", "engines": { - "node": ">=6.0.0" + "node": ">=0.10.0" } }, "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/json-schema-ref-parser": { @@ -5472,51 +4683,15 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/@babel/code-frame": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/compat-data": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/core": { - "version": "7.17.8", + "version": "7.22.13", "dev": true, "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" } }, "../../../../helper/openapi-codegeneration/node_modules/@babel/generator": { @@ -5540,26 +4715,8 @@ "node": ">=0.10.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", + "version": "7.22.5", "dev": true, "license": "MIT", "engines": { @@ -5567,24 +4724,24 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-function-name": { - "version": "7.19.0", + "version": "7.22.5", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.20.7", + "version": "7.22.15", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", "to-fast-properties": "^2.0.0" }, "engines": { @@ -5592,263 +4749,132 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", + "version": "7.22.5", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.20.7", + "version": "7.22.15", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-imports": { - "version": "7.18.6", + "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-imports/node_modules/@babel/types": { - "version": "7.20.7", + "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { + "version": "7.22.15", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms": { - "version": "7.20.11", + "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-string-parser": { + "version": "7.22.5", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.10", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/generator": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/traverse": { - "version": "7.20.13", + "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-validator-identifier": { + "version": "7.22.15", "dev": true, "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/types": { - "version": "7.20.7", + "../../../../helper/openapi-codegeneration/node_modules/@babel/highlight": { + "version": "7.22.13", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", + "../../../../helper/openapi-codegeneration/node_modules/@babel/parser": { + "version": "7.22.16", "dev": true, "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "bin": { + "parser": "bin/babel-parser.js" }, "engines": { "node": ">=6.0.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-simple-access/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", + "../../../../helper/openapi-codegeneration/node_modules/@babel/template": { + "version": "7.22.15", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.20.7", + "../../../../helper/openapi-codegeneration/node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.22.15", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.13", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/generator": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/traverse": { - "version": "7.20.13", + "../../../../helper/openapi-codegeneration/node_modules/@babel/traverse": { + "version": "7.17.3", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -5856,133 +4882,78 @@ "node": ">=6.9.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/types": { - "version": "7.20.7", + "../../../../helper/openapi-codegeneration/node_modules/@babel/types": { + "version": "7.17.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "dev": true, + "../../../../helper/openapi-codegeneration/node_modules/@bcherny/json-schema-ref-parser": { + "version": "10.0.5-fork", "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" }, "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/highlight": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "node": ">= 16" }, - "engines": { - "node": ">=6.9.0" + "funding": { + "url": "https://github.com/sponsors/philsturgeon" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/parser": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } + "../../../../helper/openapi-codegeneration/node_modules/@bcherny/json-schema-ref-parser/node_modules/argparse": { + "version": "2.0.1", + "license": "Python-2.0" }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/template": { - "version": "7.20.7", - "dev": true, + "../../../../helper/openapi-codegeneration/node_modules/@bcherny/json-schema-ref-parser/node_modules/js-yaml": { + "version": "4.1.0", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "argparse": "^2.0.1" }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/template/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" + "js-yaml": "bin/js-yaml.js" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.20.7", + "../../../../helper/openapi-codegeneration/node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/types": { - "version": "7.17.0", + "../../../../helper/openapi-codegeneration/node_modules/@eslint-community/regexpp": { + "version": "4.8.0", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, "engines": { - "node": ">=6.9.0" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc": { - "version": "1.4.1", + "version": "2.1.2", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -6018,7 +4989,7 @@ "license": "Python-2.0" }, "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", + "version": "13.21.0", "dev": true, "license": "MIT", "dependencies": { @@ -6047,8 +5018,20 @@ "dev": true, "license": "MIT" }, + "../../../../helper/openapi-codegeneration/node_modules/@eslint/js": { + "version": "8.48.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "../../../../helper/openapi-codegeneration/node_modules/@glideapps/ts-necessities": { + "version": "2.1.3", + "license": "MIT" + }, "../../../../helper/openapi-codegeneration/node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", + "version": "0.11.11", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -6115,60 +5098,10 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, "../../../../helper/openapi-codegeneration/node_modules/@jsdevtools/ono": { "version": "7.1.3", "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/@mark.probst/unicode-properties": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "brfs": "^1.4.0", - "unicode-trie": "^0.3.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "dev": true, @@ -6210,25 +5143,29 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.0.0", + "version": "4.2.0", "dev": true, "license": "Apache-2.0", "dependencies": { - "@babel/core": "7.17.8", "@babel/generator": "7.17.7", - "@babel/parser": "7.18.9", + "@babel/parser": "^7.20.5", "@babel/traverse": "7.17.3", "@babel/types": "7.17.0", "javascript-natural-sort": "0.7.1", - "lodash": "4.17.21" + "lodash": "^4.17.21" }, "peerDependencies": { "@vue/compiler-sfc": "3.x", - "prettier": "2.x" + "prettier": "2.x - 3.x" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } } }, "../../../../helper/openapi-codegeneration/node_modules/@types/glob": { - "version": "8.0.0", + "version": "7.2.0", "license": "MIT", "dependencies": { "@types/minimatch": "*", @@ -6236,7 +5173,7 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/@types/json-schema": { - "version": "7.0.11", + "version": "7.0.12", "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/@types/lodash": { @@ -6248,54 +5185,55 @@ "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/@types/node": { - "version": "17.0.45", + "version": "20.5.9", "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/@types/nunjucks": { - "version": "3.2.1", + "version": "3.2.3", "dev": true, "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/@types/prettier": { - "version": "2.7.1", - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/@types/seedrandom": { - "version": "3.0.2", + "version": "3.0.5", "dev": true, "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/@types/semver": { - "version": "7.3.13", + "version": "7.5.1", "dev": true, "license": "MIT" }, + "../../../../helper/openapi-codegeneration/node_modules/@types/urijs": { + "version": "1.19.20", + "license": "MIT" + }, "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.51.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/type-utils": "5.51.0", - "@typescript-eslint/utils": "5.51.0", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/type-utils": "6.6.0", + "@typescript-eslint/utils": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -6303,55 +5241,26 @@ } } }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/parser": { - "version": "5.51.0", + "version": "6.6.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/typescript-estree": "5.51.0", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -6360,15 +5269,15 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/scope-manager": { - "version": "5.51.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0" + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -6376,24 +5285,24 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/type-utils": { - "version": "5.51.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "5.51.0", - "@typescript-eslint/utils": "5.51.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/utils": "6.6.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -6402,11 +5311,11 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/types": { - "version": "5.51.0", + "version": "6.6.0", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -6414,20 +5323,20 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.51.0", + "version": "6.6.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -6439,101 +5348,40 @@ } } }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils": { - "version": "5.51.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/typescript-estree": "5.51.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "eslint": "^7.0.0 || ^8.0.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.51.0", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.51.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.6.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -6544,6 +5392,7 @@ "version": "3.2.47", "dev": true, "license": "MIT", + "optional": true, "peer": true, "dependencies": { "@babel/parser": "^7.16.4", @@ -6556,6 +5405,7 @@ "version": "3.2.47", "dev": true, "license": "MIT", + "optional": true, "peer": true, "dependencies": { "@vue/compiler-core": "3.2.47", @@ -6566,6 +5416,7 @@ "version": "3.2.47", "dev": true, "license": "MIT", + "optional": true, "peer": true, "dependencies": { "@babel/parser": "^7.16.4", @@ -6584,6 +5435,7 @@ "version": "0.25.9", "dev": true, "license": "MIT", + "optional": true, "peer": true, "dependencies": { "sourcemap-codec": "^1.4.8" @@ -6593,6 +5445,7 @@ "version": "3.2.47", "dev": true, "license": "MIT", + "optional": true, "peer": true, "dependencies": { "@vue/compiler-dom": "3.2.47", @@ -6603,6 +5456,7 @@ "version": "3.2.47", "dev": true, "license": "MIT", + "optional": true, "peer": true, "dependencies": { "@babel/parser": "^7.16.4", @@ -6616,6 +5470,7 @@ "version": "0.25.9", "dev": true, "license": "MIT", + "optional": true, "peer": true, "dependencies": { "sourcemap-codec": "^1.4.8" @@ -6625,14 +5480,26 @@ "version": "3.2.47", "dev": true, "license": "MIT", + "optional": true, "peer": true }, "../../../../helper/openapi-codegeneration/node_modules/a-sync-waterfall": { "version": "1.0.1", "license": "MIT" }, + "../../../../helper/openapi-codegeneration/node_modules/abort-controller": { + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, "../../../../helper/openapi-codegeneration/node_modules/acorn": { - "version": "7.4.1", + "version": "8.10.0", + "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -6650,7 +5517,7 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/ajv": { - "version": "8.11.0", + "version": "8.12.0", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -6735,6 +5602,24 @@ "version": "1.0.2", "license": "MIT" }, + "../../../../helper/openapi-codegeneration/node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "../../../../helper/openapi-codegeneration/node_modules/brace-expansion": { "version": "1.1.11", "license": "MIT", @@ -6754,61 +5639,32 @@ "node": ">=8" } }, - "../../../../helper/openapi-codegeneration/node_modules/brfs": { - "version": "1.6.1", - "license": "MIT", - "dependencies": { - "quote-stream": "^1.0.1", - "resolve": "^1.1.5", - "static-module": "^2.2.0", - "through2": "^2.0.0" - }, - "bin": { - "brfs": "bin/cmd.js" - } - }, "../../../../helper/openapi-codegeneration/node_modules/browser-or-node": { - "version": "1.3.0", + "version": "2.1.1", "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/browserslist": { - "version": "4.21.5", - "dev": true, + "../../../../helper/openapi-codegeneration/node_modules/buffer": { + "version": "6.0.3", "funding": [ { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" + "type": "github", + "url": "https://github.com/sponsors/feross" }, { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" } ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/buffer-equal": { - "version": "0.0.1", - "license": "MIT", - "engines": { - "node": ">=0.4.0" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "../../../../helper/openapi-codegeneration/node_modules/buffer-from": { - "version": "1.1.2", - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/call-me-maybe": { "version": "1.0.2", "license": "MIT" @@ -6821,21 +5677,6 @@ "node": ">=6" } }, - "../../../../helper/openapi-codegeneration/node_modules/caniuse-lite": { - "version": "1.0.30001451", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ], - "license": "CC-BY-4.0" - }, "../../../../helper/openapi-codegeneration/node_modules/chalk": { "version": "2.4.2", "dev": true, @@ -6881,10 +5722,10 @@ "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/commander": { - "version": "9.4.1", + "version": "11.0.0", "license": "MIT", "engines": { - "node": "^12.20.0 || >=14" + "node": ">=16" } }, "../../../../helper/openapi-codegeneration/node_modules/compute-gcd": { @@ -6908,27 +5749,13 @@ "version": "0.0.1", "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/concat-stream": { - "version": "1.6.2", - "engines": [ - "node >= 0.8" - ], + "../../../../helper/openapi-codegeneration/node_modules/cross-fetch": { + "version": "4.0.0", "license": "MIT", "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "node-fetch": "^2.6.12" } }, - "../../../../helper/openapi-codegeneration/node_modules/convert-source-map": { - "version": "1.9.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/cross-spawn": { "version": "7.0.3", "license": "MIT", @@ -6967,6 +5794,7 @@ }, "../../../../helper/openapi-codegeneration/node_modules/deep-is": { "version": "0.1.4", + "dev": true, "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/deterministic-json-schema-faker": { @@ -7016,33 +5844,14 @@ "dev": true, "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/duplexer2": { - "version": "0.1.4", - "license": "BSD-3-Clause", - "dependencies": { - "readable-stream": "^2.0.2" - } - }, "../../../../helper/openapi-codegeneration/node_modules/eastasianwidth": { "version": "0.2.0", "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/electron-to-chromium": { - "version": "1.4.295", - "dev": true, - "license": "ISC" - }, "../../../../helper/openapi-codegeneration/node_modules/emoji-regex": { "version": "9.2.2", "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/encoding": { - "version": "0.1.13", - "license": "MIT", - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, "../../../../helper/openapi-codegeneration/node_modules/es5-ext": { "version": "0.10.62", "hasInstallScript": true, @@ -7083,14 +5892,6 @@ "es6-symbol": "^3.1.1" } }, - "../../../../helper/openapi-codegeneration/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "../../../../helper/openapi-codegeneration/node_modules/escape-string-regexp": { "version": "1.0.5", "dev": true, @@ -7099,80 +5900,47 @@ "node": ">=0.8.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/escodegen": { - "version": "1.9.1", - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/escodegen/node_modules/esprima": { - "version": "3.1.3", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "../../../../helper/openapi-codegeneration/node_modules/eslint": { - "version": "8.34.0", + "version": "8.48.0", "dev": true, "license": "MIT", "dependencies": { - "@eslint/eslintrc": "^1.4.1", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "8.48.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { @@ -7186,48 +5954,29 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/eslint-scope": { - "version": "5.1.1", + "version": "7.2.2", "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-utils": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" + "estraverse": "^5.2.0" }, "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" + "url": "https://opencollective.com/eslint" } }, "../../../../helper/openapi-codegeneration/node_modules/eslint-visitor-keys": { - "version": "3.3.0", + "version": "3.4.3", "dev": true, "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/ajv": { @@ -7306,28 +6055,8 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/globals": { - "version": "13.20.0", + "version": "13.21.0", "dev": true, "license": "MIT", "dependencies": { @@ -7364,42 +6093,6 @@ "dev": true, "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/optionator": { - "version": "0.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", "dev": true, @@ -7411,25 +6104,14 @@ "node": ">=8" } }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/espree": { - "version": "9.4.1", + "version": "9.6.1", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -7438,17 +6120,6 @@ "url": "https://opencollective.com/eslint" } }, - "../../../../helper/openapi-codegeneration/node_modules/espree/node_modules/acorn": { - "version": "8.8.2", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/esprima": { "version": "4.0.1", "license": "BSD-2-Clause", @@ -7461,7 +6132,7 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/esquery": { - "version": "1.4.0", + "version": "1.5.0", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -7471,14 +6142,6 @@ "node": ">=0.10" } }, - "../../../../helper/openapi-codegeneration/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/esrecurse": { "version": "4.3.0", "dev": true, @@ -7490,7 +6153,7 @@ "node": ">=4.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/esrecurse/node_modules/estraverse": { + "../../../../helper/openapi-codegeneration/node_modules/estraverse": { "version": "5.3.0", "dev": true, "license": "BSD-2-Clause", @@ -7498,21 +6161,16 @@ "node": ">=4.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/estraverse": { - "version": "4.3.0", - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/estree-walker": { "version": "2.0.2", "dev": true, "license": "MIT", + "optional": true, "peer": true }, "../../../../helper/openapi-codegeneration/node_modules/esutils": { "version": "2.0.3", + "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" @@ -7540,6 +6198,20 @@ "through": "~2.3.1" } }, + "../../../../helper/openapi-codegeneration/node_modules/event-target-shim": { + "version": "5.0.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../../../helper/openapi-codegeneration/node_modules/events": { + "version": "3.3.0", + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, "../../../../helper/openapi-codegeneration/node_modules/ext": { "version": "1.7.0", "license": "ISC", @@ -7551,27 +6223,12 @@ "version": "2.7.2", "license": "ISC" }, - "../../../../helper/openapi-codegeneration/node_modules/falafel": { - "version": "2.2.5", - "license": "MIT", - "dependencies": { - "acorn": "^7.1.1", - "isarray": "^2.0.1" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/falafel/node_modules/isarray": { - "version": "2.0.5", - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/fast-deep-equal": { "version": "3.1.3", "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/fast-glob": { - "version": "3.2.12", + "version": "3.3.1", "dev": true, "license": "MIT", "dependencies": { @@ -7603,6 +6260,7 @@ }, "../../../../helper/openapi-codegeneration/node_modules/fast-levenshtein": { "version": "2.0.6", + "dev": true, "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/fastq": { @@ -7651,15 +6309,16 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/flat-cache": { - "version": "3.0.4", + "version": "3.1.0", "dev": true, "license": "MIT", "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.7", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=12.0.0" } }, "../../../../helper/openapi-codegeneration/node_modules/flatted": { @@ -7694,18 +6353,6 @@ "version": "1.0.0", "license": "ISC" }, - "../../../../helper/openapi-codegeneration/node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/get-stdin": { "version": "8.0.0", "license": "MIT", @@ -7717,7 +6364,7 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/glob": { - "version": "10.3.3", + "version": "10.3.4", "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", @@ -7747,19 +6394,6 @@ "node": ">=10.13.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/glob-promise": { - "version": "3.4.0", - "license": "ISC", - "dependencies": { - "@types/glob": "*" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "glob": "*" - } - }, "../../../../helper/openapi-codegeneration/node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", "license": "MIT", @@ -7807,21 +6441,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "../../../../helper/openapi-codegeneration/node_modules/grapheme-splitter": { - "version": "1.0.4", + "../../../../helper/openapi-codegeneration/node_modules/graphemer": { + "version": "1.4.0", "dev": true, "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/has-flag": { "version": "3.0.0", "dev": true, @@ -7830,15 +6454,23 @@ "node": ">=4" } }, - "../../../../helper/openapi-codegeneration/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } + "../../../../helper/openapi-codegeneration/node_modules/ieee754": { + "version": "1.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" }, "../../../../helper/openapi-codegeneration/node_modules/ignore": { "version": "5.2.4", @@ -7883,18 +6515,8 @@ "version": "2.0.4", "license": "ISC" }, - "../../../../helper/openapi-codegeneration/node_modules/is-core-module": { - "version": "2.11.0", - "license": "MIT", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-extglob": { - "version": "2.1.1", + "../../../../helper/openapi-codegeneration/node_modules/is-extglob": { + "version": "2.1.1", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -7937,33 +6559,14 @@ "version": "2.2.2", "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/is-stream": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/is-url": { "version": "1.2.4", "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/isarray": { - "version": "1.0.0", - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/isexe": { "version": "2.0.0", "license": "ISC" }, - "../../../../helper/openapi-codegeneration/node_modules/isomorphic-fetch": { - "version": "2.2.1", - "license": "MIT", - "dependencies": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/jackspeak": { "version": "2.2.3", "license": "BlueOak-1.0.0", @@ -7986,18 +6589,9 @@ "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/js-base64": { - "version": "2.6.4", + "version": "3.7.5", "license": "BSD-3-Clause" }, - "../../../../helper/openapi-codegeneration/node_modules/js-sdsl": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, "../../../../helper/openapi-codegeneration/node_modules/js-tokens": { "version": "4.0.0", "dev": true, @@ -8025,6 +6619,11 @@ "node": ">=4" } }, + "../../../../helper/openapi-codegeneration/node_modules/json-buffer": { + "version": "3.0.1", + "dev": true, + "license": "MIT" + }, "../../../../helper/openapi-codegeneration/node_modules/json-schema-compare": { "version": "0.2.2", "license": "MIT", @@ -8045,45 +6644,34 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript": { - "version": "10.1.5", + "version": "13.1.1", "license": "MIT", "dependencies": { - "@types/json-schema": "^7.0.6", - "@types/lodash": "^4.14.168", - "@types/prettier": "^2.1.5", - "cli-color": "^2.0.0", + "@bcherny/json-schema-ref-parser": "10.0.5-fork", + "@types/json-schema": "^7.0.11", + "@types/lodash": "^4.14.182", + "@types/prettier": "^2.6.1", + "cli-color": "^2.0.2", "get-stdin": "^8.0.0", "glob": "^7.1.6", - "glob-promise": "^3.4.0", - "is-glob": "^4.0.1", - "json-schema-ref-parser": "^9.0.6", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.20", - "minimist": "^1.2.5", + "glob-promise": "^4.2.2", + "is-glob": "^4.0.3", + "lodash": "^4.17.21", + "minimist": "^1.2.6", "mkdirp": "^1.0.4", "mz": "^2.7.0", - "prettier": "^2.2.0" + "prettier": "^2.6.2" }, "bin": { "json2ts": "dist/src/cli.js" }, "engines": { - "node": ">=10.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.9", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", - "js-yaml": "^4.1.0" + "node": ">=12.0.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/argparse": { - "version": "2.0.1", - "license": "Python-2.0" + "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/@types/prettier": { + "version": "2.7.3", + "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/glob": { "version": "7.2.3", @@ -8103,24 +6691,34 @@ "url": "https://github.com/sponsors/isaacs" } }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/js-yaml": { - "version": "4.1.0", + "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/glob-promise": { + "version": "4.2.2", "license": "MIT", "dependencies": { - "argparse": "^2.0.1" + "@types/glob": "^7.1.3" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=12" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/ahmadnassri" + }, + "peerDependencies": { + "glob": "^7.1.6" } }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/json-schema-ref-parser": { - "version": "9.0.9", + "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/prettier": { + "version": "2.8.8", "license": "MIT", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "9.0.9" + "bin": { + "prettier": "bin-prettier.js" }, "engines": { - "node": ">=10" + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "../../../../helper/openapi-codegeneration/node_modules/json-schema-traverse": { @@ -8132,21 +6730,6 @@ "dev": true, "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/json-stringify-safe": { - "version": "5.0.1", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "../../../../helper/openapi-codegeneration/node_modules/jsonpath-plus": { "version": "5.1.0", "license": "MIT", @@ -8154,12 +6737,21 @@ "node": ">=10.0.0" } }, + "../../../../helper/openapi-codegeneration/node_modules/keyv": { + "version": "4.5.3", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, "../../../../helper/openapi-codegeneration/node_modules/levn": { - "version": "0.3.0", + "version": "0.4.1", + "dev": true, "license": "MIT", "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -8189,11 +6781,14 @@ "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/lru-cache": { - "version": "5.1.1", + "version": "6.0.0", "dev": true, "license": "ISC", "dependencies": { - "yallist": "^3.0.2" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, "../../../../helper/openapi-codegeneration/node_modules/lru-queue": { @@ -8203,13 +6798,6 @@ "es5-ext": "~0.10.2" } }, - "../../../../helper/openapi-codegeneration/node_modules/magic-string": { - "version": "0.22.5", - "license": "MIT", - "dependencies": { - "vlq": "^0.2.2" - } - }, "../../../../helper/openapi-codegeneration/node_modules/map-stream": { "version": "0.1.0", "dev": true @@ -8228,20 +6816,6 @@ "timers-ext": "^0.1.7" } }, - "../../../../helper/openapi-codegeneration/node_modules/merge-source-map": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "source-map": "^0.5.6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/merge-source-map/node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/merge2": { "version": "1.4.1", "dev": true, @@ -8314,6 +6888,7 @@ "version": "3.3.4", "dev": true, "license": "MIT", + "optional": true, "peer": true, "bin": { "nanoid": "bin/nanoid.cjs" @@ -8327,11 +6902,6 @@ "dev": true, "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/next-tick": { "version": "1.1.0", "license": "ISC" @@ -8342,20 +6912,25 @@ "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/node-fetch": { - "version": "1.7.3", + "version": "2.7.0", "license": "MIT", "dependencies": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, - "../../../../helper/openapi-codegeneration/node_modules/node-releases": { - "version": "2.0.10", - "dev": true, - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/nunjucks": { - "version": "3.2.3", + "version": "3.2.4", "license": "BSD-2-Clause", "dependencies": { "a-sync-waterfall": "^1.0.0", @@ -8391,10 +6966,6 @@ "node": ">=0.10.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/object-inspect": { - "version": "1.4.1", - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/once": { "version": "1.4.0", "license": "ISC", @@ -8410,19 +6981,20 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/openapi-types": { - "version": "12.1.0", + "version": "12.1.3", "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/optionator": { - "version": "0.8.3", + "version": "0.9.3", + "dev": true, "license": "MIT", "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -8493,10 +7065,6 @@ "node": ">=8" } }, - "../../../../helper/openapi-codegeneration/node_modules/path-parse": { - "version": "1.0.7", - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/path-scurry": { "version": "1.10.1", "license": "BlueOak-1.0.0", @@ -8540,7 +7108,9 @@ "../../../../helper/openapi-codegeneration/node_modules/picocolors": { "version": "1.0.0", "dev": true, - "license": "ISC" + "license": "ISC", + "optional": true, + "peer": true }, "../../../../helper/openapi-codegeneration/node_modules/picomatch": { "version": "2.3.1", @@ -8554,7 +7124,7 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/pluralize": { - "version": "7.0.0", + "version": "8.0.0", "license": "MIT", "engines": { "node": ">=4" @@ -8574,6 +7144,7 @@ } ], "license": "MIT", + "optional": true, "peer": true, "dependencies": { "nanoid": "^3.3.4", @@ -8585,27 +7156,33 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/prelude-ls": { - "version": "1.1.2", + "version": "1.2.1", + "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "../../../../helper/openapi-codegeneration/node_modules/prettier": { - "version": "2.8.4", + "version": "3.0.3", + "dev": true, "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "../../../../helper/openapi-codegeneration/node_modules/process-nextick-args": { - "version": "1.0.7", - "license": "MIT" + "../../../../helper/openapi-codegeneration/node_modules/process": { + "version": "0.11.10", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } }, "../../../../helper/openapi-codegeneration/node_modules/ps-tree": { "version": "1.2.0", @@ -8648,57 +7225,38 @@ "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/quicktype-core": { - "version": "6.1.12", + "version": "23.0.75", "license": "Apache-2.0", "dependencies": { - "@mark.probst/unicode-properties": "~1.1.0", - "browser-or-node": "^1.2.1", + "@glideapps/ts-necessities": "2.1.3", + "@types/urijs": "^1.19.19", + "browser-or-node": "^2.1.1", "collection-utils": "^1.0.1", + "cross-fetch": "^4.0.0", "is-url": "^1.2.4", - "isomorphic-fetch": "^2.2.1", - "js-base64": "^2.4.3", + "js-base64": "^3.7.5", + "lodash": "^4.17.21", "pako": "^1.0.6", - "pluralize": "^7.0.0", - "readable-stream": "2.3.0", + "pluralize": "^8.0.0", + "readable-stream": "4.4.2", + "unicode-properties": "^1.4.1", "urijs": "^1.19.1", "wordwrap": "^1.0.0", - "yaml": "^1.5.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/quote-stream": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "buffer-equal": "0.0.1", - "minimist": "^1.1.3", - "through2": "^2.0.0" - }, - "bin": { - "quote-stream": "bin/cmd.js" + "yaml": "^2.3.1" } }, "../../../../helper/openapi-codegeneration/node_modules/readable-stream": { - "version": "2.3.0", + "version": "4.4.2", "license": "MIT", "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "safe-buffer": "~5.1.0", - "string_decoder": "~1.0.0", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "../../../../helper/openapi-codegeneration/node_modules/require-from-string": { @@ -8708,21 +7266,6 @@ "node": ">=0.10.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/resolve": { - "version": "1.22.1", - "license": "MIT", - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "../../../../helper/openapi-codegeneration/node_modules/resolve-from": { "version": "4.0.0", "dev": true, @@ -8796,11 +7339,21 @@ } }, "../../../../helper/openapi-codegeneration/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/safer-buffer": { - "version": "2.1.2", + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/seedrandom": { @@ -8808,17 +7361,19 @@ "license": "MIT" }, "../../../../helper/openapi-codegeneration/node_modules/semver": { - "version": "6.3.0", + "version": "7.5.4", "dev": true, "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "../../../../helper/openapi-codegeneration/node_modules/shallow-copy": { - "version": "0.0.1", - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/shebang-command": { "version": "2.0.0", "license": "MIT", @@ -8856,8 +7411,10 @@ }, "../../../../helper/openapi-codegeneration/node_modules/source-map": { "version": "0.6.1", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "engines": { "node": ">=0.10.0" } @@ -8866,6 +7423,7 @@ "version": "1.0.2", "dev": true, "license": "BSD-3-Clause", + "optional": true, "peer": true, "engines": { "node": ">=0.10.0" @@ -8875,6 +7433,7 @@ "version": "1.4.8", "dev": true, "license": "MIT", + "optional": true, "peer": true }, "../../../../helper/openapi-codegeneration/node_modules/split": { @@ -8892,94 +7451,23 @@ "version": "1.0.3", "license": "BSD-3-Clause" }, - "../../../../helper/openapi-codegeneration/node_modules/static-eval": { - "version": "2.1.0", + "../../../../helper/openapi-codegeneration/node_modules/stream-combiner": { + "version": "0.0.4", + "dev": true, "license": "MIT", "dependencies": { - "escodegen": "^1.11.1" + "duplexer": "~0.1.1" } }, - "../../../../helper/openapi-codegeneration/node_modules/static-eval/node_modules/escodegen": { - "version": "1.14.3", - "license": "BSD-2-Clause", + "../../../../helper/openapi-codegeneration/node_modules/string_decoder": { + "version": "1.3.0", + "license": "MIT", "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module": { - "version": "2.2.5", - "license": "MIT", - "dependencies": { - "concat-stream": "~1.6.0", - "convert-source-map": "^1.5.1", - "duplexer2": "~0.1.4", - "escodegen": "~1.9.0", - "falafel": "^2.1.0", - "has": "^1.0.1", - "magic-string": "^0.22.4", - "merge-source-map": "1.0.4", - "object-inspect": "~1.4.0", - "quote-stream": "~1.0.2", - "readable-stream": "~2.3.3", - "shallow-copy": "~0.0.1", - "static-eval": "^2.0.0", - "through2": "~2.0.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module/node_modules/process-nextick-args": { - "version": "2.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module/node_modules/readable-stream": { - "version": "2.3.7", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/stream-combiner": { - "version": "0.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string_decoder": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" + "safe-buffer": "~5.2.0" } }, "../../../../helper/openapi-codegeneration/node_modules/string-argv": { - "version": "0.1.2", + "version": "0.3.2", "dev": true, "license": "MIT", "engines": { @@ -9084,16 +7572,6 @@ "node": ">=4" } }, - "../../../../helper/openapi-codegeneration/node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "../../../../helper/openapi-codegeneration/node_modules/text-table": { "version": "0.2.0", "dev": true, @@ -9121,38 +7599,6 @@ "dev": true, "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/through2": { - "version": "2.0.5", - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/through2/node_modules/process-nextick-args": { - "version": "2.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/through2/node_modules/readable-stream": { - "version": "2.3.7", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/through2/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/timers-ext": { "version": "0.1.7", "license": "ISC", @@ -9188,44 +7634,39 @@ "node": ">=8.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/tsc-watch": { - "version": "5.0.3", + "../../../../helper/openapi-codegeneration/node_modules/tr46": { + "version": "0.0.3", + "license": "MIT" + }, + "../../../../helper/openapi-codegeneration/node_modules/ts-api-utils": { + "version": "1.0.2", "dev": true, "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "node-cleanup": "^2.1.2", - "ps-tree": "^1.2.0", - "string-argv": "^0.1.1", - "strip-ansi": "^6.0.0" - }, - "bin": { - "tsc-watch": "index.js" - }, "engines": { - "node": ">=8.17.0" + "node": ">=16.13.0" }, "peerDependencies": { - "typescript": "*" + "typescript": ">=4.2.0" } }, - "../../../../helper/openapi-codegeneration/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../../helper/openapi-codegeneration/node_modules/tsutils": { - "version": "3.21.0", + "../../../../helper/openapi-codegeneration/node_modules/tsc-watch": { + "version": "6.0.4", "dev": true, "license": "MIT", "dependencies": { - "tslib": "^1.8.1" + "cross-spawn": "^7.0.3", + "node-cleanup": "^2.1.2", + "ps-tree": "^1.2.0", + "string-argv": "^0.3.1" + }, + "bin": { + "tsc-watch": "dist/lib/tsc-watch.js" }, "engines": { - "node": ">= 6" + "node": ">=12.12.0" }, "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + "typescript": "*" } }, "../../../../helper/openapi-codegeneration/node_modules/type": { @@ -9233,10 +7674,11 @@ "license": "ISC" }, "../../../../helper/openapi-codegeneration/node_modules/type-check": { - "version": "0.3.2", + "version": "0.4.0", + "dev": true, "license": "MIT", "dependencies": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" }, "engines": { "node": ">= 0.8.0" @@ -9253,12 +7695,8 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "../../../../helper/openapi-codegeneration/node_modules/typedarray": { - "version": "0.0.6", - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/typescript": { - "version": "4.9.5", + "version": "5.2.2", "dev": true, "license": "Apache-2.0", "bin": { @@ -9266,11 +7704,19 @@ "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" + } + }, + "../../../../helper/openapi-codegeneration/node_modules/unicode-properties": { + "version": "1.4.1", + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.0", + "unicode-trie": "^2.0.0" } }, "../../../../helper/openapi-codegeneration/node_modules/unicode-trie": { - "version": "0.3.1", + "version": "2.0.0", "license": "MIT", "dependencies": { "pako": "^0.2.5", @@ -9281,31 +7727,6 @@ "version": "0.2.9", "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/update-browserslist-db": { - "version": "1.0.10", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/uri-js": { "version": "4.4.1", "license": "BSD-2-Clause", @@ -9317,10 +7738,6 @@ "version": "1.19.11", "license": "MIT" }, - "../../../../helper/openapi-codegeneration/node_modules/util-deprecate": { - "version": "1.0.2", - "license": "MIT" - }, "../../../../helper/openapi-codegeneration/node_modules/validate.io-array": { "version": "1.0.6", "license": "MIT" @@ -9344,13 +7761,17 @@ "../../../../helper/openapi-codegeneration/node_modules/validate.io-number": { "version": "1.0.3" }, - "../../../../helper/openapi-codegeneration/node_modules/vlq": { - "version": "0.2.3", - "license": "MIT" + "../../../../helper/openapi-codegeneration/node_modules/webidl-conversions": { + "version": "3.0.1", + "license": "BSD-2-Clause" }, - "../../../../helper/openapi-codegeneration/node_modules/whatwg-fetch": { - "version": "3.6.2", - "license": "MIT" + "../../../../helper/openapi-codegeneration/node_modules/whatwg-url": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } }, "../../../../helper/openapi-codegeneration/node_modules/which": { "version": "2.0.2", @@ -9365,13 +7786,6 @@ "node": ">= 8" } }, - "../../../../helper/openapi-codegeneration/node_modules/word-wrap": { - "version": "1.2.3", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "../../../../helper/openapi-codegeneration/node_modules/wordwrap": { "version": "1.0.0", "license": "MIT" @@ -9487,23 +7901,16 @@ "version": "1.0.2", "license": "ISC" }, - "../../../../helper/openapi-codegeneration/node_modules/xtend": { - "version": "4.0.2", - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, "../../../../helper/openapi-codegeneration/node_modules/yallist": { - "version": "3.1.1", + "version": "4.0.0", "dev": true, "license": "ISC" }, "../../../../helper/openapi-codegeneration/node_modules/yaml": { - "version": "1.10.2", + "version": "2.3.2", "license": "ISC", "engines": { - "node": ">= 6" + "node": ">= 14" } }, "../../../../helper/openapi-codegeneration/node_modules/yocto-queue": { @@ -9517,22 +7924,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "../../../../helper/tsdoc-theme": { - "name": "@cross-lab-project/tsdoc-theme", - "extraneous": true, - "license": "UNLICENSED", - "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.0.0", - "@typescript-eslint/eslint-plugin": "^5.51.0", - "@typescript-eslint/parser": "^5.51.0", - "eslint": "^8.34.0", - "typedoc": "^0.23.20", - "typescript": "^4.8.4" - }, - "peerDependencies": { - "typedoc": "^0.23.20" - } - }, "../../../common": { "name": "@crosslab/service-common", "license": "UNLICENSED", @@ -10117,7 +8508,7 @@ } }, "../../../common/node_modules/@types/json-schema": { - "version": "7.0.11", + "version": "7.0.12", "dev": true, "license": "MIT" }, @@ -10132,7 +8523,7 @@ "license": "MIT" }, "../../../common/node_modules/@types/node": { - "version": "18.16.1", + "version": "20.5.9", "license": "MIT" }, "../../../common/node_modules/@types/qs": { @@ -10146,7 +8537,7 @@ "license": "MIT" }, "../../../common/node_modules/@types/semver": { - "version": "7.3.13", + "version": "7.5.1", "dev": true, "license": "MIT" }, @@ -10173,36 +8564,37 @@ "license": "MIT" }, "../../../common/node_modules/@types/uuid": { - "version": "9.0.2", + "version": "9.0.3", "dev": true, "license": "MIT" }, "../../../common/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.59.1", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/type-utils": "5.59.1", - "@typescript-eslint/utils": "5.59.1", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/type-utils": "6.6.0", + "@typescript-eslint/utils": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -10211,24 +8603,25 @@ } }, "../../../common/node_modules/@typescript-eslint/parser": { - "version": "5.59.1", + "version": "6.6.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/typescript-estree": "5.59.1", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -10237,15 +8630,15 @@ } }, "../../../common/node_modules/@typescript-eslint/scope-manager": { - "version": "5.59.1", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/visitor-keys": "5.59.1" + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -10253,24 +8646,24 @@ } }, "../../../common/node_modules/@typescript-eslint/type-utils": { - "version": "5.59.1", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "5.59.1", - "@typescript-eslint/utils": "5.59.1", + "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/utils": "6.6.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -10279,11 +8672,11 @@ } }, "../../../common/node_modules/@typescript-eslint/types": { - "version": "5.59.1", + "version": "6.6.0", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -10291,20 +8684,20 @@ } }, "../../../common/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.59.1", + "version": "6.6.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/visitor-keys": "5.59.1", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -10317,40 +8710,39 @@ } }, "../../../common/node_modules/@typescript-eslint/utils": { - "version": "5.59.1", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/typescript-estree": "5.59.1", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" } }, "../../../common/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.59.1", + "version": "6.6.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.59.1", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.6.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -11206,18 +9598,6 @@ "url": "https://opencollective.com/eslint" } }, - "../../../common/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, "../../../common/node_modules/eslint-visitor-keys": { "version": "3.4.3", "dev": true, @@ -11395,14 +9775,6 @@ "node": ">=4.0" } }, - "../../../common/node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "../../../common/node_modules/esutils": { "version": "2.0.3", "dev": true, @@ -11489,7 +9861,7 @@ "license": "MIT" }, "../../../common/node_modules/fast-glob": { - "version": "3.2.12", + "version": "3.3.1", "dev": true, "license": "MIT", "dependencies": { @@ -11536,6 +9908,10 @@ "version": "4.2.3", "license": "MIT" }, + "../../../common/node_modules/fetch-retry": { + "version": "5.0.6", + "license": "MIT" + }, "../../../common/node_modules/file-entry-cache": { "version": "6.0.1", "dev": true, @@ -11769,11 +10145,6 @@ "license": "ISC", "optional": true }, - "../../../common/node_modules/grapheme-splitter": { - "version": "1.0.4", - "dev": true, - "license": "MIT" - }, "../../../common/node_modules/graphemer": { "version": "1.4.0", "dev": true, @@ -12095,7 +10466,7 @@ "license": "MIT" }, "../../../common/node_modules/jose": { - "version": "4.14.4", + "version": "4.14.6", "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" @@ -12712,11 +11083,6 @@ "dev": true, "license": "MIT" }, - "../../../common/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, "../../../common/node_modules/negotiator": { "version": "0.6.3", "license": "MIT", @@ -13028,14 +11394,14 @@ } }, "../../../common/node_modules/prettier": { - "version": "2.8.8", + "version": "3.0.3", "dev": true, "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -13301,7 +11667,7 @@ "license": "MIT" }, "../../../common/node_modules/semver": { - "version": "7.5.0", + "version": "7.5.4", "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -13702,23 +12068,15 @@ "version": "1.3.0", "license": "MIT" }, - "../../../common/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../common/node_modules/tsutils": { - "version": "3.21.0", + "../../../common/node_modules/ts-api-utils": { + "version": "1.0.2", "dev": true, "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, "engines": { - "node": ">= 6" + "node": ">=16.13.0" }, "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + "typescript": ">=4.2.0" } }, "../../../common/node_modules/type-check": { @@ -14003,7 +12361,7 @@ } }, "../../../common/node_modules/typescript": { - "version": "4.9.5", + "version": "5.2.2", "dev": true, "license": "Apache-2.0", "bin": { @@ -14011,7 +12369,7 @@ "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "../../../common/node_modules/unique-filename": { @@ -14158,131 +12516,471 @@ "dev": true, "license": "Apache-2.0" }, - "../../../common/node_modules/wrap-ansi": { - "version": "7.0.0", + "../../../common/node_modules/wrap-ansi": { + "version": "7.0.0", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "../../../common/node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../../../common/node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "../../../common/node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "license": "MIT" + }, + "../../../common/node_modules/wrappy": { + "version": "1.0.2", + "license": "ISC" + }, + "../../../common/node_modules/y18n": { + "version": "5.0.8", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "../../../common/node_modules/yallist": { + "version": "4.0.0", + "license": "ISC" + }, + "../../../common/node_modules/yargs": { + "version": "16.2.0", + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "../../../common/node_modules/yargs-parser": { + "version": "20.2.4", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "../../../common/node_modules/yargs-unparser": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "../../../common/node_modules/yocto-queue": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../common": { + "name": "@crosslab/booking-service-common", + "version": "0.0.1", + "license": "Apache-2.0", + "dependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0" + }, + "devDependencies": { + "@types/node": "^20.5.9", + "prettier": "^3.0.3", + "typescript": "^5.2.2" + } + }, + "../common/node_modules/@babel/code-frame": { + "version": "7.22.13", + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/generator": { + "version": "7.17.7", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/helper-environment-visitor": { + "version": "7.22.5", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/helper-function-name": { + "version": "7.22.5", + "license": "MIT", + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/helper-function-name/node_modules/@babel/types": { + "version": "7.22.15", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { + "version": "7.22.15", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { + "version": "7.22.15", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/helper-validator-identifier": { + "version": "7.22.15", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/highlight": { + "version": "7.22.13", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/parser": { + "version": "7.22.16", + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../common/node_modules/@babel/template": { + "version": "7.22.15", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.22.15", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/traverse": { + "version": "7.17.3", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@babel/types": { + "version": "7.17.0", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../common/node_modules/@trivago/prettier-plugin-sort-imports": { + "version": "4.2.0", + "license": "Apache-2.0", + "dependencies": { + "@babel/generator": "7.17.7", + "@babel/parser": "^7.20.5", + "@babel/traverse": "7.17.3", + "@babel/types": "7.17.0", + "javascript-natural-sort": "0.7.1", + "lodash": "^4.17.21" + }, + "peerDependencies": { + "@vue/compiler-sfc": "3.x", + "prettier": "2.x - 3.x" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } + } + }, + "../common/node_modules/@types/node": { + "version": "20.5.9", + "dev": true, + "license": "MIT" + }, + "../common/node_modules/ansi-styles": { + "version": "3.2.1", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "../common/node_modules/chalk": { + "version": "2.4.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "../common/node_modules/color-convert": { + "version": "1.9.3", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "../common/node_modules/color-name": { + "version": "1.1.3", + "license": "MIT" + }, + "../common/node_modules/debug": { + "version": "4.3.4", "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ms": "2.1.2" }, "engines": { - "node": ">=10" + "node": ">=6.0" }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "../../../common/node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", + "../common/node_modules/escape-string-regexp": { + "version": "1.0.5", "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=0.8.0" } }, - "../../../common/node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", + "../common/node_modules/globals": { + "version": "11.12.0", "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, "engines": { - "node": ">=7.0.0" + "node": ">=4" } }, - "../../../common/node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", + "../common/node_modules/has-flag": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../common/node_modules/javascript-natural-sort": { + "version": "0.7.1", "license": "MIT" }, - "../../../common/node_modules/wrappy": { - "version": "1.0.2", - "license": "ISC" + "../common/node_modules/js-tokens": { + "version": "4.0.0", + "license": "MIT" }, - "../../../common/node_modules/y18n": { - "version": "5.0.8", - "license": "ISC", + "../common/node_modules/jsesc": { + "version": "2.5.2", + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, "engines": { - "node": ">=10" + "node": ">=4" } }, - "../../../common/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" + "../common/node_modules/lodash": { + "version": "4.17.21", + "license": "MIT" }, - "../../../common/node_modules/yargs": { - "version": "16.2.0", + "../common/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "../common/node_modules/prettier": { + "version": "3.0.3", "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "bin": { + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "../../../common/node_modules/yargs-parser": { - "version": "20.2.4", - "license": "ISC", + "../common/node_modules/source-map": { + "version": "0.5.7", + "license": "BSD-3-Clause", "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "../../../common/node_modules/yargs-unparser": { - "version": "2.0.0", - "dev": true, + "../common/node_modules/supports-color": { + "version": "5.5.0", "license": "MIT", "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=4" } }, - "../../../common/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, + "../common/node_modules/to-fast-properties": { + "version": "2.0.0", "license": "MIT", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../common": { - "name": "@crosslab/booking-service-common", - "version": "0.0.1", - "license": "Apache-2.0", - "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0" - }, - "devDependencies": { - "@types/node": "^20.5.9", - "prettier": "^3.0.3", - "typescript": "^5.2.2" + "node": ">=4" } }, - "../common/node_modules/@types/node": { - "version": "20.4.2", - "dev": true, - "license": "MIT" - }, "../common/node_modules/typescript": { - "version": "5.1.6", + "version": "5.2.2", "dev": true, "license": "Apache-2.0", "bin": { @@ -14341,7 +13039,6 @@ }, "../device-reservation/node_modules/@babel/code-frame": { "version": "7.22.5", - "dev": true, "license": "MIT", "dependencies": { "@babel/highlight": "^7.22.5" @@ -14434,7 +13131,6 @@ }, "../device-reservation/node_modules/@babel/helper-environment-visitor": { "version": "7.22.5", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -14442,7 +13138,6 @@ }, "../device-reservation/node_modules/@babel/helper-function-name": { "version": "7.22.5", - "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.22.5", @@ -14454,7 +13149,6 @@ }, "../device-reservation/node_modules/@babel/helper-hoist-variables": { "version": "7.22.5", - "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" @@ -14505,7 +13199,6 @@ }, "../device-reservation/node_modules/@babel/helper-split-export-declaration": { "version": "7.22.6", - "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" @@ -14516,7 +13209,6 @@ }, "../device-reservation/node_modules/@babel/helper-string-parser": { "version": "7.22.5", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -14524,7 +13216,6 @@ }, "../device-reservation/node_modules/@babel/helper-validator-identifier": { "version": "7.22.5", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -14553,7 +13244,6 @@ }, "../device-reservation/node_modules/@babel/highlight": { "version": "7.22.5", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.22.5", @@ -14566,7 +13256,6 @@ }, "../device-reservation/node_modules/@babel/highlight/node_modules/ansi-styles": { "version": "3.2.1", - "dev": true, "license": "MIT", "dependencies": { "color-convert": "^1.9.0" @@ -14577,7 +13266,6 @@ }, "../device-reservation/node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", @@ -14590,7 +13278,6 @@ }, "../device-reservation/node_modules/@babel/highlight/node_modules/color-convert": { "version": "1.9.3", - "dev": true, "license": "MIT", "dependencies": { "color-name": "1.1.3" @@ -14598,12 +13285,10 @@ }, "../device-reservation/node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", - "dev": true, "license": "MIT" }, "../device-reservation/node_modules/@babel/highlight/node_modules/escape-string-regexp": { "version": "1.0.5", - "dev": true, "license": "MIT", "engines": { "node": ">=0.8.0" @@ -14611,7 +13296,6 @@ }, "../device-reservation/node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -14619,7 +13303,6 @@ }, "../device-reservation/node_modules/@babel/highlight/node_modules/supports-color": { "version": "5.5.0", - "dev": true, "license": "MIT", "dependencies": { "has-flag": "^3.0.0" @@ -14630,7 +13313,6 @@ }, "../device-reservation/node_modules/@babel/parser": { "version": "7.22.7", - "dev": true, "license": "MIT", "bin": { "parser": "bin/babel-parser.js" @@ -14641,7 +13323,6 @@ }, "../device-reservation/node_modules/@babel/template": { "version": "7.22.5", - "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.22.5", @@ -14674,7 +13355,6 @@ }, "../device-reservation/node_modules/@babel/types": { "version": "7.22.5", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.22.5", @@ -14828,6 +13508,76 @@ "dev": true, "license": "MIT" }, + "../device-reservation/node_modules/@trivago/prettier-plugin-sort-imports": { + "version": "4.2.0", + "license": "Apache-2.0", + "dependencies": { + "@babel/generator": "7.17.7", + "@babel/parser": "^7.20.5", + "@babel/traverse": "7.17.3", + "@babel/types": "7.17.0", + "javascript-natural-sort": "0.7.1", + "lodash": "^4.17.21" + }, + "peerDependencies": { + "@vue/compiler-sfc": "3.x", + "prettier": "2.x - 3.x" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } + } + }, + "../device-reservation/node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/generator": { + "version": "7.17.7", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../device-reservation/node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse": { + "version": "7.17.3", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../device-reservation/node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/types": { + "version": "7.17.0", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../device-reservation/node_modules/@trivago/prettier-plugin-sort-imports/node_modules/source-map": { + "version": "0.5.7", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "../device-reservation/node_modules/@types/amqplib": { "version": "0.10.1", "license": "MIT", @@ -15441,7 +14191,6 @@ }, "../device-reservation/node_modules/globals": { "version": "11.12.0", - "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -15727,9 +14476,12 @@ "node": ">=8" } }, + "../device-reservation/node_modules/javascript-natural-sort": { + "version": "0.7.1", + "license": "MIT" + }, "../device-reservation/node_modules/js-tokens": { "version": "4.0.0", - "dev": true, "license": "MIT" }, "../device-reservation/node_modules/js-yaml": { @@ -15745,7 +14497,6 @@ }, "../device-reservation/node_modules/jsesc": { "version": "2.5.2", - "dev": true, "license": "MIT", "bin": { "jsesc": "bin/jsesc" @@ -15779,6 +14530,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "../device-reservation/node_modules/lodash": { + "version": "4.17.21", + "license": "MIT" + }, "../device-reservation/node_modules/lodash.flattendeep": { "version": "4.4.0", "dev": true, @@ -15800,17 +14555,14 @@ } }, "../device-reservation/node_modules/long": { - "version": "4.0.0", + "version": "5.2.3", "license": "Apache-2.0" }, "../device-reservation/node_modules/lru-cache": { - "version": "6.0.0", + "version": "8.0.5", "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { - "node": ">=10" + "node": ">=16.14" } }, "../device-reservation/node_modules/make-dir": { @@ -15892,15 +14644,15 @@ "license": "MIT" }, "../device-reservation/node_modules/mysql2": { - "version": "2.3.3", + "version": "3.6.0", "license": "MIT", "dependencies": { - "denque": "^2.0.1", + "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.6.3", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", + "long": "^5.2.1", + "lru-cache": "^8.0.0", + "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", "sqlstring": "^2.3.2" }, @@ -16277,6 +15029,19 @@ "node": ">=8" } }, + "../device-reservation/node_modules/prettier": { + "version": "3.0.3", + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "../device-reservation/node_modules/process-on-spawn": { "version": "1.0.0", "dev": true, @@ -16559,7 +15324,6 @@ }, "../device-reservation/node_modules/to-fast-properties": { "version": "2.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -16597,14 +15361,14 @@ } }, "../device-reservation/node_modules/typescript": { - "version": "4.9.5", + "version": "5.2.2", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "../device-reservation/node_modules/update-browserslist-db": { @@ -16716,10 +15480,6 @@ "node": ">=10" } }, - "../device-reservation/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "../device-reservation/node_modules/yargs": { "version": "16.2.0", "dev": true, @@ -16809,6 +15569,7 @@ "typescript": "^5.2.2" }, "devDependencies": { + "node-mocks-http": "^1.14.1", "prettier": "^3.0.3" } }, @@ -16824,6 +15585,193 @@ "node": ">=0.8" } }, + "../test_common/node_modules/@babel/code-frame": { + "version": "7.22.13", + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/generator": { + "version": "7.17.7", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/helper-environment-visitor": { + "version": "7.22.5", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/helper-function-name": { + "version": "7.22.5", + "license": "MIT", + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/helper-function-name/node_modules/@babel/types": { + "version": "7.22.15", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { + "version": "7.22.15", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { + "version": "7.22.15", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/helper-validator-identifier": { + "version": "7.22.15", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/highlight": { + "version": "7.22.13", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/parser": { + "version": "7.22.16", + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../test_common/node_modules/@babel/template": { + "version": "7.22.15", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.22.15", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.15", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/traverse": { + "version": "7.17.3", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../test_common/node_modules/@babel/types": { + "version": "7.17.0", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "../test_common/node_modules/@crosslab/booking-service-common": { "resolved": "../common", "link": true @@ -16832,6 +15780,27 @@ "resolved": "../device-reservation", "link": true }, + "../test_common/node_modules/@trivago/prettier-plugin-sort-imports": { + "version": "4.2.0", + "license": "Apache-2.0", + "dependencies": { + "@babel/generator": "7.17.7", + "@babel/parser": "^7.20.5", + "@babel/traverse": "7.17.3", + "@babel/types": "7.17.0", + "javascript-natural-sort": "0.7.1", + "lodash": "^4.17.21" + }, + "peerDependencies": { + "@vue/compiler-sfc": "3.x", + "prettier": "2.x - 3.x" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } + } + }, "../test_common/node_modules/@types/amqplib": { "version": "0.10.1", "license": "MIT", @@ -16855,7 +15824,7 @@ } }, "../test_common/node_modules/@types/express": { - "version": "4.17.17", + "version": "4.17.21", "license": "MIT", "dependencies": { "@types/body-parser": "*", @@ -16883,8 +15852,11 @@ "license": "MIT" }, "../test_common/node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" + "version": "20.11.20", + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } }, "../test_common/node_modules/@types/qs": { "version": "6.9.7", @@ -16935,6 +15907,16 @@ "node": ">=10" } }, + "../test_common/node_modules/ansi-styles": { + "version": "3.2.1", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, "../test_common/node_modules/array-flatten": { "version": "1.1.1", "license": "MIT" @@ -16994,6 +15976,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "../test_common/node_modules/chalk": { + "version": "2.4.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "../test_common/node_modules/color-convert": { + "version": "1.9.3", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "../test_common/node_modules/color-name": { + "version": "1.1.3", + "license": "MIT" + }, "../test_common/node_modules/content-disposition": { "version": "0.5.4", "license": "MIT", @@ -17100,6 +16105,13 @@ "version": "1.0.3", "license": "MIT" }, + "../test_common/node_modules/escape-string-regexp": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, "../test_common/node_modules/etag": { "version": "1.8.1", "license": "MIT", @@ -17241,6 +16253,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "../test_common/node_modules/globals": { + "version": "11.12.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "../test_common/node_modules/has": { "version": "1.0.3", "license": "MIT", @@ -17251,6 +16270,13 @@ "node": ">= 0.4.0" } }, + "../test_common/node_modules/has-flag": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "../test_common/node_modules/has-proto": { "version": "1.0.1", "license": "MIT", @@ -17299,33 +16325,52 @@ "version": "2.0.4", "license": "ISC" }, - "../test_common/node_modules/ipaddr.js": { - "version": "1.9.1", + "../test_common/node_modules/ipaddr.js": { + "version": "1.9.1", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "../test_common/node_modules/is-property": { + "version": "1.0.2", + "license": "MIT" + }, + "../test_common/node_modules/isarray": { + "version": "0.0.1", + "license": "MIT" + }, + "../test_common/node_modules/javascript-natural-sort": { + "version": "0.7.1", + "license": "MIT" + }, + "../test_common/node_modules/js-tokens": { + "version": "4.0.0", + "license": "MIT" + }, + "../test_common/node_modules/jsesc": { + "version": "2.5.2", "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, "engines": { - "node": ">= 0.10" + "node": ">=4" } }, - "../test_common/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT" - }, - "../test_common/node_modules/isarray": { - "version": "0.0.1", + "../test_common/node_modules/lodash": { + "version": "4.17.21", "license": "MIT" }, "../test_common/node_modules/long": { - "version": "4.0.0", + "version": "5.2.3", "license": "Apache-2.0" }, "../test_common/node_modules/lru-cache": { - "version": "6.0.0", + "version": "8.0.5", "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { - "node": ">=10" + "node": ">=16.14" } }, "../test_common/node_modules/media-typer": { @@ -17378,15 +16423,15 @@ "license": "MIT" }, "../test_common/node_modules/mysql2": { - "version": "2.3.3", + "version": "3.6.0", "license": "MIT", "dependencies": { - "denque": "^2.0.1", + "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.6.3", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", + "long": "^5.2.1", + "lru-cache": "^8.0.0", + "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", "sqlstring": "^2.3.2" }, @@ -17428,6 +16473,36 @@ "node": ">= 0.6" } }, + "../test_common/node_modules/node-mocks-http": { + "version": "1.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express": "^4.17.21", + "@types/node": "^20.10.6", + "accepts": "^1.3.7", + "content-disposition": "^0.5.3", + "depd": "^1.1.0", + "fresh": "^0.5.2", + "merge-descriptors": "^1.0.1", + "methods": "^1.1.2", + "mime": "^1.3.4", + "parseurl": "^1.3.3", + "range-parser": "^1.2.0", + "type-is": "^1.6.18" + }, + "engines": { + "node": ">=14" + } + }, + "../test_common/node_modules/node-mocks-http/node_modules/depd": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "../test_common/node_modules/object-inspect": { "version": "1.12.3", "license": "MIT", @@ -17456,6 +16531,19 @@ "version": "0.1.7", "license": "MIT" }, + "../test_common/node_modules/prettier": { + "version": "3.0.3", + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "../test_common/node_modules/proxy-addr": { "version": "2.0.7", "license": "MIT", @@ -17595,6 +16683,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "../test_common/node_modules/source-map": { + "version": "0.5.7", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "../test_common/node_modules/sqlstring": { "version": "2.3.3", "license": "MIT", @@ -17613,6 +16708,23 @@ "version": "0.10.31", "license": "MIT" }, + "../test_common/node_modules/supports-color": { + "version": "5.5.0", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../test_common/node_modules/to-fast-properties": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "../test_common/node_modules/toidentifier": { "version": "1.0.1", "license": "MIT", @@ -17632,16 +16744,20 @@ } }, "../test_common/node_modules/typescript": { - "version": "4.9.5", + "version": "5.2.2", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, + "../test_common/node_modules/undici-types": { + "version": "5.26.5", + "license": "MIT" + }, "../test_common/node_modules/unpipe": { "version": "1.0.0", "license": "MIT", @@ -17671,22 +16787,6 @@ "node": ">= 0.8" } }, - "../test_common/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.22.5", "license": "MIT", @@ -17697,109 +16797,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/compat-data": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.9", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@babel/core/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/generator": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, "node_modules/@babel/helper-environment-visitor": { "version": "7.22.5", "license": "MIT", @@ -17828,46 +16825,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-split-export-declaration": { "version": "7.22.6", "license": "MIT", @@ -17885,30 +16842,9 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.22.6", - "dev": true, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.5", "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" - }, "engines": { "node": ">=6.9.0" } @@ -18004,47 +16940,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse": { - "version": "7.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@babel/traverse/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/@babel/types": { "version": "7.22.5", "license": "MIT", @@ -18057,6 +16952,12 @@ "node": ">=6.9.0" } }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "node_modules/@cross-lab-project/api-client": { "resolved": "../../../../clients/api/js", "link": true @@ -18081,89 +16982,6 @@ "resolved": "../test_common", "link": true }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "dev": true, @@ -18172,19 +16990,6 @@ "node": ">=8" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", "dev": true, @@ -18193,19 +16998,6 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" - }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.18", "dev": true, @@ -18222,8 +17014,7 @@ }, "node_modules/@trivago/prettier-plugin-sort-imports": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.0.tgz", - "integrity": "sha512-YBepjbt+ZNBVmN3ev1amQH3lWCmHyt5qTbLCp/syXJRu/Kw2koXh44qayB1gMRxcL/gV8egmjN5xWSrYyfUtyw==", + "license": "Apache-2.0", "dependencies": { "@babel/generator": "7.17.7", "@babel/parser": "^7.20.5", @@ -18244,8 +17035,7 @@ }, "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/generator": { "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "license": "MIT", "dependencies": { "@babel/types": "^7.17.0", "jsesc": "^2.5.1", @@ -18257,8 +17047,7 @@ }, "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse": { "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.16.7", "@babel/generator": "^7.17.3", @@ -18277,8 +17066,7 @@ }, "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/types": { "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" @@ -18289,8 +17077,7 @@ }, "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/debug": { "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -18305,13 +17092,11 @@ }, "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "license": "MIT" }, "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -18333,8 +17118,7 @@ }, "node_modules/@types/express": { "version": "4.17.21", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", - "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "license": "MIT", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -18356,10 +17140,15 @@ "version": "2.0.1", "license": "MIT" }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, "node_modules/@types/lodash": { "version": "4.14.198", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.198.tgz", - "integrity": "sha512-trNJ/vtMZYMLhfN45uLq4ShQSw0/S7xCTLLVM+WM1rmFpba/VS42jVUgaO3w/NOLiWR/09lnYk0yMaA/atdIsg==" + "license": "MIT" }, "node_modules/@types/mime": { "version": "1.3.2", @@ -18372,8 +17161,7 @@ }, "node_modules/@types/node": { "version": "20.11.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", - "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", + "license": "MIT", "dependencies": { "undici-types": "~5.26.4" } @@ -18414,18 +17202,6 @@ "node": ">= 0.6" } }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ajv": { "version": "8.12.0", "license": "MIT", @@ -18497,22 +17273,6 @@ "node": ">= 8" } }, - "node_modules/append-transform": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/archy": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/argparse": { "version": "2.0.1", "dev": true, @@ -18581,56 +17341,105 @@ "dev": true, "license": "ISC" }, - "node_modules/browserslist": { - "version": "4.21.9", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], + "node_modules/bytes": { + "version": "3.1.2", "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/c8": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", + "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "dev": true, "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" }, "bin": { - "browserslist": "cli.js" + "c8": "bin/c8.js" }, "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + "node": ">=14.14.0" } }, - "node_modules/bytes": { - "version": "3.1.2", - "license": "MIT", + "node_modules/c8/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, "engines": { - "node": ">= 0.8" + "node": ">=12" + } + }, + "node_modules/c8/node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/c8/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/caching-transform": { - "version": "4.0.0", + "node_modules/c8/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "license": "MIT", "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=8" + "node": ">=12" + } + }, + "node_modules/c8/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" } }, "node_modules/call-bind": { @@ -18644,33 +17453,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001516", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, "node_modules/chalk": { "version": "4.1.2", "dev": true, @@ -18723,14 +17505,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/cliui": { "version": "7.0.4", "dev": true, @@ -18765,11 +17539,6 @@ "node": ">= 6" } }, - "node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/concat-map": { "version": "0.0.1", "dev": true, @@ -18792,11 +17561,6 @@ "node": ">= 0.6" } }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, "node_modules/cookie": { "version": "0.5.0", "license": "MIT", @@ -18832,28 +17596,6 @@ "ms": "2.0.0" } }, - "node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/default-require-extensions": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/denque": { "version": "2.1.0", "license": "Apache-2.0", @@ -18888,11 +17630,6 @@ "version": "1.1.1", "license": "MIT" }, - "node_modules/electron-to-chromium": { - "version": "1.4.461", - "dev": true, - "license": "ISC" - }, "node_modules/emoji-regex": { "version": "8.0.0", "dev": true, @@ -18920,11 +17657,6 @@ "node": ">=8.0.0" } }, - "node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, "node_modules/escalade": { "version": "3.1.1", "dev": true, @@ -18948,18 +17680,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/etag": { "version": "1.8.1", "license": "MIT", @@ -19007,18 +17727,6 @@ "node": ">= 0.10.0" } }, - "node_modules/express-request-mock": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/express-request-mock/-/express-request-mock-4.0.0.tgz", - "integrity": "sha512-ctHyja2yJKRjjehoWm6ZikvGrtDDrB2qT5NOvmvkkOwqIf61bYxsA6DNJq8Jm0jnXHkI2TOQjdSyE6Tb1IEw+Q==", - "dev": true, - "dependencies": { - "node-mocks-http": "^1.13.0" - }, - "engines": { - "node": ">= 18.0.0" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "license": "MIT" @@ -19050,22 +17758,6 @@ "node": ">= 0.8" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, "node_modules/find-up": { "version": "5.0.0", "dev": true, @@ -19089,18 +17781,6 @@ "flat": "cli.js" } }, - "node_modules/foreground-child": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/forwarded": { "version": "0.2.0", "license": "MIT", @@ -19115,25 +17795,6 @@ "node": ">= 0.6" } }, - "node_modules/fromentries": { - "version": "1.3.2", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/fs.realpath": { "version": "1.0.0", "dev": true, @@ -19150,14 +17811,6 @@ "is-property": "^1.0.2" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "dev": true, @@ -19179,14 +17832,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/glob": { "version": "7.2.0", "dev": true, @@ -19244,11 +17889,6 @@ "node": ">=4" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, "node_modules/has": { "version": "1.0.3", "license": "MIT", @@ -19287,21 +17927,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/he": { "version": "1.2.0", "dev": true, @@ -19339,22 +17964,6 @@ "node": ">=0.10.0" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/inflight": { "version": "1.0.6", "dev": true, @@ -19433,22 +18042,6 @@ "version": "1.0.2", "license": "MIT" }, - "node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "dev": true, @@ -19460,14 +18053,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/isexe": { "version": "2.0.0", "dev": true, @@ -19481,109 +18066,78 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "4.0.3", + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/istanbul-lib-report": { - "version": "3.0.0", + "node_modules/istanbul-lib-report/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" + "yallist": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, - "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "semver": "^7.5.3" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", + "node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { "node": ">=10" } }, - "node_modules/istanbul-lib-source-maps/node_modules/debug": { - "version": "4.3.4", + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=8" } }, - "node_modules/istanbul-lib-source-maps/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/istanbul-reports": { - "version": "3.1.5", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -19594,8 +18148,7 @@ }, "node_modules/javascript-natural-sort": { "version": "0.7.1", - "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", - "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==" + "license": "MIT" }, "node_modules/js-tokens": { "version": "4.0.0", @@ -19626,17 +18179,6 @@ "version": "1.0.0", "license": "MIT" }, - "node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/locate-path": { "version": "6.0.0", "dev": true, @@ -19655,11 +18197,6 @@ "version": "4.17.21", "license": "MIT" }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, "node_modules/log-symbols": { "version": "4.1.0", "dev": true, @@ -19677,31 +18214,15 @@ }, "node_modules/long": { "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + "license": "Apache-2.0" }, "node_modules/lru-cache": { "version": "8.0.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", - "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", + "license": "ISC", "engines": { "node": ">=16.14" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/media-typer": { "version": "0.3.0", "license": "MIT", @@ -19829,8 +18350,7 @@ }, "node_modules/mysql2": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.6.0.tgz", - "integrity": "sha512-EWUGAhv6SphezurlfI2Fpt0uJEWLmirrtQR7SkbTHFC+4/mJBrPiSzHESHKAWKG7ALVD6xaG/NBjjd1DGJGQQQ==", + "license": "MIT", "dependencies": { "denque": "^2.1.0", "generate-function": "^2.3.1", @@ -19890,209 +18410,12 @@ "node": ">= 0.6" } }, - "node_modules/node-mocks-http": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/node-mocks-http/-/node-mocks-http-1.14.1.tgz", - "integrity": "sha512-mfXuCGonz0A7uG1FEjnypjm34xegeN5+HI6xeGhYKecfgaZhjsmYoLE9LEFmT+53G1n8IuagPZmVnEL/xNsFaA==", - "dev": true, - "dependencies": { - "@types/express": "^4.17.21", - "@types/node": "^20.10.6", - "accepts": "^1.3.7", - "content-disposition": "^0.5.3", - "depd": "^1.1.0", - "fresh": "^0.5.2", - "merge-descriptors": "^1.0.1", - "methods": "^1.1.2", - "mime": "^1.3.4", - "parseurl": "^1.3.3", - "range-parser": "^1.2.0", - "type-is": "^1.6.18" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/node-mocks-http/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/node-preload": { - "version": "0.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-releases": { - "version": "2.0.13", - "dev": true, - "license": "MIT" - }, "node_modules/normalize-path": { "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nyc": { - "version": "15.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "dev": true, - "license": "ISC" - }, - "node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, + "dev": true, + "license": "MIT", "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, "node_modules/object-inspect": { @@ -20148,39 +18471,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-map": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/parseurl": { "version": "1.3.3", "license": "MIT", @@ -20216,11 +18506,6 @@ "version": "0.1.7", "license": "MIT" }, - "node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/picomatch": { "version": "2.3.1", "dev": true, @@ -20232,69 +18517,9 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/prettier": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -20305,17 +18530,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/process-on-spawn": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/proxy-addr": { "version": "2.0.7", "license": "MIT", @@ -20386,17 +18600,6 @@ "node": ">=8.10.0" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/require-directory": { "version": "2.1.1", "dev": true, @@ -20412,33 +18615,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "funding": [ @@ -20461,14 +18637,6 @@ "version": "2.1.2", "license": "MIT" }, - "node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/send": { "version": "0.18.0", "license": "MIT", @@ -20519,11 +18687,6 @@ "node": ">= 0.8.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/setprototypeof": { "version": "1.2.0", "license": "ISC" @@ -20559,40 +18722,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawn-wrap": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/sqlstring": { "version": "2.3.3", "license": "MIT", @@ -20631,14 +18760,6 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "dev": true, @@ -20722,14 +18843,6 @@ "node": ">=0.6" } }, - "node_modules/type-fest": { - "version": "0.8.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, "node_modules/type-is": { "version": "1.6.18", "license": "MIT", @@ -20741,18 +18854,9 @@ "node": ">= 0.6" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -20763,8 +18867,7 @@ }, "node_modules/undici-types": { "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "license": "MIT" }, "node_modules/unpipe": { "version": "1.0.0", @@ -20773,35 +18876,6 @@ "node": ">= 0.8" } }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, "node_modules/uri-js": { "version": "4.4.1", "license": "BSD-2-Clause", @@ -20816,14 +18890,26 @@ "node": ">= 0.4.0" } }, - "node_modules/uuid": { - "version": "8.3.2", + "node_modules/v8-to-istanbul": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" } }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/vary": { "version": "1.1.2", "license": "MIT", @@ -20845,11 +18931,6 @@ "node": ">= 8" } }, - "node_modules/which-module": { - "version": "2.0.1", - "dev": true, - "license": "ISC" - }, "node_modules/workerpool": { "version": "6.2.1", "dev": true, @@ -20876,17 +18957,6 @@ "dev": true, "license": "ISC" }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "node_modules/y18n": { "version": "5.0.8", "dev": true, @@ -20895,6 +18965,12 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/yargs": { "version": "16.2.0", "dev": true, diff --git a/services/booking/src/schedule-service/package.json b/services/booking/src/schedule-service/package.json index fcfbe238..508d5391 100644 --- a/services/booking/src/schedule-service/package.json +++ b/services/booking/src/schedule-service/package.json @@ -4,7 +4,7 @@ "description": "Part of booking service. Shows schedule of devices - horizontal scaleable.", "main": "app/index.js", "scripts": { - "test": "npm run build && env-cmd -e development nyc --include=\"app/operations/index.js\" --include=\"app/timetable.js\" mocha app/*_test.js app/operations/*_test.js", + "test": "npm run build && env-cmd -e development c8 --include=\"app/operations/index.js\" --include=\"app/timetable.js\" mocha app/*_test.js app/operations/*_test.js", "build:generate": "openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", "build:compile": "tsc", "build": "npm run build:generate && npm run build:compile", @@ -33,9 +33,9 @@ }, "devDependencies": { "@types/mocha": "^10.0.0", + "c8": "^9.1.0", "env-cmd": "^10.1.0", "mocha": "^10.0.0", - "nyc": "^15.1.0", "prettier": "^3.0.3" } } From b5d33b904cab46a3d69e9dc97becd10190212263 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 28 Feb 2024 12:53:10 +0000 Subject: [PATCH 04/79] Reenable measurement of covered lines --- .../src/device-reservation/package-lock.json | 1223 +++-------------- .../src/device-reservation/package.json | 4 +- 2 files changed, 159 insertions(+), 1068 deletions(-) diff --git a/services/booking/src/device-reservation/package-lock.json b/services/booking/src/device-reservation/package-lock.json index 53bd05c0..c3641bce 100644 --- a/services/booking/src/device-reservation/package-lock.json +++ b/services/booking/src/device-reservation/package-lock.json @@ -20,9 +20,9 @@ }, "devDependencies": { "@types/mocha": "^10.0.0", + "c8": "^9.1.0", "mocha": "^10.0.0", "mocha-suppress-logs": "^0.3.1", - "nyc": "^15.1.0", "prettier": "^3.0.3" } }, @@ -30,6 +30,9 @@ "name": "@crosslab/booking-service-common", "version": "0.0.1", "license": "Apache-2.0", + "dependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0" + }, "devDependencies": { "@types/node": "^20.5.9", "prettier": "^3.0.3", @@ -65,18 +68,6 @@ "node": ">=0.8" } }, - "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.22.5", "license": "MIT", @@ -87,88 +78,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/compat-data": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.9", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, "node_modules/@babel/helper-environment-visitor": { "version": "7.22.5", "license": "MIT", @@ -197,46 +106,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-split-export-declaration": { "version": "7.22.6", "license": "MIT", @@ -261,27 +130,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.22.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/highlight": { "version": "7.22.5", "license": "MIT", @@ -373,26 +221,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse": { - "version": "7.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/types": { "version": "7.22.5", "license": "MIT", @@ -405,93 +233,16 @@ "node": ">=6.9.0" } }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "node_modules/@crosslab/booking-service-common": { "resolved": "../common", "link": true }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "dev": true, @@ -500,19 +251,6 @@ "node": ">=8" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", "dev": true, @@ -521,19 +259,6 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" - }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.18", "dev": true, @@ -630,6 +355,12 @@ "@types/node": "*" } }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, "node_modules/@types/mocha": { "version": "10.0.1", "dev": true, @@ -639,18 +370,6 @@ "version": "20.4.2", "license": "MIT" }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/amqplib": { "version": "0.10.3", "license": "MIT", @@ -706,22 +425,6 @@ "node": ">= 8" } }, - "node_modules/append-transform": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/archy": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/argparse": { "version": "2.0.1", "dev": true, @@ -771,81 +474,103 @@ "dev": true, "license": "ISC" }, - "node_modules/browserslist": { - "version": "4.21.9", + "node_modules/buffer-more-ints": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/c8": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", + "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" }, "bin": { - "browserslist": "cli.js" + "c8": "bin/c8.js" }, "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + "node": ">=14.14.0" } }, - "node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/caching-transform": { - "version": "4.0.0", + "node_modules/c8/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "MIT", "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/camelcase": { - "version": "5.3.1", + "node_modules/c8/node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "dev": true, - "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, "engines": { - "node": ">=6" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/caniuse-lite": { - "version": "1.0.30001516", + "node_modules/c8/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/c8/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/c8/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } }, "node_modules/chalk": { "version": "4.1.2", @@ -899,14 +624,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/cliui": { "version": "7.0.4", "dev": true, @@ -933,21 +650,11 @@ "dev": true, "license": "MIT" }, - "node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/concat-map": { "version": "0.0.1", "dev": true, "license": "MIT" }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, "node_modules/core-util-is": { "version": "1.0.3", "license": "MIT" @@ -984,28 +691,6 @@ } } }, - "node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/default-require-extensions": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/denque": { "version": "2.1.0", "license": "Apache-2.0", @@ -1021,21 +706,11 @@ "node": ">=0.3.1" } }, - "node_modules/electron-to-chromium": { - "version": "1.4.461", - "dev": true, - "license": "ISC" - }, "node_modules/emoji-regex": { "version": "8.0.0", "dev": true, "license": "MIT" }, - "node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, "node_modules/escalade": { "version": "3.1.1", "dev": true, @@ -1055,18 +730,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/fill-range": { "version": "7.0.1", "dev": true, @@ -1078,22 +741,6 @@ "node": ">=8" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, "node_modules/find-up": { "version": "5.0.0", "dev": true, @@ -1117,37 +764,6 @@ "flat": "cli.js" } }, - "node_modules/foreground-child": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/fromentries": { - "version": "1.3.2", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/fs.realpath": { "version": "1.0.0", "dev": true, @@ -1160,14 +776,6 @@ "is-property": "^1.0.2" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "dev": true, @@ -1176,14 +784,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/glob": { "version": "7.2.0", "dev": true, @@ -1241,11 +841,6 @@ "node": ">=4" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, "node_modules/has-flag": { "version": "4.0.0", "dev": true, @@ -1254,21 +849,6 @@ "node": ">=8" } }, - "node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/he": { "version": "1.2.0", "dev": true, @@ -1292,22 +872,6 @@ "node": ">=0.10.0" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/inflight": { "version": "1.0.6", "dev": true, @@ -1379,22 +943,6 @@ "version": "1.0.2", "license": "MIT" }, - "node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "dev": true, @@ -1406,14 +954,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/isarray": { "version": "0.0.1", "license": "MIT" @@ -1431,58 +971,60 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-hook": { - "version": "3.0.0", + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "append-transform": "^2.0.0" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/istanbul-lib-instrument": { - "version": "4.0.3", + "node_modules/istanbul-lib-report/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" + "yallist": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, - "license": "ISC", "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" + "semver": "^7.5.3" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/istanbul-lib-report": { - "version": "3.0.0", + "node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-report/node_modules/supports-color": { @@ -1496,23 +1038,11 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/istanbul-reports": { - "version": "3.1.5", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -1551,17 +1081,6 @@ "node": ">=4" } }, - "node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/locate-path": { "version": "6.0.0", "dev": true, @@ -1581,11 +1100,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, "node_modules/log-symbols": { "version": "4.1.0", "dev": true, @@ -1614,20 +1128,6 @@ "node": ">=16.14" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/minimatch": { "version": "5.0.1", "dev": true, @@ -1738,22 +1238,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/node-preload": { - "version": "0.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-releases": { - "version": "2.0.13", - "dev": true, - "license": "MIT" - }, "node_modules/normalize-path": { "version": "3.0.0", "dev": true, @@ -1762,165 +1246,16 @@ "node": ">=0.10.0" } }, - "node_modules/nyc": { - "version": "15.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", + "node_modules/once": { + "version": "1.4.0", "dev": true, "license": "ISC", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "wrappy": "1" } }, - "node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "dev": true, - "license": "ISC" - }, - "node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", + "node_modules/p-limit": { + "version": "3.1.0", "dev": true, "license": "MIT", "dependencies": { @@ -1947,39 +1282,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-map": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/path-exists": { "version": "4.0.0", "dev": true, @@ -2004,11 +1306,6 @@ "node": ">=8" } }, - "node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/picomatch": { "version": "2.3.1", "dev": true, @@ -2020,65 +1317,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/prettier": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", @@ -2093,17 +1331,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/process-on-spawn": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/querystringify": { "version": "2.2.0", "license": "MIT" @@ -2137,17 +1364,6 @@ "node": ">=8.10.0" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/require-directory": { "version": "2.1.1", "dev": true, @@ -2156,37 +1372,10 @@ "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/requires-port": { "version": "1.0.0", "license": "MIT" }, - "node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/safe-buffer": { "version": "5.1.2", "license": "MIT" @@ -2195,14 +1384,6 @@ "version": "2.1.2", "license": "MIT" }, - "node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/seq-queue": { "version": "0.0.5" }, @@ -2214,11 +1395,6 @@ "randombytes": "^2.1.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/shebang-command": { "version": "2.0.0", "dev": true, @@ -2238,40 +1414,6 @@ "node": ">=8" } }, - "node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawn-wrap": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/sqlstring": { "version": "2.3.3", "license": "MIT", @@ -2307,14 +1449,6 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "dev": true, @@ -2395,22 +1529,6 @@ "version": "2.6.0", "license": "0BSD" }, - "node_modules/type-fest": { - "version": "0.8.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", @@ -2423,35 +1541,6 @@ "node": ">=14.17" } }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, "node_modules/url-parse": { "version": "1.5.10", "license": "MIT", @@ -2460,14 +1549,26 @@ "requires-port": "^1.0.0" } }, - "node_modules/uuid": { - "version": "8.3.2", + "node_modules/v8-to-istanbul": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" } }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/which": { "version": "2.0.2", "dev": true, @@ -2482,11 +1583,6 @@ "node": ">= 8" } }, - "node_modules/which-module": { - "version": "2.0.1", - "dev": true, - "license": "ISC" - }, "node_modules/workerpool": { "version": "6.2.1", "dev": true, @@ -2513,17 +1609,6 @@ "dev": true, "license": "ISC" }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "node_modules/y18n": { "version": "5.0.8", "dev": true, @@ -2532,6 +1617,12 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/yargs": { "version": "16.2.0", "dev": true, diff --git a/services/booking/src/device-reservation/package.json b/services/booking/src/device-reservation/package.json index dd1beb90..3343b3ec 100644 --- a/services/booking/src/device-reservation/package.json +++ b/services/booking/src/device-reservation/package.json @@ -4,7 +4,7 @@ "description": "Part of booking service. Responsible for low level device reservation.", "main": "app/index.js", "scripts": { - "test": "npm run build && npx nyc --include=\"app/mainLoop.js\" --include=\"app/messageDefinition.js\" mocha --require mocha-suppress-logs --exit app/*_test.js", + "test": "npm run build && npx c8 --include=\"app/mainLoop.js\" --include=\"app/messageDefinition.js\" mocha --require mocha-suppress-logs --exit app/*_test.js", "build": "npx tsc", "start": "npm run build && node app/index.js", "format": "prettier . --write", @@ -24,9 +24,9 @@ }, "devDependencies": { "@types/mocha": "^10.0.0", + "c8": "^9.1.0", "mocha": "^10.0.0", "mocha-suppress-logs": "^0.3.1", - "nyc": "^15.1.0", "prettier": "^3.0.3" } } From 9613a669cdf998f167603db1c75299e2f18c1f05 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 28 Feb 2024 13:34:21 +0000 Subject: [PATCH 05/79] booking-backend buildable --- .../src/booking-backend/package-lock.json | 3236 +++-------------- .../booking/src/booking-backend/package.json | 2 +- .../booking/src/booking-backend/src/index.ts | 31 +- .../src/booking-backend/src/internal.ts | 4 +- .../{operations.ts => operations/index.ts} | 15 +- 5 files changed, 456 insertions(+), 2832 deletions(-) rename services/booking/src/booking-backend/src/{operations.ts => operations/index.ts} (95%) diff --git a/services/booking/src/booking-backend/package-lock.json b/services/booking/src/booking-backend/package-lock.json index dc82d76b..6ac671bf 100644 --- a/services/booking/src/booking-backend/package-lock.json +++ b/services/booking/src/booking-backend/package-lock.json @@ -31,9 +31,9 @@ "devDependencies": { "@types/mocha": "^10.0.0", "async-mutex": "^0.4.0", + "c8": "^9.1.0", "env-cmd": "^10.1.0", "mocha": "^10.0.0", - "nyc": "^15.1.0", "prettier": "^3.0.3", "why-is-node-running": "^2.2.2" } @@ -48,7 +48,7 @@ "devDependencies": { "@cross-lab-project/codegen-typescript-addon": "file:../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../helper/openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.0.0", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/node": "^20.5.9", "@typescript-eslint/eslint-plugin": "^6.6.0", "@typescript-eslint/parser": "^6.6.0", @@ -9542,6 +9542,7 @@ "dependencies": { "express": "^4.18.1", "express-winston": "^4.2.0", + "fetch-retry": "^5.0.6", "jose": "^4.14.6", "mysql": "^2.18.1", "sqlite3": "^5.1.6", @@ -14269,6 +14270,9 @@ "name": "@crosslab/booking-service-common", "version": "0.0.1", "license": "Apache-2.0", + "dependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0" + }, "devDependencies": { "@types/node": "^20.5.9", "prettier": "^3.0.3", @@ -14308,9 +14312,9 @@ }, "devDependencies": { "@types/mocha": "^10.0.0", + "c8": "^9.1.0", "mocha": "^10.0.0", "mocha-suppress-logs": "^0.3.1", - "nyc": "^15.1.0", "prettier": "^3.0.3" } }, @@ -14326,976 +14330,288 @@ "node": ">=0.8" } }, - "../device-reservation/node_modules/@ampproject/remapping": { - "version": "2.2.1", - "dev": true, - "license": "Apache-2.0", + "../device-reservation/node_modules/@crosslab/booking-service-common": { + "resolved": "../common", + "link": true + }, + "../device-reservation/node_modules/@types/amqplib": { + "version": "0.10.1", + "license": "MIT", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" + "@types/node": "*" } }, - "../device-reservation/node_modules/@babel/code-frame": { - "version": "7.22.5", + "../device-reservation/node_modules/@types/mocha": { + "version": "10.0.1", "dev": true, + "license": "MIT" + }, + "../device-reservation/node_modules/@types/node": { + "version": "20.4.2", + "license": "MIT" + }, + "../device-reservation/node_modules/amqplib": { + "version": "0.10.3", "license": "MIT", "dependencies": { - "@babel/highlight": "^7.22.5" + "@acuminous/bitsyntax": "^0.1.2", + "buffer-more-ints": "~1.0.0", + "readable-stream": "1.x >=1.1.9", + "url-parse": "~1.5.10" }, "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "../device-reservation/node_modules/@babel/compat-data": { - "version": "7.22.9", + "../device-reservation/node_modules/ansi-colors": { + "version": "4.1.1", "dev": true, "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">=6" } }, - "../device-reservation/node_modules/@babel/core": { - "version": "7.22.9", + "../device-reservation/node_modules/ansi-regex": { + "version": "5.0.1", "dev": true, "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.9", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.1" - }, "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" + "node": ">=8" } }, - "../device-reservation/node_modules/@babel/generator": { - "version": "7.22.9", + "../device-reservation/node_modules/ansi-styles": { + "version": "4.3.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=6.9.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "../device-reservation/node_modules/@babel/helper-compilation-targets": { - "version": "7.22.9", + "../device-reservation/node_modules/anymatch": { + "version": "3.1.3", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": ">= 8" } }, - "../device-reservation/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", + "../device-reservation/node_modules/argparse": { + "version": "2.0.1", "dev": true, - "license": "ISC", + "license": "Python-2.0" + }, + "../device-reservation/node_modules/async-mutex": { + "version": "0.4.0", + "license": "MIT", "dependencies": { - "yallist": "^3.0.2" + "tslib": "^2.4.0" } }, - "../device-reservation/node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", + "../device-reservation/node_modules/balanced-match": { + "version": "1.0.2", "dev": true, - "license": "ISC" + "license": "MIT" }, - "../device-reservation/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", + "../device-reservation/node_modules/binary-extensions": { + "version": "2.2.0", "dev": true, "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">=8" } }, - "../device-reservation/node_modules/@babel/helper-function-name": { - "version": "7.22.5", + "../device-reservation/node_modules/brace-expansion": { + "version": "2.0.1", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "balanced-match": "^1.0.0" + } + }, + "../device-reservation/node_modules/braces": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" }, "engines": { - "node": ">=6.9.0" + "node": ">=8" } }, - "../device-reservation/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", + "../device-reservation/node_modules/browser-stdout": { + "version": "1.3.1", + "dev": true, + "license": "ISC" + }, + "../device-reservation/node_modules/buffer-more-ints": { + "version": "1.0.0", + "license": "MIT" + }, + "../device-reservation/node_modules/chalk": { + "version": "4.1.2", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "../device-reservation/node_modules/@babel/helper-module-imports": { - "version": "7.22.5", + "../device-reservation/node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=8" } }, - "../device-reservation/node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", + "../device-reservation/node_modules/chokidar": { + "version": "3.5.3", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">=6.9.0" + "node": ">= 8.10.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "../device-reservation/node_modules/@babel/helper-simple-access": { - "version": "7.22.5", + "../device-reservation/node_modules/cliui": { + "version": "7.0.4", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "../device-reservation/node_modules/color-convert": { + "version": "2.0.1", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6.9.0" + "node": ">=7.0.0" } }, - "../device-reservation/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", + "../device-reservation/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "../device-reservation/node_modules/concat-map": { + "version": "0.0.1", "dev": true, + "license": "MIT" + }, + "../device-reservation/node_modules/core-util-is": { + "version": "1.0.3", + "license": "MIT" + }, + "../device-reservation/node_modules/dayjs": { + "version": "1.11.9", + "license": "MIT" + }, + "../device-reservation/node_modules/debug": { + "version": "4.3.4", "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "ms": "2.1.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "../device-reservation/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "dev": true, - "license": "MIT", + "../device-reservation/node_modules/denque": { + "version": "2.1.0", + "license": "Apache-2.0", "engines": { - "node": ">=6.9.0" + "node": ">=0.10" } }, - "../device-reservation/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", + "../device-reservation/node_modules/diff": { + "version": "5.0.0", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", "engines": { - "node": ">=6.9.0" + "node": ">=0.3.1" } }, - "../device-reservation/node_modules/@babel/helper-validator-option": { - "version": "7.22.5", + "../device-reservation/node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "../device-reservation/node_modules/escalade": { + "version": "3.1.1", "dev": true, "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">=6" } }, - "../device-reservation/node_modules/@babel/helpers": { - "version": "7.22.6", + "../device-reservation/node_modules/escape-string-regexp": { + "version": "4.0.0", "dev": true, "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" - }, "engines": { - "node": ">=6.9.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/@babel/highlight": { - "version": "7.22.5", + "../device-reservation/node_modules/fill-range": { + "version": "7.0.1", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "to-regex-range": "^5.0.1" }, "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/parser": { - "version": "7.22.7", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@babel/template": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/traverse": { - "version": "7.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/types": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "../device-reservation/node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../device-reservation/node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" - }, - "../device-reservation/node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "@acuminous/bitsyntax": "^0.1.2", - "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", - "url-parse": "~1.5.10" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../device-reservation/node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/append-transform": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/archy": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../device-reservation/node_modules/async-mutex": { - "version": "0.4.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "../device-reservation/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/binary-extensions": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../device-reservation/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/browser-stdout": { - "version": "1.3.1", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/browserslist": { - "version": "4.21.9", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../device-reservation/node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" - }, - "../device-reservation/node_modules/caching-transform": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/caniuse-lite": { - "version": "1.0.30001516", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "../device-reservation/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../device-reservation/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../device-reservation/node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../device-reservation/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../device-reservation/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../device-reservation/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" - }, - "../device-reservation/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../device-reservation/node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/default-require-extensions": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, - "../device-reservation/node_modules/diff": { - "version": "5.0.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../device-reservation/node_modules/electron-to-chromium": { - "version": "1.4.461", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + "node": ">=8" } }, "../device-reservation/node_modules/find-up": { @@ -15321,37 +14637,6 @@ "flat": "cli.js" } }, - "../device-reservation/node_modules/foreground-child": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../device-reservation/node_modules/fromentries": { - "version": "1.3.2", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "../device-reservation/node_modules/fs.realpath": { "version": "1.0.0", "dev": true, @@ -15364,14 +14649,6 @@ "is-property": "^1.0.2" } }, - "../device-reservation/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "../device-reservation/node_modules/get-caller-file": { "version": "2.0.5", "dev": true, @@ -15380,14 +14657,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "../device-reservation/node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, "../device-reservation/node_modules/glob": { "version": "7.2.0", "dev": true, @@ -15438,19 +14707,6 @@ "node": "*" } }, - "../device-reservation/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, "../device-reservation/node_modules/has-flag": { "version": "4.0.0", "dev": true, @@ -15459,21 +14715,6 @@ "node": ">=8" } }, - "../device-reservation/node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "../device-reservation/node_modules/he": { "version": "1.2.0", "dev": true, @@ -15482,11 +14723,6 @@ "he": "bin/he" } }, - "../device-reservation/node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, "../device-reservation/node_modules/iconv-lite": { "version": "0.6.3", "license": "MIT", @@ -15497,22 +14733,6 @@ "node": ">=0.10.0" } }, - "../device-reservation/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../device-reservation/node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "../device-reservation/node_modules/inflight": { "version": "1.0.6", "dev": true, @@ -15584,151 +14804,19 @@ "version": "1.0.2", "license": "MIT" }, - "../device-reservation/node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "../device-reservation/node_modules/is-unicode-supported": { "version": "0.1.0", "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "../device-reservation/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-report": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, + "license": "MIT", "engines": { "node": ">=10" - } - }, - "../device-reservation/node_modules/istanbul-reports": { - "version": "3.1.5", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, + "../device-reservation/node_modules/isarray": { + "version": "0.0.1", "license": "MIT" }, "../device-reservation/node_modules/js-yaml": { @@ -15742,28 +14830,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "../device-reservation/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "../device-reservation/node_modules/locate-path": { "version": "6.0.0", "dev": true, @@ -15778,11 +14844,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, "../device-reservation/node_modules/log-symbols": { "version": "4.1.0", "dev": true, @@ -15812,20 +14873,6 @@ "node": ">=10" } }, - "../device-reservation/node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "../device-reservation/node_modules/minimatch": { "version": "5.0.1", "dev": true, @@ -15921,370 +14968,89 @@ "version": "7.18.3", "license": "ISC", "engines": { - "node": ">=12" - } - }, - "../device-reservation/node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../device-reservation/node_modules/node-preload": { - "version": "0.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/node-releases": { - "version": "2.0.13", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/nyc": { - "version": "15.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "../device-reservation/node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "../device-reservation/node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../device-reservation/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/p-map": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "node": ">=12" } }, - "../device-reservation/node_modules/path-key": { - "version": "3.1.1", + "../device-reservation/node_modules/nanoid": { + "version": "3.3.3", "dev": true, "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, "engines": { - "node": ">=8" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "../device-reservation/node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/picomatch": { - "version": "2.3.1", + "../device-reservation/node_modules/normalize-path": { + "version": "3.0.0", "dev": true, "license": "MIT", "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "node": ">=0.10.0" } }, - "../device-reservation/node_modules/pkg-dir": { - "version": "4.2.0", + "../device-reservation/node_modules/once": { + "version": "1.4.0", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" + "wrappy": "1" } }, - "../device-reservation/node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", + "../device-reservation/node_modules/p-limit": { + "version": "3.1.0", "dev": true, "license": "MIT", "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/pkg-dir/node_modules/locate-path": { + "../device-reservation/node_modules/p-locate": { "version": "5.0.0", "dev": true, "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", + "../device-reservation/node_modules/path-exists": { + "version": "4.0.0", "dev": true, "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "../device-reservation/node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", + "../device-reservation/node_modules/path-is-absolute": { + "version": "1.0.1", "dev": true, "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "../device-reservation/node_modules/process-on-spawn": { - "version": "1.0.0", + "../device-reservation/node_modules/picomatch": { + "version": "2.3.1", "dev": true, "license": "MIT", - "dependencies": { - "fromentries": "^1.2.0" - }, "engines": { - "node": ">=8" + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, "../device-reservation/node_modules/querystringify": { @@ -16320,17 +15086,6 @@ "node": ">=8.10.0" } }, - "../device-reservation/node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "../device-reservation/node_modules/require-directory": { "version": "2.1.1", "dev": true, @@ -16339,37 +15094,10 @@ "node": ">=0.10.0" } }, - "../device-reservation/node_modules/require-main-filename": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, "../device-reservation/node_modules/requires-port": { "version": "1.0.0", "license": "MIT" }, - "../device-reservation/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "../device-reservation/node_modules/safe-buffer": { "version": "5.1.2", "license": "MIT" @@ -16378,14 +15106,6 @@ "version": "2.1.2", "license": "MIT" }, - "../device-reservation/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "../device-reservation/node_modules/seq-queue": { "version": "0.0.5" }, @@ -16397,64 +15117,6 @@ "randombytes": "^2.1.0" } }, - "../device-reservation/node_modules/set-blocking": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/spawn-wrap": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, "../device-reservation/node_modules/sqlstring": { "version": "2.3.3", "license": "MIT", @@ -16490,14 +15152,6 @@ "node": ">=8" } }, - "../device-reservation/node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "../device-reservation/node_modules/strip-json-comments": { "version": "3.1.1", "dev": true, @@ -16523,116 +15177,30 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "../device-reservation/node_modules/test-exclude": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../device-reservation/node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../device-reservation/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "../device-reservation/node_modules/to-regex-range": { "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../device-reservation/node_modules/tslib": { - "version": "2.6.0", - "license": "0BSD" - }, - "../device-reservation/node_modules/type-fest": { - "version": "0.8.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "../device-reservation/node_modules/typescript": { - "version": "4.9.5", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../device-reservation/node_modules/update-browserslist-db": { - "version": "1.0.11", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], + "dev": true, "license": "MIT", "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "is-number": "^7.0.0" }, + "engines": { + "node": ">=8.0" + } + }, + "../device-reservation/node_modules/tslib": { + "version": "2.6.0", + "license": "0BSD" + }, + "../device-reservation/node_modules/typescript": { + "version": "4.9.5", + "license": "Apache-2.0", "bin": { - "update-browserslist-db": "cli.js" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, - "peerDependencies": { - "browserslist": ">= 4.21.0" + "engines": { + "node": ">=4.2.0" } }, "../device-reservation/node_modules/url-parse": { @@ -16643,33 +15211,6 @@ "requires-port": "^1.0.0" } }, - "../device-reservation/node_modules/uuid": { - "version": "8.3.2", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../device-reservation/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/which-module": { - "version": "2.0.1", - "dev": true, - "license": "ISC" - }, "../device-reservation/node_modules/workerpool": { "version": "6.2.1", "dev": true, @@ -16696,17 +15237,6 @@ "dev": true, "license": "ISC" }, - "../device-reservation/node_modules/write-file-atomic": { - "version": "3.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "../device-reservation/node_modules/y18n": { "version": "5.0.8", "dev": true, @@ -16798,6 +15328,7 @@ "dependencies": { "@crosslab/booking-service-common": "file:../common", "@crosslab/service-device-reservation": "file:../device-reservation", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "@types/express": "^4.17.13", "amqplib": "^0.10.3", @@ -16807,6 +15338,7 @@ "typescript": "^5.2.2" }, "devDependencies": { + "node-mocks-http": "^1.14.1", "prettier": "^3.0.3" } }, @@ -17685,18 +16217,6 @@ "node": ">=0.8" } }, - "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.22.5", "license": "MIT", @@ -17707,88 +16227,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/compat-data": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.9", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, "node_modules/@babel/helper-environment-visitor": { "version": "7.22.5", "license": "MIT", @@ -17817,46 +16255,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-split-export-declaration": { "version": "7.22.6", "license": "MIT", @@ -17881,27 +16279,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.22.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/highlight": { "version": "7.22.5", "license": "MIT", @@ -17993,26 +16370,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse": { - "version": "7.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/types": { "version": "7.22.5", "license": "MIT", @@ -18025,6 +16382,12 @@ "node": ">=6.9.0" } }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "node_modules/@cross-lab-project/api-client": { "resolved": "../../../../clients/api/js", "link": true @@ -18053,108 +16416,12 @@ "resolved": "../device-reservation", "link": true }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", "dev": true, "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, "engines": { - "node": ">=6.0.0" + "node": ">=8" } }, "node_modules/@jridgewell/resolve-uri": { @@ -18165,19 +16432,6 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" - }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.18", "dev": true, @@ -18313,6 +16567,12 @@ "version": "2.0.1", "license": "MIT" }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, "node_modules/@types/lodash": { "version": "4.14.198", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.198.tgz", @@ -18367,18 +16627,6 @@ "node": ">= 0.6" } }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ajv": { "version": "8.12.0", "license": "MIT", @@ -18463,22 +16711,6 @@ "node": ">= 8" } }, - "node_modules/append-transform": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/archy": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/argparse": { "version": "2.0.1", "dev": true, @@ -18566,60 +16798,109 @@ "dev": true, "license": "ISC" }, - "node_modules/browserslist": { - "version": "4.21.9", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], + "node_modules/buffer-more-ints": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/bytes": { + "version": "3.1.2", "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/c8": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", + "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "dev": true, "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" }, "bin": { - "browserslist": "cli.js" + "c8": "bin/c8.js" }, "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + "node": ">=14.14.0" } }, - "node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" + "node_modules/c8/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } }, - "node_modules/bytes": { - "version": "3.1.2", - "license": "MIT", + "node_modules/c8/node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, "engines": { - "node": ">= 0.8" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/caching-transform": { - "version": "4.0.0", + "node_modules/c8/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/c8/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "license": "MIT", "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=8" + "node": ">=12" + } + }, + "node_modules/c8/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" } }, "node_modules/call-bind": { @@ -18633,33 +16914,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001516", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, "node_modules/chalk": { "version": "4.1.2", "dev": true, @@ -18712,14 +16966,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/cliui": { "version": "7.0.4", "dev": true, @@ -18754,11 +17000,6 @@ "node": ">= 6" } }, - "node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/concat-map": { "version": "0.0.1", "dev": true, @@ -18799,11 +17040,6 @@ "node": ">= 0.6" } }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, "node_modules/cookie": { "version": "0.5.0", "license": "MIT", @@ -18851,28 +17087,6 @@ } } }, - "node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/default-require-extensions": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/denque": { "version": "2.1.0", "license": "Apache-2.0", @@ -18907,11 +17121,6 @@ "version": "1.1.1", "license": "MIT" }, - "node_modules/electron-to-chromium": { - "version": "1.4.461", - "dev": true, - "license": "ISC" - }, "node_modules/emoji-regex": { "version": "8.0.0", "dev": true, @@ -18939,11 +17148,6 @@ "node": ">=8.0.0" } }, - "node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, "node_modules/escalade": { "version": "3.1.1", "dev": true, @@ -18967,18 +17171,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/etag": { "version": "1.8.1", "license": "MIT", @@ -19097,22 +17289,6 @@ "version": "2.0.0", "license": "MIT" }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, "node_modules/find-up": { "version": "5.0.0", "dev": true, @@ -19136,50 +17312,19 @@ "flat": "cli.js" } }, - "node_modules/foreground-child": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/forwarded": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fromentries": { - "version": "1.3.2", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" + "version": "0.2.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } }, "node_modules/fs.realpath": { "version": "1.0.0", @@ -19197,14 +17342,6 @@ "is-property": "^1.0.2" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "dev": true, @@ -19226,14 +17363,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/glob": { "version": "7.2.0", "dev": true, @@ -19291,11 +17420,6 @@ "node": ">=4" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, "node_modules/has": { "version": "1.0.3", "license": "MIT", @@ -19334,21 +17458,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/he": { "version": "1.2.0", "dev": true, @@ -19386,22 +17495,6 @@ "node": ">=0.10.0" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/inflight": { "version": "1.0.6", "dev": true, @@ -19480,22 +17573,6 @@ "version": "1.0.2", "license": "MIT" }, - "node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "dev": true, @@ -19507,14 +17584,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/isarray": { "version": "0.0.1", "license": "MIT" @@ -19532,58 +17601,60 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-hook": { - "version": "3.0.0", + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "append-transform": "^2.0.0" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/istanbul-lib-instrument": { - "version": "4.0.3", + "node_modules/istanbul-lib-report/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" + "yallist": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, - "license": "ISC", "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" + "semver": "^7.5.3" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/istanbul-lib-report": { - "version": "3.0.0", + "node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-report/node_modules/supports-color": { @@ -19597,23 +17668,11 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/istanbul-reports": { - "version": "3.1.5", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -19656,17 +17715,6 @@ "version": "1.0.0", "license": "MIT" }, - "node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/locate-path": { "version": "6.0.0", "dev": true, @@ -19685,11 +17733,6 @@ "version": "4.17.21", "license": "MIT" }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, "node_modules/log-symbols": { "version": "4.1.0", "dev": true, @@ -19718,20 +17761,6 @@ "node": ">=16.14" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/media-typer": { "version": "0.3.0", "license": "MIT", @@ -19878,198 +17907,33 @@ "version": "7.18.3", "license": "ISC", "engines": { - "node": ">=12" - } - }, - "node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/node-preload": { - "version": "0.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-releases": { - "version": "2.0.13", - "dev": true, - "license": "MIT" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nyc": { - "version": "15.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", + "node_modules/nanoid": { + "version": "3.3.3", "dev": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "bin": { + "nanoid": "bin/nanoid.cjs" }, "engines": { - "node": ">=8" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "dev": true, - "license": "ISC" - }, - "node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "dev": true, + "node_modules/negotiator": { + "version": "0.6.3", "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, "engines": { - "node": ">=8" + "node": ">= 0.6" } }, - "node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", + "node_modules/normalize-path": { + "version": "3.0.0", "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, + "license": "MIT", "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, "node_modules/object-inspect": { @@ -20125,39 +17989,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-map": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/parseurl": { "version": "1.3.3", "license": "MIT", @@ -20193,11 +18024,6 @@ "version": "0.1.7", "license": "MIT" }, - "node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/picomatch": { "version": "2.3.1", "dev": true, @@ -20209,65 +18035,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/prettier": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", @@ -20282,17 +18049,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/process-on-spawn": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/proxy-addr": { "version": "2.0.7", "license": "MIT", @@ -20377,17 +18133,6 @@ "node": ">=8.10.0" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/require-directory": { "version": "2.1.1", "dev": true, @@ -20403,37 +18148,10 @@ "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/requires-port": { "version": "1.0.0", "license": "MIT" }, - "node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/safe-buffer": { "version": "5.1.2", "license": "MIT" @@ -20442,14 +18160,6 @@ "version": "2.1.2", "license": "MIT" }, - "node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/send": { "version": "0.18.0", "license": "MIT", @@ -20511,11 +18221,6 @@ "node": ">= 0.8.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/setprototypeof": { "version": "1.2.0", "license": "ISC" @@ -20556,40 +18261,6 @@ "dev": true, "license": "ISC" }, - "node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawn-wrap": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/sqlstring": { "version": "2.3.3", "license": "MIT", @@ -20637,14 +18308,6 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "dev": true, @@ -20733,14 +18396,6 @@ "dev": true, "license": "0BSD" }, - "node_modules/type-fest": { - "version": "0.8.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, "node_modules/type-is": { "version": "1.6.18", "license": "MIT", @@ -20752,14 +18407,6 @@ "node": ">= 0.6" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", @@ -20779,35 +18426,6 @@ "node": ">= 0.8" } }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, "node_modules/uri-js": { "version": "4.4.1", "license": "BSD-2-Clause", @@ -20830,14 +18448,26 @@ "node": ">= 0.4.0" } }, - "node_modules/uuid": { - "version": "8.3.2", + "node_modules/v8-to-istanbul": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" } }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/vary": { "version": "1.1.2", "license": "MIT", @@ -20859,11 +18489,6 @@ "node": ">= 8" } }, - "node_modules/which-module": { - "version": "2.0.1", - "dev": true, - "license": "ISC" - }, "node_modules/why-is-node-running": { "version": "2.2.2", "dev": true, @@ -20905,17 +18530,6 @@ "dev": true, "license": "ISC" }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "node_modules/y18n": { "version": "5.0.8", "dev": true, @@ -20924,6 +18538,12 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/yargs": { "version": "16.2.0", "dev": true, diff --git a/services/booking/src/booking-backend/package.json b/services/booking/src/booking-backend/package.json index ef88aede..5a9775fc 100644 --- a/services/booking/src/booking-backend/package.json +++ b/services/booking/src/booking-backend/package.json @@ -37,9 +37,9 @@ "devDependencies": { "@types/mocha": "^10.0.0", "async-mutex": "^0.4.0", + "c8": "^9.1.0", "env-cmd": "^10.1.0", "mocha": "^10.0.0", - "nyc": "^15.1.0", "prettier": "^3.0.3", "why-is-node-running": "^2.2.2" } diff --git a/services/booking/src/booking-backend/src/index.ts b/services/booking/src/booking-backend/src/index.ts index 1009d0c6..b2c827f7 100644 --- a/services/booking/src/booking-backend/src/index.ts +++ b/services/booking/src/booking-backend/src/index.ts @@ -1,24 +1,31 @@ -import { - JWTVerify, - parseJwtFromRequestAuthenticationHeader, -} from '@cross-lab-project/service-common'; +import { authorization, error, logging } from '@cross-lab-project/service-common'; +import express from 'express'; + import { handleDeviceReservationRequest, handleFreeDeviceRequest } from './amqpHandle'; import { config } from './config'; import { app } from './generated'; -import { isUserTypeJWT } from './generated/types'; export * from './messageDefinition'; if (require.main === module) { app.initService({ - security: { - JWT: JWTVerify( - { JWKS_URL: '', SECURITY_AUDIENCE: '', SECURITY_ISSUER: '' }, - isUserTypeJWT, - parseJwtFromRequestAuthenticationHeader, - ), - }, + preHandlers: [ + application => { + application.use(express.json()); + application.use(express.urlencoded({ extended: false })); + application.use(logging.middleware()); + application.use(authorization.middleware()); + }, + ], + postHandlers: [ + application => { + application.get('/federation/status', (_req, res) => { + res.send({ status: 'ok' }); + }); + }, + ], + errorHandler: error.middleware, }); console.log('Starting booking-backend'); diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 24be1ef0..a671a83d 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -63,7 +63,7 @@ export async function handleCallback(type: callbackType, targetBooking: bigint, throw Error("Booking must be local for device update"); } - let device = await api.getDevice(rows[0].bookeddevice, {execute_for: bookingRow[0].user}); + let device = await api.getDevice(rows[0].bookeddevice); // TODO: execute_for if (device.type == "group") { throw Error("Booked device " + rows[0].bookeddevice + " is group"); } @@ -89,7 +89,7 @@ export async function handleCallback(type: callbackType, targetBooking: bigint, throw Error("Booking must be remote for device update"); } - let getReturn = await api.getBooking(rows[0].remotereference, {execute_for: bookingRow[0].user}); + let getReturn = await api.getBooking(rows[0].remotereference); // TODO: execute_for if (getReturn.Booking.Status == "cancelled" || getReturn.Booking.Status == "rejected") { available = false; } diff --git a/services/booking/src/booking-backend/src/operations.ts b/services/booking/src/booking-backend/src/operations/index.ts similarity index 95% rename from services/booking/src/booking-backend/src/operations.ts rename to services/booking/src/booking-backend/src/operations/index.ts index c01c354f..63370ca4 100644 --- a/services/booking/src/booking-backend/src/operations.ts +++ b/services/booking/src/booking-backend/src/operations/index.ts @@ -1,17 +1,16 @@ import * as mysql from 'mysql2/promise'; -import { config } from './config'; +import { config } from '../config'; import { deleteBookingByIDLockSignature, postBookingCallbackByIDSignature, putBookingByIDLock200ResponseType, putBookingByIDLockSignature, -} from './generated/signatures'; -import { dispatchCallback, handleCallback } from './internal'; +} from '../generated/signatures'; +import { dispatchCallback, handleCallback } from '../internal'; -export const putBookingByIDLock: putBookingByIDLockSignature = async ( +export const putBookingByIDLock: putBookingByIDLockSignature = async (request, parameters, - user, ) => { let bookingID: bigint = BigInt(parameters.ID); @@ -97,9 +96,8 @@ export const putBookingByIDLock: putBookingByIDLockSignature = async ( } }; -export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async ( +export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async (request, parameters, - user, ) => { let bookingID: bigint = BigInt(parameters.ID); @@ -155,9 +153,8 @@ export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async ( } }; -export const postBookingCallbackByID: postBookingCallbackByIDSignature = async ( +export const postBookingCallbackByID: postBookingCallbackByIDSignature = async (request, parameters, - user, ) => { let db = await mysql.createConnection(config.BookingDSN); await db.connect(); From 753e4d5ad169033bbb67a1a18c940384475e2ae3 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 28 Feb 2024 14:56:12 +0000 Subject: [PATCH 06/79] booking-frontend buildable --- .../booking/src/booking-frontend/src/index.ts | 34 ++++++++++--------- .../{operations.ts => operations/index.ts} | 34 ++++++++----------- .../src/test_common/src/fakerequest.ts | 15 +++++++- 3 files changed, 46 insertions(+), 37 deletions(-) rename services/booking/src/booking-frontend/src/{operations.ts => operations/index.ts} (93%) diff --git a/services/booking/src/booking-frontend/src/index.ts b/services/booking/src/booking-frontend/src/index.ts index 576d5c79..f37e0513 100644 --- a/services/booking/src/booking-frontend/src/index.ts +++ b/services/booking/src/booking-frontend/src/index.ts @@ -1,25 +1,27 @@ -import { - JWTVerify, - parseJwtFromRequestAuthenticationHeader, -} from '@cross-lab-project/service-common'; +import { authorization, error, logging } from '@cross-lab-project/service-common'; +import express from 'express'; import { config } from './config'; import { app } from './generated'; -import { isUserTypeJWT } from './generated/types'; if (require.main === module) { app.initService({ - security: { - JWT: JWTVerify( - { - JWKS_URL: config.JWKS_URL, - SECURITY_AUDIENCE: config.SECURITY_AUDIENCE, - SECURITY_ISSUER: config.SECURITY_ISSUER, - }, - isUserTypeJWT, - parseJwtFromRequestAuthenticationHeader, - ), - }, + preHandlers: [ + application => { + application.use(express.json()); + application.use(express.urlencoded({ extended: false })); + application.use(logging.middleware()); + application.use(authorization.middleware()); + }, + ], + postHandlers: [ + application => { + application.get('/federation/status', (_req, res) => { + res.send({ status: 'ok' }); + }); + }, + ], + errorHandler: error.middleware, }); console.log('Starting booking-frontend'); diff --git a/services/booking/src/booking-frontend/src/operations.ts b/services/booking/src/booking-frontend/src/operations/index.ts similarity index 93% rename from services/booking/src/booking-frontend/src/operations.ts rename to services/booking/src/booking-frontend/src/operations/index.ts index fad4fbde..586886a5 100644 --- a/services/booking/src/booking-frontend/src/operations.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -3,7 +3,7 @@ import { Timeslot, Booking, Device -} from "./generated/types" +} from "../generated/types" import { postBookingSignature, getBookingByIDSignature, @@ -12,7 +12,7 @@ import { deleteBookingByIDDestroySignature, postBookingRequestBodyType, getBookingByID200ResponseType -} from "./generated/signatures" +} from "../generated/signatures" import * as mysql from 'mysql2/promise'; import * as amqplib from 'amqplib'; @@ -20,15 +20,9 @@ import dayjs from "dayjs"; import { BelongsToUs } from "@crosslab/booking-service-common" import { DeviceBookingRequest } from "@crosslab/service-booking-backend"; -import { config } from "./config" - -export const postBooking: postBookingSignature = async (body, user) => { - if (user.JWT === undefined) { - return { - status: 401, - } - } +import { config } from "../config" +export const postBooking: postBookingSignature = async (request, body) => { let connection = await amqplib.connect(config.AmqpUrl); let channel = await connection.createChannel(); @@ -47,7 +41,7 @@ export const postBooking: postBookingSignature = async (body, user) => { try { // Create booking - let [rows, fields]: [any, any] = await db.execute("INSERT INTO booking (`start`, `end`, `type`, `status`, `user`) VALUES (?,?,?,?,?)", [new Date(body.Time.Start), new Date(body.Time.End), body.Time, "pending", user]); + let [rows, fields]: [any, any] = await db.execute("INSERT INTO booking (`start`, `end`, `type`, `status`, `user`) VALUES (?,?,?,?,?)", [new Date(body.Time.Start), new Date(body.Time.End), body.Time, "pending", request.authorization.user]); let bookingID: bigint = BigInt(rows.insertId); for (let i = 0; i < body.Devices.length; i++) { @@ -90,7 +84,7 @@ export const postBooking: postBookingSignature = async (body, user) => { } } -export const getBookingByID: getBookingByIDSignature = async (parameters, user) => { +export const getBookingByID: getBookingByIDSignature = async (request, parameters) => { let db = await mysql.createConnection(config.BookingDSN); await db.connect(); await db.beginTransaction(); @@ -112,7 +106,7 @@ export const getBookingByID: getBookingByIDSignature = async (parameters, user) body.Booking.Time.End = rows[0].end; body.Booking.Type = rows[0].type; body.Booking.Status = rows[0].status; - body.Booking.You = rows[0].user == user; + body.Booking.You = rows[0].user == request.authorization.user; body.Message = rows[0].message; if (body.Booking.Status === "active" || body.Booking.Status === "active-pending" || body.Booking.Status == "active-rejected") { body.Locked = true; @@ -147,7 +141,7 @@ export const getBookingByID: getBookingByIDSignature = async (parameters, user) } } -export const deleteBookingByID: deleteBookingByIDSignature = async (parameters, user) => { +export const deleteBookingByID: deleteBookingByIDSignature = async (request, parameters) => { let requestID: bigint = BigInt(parameters.ID); let success: boolean = false; @@ -186,7 +180,7 @@ export const deleteBookingByID: deleteBookingByIDSignature = async (parameters, break; } - if (user.JWT === undefined || rows[0].user != user.JWT.username) { + if (rows[0].user != request.authorization.user) { return { status: 401, } @@ -235,7 +229,7 @@ export const deleteBookingByID: deleteBookingByIDSignature = async (parameters, } } -export const patchBookingByID: patchBookingByIDSignature = async (parameters, body, user) => { +export const patchBookingByID: patchBookingByIDSignature = async (request, parameters, body) => { let requestID: bigint = BigInt(parameters.ID); let success: boolean = false; @@ -257,7 +251,7 @@ export const patchBookingByID: patchBookingByIDSignature = async (parameters, bo } else if (typeof(body.Devices) !== undefined) { // TODO: Check for scopes 'booking' and 'booking:use' let Devices: Device[] = body.Devices as Device[]; - if (user.JWT === undefined || rows[0].user != user.JWT.username) { + if (request.authorization.user === undefined || rows[0].user != request.authorization.user) { return { status: 401, } @@ -357,10 +351,10 @@ export const patchBookingByID: patchBookingByIDSignature = async (parameters, bo } } -export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async (parameters, user) => { +export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async (request, parameters) => { // add your implementation here - if(user.JWT !== undefined && user.JWT.scopes.includes("booking:destroy") && BelongsToUs(new URL(user.JWT.url))) { - + if(true) { // TODO: Check Permission + // TODO } else { return { status: 401, // TODO: Use 403 diff --git a/services/booking/src/test_common/src/fakerequest.ts b/services/booking/src/test_common/src/fakerequest.ts index 9ae08b70..6634b68d 100644 --- a/services/booking/src/test_common/src/fakerequest.ts +++ b/services/booking/src/test_common/src/fakerequest.ts @@ -1,8 +1,21 @@ import * as nodeMocksHttp from "node-mocks-http" type FakeRequestOptions = { + user: string }; export function getFakeRequest(options?: FakeRequestOptions) { - return nodeMocksHttp.createRequest(); + if(options === undefined) { + options = fakeRequestDefaultConfig(); + } + let request = nodeMocksHttp.createRequest(); + request.authorization = {}; + request.authorization.user = options.user; + return request; +} + +export function fakeRequestDefaultConfig() : FakeRequestOptions { + return{ + user: "testuser", + }; } \ No newline at end of file From 509b87b31152db87f21c55fe056c38d0a673cc2d Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Mon, 22 Apr 2024 07:04:20 +0000 Subject: [PATCH 07/79] Cleanup --- services/booking/src/booking-backend/src/internal.ts | 4 ++-- .../booking/src/booking-frontend/src/operations/index.ts | 3 +-- services/booking/src/common/src/auth.ts | 5 ----- .../booking/src/schedule-service/src/operations/index.ts | 1 - 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index a671a83d..a6de4cf1 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -63,7 +63,7 @@ export async function handleCallback(type: callbackType, targetBooking: bigint, throw Error("Booking must be local for device update"); } - let device = await api.getDevice(rows[0].bookeddevice); // TODO: execute_for + let device = await api.getDevice(rows[0].bookeddevice); if (device.type == "group") { throw Error("Booked device " + rows[0].bookeddevice + " is group"); } @@ -89,7 +89,7 @@ export async function handleCallback(type: callbackType, targetBooking: bigint, throw Error("Booking must be remote for device update"); } - let getReturn = await api.getBooking(rows[0].remotereference); // TODO: execute_for + let getReturn = await api.getBooking(rows[0].remotereference); if (getReturn.Booking.Status == "cancelled" || getReturn.Booking.Status == "rejected") { available = false; } diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index 586886a5..7340d690 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -93,7 +93,6 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter try { let body: getBookingByID200ResponseType["body"] = { Booking: { ID: parameters.ID, Time: { Start: "", End: "" }, Devices: [], Type: "normal", You: false, External: false, Status: "pending", Message: "" }, Locked: false } - // TODO Remove External // Read basic information let [rows, fields]: [any, any] = await db.execute("SELECT `start`, `end`, `type`, `status`, `user`, `message` FROM booking WHERE id=?", [requestID]); @@ -249,7 +248,7 @@ export const patchBookingByID: patchBookingByIDSignature = async (request, param // this is adding a callback await db.execute("INSERT INTO bookingcallbacks (`booking`, `url`) VALUES (?,?)", [requestID, body.Callback]); } else if (typeof(body.Devices) !== undefined) { - // TODO: Check for scopes 'booking' and 'booking:use' + // TODO: auth Check for scopes 'booking' and 'booking:use' let Devices: Device[] = body.Devices as Device[]; if (request.authorization.user === undefined || rows[0].user != request.authorization.user) { return { diff --git a/services/booking/src/common/src/auth.ts b/services/booking/src/common/src/auth.ts index 31bf84d5..3c0b67ea 100644 --- a/services/booking/src/common/src/auth.ts +++ b/services/booking/src/common/src/auth.ts @@ -2,11 +2,6 @@ import { baseConfig } from './config'; let institutePrefixURL: URL[]; -export function CheckAuth(token: string): [URL, boolean] { - throw new Error('TODO'); - return [new URL(''), false]; -} - function convertInstitutionPrefix(): void { if (!institutePrefixURL) { institutePrefixURL = []; diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index 93454465..5bf02f32 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -86,7 +86,6 @@ export const postSchedule: postScheduleSignature = async (request, body) => { if (r.type === 'device') { realDevices[device].push(r.url); } else if (r.type === 'cloud instantiable' || r.type === 'edge instantiable') { - // TODO // For now, just add free time realDevices[device].push(r.url); timetables[device].push([]); From 5774dda5cd40dcd6a7fc4bb7146613cd63d3c393 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Thu, 16 May 2024 12:29:29 +0000 Subject: [PATCH 08/79] Implement deleteBookingByIDDestroy by reusing code Authorization is still missing. Co-authored-by: lassertos --- .../src/booking-frontend/package-lock.json | 5344 ++++------------- .../booking-frontend/src/operations/index.ts | 171 +- 2 files changed, 1316 insertions(+), 4199 deletions(-) diff --git a/services/booking/src/booking-frontend/package-lock.json b/services/booking/src/booking-frontend/package-lock.json index 8fe60de0..7a302f78 100644 --- a/services/booking/src/booking-frontend/package-lock.json +++ b/services/booking/src/booking-frontend/package-lock.json @@ -39,7 +39,7 @@ "devDependencies": { "@cross-lab-project/codegen-typescript-addon": "file:../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../helper/openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.0.0", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/node": "^20.5.9", "@typescript-eslint/eslint-plugin": "^6.6.0", "@typescript-eslint/parser": "^6.6.0", @@ -9531,6 +9531,7 @@ "dependencies": { "express": "^4.18.1", "express-winston": "^4.2.0", + "fetch-retry": "^5.0.6", "jose": "^4.14.6", "mysql": "^2.18.1", "sqlite3": "^5.1.6", @@ -14266,6 +14267,7 @@ "@crosslab/booking-service-common": "file:../common", "@crosslab/booking-service-test-common": "file:../test_common", "@crosslab/service-device-reservation": "file:../device-reservation", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "@types/express": "^4.17.13", "@types/lodash": "^4.14.198", @@ -14280,9 +14282,9 @@ "devDependencies": { "@types/mocha": "^10.0.0", "async-mutex": "^0.4.0", + "c8": "^9.1.0", "env-cmd": "^10.1.0", "mocha": "^10.0.0", - "nyc": "^15.1.0", "prettier": "^3.0.3", "why-is-node-running": "^2.2.2" } @@ -14299,3218 +14301,1275 @@ "node": ">=0.8" } }, - "../booking-backend/node_modules/@ampproject/remapping": { - "version": "2.2.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } + "../booking-backend/node_modules/@cross-lab-project/api-client": { + "resolved": "../../../../clients/api/js", + "link": true }, - "../booking-backend/node_modules/@babel/code-frame": { - "version": "7.22.5", - "dev": true, + "../booking-backend/node_modules/@cross-lab-project/codegen-typescript-addon": { + "resolved": "../../../../helper/crosslab-typescript-addon", + "link": true + }, + "../booking-backend/node_modules/@cross-lab-project/openapi-codegen": { + "resolved": "../../../../helper/openapi-codegeneration", + "link": true + }, + "../booking-backend/node_modules/@cross-lab-project/service-common": { + "resolved": "../../../common", + "link": true + }, + "../booking-backend/node_modules/@crosslab/booking-service-common": { + "resolved": "../common", + "link": true + }, + "../booking-backend/node_modules/@crosslab/booking-service-test-common": { + "resolved": "../test_common", + "link": true + }, + "../booking-backend/node_modules/@crosslab/service-device-reservation": { + "resolved": "../device-reservation", + "link": true + }, + "../booking-backend/node_modules/@types/amqplib": { + "version": "0.10.1", "license": "MIT", "dependencies": { - "@babel/highlight": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@types/node": "*" } }, - "../booking-backend/node_modules/@babel/compat-data": { - "version": "7.22.9", - "dev": true, + "../booking-backend/node_modules/@types/body-parser": { + "version": "1.19.2", "license": "MIT", - "engines": { - "node": ">=6.9.0" + "dependencies": { + "@types/connect": "*", + "@types/node": "*" } }, - "../booking-backend/node_modules/@babel/core": { - "version": "7.22.9", - "dev": true, + "../booking-backend/node_modules/@types/connect": { + "version": "3.4.35", "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.9", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" + "@types/node": "*" } }, - "../booking-backend/node_modules/@babel/generator": { - "version": "7.22.9", - "dev": true, + "../booking-backend/node_modules/@types/express": { + "version": "4.17.17", "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" } }, - "../booking-backend/node_modules/@babel/helper-compilation-targets": { - "version": "7.22.9", - "dev": true, + "../booking-backend/node_modules/@types/express-serve-static-core": { + "version": "4.17.35", "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" } }, - "../booking-backend/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } + "../booking-backend/node_modules/@types/http-errors": { + "version": "2.0.1", + "license": "MIT" }, - "../booking-backend/node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" + "../booking-backend/node_modules/@types/lodash": { + "version": "4.14.195", + "license": "MIT" }, - "../booking-backend/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } + "../booking-backend/node_modules/@types/mime": { + "version": "1.3.2", + "license": "MIT" }, - "../booking-backend/node_modules/@babel/helper-function-name": { - "version": "7.22.5", + "../booking-backend/node_modules/@types/mocha": { + "version": "10.0.1", "dev": true, + "license": "MIT" + }, + "../booking-backend/node_modules/@types/node": { + "version": "20.4.2", + "license": "MIT" + }, + "../booking-backend/node_modules/@types/qs": { + "version": "6.9.7", + "license": "MIT" + }, + "../booking-backend/node_modules/@types/range-parser": { + "version": "1.2.4", + "license": "MIT" + }, + "../booking-backend/node_modules/@types/send": { + "version": "0.17.1", "license": "MIT", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@types/mime": "^1", + "@types/node": "*" } }, - "../booking-backend/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "dev": true, + "../booking-backend/node_modules/@types/serve-static": { + "version": "1.15.2", "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@types/http-errors": "*", + "@types/mime": "*", + "@types/node": "*" } }, - "../booking-backend/node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "dev": true, + "../booking-backend/node_modules/accepts": { + "version": "1.3.8", "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" }, "engines": { - "node": ">=6.9.0" + "node": ">= 0.6" } }, - "../booking-backend/node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "dev": true, + "../booking-backend/node_modules/ajv": { + "version": "8.12.0", "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "../booking-backend/node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "dev": true, + "../booking-backend/node_modules/ajv-formats": { + "version": "2.1.1", "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "ajv": "^8.0.0" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } } }, - "../booking-backend/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "dev": true, + "../booking-backend/node_modules/amqplib": { + "version": "0.10.3", "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "@acuminous/bitsyntax": "^0.1.2", + "buffer-more-ints": "~1.0.0", + "readable-stream": "1.x >=1.1.9", + "url-parse": "~1.5.10" }, "engines": { - "node": ">=6.9.0" - } - }, - "../booking-backend/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "../booking-backend/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", + "../booking-backend/node_modules/ansi-colors": { + "version": "4.1.1", "dev": true, "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">=6" } }, - "../booking-backend/node_modules/@babel/helper-validator-option": { - "version": "7.22.5", + "../booking-backend/node_modules/ansi-regex": { + "version": "5.0.1", "dev": true, "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">=8" } }, - "../booking-backend/node_modules/@babel/helpers": { - "version": "7.22.6", + "../booking-backend/node_modules/ansi-styles": { + "version": "4.3.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=6.9.0" - } - }, - "../booking-backend/node_modules/@babel/highlight": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "node": ">=8" }, - "engines": { - "node": ">=6.9.0" + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "../booking-backend/node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", + "../booking-backend/node_modules/anymatch": { + "version": "3.1.3", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "color-convert": "^1.9.0" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": ">=4" + "node": ">= 8" } }, - "../booking-backend/node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", + "../booking-backend/node_modules/argparse": { + "version": "2.0.1", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } + "license": "Python-2.0" }, - "../booking-backend/node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", + "../booking-backend/node_modules/array-flatten": { + "version": "1.1.1", + "license": "MIT" + }, + "../booking-backend/node_modules/async-mutex": { + "version": "0.4.0", "dev": true, "license": "MIT", "dependencies": { - "color-name": "1.1.3" + "tslib": "^2.4.0" } }, - "../booking-backend/node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", + "../booking-backend/node_modules/balanced-match": { + "version": "1.0.2", "dev": true, "license": "MIT" }, - "../booking-backend/node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../booking-backend/node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", + "../booking-backend/node_modules/binary-extensions": { + "version": "2.2.0", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=8" } }, - "../booking-backend/node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, + "../booking-backend/node_modules/body-parser": { + "version": "1.20.1", "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../booking-backend/node_modules/@babel/parser": { - "version": "7.22.7", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "engines": { - "node": ">=6.0.0" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "../booking-backend/node_modules/@babel/template": { - "version": "7.22.5", - "dev": true, + "../booking-backend/node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "ms": "2.0.0" } }, - "../booking-backend/node_modules/@babel/traverse": { - "version": "7.22.8", + "../booking-backend/node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "license": "MIT" + }, + "../booking-backend/node_modules/brace-expansion": { + "version": "2.0.1", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" + "balanced-match": "^1.0.0" } }, - "../booking-backend/node_modules/@babel/types": { - "version": "7.22.5", + "../booking-backend/node_modules/braces": { + "version": "3.0.2", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" + "fill-range": "^7.0.1" }, "engines": { - "node": ">=6.9.0" + "node": ">=8" } }, - "../booking-backend/node_modules/@cross-lab-project/api-client": { - "resolved": "../../../../clients/api/js", - "link": true - }, - "../booking-backend/node_modules/@cross-lab-project/codegen-typescript-addon": { - "resolved": "../../../../helper/crosslab-typescript-addon", - "link": true - }, - "../booking-backend/node_modules/@cross-lab-project/openapi-codegen": { - "resolved": "../../../../helper/openapi-codegeneration", - "link": true - }, - "../booking-backend/node_modules/@cross-lab-project/service-common": { - "resolved": "../../../common", - "link": true - }, - "../booking-backend/node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true - }, - "../booking-backend/node_modules/@crosslab/booking-service-test-common": { - "resolved": "../test_common", - "link": true + "../booking-backend/node_modules/browser-stdout": { + "version": "1.3.1", + "dev": true, + "license": "ISC" }, - "../booking-backend/node_modules/@crosslab/service-device-reservation": { - "resolved": "../device-reservation", - "link": true + "../booking-backend/node_modules/buffer-more-ints": { + "version": "1.0.0", + "license": "MIT" }, - "../booking-backend/node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, + "../booking-backend/node_modules/bytes": { + "version": "3.1.2", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 0.8" } }, - "../booking-backend/node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "dev": true, + "../booking-backend/node_modules/call-bind": { + "version": "1.0.2", "license": "MIT", "dependencies": { - "sprintf-js": "~1.0.2" + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "../booking-backend/node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", + "../booking-backend/node_modules/chalk": { + "version": "4.1.2", "dev": true, "license": "MIT", "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "node": ">=10" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "../booking-backend/node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", + "../booking-backend/node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", "dev": true, "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, - "../booking-backend/node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", + "../booking-backend/node_modules/chokidar": { + "version": "3.5.3", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "license": "MIT", "dependencies": { - "p-try": "^2.0.0" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">=6" + "node": ">= 8.10.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "../booking-backend/node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", + "../booking-backend/node_modules/cliui": { + "version": "7.0.4", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "../booking-backend/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", + "../booking-backend/node_modules/color-convert": { + "version": "2.0.1", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6.0.0" + "node": ">=7.0.0" } }, - "../booking-backend/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", + "../booking-backend/node_modules/color-name": { + "version": "1.1.4", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } + "license": "MIT" }, - "../booking-backend/node_modules/@jridgewell/set-array": { - "version": "1.1.2", + "../booking-backend/node_modules/commander": { + "version": "4.1.1", "dev": true, "license": "MIT", "engines": { - "node": ">=6.0.0" + "node": ">= 6" } }, - "../booking-backend/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", + "../booking-backend/node_modules/concat-map": { + "version": "0.0.1", "dev": true, "license": "MIT" }, - "../booking-backend/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "dev": true, + "../booking-backend/node_modules/content-disposition": { + "version": "0.5.4", "license": "MIT", "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" } }, - "../booking-backend/node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../booking-backend/node_modules/@types/body-parser": { - "version": "1.19.2", - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "../booking-backend/node_modules/@types/connect": { - "version": "3.4.35", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../booking-backend/node_modules/@types/express": { - "version": "4.17.17", - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "../booking-backend/node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "../booking-backend/node_modules/@types/http-errors": { - "version": "2.0.1", - "license": "MIT" - }, - "../booking-backend/node_modules/@types/lodash": { - "version": "4.14.195", - "license": "MIT" - }, - "../booking-backend/node_modules/@types/mime": { - "version": "1.3.2", - "license": "MIT" - }, - "../booking-backend/node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" - }, - "../booking-backend/node_modules/@types/qs": { - "version": "6.9.7", - "license": "MIT" - }, - "../booking-backend/node_modules/@types/range-parser": { - "version": "1.2.4", + "../booking-backend/node_modules/content-disposition/node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "license": "MIT" }, - "../booking-backend/node_modules/@types/send": { - "version": "0.17.1", - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "../booking-backend/node_modules/@types/serve-static": { - "version": "1.15.2", - "license": "MIT", - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, - "../booking-backend/node_modules/accepts": { - "version": "1.3.8", + "../booking-backend/node_modules/content-type": { + "version": "1.0.5", "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, "engines": { "node": ">= 0.6" } }, - "../booking-backend/node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../booking-backend/node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../booking-backend/node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "@acuminous/bitsyntax": "^0.1.2", - "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", - "url-parse": "~1.5.10" - }, - "engines": { - "node": ">=10" - } - }, - "../booking-backend/node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../booking-backend/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../booking-backend/node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../booking-backend/node_modules/append-transform": { - "version": "2.0.0", - "dev": true, + "../booking-backend/node_modules/cookie": { + "version": "0.5.0", "license": "MIT", - "dependencies": { - "default-require-extensions": "^3.0.0" - }, "engines": { - "node": ">=8" + "node": ">= 0.6" } }, - "../booking-backend/node_modules/archy": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../booking-backend/node_modules/array-flatten": { - "version": "1.1.1", + "../booking-backend/node_modules/cookie-signature": { + "version": "1.0.6", "license": "MIT" }, - "../booking-backend/node_modules/async-mutex": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "../booking-backend/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, + "../booking-backend/node_modules/core-util-is": { + "version": "1.0.3", "license": "MIT" }, - "../booking-backend/node_modules/binary-extensions": { - "version": "2.2.0", + "../booking-backend/node_modules/cross-spawn": { + "version": "7.0.3", "dev": true, "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../booking-backend/node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../booking-backend/node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../booking-backend/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/browser-stdout": { - "version": "1.3.1", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/browserslist": { - "version": "4.21.9", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../booking-backend/node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/bytes": { - "version": "3.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/caching-transform": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../booking-backend/node_modules/caniuse-lite": { - "version": "1.0.30001516", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "../booking-backend/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../booking-backend/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../booking-backend/node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../booking-backend/node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../booking-backend/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../booking-backend/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/commander": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../booking-backend/node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/content-disposition": { - "version": "0.5.4", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../booking-backend/node_modules/content-type": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/cookie-signature": { - "version": "1.0.6", - "license": "MIT" - }, - "../booking-backend/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../booking-backend/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../booking-backend/node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" - }, - "../booking-backend/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../booking-backend/node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/default-require-extensions": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, - "../booking-backend/node_modules/depd": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/destroy": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../booking-backend/node_modules/diff": { - "version": "5.0.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../booking-backend/node_modules/ee-first": { - "version": "1.1.1", - "license": "MIT" - }, - "../booking-backend/node_modules/electron-to-chromium": { - "version": "1.4.461", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/encodeurl": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/env-cmd": { - "version": "10.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "commander": "^4.0.0", - "cross-spawn": "^7.0.0" - }, - "bin": { - "env-cmd": "bin/env-cmd.js" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../booking-backend/node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../booking-backend/node_modules/escape-html": { - "version": "1.0.3", - "license": "MIT" - }, - "../booking-backend/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../booking-backend/node_modules/etag": { - "version": "1.8.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/express": { - "version": "4.18.2", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "../booking-backend/node_modules/express/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../booking-backend/node_modules/express/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/express/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../booking-backend/node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "../booking-backend/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/finalhandler": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../booking-backend/node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "../booking-backend/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/flat": { - "version": "5.0.2", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "../booking-backend/node_modules/foreground-child": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../booking-backend/node_modules/forwarded": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/fresh": { - "version": "0.5.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/fromentries": { - "version": "1.3.2", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../booking-backend/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "../booking-backend/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../booking-backend/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../booking-backend/node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../booking-backend/node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "../booking-backend/node_modules/glob": { - "version": "7.2.0", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../booking-backend/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../booking-backend/node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../booking-backend/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../booking-backend/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../booking-backend/node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../booking-backend/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/has-symbols": { - "version": "1.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "../booking-backend/node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/http-errors": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../booking-backend/node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../booking-backend/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../booking-backend/node_modules/ipaddr.js": { - "version": "1.9.1", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "../booking-backend/node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../booking-backend/node_modules/is-plain-obj": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT" - }, - "../booking-backend/node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "../booking-backend/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/istanbul-lib-report": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "../booking-backend/node_modules/istanbul-reports": { - "version": "3.1.5", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../booking-backend/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../booking-backend/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "../booking-backend/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "../booking-backend/node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/long": { - "version": "4.0.0", - "license": "Apache-2.0" - }, - "../booking-backend/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../booking-backend/node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/media-typer": { - "version": "0.3.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/merge-descriptors": { - "version": "1.0.1", - "license": "MIT" - }, - "../booking-backend/node_modules/methods": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/mime": { - "version": "1.6.0", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "../booking-backend/node_modules/mime-db": { - "version": "1.52.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/minimatch": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../booking-backend/node_modules/mocha": { - "version": "10.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "../booking-backend/node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../booking-backend/node_modules/mysql2": { - "version": "2.3.3", - "license": "MIT", - "dependencies": { - "denque": "^2.0.1", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../booking-backend/node_modules/mysql2/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../booking-backend/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../booking-backend/node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../booking-backend/node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/node-preload": { - "version": "0.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/node-releases": { - "version": "2.0.13", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/nyc": { - "version": "15.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "../booking-backend/node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "../booking-backend/node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "../booking-backend/node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/on-finished": { - "version": "2.4.1", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../booking-backend/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/p-map": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../booking-backend/node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/parseurl": { - "version": "1.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/path-to-regexp": { - "version": "0.1.7", - "license": "MIT" - }, - "../booking-backend/node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../booking-backend/node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/process-on-spawn": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/proxy-addr": { - "version": "2.0.7", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../booking-backend/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../booking-backend/node_modules/qs": { - "version": "6.11.0", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/querystringify": { - "version": "2.2.0", - "license": "MIT" - }, - "../booking-backend/node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "../booking-backend/node_modules/range-parser": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/readable-stream": { - "version": "1.1.14", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "engines": { + "node": ">= 8" } }, - "../booking-backend/node_modules/readdirp": { - "version": "3.6.0", - "dev": true, + "../booking-backend/node_modules/dayjs": { + "version": "1.11.9", + "license": "MIT" + }, + "../booking-backend/node_modules/debug": { + "version": "4.3.4", "license": "MIT", "dependencies": { - "picomatch": "^2.2.1" + "ms": "2.1.2" }, "engines": { - "node": ">=8.10.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "../booking-backend/node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, + "../booking-backend/node_modules/denque": { + "version": "2.1.0", + "license": "Apache-2.0", "engines": { - "node": ">=4" + "node": ">=0.10" } }, - "../booking-backend/node_modules/require-directory": { - "version": "2.1.1", - "dev": true, + "../booking-backend/node_modules/depd": { + "version": "2.0.0", "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">= 0.8" } }, - "../booking-backend/node_modules/require-from-string": { - "version": "2.0.2", + "../booking-backend/node_modules/destroy": { + "version": "1.2.0", "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "../booking-backend/node_modules/require-main-filename": { - "version": "2.0.0", + "../booking-backend/node_modules/diff": { + "version": "5.0.0", "dev": true, - "license": "ISC" + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } }, - "../booking-backend/node_modules/requires-port": { - "version": "1.0.0", + "../booking-backend/node_modules/ee-first": { + "version": "1.1.1", "license": "MIT" }, - "../booking-backend/node_modules/resolve-from": { - "version": "5.0.0", + "../booking-backend/node_modules/emoji-regex": { + "version": "8.0.0", "dev": true, + "license": "MIT" + }, + "../booking-backend/node_modules/encodeurl": { + "version": "1.0.2", "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 0.8" } }, - "../booking-backend/node_modules/rimraf": { - "version": "3.0.2", + "../booking-backend/node_modules/env-cmd": { + "version": "10.1.0", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "glob": "^7.1.3" + "commander": "^4.0.0", + "cross-spawn": "^7.0.0" }, "bin": { - "rimraf": "bin.js" + "env-cmd": "bin/env-cmd.js" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "engines": { + "node": ">=8.0.0" } }, - "../booking-backend/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" + "../booking-backend/node_modules/escalade": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } }, - "../booking-backend/node_modules/safer-buffer": { - "version": "2.1.2", + "../booking-backend/node_modules/escape-html": { + "version": "1.0.3", "license": "MIT" }, - "../booking-backend/node_modules/semver": { - "version": "6.3.1", + "../booking-backend/node_modules/escape-string-regexp": { + "version": "4.0.0", "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../booking-backend/node_modules/send": { - "version": "0.18.0", + "../booking-backend/node_modules/etag": { + "version": "1.8.1", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../booking-backend/node_modules/express": { + "version": "4.18.2", "license": "MIT", "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", + "finalhandler": "1.2.0", "fresh": "0.5.2", "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", "range-parser": "~1.2.1", - "statuses": "2.0.1" + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 0.10.0" } }, - "../booking-backend/node_modules/send/node_modules/debug": { + "../booking-backend/node_modules/express/node_modules/debug": { "version": "2.6.9", "license": "MIT", "dependencies": { "ms": "2.0.0" } }, - "../booking-backend/node_modules/send/node_modules/debug/node_modules/ms": { + "../booking-backend/node_modules/express/node_modules/ms": { "version": "2.0.0", "license": "MIT" }, - "../booking-backend/node_modules/send/node_modules/ms": { - "version": "2.1.3", + "../booking-backend/node_modules/express/node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "license": "MIT" }, - "../booking-backend/node_modules/seq-queue": { - "version": "0.0.5" + "../booking-backend/node_modules/fast-deep-equal": { + "version": "3.1.3", + "license": "MIT" }, - "../booking-backend/node_modules/serialize-javascript": { - "version": "6.0.0", + "../booking-backend/node_modules/fill-range": { + "version": "7.0.1", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "randombytes": "^2.1.0" + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "../booking-backend/node_modules/serve-static": { - "version": "1.15.0", + "../booking-backend/node_modules/finalhandler": { + "version": "1.2.0", "license": "MIT", "dependencies": { + "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", + "on-finished": "2.4.1", "parseurl": "~1.3.3", - "send": "0.18.0" + "statuses": "2.0.1", + "unpipe": "~1.0.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 0.8" } }, - "../booking-backend/node_modules/set-blocking": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/setprototypeof": { - "version": "1.2.0", - "license": "ISC" + "../booking-backend/node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } }, - "../booking-backend/node_modules/shebang-command": { + "../booking-backend/node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", + "license": "MIT" + }, + "../booking-backend/node_modules/find-up": { + "version": "5.0.0", "dev": true, "license": "MIT", "dependencies": { - "shebang-regex": "^3.0.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../booking-backend/node_modules/flat": { + "version": "5.0.2", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "../booking-backend/node_modules/forwarded": { + "version": "0.2.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../booking-backend/node_modules/fresh": { + "version": "0.5.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../booking-backend/node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "../booking-backend/node_modules/function-bind": { + "version": "1.1.1", + "license": "MIT" + }, + "../booking-backend/node_modules/generate-function": { + "version": "2.3.1", + "license": "MIT", + "dependencies": { + "is-property": "^1.0.2" } }, - "../booking-backend/node_modules/shebang-regex": { - "version": "3.0.0", + "../booking-backend/node_modules/get-caller-file": { + "version": "2.0.5", "dev": true, - "license": "MIT", + "license": "ISC", "engines": { - "node": ">=8" + "node": "6.* || 8.* || >= 10.*" } }, - "../booking-backend/node_modules/side-channel": { - "version": "1.0.4", + "../booking-backend/node_modules/get-intrinsic": { + "version": "1.2.1", "license": "MIT", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "../booking-backend/node_modules/siginfo": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/source-map": { - "version": "0.6.1", + "../booking-backend/node_modules/glob": { + "version": "7.2.0", "dev": true, - "license": "BSD-3-Clause", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "../booking-backend/node_modules/spawn-wrap": { - "version": "2.0.0", + "../booking-backend/node_modules/glob-parent": { + "version": "5.1.2", "dev": true, "license": "ISC", "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" + "is-glob": "^4.0.1" }, "engines": { - "node": ">=8" + "node": ">= 6" } }, - "../booking-backend/node_modules/sprintf-js": { - "version": "1.0.3", + "../booking-backend/node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", "dev": true, - "license": "BSD-3-Clause" - }, - "../booking-backend/node_modules/sqlstring": { - "version": "2.3.3", "license": "MIT", - "engines": { - "node": ">= 0.6" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "../booking-backend/node_modules/stackback": { - "version": "0.0.2", + "../booking-backend/node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/statuses": { - "version": "2.0.1", - "license": "MIT", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">= 0.8" + "node": "*" } }, - "../booking-backend/node_modules/string_decoder": { - "version": "0.10.31", - "license": "MIT" - }, - "../booking-backend/node_modules/string-width": { - "version": "4.2.3", - "dev": true, + "../booking-backend/node_modules/has": { + "version": "1.0.3", "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "function-bind": "^1.1.1" }, "engines": { - "node": ">=8" + "node": ">= 0.4.0" } }, - "../booking-backend/node_modules/strip-ansi": { - "version": "6.0.1", + "../booking-backend/node_modules/has-flag": { + "version": "4.0.0", "dev": true, "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, "engines": { "node": ">=8" } }, - "../booking-backend/node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, + "../booking-backend/node_modules/has-proto": { + "version": "1.0.1", "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "../booking-backend/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, + "../booking-backend/node_modules/has-symbols": { + "version": "1.0.3", "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "../booking-backend/node_modules/supports-color": { - "version": "8.1.1", + "../booking-backend/node_modules/he": { + "version": "1.2.0", "dev": true, "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "../booking-backend/node_modules/http-errors": { + "version": "2.0.0", + "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" }, "engines": { - "node": ">=10" + "node": ">= 0.8" + } + }, + "../booking-backend/node_modules/iconv-lite": { + "version": "0.4.24", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "engines": { + "node": ">=0.10.0" } }, - "../booking-backend/node_modules/test-exclude": { - "version": "6.0.0", + "../booking-backend/node_modules/inflight": { + "version": "1.0.6", "dev": true, "license": "ISC", "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, + "once": "^1.3.0", + "wrappy": "1" + } + }, + "../booking-backend/node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "../booking-backend/node_modules/ipaddr.js": { + "version": "1.9.1", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 0.10" } }, - "../booking-backend/node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", + "../booking-backend/node_modules/is-binary-path": { + "version": "2.1.0", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "../booking-backend/node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", + "../booking-backend/node_modules/is-extglob": { + "version": "2.1.1", "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "license": "MIT", "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "../booking-backend/node_modules/to-fast-properties": { - "version": "2.0.0", + "../booking-backend/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=8" } }, - "../booking-backend/node_modules/to-regex-range": { - "version": "5.0.1", + "../booking-backend/node_modules/is-glob": { + "version": "4.0.3", "dev": true, "license": "MIT", "dependencies": { - "is-number": "^7.0.0" + "is-extglob": "^2.1.1" }, "engines": { - "node": ">=8.0" + "node": ">=0.10.0" } }, - "../booking-backend/node_modules/toidentifier": { - "version": "1.0.1", + "../booking-backend/node_modules/is-number": { + "version": "7.0.0", + "dev": true, "license": "MIT", "engines": { - "node": ">=0.6" + "node": ">=0.12.0" } }, - "../booking-backend/node_modules/tslib": { - "version": "2.6.0", + "../booking-backend/node_modules/is-plain-obj": { + "version": "2.1.0", "dev": true, - "license": "0BSD" + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "../booking-backend/node_modules/type-fest": { - "version": "0.8.1", + "../booking-backend/node_modules/is-property": { + "version": "1.0.2", + "license": "MIT" + }, + "../booking-backend/node_modules/is-unicode-supported": { + "version": "0.1.0", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../booking-backend/node_modules/type-is": { - "version": "1.6.18", + "../booking-backend/node_modules/isarray": { + "version": "0.0.1", + "license": "MIT" + }, + "../booking-backend/node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "../booking-backend/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" + "argparse": "^2.0.1" }, - "engines": { - "node": ">= 0.6" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "../booking-backend/node_modules/typedarray-to-buffer": { - "version": "3.1.5", + "../booking-backend/node_modules/json-schema-traverse": { + "version": "1.0.0", + "license": "MIT" + }, + "../booking-backend/node_modules/locate-path": { + "version": "6.0.0", "dev": true, "license": "MIT", "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "../booking-backend/node_modules/typescript": { - "version": "4.9.5", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=4.2.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../booking-backend/node_modules/unpipe": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } + "../booking-backend/node_modules/lodash": { + "version": "4.17.21", + "license": "MIT" }, - "../booking-backend/node_modules/update-browserslist-db": { - "version": "1.0.11", + "../booking-backend/node_modules/log-symbols": { + "version": "4.1.0", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], "license": "MIT", "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, - "bin": { - "update-browserslist-db": "cli.js" + "engines": { + "node": ">=10" }, - "peerDependencies": { - "browserslist": ">= 4.21.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../booking-backend/node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", + "../booking-backend/node_modules/long": { + "version": "4.0.0", + "license": "Apache-2.0" + }, + "../booking-backend/node_modules/lru-cache": { + "version": "6.0.0", + "license": "ISC", "dependencies": { - "punycode": "^2.1.0" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, - "../booking-backend/node_modules/url-parse": { - "version": "1.5.10", + "../booking-backend/node_modules/media-typer": { + "version": "0.3.0", "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" + "engines": { + "node": ">= 0.6" } }, - "../booking-backend/node_modules/utils-merge": { + "../booking-backend/node_modules/merge-descriptors": { "version": "1.0.1", + "license": "MIT" + }, + "../booking-backend/node_modules/methods": { + "version": "1.1.2", "license": "MIT", "engines": { - "node": ">= 0.4.0" + "node": ">= 0.6" } }, - "../booking-backend/node_modules/uuid": { - "version": "8.3.2", - "dev": true, + "../booking-backend/node_modules/mime": { + "version": "1.6.0", "license": "MIT", "bin": { - "uuid": "dist/bin/uuid" + "mime": "cli.js" + }, + "engines": { + "node": ">=4" } }, - "../booking-backend/node_modules/vary": { - "version": "1.1.2", + "../booking-backend/node_modules/mime-db": { + "version": "1.52.0", "license": "MIT", "engines": { - "node": ">= 0.8" + "node": ">= 0.6" } }, - "../booking-backend/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", + "../booking-backend/node_modules/mime-types": { + "version": "2.1.35", + "license": "MIT", "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" + "mime-db": "1.52.0" }, "engines": { - "node": ">= 8" + "node": ">= 0.6" } }, - "../booking-backend/node_modules/which-module": { - "version": "2.0.1", + "../booking-backend/node_modules/minimatch": { + "version": "5.0.1", "dev": true, - "license": "ISC" + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } }, - "../booking-backend/node_modules/why-is-node-running": { - "version": "2.2.2", + "../booking-backend/node_modules/mocha": { + "version": "10.2.0", "dev": true, "license": "MIT", "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" }, "bin": { - "why-is-node-running": "cli.js" + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" }, "engines": { - "node": ">=8" + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" } }, - "../booking-backend/node_modules/workerpool": { - "version": "6.2.1", + "../booking-backend/node_modules/mocha/node_modules/ms": { + "version": "2.1.3", "dev": true, - "license": "Apache-2.0" + "license": "MIT" }, - "../booking-backend/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, + "../booking-backend/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "../booking-backend/node_modules/mysql2": { + "version": "2.3.3", "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "denque": "^2.0.1", + "generate-function": "^2.3.1", + "iconv-lite": "^0.6.3", + "long": "^4.0.0", + "lru-cache": "^6.0.0", + "named-placeholders": "^1.1.2", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" }, "engines": { - "node": ">=10" + "node": ">= 8.0" + } + }, + "../booking-backend/node_modules/mysql2/node_modules/iconv-lite": { + "version": "0.6.3", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "engines": { + "node": ">=0.10.0" } }, - "../booking-backend/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" + "../booking-backend/node_modules/named-placeholders": { + "version": "1.1.3", + "license": "MIT", + "dependencies": { + "lru-cache": "^7.14.1" + }, + "engines": { + "node": ">=12.0.0" + } }, - "../booking-backend/node_modules/write-file-atomic": { - "version": "3.0.3", - "dev": true, + "../booking-backend/node_modules/named-placeholders/node_modules/lru-cache": { + "version": "7.18.3", "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "engines": { + "node": ">=12" } }, - "../booking-backend/node_modules/y18n": { - "version": "5.0.8", + "../booking-backend/node_modules/nanoid": { + "version": "3.3.3", "dev": true, - "license": "ISC", + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, "engines": { - "node": ">=10" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "../booking-backend/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" + "../booking-backend/node_modules/negotiator": { + "version": "0.6.3", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } }, - "../booking-backend/node_modules/yargs": { - "version": "16.2.0", + "../booking-backend/node_modules/normalize-path": { + "version": "3.0.0", "dev": true, "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../booking-backend/node_modules/object-inspect": { + "version": "1.12.3", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../booking-backend/node_modules/on-finished": { + "version": "2.4.1", + "license": "MIT", "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "ee-first": "1.1.1" }, "engines": { - "node": ">=10" + "node": ">= 0.8" } }, - "../booking-backend/node_modules/yargs-parser": { - "version": "20.2.4", + "../booking-backend/node_modules/once": { + "version": "1.4.0", "dev": true, "license": "ISC", - "engines": { - "node": ">=10" + "dependencies": { + "wrappy": "1" } }, - "../booking-backend/node_modules/yargs-unparser": { - "version": "2.0.0", + "../booking-backend/node_modules/p-limit": { + "version": "3.1.0", "dev": true, "license": "MIT", "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" + "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../booking-backend/node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", + "../booking-backend/node_modules/p-locate": { + "version": "5.0.0", "dev": true, "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, "engines": { "node": ">=10" }, @@ -17518,589 +15577,623 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "../booking-backend/node_modules/yargs-unparser/node_modules/decamelize": { + "../booking-backend/node_modules/parseurl": { + "version": "1.3.3", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "../booking-backend/node_modules/path-exists": { "version": "4.0.0", "dev": true, "license": "MIT", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "../booking-backend/node_modules/yocto-queue": { - "version": "0.1.0", + "../booking-backend/node_modules/path-is-absolute": { + "version": "1.0.1", "dev": true, "license": "MIT", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, - "../common": { - "name": "@crosslab/booking-service-common", - "version": "0.0.1", - "license": "Apache-2.0", - "devDependencies": { - "@types/node": "^20.5.9", - "prettier": "^3.0.3", - "typescript": "^5.2.2" + "../booking-backend/node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" } }, - "../common/node_modules/@types/node": { - "version": "20.4.2", - "dev": true, + "../booking-backend/node_modules/path-to-regexp": { + "version": "0.1.7", "license": "MIT" }, - "../common/node_modules/typescript": { - "version": "5.1.6", + "../booking-backend/node_modules/picomatch": { + "version": "2.3.1", "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, + "license": "MIT", "engines": { - "node": ">=14.17" + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "../device-reservation": { - "name": "@crosslab/service-device-reservation", - "version": "0.1.0", - "license": "Apache-2.0", + "../booking-backend/node_modules/proxy-addr": { + "version": "2.0.7", + "license": "MIT", "dependencies": { - "@crosslab/booking-service-common": "file:../common", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "amqplib": "^0.10.0", - "async-mutex": "^0.4.0", - "dayjs": "^1.11.5", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" }, - "devDependencies": { - "@types/mocha": "^10.0.0", - "mocha": "^10.0.0", - "mocha-suppress-logs": "^0.3.1", - "nyc": "^15.1.0", - "prettier": "^3.0.3" + "engines": { + "node": ">= 0.10" } }, - "../device-reservation/node_modules/@acuminous/bitsyntax": { - "version": "0.1.2", + "../booking-backend/node_modules/punycode": { + "version": "2.3.0", "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../booking-backend/node_modules/qs": { + "version": "6.11.0", + "license": "BSD-3-Clause", "dependencies": { - "buffer-more-ints": "~1.0.0", - "debug": "^4.3.4", - "safe-buffer": "~5.1.2" + "side-channel": "^1.0.4" }, "engines": { - "node": ">=0.8" + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "../device-reservation/node_modules/@ampproject/remapping": { - "version": "2.2.1", + "../booking-backend/node_modules/querystringify": { + "version": "2.2.0", + "license": "MIT" + }, + "../booking-backend/node_modules/randombytes": { + "version": "2.1.0", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "safe-buffer": "^5.1.0" + } + }, + "../booking-backend/node_modules/range-parser": { + "version": "1.2.1", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../booking-backend/node_modules/raw-body": { + "version": "2.5.1", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" }, "engines": { - "node": ">=6.0.0" + "node": ">= 0.8" } }, - "../device-reservation/node_modules/@babel/code-frame": { - "version": "7.22.5", + "../booking-backend/node_modules/readable-stream": { + "version": "1.1.14", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "../booking-backend/node_modules/readdirp": { + "version": "3.6.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/highlight": "^7.22.5" + "picomatch": "^2.2.1" }, "engines": { - "node": ">=6.9.0" + "node": ">=8.10.0" } }, - "../device-reservation/node_modules/@babel/compat-data": { - "version": "7.22.9", + "../booking-backend/node_modules/require-directory": { + "version": "2.1.1", "dev": true, "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">=0.10.0" } }, - "../device-reservation/node_modules/@babel/core": { - "version": "7.22.9", - "dev": true, + "../booking-backend/node_modules/require-from-string": { + "version": "2.0.2", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../booking-backend/node_modules/requires-port": { + "version": "1.0.0", + "license": "MIT" + }, + "../booking-backend/node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, + "../booking-backend/node_modules/safer-buffer": { + "version": "2.1.2", + "license": "MIT" + }, + "../booking-backend/node_modules/send": { + "version": "0.18.0", "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.9", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.1" + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" }, "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" + "node": ">= 0.8.0" + } + }, + "../booking-backend/node_modules/send/node_modules/debug": { + "version": "2.6.9", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "../booking-backend/node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "license": "MIT" + }, + "../booking-backend/node_modules/send/node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "../booking-backend/node_modules/seq-queue": { + "version": "0.0.5" + }, + "../booking-backend/node_modules/serialize-javascript": { + "version": "6.0.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" } }, - "../device-reservation/node_modules/@babel/generator": { - "version": "7.22.9", - "dev": true, + "../booking-backend/node_modules/serve-static": { + "version": "1.15.0", "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" }, "engines": { - "node": ">=6.9.0" + "node": ">= 0.8.0" } }, - "../device-reservation/node_modules/@babel/helper-compilation-targets": { - "version": "7.22.9", + "../booking-backend/node_modules/setprototypeof": { + "version": "1.2.0", + "license": "ISC" + }, + "../booking-backend/node_modules/shebang-command": { + "version": "2.0.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": ">=8" } }, - "../device-reservation/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", + "../booking-backend/node_modules/shebang-regex": { + "version": "3.0.0", "dev": true, - "license": "ISC", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../booking-backend/node_modules/side-channel": { + "version": "1.0.4", + "license": "MIT", "dependencies": { - "yallist": "^3.0.2" + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "../device-reservation/node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", + "../booking-backend/node_modules/siginfo": { + "version": "2.0.0", "dev": true, "license": "ISC" }, - "../device-reservation/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "dev": true, + "../booking-backend/node_modules/sqlstring": { + "version": "2.3.3", "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">= 0.6" } }, - "../device-reservation/node_modules/@babel/helper-function-name": { - "version": "7.22.5", + "../booking-backend/node_modules/stackback": { + "version": "0.0.2", "dev": true, + "license": "MIT" + }, + "../booking-backend/node_modules/statuses": { + "version": "2.0.1", "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, "engines": { - "node": ">=6.9.0" + "node": ">= 0.8" } }, - "../device-reservation/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", + "../booking-backend/node_modules/string_decoder": { + "version": "0.10.31", + "license": "MIT" + }, + "../booking-backend/node_modules/string-width": { + "version": "4.2.3", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=6.9.0" + "node": ">=8" } }, - "../device-reservation/node_modules/@babel/helper-module-imports": { - "version": "7.22.5", + "../booking-backend/node_modules/strip-ansi": { + "version": "6.0.1", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=6.9.0" + "node": ">=8" } }, - "../device-reservation/node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", + "../booking-backend/node_modules/strip-json-comments": { + "version": "3.1.1", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" - }, "engines": { - "node": ">=6.9.0" + "node": ">=8" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/@babel/helper-simple-access": { - "version": "7.22.5", + "../booking-backend/node_modules/supports-color": { + "version": "8.1.1", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "../device-reservation/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", + "../booking-backend/node_modules/to-regex-range": { + "version": "5.0.1", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "is-number": "^7.0.0" }, "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" + "node": ">=8.0" } }, - "../device-reservation/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "dev": true, + "../booking-backend/node_modules/toidentifier": { + "version": "1.0.1", "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">=0.6" } }, - "../device-reservation/node_modules/@babel/helper-validator-option": { - "version": "7.22.5", + "../booking-backend/node_modules/tslib": { + "version": "2.6.0", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } + "license": "0BSD" }, - "../device-reservation/node_modules/@babel/helpers": { - "version": "7.22.6", - "dev": true, + "../booking-backend/node_modules/type-is": { + "version": "1.6.18", "license": "MIT", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" + "media-typer": "0.3.0", + "mime-types": "~2.1.24" }, "engines": { - "node": ">=6.9.0" + "node": ">= 0.6" } }, - "../device-reservation/node_modules/@babel/highlight": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "../booking-backend/node_modules/typescript": { + "version": "4.9.5", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=6.9.0" + "node": ">=4.2.0" } }, - "../device-reservation/node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, + "../booking-backend/node_modules/unpipe": { + "version": "1.0.0", "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, "engines": { - "node": ">=4" + "node": ">= 0.8" } }, - "../device-reservation/node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", + "../booking-backend/node_modules/uri-js": { + "version": "4.4.1", + "license": "BSD-2-Clause", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" + "punycode": "^2.1.0" } }, - "../device-reservation/node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, + "../booking-backend/node_modules/url-parse": { + "version": "1.5.10", "license": "MIT", "dependencies": { - "color-name": "1.1.3" + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" } }, - "../device-reservation/node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, + "../booking-backend/node_modules/utils-merge": { + "version": "1.0.1", "license": "MIT", "engines": { - "node": ">=0.8.0" + "node": ">= 0.4.0" } }, - "../device-reservation/node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, + "../booking-backend/node_modules/vary": { + "version": "1.1.2", "license": "MIT", "engines": { - "node": ">=4" + "node": ">= 0.8" } }, - "../device-reservation/node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", + "../booking-backend/node_modules/which": { + "version": "2.0.2", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "has-flag": "^3.0.0" + "isexe": "^2.0.0" }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/parser": { - "version": "7.22.7", - "dev": true, - "license": "MIT", "bin": { - "parser": "bin/babel-parser.js" + "node-which": "bin/node-which" }, "engines": { - "node": ">=6.0.0" + "node": ">= 8" } }, - "../device-reservation/node_modules/@babel/template": { - "version": "7.22.5", + "../booking-backend/node_modules/why-is-node-running": { + "version": "2.2.2", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" }, "engines": { - "node": ">=6.9.0" + "node": ">=8" } }, - "../device-reservation/node_modules/@babel/traverse": { - "version": "7.22.8", + "../booking-backend/node_modules/workerpool": { + "version": "6.2.1", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } + "license": "Apache-2.0" }, - "../device-reservation/node_modules/@babel/types": { - "version": "7.22.5", + "../booking-backend/node_modules/wrap-ansi": { + "version": "7.0.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "../device-reservation/node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true + "../booking-backend/node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", + "../booking-backend/node_modules/y18n": { + "version": "5.0.8", "dev": true, "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } + "../booking-backend/node_modules/yallist": { + "version": "4.0.0", + "license": "ISC" }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", + "../booking-backend/node_modules/yargs": { + "version": "16.2.0", "dev": true, "license": "MIT", "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", + "../booking-backend/node_modules/yargs-parser": { + "version": "20.2.4", "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "license": "ISC", + "engines": { + "node": ">=10" } }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", + "../booking-backend/node_modules/yargs-unparser": { + "version": "2.0.0", "dev": true, "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", + "../booking-backend/node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", "dev": true, "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", + "../booking-backend/node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", "dev": true, "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/@istanbuljs/schema": { - "version": "0.1.3", + "../booking-backend/node_modules/yocto-queue": { + "version": "0.1.0", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "dev": true, - "license": "MIT", + "../common": { + "name": "@crosslab/booking-service-common", + "version": "0.0.1", + "license": "Apache-2.0", "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@trivago/prettier-plugin-sort-imports": "^4.2.0" }, - "engines": { - "node": ">=6.0.0" + "devDependencies": { + "@types/node": "^20.5.9", + "prettier": "^3.0.3", + "typescript": "^5.2.2" } }, - "../device-reservation/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", + "../common/node_modules/@types/node": { + "version": "20.4.2", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } + "license": "MIT" }, - "../device-reservation/node_modules/@jridgewell/set-array": { - "version": "1.1.2", + "../common/node_modules/typescript": { + "version": "5.1.6", "dev": true, - "license": "MIT", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, "engines": { - "node": ">=6.0.0" + "node": ">=14.17" } }, - "../device-reservation/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" + "../device-reservation": { + "name": "@crosslab/service-device-reservation", + "version": "0.1.0", + "license": "Apache-2.0", + "dependencies": { + "@crosslab/booking-service-common": "file:../common", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "amqplib": "^0.10.0", + "async-mutex": "^0.4.0", + "dayjs": "^1.11.5", + "mysql2": "^3.6.0", + "typescript": "^5.2.2" + }, + "devDependencies": { + "@types/mocha": "^10.0.0", + "c8": "^9.1.0", + "mocha": "^10.0.0", + "mocha-suppress-logs": "^0.3.1", + "prettier": "^3.0.3" + } }, - "../device-reservation/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "dev": true, + "../device-reservation/node_modules/@acuminous/bitsyntax": { + "version": "0.1.2", "license": "MIT", "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "buffer-more-ints": "~1.0.0", + "debug": "^4.3.4", + "safe-buffer": "~5.1.2" + }, + "engines": { + "node": ">=0.8" } }, - "../device-reservation/node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" + "../device-reservation/node_modules/@crosslab/booking-service-common": { + "resolved": "../common", + "link": true }, "../device-reservation/node_modules/@types/amqplib": { "version": "0.10.1", @@ -18118,18 +16211,6 @@ "version": "20.4.2", "license": "MIT" }, - "../device-reservation/node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "../device-reservation/node_modules/amqplib": { "version": "0.10.3", "license": "MIT", @@ -18185,22 +16266,6 @@ "node": ">= 8" } }, - "../device-reservation/node_modules/append-transform": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/archy": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "../device-reservation/node_modules/argparse": { "version": "2.0.1", "dev": true, @@ -18250,82 +16315,10 @@ "dev": true, "license": "ISC" }, - "../device-reservation/node_modules/browserslist": { - "version": "4.21.9", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, "../device-reservation/node_modules/buffer-more-ints": { "version": "1.0.0", "license": "MIT" }, - "../device-reservation/node_modules/caching-transform": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/caniuse-lite": { - "version": "1.0.30001516", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, "../device-reservation/node_modules/chalk": { "version": "4.1.2", "dev": true, @@ -18378,14 +16371,6 @@ "fsevents": "~2.3.2" } }, - "../device-reservation/node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "../device-reservation/node_modules/cliui": { "version": "7.0.4", "dev": true, @@ -18407,13 +16392,8 @@ "node": ">=7.0.0" } }, - "../device-reservation/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/commondir": { - "version": "1.0.1", + "../device-reservation/node_modules/color-name": { + "version": "1.1.4", "dev": true, "license": "MIT" }, @@ -18422,28 +16402,10 @@ "dev": true, "license": "MIT" }, - "../device-reservation/node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, "../device-reservation/node_modules/core-util-is": { "version": "1.0.3", "license": "MIT" }, - "../device-reservation/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "../device-reservation/node_modules/dayjs": { "version": "1.11.9", "license": "MIT" @@ -18463,28 +16425,6 @@ } } }, - "../device-reservation/node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/default-require-extensions": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "../device-reservation/node_modules/denque": { "version": "2.1.0", "license": "Apache-2.0", @@ -18500,21 +16440,11 @@ "node": ">=0.3.1" } }, - "../device-reservation/node_modules/electron-to-chromium": { - "version": "1.4.461", - "dev": true, - "license": "ISC" - }, "../device-reservation/node_modules/emoji-regex": { "version": "8.0.0", "dev": true, "license": "MIT" }, - "../device-reservation/node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, "../device-reservation/node_modules/escalade": { "version": "3.1.1", "dev": true, @@ -18534,18 +16464,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "../device-reservation/node_modules/fill-range": { "version": "7.0.1", "dev": true, @@ -18557,22 +16475,6 @@ "node": ">=8" } }, - "../device-reservation/node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, "../device-reservation/node_modules/find-up": { "version": "5.0.0", "dev": true, @@ -18596,37 +16498,6 @@ "flat": "cli.js" } }, - "../device-reservation/node_modules/foreground-child": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../device-reservation/node_modules/fromentries": { - "version": "1.3.2", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "../device-reservation/node_modules/fs.realpath": { "version": "1.0.0", "dev": true, @@ -18639,14 +16510,6 @@ "is-property": "^1.0.2" } }, - "../device-reservation/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "../device-reservation/node_modules/get-caller-file": { "version": "2.0.5", "dev": true, @@ -18655,14 +16518,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "../device-reservation/node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, "../device-reservation/node_modules/glob": { "version": "7.2.0", "dev": true, @@ -18713,19 +16568,6 @@ "node": "*" } }, - "../device-reservation/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, "../device-reservation/node_modules/has-flag": { "version": "4.0.0", "dev": true, @@ -18734,21 +16576,6 @@ "node": ">=8" } }, - "../device-reservation/node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "../device-reservation/node_modules/he": { "version": "1.2.0", "dev": true, @@ -18757,11 +16584,6 @@ "he": "bin/he" } }, - "../device-reservation/node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, "../device-reservation/node_modules/iconv-lite": { "version": "0.6.3", "license": "MIT", @@ -18772,22 +16594,6 @@ "node": ">=0.10.0" } }, - "../device-reservation/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../device-reservation/node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "../device-reservation/node_modules/inflight": { "version": "1.0.6", "dev": true, @@ -18859,151 +16665,19 @@ "version": "1.0.2", "license": "MIT" }, - "../device-reservation/node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "../device-reservation/node_modules/is-unicode-supported": { "version": "0.1.0", "dev": true, "license": "MIT", "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "../device-reservation/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-report": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/istanbul-reports": { - "version": "3.1.5", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, + "../device-reservation/node_modules/isarray": { + "version": "0.0.1", "license": "MIT" }, "../device-reservation/node_modules/js-yaml": { @@ -19017,28 +16691,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "../device-reservation/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "../device-reservation/node_modules/locate-path": { "version": "6.0.0", "dev": true, @@ -19053,11 +16705,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, "../device-reservation/node_modules/log-symbols": { "version": "4.1.0", "dev": true, @@ -19087,20 +16734,6 @@ "node": ">=10" } }, - "../device-reservation/node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "../device-reservation/node_modules/minimatch": { "version": "5.0.1", "dev": true, @@ -19204,362 +16837,81 @@ "dev": true, "license": "MIT", "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../device-reservation/node_modules/node-preload": { - "version": "0.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/node-releases": { - "version": "2.0.13", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/nyc": { - "version": "15.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "../device-reservation/node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "../device-reservation/node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../device-reservation/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/p-map": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" + "nanoid": "bin/nanoid.cjs" }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "../device-reservation/node_modules/pkg-dir": { - "version": "4.2.0", + "../device-reservation/node_modules/normalize-path": { + "version": "3.0.0", "dev": true, "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "../device-reservation/node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", + "../device-reservation/node_modules/once": { + "version": "1.4.0", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" + "wrappy": "1" } }, - "../device-reservation/node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", + "../device-reservation/node_modules/p-limit": { + "version": "3.1.0", "dev": true, "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", + "../device-reservation/node_modules/p-locate": { + "version": "5.0.0", "dev": true, "license": "MIT", "dependencies": { - "p-try": "^2.0.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "../device-reservation/node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", + "../device-reservation/node_modules/path-exists": { + "version": "4.0.0", "dev": true, "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, "engines": { "node": ">=8" } }, - "../device-reservation/node_modules/process-on-spawn": { - "version": "1.0.0", + "../device-reservation/node_modules/path-is-absolute": { + "version": "1.0.1", "dev": true, "license": "MIT", - "dependencies": { - "fromentries": "^1.2.0" - }, "engines": { - "node": ">=8" + "node": ">=0.10.0" + } + }, + "../device-reservation/node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, "../device-reservation/node_modules/querystringify": { @@ -19595,17 +16947,6 @@ "node": ">=8.10.0" } }, - "../device-reservation/node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "../device-reservation/node_modules/require-directory": { "version": "2.1.1", "dev": true, @@ -19614,37 +16955,10 @@ "node": ">=0.10.0" } }, - "../device-reservation/node_modules/require-main-filename": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, "../device-reservation/node_modules/requires-port": { "version": "1.0.0", "license": "MIT" }, - "../device-reservation/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "../device-reservation/node_modules/safe-buffer": { "version": "5.1.2", "license": "MIT" @@ -19653,14 +16967,6 @@ "version": "2.1.2", "license": "MIT" }, - "../device-reservation/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "../device-reservation/node_modules/seq-queue": { "version": "0.0.5" }, @@ -19672,64 +16978,6 @@ "randombytes": "^2.1.0" } }, - "../device-reservation/node_modules/set-blocking": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/spawn-wrap": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, "../device-reservation/node_modules/sqlstring": { "version": "2.3.3", "license": "MIT", @@ -19765,14 +17013,6 @@ "node": ">=8" } }, - "../device-reservation/node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "../device-reservation/node_modules/strip-json-comments": { "version": "3.1.1", "dev": true, @@ -19798,47 +17038,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "../device-reservation/node_modules/test-exclude": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../device-reservation/node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../device-reservation/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "../device-reservation/node_modules/to-regex-range": { "version": "5.0.1", "dev": true, @@ -19854,22 +17053,6 @@ "version": "2.6.0", "license": "0BSD" }, - "../device-reservation/node_modules/type-fest": { - "version": "0.8.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "../device-reservation/node_modules/typescript": { "version": "4.9.5", "license": "Apache-2.0", @@ -19881,35 +17064,6 @@ "node": ">=4.2.0" } }, - "../device-reservation/node_modules/update-browserslist-db": { - "version": "1.0.11", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, "../device-reservation/node_modules/url-parse": { "version": "1.5.10", "license": "MIT", @@ -19918,33 +17072,6 @@ "requires-port": "^1.0.0" } }, - "../device-reservation/node_modules/uuid": { - "version": "8.3.2", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../device-reservation/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/which-module": { - "version": "2.0.1", - "dev": true, - "license": "ISC" - }, "../device-reservation/node_modules/workerpool": { "version": "6.2.1", "dev": true, @@ -19971,17 +17098,6 @@ "dev": true, "license": "ISC" }, - "../device-reservation/node_modules/write-file-atomic": { - "version": "3.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "../device-reservation/node_modules/y18n": { "version": "5.0.8", "dev": true, @@ -20073,6 +17189,7 @@ "dependencies": { "@crosslab/booking-service-common": "file:../common", "@crosslab/service-device-reservation": "file:../device-reservation", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "@types/express": "^4.17.13", "amqplib": "^0.10.3", @@ -20082,6 +17199,7 @@ "typescript": "^5.2.2" }, "devDependencies": { + "node-mocks-http": "^1.14.1", "prettier": "^3.0.3" } }, diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index 7340d690..b32c76cc 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -141,90 +141,19 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter } export const deleteBookingByID: deleteBookingByIDSignature = async (request, parameters) => { - let requestID: bigint = BigInt(parameters.ID); - let success: boolean = false; - - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - await db.beginTransaction(); - - try { - let [rows, fields]: [any, any] = await db.execute("SELECT `status`, `user` FROM booking WHERE `id`=? FOR UPDATE", [requestID]); - if (rows.length === 0) { - return { - status: 404, - } - } - - switch (rows[0].status) { - case "pending": - case "booked": - // Everything ok - break; - case "active-pending": - case "active": - case "active-rejected": - return { - status: 423, - } - - case "rejected": - case "cancelled": - return { - status: 200, - } - - default: - throw Error("BUG: unknown status " + rows[0].status); - break; - } + let [code, err] = await commonRemoveBooking(BigInt(parameters.ID)) - if (rows[0].user != request.authorization.user) { - return { - status: 401, - } - } - - // delete booking - let connection = await amqplib.connect(config.AmqpUrl); - let channel = await connection.createChannel(); - - try { - await channel.assertQueue("device-freeing", { - durable: true - }); - - let [devicesRows, devicesFields]: [any, any] = await db.execute("SELECT `id` FROM bookeddevices WHERE `booking`=? FOR UPDATE", [requestID]); - for (let i = 0; i < devicesRows.length; i++) { - if (!channel.sendToQueue("device-freeing", Buffer.from(devicesRows[i].id.toString()), { persistent: true })) { - throw new Error("amqp queue full"); - } - } - } finally { - channel.close(); - connection.close(); - } - - await db.execute("UPDATE booking SET `status`=?, `message`=? WHERE id=?", ["cancelled", "Cancelled by user", requestID]); - - success = true; - } catch (err) { + // Typescript seems to have problems to infer body correctly with case 500. + // Therefore, the solution here is more complicated + if(code === 500) { return { - status: 500, - body: err.toString(), - } - } finally { - if (success) { - db.commit(); - } else { - db.rollback(); + status: code, + body: err ?? "No error", } - db.end(); } - return { - status: 200, + status: code, } } @@ -351,19 +280,89 @@ export const patchBookingByID: patchBookingByIDSignature = async (request, param } export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async (request, parameters) => { - // add your implementation here - if(true) { // TODO: Check Permission - // TODO - } else { + let [code, err] = await commonRemoveBooking(BigInt(parameters.ID)) + // Typescript seems to have problems to infer body correctly with case 500. + // Therefore, the solution here is more complicated + if(code === 500) { return { - status: 401, // TODO: Use 403 + status: code, + body: err ?? "No error", } } return { - status: 500, - body: "TODO: Method not implemented", + status: code, } } -export default {postBooking, getBookingByID, deleteBookingByID, patchBookingByID, deleteBookingByIDDestroy} \ No newline at end of file +export default {postBooking, getBookingByID, deleteBookingByID, patchBookingByID, deleteBookingByIDDestroy} + +async function commonRemoveBooking(requestID: bigint) : Promise<[404|200|423|500, string|null]> { + let success: boolean = false; + + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + await db.beginTransaction(); + + try { + let [rows, fields]: [any, any] = await db.execute("SELECT `status`, FROM booking WHERE `id`=? FOR UPDATE", [requestID]); + if (rows.length === 0) { + return [404, null]; + } + + switch (rows[0].status) { + case "pending": + case "booked": + // Everything ok + break; + case "active-pending": + case "active": + case "active-rejected": + return [423, null]; + + case "rejected": + case "cancelled": + return [200, null]; + + default: + throw Error("BUG: unknown status " + rows[0].status); + break; + } + + // delete booking + let connection = await amqplib.connect(config.AmqpUrl); + let channel = await connection.createChannel(); + + try { + await channel.assertQueue("device-freeing", { + durable: true + }); + + let [devicesRows, devicesFields]: [any, any] = await db.execute("SELECT `id` FROM bookeddevices WHERE `booking`=? FOR UPDATE", [requestID]); + for (let i = 0; i < devicesRows.length; i++) { + if (!channel.sendToQueue("device-freeing", Buffer.from(devicesRows[i].id.toString()), { persistent: true })) { + throw new Error("amqp queue full"); + } + } + } finally { + channel.close(); + connection.close(); + } + + await db.execute("UPDATE booking SET `status`=?, `message`=? WHERE id=?", ["cancelled", "Cancelled by user", requestID]); + + success = true; + } catch (err) { + return [500, err.toString()]; + } finally { + if (success) { + db.commit(); + } else { + db.rollback(); + } + db.end(); + } + + + return [200, null]; +} \ No newline at end of file From 8fa0652208c0564e988a7b332c24f9fe21084514 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Thu, 16 May 2024 13:25:11 +0000 Subject: [PATCH 09/79] Added authorization dummys for tests --- .../src/test_common/src/authorizationDummy.ts | 21 +++++++++++++++++++ services/booking/src/test_common/src/index.ts | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 services/booking/src/test_common/src/authorizationDummy.ts diff --git a/services/booking/src/test_common/src/authorizationDummy.ts b/services/booking/src/test_common/src/authorizationDummy.ts new file mode 100644 index 00000000..770fe25c --- /dev/null +++ b/services/booking/src/test_common/src/authorizationDummy.ts @@ -0,0 +1,21 @@ +export function addAuthorizationDummys(request: any, authorized: boolean) { + const auth = authorized; + + request.authorization = {}; + + request.authorization.user = "dummy"; + + request.authorization.check_authorization_or_fail = async function(action:string, id:string) : Promise { + if(!auth) { + throw Error(); + } + } + + request.authorization.relate = async function(user: string, action:string, id:string) : Promise { + return true; + } + + request.authorization.unrelate = async function(user: string, action:string, id:string) : Promise { + return true; + } +} \ No newline at end of file diff --git a/services/booking/src/test_common/src/index.ts b/services/booking/src/test_common/src/index.ts index e760d841..fdb7e071 100644 --- a/services/booking/src/test_common/src/index.ts +++ b/services/booking/src/test_common/src/index.ts @@ -1,4 +1,5 @@ export * from './devicereservationhelper'; export * from './fakeserver'; export * from './setup'; -export * from './fakerequest' \ No newline at end of file +export * from './fakerequest' +export * from './authorizationDummy' \ No newline at end of file From af13c152d0bd0cfaf637adf0d545c5f3537e20a6 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 21 May 2024 17:12:39 +0000 Subject: [PATCH 10/79] Added authorization to booking server --- services/authorization/policy/crosslab.rego | 7 ++++ .../booking-backend/src/operations/index.ts | 10 +++++- .../booking-frontend/src/operations/index.ts | 32 ++++++++++++++++--- .../schedule-service/src/operations/index.ts | 3 ++ 4 files changed, 47 insertions(+), 5 deletions(-) diff --git a/services/authorization/policy/crosslab.rego b/services/authorization/policy/crosslab.rego index 1f262e94..128f7b60 100644 --- a/services/authorization/policy/crosslab.rego +++ b/services/authorization/policy/crosslab.rego @@ -95,6 +95,13 @@ rebac_allow if { not subject in ["user:anonymous"] } +# Allow everyone to create a booking +rebac_allow if { + object in ["booking:~~~TYPE~~~"] + input.action in ["create"] + not subject in ["user:anonymous"] +} + # Final decision allow if { scope_allow diff --git a/services/booking/src/booking-backend/src/operations/index.ts b/services/booking/src/booking-backend/src/operations/index.ts index 63370ca4..faa293ed 100644 --- a/services/booking/src/booking-backend/src/operations/index.ts +++ b/services/booking/src/booking-backend/src/operations/index.ts @@ -14,6 +14,8 @@ export const putBookingByIDLock: putBookingByIDLockSignature = async (request, ) => { let bookingID: bigint = BigInt(parameters.ID); + await request.authorization.check_authorization_or_fail('edit', `booking:${bookingID}`); + let db = await mysql.createConnection(config.BookingDSN); await db.connect(); await db.beginTransaction(); @@ -101,6 +103,8 @@ export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async (requ ) => { let bookingID: bigint = BigInt(parameters.ID); + await request.authorization.check_authorization_or_fail('edit', `booking:${bookingID}`); + let db = await mysql.createConnection(config.BookingDSN); await db.connect(); @@ -156,13 +160,17 @@ export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async (requ export const postBookingCallbackByID: postBookingCallbackByIDSignature = async (request, parameters, ) => { + let parameterID: bigint = BigInt(parameters.ID); + + await request.authorization.check_authorization_or_fail('edit', `booking:${parameterID}`); + let db = await mysql.createConnection(config.BookingDSN); await db.connect(); try { let [rows, fields]: [any, any] = await db.execute( 'SELECT `type`, `targetbooking`, `parameters` FROM callback WHERE `id`=?', - [parameters.ID], + [parameterID], ); if (rows.length === 0) { return { diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index b32c76cc..e7cca7ef 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -23,6 +23,9 @@ import { DeviceBookingRequest } from "@crosslab/service-booking-backend"; import { config } from "../config" export const postBooking: postBookingSignature = async (request, body) => { + + await request.authorization.check_authorization_or_fail('create', `booking`); + let connection = await amqplib.connect(config.AmqpUrl); let channel = await connection.createChannel(); @@ -49,6 +52,8 @@ export const postBooking: postBookingSignature = async (request, body) => { }; await db.commit(); + await request.authorization.relate(`user:${request.authorization.user}`, 'owner', `booking:${bookingID}`); + // Send devices to backend for (let i = 0; i < body.Devices.length; i++) { let s = JSON.stringify(new DeviceBookingRequest(bookingID, new URL(body.Devices[i].ID), i, dayjs(body.Time.Start), dayjs(body.Time.End))); @@ -85,12 +90,14 @@ export const postBooking: postBookingSignature = async (request, body) => { } export const getBookingByID: getBookingByIDSignature = async (request, parameters) => { + let requestID: bigint = BigInt(parameters.ID) + + await request.authorization.check_authorization_or_fail('view', `booking:${requestID}`); + let db = await mysql.createConnection(config.BookingDSN); await db.connect(); await db.beginTransaction(); - let requestID: bigint = BigInt(parameters.ID) - try { let body: getBookingByID200ResponseType["body"] = { Booking: { ID: parameters.ID, Time: { Start: "", End: "" }, Devices: [], Type: "normal", You: false, External: false, Status: "pending", Message: "" }, Locked: false } @@ -141,7 +148,11 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter } export const deleteBookingByID: deleteBookingByIDSignature = async (request, parameters) => { - let [code, err] = await commonRemoveBooking(BigInt(parameters.ID)) + let requestID:bigint = BigInt(parameters.ID); + + await request.authorization.check_authorization_or_fail('delete', `booking:${requestID}`); + + let [code, err] = await commonRemoveBooking(requestID); // Typescript seems to have problems to infer body correctly with case 500. // Therefore, the solution here is more complicated @@ -152,6 +163,9 @@ export const deleteBookingByID: deleteBookingByIDSignature = async (request, par } } + // Since we keep the booking in the database, there is no need to unrelate the booking here. + // Students might check it later if someone else deleted it. + return { status: code, } @@ -159,6 +173,9 @@ export const deleteBookingByID: deleteBookingByIDSignature = async (request, par export const patchBookingByID: patchBookingByIDSignature = async (request, parameters, body) => { let requestID: bigint = BigInt(parameters.ID); + + await request.authorization.check_authorization_or_fail('edit', `booking:${requestID}`); + let success: boolean = false; let db = await mysql.createConnection(config.BookingDSN); @@ -280,7 +297,11 @@ export const patchBookingByID: patchBookingByIDSignature = async (request, param } export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async (request, parameters) => { - let [code, err] = await commonRemoveBooking(BigInt(parameters.ID)) + let requestID:bigint = BigInt(parameters.ID); + + await request.authorization.check_authorization_or_fail('delete', `booking:${requestID}`); + + let [code, err] = await commonRemoveBooking(requestID) // Typescript seems to have problems to infer body correctly with case 500. // Therefore, the solution here is more complicated if(code === 500) { @@ -290,6 +311,9 @@ export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async } } + // Since we keep the booking in the database, there is no need to unrelate the booking here. + // Students might check it later if someone else deleted it. + return { status: code, } diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index 5bf02f32..96ea614d 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -16,6 +16,9 @@ import { timetableAnd, timetableNot } from '../timetable'; // TODO: Missing availability since it is not yet well defined export const postSchedule: postScheduleSignature = async (request, body) => { + + await request.authorization.check_authorization_or_fail('create', `booking`); + let api: APIClient = new APIClient(config.OwnURL, config.API_TOKEN); const laterReq = new Map(); // Device in request, device list, request From 35147b7568407f4a288247214c971858659b7229 Mon Sep 17 00:00:00 2001 From: Louis Kobras Date: Tue, 21 May 2024 17:33:28 +0000 Subject: [PATCH 11/79] fix wrong error message in case of unknown status --- .../booking/src/test_common/src/fakeserver.ts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/services/booking/src/test_common/src/fakeserver.ts b/services/booking/src/test_common/src/fakeserver.ts index 0fc92ac4..40370df2 100644 --- a/services/booking/src/test_common/src/fakeserver.ts +++ b/services/booking/src/test_common/src/fakeserver.ts @@ -75,8 +75,8 @@ export async function startFakeServer() { return; default: res - .status(fakeServerConfig.proxy_server_status) - .send('Undefined error' + fakeServerConfig.proxy_server_status); + .status(fakeServerConfig.device_service_status) + .send('Undefined error' + fakeServerConfig.device_service_status); return; } }); @@ -99,8 +99,8 @@ export async function startFakeServer() { return; default: res - .status(fakeServerConfig.proxy_server_status) - .send('Undefined error' + fakeServerConfig.proxy_server_status); + .status(fakeServerConfig.device_service_status) + .send('Undefined error' + fakeServerConfig.device_service_status); return; } }); @@ -123,8 +123,8 @@ export async function startFakeServer() { return; default: res - .status(fakeServerConfig.proxy_server_status) - .send('Undefined error' + fakeServerConfig.proxy_server_status); + .status(fakeServerConfig.device_service_status) + .send('Undefined error' + fakeServerConfig.device_service_status); return; } }); @@ -159,8 +159,8 @@ export async function startFakeServer() { return; default: res - .status(fakeServerConfig.proxy_server_status) - .send('Undefined error' + fakeServerConfig.proxy_server_status); + .status(fakeServerConfig.device_service_status) + .send('Undefined error' + fakeServerConfig.device_service_status); return; } }); @@ -195,8 +195,8 @@ export async function startFakeServer() { return; default: res - .status(fakeServerConfig.proxy_server_status) - .send('Undefined error' + fakeServerConfig.proxy_server_status); + .status(fakeServerConfig.device_service_status) + .send('Undefined error' + fakeServerConfig.device_service_status); return; } }); From 4d9c7080a5e179781e70f517c2511d04180382a7 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 21 May 2024 17:41:29 +0000 Subject: [PATCH 12/79] Added script for quick test setup in devcontainer While the test script can be used, sometimes while developing you just want to set the test environemnt up and start each test individually --- services/booking/create_devcontainer_test_environment.bash | 7 +++++++ services/booking/documentation-and-generation.bash | 0 2 files changed, 7 insertions(+) create mode 100755 services/booking/create_devcontainer_test_environment.bash mode change 100644 => 100755 services/booking/documentation-and-generation.bash diff --git a/services/booking/create_devcontainer_test_environment.bash b/services/booking/create_devcontainer_test_environment.bash new file mode 100755 index 00000000..506058eb --- /dev/null +++ b/services/booking/create_devcontainer_test_environment.bash @@ -0,0 +1,7 @@ +#!/bin/bash +sudo service rabbitmq-server start +sudo service mariadb start +sudo mysql -e "CREATE DATABASE unittest DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;" +sudo mysql -e "CREATE USER 'test'@localhost IDENTIFIED BY 'test';" +sudo mysql -e "GRANT ALL PRIVILEGES ON unittest.* to 'test'@localhost;" +sudo mysql -e "FLUSH PRIVILEGES;" \ No newline at end of file diff --git a/services/booking/documentation-and-generation.bash b/services/booking/documentation-and-generation.bash old mode 100644 new mode 100755 From 30661c64266187063ffb1bfe8c7ed1922b506ec6 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 22 May 2024 08:56:01 +0000 Subject: [PATCH 13/79] Merged authorization-dummy into fake-request Tests should now run --- .../src/test_common/src/authorizationDummy.ts | 21 ------------------- .../src/test_common/src/fakerequest.ts | 16 ++++++++++++++ services/booking/src/test_common/src/index.ts | 1 - 3 files changed, 16 insertions(+), 22 deletions(-) delete mode 100644 services/booking/src/test_common/src/authorizationDummy.ts diff --git a/services/booking/src/test_common/src/authorizationDummy.ts b/services/booking/src/test_common/src/authorizationDummy.ts deleted file mode 100644 index 770fe25c..00000000 --- a/services/booking/src/test_common/src/authorizationDummy.ts +++ /dev/null @@ -1,21 +0,0 @@ -export function addAuthorizationDummys(request: any, authorized: boolean) { - const auth = authorized; - - request.authorization = {}; - - request.authorization.user = "dummy"; - - request.authorization.check_authorization_or_fail = async function(action:string, id:string) : Promise { - if(!auth) { - throw Error(); - } - } - - request.authorization.relate = async function(user: string, action:string, id:string) : Promise { - return true; - } - - request.authorization.unrelate = async function(user: string, action:string, id:string) : Promise { - return true; - } -} \ No newline at end of file diff --git a/services/booking/src/test_common/src/fakerequest.ts b/services/booking/src/test_common/src/fakerequest.ts index 6634b68d..83243290 100644 --- a/services/booking/src/test_common/src/fakerequest.ts +++ b/services/booking/src/test_common/src/fakerequest.ts @@ -2,6 +2,7 @@ import * as nodeMocksHttp from "node-mocks-http" type FakeRequestOptions = { user: string + isAuthorized: boolean }; export function getFakeRequest(options?: FakeRequestOptions) { @@ -11,11 +12,26 @@ export function getFakeRequest(options?: FakeRequestOptions) { let request = nodeMocksHttp.createRequest(); request.authorization = {}; request.authorization.user = options.user; + + request.authorization.check_authorization_or_fail = async function(action:string, id:string) : Promise { + if(!options.isAuthorized) { + throw Error(); + } + } + + request.authorization.relate = async function(user: string, action:string, id:string) : Promise { + return true; + } + + request.authorization.unrelate = async function(user: string, action:string, id:string) : Promise { + return true; + } return request; } export function fakeRequestDefaultConfig() : FakeRequestOptions { return{ user: "testuser", + isAuthorized: true, }; } \ No newline at end of file diff --git a/services/booking/src/test_common/src/index.ts b/services/booking/src/test_common/src/index.ts index fdb7e071..fb2b640a 100644 --- a/services/booking/src/test_common/src/index.ts +++ b/services/booking/src/test_common/src/index.ts @@ -2,4 +2,3 @@ export * from './devicereservationhelper'; export * from './fakeserver'; export * from './setup'; export * from './fakerequest' -export * from './authorizationDummy' \ No newline at end of file From 5d3ed3e6539eddb5ea4b722408ee20b8bf0b2e8b Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 24 May 2024 10:47:02 +0000 Subject: [PATCH 14/79] Added dummys for --- .../booking/src/booking-backend/package.json | 2 +- .../src/operations/index_test.ts | 79 ++ .../src/booking-frontend/package-lock.json | 1193 ++++++++++++++++- .../booking/src/booking-frontend/package.json | 8 +- .../src/operations/index_test.ts | 145 ++ 5 files changed, 1420 insertions(+), 7 deletions(-) create mode 100644 services/booking/src/booking-backend/src/operations/index_test.ts create mode 100644 services/booking/src/booking-frontend/src/operations/index_test.ts diff --git a/services/booking/src/booking-backend/package.json b/services/booking/src/booking-backend/package.json index 5a9775fc..460ade16 100644 --- a/services/booking/src/booking-backend/package.json +++ b/services/booking/src/booking-backend/package.json @@ -4,7 +4,7 @@ "description": "Part of booking service. Does most of the actual work and is horizontal scaleable.", "main": "app/index.js", "scripts": { - "test": "npm run build && env-cmd -e development nyc --include=\"app/messageDefinition.js\" --include=\"app/amqpHandle.js\" --include=\"app/internal.js\" --include=\"app/operations.js\" mocha app/*_test.js", + "test": "npm run build && env-cmd -e development c8 --include=\"app/messageDefinition.js\" --include=\"app/amqpHandle.js\" --include=\"app/internal.js\" --include=\"app/operations.js\" mocha app/*_test.js", "build:generate": "openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", "build:compile": "tsc", "build": "npm run build:generate && npm run build:compile", diff --git a/services/booking/src/booking-backend/src/operations/index_test.ts b/services/booking/src/booking-backend/src/operations/index_test.ts new file mode 100644 index 00000000..37472f62 --- /dev/null +++ b/services/booking/src/booking-backend/src/operations/index_test.ts @@ -0,0 +1,79 @@ +import { + fakeServerConfig, + getFakeInstitutePrefix, + getFakeOwnURL, + getSQLDNS, + resetFakeServerVars, + setupDummySql, + startFakeServer, + stopFakeServer, + tearDownDummySql, + getFakeRequest, + } from '@crosslab/booking-service-test-common'; +import * as mocha from 'mocha'; + +import { config } from '../config'; +import { } from './index'; + +mocha.describe('operations.ts', function () { + this.timeout(10000); + + mocha.before(function () { + // Config + config.OwnURL = getFakeOwnURL(); + config.InstitutePrefix = getFakeInstitutePrefix(); + config.ReservationDSN = getSQLDNS(); + + startFakeServer(); + }); + + mocha.after(function () { + stopFakeServer(); + }); + + mocha.beforeEach(async function () { + // Reset server status + resetFakeServerVars(); + + // Setup database + await setupDummySql(); + }); + + mocha.afterEach(async function () { + await tearDownDummySql(); + }); + + mocha.it('putBookingByIDLock no authorization', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('putBookingByIDLock lock success', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('putBookingByIDLock already locked', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('putBookingByIDLock wrong status', async function (){ + throw Error("Not implemented"); + }); + + + + mocha.it('deleteBookingByIDLock no authorization', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('deleteBookingByIDLock unlock success', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('deleteBookingByIDLock already unlocked', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('deleteBookingByIDLock wrong status', async function (){ + throw Error("Not implemented"); + }); +}); diff --git a/services/booking/src/booking-frontend/package-lock.json b/services/booking/src/booking-frontend/package-lock.json index 7a302f78..5650fb05 100644 --- a/services/booking/src/booking-frontend/package-lock.json +++ b/services/booking/src/booking-frontend/package-lock.json @@ -13,6 +13,7 @@ "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", "@cross-lab-project/service-common": "file:../../../common", "@crosslab/booking-service-common": "file:../common", + "@crosslab/booking-service-test-common": "file:../test_common", "@crosslab/service-booking-backend": "file:../booking-backend", "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", @@ -20,12 +21,15 @@ "ajv-formats": "^2.1.1", "amqplib": "^0.10.2", "dayjs": "^1.11.7", - "env-cmd": "^10.1.0", "express": "^4.18.1", "mysql2": "^3.6.0", "typescript": "^5.2.2" }, "devDependencies": { + "@types/mocha": "^10.0.6", + "c8": "^9.1.0", + "env-cmd": "^10.1.0", + "mocha": "^10.4.0", "prettier": "^3.0.3" } }, @@ -18282,6 +18286,12 @@ "node": ">=6.9.0" } }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "node_modules/@cross-lab-project/codegen-typescript-addon": { "resolved": "../../../../helper/crosslab-typescript-addon", "link": true @@ -18298,10 +18308,48 @@ "resolved": "../common", "link": true }, + "node_modules/@crosslab/booking-service-test-common": { + "resolved": "../test_common", + "link": true + }, "node_modules/@crosslab/service-booking-backend": { "resolved": "../booking-backend", "link": true }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@trivago/prettier-plugin-sort-imports": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.0.tgz", @@ -18370,10 +18418,22 @@ "version": "2.0.1", "license": "MIT" }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, "node_modules/@types/mime": { "version": "1.3.2", "license": "MIT" }, + "node_modules/@types/mocha": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", + "dev": true + }, "node_modules/@types/node": { "version": "20.4.2", "license": "MIT" @@ -18456,6 +18516,24 @@ "node": ">=10" } }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -18467,10 +18545,47 @@ "node": ">=4" } }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/array-flatten": { "version": "1.1.1", "license": "MIT" }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/body-parser": { "version": "1.20.1", "license": "MIT", @@ -18504,6 +18619,33 @@ "version": "2.0.0", "license": "MIT" }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, "node_modules/buffer-more-ints": { "version": "1.0.0", "license": "MIT" @@ -18515,6 +18657,72 @@ "node": ">= 0.8" } }, + "node_modules/c8": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", + "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=14.14.0" + } + }, + "node_modules/c8/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/c8/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/c8/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/call-bind": { "version": "1.0.2", "license": "MIT", @@ -18526,6 +18734,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -18539,6 +18759,44 @@ "node": ">=4" } }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -18554,11 +18812,18 @@ }, "node_modules/commander": { "version": "4.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">= 6" } }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, "node_modules/content-disposition": { "version": "0.5.4", "license": "MIT", @@ -18594,6 +18859,12 @@ "node": ">= 0.6" } }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/cookie": { "version": "0.5.0", "license": "MIT", @@ -18611,6 +18882,7 @@ }, "node_modules/cross-spawn": { "version": "7.0.3", + "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -18640,6 +18912,18 @@ } } }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/denque": { "version": "2.1.0", "license": "Apache-2.0", @@ -18662,10 +18946,25 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/ee-first": { "version": "1.1.1", "license": "MIT" }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "node_modules/encodeurl": { "version": "1.0.2", "license": "MIT", @@ -18675,6 +18974,7 @@ }, "node_modules/env-cmd": { "version": "10.1.0", + "dev": true, "license": "MIT", "dependencies": { "commander": "^4.0.0", @@ -18687,6 +18987,15 @@ "node": ">=8.0.0" } }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/escape-html": { "version": "1.0.3", "license": "MIT" @@ -18779,6 +19088,18 @@ "version": "3.1.3", "license": "MIT" }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/finalhandler": { "version": "1.2.0", "license": "MIT", @@ -18806,6 +19127,47 @@ "version": "2.0.0", "license": "MIT" }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/forwarded": { "version": "0.2.0", "license": "MIT", @@ -18820,6 +19182,26 @@ "node": ">= 0.6" } }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.1", "license": "MIT" @@ -18831,7 +19213,16 @@ "is-property": "^1.0.2" } }, - "node_modules/get-intrinsic": { + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { "version": "1.2.1", "license": "MIT", "dependencies": { @@ -18844,6 +19235,37 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -18890,6 +19312,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "node_modules/http-errors": { "version": "2.0.0", "license": "MIT", @@ -18914,6 +19351,17 @@ "node": ">=0.10.0" } }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, "node_modules/inherits": { "version": "2.0.4", "license": "ISC" @@ -18925,18 +19373,148 @@ "node": ">= 0.10" } }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-property": { "version": "1.0.2", "license": "MIT" }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isarray": { "version": "0.0.1", "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", + "dev": true, "license": "ISC" }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/javascript-natural-sort": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", @@ -18947,6 +19525,18 @@ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -18962,11 +19552,112 @@ "version": "1.0.0", "license": "MIT" }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", @@ -18980,6 +19671,21 @@ "node": ">=16.14" } }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/media-typer": { "version": "0.3.0", "license": "MIT", @@ -19025,6 +19731,95 @@ "node": ">= 0.6" } }, + "node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", + "dev": true, + "dependencies": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "8.1.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/ms": { "version": "2.1.2", "license": "MIT" @@ -19081,6 +19876,15 @@ "node": ">= 0.6" } }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.12.3", "license": "MIT", @@ -19092,10 +19896,49 @@ "version": "2.4.1", "license": "MIT", "dependencies": { - "ee-first": "1.1.1" + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" }, "engines": { - "node": ">= 0.8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/parseurl": { @@ -19105,8 +19948,27 @@ "node": ">= 0.8" } }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/path-key": { "version": "3.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -19116,6 +19978,18 @@ "version": "0.1.7", "license": "MIT" }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/prettier": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", @@ -19165,6 +20039,15 @@ "version": "2.2.0", "license": "MIT" }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, "node_modules/range-parser": { "version": "1.2.1", "license": "MIT", @@ -19195,6 +20078,27 @@ "string_decoder": "~0.10.x" } }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "license": "MIT", @@ -19214,6 +20118,18 @@ "version": "2.1.2", "license": "MIT" }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/send": { "version": "0.18.0", "license": "MIT", @@ -19254,6 +20170,15 @@ "node_modules/seq-queue": { "version": "0.0.5" }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/serve-static": { "version": "1.15.0", "license": "MIT", @@ -19273,6 +20198,7 @@ }, "node_modules/shebang-command": { "version": "2.0.0", + "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -19283,6 +20209,7 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -19300,6 +20227,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -19326,6 +20265,44 @@ "version": "0.10.31", "license": "MIT" }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -19337,6 +20314,62 @@ "node": ">=4" } }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -19345,6 +20378,18 @@ "node": ">=4" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/toidentifier": { "version": "1.0.1", "license": "MIT", @@ -19404,6 +20449,20 @@ "node": ">= 0.4.0" } }, + "node_modules/v8-to-istanbul": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, "node_modules/vary": { "version": "1.1.2", "license": "MIT", @@ -19413,6 +20472,7 @@ }, "node_modules/which": { "version": "2.0.2", + "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -19423,6 +20483,131 @@ "engines": { "node": ">= 8" } + }, + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/services/booking/src/booking-frontend/package.json b/services/booking/src/booking-frontend/package.json index 5457fc1f..ab0b3f6b 100644 --- a/services/booking/src/booking-frontend/package.json +++ b/services/booking/src/booking-frontend/package.json @@ -4,7 +4,7 @@ "description": "Part of booking service. Main service with which a user interacts.", "main": "app/index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "test": "npm run build && env-cmd -e development c8 --include=\"app/operations/index.js\" mocha app/operations/*_test.js", "build:generate": "openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", "build:compile": "tsc", "build": "npm run build:generate && npm run build:compile", @@ -19,6 +19,7 @@ "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", "@cross-lab-project/service-common": "file:../../../common", "@crosslab/booking-service-common": "file:../common", + "@crosslab/booking-service-test-common": "file:../test_common", "@crosslab/service-booking-backend": "file:../booking-backend", "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", @@ -26,12 +27,15 @@ "ajv-formats": "^2.1.1", "amqplib": "^0.10.2", "dayjs": "^1.11.7", - "env-cmd": "^10.1.0", "express": "^4.18.1", "mysql2": "^3.6.0", "typescript": "^5.2.2" }, "devDependencies": { + "@types/mocha": "^10.0.6", + "c8": "^9.1.0", + "env-cmd": "^10.1.0", + "mocha": "^10.4.0", "prettier": "^3.0.3" } } diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts new file mode 100644 index 00000000..a2f7e524 --- /dev/null +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -0,0 +1,145 @@ +import { + fakeServerConfig, + getFakeInstitutePrefix, + getFakeOwnURL, + getSQLDNS, + resetFakeServerVars, + setupDummySql, + startFakeServer, + stopFakeServer, + tearDownDummySql, + getFakeRequest, + } from '@crosslab/booking-service-test-common'; +import * as mocha from 'mocha'; + +import { config } from '../config'; +import { } from './index'; + +mocha.describe('operations.ts', function () { + this.timeout(10000); + + mocha.before(function () { + // Config + config.OwnURL = getFakeOwnURL(); + config.InstitutePrefix = getFakeInstitutePrefix(); + config.ReservationDSN = getSQLDNS(); + + startFakeServer(); + }); + + mocha.after(function () { + stopFakeServer(); + }); + + mocha.beforeEach(async function () { + // Reset server status + resetFakeServerVars(); + + // Setup database + await setupDummySql(); + }); + + mocha.afterEach(async function () { + await tearDownDummySql(); + }); + + mocha.it('postBooking authorization failed', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('postBooking single local device available', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('postBooking single local device not available', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('postBooking local group available', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('postBooking local group single device not available', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('postBooking local group all devices not available', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('postBooking local edge device', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('postBooking local instantiable device', async function (){ + throw Error("Not implemented"); + }); + + + + mocha.it('getBookingByID authorization failed', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('getBookingByID success', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('getBookingByID booking not available', async function (){ + throw Error("Not implemented"); + }); + + + + mocha.it('deleteBookingByID authorization failed', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('deleteBookingByID success', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('deleteBookingByID booking not available', async function (){ + throw Error("Not implemented"); + }); + + + + mocha.it('patchBookingByID authorization failed', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('patchBookingByID success unlocked', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('patchBookingByID success locked', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('patchBookingByID booking not available', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('patchBookingByID wrong status unlocked', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('patchBookingByID wrong status locked', async function (){ + throw Error("Not implemented"); + }); + + + + mocha.it('deleteBookingByIDDestroy authorization failed', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('deleteBookingByIDDestroy success', async function (){ + throw Error("Not implemented"); + }); + + mocha.it('deleteBookingByIDDestroy booking not available', async function (){ + throw Error("Not implemented"); + }); +}); From 15e3568269e9ac3b1501742fb6e1d2166c13a721 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 24 May 2024 13:40:44 +0000 Subject: [PATCH 15/79] Started fixing tests --- .../booking-backend/src/integration_test.ts | 23 +++++++------------ .../src/devicereservationhelper.ts | 11 ++++++++- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index d672d642..cdd58a93 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -1,5 +1,5 @@ //const why = require('why-is-node-running') -import { sleep } from '@crosslab/booking-service-common'; +import { baseConfig, sleep } from '@crosslab/booking-service-common'; import { fakeServerConfig, getFakeInstitutePrefix, @@ -20,7 +20,6 @@ import * as http from 'http'; import * as mocha from 'mocha'; import * as mysql from 'mysql2/promise'; -import { config } from './config'; import { callbackType, handleCallback, randomID } from './internal'; let connection: amqplib.Connection; @@ -31,10 +30,10 @@ mocha.describe('internal.ts', function () { mocha.before(async function () { // Config - config.OwnURL = getFakeOwnURL(); - config.InstitutePrefix = getFakeInstitutePrefix(); - config.ReservationDSN = getSQLDNS(); - config.BookingDSN = getSQLDNS(); + baseConfig.OwnURL = getFakeOwnURL(); + baseConfig.InstitutePrefix = getFakeInstitutePrefix(); + baseConfig.ReservationDSN = getSQLDNS(); + baseConfig.BookingDSN = getSQLDNS(); await startFakeServer(); }); @@ -52,26 +51,19 @@ mocha.describe('internal.ts', function () { await setupDummySql(); // Connect to amqp - connection = await amqplib.connect(config.AmqpUrl); + connection = await amqplib.connect(baseConfig.AmqpUrl); channel = await connection.createChannel(); await channel.assertQueue('device-booking', { durable: true, }); - await channel.assertQueue('device-reservation', { - durable: true, - }); - await channel.assertQueue('device-freeing', { durable: true, }); // Drain queues while (await channel.get('device-booking', { noAck: true })) {} - - while (await channel.get('device-reservation', { noAck: true })) {} - while (await channel.get('device-freeing', { noAck: true })) {} await startDeviceReservation(); }); @@ -90,7 +82,7 @@ mocha.describe('internal.ts', function () { await stopDeviceReservation(); }); - +/* mocha.it('handleCallback() DeviceUpdate (local single device available)', async () => { let db = await mysql.createConnection(getSQLDNS()); db.connect(); @@ -287,6 +279,7 @@ mocha.describe('internal.ts', function () { db.end(); } }); +*/ mocha.it('dispatchCallback()', async () => { throw Error('TODO implement'); diff --git a/services/booking/src/test_common/src/devicereservationhelper.ts b/services/booking/src/test_common/src/devicereservationhelper.ts index cfeb90cb..aa9f2287 100644 --- a/services/booking/src/test_common/src/devicereservationhelper.ts +++ b/services/booking/src/test_common/src/devicereservationhelper.ts @@ -15,6 +15,11 @@ export async function startDeviceReservation() { let connection: amqplib.Connection = await amqplib.connect(baseConfig.AmqpUrl); let channel: amqplib.Channel = await connection.createChannel(); + // Ensure queue exists + await channel.assertQueue('device-reservation', { + durable: true, + }); + // Drain queue for tests while (await channel.get('device-reservation', { noAck: true })) {} @@ -42,10 +47,14 @@ export async function stopDeviceReservation() { let m = new ReservationMessage(ReservationRequest.Stop, 'TEST_ANSWER_STOP_SERVER'); channel.sendToQueue('device-reservation', Buffer.from(JSON.stringify(m))); - await sleep(1000); + await sleep(1000); while (await channel.get('TEST_ANSWER_STOP_SERVER', { noAck: true })) {} await channel.deleteQueue('TEST_ANSWER_STOP_SERVER'); + + // Drain queue + while (await channel.get('device-reservation', { noAck: true })) {} + await channel.deleteQueue('device-reservation'); await channel.close(); From bae2301171b596fdcc127b543d7fa2f8861d1b7a Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 24 May 2024 13:42:36 +0000 Subject: [PATCH 16/79] Test fix --- .../src/booking-backend/src/operations/index_test.ts | 8 ++++---- .../src/booking-frontend/src/operations/index_test.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/services/booking/src/booking-backend/src/operations/index_test.ts b/services/booking/src/booking-backend/src/operations/index_test.ts index 37472f62..736ee03e 100644 --- a/services/booking/src/booking-backend/src/operations/index_test.ts +++ b/services/booking/src/booking-backend/src/operations/index_test.ts @@ -1,3 +1,4 @@ +import { baseConfig } from '@crosslab/booking-service-common'; import { fakeServerConfig, getFakeInstitutePrefix, @@ -12,7 +13,6 @@ import { } from '@crosslab/booking-service-test-common'; import * as mocha from 'mocha'; -import { config } from '../config'; import { } from './index'; mocha.describe('operations.ts', function () { @@ -20,9 +20,9 @@ mocha.describe('operations.ts', function () { mocha.before(function () { // Config - config.OwnURL = getFakeOwnURL(); - config.InstitutePrefix = getFakeInstitutePrefix(); - config.ReservationDSN = getSQLDNS(); + baseConfig.OwnURL = getFakeOwnURL(); + baseConfig.InstitutePrefix = getFakeInstitutePrefix(); + baseConfig.ReservationDSN = getSQLDNS(); startFakeServer(); }); diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index a2f7e524..bb024317 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -1,3 +1,4 @@ +import { baseConfig } from '@crosslab/booking-service-common'; import { fakeServerConfig, getFakeInstitutePrefix, @@ -12,7 +13,6 @@ import { } from '@crosslab/booking-service-test-common'; import * as mocha from 'mocha'; -import { config } from '../config'; import { } from './index'; mocha.describe('operations.ts', function () { @@ -20,9 +20,9 @@ mocha.describe('operations.ts', function () { mocha.before(function () { // Config - config.OwnURL = getFakeOwnURL(); - config.InstitutePrefix = getFakeInstitutePrefix(); - config.ReservationDSN = getSQLDNS(); + baseConfig.OwnURL = getFakeOwnURL(); + baseConfig.InstitutePrefix = getFakeInstitutePrefix(); + baseConfig.ReservationDSN = getSQLDNS(); startFakeServer(); }); From e6a7c31ca4ccf613f9a979f71be857f8ff34d82f Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 24 May 2024 13:55:21 +0000 Subject: [PATCH 17/79] Fixing tests --- .../src/booking-backend/src/integration_test.ts | 12 +++++++++--- .../src/booking-backend/src/operations/index_test.ts | 7 ++++++- .../booking-frontend/src/operations/index_test.ts | 7 ++++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index cdd58a93..a7f882e8 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -21,6 +21,7 @@ import * as mocha from 'mocha'; import * as mysql from 'mysql2/promise'; import { callbackType, handleCallback, randomID } from './internal'; +import {config} from './config' let connection: amqplib.Connection; let channel: amqplib.Channel; @@ -29,12 +30,17 @@ mocha.describe('internal.ts', function () { this.timeout(10000); mocha.before(async function () { - // Config + // Config - use both global config and local config to ensure different application parts work with same config baseConfig.OwnURL = getFakeOwnURL(); baseConfig.InstitutePrefix = getFakeInstitutePrefix(); baseConfig.ReservationDSN = getSQLDNS(); baseConfig.BookingDSN = getSQLDNS(); + config.OwnURL = getFakeOwnURL(); + config.InstitutePrefix = getFakeInstitutePrefix(); + config.ReservationDSN = getSQLDNS(); + config.BookingDSN = getSQLDNS(); + await startFakeServer(); }); @@ -82,7 +88,7 @@ mocha.describe('internal.ts', function () { await stopDeviceReservation(); }); -/* + mocha.it('handleCallback() DeviceUpdate (local single device available)', async () => { let db = await mysql.createConnection(getSQLDNS()); db.connect(); @@ -279,7 +285,7 @@ mocha.describe('internal.ts', function () { db.end(); } }); -*/ + mocha.it('dispatchCallback()', async () => { throw Error('TODO implement'); diff --git a/services/booking/src/booking-backend/src/operations/index_test.ts b/services/booking/src/booking-backend/src/operations/index_test.ts index 736ee03e..017f2157 100644 --- a/services/booking/src/booking-backend/src/operations/index_test.ts +++ b/services/booking/src/booking-backend/src/operations/index_test.ts @@ -14,16 +14,21 @@ import { import * as mocha from 'mocha'; import { } from './index'; +import {config} from '../config' mocha.describe('operations.ts', function () { this.timeout(10000); mocha.before(function () { - // Config + // Config - use both global config and local config to ensure different application parts work with same config baseConfig.OwnURL = getFakeOwnURL(); baseConfig.InstitutePrefix = getFakeInstitutePrefix(); baseConfig.ReservationDSN = getSQLDNS(); + config.OwnURL = getFakeOwnURL(); + config.InstitutePrefix = getFakeInstitutePrefix(); + config.ReservationDSN = getSQLDNS(); + startFakeServer(); }); diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index bb024317..19696ed8 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -14,15 +14,20 @@ import { import * as mocha from 'mocha'; import { } from './index'; +import {config} from '../config' mocha.describe('operations.ts', function () { this.timeout(10000); mocha.before(function () { - // Config + // Config - use both global config and local config to ensure different application parts work with same config baseConfig.OwnURL = getFakeOwnURL(); baseConfig.InstitutePrefix = getFakeInstitutePrefix(); baseConfig.ReservationDSN = getSQLDNS(); + + config.OwnURL = getFakeOwnURL(); + config.InstitutePrefix = getFakeInstitutePrefix(); + config.ReservationDSN = getSQLDNS(); startFakeServer(); }); From 68a3bd6d9a04851a91b65b396936016498f762ca Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 24 May 2024 14:24:38 +0000 Subject: [PATCH 18/79] Test clean up --- .../booking-backend/src/integration_test.ts | 84 ++----------------- 1 file changed, 7 insertions(+), 77 deletions(-) diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index a7f882e8..2d6e23be 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -190,7 +190,7 @@ mocha.describe('internal.ts', function () { }, ); - mocha.it('handleCallback() BookingUpdate (group, available)', async () => { + mocha.it('handleCallback() BookingUpdate (local group, available)', async () => { let db = await mysql.createConnection(getSQLDNS()); db.connect(); try { @@ -209,7 +209,7 @@ mocha.describe('internal.ts', function () { } }); - mocha.it('handleCallback() BookingUpdate (group, not available)', async () => { + mocha.it('handleCallback() BookingUpdate (local group, not available)', async () => { let db = await mysql.createConnection(getSQLDNS()); db.connect(); try { @@ -229,72 +229,10 @@ mocha.describe('internal.ts', function () { } }); - mocha.it('handleCallback() BookingUpdate (remote, available)', async () => { - try { - let db = await mysql.createConnection(getSQLDNS()); - db.connect(); - try { - await handleCallback(callbackType.BookingUpdate, BigInt(4), { - Position: 0, - }); - await sleep(1000); - let [rows, fields] = await db.execute('SELECT `status` FROM booking WHERE id=?', [ - BigInt(3), - ]); - if (rows[0].status != 'booked') { - throw new Error('Booking should be booked, is ' + rows[0].status); - } - } catch (err) { - throw err; - } finally { - db.end(); - } - } catch (err) { - console.log(err); - throw err; - } - }); - - mocha.it('handleCallback() BookingUpdate (remote, not available)', async () => { - let db = await mysql.createConnection(getSQLDNS()); - db.connect(); - try { - fakeServerConfig.device_not_available = true; - fakeServerConfig.proxy_schedule_empty = true; - fakeServerConfig.booking_status = 'rejected'; - await handleCallback(callbackType.BookingUpdate, BigInt(4), { Position: 0 }); - await sleep(1000); - let [rows, fields] = await db.execute('SELECT `status` FROM booking WHERE id=?', [ - BigInt(3), - ]); - if (rows[0].status == 'booked') { - let [rowsinner, fieldsinner] = await db.execute( - 'SELECT `bookeddevice` FROM bookeddevices WHERE booking=? AND originalposition=?', - [BigInt(4), 0], - ); - throw new Error( - 'Booking should not be booked, is ' + - rows[0].status + - ', booked device is ' + - rowsinner[0].bookeddevice, - ); - } - } catch (err) { - throw err; - } finally { - db.end(); - } - }); - - mocha.it('dispatchCallback()', async () => { throw Error('TODO implement'); }); - mocha.it('reservateDevice() - remote', async () => { - throw Error('TODO implement'); - }); - mocha.it('reservateDevice() - local single device', async () => { throw Error('TODO implement'); }); @@ -307,10 +245,6 @@ mocha.describe('internal.ts', function () { throw Error('TODO implement'); }); - mocha.it('reservateDevice() - remote not available', async () => { - throw Error('TODO implement'); - }); - mocha.it('reservateDevice() - local single device not available', async () => { throw Error('TODO implement'); }); @@ -323,10 +257,6 @@ mocha.describe('internal.ts', function () { throw Error('TODO implement'); }); - mocha.it('freeDevice() - remote', async () => { - throw Error('TODO implement'); - }); - mocha.it('freeDevice() - local single device', async () => { throw Error('TODO implement'); }); @@ -352,19 +282,19 @@ mocha.describe('internal.ts', function () { } }); - mocha.it('DeleteBooking()', async () => { + mocha.it('DeleteBooking() local single device', async () => { throw Error('TODO implement'); }); - mocha.it('putBookingByIDLock', async () => { + mocha.it('DeleteBooking() local multiple devices', async () => { throw Error('TODO implement'); }); - mocha.it('deleteBookingByIDLock', async () => { + mocha.it('DeleteBooking() no authorization', async () => { throw Error('TODO implement'); }); - mocha.it('postBookingCallbackByID', async () => { + mocha.it('DeleteBooking() non-existing', async () => { throw Error('TODO implement'); }); -}); +}); \ No newline at end of file From e29cce863dc7704403ac50f4a123568cd40bb267 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 28 May 2024 13:13:19 +0000 Subject: [PATCH 19/79] Test setup script: Always drop data in database --- services/booking/create_devcontainer_test_environment.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/booking/create_devcontainer_test_environment.bash b/services/booking/create_devcontainer_test_environment.bash index 506058eb..29506083 100755 --- a/services/booking/create_devcontainer_test_environment.bash +++ b/services/booking/create_devcontainer_test_environment.bash @@ -1,7 +1,9 @@ #!/bin/bash sudo service rabbitmq-server start sudo service mariadb start +sudo mysql -e "DROP DATABASE IF EXISTS unittest;" sudo mysql -e "CREATE DATABASE unittest DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;" +sudo mysql -e "DROP USER IF EXISTS 'test'@localhost;" sudo mysql -e "CREATE USER 'test'@localhost IDENTIFIED BY 'test';" sudo mysql -e "GRANT ALL PRIVILEGES ON unittest.* to 'test'@localhost;" sudo mysql -e "FLUSH PRIVILEGES;" \ No newline at end of file From f93418469351986bada98127ddbe104a2454bb87 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 28 May 2024 13:54:49 +0000 Subject: [PATCH 20/79] Implemented test for dispatchCallback Unfortunately, TypeScript didn't understand changes in variables outside the function, so a work-around was needed here. Co-authored-by: lassertos --- .../booking-backend/src/integration_test.ts | 64 ++++++++++++++++++- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index 2d6e23be..5fff6b37 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -20,7 +20,7 @@ import * as http from 'http'; import * as mocha from 'mocha'; import * as mysql from 'mysql2/promise'; -import { callbackType, handleCallback, randomID } from './internal'; +import { callbackType, dispatchCallback, handleCallback, randomID } from './internal'; import {config} from './config' let connection: amqplib.Connection; @@ -230,7 +230,67 @@ mocha.describe('internal.ts', function () { }); mocha.it('dispatchCallback()', async () => { - throw Error('TODO implement'); + resetFakeServerVars(); + + await dispatchCallback(BigInt(1)); + await sleep(100); + let serverConfig = fakeServerConfig; // Workaround since TypeScript does not notice var changes in functions + if(serverConfig.callback_test_local_single_was_called === false){ + throw new Error("http://localhost:10801/test_callbacks/test-local-single was not called"); + } + if(serverConfig.callback_test_local_two_first_was_called === true){ + throw new Error("wrong callback called"); + } + if(serverConfig.callback_test_local_two_second_was_called === true){ + throw new Error("wrong callback called"); + } + if(serverConfig.callback_test_local_group_was_called === true){ + throw new Error("wrong callback called"); + } + if(serverConfig.callback_test_remote_single_was_called === true){ + throw new Error("wrong callback called"); + } + resetFakeServerVars(); + + await dispatchCallback(BigInt(2)); + await sleep(100); + serverConfig = fakeServerConfig; // Workaround since TypeScript does not notice var changes in functions + if(serverConfig.callback_test_local_single_was_called === true){ + throw new Error("wrong callback called"); + } + if(serverConfig.callback_test_local_two_first_was_called === false){ + throw new Error("http://localhost:10801/test_callbacks/test-local-single was not called"); + } + if(serverConfig.callback_test_local_two_second_was_called === false){ + throw new Error("http://localhost:10801/test_callbacks/test-local-single was not called"); + } + if(serverConfig.callback_test_local_group_was_called === true){ + throw new Error("wrong callback called"); + } + if(serverConfig.callback_test_remote_single_was_called === true){ + throw new Error("wrong callback called"); + } + resetFakeServerVars(); + + await dispatchCallback(BigInt(3)); + await sleep(100); + serverConfig = fakeServerConfig; // Workaround since TypeScript does not notice var changes in functions + if(serverConfig.callback_test_local_single_was_called === true){ + throw new Error("wrong callback called"); + } + if(serverConfig.callback_test_local_two_first_was_called === true){ + throw new Error("wrong callback called"); + } + if(serverConfig.callback_test_local_two_second_was_called === true){ + throw new Error("wrong callback called"); + } + if(serverConfig.callback_test_local_group_was_called === false){ + throw new Error("http://localhost:10801/test_callbacks/test-local-group was not called"); + } + if(serverConfig.callback_test_remote_single_was_called === true){ + throw new Error("wrong callback called"); + } + resetFakeServerVars(); }); mocha.it('reservateDevice() - local single device', async () => { From fe8babc005eabfe707dc9106e7c47d8005392b96 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 28 May 2024 17:44:33 +0000 Subject: [PATCH 21/79] Added 'reservateDevice() - local single device' --- .../booking-backend/src/integration_test.ts | 130 +++++-- .../src/booking-backend/src/internal.ts | 318 +++++++++--------- .../booking/src/test_common/src/fakeserver.ts | 7 + services/booking/src/test_common/src/setup.ts | 114 +++++++ 4 files changed, 390 insertions(+), 179 deletions(-) diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index 5fff6b37..5d2a2d36 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -14,14 +14,15 @@ import { tearDownDummySql, } from '@crosslab/booking-service-test-common'; import * as amqplib from 'amqplib'; -import dayjs from 'dayjs'; +import dayjs, { Dayjs } from 'dayjs'; import express from 'express'; import * as http from 'http'; import * as mocha from 'mocha'; import * as mysql from 'mysql2/promise'; -import { callbackType, dispatchCallback, handleCallback, randomID } from './internal'; -import {config} from './config' +import { callbackType, dispatchCallback, handleCallback, randomID, reservateDevice } from './internal'; +import { config } from './config' +import { DeviceBookingRequest } from './messageDefinition'; let connection: amqplib.Connection; let channel: amqplib.Channel; @@ -46,7 +47,7 @@ mocha.describe('internal.ts', function () { mocha.after(async function () { await stopFakeServer(); - //setTimeout(function(){console.log("why?");why();console.log("WHY??");}, 10000); + //setTimeout(function(){console.log("why?");why();console.log("WHY??");}, 1000); }); mocha.beforeEach(async function () { @@ -69,8 +70,8 @@ mocha.describe('internal.ts', function () { }); // Drain queues - while (await channel.get('device-booking', { noAck: true })) {} - while (await channel.get('device-freeing', { noAck: true })) {} + while (await channel.get('device-booking', { noAck: true })) { } + while (await channel.get('device-freeing', { noAck: true })) { } await startDeviceReservation(); }); @@ -235,19 +236,19 @@ mocha.describe('internal.ts', function () { await dispatchCallback(BigInt(1)); await sleep(100); let serverConfig = fakeServerConfig; // Workaround since TypeScript does not notice var changes in functions - if(serverConfig.callback_test_local_single_was_called === false){ + if (serverConfig.callback_test_local_single_was_called === false) { throw new Error("http://localhost:10801/test_callbacks/test-local-single was not called"); } - if(serverConfig.callback_test_local_two_first_was_called === true){ + if (serverConfig.callback_test_local_two_first_was_called === true) { throw new Error("wrong callback called"); } - if(serverConfig.callback_test_local_two_second_was_called === true){ + if (serverConfig.callback_test_local_two_second_was_called === true) { throw new Error("wrong callback called"); } - if(serverConfig.callback_test_local_group_was_called === true){ + if (serverConfig.callback_test_local_group_was_called === true) { throw new Error("wrong callback called"); } - if(serverConfig.callback_test_remote_single_was_called === true){ + if (serverConfig.callback_test_remote_single_was_called === true) { throw new Error("wrong callback called"); } resetFakeServerVars(); @@ -255,19 +256,19 @@ mocha.describe('internal.ts', function () { await dispatchCallback(BigInt(2)); await sleep(100); serverConfig = fakeServerConfig; // Workaround since TypeScript does not notice var changes in functions - if(serverConfig.callback_test_local_single_was_called === true){ + if (serverConfig.callback_test_local_single_was_called === true) { throw new Error("wrong callback called"); } - if(serverConfig.callback_test_local_two_first_was_called === false){ + if (serverConfig.callback_test_local_two_first_was_called === false) { throw new Error("http://localhost:10801/test_callbacks/test-local-single was not called"); } - if(serverConfig.callback_test_local_two_second_was_called === false){ + if (serverConfig.callback_test_local_two_second_was_called === false) { throw new Error("http://localhost:10801/test_callbacks/test-local-single was not called"); } - if(serverConfig.callback_test_local_group_was_called === true){ + if (serverConfig.callback_test_local_group_was_called === true) { throw new Error("wrong callback called"); } - if(serverConfig.callback_test_remote_single_was_called === true){ + if (serverConfig.callback_test_remote_single_was_called === true) { throw new Error("wrong callback called"); } resetFakeServerVars(); @@ -275,26 +276,93 @@ mocha.describe('internal.ts', function () { await dispatchCallback(BigInt(3)); await sleep(100); serverConfig = fakeServerConfig; // Workaround since TypeScript does not notice var changes in functions - if(serverConfig.callback_test_local_single_was_called === true){ + if (serverConfig.callback_test_local_single_was_called === true) { throw new Error("wrong callback called"); } - if(serverConfig.callback_test_local_two_first_was_called === true){ + if (serverConfig.callback_test_local_two_first_was_called === true) { throw new Error("wrong callback called"); } - if(serverConfig.callback_test_local_two_second_was_called === true){ + if (serverConfig.callback_test_local_two_second_was_called === true) { throw new Error("wrong callback called"); } - if(serverConfig.callback_test_local_group_was_called === false){ + if (serverConfig.callback_test_local_group_was_called === false) { throw new Error("http://localhost:10801/test_callbacks/test-local-group was not called"); } - if(serverConfig.callback_test_remote_single_was_called === true){ + if (serverConfig.callback_test_remote_single_was_called === true) { throw new Error("wrong callback called"); } resetFakeServerVars(); }); mocha.it('reservateDevice() - local single device', async () => { - throw Error('TODO implement'); + await reservateDevice(new DeviceBookingRequest(BigInt(5), new URL("http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"), 0, dayjs("1999-01-10T08:00:00Z"), dayjs("1999-01-10T09:00:00Z"))); + await sleep(1000); + + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + + // Test booking + let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(5)]); + if (rows.length === 0) { + throw new Error("booking not found"); + } + + if (rows[0].status !== "booked") { + throw new Error("wrong status " + rows[0].status); + } + + + // Test bookeddevice + [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [5, 0]); + if (rows.length === 0) { + throw new Error("booked device not found"); + } + + if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong original device " + rows[0].originaldevice); + } + + if (rows[0].bookeddevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong booked device " + rows[0].bookeddevice); + } + + if (rows[0].remotereference !== null) { + throw new Error("wrong remote reference " + rows[0].remotereference); + } + + if (rows[0].local != true) { // Unfortunate, type conversion + throw new Error("wrong local " + rows[0].local); + } + + if (rows[0].reservation < 0 || rows[0].reservation === undefined || rows[0].reservation === null) { + throw new Error("bad reservation " + rows[0].reservation); + } + + let bookingID = rows[0].reservation; + + // Test reservation + [rows, fields] = await db.execute("SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?", [bookingID]); + + if (rows.length === 0) { + throw new Error("reservation not found"); + } + + if (rows[0].device !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong device " + rows[0].device); + } + + if (dayjs(rows[0].start).isSame(dayjs("1999-03-10T08:00:00Z"))) { + throw new Error("wrong start " + rows[0].start); + } + + if (dayjs(rows[0].end).isSame(dayjs("1999-03-10T09:00:00Z"))) { + throw new Error("wrong end " + rows[0].end); + } + } finally { + await db.end(); + } }); mocha.it('reservateDevice() - local two devices', async () => { @@ -317,6 +385,24 @@ mocha.describe('internal.ts', function () { throw Error('TODO implement'); }); + mocha.it('reservateDevice() - booking not existing', async () => { + let errFound = false; + try { + await reservateDevice(new DeviceBookingRequest(BigInt(5000), new URL("http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"), 0, dayjs("1999-01-10T08:00:00Z"), dayjs("1999-01-10T09:00:00Z"))); + await sleep(1000); + } catch (err) { + if (err.toString() != new Error("Booking 5000 does not exist").toString()) { + console.log("Unknown err " + err); + throw err; + } + errFound = true; + } + + if (!errFound) { + throw new Error("No error on unknown booking"); + } + }); + mocha.it('freeDevice() - local single device', async () => { throw Error('TODO implement'); }); diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index a6de4cf1..a8784bcd 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -233,7 +233,7 @@ async function reservationCheckStatus(bookingID: bigint) { return; } - [rows, fields] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE booking=? AND bookeddevice=NULL", [bookingID]); + [rows, fields] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE booking=? AND bookeddevice=?", [bookingID, null]); if (rows[0].n == 0) { // Every device is booked @@ -266,189 +266,193 @@ export async function reservateDevice(r: DeviceBookingRequest) { let db = await mysql.createConnection(config.BookingDSN); await db.connect(); - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE id=?", [r.BookingID]); - if (rows.length == 0) { - throw new Error("Booking " + r.BookingID + " does not exist"); - } - - if (rows[0].status === "rejected" || rows[0].status === "cancelled" || rows[0].status === "active-rejected") { - // Get early out - this booking will not success anyway - return; - } - await db.end(); - - let api: APIClient = new APIClient(config.OwnURL, config.API_TOKEN); - - let deviceListResponse = await api.getDevice(r.Device.toString(), { flat_group: true }); - let possibleDevices: string[] = []; + try { + let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE id=?", [r.BookingID]); + if (rows.length == 0) { + throw new Error("Booking " + r.BookingID + " does not exist"); + } - if (deviceListResponse.type === "device" || deviceListResponse.type === "cloud instantiable" || deviceListResponse.type === "edge instantiable") { - possibleDevices.push(deviceListResponse.url) - } else if (deviceListResponse.type === "group") { - // group - for (let i = 0; i < deviceListResponse.devices.length; i++) { - possibleDevices.push(deviceListResponse.devices[i].url); + if (rows[0].status === "rejected" || rows[0].status === "cancelled" || rows[0].status === "active-rejected") { + // Get early out - this booking will not success anyway + return; } - } else { - throw new Error("BUG: Unknown device type for" + r.Device.toString()) - } - { - // Sort devices - // This has two goals - // * Randomise the order of devices, so not everyone wants to book the same device first - // * Prefer own devices over remote devices - let own: string[] = []; - let other: string[] = []; + let api: APIClient = new APIClient(config.OwnURL, config.API_TOKEN); - for (let i = 0; i < possibleDevices.length; i++) { - if (BelongsToUs(new URL(possibleDevices[i]))) { - own.push(possibleDevices[i]); - } else { - other.push(possibleDevices[i]); + let deviceListResponse = await api.getDevice(r.Device.toString(), { flat_group: true }); + let possibleDevices: string[] = []; + + if (deviceListResponse.type === "device" || deviceListResponse.type === "cloud instantiable" || deviceListResponse.type === "edge instantiable") { + possibleDevices.push(deviceListResponse.url) + } else if (deviceListResponse.type === "group") { + // group + for (let i = 0; i < deviceListResponse.devices.length; i++) { + possibleDevices.push(deviceListResponse.devices[i].url); } + } else { + throw new Error("BUG: Unknown device type for" + r.Device.toString()) } - lodash.shuffle(own); - lodash.shuffle(other); - own.push(...other); - possibleDevices = own; - } + { + // Sort devices + // This has two goals + // * Randomise the order of devices, so not everyone wants to book the same device first + // * Prefer own devices over remote devices + let own: string[] = []; + let other: string[] = []; + + for (let i = 0; i < possibleDevices.length; i++) { + if (BelongsToUs(new URL(possibleDevices[i]))) { + own.push(possibleDevices[i]); + } else { + other.push(possibleDevices[i]); + } + } - nextDevice: for (let i = 0; i < possibleDevices.length; i++) { - let schedule: BookingServiceSignatures.ScheduleSuccessResponse["body"]; - try { - schedule = await api.schedule({ Experiment: { Devices: [{ ID: possibleDevices[i] }] }, Time: { Start: r.Start.toISOString(), End: r.End.toISOString() }, Combined: false, onlyOwn: true }); - } catch (e) { - continue - } - if (schedule.length !== 1) { - // Should only be one device - continue - } - if (schedule[0].Booked.length !== 0) { - // Device is booked - continue + lodash.shuffle(own); + lodash.shuffle(other); + own.push(...other); + possibleDevices = own; } - // Book device - if (BelongsToUs(new URL(possibleDevices[i]))) { - let connection: amqplib.Connection - let channel: amqplib.Channel - let returnChannel = randomID(); - let queueCreated = false; + nextDevice: for (let i = 0; i < possibleDevices.length; i++) { + let schedule: BookingServiceSignatures.ScheduleSuccessResponse["body"]; try { - connection = await amqplib.connect(config.AmqpUrl); - channel = await connection.createChannel(); + schedule = await api.schedule({ Experiment: { Devices: [{ ID: possibleDevices[i] }] }, Time: { Start: r.Start.toISOString(), End: r.End.toISOString() }, Combined: false, onlyOwn: true }); + } catch (e) { + continue + } + if (schedule.length !== 1) { + // Should only be one device + continue + } + if (schedule[0].Booked.length !== 0) { + // Device is booked + continue + } - await channel.assertQueue("device-reservation", { - durable: true - }); + // Book device + if (BelongsToUs(new URL(possibleDevices[i]))) { + let connection: amqplib.Connection + let channel: amqplib.Channel + let returnChannel = randomID(); + let queueCreated = false; + try { + connection = await amqplib.connect(config.AmqpUrl); + channel = await connection.createChannel(); - await channel.assertQueue(returnChannel, { - durable: false - }); + await channel.assertQueue("device-reservation", { + durable: true + }); - queueCreated = true; + await channel.assertQueue(returnChannel, { + durable: false + }); + + queueCreated = true; - let m = new ReservationMessage(ReservationRequest.New, returnChannel); - let url = config.OwnURL; - if (!url.endsWith("/")) { - url = url + "/"; + let m = new ReservationMessage(ReservationRequest.New, returnChannel); + let url = config.OwnURL; + if (!url.endsWith("/")) { + url = url + "/"; + } + url = url + "booking/" + r.BookingID + m.BookingReference = new URL(url); + m.Start = r.Start; + m.End = r.End; + m.Device = new URL(possibleDevices[i]); + + channel.sendToQueue("device-reservation", Buffer.from(JSON.stringify(m))); + + let aUnknown: any; + let counter = 0; + while (true) { + aUnknown = await channel.get(returnChannel, { noAck: true }); + if (typeof (aUnknown) !== "boolean" && aUnknown !== null) { + break + } + counter++; + if (counter >= 50) { + continue nextDevice; + } + await sleep(100) + } + + let a: amqplib.GetMessage = aUnknown as amqplib.GetMessage; + let data = ReservationAnswer.fromString(a.content.toString()); + if (data.Type === ReservationRequest.New && data.Device.toString() === possibleDevices[i] && data.Start.isSame(r.Start) && data.End.isSame(r.End) && data.Successful) { + await db.execute("UPDATE bookeddevices SET `bookeddevice`=?, `reservation`=?, `local`=? WHERE `booking`=? AND `originalposition`=?", [data.Device.toString(), data.ReservationID.toString(), true, r.BookingID, r.Position]) + addDeviceCallback(data.Device, r.BookingID, { "Position": r.Position }); + await reservationCheckStatus(r.BookingID); + return; + } + continue; + } catch (err) { + console.log(err); + continue; + } finally { + if (channel !== undefined) { + await channel.close(); + } + if (connection !== undefined) { + await connection.close(); + } } - url = url + "booking/" + r.BookingID - m.BookingReference = new URL(url); - m.Start = r.Start; - m.End = r.End; - m.Device = new URL(possibleDevices[i]); + } else { + let institution = new URL(possibleDevices[i]).origin; + let putReturn = await api.newBooking({ Devices: [{ ID: possibleDevices[i] }], Time: { Start: r.Start.toISOString(), End: r.End.toISOString() }, BookingReference: r.BookingID.toString() }, { url: institution + "/booking/manage" }); - channel.sendToQueue("device-reservation", Buffer.from(JSON.stringify(m))); + let ID = putReturn.ReservationID; - let aUnknown: any; - let counter = 0; + let counter = -1; while (true) { - aUnknown = await channel.get(returnChannel, { noAck: true }); - if (typeof (aUnknown) !== "boolean" && aUnknown !== null) { - break - } counter++; if (counter >= 50) { continue nextDevice; } - await sleep(100) - } - - let a: amqplib.GetMessage = aUnknown as amqplib.GetMessage; - let data = ReservationAnswer.fromString(a.content.toString()); - if (data.Type === ReservationRequest.New && data.Device.toString() === possibleDevices[i] && data.Start.isSame(r.Start) && data.End.isSame(r.End) && data.Successful) { - await db.execute("UPDATE bookeddevices SET `bookeddevice`=?, `remotereference`=?, `local`=? WHERE `booking`=? AND `originalposition`=?", [data.Device, data.ReservationID.toString(), true, r.BookingID, r.Position]) - addDeviceCallback(data.Device, r.BookingID, { "Position": r.Position }); - await reservationCheckStatus(r.BookingID); - return; - } - continue; - } catch (err) { - continue; - } finally { - if (channel !== undefined) { - await channel.close(); - } - if (connection !== undefined) { - await connection.close(); - } - } - } else { - let institution = new URL(possibleDevices[i]).origin; - let putReturn = await api.newBooking({ Devices: [{ ID: possibleDevices[i] }], Time: { Start: r.Start.toISOString(), End: r.End.toISOString() }, BookingReference: r.BookingID.toString() }, { url: institution + "/booking/manage" }); + await sleep(1000); - let ID = putReturn.ReservationID; + let getReturn = await api.getBooking(institution + "/booking/" + ID); - let counter = -1; - while (true) { - counter++; - if (counter >= 50) { - continue nextDevice; - } - await sleep(1000); - - let getReturn = await api.getBooking(institution + "/booking/" + ID); - - switch (getReturn.Booking.Status) { - case "pending": - case "active-pending": - // Still waiting - continue; - break; - case "booked": - case "active": - // Success - await db.execute("UPDATE bookeddevices SET `bookeddevice`=?, `remotereference`=?, `local`=? WHERE `booking`=? AND `originalposition`=?", [possibleDevices[i], getReturn.Booking.ID, false, r.BookingID, r.Position]) - addBookingCallback(new URL(possibleDevices[i]), r.BookingID, { "Position": r.Position }); - await reservationCheckStatus(r.BookingID); - return; - break; - case "rejected": - case "cancelled": - case "active-rejected": - // Failure - continue nextDevice; - break; - case undefined: - counter += 10; - continue; - break; - default: - console.log("Unknown API response for getBookingManageByID:", getReturn.Booking.Status); - counter += 10; - continue; - break; + switch (getReturn.Booking.Status) { + case "pending": + case "active-pending": + // Still waiting + continue; + break; + case "booked": + case "active": + // Success + await db.execute("UPDATE bookeddevices SET `bookeddevice`=?, `remotereference`=?, `local`=? WHERE `booking`=? AND `originalposition`=?", [possibleDevices[i], getReturn.Booking.ID, false, r.BookingID, r.Position]) + addBookingCallback(new URL(possibleDevices[i]), r.BookingID, { "Position": r.Position }); + await reservationCheckStatus(r.BookingID); + return; + break; + case "rejected": + case "cancelled": + case "active-rejected": + // Failure + continue nextDevice; + break; + case undefined: + counter += 10; + continue; + break; + default: + console.log("Unknown API response for getBookingManageByID:", getReturn.Booking.Status); + counter += 10; + continue; + break; + } } } } - } - // Ok, we were not able to book a device... - DeleteBooking(r.BookingID, "rejected", "Can not book " + r.Device.toString()); + // Ok, we were not able to book a device... + DeleteBooking(r.BookingID, "rejected", "Can not book " + r.Device.toString()); + } finally { + await db.end(); + } } export async function freeDevice(internalreference: bigint) { @@ -626,10 +630,10 @@ export async function DeleteBooking(bookingID: bigint, targetStatus = "cancelled break; } - if(message !== undefined && message !== "") { + if (message !== undefined && message !== "") { let [rows, fields] = await db.execute("SELECT `message` FROM booking WHERE id=?", [bookingID]); let targetMessage: string = ""; - if(rows[0].message === undefined || rows[0].message === null) { + if (rows[0].message === undefined || rows[0].message === null) { targetMessage = message; } else { targetMessage = rows[0].message + "\n" + message; diff --git a/services/booking/src/test_common/src/fakeserver.ts b/services/booking/src/test_common/src/fakeserver.ts index 40370df2..fa7a0a06 100644 --- a/services/booking/src/test_common/src/fakeserver.ts +++ b/services/booking/src/test_common/src/fakeserver.ts @@ -23,6 +23,7 @@ export var fakeServerConfig = { callback_test_local_two_second_was_called: false, callback_test_local_group_was_called: false, callback_test_remote_single_was_called: false, + device_patch_list: [], booking_status: 'booked', }; @@ -388,6 +389,11 @@ export async function startFakeServer() { } }); + app.patch('/devices/*', (req, res) => { + fakeServerConfig.device_patch_list.push([req.path, req.query.changedUrl]); + res.status(200).send(); + }); + app.all('*', (req, res) => { console.log('Fake server got unknown request:', req.path, req.method); res @@ -425,6 +431,7 @@ export function resetFakeServerVars() { fakeServerConfig.callback_test_local_two_second_was_called = false; fakeServerConfig.callback_test_local_group_was_called = false; fakeServerConfig.callback_test_remote_single_was_called = false; + fakeServerConfig.device_patch_list = []; fakeServerConfig.booking_status = 'booked'; } diff --git a/services/booking/src/test_common/src/setup.ts b/services/booking/src/test_common/src/setup.ts index 8e4df311..8604efed 100644 --- a/services/booking/src/test_common/src/setup.ts +++ b/services/booking/src/test_common/src/setup.ts @@ -67,6 +67,8 @@ export async function setupDummySql() { 'CREATE TABLE callback (`id` VARCHAR(600), `type` INTEGER, `targetbooking` BIGINT UNSIGNED NOT NULL, `parameters` JSON NOT NULL DEFAULT "{}", PRIMARY KEY(`id`))', ); + // Booking already booked + // // Fake booking local single device await db.execute( 'INSERT INTO booking (`id`,`start`,`end`,`type`,`status`,`user`,`message`) VALUES (?,?,?,?,?,?,?)', @@ -276,6 +278,118 @@ export async function setupDummySql() { [BigInt(5), callbackType.BookingUpdate, BigInt(4), JSON.stringify({ Position: 0 })], ); + // Booking new + // // Fake booking local single device (5) + await db.execute( + 'INSERT INTO booking (`id`,`start`,`end`,`type`,`status`,`user`,`message`) VALUES (?,?,?,?,?,?,?)', + [ + BigInt(5), + dayjs('1999-01-10T08:00:00Z').toDate(), + dayjs('1999-01-10T09:00:00Z').toDate(), + 'normal', + 'pending', + 'test', + '', + ], + ); + await db.execute( + 'INSERT INTO bookeddevices (`id`,`booking`,`originaldevice`, `originalposition`,`bookeddevice`,`remotereference`,`local`,`reservation`) VALUES (?,?,?,?,?,?,?,?)', + [ + BigInt(6), + BigInt(5), + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + 0, + null, + null, + true, + null, + ], + ); + await db.execute( + 'INSERT INTO callback(`id`,`type`,`targetbooking`,`parameters`) VALUES (?,?,?,?)', + [BigInt(6), callbackType.DeviceUpdate, BigInt(5), JSON.stringify({ Position: 0 })], + ); + + // // Fake booking local two devices (6) + await db.execute( + 'INSERT INTO booking (`id`,`start`,`end`,`type`,`status`,`user`,`message`) VALUES (?,?,?,?,?,?,?)', + [ + BigInt(6), + dayjs('1999-02-10T08:00:00Z').toDate(), + dayjs('1999-02-10T09:00:00Z').toDate(), + 'normal', + 'pending', + 'test', + '', + ], + ); + await db.execute( + 'INSERT INTO bookeddevices (`id`,`booking`,`originaldevice`, `originalposition`,`bookeddevice`,`remotereference`,`local`,`reservation`) VALUES (?,?,?,?,?,?,?,?)', + [ + BigInt(7), + BigInt(6), + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + 0, + null, + null, + true, + null, + ], + ); + await db.execute( + 'INSERT INTO bookeddevices (`id`,`booking`,`originaldevice`, `originalposition`,`bookeddevice`,`remotereference`,`local`,`reservation`) VALUES (?,?,?,?,?,?,?,?)', + [ + BigInt(8), + BigInt(6), + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + 1, + null, + null, + true, + null, + ], + ); + await db.execute( + 'INSERT INTO callback(`id`,`type`,`targetbooking`,`parameters`) VALUES (?,?,?,?)', + [BigInt(7), callbackType.DeviceUpdate, BigInt(6), JSON.stringify({ Position: 0 })], + ); + await db.execute( + 'INSERT INTO callback(`id`,`type`,`targetbooking`,`parameters`) VALUES (?,?,?,?)', + [BigInt(8), callbackType.DeviceUpdate, BigInt(6), JSON.stringify({ Position: 1 })], + ); + + // // Fake booking group (7) + await db.execute( + 'INSERT INTO booking (`id`,`start`,`end`,`type`,`status`,`user`,`message`) VALUES (?,?,?,?,?,?,?)', + [ + BigInt(7), + dayjs('1999-03-10T08:00:00Z').toDate(), + dayjs('1999-03-10T09:00:00Z').toDate(), + 'normal', + 'pending', + 'test', + '', + ], + ); + await db.execute( + 'INSERT INTO bookeddevices (`id`,`booking`,`originaldevice`, `originalposition`,`bookeddevice`,`remotereference`,`local`,`reservation`) VALUES (?,?,?,?,?,?,?,?)', + [ + BigInt(9), + BigInt(7), + 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000010', + 0, + null, + null, + true, + null, + ], + ); + await db.execute( + 'INSERT INTO callback(`id`,`type`,`targetbooking`,`parameters`) VALUES (?,?,?,?)', + [BigInt(9), callbackType.DeviceUpdate, BigInt(7), JSON.stringify({ Position: 0 })], + ); + + // finish await db.commit(); db.end(); From e6baeeee286c50e788b486d750f4adc2aa7848ee Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 29 May 2024 12:15:11 +0000 Subject: [PATCH 22/79] Fixed test --- services/booking/src/booking-backend/src/integration_test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index 5d2a2d36..3c474acf 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -353,11 +353,11 @@ mocha.describe('internal.ts', function () { throw new Error("wrong device " + rows[0].device); } - if (dayjs(rows[0].start).isSame(dayjs("1999-03-10T08:00:00Z"))) { + if (!dayjs(rows[0].start).isSame(dayjs("1999-01-10T08:00:00Z"))) { throw new Error("wrong start " + rows[0].start); } - if (dayjs(rows[0].end).isSame(dayjs("1999-03-10T09:00:00Z"))) { + if (!dayjs(rows[0].end).isSame(dayjs("1999-01-10T09:00:00Z"))) { throw new Error("wrong end " + rows[0].end); } } finally { From e300ac571233aa67586baa3ac68e2880d9237d00 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 29 May 2024 14:35:36 +0000 Subject: [PATCH 23/79] Implemented tests --- .../booking-backend/src/integration_test.ts | 227 +++++++++++++++++- .../src/booking-backend/src/internal.ts | 4 +- 2 files changed, 227 insertions(+), 4 deletions(-) diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index 3c474acf..11f319a7 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -366,11 +366,234 @@ mocha.describe('internal.ts', function () { }); mocha.it('reservateDevice() - local two devices', async () => { - throw Error('TODO implement'); + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + // Test booking 1st half + + await reservateDevice(new DeviceBookingRequest(BigInt(6), new URL("http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"), 0, dayjs("1999-02-10T08:00:00Z"), dayjs("1999-02-10T09:00:00Z"))); + await sleep(1000); + + let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(6)]); + if (rows.length === 0) { + throw new Error("booking not found"); + } + + if (rows[0].status !== "pending") { // not yet complete + throw new Error("wrong status " + rows[0].status); + } + + // Test other device + [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [6, 1]); + if (rows.length === 0) { + throw new Error("booked device not found"); + } + + if (rows[0].originaldevice !== "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { + throw new Error("wrong original device " + rows[0].originaldevice); + } + + if (rows[0].bookeddevice !== null) { + throw new Error("wrong booked device " + rows[0].bookeddevice); + } + + // Test bookeddevice + [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [6, 0]); + if (rows.length === 0) { + throw new Error("booked device not found"); + } + + if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong original device " + rows[0].originaldevice); + } + + if (rows[0].bookeddevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong booked device " + rows[0].bookeddevice); + } + + if (rows[0].remotereference !== null) { + throw new Error("wrong remote reference " + rows[0].remotereference); + } + + if (rows[0].local != true) { // Unfortunate, type conversion + throw new Error("wrong local " + rows[0].local); + } + + if (rows[0].reservation < 0 || rows[0].reservation === undefined || rows[0].reservation === null) { + throw new Error("bad reservation " + rows[0].reservation); + } + + let bookingID = rows[0].reservation; + + // Test reservation + [rows, fields] = await db.execute("SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?", [bookingID]); + + if (rows.length === 0) { + throw new Error("reservation not found"); + } + + if (rows[0].device !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong device " + rows[0].device); + } + + if (!dayjs(rows[0].start).isSame(dayjs("1999-02-10T08:00:00Z"))) { + throw new Error("wrong start " + rows[0].start); + } + + if (!dayjs(rows[0].end).isSame(dayjs("1999-02-10T09:00:00Z"))) { + throw new Error("wrong end " + rows[0].end); + } + + // Test booking 2nd half + await reservateDevice(new DeviceBookingRequest(BigInt(6), new URL("http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"), 1, dayjs("1999-02-10T08:00:00Z"), dayjs("1999-02-10T09:00:00Z"))); + await sleep(1000); + + [rows, fields] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(6)]); + if (rows.length === 0) { + throw new Error("booking not found"); + } + + if (rows[0].status !== "booked") { // complete + throw new Error("wrong status " + rows[0].status); + } + + // Test other device + [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [6, 0]); + if (rows.length === 0) { + throw new Error("booked device not found"); + } + + if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong original device " + rows[0].originaldevice); + } + + if (rows[0].bookeddevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong booked device " + rows[0].bookeddevice); + } + + // Test bookeddevice + [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [6, 1]); + if (rows.length === 0) { + throw new Error("booked device not found"); + } + + if (rows[0].originaldevice !== "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { + throw new Error("wrong original device " + rows[0].originaldevice); + } + + if (rows[0].bookeddevice !== "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { + throw new Error("wrong booked device " + rows[0].bookeddevice); + } + + if (rows[0].remotereference !== null) { + throw new Error("wrong remote reference " + rows[0].remotereference); + } + + if (rows[0].local != true) { // Unfortunate, type conversion + throw new Error("wrong local " + rows[0].local); + } + + if (rows[0].reservation < 0 || rows[0].reservation === undefined || rows[0].reservation === null) { + throw new Error("bad reservation " + rows[0].reservation); + } + + bookingID = rows[0].reservation; + + // Test reservation + [rows, fields] = await db.execute("SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?", [bookingID]); + + if (rows.length === 0) { + throw new Error("reservation not found"); + } + + if (rows[0].device !== "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { + throw new Error("wrong device " + rows[0].device); + } + + if (!dayjs(rows[0].start).isSame(dayjs("1999-02-10T08:00:00Z"))) { + throw new Error("wrong start " + rows[0].start); + } + + if (!dayjs(rows[0].end).isSame(dayjs("1999-02-10T09:00:00Z"))) { + throw new Error("wrong end " + rows[0].end); + } + + } finally { + await db.end(); + } }); mocha.it('reservateDevice() - local group', async () => { - throw Error('TODO implement'); + await reservateDevice(new DeviceBookingRequest(BigInt(7), new URL("http://localhost:10801/devices/00000000-0000-0000-0000-000000000010"), 0, dayjs("1999-03-10T08:00:00Z"), dayjs("1999-03-10T09:00:00Z"))); + await sleep(1000); + + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + + // Test booking + let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(7)]); + if (rows.length === 0) { + throw new Error("booking not found"); + } + + if (rows[0].status !== "booked") { + throw new Error("wrong status " + rows[0].status); + } + + + // Test bookeddevice + [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [7, 0]); + if (rows.length === 0) { + throw new Error("booked device not found"); + } + + if (rows[0].originaldevice !== "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") { + throw new Error("wrong original device " + rows[0].originaldevice); + } + + if (rows[0].bookeddevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000" && rows[0].bookeddevice !== "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { // Group: one of those, selection is not deterministic + throw new Error("wrong booked device " + rows[0].bookeddevice); + } + let selected = rows[0].bookeddevice + + if (rows[0].remotereference !== null) { + throw new Error("wrong remote reference " + rows[0].remotereference); + } + + if (rows[0].local != true) { // Unfortunate, type conversion + throw new Error("wrong local " + rows[0].local); + } + + if (rows[0].reservation < 0 || rows[0].reservation === undefined || rows[0].reservation === null) { + throw new Error("bad reservation " + rows[0].reservation); + } + + let bookingID = rows[0].reservation; + + // Test reservation + [rows, fields] = await db.execute("SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?", [bookingID]); + + if (rows.length === 0) { + throw new Error("reservation not found"); + } + + if (rows[0].device !== selected) { + throw new Error("wrong device " + rows[0].device); + } + + if (!dayjs(rows[0].start).isSame(dayjs("1999-03-10T08:00:00Z"))) { + throw new Error("wrong start " + rows[0].start); + } + + if (!dayjs(rows[0].end).isSame(dayjs("1999-03-10T09:00:00Z"))) { + throw new Error("wrong end " + rows[0].end); + } + } finally { + await db.end(); + } }); mocha.it('reservateDevice() - local single device not available', async () => { diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index a8784bcd..120ac351 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -233,7 +233,7 @@ async function reservationCheckStatus(bookingID: bigint) { return; } - [rows, fields] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE booking=? AND bookeddevice=?", [bookingID, null]); + [rows, fields] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE booking=? AND bookeddevice IS NULL", [bookingID]); if (rows[0].n == 0) { // Every device is booked @@ -380,7 +380,7 @@ export async function reservateDevice(r: DeviceBookingRequest) { let a: amqplib.GetMessage = aUnknown as amqplib.GetMessage; let data = ReservationAnswer.fromString(a.content.toString()); - if (data.Type === ReservationRequest.New && data.Device.toString() === possibleDevices[i] && data.Start.isSame(r.Start) && data.End.isSame(r.End) && data.Successful) { + if (data.Type === ReservationRequest.New && data.Successful && data.Device.toString() === possibleDevices[i] && data.Start.isSame(r.Start) && data.End.isSame(r.End)) { await db.execute("UPDATE bookeddevices SET `bookeddevice`=?, `reservation`=?, `local`=? WHERE `booking`=? AND `originalposition`=?", [data.Device.toString(), data.ReservationID.toString(), true, r.BookingID, r.Position]) addDeviceCallback(data.Device, r.BookingID, { "Position": r.Position }); await reservationCheckStatus(r.BookingID); From fe92772df31cb04c0401525baa1ca4defe79ef07 Mon Sep 17 00:00:00 2001 From: Louis Kobras Date: Wed, 5 Jun 2024 13:58:51 +0200 Subject: [PATCH 24/79] it seems sleep needs to be waited --- services/booking/src/device-reservation/src/mainLoop.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/booking/src/device-reservation/src/mainLoop.ts b/services/booking/src/device-reservation/src/mainLoop.ts index c4030d72..7cd38e6d 100644 --- a/services/booking/src/device-reservation/src/mainLoop.ts +++ b/services/booking/src/device-reservation/src/mainLoop.ts @@ -67,7 +67,7 @@ export async function mainLoop(): Promise { case ReservationRequest.Stop: // This should never be called by any service, we still need it to stop main loop for testing... channel.ack(msg); - sleep(250); + await sleep(250); channel.close(); connection.close(); return; From 5772d0fb445c20652aafa3223b5fa5b0f2f0a1bc Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 5 Jun 2024 14:33:47 +0000 Subject: [PATCH 25/79] Implemented test DeleteBooking() local single device --- .../src/booking-backend/src/amqpHandle.ts | 1 + .../booking-backend/src/integration_test.ts | 132 +++++++++++++++--- .../src/integrationtest_helper_amqp.ts | 101 ++++++++++++++ .../src/booking-backend/src/internal.ts | 18 ++- .../booking-frontend/src/operations/index.ts | 17 ++- .../src/device-reservation/src/mainLoop.ts | 5 +- .../device-reservation/src/mainLoop_test.ts | 1 + .../src/devicereservationhelper.ts | 2 + 8 files changed, 243 insertions(+), 34 deletions(-) create mode 100644 services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts diff --git a/services/booking/src/booking-backend/src/amqpHandle.ts b/services/booking/src/booking-backend/src/amqpHandle.ts index a29cb191..fa513400 100644 --- a/services/booking/src/booking-backend/src/amqpHandle.ts +++ b/services/booking/src/booking-backend/src/amqpHandle.ts @@ -7,6 +7,7 @@ import { DeviceBookingRequest } from './messageDefinition'; export async function handleFreeDeviceRequest(): Promise { // freeDevice + console.log("handleFreeDeviceRequest started") while (true) { try { let connection = await amqplib.connect(config.AmqpUrl); diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index 11f319a7..4f59c476 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -20,7 +20,8 @@ import * as http from 'http'; import * as mocha from 'mocha'; import * as mysql from 'mysql2/promise'; -import { callbackType, dispatchCallback, handleCallback, randomID, reservateDevice } from './internal'; +import { MapToString, TestAMQPresults, ResetAMQPDeviceCount, StartAMQPTestFree, StopAMQPTestFree } from './integrationtest_helper_amqp' +import { DeleteBooking, callbackType, dispatchCallback, handleCallback, randomID, reservateDevice } from './internal'; import { config } from './config' import { DeviceBookingRequest } from './messageDefinition'; @@ -71,7 +72,7 @@ mocha.describe('internal.ts', function () { // Drain queues while (await channel.get('device-booking', { noAck: true })) { } - while (await channel.get('device-freeing', { noAck: true })) { } + //while (await channel.get('device-freeing', { noAck: true })) { } await startDeviceReservation(); }); @@ -82,6 +83,7 @@ mocha.describe('internal.ts', function () { await channel.deleteQueue('device-freeing'); await channel.close(); + await sleep(250); await connection.close(); channel = undefined; @@ -597,15 +599,74 @@ mocha.describe('internal.ts', function () { }); mocha.it('reservateDevice() - local single device not available', async () => { - throw Error('TODO implement'); + throw new Error("test DeleteBooking first!"); + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + // Create fake reservation + await db.execute( + 'INSERT INTO reservation (`id`,`device`, `start`, `end`, `bookingreference`) VALUES (?,?,?,?,?)', + [ + BigInt(100), + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + dayjs('1999-01-10T08:00:00Z').toDate(), + dayjs('1999-01-10T09:00:00Z').toDate(), + 'block reservation', + ], + ); + + // Try booking + await reservateDevice(new DeviceBookingRequest(BigInt(5), new URL("http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"), 0, dayjs("1999-01-10T08:00:00Z"), dayjs("1999-01-10T09:00:00Z"))); + await sleep(1000); + + // Test booking + let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(5)]); + if (rows.length === 0) { + throw new Error("booking not found"); + } + + if (rows[0].status !== "rejected") { + throw new Error("wrong status " + rows[0].status); + } + + + // Test bookeddevice + [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [5, 0]); + if (rows.length === 0) { + throw new Error("booked device not found"); + } + + if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong original device " + rows[0].originaldevice); + } + + if (rows[0].bookeddevice !== null) { + throw new Error("wrong booked device " + rows[0].bookeddevice); + } + + if (rows[0].remotereference !== null) { + throw new Error("wrong remote reference " + rows[0].remotereference); + } + + if (rows[0].local != true) { // Unfortunate, type conversion + throw new Error("wrong local " + rows[0].local); + } + + if (rows[0].reservation != null) { + throw new Error("bad reservation " + rows[0].reservation); + } + } finally { + await db.end(); + } }); mocha.it('reservateDevice() - local two devices not available', async () => { - throw Error('TODO implement'); + throw new Error("test DeleteBooking first!"); }); mocha.it('reservateDevice() - local group not available', async () => { - throw Error('TODO implement'); + throw new Error("test DeleteBooking first!"); }); mocha.it('reservateDevice() - booking not existing', async () => { @@ -626,18 +687,6 @@ mocha.describe('internal.ts', function () { } }); - mocha.it('freeDevice() - local single device', async () => { - throw Error('TODO implement'); - }); - - mocha.it('freeDevice() - local multiple devices', async () => { - throw Error('TODO implement'); - }); - - mocha.it('freeDevice() - local group', async () => { - throw Error('TODO implement'); - }); - mocha.it('randomID()', async () => { let ids: string[] = []; for (let i = 0; i < 10000; i++) { @@ -652,7 +701,42 @@ mocha.describe('internal.ts', function () { }); mocha.it('DeleteBooking() local single device', async () => { - throw Error('TODO implement'); + await StartAMQPTestFree(); + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + try { + await DeleteBooking(BigInt(1)); + + sleep(1000); + + // Check booking + let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length === 0) { + throw new Error("booking not found"); + } + + if (rows[0].status !== "cancelled") { + throw new Error("wrong status " + rows[0].status); + } + + // Check request for freeing + if (TestAMQPresults.size != 1) { + throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); + } + + if (!TestAMQPresults.has(1n)) { + throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + } + + if (TestAMQPresults.get(1n) != 1) { + throw new Error("wrong number of devices freed " + MapToString(TestAMQPresults)); + } + + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } }); mocha.it('DeleteBooking() local multiple devices', async () => { @@ -666,4 +750,16 @@ mocha.describe('internal.ts', function () { mocha.it('DeleteBooking() non-existing', async () => { throw Error('TODO implement'); }); + + mocha.it('freeDevice() - local single device', async () => { + throw Error('TODO implement'); + }); + + mocha.it('freeDevice() - local multiple devices', async () => { + throw Error('TODO implement'); + }); + + mocha.it('freeDevice() - local group', async () => { + throw Error('TODO implement'); + }); }); \ No newline at end of file diff --git a/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts b/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts new file mode 100644 index 00000000..15b3e30d --- /dev/null +++ b/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts @@ -0,0 +1,101 @@ +import { DeviceBookingRequest } from './messageDefinition'; +import * as amqplib from 'amqplib'; +import { config } from './config' +import { sleep } from '@crosslab/booking-service-common'; + + +let connection: amqplib.Connection; +let channel: amqplib.Channel; + +let amqpTestStarted = false; + +export let TestAMQPresults = new Map(); + +export function MapToString(map: Map): string { + return JSON.stringify(Object.fromEntries(map)); +} + +export function ResetAMQPDeviceCount(): void { + TestAMQPresults = new Map(); +}; + +async function helperLoop(): Promise { + while (true) { + let msg = await channel.get('device-freeing', { noAck: false }); + + if (typeof msg === 'boolean') { + await sleep(20); + continue; + } + + if (msg === null) { + continue; + } + + // Parse data + let data: bigint; + try { + data = BigInt(msg.content.toString()); + } catch (error) { + console.log('Can not parse message:', error); + try { + channel.ack(msg); + } catch (error) { + console.log('Can not ack message:', error); + } + continue; + } + try { + if(data === -9999n){ + amqpTestStarted = false; + return; + } + if(TestAMQPresults.has(data)) { + TestAMQPresults.set(data, TestAMQPresults.get(data)+1); + } + TestAMQPresults.set(data, 1); + channel.ack(msg); + } catch (err) { + console.log("Error at helperLoop: " + err); + } + } +}; + +export async function StartAMQPTestFree(): Promise { + if (amqpTestStarted) { + throw new Error("amqp mockup alreay started"); + } + + connection = await amqplib.connect(config.AmqpUrl); + channel = await connection.createChannel(); + + await channel.assertQueue("device-freeing", { + durable: true + }); + + //while (await channel.get('device-freeing', { noAck: true })) { } + + helperLoop(); + amqpTestStarted = true; + + return; +}; + +export async function StopAMQPTestFree(): Promise { + if (!amqpTestStarted) { + throw new Error("amqp mockup alreay stopped"); + } + + if (!channel.sendToQueue("device-freeing", Buffer.from((-9999n).toString()), { persistent: true })) { + throw new Error("amqp queue full"); + } + + await sleep(1000); + await channel.close(); + channel = null; + await sleep(250); + await connection.close(); + connection = null; + + return; +}; diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 120ac351..67a06bdc 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -119,8 +119,9 @@ export async function handleCallback(type: callbackType, targetBooking: bigint, throw new Error("amqp queue full"); } } finally { - channel.close(); - connection.close(); + await channel.close(); + await sleep(250); + await connection.close(); } } @@ -393,6 +394,7 @@ export async function reservateDevice(r: DeviceBookingRequest) { } finally { if (channel !== undefined) { await channel.close(); + await sleep(250); } if (connection !== undefined) { await connection.close(); @@ -521,6 +523,7 @@ export async function freeDevice(internalreference: bigint) { await channel.deleteQueue(returnChannel); } await channel.close(); + await sleep(250); } if (connection !== undefined) { await connection.close(); @@ -602,7 +605,7 @@ export async function DeleteBooking(bookingID: bigint, targetStatus = "cancelled case "rejected": // Success await db.execute("UPDATE booking SET `status`=? WHERE id=?", [targetStatus, bookingID]); - [rows, fields] = await db.execute("SELECT `id` FROM bookeddevices WHERE booking=?"); + [rows, fields] = await db.execute("SELECT `id` FROM bookeddevices WHERE booking=?", [bookingID]); let connection = await amqplib.connect(config.AmqpUrl); let channel = await connection.createChannel(); try { @@ -616,10 +619,11 @@ export async function DeleteBooking(bookingID: bigint, targetStatus = "cancelled } } catch (err) { // Don't jump out here, since some devices might already be freed - console.error("Got error while cancelling booking, devices might not be freed: " + err.toString()); + console.log("Got error while cancelling booking, devices might not be freed: " + err.toString()); } finally { - channel.close(); - connection.close(); + await channel.close(); + await sleep(250); + await connection.close(); } break; case "cancelled": @@ -640,8 +644,8 @@ export async function DeleteBooking(bookingID: bigint, targetStatus = "cancelled } await db.execute("UPDATE booking SET `message`=? WHERE id=?", [targetMessage, bookingID]); } - dispatchCallback(bookingID); await db.commit(); + dispatchCallback(bookingID); } catch (err) { await db.rollback(); throw err; diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index e7cca7ef..fea058b8 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -18,7 +18,7 @@ import * as mysql from 'mysql2/promise'; import * as amqplib from 'amqplib'; import dayjs from "dayjs"; -import { BelongsToUs } from "@crosslab/booking-service-common" +import { BelongsToUs, sleep } from "@crosslab/booking-service-common" import { DeviceBookingRequest } from "@crosslab/service-booking-backend"; import { config } from "../config" @@ -78,8 +78,9 @@ export const postBooking: postBookingSignature = async (request, body) => { body: err.toString(), } } finally { - channel.close(); - connection.close(); + await channel.close(); + await sleep(250); + await connection.close(); db.end(); }; @@ -259,8 +260,9 @@ export const patchBookingByID: patchBookingByIDSignature = async (request, param } } finally { - channel.close(); - connection.close(); + await channel.close(); + await await sleep(250); + await connection.close(); } } else { throw Error("Unknown request type") @@ -369,8 +371,9 @@ async function commonRemoveBooking(requestID: bigint) : Promise<[404|200|423|500 } } } finally { - channel.close(); - connection.close(); + await channel.close(); + await sleep(250); + await connection.close(); } await db.execute("UPDATE booking SET `status`=?, `message`=? WHERE id=?", ["cancelled", "Cancelled by user", requestID]); diff --git a/services/booking/src/device-reservation/src/mainLoop.ts b/services/booking/src/device-reservation/src/mainLoop.ts index 7cd38e6d..f62e4e5a 100644 --- a/services/booking/src/device-reservation/src/mainLoop.ts +++ b/services/booking/src/device-reservation/src/mainLoop.ts @@ -68,8 +68,9 @@ export async function mainLoop(): Promise { // This should never be called by any service, we still need it to stop main loop for testing... channel.ack(msg); await sleep(250); - channel.close(); - connection.close(); + await channel.close(); + await sleep(250); + await connection.close(); return; case ReservationRequest.New: answer = { diff --git a/services/booking/src/device-reservation/src/mainLoop_test.ts b/services/booking/src/device-reservation/src/mainLoop_test.ts index 54e12f1f..a55095d4 100644 --- a/services/booking/src/device-reservation/src/mainLoop_test.ts +++ b/services/booking/src/device-reservation/src/mainLoop_test.ts @@ -104,6 +104,7 @@ mocha.describe('mainLoop.ts', function () { await channel.deleteQueue(receiveQueue); await channel.close(); + await sleep(250); await connection.close(); }); diff --git a/services/booking/src/test_common/src/devicereservationhelper.ts b/services/booking/src/test_common/src/devicereservationhelper.ts index aa9f2287..50ba3c65 100644 --- a/services/booking/src/test_common/src/devicereservationhelper.ts +++ b/services/booking/src/test_common/src/devicereservationhelper.ts @@ -24,6 +24,7 @@ export async function startDeviceReservation() { while (await channel.get('device-reservation', { noAck: true })) {} await channel.close(); + await sleep(250); await connection.close(); mainLoop(); @@ -58,6 +59,7 @@ export async function stopDeviceReservation() { await channel.deleteQueue('device-reservation'); await channel.close(); + await sleep(250); await connection.close(); running = false; From 658433dbfdf4b29e9afd7be40eede70d958fbd08 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Thu, 6 Jun 2024 08:13:58 +0000 Subject: [PATCH 26/79] Tested DeleteBooking() --- .../booking-backend/src/integration_test.ts | 133 ++++++++++++++++-- .../src/booking-backend/src/internal.ts | 2 +- 2 files changed, 119 insertions(+), 16 deletions(-) diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index 4f59c476..484b3cd1 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -740,26 +740,129 @@ mocha.describe('internal.ts', function () { }); mocha.it('DeleteBooking() local multiple devices', async () => { - throw Error('TODO implement'); + await StartAMQPTestFree(); + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + try { + await DeleteBooking(BigInt(2), "rejected", "test message"); + + sleep(1000); + + // Check booking + let [rows, fields]: [any, any] = await db.execute("SELECT `status`, `message` FROM booking WHERE `id`=?", [BigInt(2)]); + if (rows.length === 0) { + throw new Error("booking not found"); + } + + if (rows[0].status !== "rejected") { + throw new Error("wrong status " + rows[0].status); + } + + if (rows[0].message !== "test message") { + throw new Error("wrong message " + rows[0].message); + } + + // Check request for freeing + if (TestAMQPresults.size != 2) { + throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); + } + + if (!TestAMQPresults.has(2n)) { + throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + } + + if (TestAMQPresults.get(2n) != 1) { + throw new Error("wrong number of devices freed " + MapToString(TestAMQPresults)); + } + + if (!TestAMQPresults.has(3n)) { + throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + } + + if (TestAMQPresults.get(3n) != 1) { + throw new Error("wrong number of devices freed " + MapToString(TestAMQPresults)); + } + + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } }); - mocha.it('DeleteBooking() no authorization', async () => { - throw Error('TODO implement'); + + mocha.it('DeleteBooking() local group', async () => { + await StartAMQPTestFree(); + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + try { + await DeleteBooking(BigInt(3)); + + sleep(1000); + + // Check booking + let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(3)]); + if (rows.length === 0) { + throw new Error("booking not found"); + } + + if (rows[0].status !== "cancelled") { + throw new Error("wrong status " + rows[0].status); + } + + // Check request for freeing + if (TestAMQPresults.size != 1) { + throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); + } + + if (!TestAMQPresults.has(4n)) { + throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + } + + if (TestAMQPresults.get(4n) != 1) { + throw new Error("wrong number of devices freed " + MapToString(TestAMQPresults)); + } + + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } }); mocha.it('DeleteBooking() non-existing', async () => { - throw Error('TODO implement'); - }); + await StartAMQPTestFree(); + try { + let error_thrown = false + try { + await DeleteBooking(BigInt(1111)); + } catch (err) { + if (err.message != "Booking 1111 does not exist") { + throw new Error("unknown error" + err); + } + error_thrown = true; + } + sleep(100); - mocha.it('freeDevice() - local single device', async () => { - throw Error('TODO implement'); - }); + if (!error_thrown) { + throw new Error("No error thrown"); + } - mocha.it('freeDevice() - local multiple devices', async () => { - throw Error('TODO implement'); - }); + } finally { + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } + }); - mocha.it('freeDevice() - local group', async () => { - throw Error('TODO implement'); - }); -}); \ No newline at end of file + mocha.it('freeDevice() - local single device', async () => { + throw Error('TODO implement'); + }); + + mocha.it('freeDevice() - local multiple devices', async () => { + throw Error('TODO implement'); + }); + + mocha.it('freeDevice() - local group', async () => { + throw Error('TODO implement'); + }); + }); \ No newline at end of file diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 67a06bdc..776ed551 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -637,7 +637,7 @@ export async function DeleteBooking(bookingID: bigint, targetStatus = "cancelled if (message !== undefined && message !== "") { let [rows, fields] = await db.execute("SELECT `message` FROM booking WHERE id=?", [bookingID]); let targetMessage: string = ""; - if (rows[0].message === undefined || rows[0].message === null) { + if (rows[0].message === undefined || rows[0].message === null|| rows[0].message == "" ) { targetMessage = message; } else { targetMessage = rows[0].message + "\n" + message; From 01eee4495c973dc706226680f3245204de05e573 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Thu, 6 Jun 2024 12:32:15 +0000 Subject: [PATCH 27/79] Tested freeDevice() --- .../booking-backend/src/integration_test.ts | 97 +++++++++++++------ 1 file changed, 69 insertions(+), 28 deletions(-) diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index 484b3cd1..b9ffa41c 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -21,7 +21,7 @@ import * as mocha from 'mocha'; import * as mysql from 'mysql2/promise'; import { MapToString, TestAMQPresults, ResetAMQPDeviceCount, StartAMQPTestFree, StopAMQPTestFree } from './integrationtest_helper_amqp' -import { DeleteBooking, callbackType, dispatchCallback, handleCallback, randomID, reservateDevice } from './internal'; +import { DeleteBooking, callbackType, dispatchCallback, freeDevice, handleCallback, randomID, reservateDevice } from './internal'; import { config } from './config' import { DeviceBookingRequest } from './messageDefinition'; @@ -831,38 +831,79 @@ mocha.describe('internal.ts', function () { }); mocha.it('DeleteBooking() non-existing', async () => { - await StartAMQPTestFree(); + await StartAMQPTestFree(); + try { + let error_thrown = false try { - let error_thrown = false - try { - await DeleteBooking(BigInt(1111)); - } catch (err) { - if (err.message != "Booking 1111 does not exist") { - throw new Error("unknown error" + err); - } - error_thrown = true; + await DeleteBooking(BigInt(1111)); + } catch (err) { + if (err.message != "Booking 1111 does not exist") { + throw new Error("unknown error" + err); } - sleep(100); + error_thrown = true; + } + sleep(100); - if (!error_thrown) { - throw new Error("No error thrown"); - } + if (!error_thrown) { + throw new Error("No error thrown"); + } - } finally { - await StopAMQPTestFree(); - ResetAMQPDeviceCount(); + } finally { + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } + }); + + mocha.it('freeDevice() - local single device', async () => { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + try { + await freeDevice(BigInt(1)); + await sleep(1000); + + let [rows, fields]: [any, any] = await db.execute("SELECT * FROM reservation WHERE `id`=?", [BigInt(4)]); + if (rows.length !== 0) { + throw new Error("reservation 4 still exists"); } - }); + } finally { + db.end(); + } + }); - mocha.it('freeDevice() - local single device', async () => { - throw Error('TODO implement'); - }); + mocha.it('freeDevice() - local multiple devices', async () => { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + try { + freeDevice(BigInt(2)); + freeDevice(BigInt(3)); + await sleep(1000); - mocha.it('freeDevice() - local multiple devices', async () => { - throw Error('TODO implement'); - }); + let [rows, fields]: [any, any] = await db.execute("SELECT * FROM reservation WHERE `id`=?", [BigInt(5)]); + if (rows.length !== 0) { + throw new Error("reservation 5 still exists"); + } + [rows, fields] = await db.execute("SELECT * FROM reservation WHERE `id`=?", [BigInt(6)]); + if (rows.length !== 0) { + throw new Error("reservation 6 still exists"); + } + } finally { + db.end(); + } + }); - mocha.it('freeDevice() - local group', async () => { - throw Error('TODO implement'); - }); - }); \ No newline at end of file + mocha.it(' - local group', async () => { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + try { + await freeDevice(BigInt(4)); + await sleep(1000); + + let [rows, fields]: [any, any] = await db.execute("SELECT * FROM reservation WHERE `id`=?", [BigInt(7)]); + if (rows.length !== 0) { + throw new Error("reservation 7 still exists"); + } + } finally { + db.end(); + } + }); +}); \ No newline at end of file From 277a302e81321ee66c645e9d82c726e2411fa1d0 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Thu, 6 Jun 2024 14:41:21 +0000 Subject: [PATCH 28/79] Completed testiing of reservateDevice() and internal.ts --- .../booking-backend/src/integration_test.ts | 144 +++++++++++++++--- .../src/booking-backend/src/internal.ts | 1 - 2 files changed, 123 insertions(+), 22 deletions(-) diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index b9ffa41c..81edd70b 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -599,9 +599,9 @@ mocha.describe('internal.ts', function () { }); mocha.it('reservateDevice() - local single device not available', async () => { - throw new Error("test DeleteBooking first!"); let db = await mysql.createConnection(config.BookingDSN); await db.connect(); + await StartAMQPTestFree(); try { // Create fake reservation @@ -630,43 +630,145 @@ mocha.describe('internal.ts', function () { throw new Error("wrong status " + rows[0].status); } + // Check request for freeing + if (TestAMQPresults.size != 1) { + throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); + } - // Test bookeddevice - [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [5, 0]); - if (rows.length === 0) { - throw new Error("booked device not found"); + if (!TestAMQPresults.has(6n)) { + throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); } + } finally { + ResetAMQPDeviceCount() + await StopAMQPTestFree(); + await db.end(); + } + }); - if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong original device " + rows[0].originaldevice); + mocha.it('reservateDevice() - local two devices not available', async () => { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + await StartAMQPTestFree(); + + try { + // Create successful reservation + // Create fake reservation + await db.execute( + 'INSERT INTO reservation (`id`,`device`, `start`, `end`, `bookingreference`) VALUES (?,?,?,?,?)', + [ + BigInt(99), + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + dayjs('1999-02-10T08:00:00Z').toDate(), + dayjs('1999-02-10T09:00:00Z').toDate(), + 'successful reservation', + ], + ); + + await db.execute('UPDATE bookeddevices SET bookeddevice=?, reservation=? WHERE id=?', ['http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', BigInt(99), BigInt(7)]) + + + // Create fake reservation + await db.execute( + 'INSERT INTO reservation (`id`,`device`, `start`, `end`, `bookingreference`) VALUES (?,?,?,?,?)', + [ + BigInt(100), + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + dayjs('1999-02-10T08:15:00Z').toDate(), + dayjs('1999-02-10T08:30:00Z').toDate(), + 'block reservation', + ], + ); + + // Try booking + await reservateDevice(new DeviceBookingRequest(BigInt(6), new URL("http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"), 1, dayjs("1999-02-10T08:00:00Z"), dayjs("1999-02-10T09:00:00Z"))); + await sleep(1000); + + // Test booking + let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(6)]); + if (rows.length === 0) { + throw new Error("booking not found"); } - if (rows[0].bookeddevice !== null) { - throw new Error("wrong booked device " + rows[0].bookeddevice); + if (rows[0].status !== "rejected") { + throw new Error("wrong status " + rows[0].status); } - if (rows[0].remotereference !== null) { - throw new Error("wrong remote reference " + rows[0].remotereference); + + // Check request for freeing + if (TestAMQPresults.size != 2) { + throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); } - if (rows[0].local != true) { // Unfortunate, type conversion - throw new Error("wrong local " + rows[0].local); + if (!TestAMQPresults.has(7n)) { + throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); } - if (rows[0].reservation != null) { - throw new Error("bad reservation " + rows[0].reservation); + if (!TestAMQPresults.has(8n)) { + throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); } } finally { + ResetAMQPDeviceCount() + await StopAMQPTestFree(); await db.end(); } }); - mocha.it('reservateDevice() - local two devices not available', async () => { - throw new Error("test DeleteBooking first!"); - }); - mocha.it('reservateDevice() - local group not available', async () => { - throw new Error("test DeleteBooking first!"); + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + await StartAMQPTestFree(); + + try { + // Create fake reservation + await db.execute( + 'INSERT INTO reservation (`id`,`device`, `start`, `end`, `bookingreference`) VALUES (?,?,?,?,?)', + [ + BigInt(100), + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + dayjs('1999-03-10T08:10:00Z').toDate(), + dayjs('1999-03-10T09:20:00Z').toDate(), + 'block reservation', + ], + ); + + await db.execute( + 'INSERT INTO reservation (`id`,`device`, `start`, `end`, `bookingreference`) VALUES (?,?,?,?,?)', + [ + BigInt(101), + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + dayjs('1999-03-10T08:40:00Z').toDate(), + dayjs('1999-03-10T09:50:00Z').toDate(), + 'block reservation', + ], + ); + + // Try booking + await reservateDevice(new DeviceBookingRequest(BigInt(7), new URL("http://localhost:10801/devices/00000000-0000-0000-0000-000000000010"), 0, dayjs("1999-03-10T08:00:00Z"), dayjs("1999-03-10T09:00:00Z"))); + await sleep(1000); + + // Test booking + let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(7)]); + if (rows.length === 0) { + throw new Error("booking not found"); + } + + if (rows[0].status !== "rejected") { + throw new Error("wrong status " + rows[0].status); + } + + // Check request for freeing + if (TestAMQPresults.size != 1) { + throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); + } + + if (!TestAMQPresults.has(9n)) { + throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + } + } finally { + ResetAMQPDeviceCount() + await StopAMQPTestFree(); + await db.end(); + } }); mocha.it('reservateDevice() - booking not existing', async () => { @@ -891,7 +993,7 @@ mocha.describe('internal.ts', function () { } }); - mocha.it(' - local group', async () => { + mocha.it('freeDevice() - local group', async () => { let db = await mysql.createConnection(config.BookingDSN); await db.connect(); try { diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 776ed551..9d6b7c91 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -449,7 +449,6 @@ export async function reservateDevice(r: DeviceBookingRequest) { } } } - // Ok, we were not able to book a device... DeleteBooking(r.BookingID, "rejected", "Can not book " + r.Device.toString()); } finally { From e0eaab3b46657b131679126fcac4b7b454f53bef Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 7 Jun 2024 13:46:04 +0000 Subject: [PATCH 29/79] Completed testing of booling backend for now 93% of functions and 78% of lines are tested --- .../booking/src/booking-backend/package.json | 2 +- .../booking-backend/src/operations/index.ts | 9 +- .../src/operations/index_test.ts | 385 ++++++++++++++---- .../src/test_common/src/fakerequest.ts | 2 +- 4 files changed, 317 insertions(+), 81 deletions(-) diff --git a/services/booking/src/booking-backend/package.json b/services/booking/src/booking-backend/package.json index 460ade16..d847651b 100644 --- a/services/booking/src/booking-backend/package.json +++ b/services/booking/src/booking-backend/package.json @@ -4,7 +4,7 @@ "description": "Part of booking service. Does most of the actual work and is horizontal scaleable.", "main": "app/index.js", "scripts": { - "test": "npm run build && env-cmd -e development c8 --include=\"app/messageDefinition.js\" --include=\"app/amqpHandle.js\" --include=\"app/internal.js\" --include=\"app/operations.js\" mocha app/*_test.js", + "test": "npm run build && env-cmd -e development c8 --include=\"app/messageDefinition.js\" --include=\"app/amqpHandle.js\" --include=\"app/internal.js\" --include=\"app/operations/index.js\" mocha app/*_test.js app/operations/*_test.js", "build:generate": "openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", "build:compile": "tsc", "build": "npm run build:generate && npm run build:compile", diff --git a/services/booking/src/booking-backend/src/operations/index.ts b/services/booking/src/booking-backend/src/operations/index.ts index faa293ed..61e86dfa 100644 --- a/services/booking/src/booking-backend/src/operations/index.ts +++ b/services/booking/src/booking-backend/src/operations/index.ts @@ -122,13 +122,20 @@ export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async (requ switch (rows[0].status) { case 'active-rejected': case 'active': - case 'active-pending': await db.execute("UPDATE booking SET `status`='booked' WHERE `id`=?", [ bookingID, ]); dispatchCallback(bookingID); break; + case 'active-pending': + await db.execute("UPDATE booking SET `status`='pending' WHERE `id`=?", [ + bookingID, + ]); + dispatchCallback(bookingID); + break; + + case 'pending': case 'rejected': case 'cancelled': diff --git a/services/booking/src/booking-backend/src/operations/index_test.ts b/services/booking/src/booking-backend/src/operations/index_test.ts index 017f2157..4001059a 100644 --- a/services/booking/src/booking-backend/src/operations/index_test.ts +++ b/services/booking/src/booking-backend/src/operations/index_test.ts @@ -1,84 +1,313 @@ -import { baseConfig } from '@crosslab/booking-service-common'; +import { baseConfig, sleep } from '@crosslab/booking-service-common'; import { - fakeServerConfig, - getFakeInstitutePrefix, - getFakeOwnURL, - getSQLDNS, - resetFakeServerVars, - setupDummySql, - startFakeServer, - stopFakeServer, - tearDownDummySql, - getFakeRequest, - } from '@crosslab/booking-service-test-common'; + fakeServerConfig, + getFakeInstitutePrefix, + getFakeOwnURL, + getSQLDNS, + resetFakeServerVars, + setupDummySql, + startFakeServer, + stopFakeServer, + tearDownDummySql, + getFakeRequest, +} from '@crosslab/booking-service-test-common'; import * as mocha from 'mocha'; +import * as mysql from 'mysql2/promise'; -import { } from './index'; -import {config} from '../config' +import { postBookingCallbackByID, deleteBookingByIDLock, putBookingByIDLock } from './index'; +import { config } from '../config' mocha.describe('operations.ts', function () { - this.timeout(10000); - - mocha.before(function () { - // Config - use both global config and local config to ensure different application parts work with same config - baseConfig.OwnURL = getFakeOwnURL(); - baseConfig.InstitutePrefix = getFakeInstitutePrefix(); - baseConfig.ReservationDSN = getSQLDNS(); - - config.OwnURL = getFakeOwnURL(); - config.InstitutePrefix = getFakeInstitutePrefix(); - config.ReservationDSN = getSQLDNS(); - - startFakeServer(); - }); - - mocha.after(function () { - stopFakeServer(); - }); - - mocha.beforeEach(async function () { - // Reset server status - resetFakeServerVars(); - - // Setup database - await setupDummySql(); - }); - - mocha.afterEach(async function () { - await tearDownDummySql(); - }); - - mocha.it('putBookingByIDLock no authorization', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('putBookingByIDLock lock success', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('putBookingByIDLock already locked', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('putBookingByIDLock wrong status', async function (){ - throw Error("Not implemented"); - }); - - - - mocha.it('deleteBookingByIDLock no authorization', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('deleteBookingByIDLock unlock success', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('deleteBookingByIDLock already unlocked', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('deleteBookingByIDLock wrong status', async function (){ - throw Error("Not implemented"); - }); + this.timeout(10000); + + mocha.before(function () { + // Config - use both global config and local config to ensure different application parts work with same config + baseConfig.OwnURL = getFakeOwnURL(); + baseConfig.InstitutePrefix = getFakeInstitutePrefix(); + baseConfig.ReservationDSN = getSQLDNS(); + baseConfig.BookingDSN = getSQLDNS(); + + config.OwnURL = getFakeOwnURL(); + config.InstitutePrefix = getFakeInstitutePrefix(); + config.ReservationDSN = getSQLDNS(); + config.BookingDSN = getSQLDNS(); + + startFakeServer(); + }); + + mocha.after(function () { + stopFakeServer(); + }); + + mocha.beforeEach(async function () { + // Reset server status + resetFakeServerVars(); + + // Setup database + await setupDummySql(); + }); + + mocha.afterEach(async function () { + await tearDownDummySql(); + }); + + mocha.it('putBookingByIDLock no authorization', async function () { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + let isError = false; + try { + await putBookingByIDLock(getFakeRequest({ user: "badActor", isAuthorized: false }), { ID: "1" }); + await sleep(250); + + } catch (err) { + if (err.message == "test authorization failed") { + isError = true; + } else { + console.log(err.message); + throw err; + } + } + if (!isError) { + throw new Error("no access violation detected"); + } + + // Check if booking still unchanged + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length == 0) { + throw Error("booking not found") + } + if (rows[0].status !== "booked") { + throw new Error("Wrong status " + rows[0].status); + } + } finally { + db.end(); + } + }); + + mocha.it('putBookingByIDLock lock success', async function () { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + let result = await putBookingByIDLock(getFakeRequest(), { ID: "1" }); + await sleep(250); + + if (result.status != 200) { + throw new Error("wrong status " + result.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length == 0) { + throw Error("booking not found") + } + if (rows[0].status !== "active") { + throw new Error("Wrong status " + rows[0].status); + } + + if (!fakeServerConfig.callback_test_local_single_was_called) { + throw new Error("callback not called"); + } + } finally { + db.end(); + } + }); + + mocha.it('putBookingByIDLock already locked', async function () { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); + let result = await putBookingByIDLock(getFakeRequest(), { ID: "1" }); + await sleep(250); + + if (result.status != 200) { + throw new Error("wrong status " + result.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length == 0) { + throw Error("booking not found") + } + if (rows[0].status !== "active") { + throw new Error("Wrong status " + rows[0].status); + } + } finally { + db.end(); + } + }); + + mocha.it('putBookingByIDLock wrong status', async function () { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["pending", BigInt(1)]); + let result = await putBookingByIDLock(getFakeRequest(), { ID: "1" }); + await sleep(250); + + if (result.status != 412) { + throw new Error("wrong status " + result.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length == 0) { + throw Error("booking not found") + } + if (rows[0].status !== "pending") { + throw new Error("Wrong status " + rows[0].status); + } + } finally { + db.end(); + } + }); + + mocha.it('deleteBookingByIDLock no authorization', async function () { + let isError = false; + try { + await deleteBookingByIDLock(getFakeRequest({ user: "badActor", isAuthorized: false }), { ID: "" }); + await sleep(250); + + } catch (err) { + if (err.message == "test authorization failed") { + isError = true; + } else { + console.log(err.message); + throw err; + } + } + if (!isError) { + throw new Error("no access violation detected"); + } + }); + + mocha.it('deleteBookingByIDLock unlock success', async function () { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); + let result = await deleteBookingByIDLock(getFakeRequest(), { ID: "1" }); + await sleep(250); + + if (result.status != 200) { + throw new Error("wrong status " + result.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length == 0) { + throw Error("booking not found") + } + if (rows[0].status !== "booked") { + throw new Error("Wrong status " + rows[0].status); + } + + if (!fakeServerConfig.callback_test_local_single_was_called) { + throw new Error("callback not called"); + } + } finally { + db.end(); + } + }); + + mocha.it('deleteBookingByIDLock already unlocked', async function () { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + let result = await putBookingByIDLock(getFakeRequest(), { ID: "1" }); + await sleep(250); + + if (result.status != 200) { + throw new Error("wrong status " + result.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length == 0) { + throw Error("booking not found") + } + if (rows[0].status !== "active") { + throw new Error("Wrong status " + rows[0].status); + } + } finally { + db.end(); + } + }); + + mocha.it('deleteBookingByIDLock wrong status', async function () { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["pending", BigInt(1)]); + let result = await deleteBookingByIDLock(getFakeRequest(), { ID: "1" }); + await sleep(250); + + if (result.status != 412) { + throw new Error("wrong status " + result.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length == 0) { + throw Error("booking not found") + } + if (rows[0].status !== "pending") { + throw new Error("Wrong status " + rows[0].status); + } + } finally { + db.end(); + } + }); + + mocha.it('deleteBookingByIDLock edge case active-pending', async function () { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active-pending", BigInt(1)]); + let result = await deleteBookingByIDLock(getFakeRequest(), { ID: "1" }); + await sleep(250); + + if (result.status != 200) { + throw new Error("wrong status " + result.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length == 0) { + throw Error("booking not found") + } + if (rows[0].status !== "pending") { + throw new Error("Wrong status " + rows[0].status); + } + } finally { + db.end(); + } + }); + + mocha.it('postBookingCallbackByID no authorization', async function () { + let isError = false; + try { + await postBookingCallbackByID(getFakeRequest({ user: "badActor", isAuthorized: false }), { ID: "" }); + await sleep(250); + + } catch (err) { + if (err.message == "test authorization failed") { + isError = true; + } else { + console.log(err.message); + throw err; + } + } + if (!isError) { + throw new Error("no access violation detected"); + } + }); + + mocha.it('postBookingCallbackByID success', async function () { + await postBookingCallbackByID(getFakeRequest(), { ID: "1" }); + await sleep(250); + }); }); diff --git a/services/booking/src/test_common/src/fakerequest.ts b/services/booking/src/test_common/src/fakerequest.ts index 83243290..ffa6cd63 100644 --- a/services/booking/src/test_common/src/fakerequest.ts +++ b/services/booking/src/test_common/src/fakerequest.ts @@ -15,7 +15,7 @@ export function getFakeRequest(options?: FakeRequestOptions) { request.authorization.check_authorization_or_fail = async function(action:string, id:string) : Promise { if(!options.isAuthorized) { - throw Error(); + throw Error("test authorization failed"); } } From a70045fda8981e6b0459ea004b0a4465f6d1e92b Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 11 Jun 2024 06:07:14 +0000 Subject: [PATCH 30/79] Tested postBooking() --- .../booking/src/booking-backend/package.json | 2 +- .../booking/src/booking-frontend/package.json | 2 +- .../booking-frontend/src/operations/index.ts | 6 +- .../src/operations/index_test.ts | 578 +++++++++++++----- .../src/operations/indextest_helper_amqp.ts | 105 ++++ .../booking/src/schedule-service/package.json | 2 +- .../src/test_common/src/fakerequest.ts | 33 +- 7 files changed, 568 insertions(+), 160 deletions(-) create mode 100644 services/booking/src/booking-frontend/src/operations/indextest_helper_amqp.ts diff --git a/services/booking/src/booking-backend/package.json b/services/booking/src/booking-backend/package.json index d847651b..062b0535 100644 --- a/services/booking/src/booking-backend/package.json +++ b/services/booking/src/booking-backend/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "npm run build && env-cmd -e development c8 --include=\"app/messageDefinition.js\" --include=\"app/amqpHandle.js\" --include=\"app/internal.js\" --include=\"app/operations/index.js\" mocha app/*_test.js app/operations/*_test.js", "build:generate": "openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", - "build:compile": "tsc", + "build:compile": "tsc && cp src/generated/basicValidation.cjs app/generated/basicValidation.cjs", "build": "npm run build:generate && npm run build:compile", "start": "npm run build && env-cmd -e development node app/index.js", "format": "prettier . --write", diff --git a/services/booking/src/booking-frontend/package.json b/services/booking/src/booking-frontend/package.json index ab0b3f6b..bcb3f4fa 100644 --- a/services/booking/src/booking-frontend/package.json +++ b/services/booking/src/booking-frontend/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "npm run build && env-cmd -e development c8 --include=\"app/operations/index.js\" mocha app/operations/*_test.js", "build:generate": "openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", - "build:compile": "tsc", + "build:compile": "tsc && cp src/generated/basicValidation.cjs app/generated/basicValidation.cjs", "build": "npm run build:generate && npm run build:compile", "start": "npm run build && env-cmd -e development node app/index.js", "format": "prettier . --write", diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index fea058b8..a4f8e03c 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -44,7 +44,7 @@ export const postBooking: postBookingSignature = async (request, body) => { try { // Create booking - let [rows, fields]: [any, any] = await db.execute("INSERT INTO booking (`start`, `end`, `type`, `status`, `user`) VALUES (?,?,?,?,?)", [new Date(body.Time.Start), new Date(body.Time.End), body.Time, "pending", request.authorization.user]); + let [rows, fields]: [any, any] = await db.execute("INSERT INTO booking (`start`, `end`, `type`, `status`, `user`) VALUES (?,?,?,?,?)", [dayjs(body.Time.Start).toDate(), dayjs(body.Time.End).toDate(), body.Type, "pending", request.authorization.user]); let bookingID: bigint = BigInt(rows.insertId); for (let i = 0; i < body.Devices.length; i++) { @@ -244,6 +244,10 @@ export const patchBookingByID: patchBookingByIDSignature = async (request, param let connection = await amqplib.connect(config.AmqpUrl); let channel = await connection.createChannel(); + await channel.assertQueue("device-booking", { + durable: true + }); + try { for (let i = 0; i < Devices.length; i++) { await db.execute("INSERT INTO bookeddevices (`booking`, `originaldevice`, `originalposition`) VALUES (?,?,?)", [requestID, Devices[i].ID, i + toadd]); diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index 19696ed8..9a037967 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -1,150 +1,444 @@ -import { baseConfig } from '@crosslab/booking-service-common'; +import { baseConfig, sleep } from '@crosslab/booking-service-common'; import { - fakeServerConfig, - getFakeInstitutePrefix, - getFakeOwnURL, - getSQLDNS, - resetFakeServerVars, - setupDummySql, - startFakeServer, - stopFakeServer, - tearDownDummySql, - getFakeRequest, - } from '@crosslab/booking-service-test-common'; + fakeServerConfig, + getFakeInstitutePrefix, + getFakeOwnURL, + getSQLDNS, + resetFakeServerVars, + setupDummySql, + startFakeServer, + stopFakeServer, + tearDownDummySql, + getFakeRequest, +} from '@crosslab/booking-service-test-common'; import * as mocha from 'mocha'; +import dayjs, { Dayjs } from 'dayjs'; +import * as mysql from 'mysql2/promise'; +import * as amqplib from 'amqplib'; -import { } from './index'; -import {config} from '../config' - -mocha.describe('operations.ts', function () { - this.timeout(10000); - - mocha.before(function () { - // Config - use both global config and local config to ensure different application parts work with same config - baseConfig.OwnURL = getFakeOwnURL(); - baseConfig.InstitutePrefix = getFakeInstitutePrefix(); - baseConfig.ReservationDSN = getSQLDNS(); - - config.OwnURL = getFakeOwnURL(); - config.InstitutePrefix = getFakeInstitutePrefix(); - config.ReservationDSN = getSQLDNS(); - - startFakeServer(); - }); - - mocha.after(function () { - stopFakeServer(); - }); - - mocha.beforeEach(async function () { - // Reset server status - resetFakeServerVars(); - - // Setup database - await setupDummySql(); - }); - - mocha.afterEach(async function () { - await tearDownDummySql(); - }); - - mocha.it('postBooking authorization failed', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('postBooking single local device available', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('postBooking single local device not available', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('postBooking local group available', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('postBooking local group single device not available', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('postBooking local group all devices not available', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('postBooking local edge device', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('postBooking local instantiable device', async function (){ - throw Error("Not implemented"); - }); - - - - mocha.it('getBookingByID authorization failed', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('getBookingByID success', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('getBookingByID booking not available', async function (){ - throw Error("Not implemented"); - }); +import { MapToString, ResetAMQPDeviceCount, StartAMQPTestFree, StopAMQPTestFree, TestAMQPresults } from './indextest_helper_amqp' +import { postBooking } from './index'; +import { config } from '../config' +let connection: amqplib.Connection; +let channel: amqplib.Channel; - mocha.it('deleteBookingByID authorization failed', async function (){ - throw Error("Not implemented"); - }); - mocha.it('deleteBookingByID success', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('deleteBookingByID booking not available', async function (){ - throw Error("Not implemented"); - }); - - - - mocha.it('patchBookingByID authorization failed', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('patchBookingByID success unlocked', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('patchBookingByID success locked', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('patchBookingByID booking not available', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('patchBookingByID wrong status unlocked', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('patchBookingByID wrong status locked', async function (){ - throw Error("Not implemented"); - }); - - - - mocha.it('deleteBookingByIDDestroy authorization failed', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('deleteBookingByIDDestroy success', async function (){ - throw Error("Not implemented"); - }); - - mocha.it('deleteBookingByIDDestroy booking not available', async function (){ - throw Error("Not implemented"); - }); +mocha.describe('operations.ts', function () { + this.timeout(10000); + + mocha.before(function () { + // Config - use both global config and local config to ensure different application parts work with same config + baseConfig.OwnURL = getFakeOwnURL(); + baseConfig.InstitutePrefix = getFakeInstitutePrefix(); + baseConfig.ReservationDSN = getSQLDNS(); + baseConfig.BookingDSN = getSQLDNS(); + + config.OwnURL = getFakeOwnURL(); + config.InstitutePrefix = getFakeInstitutePrefix(); + config.ReservationDSN = getSQLDNS(); + config.BookingDSN = getSQLDNS(); + + startFakeServer(); + }); + + mocha.after(function () { + stopFakeServer(); + }); + + mocha.beforeEach(async function () { + // Reset server status + resetFakeServerVars(); + + // Setup database + await setupDummySql(); + + // Connect to amqp + connection = await amqplib.connect(baseConfig.AmqpUrl); + channel = await connection.createChannel(); + + await channel.assertQueue('device-booking', { + durable: true, + }); + + await channel.assertQueue('device-freeing', { + durable: true, + }); + + // Drain queues + while (await channel.get('device-booking', { noAck: true })) { } + while (await channel.get('device-freeing', { noAck: true })) { } + }); + + mocha.afterEach(async function () { + await tearDownDummySql(); + + await channel.deleteQueue('device-booking'); + await channel.deleteQueue('device-freeing'); + + await channel.close(); + await sleep(250); + await connection.close(); + + channel = undefined; + connection = undefined; + }); + + mocha.it('postBooking authorization failed', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestFree(); + try { + // Count number of bookings + let [rows, _]: [any, any] = await db.execute("SELECT count(*) AS n FROM booking"); + if (rows.length !== 1) { + throw new Error("internal error: wrong number of rows" + rows.length); + } + let before: number = rows[0].n; + + // Try booking + let isError: boolean = false + + let req = getFakeRequest({ user: "badactor", isAuthorized: false }); + + try { + await postBooking(req, { Time: { Start: dayjs("2000-01-01T07:00Z").toISOString(), End: dayjs("2000-01-01T08:00Z").toISOString() }, Devices: [{ ID: "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000" }] }); + } catch (err) { + if (err.message == "test authorization failed") { + isError = true; + } else { + console.log(err.message); + throw err; + } + } + await sleep(250); + + if (!isError) { + throw new Error("no access violation detected"); + } + + // Ensure number has not changed + [rows, _] = await db.execute("SELECT count(*) AS n FROM booking"); + if (rows.length !== 1) { + throw new Error("internal error: wrong number of rows" + rows.length); + } + if (Number(rows[0].n) != Number(before)) { + throw new Error("authorization failed but number of bookings was changed from " + before + " to " + rows[0].n); + } + if (req.related.length != 0) { + throw new Error("related not empty:" + req.related.toString()); + } + if (TestAMQPresults.size != 0) { + throw new Error("device reservation messages found " + MapToString(TestAMQPresults)); + } + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } + }); + + mocha.it('postBooking single device', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestFree(); + try { + // Count number of bookings + let [rows, _]: [any, any] = await db.execute("SELECT count(*) AS n FROM booking"); + if (rows.length !== 1) { + throw new Error("internal error: wrong number of rows" + rows.length); + } + let before: number = rows[0].n; + + // Try booking + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + let result = await postBooking(req, { Time: { Start: dayjs("2000-01-01T07:00Z").toISOString(), End: dayjs("2000-01-01T08:00Z").toISOString() }, Devices: [{ ID: "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000" }] }); + await sleep(250); + + if (result.status != 200) { + throw new Error("Booking failed with status " + result.status + " " + result.body); + } + + // Ensure number has increased by one + [rows, _] = await db.execute("SELECT count(*) AS n FROM booking"); + if (rows.length !== 1) { + throw new Error("internal error: wrong number of rows" + rows.length); + } + + if (Number(rows[0].n) != Number(before) + 1) { + throw new Error("number of bookings was changed from " + before + " to " + rows[0].n); + } + + let split = result.body.BookingID.split("/"); + let bookingID: bigint = BigInt(split[split.length - 1]); + + [rows, _] = await db.execute("SELECT `start`,`end`,`type`,`user` FROM booking WHERE `id`=?", [bookingID]); + if (rows.length !== 1) { + throw new Error("wrong number of rows: " + rows.length); + } + + if (!dayjs(rows[0].start).isSame(dayjs("2000-01-01T07:00Z"))) { + throw new Error("wrong start " + rows[0].start); + } + + if (!dayjs(rows[0].end).isSame(dayjs("2000-01-01T08:00Z"))) { + throw new Error("wrong end " + rows[0].end); + } + + if (rows[0].type != "normal") { + throw new Error("wrong type " + rows[0].type); + } + + if (rows[0].user != "unittest.user") { + throw new Error("wrong user " + rows[0].user); + } + + if (req.related.length != 1) { + throw new Error("wrong number of related" + req.related); + } + + if (req.related[0][0] != "user:unittest.user") { + throw new Error("wrong related user " + req.related); + } + + if (req.related[0][1] != "owner") { + throw new Error("wrong related relationship " + req.related); + } + + if (req.related[0][2] != `booking:${bookingID}`) { + throw new Error("wrong related user " + req.related); + } + + if (req.unrelated.length != 0) { + throw new Error("wrong number of related" + req.unrelated); + } + + // bookeddevices + [rows, _] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE booking=?", [bookingID]); + if (rows.length !== 1) { + throw new Error("internal error: wrong number of rows" + rows.length); + } + + if (Number(rows[0].n) != 1) { + throw new Error("number of booked devices is wrong: " + rows[0].n); + } + + [rows, _] = await db.execute("SELECT originaldevice FROM bookeddevices WHERE booking=? AND originalposition=?", [bookingID, 0]); + if (rows.length !== 1) { + throw new Error("found " + rows.length + " devices for position 0"); + } + + if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong original device " + rows[0].originaldevice); + } + + // AMQP + if (TestAMQPresults.size != 1) { + throw new Error("wrong number of device reservation messages found " + MapToString(TestAMQPresults)); + } + if (!TestAMQPresults.has(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000")) { + throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresults)); + } + if (TestAMQPresults.get(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") !== 1) { + throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresults)); + } + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } + }); + + mocha.it('postBooking multiple devices', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestFree(); + try { + // Count number of bookings + let [rows, _]: [any, any] = await db.execute("SELECT count(*) AS n FROM booking"); + if (rows.length !== 1) { + throw new Error("internal error: wrong number of rows" + rows.length); + } + let before: number = rows[0].n; + + // Try booking + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + let result = await postBooking(req, { Time: { Start: dayjs("2000-01-01T07:00Z").toISOString(), End: dayjs("2000-01-01T08:00Z").toISOString() }, Devices: [{ ID: "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000" }, { ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010" }] }); + await sleep(250); + + if (result.status != 200) { + throw new Error("Booking failed with status " + result.status + " " + result.body); + } + + // Ensure number has increased by one + [rows, _] = await db.execute("SELECT count(*) AS n FROM booking"); + if (rows.length !== 1) { + throw new Error("internal error: wrong number of rows" + rows.length); + } + + if (Number(rows[0].n) != Number(before) + 1) { + throw new Error("number of bookings was changed from " + before + " to " + rows[0].n); + } + + let split = result.body.BookingID.split("/"); + let bookingID: bigint = BigInt(split[split.length - 1]); + + [rows, _] = await db.execute("SELECT `start`,`end`,`type`,`user` FROM booking WHERE `id`=?", [bookingID]); + if (rows.length !== 1) { + throw new Error("wrong number of rows: " + rows.length); + } + + if (!dayjs(rows[0].start).isSame(dayjs("2000-01-01T07:00Z"))) { + throw new Error("wrong start " + rows[0].start); + } + + if (!dayjs(rows[0].end).isSame(dayjs("2000-01-01T08:00Z"))) { + throw new Error("wrong end " + rows[0].end); + } + + if (rows[0].type != "normal") { + throw new Error("wrong type " + rows[0].type); + } + + if (rows[0].user != "unittest.user") { + throw new Error("wrong user " + rows[0].user); + } + + if (req.related.length != 1) { + throw new Error("wrong number of related" + req.related); + } + + if (req.related[0][0] != "user:unittest.user") { + throw new Error("wrong related user " + req.related); + } + + if (req.related[0][1] != "owner") { + throw new Error("wrong related relationship " + req.related); + } + + if (req.related[0][2] != `booking:${bookingID}`) { + throw new Error("wrong related user " + req.related); + } + + if (req.unrelated.length != 0) { + throw new Error("wrong number of related" + req.unrelated); + } + + // bookeddevices + [rows, _] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE booking=?", [bookingID]); + if (rows.length !== 1) { + throw new Error("internal error: wrong number of rows" + rows.length); + } + + if (Number(rows[0].n) != 2) { + throw new Error("number of booked devices is wrong: " + rows[0].n); + } + + [rows, _] = await db.execute("SELECT originaldevice FROM bookeddevices WHERE booking=? AND originalposition=?", [bookingID, 0]); + if (rows.length !== 1) { + throw new Error("found " + rows.length + " devices for position 0"); + } + + if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong original device " + rows[0].originaldevice); + } + + [rows, _] = await db.execute("SELECT originaldevice FROM bookeddevices WHERE booking=? AND originalposition=?", [bookingID, 1]); + if (rows.length !== 1) { + throw new Error("found " + rows.length + " devices for position 0"); + } + + if (rows[0].originaldevice !== "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") { + throw new Error("wrong original device " + rows[0].originaldevice); + } + + // AMQP + if (TestAMQPresults.size != 2) { + throw new Error("wrong number of device reservation messages found " + MapToString(TestAMQPresults)); + } + if (!TestAMQPresults.has(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000")) { + throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresults)); + } + if (TestAMQPresults.get(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") !== 1) { + throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresults)); + } + if (!TestAMQPresults.has(bookingID.toString() + "-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010")) { + throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresults)); + } + if (TestAMQPresults.get(bookingID.toString() + "-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") !== 1) { + throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresults)); + } + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } + }); + + mocha.it('getBookingByID authorization failed', async function () { + throw Error("Not implemented"); + }); + + mocha.it('getBookingByID success', async function () { + throw Error("Not implemented"); + }); + + mocha.it('getBookingByID booking not available', async function () { + throw Error("Not implemented"); + }); + + + + mocha.it('deleteBookingByID authorization failed', async function () { + throw Error("Not implemented"); + }); + + mocha.it('deleteBookingByID success', async function () { + throw Error("Not implemented"); + }); + + mocha.it('deleteBookingByID booking not available', async function () { + throw Error("Not implemented"); + }); + + + + mocha.it('patchBookingByID authorization failed', async function () { + throw Error("Not implemented"); + }); + + mocha.it('patchBookingByID success unlocked', async function () { + throw Error("Not implemented"); + }); + + mocha.it('patchBookingByID success locked', async function () { + throw Error("Not implemented"); + }); + + mocha.it('patchBookingByID booking not available', async function () { + throw Error("Not implemented"); + }); + + mocha.it('patchBookingByID wrong status unlocked', async function () { + throw Error("Not implemented"); + }); + + mocha.it('patchBookingByID wrong status locked', async function () { + throw Error("Not implemented"); + }); + + + + mocha.it('deleteBookingByIDDestroy authorization failed', async function () { + throw Error("Not implemented"); + }); + + mocha.it('deleteBookingByIDDestroy success', async function () { + throw Error("Not implemented"); + }); + + mocha.it('deleteBookingByIDDestroy booking not available', async function () { + throw Error("Not implemented"); + }); }); diff --git a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp.ts b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp.ts new file mode 100644 index 00000000..85accfc1 --- /dev/null +++ b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp.ts @@ -0,0 +1,105 @@ +import * as amqplib from 'amqplib'; +import { config } from '../config' +import { sleep } from '@crosslab/booking-service-common'; +import { DeviceBookingRequest } from "@crosslab/service-booking-backend"; + + +let connection: amqplib.Connection; +let channel: amqplib.Channel; + +let amqpTestStarted = false; + +export let TestAMQPresults = new Map(); + +export function MapToString(map: Map): string { + return JSON.stringify(Object.fromEntries(map)); +} + +export function ResetAMQPDeviceCount(): void { + TestAMQPresults = new Map(); +}; + +async function helperLoop(): Promise { + while (true) { + let msg = await channel.get('device-booking', { noAck: false }); + + if (typeof msg === 'boolean') { + await sleep(20); + continue; + } + + if (msg === null) { + continue; + } + let data: string; + let message : DeviceBookingRequest; + // Parse data + try { + data = msg.content.toString(); + + if(data === "end amqp test"){ + amqpTestStarted = false; + return; + } + + message = DeviceBookingRequest.fromString(data); + } catch (error) { + console.log('Can not parse message:', error); + try { + channel.ack(msg); + } catch (error) { + console.log('Can not ack message:', error); + } + continue; + } + try { + let key = "" + message.BookingID + "-" + message.Position + "-" + message.Device; + if(TestAMQPresults.has(key)) { + TestAMQPresults.set(key, TestAMQPresults.get(key)+1); + } + TestAMQPresults.set(key, 1); + channel.ack(msg); + } catch (err) { + console.log("Error at helperLoop: " + err); + } + } +}; + +export async function StartAMQPTestFree(): Promise { + if (amqpTestStarted) { + throw new Error("amqp mockup alreay started"); + } + + connection = await amqplib.connect(config.AmqpUrl); + channel = await connection.createChannel(); + + await channel.assertQueue("device-booking", { + durable: true + }); + + while (await channel.get('device-booking', { noAck: true })) { } + + helperLoop(); + amqpTestStarted = true; + + return; +}; + +export async function StopAMQPTestFree(): Promise { + if (!amqpTestStarted) { + throw new Error("amqp mockup alreay stopped"); + } + + if (!channel.sendToQueue("device-booking", Buffer.from("end amqp test"), { persistent: true })) { + throw new Error("amqp queue full"); + } + + await sleep(1000); + await channel.close(); + channel = null; + await sleep(250); + await connection.close(); + connection = null; + + return; +}; diff --git a/services/booking/src/schedule-service/package.json b/services/booking/src/schedule-service/package.json index 508d5391..960f7ccd 100644 --- a/services/booking/src/schedule-service/package.json +++ b/services/booking/src/schedule-service/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "npm run build && env-cmd -e development c8 --include=\"app/operations/index.js\" --include=\"app/timetable.js\" mocha app/*_test.js app/operations/*_test.js", "build:generate": "openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", - "build:compile": "tsc", + "build:compile": "tsc && cp src/generated/basicValidation.cjs app/generated/basicValidation.cjs", "build": "npm run build:generate && npm run build:compile", "start": "npm run build && env-cmd -e development node app/index.js", "format": "prettier . --write", diff --git a/services/booking/src/test_common/src/fakerequest.ts b/services/booking/src/test_common/src/fakerequest.ts index ffa6cd63..9f70bff8 100644 --- a/services/booking/src/test_common/src/fakerequest.ts +++ b/services/booking/src/test_common/src/fakerequest.ts @@ -6,31 +6,36 @@ type FakeRequestOptions = { }; export function getFakeRequest(options?: FakeRequestOptions) { - if(options === undefined) { + if (options === undefined) { options = fakeRequestDefaultConfig(); - } + } let request = nodeMocksHttp.createRequest(); request.authorization = {}; request.authorization.user = options.user; - - request.authorization.check_authorization_or_fail = async function(action:string, id:string) : Promise { - if(!options.isAuthorized) { + + request.related = []; + request.unrelated = []; + + request.authorization.check_authorization_or_fail = async function (action: string, id: string): Promise { + if (!options.isAuthorized) { throw Error("test authorization failed"); - } - } + } + } - request.authorization.relate = async function(user: string, action:string, id:string) : Promise { + request.authorization.relate = async function (user: string, action: string, id: string): Promise { + request.related.push([user, action, id]); return true; - } + } - request.authorization.unrelate = async function(user: string, action:string, id:string) : Promise { + request.authorization.unrelate = async function (user: string, action: string, id: string): Promise { + request.unrelated.push([user, action, id]); return true; - } + } return request; -} +} -export function fakeRequestDefaultConfig() : FakeRequestOptions { - return{ +export function fakeRequestDefaultConfig(): FakeRequestOptions { + return { user: "testuser", isAuthorized: true, }; From d8656518bac3a8b3ebea91985e6dcfa63289c2c7 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 11 Jun 2024 12:12:52 +0000 Subject: [PATCH 31/79] Implemented tests --- .../src/operations/index_test.ts | 115 ++++++++ .../booking-frontend/src/operations/index.ts | 4 +- .../src/operations/index_test.ts | 262 +++++++++++++++++- 3 files changed, 374 insertions(+), 7 deletions(-) diff --git a/services/booking/src/booking-backend/src/operations/index_test.ts b/services/booking/src/booking-backend/src/operations/index_test.ts index 4001059a..d49f4154 100644 --- a/services/booking/src/booking-backend/src/operations/index_test.ts +++ b/services/booking/src/booking-backend/src/operations/index_test.ts @@ -99,6 +99,18 @@ mocha.describe('operations.ts', function () { throw new Error("wrong status " + result.status); } + if(result.body.length != 1){ + throw new Error("number of devices wrong "+ result.body.length); + } + + if(result.body[0].Requested != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ + throw new Error("wrong requested devive 0 " + result.body[0].Requested); + } + + if(result.body[0].Selected != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ + throw new Error("wrong selected devive 0 " + result.body[0].Selected); + } + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); if (rows.length == 0) { throw Error("booking not found") @@ -115,6 +127,97 @@ mocha.describe('operations.ts', function () { } }); + mocha.it('putBookingByIDLock lock success multiple', async function () { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + let result = await putBookingByIDLock(getFakeRequest(), { ID: "2" }); + await sleep(250); + + if (result.status != 200) { + throw new Error("wrong status " + result.status); + } + + if(result.body.length != 2){ + throw new Error("number of devices wrong "+ result.body.length); + } + + if(result.body[0].Requested != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ + throw new Error("wrong requested devive 0 " + result.body[0].Requested); + } + + if(result.body[0].Selected != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ + throw new Error("wrong selected devive 0 " + result.body[0].Selected); + } + + if(result.body[1].Requested != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"){ + throw new Error("wrong requested devive 0 " + result.body[1].Requested); + } + + if(result.body[1].Selected != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"){ + throw new Error("wrong selected devive 0 " + result.body[1].Selected); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(2)]); + if (rows.length == 0) { + throw Error("booking not found") + } + if (rows[0].status !== "active") { + throw new Error("Wrong status " + rows[0].status); + } + + if (!fakeServerConfig.callback_test_local_two_first_was_called) { + throw new Error("callback not called"); + } + if (!fakeServerConfig.callback_test_local_two_second_was_called) { + throw new Error("callback not called"); + } + } finally { + db.end(); + } + }); + + mocha.it('putBookingByIDLock lock success group', async function () { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + let result = await putBookingByIDLock(getFakeRequest(), { ID: "3" }); + await sleep(250); + + if (result.status != 200) { + throw new Error("wrong status " + result.status); + } + + if(result.body.length != 1){ + throw new Error("number of devices wrong "+ result.body.length); + } + + if(result.body[0].Requested != "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010"){ + throw new Error("wrong requested devive 0 " + result.body[0].Requested); + } + + if(result.body[0].Selected != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"){ + throw new Error("wrong selected devive 0 " + result.body[0].Selected); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(3)]); + if (rows.length == 0) { + throw Error("booking not found") + } + if (rows[0].status !== "active") { + throw new Error("Wrong status " + rows[0].status); + } + + if (!fakeServerConfig.callback_test_local_group_was_called) { + throw new Error("callback not called"); + } + } finally { + db.end(); + } + }); + mocha.it('putBookingByIDLock already locked', async function () { let db = await mysql.createConnection(config.BookingDSN); await db.connect(); @@ -128,6 +231,18 @@ mocha.describe('operations.ts', function () { throw new Error("wrong status " + result.status); } + if(result.body.length != 1){ + throw new Error("number of devices wrong "+ result.body.length); + } + + if(result.body[0].Requested != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ + throw new Error("wrong requested devive 0 " + result.body[0].Requested); + } + + if(result.body[0].Selected != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ + throw new Error("wrong selected devive 0 " + result.body[0].Selected); + } + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); if (rows.length == 0) { throw Error("booking not found") diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index a4f8e03c..5dc10ad8 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -109,8 +109,8 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter status: 404, }; } - body.Booking.Time.Start = rows[0].start; - body.Booking.Time.End = rows[0].end; + body.Booking.Time.Start = dayjs(rows[0].start).toISOString(); + body.Booking.Time.End = dayjs(rows[0].end).toISOString(); body.Booking.Type = rows[0].type; body.Booking.Status = rows[0].status; body.Booking.You = rows[0].user == request.authorization.user; diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index 9a037967..167e78d5 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -18,7 +18,7 @@ import * as amqplib from 'amqplib'; import { MapToString, ResetAMQPDeviceCount, StartAMQPTestFree, StopAMQPTestFree, TestAMQPresults } from './indextest_helper_amqp' -import { postBooking } from './index'; +import { postBooking, getBookingByID } from './index'; import { config } from '../config' let connection: amqplib.Connection; @@ -376,16 +376,268 @@ mocha.describe('operations.ts', function () { } }); + + mocha.it('getBookingByID authorization failed', async function () { - throw Error("Not implemented"); + try { + let isError: boolean = false + + let req = getFakeRequest({ user: "badactor", isAuthorized: false }); + + try { + await getBookingByID(req, { ID: "1" }); + } catch (err) { + if (err.message == "test authorization failed") { + isError = true; + } else { + console.log(err.message); + throw err; + } + } + await sleep(250); + + if (!isError) { + throw new Error("no access violation detected"); + } + } finally { + } }); - mocha.it('getBookingByID success', async function () { - throw Error("Not implemented"); + mocha.it('getBookingByID success single (creator)', async function () { + try { + let req = getFakeRequest({ user: "test", isAuthorized: true }); + let b = await getBookingByID(req, { ID: "1" }); + + if (b.status !== 200) { + throw new Error("bad status code" + b.status); + } + + if (b.body.Locked) { + throw new Error("booking is locked"); + } + + if (b.body.Booking.ID != "1") { + throw new Error("bad id" + b.body.Booking.ID); + } + + if (!b.body.Booking.You) { + throw new Error("you is not set") + } + + if (b.body.Booking.External) { + throw new Error("booking is external"); + } + + if (b.body.Booking.Status != "booked") { + throw new Error("wrong status" + b.body.Booking.Status); + } + + if (b.body.Booking.Devices.length != 1) { + throw new Error("wrong number of devices " + b.body.Booking.Devices.length); + } + + if (b.body.Booking.Devices[0] != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); + } + + if(!dayjs('1999-01-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))){ + throw new Error("wrong start " + b.body.Booking.Time.Start); + } + + if(dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start){ + throw new Error("start is no iso " + b.body.Booking.Time.Start); + } + + if(!dayjs('1999-01-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))){ + throw new Error("wrong end " + b.body.Booking.Time.End); + } + + if(dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End){ + throw new Error("end is no iso " + b.body.Booking.Time.End); + } + } finally { + } }); + mocha.it('getBookingByID success single (not creator)', async function () { + try { + let req = getFakeRequest({ user: "not_test", isAuthorized: true }); + let b = await getBookingByID(req, { ID: "1" }); + + if (b.status !== 200) { + throw new Error("bad status code" + b.status); + } + + if (b.body.Locked) { + throw new Error("booking is locked"); + } + + if (b.body.Booking.ID != "1") { + throw new Error("bad id" + b.body.Booking.ID); + } + + if (b.body.Booking.You) { + throw new Error("you is set") + } + + if (b.body.Booking.External) { + throw new Error("booking is external"); + } + + if (b.body.Booking.Status != "booked") { + throw new Error("wrong status" + b.body.Booking.Status); + } + + if (b.body.Booking.Devices.length != 1) { + throw new Error("wrong number of devices " + b.body.Booking.Devices.length); + } + + if (b.body.Booking.Devices[0] != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); + } + + if(!dayjs('1999-01-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))){ + throw new Error("wrong start " + b.body.Booking.Time.Start); + } + + if(dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start){ + throw new Error("start is no iso " + b.body.Booking.Time.Start); + } + + if(!dayjs('1999-01-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))){ + throw new Error("wrong end " + b.body.Booking.Time.End); + } + + if(dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End){ + throw new Error("end is no iso " + b.body.Booking.Time.End); + } + } finally { + } + }); + + mocha.it('getBookingByID success multiple (creator)', async function () { + try { + let req = getFakeRequest({ user: "test", isAuthorized: true }); + let b = await getBookingByID(req, { ID: "2" }); + + if (b.status !== 200) { + throw new Error("bad status code" + b.status); + } + + if (b.body.Locked) { + throw new Error("booking is locked"); + } + + if (b.body.Booking.ID != "2") { + throw new Error("bad id" + b.body.Booking.ID); + } + + if (!b.body.Booking.You) { + throw new Error("you is not set") + } + + if (b.body.Booking.External) { + throw new Error("booking is external"); + } + + if (b.body.Booking.Status != "booked") { + throw new Error("wrong status" + b.body.Booking.Status); + } + + if (b.body.Booking.Devices.length != 2) { + throw new Error("wrong number of devices " + b.body.Booking.Devices.length); + } + + if (b.body.Booking.Devices[0] != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); + } + + if (b.body.Booking.Devices[1] != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { + throw new Error("wrong device 1 " + b.body.Booking.Devices[1]); + } + + if(!dayjs('1999-02-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))){ + throw new Error("wrong start " + b.body.Booking.Time.Start); + } + + if(dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start){ + throw new Error("start is no iso " + b.body.Booking.Time.Start); + } + + if(!dayjs('1999-02-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))){ + throw new Error("wrong end " + b.body.Booking.Time.End); + } + + if(dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End){ + throw new Error("end is no iso " + b.body.Booking.Time.End); + } + } finally { + } + }); + + mocha.it('getBookingByID success group (creator)', async function () { + try { + let req = getFakeRequest({ user: "test", isAuthorized: true }); + let b = await getBookingByID(req, { ID: "3" }); + + if (b.status !== 200) { + throw new Error("bad status code" + b.status); + } + + if (b.body.Locked) { + throw new Error("booking is locked"); + } + + if (b.body.Booking.ID != "3") { + throw new Error("bad id" + b.body.Booking.ID); + } + + if (!b.body.Booking.You) { + throw new Error("you is not set") + } + + if (b.body.Booking.External) { + throw new Error("booking is external"); + } + + if (b.body.Booking.Status != "booked") { + throw new Error("wrong status" + b.body.Booking.Status); + } + + if (b.body.Booking.Devices.length != 1) { + throw new Error("wrong number of devices " + b.body.Booking.Devices.length); + } + + if (b.body.Booking.Devices[0] != "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") { + throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); + } + + if(!dayjs('1999-03-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))){ + throw new Error("wrong start " + b.body.Booking.Time.Start); + } + + if(dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start){ + throw new Error("start is no iso " + b.body.Booking.Time.Start); + } + + if(!dayjs('1999-03-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))){ + throw new Error("wrong end " + b.body.Booking.Time.End); + } + + if(dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End){ + throw new Error("end is no iso " + b.body.Booking.Time.End); + } + } finally { + } + }); + mocha.it('getBookingByID booking not available', async function () { - throw Error("Not implemented"); + let req = getFakeRequest({ user: "test", isAuthorized: true }); + let b = await getBookingByID(req, { ID: "99999999" }); + + if (b.status !== 404) { + throw new Error("bad status code" + b.status); + } }); From 44604c8ee4ce7714f26e2d480e105563a683f8b3 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 11 Jun 2024 14:06:10 +0000 Subject: [PATCH 32/79] Tested deleteBookingByID() --- .../src/integrationtest_helper_amqp.ts | 3 +- .../booking-frontend/src/operations/index.ts | 2 +- .../src/operations/index_test.ts | 301 ++++++++++++++---- ...qp.ts => indextest_helper_amqp_booking.ts} | 16 +- .../operations/indextest_helper_amqp_free.ts | 100 ++++++ 5 files changed, 348 insertions(+), 74 deletions(-) rename services/booking/src/booking-frontend/src/operations/{indextest_helper_amqp.ts => indextest_helper_amqp_booking.ts} (84%) create mode 100644 services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts diff --git a/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts b/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts index 15b3e30d..3305c136 100644 --- a/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts +++ b/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts @@ -1,4 +1,3 @@ -import { DeviceBookingRequest } from './messageDefinition'; import * as amqplib from 'amqplib'; import { config } from './config' import { sleep } from '@crosslab/booking-service-common'; @@ -73,7 +72,7 @@ export async function StartAMQPTestFree(): Promise { durable: true }); - //while (await channel.get('device-freeing', { noAck: true })) { } + while (await channel.get('device-freeing', { noAck: true })) { } helperLoop(); amqpTestStarted = true; diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index 5dc10ad8..0f2c25eb 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -335,7 +335,7 @@ async function commonRemoveBooking(requestID: bigint) : Promise<[404|200|423|500 await db.beginTransaction(); try { - let [rows, fields]: [any, any] = await db.execute("SELECT `status`, FROM booking WHERE `id`=? FOR UPDATE", [requestID]); + let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=? FOR UPDATE", [requestID]); if (rows.length === 0) { return [404, null]; } diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index 167e78d5..414f580e 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -16,9 +16,10 @@ import dayjs, { Dayjs } from 'dayjs'; import * as mysql from 'mysql2/promise'; import * as amqplib from 'amqplib'; -import { MapToString, ResetAMQPDeviceCount, StartAMQPTestFree, StopAMQPTestFree, TestAMQPresults } from './indextest_helper_amqp' +import { MapToString, ResetAMQPBookingDeviceCount, StartAMQPTestBooking, StopAMQPTestBooking, TestAMQPresultsBooking } from './indextest_helper_amqp_booking' +import { ResetAMQPDeviceCount, StartAMQPTestFree, StopAMQPTestFree, TestAMQPresults } from './indextest_helper_amqp_free' -import { postBooking, getBookingByID } from './index'; +import { postBooking, getBookingByID, deleteBookingByID } from './index'; import { config } from '../config' let connection: amqplib.Connection; @@ -88,7 +89,7 @@ mocha.describe('operations.ts', function () { mocha.it('postBooking authorization failed', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); - await StartAMQPTestFree(); + await StartAMQPTestBooking(); try { // Count number of bookings let [rows, _]: [any, any] = await db.execute("SELECT count(*) AS n FROM booking"); @@ -129,20 +130,20 @@ mocha.describe('operations.ts', function () { if (req.related.length != 0) { throw new Error("related not empty:" + req.related.toString()); } - if (TestAMQPresults.size != 0) { - throw new Error("device reservation messages found " + MapToString(TestAMQPresults)); + if (TestAMQPresultsBooking.size != 0) { + throw new Error("device reservation messages found " + MapToString(TestAMQPresultsBooking)); } } finally { db.end(); - await StopAMQPTestFree(); - ResetAMQPDeviceCount(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); } }); mocha.it('postBooking single device', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); - await StartAMQPTestFree(); + await StartAMQPTestBooking(); try { // Count number of bookings let [rows, _]: [any, any] = await db.execute("SELECT count(*) AS n FROM booking"); @@ -234,26 +235,26 @@ mocha.describe('operations.ts', function () { } // AMQP - if (TestAMQPresults.size != 1) { - throw new Error("wrong number of device reservation messages found " + MapToString(TestAMQPresults)); + if (TestAMQPresultsBooking.size != 1) { + throw new Error("wrong number of device reservation messages found " + MapToString(TestAMQPresultsBooking)); } - if (!TestAMQPresults.has(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000")) { - throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresults)); + if (!TestAMQPresultsBooking.has(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000")) { + throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresultsBooking)); } - if (TestAMQPresults.get(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") !== 1) { - throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresults)); + if (TestAMQPresultsBooking.get(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") !== 1) { + throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresultsBooking)); } } finally { db.end(); - await StopAMQPTestFree(); - ResetAMQPDeviceCount(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); } }); mocha.it('postBooking multiple devices', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); - await StartAMQPTestFree(); + await StartAMQPTestBooking(); try { // Count number of bookings let [rows, _]: [any, any] = await db.execute("SELECT count(*) AS n FROM booking"); @@ -354,25 +355,25 @@ mocha.describe('operations.ts', function () { } // AMQP - if (TestAMQPresults.size != 2) { - throw new Error("wrong number of device reservation messages found " + MapToString(TestAMQPresults)); + if (TestAMQPresultsBooking.size != 2) { + throw new Error("wrong number of device reservation messages found " + MapToString(TestAMQPresultsBooking)); } - if (!TestAMQPresults.has(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000")) { - throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresults)); + if (!TestAMQPresultsBooking.has(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000")) { + throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresultsBooking)); } - if (TestAMQPresults.get(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") !== 1) { - throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresults)); + if (TestAMQPresultsBooking.get(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") !== 1) { + throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresultsBooking)); } - if (!TestAMQPresults.has(bookingID.toString() + "-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010")) { - throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresults)); + if (!TestAMQPresultsBooking.has(bookingID.toString() + "-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010")) { + throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresultsBooking)); } - if (TestAMQPresults.get(bookingID.toString() + "-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") !== 1) { - throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresults)); + if (TestAMQPresultsBooking.get(bookingID.toString() + "-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") !== 1) { + throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresultsBooking)); } } finally { db.end(); - await StopAMQPTestFree(); - ResetAMQPDeviceCount(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); } }); @@ -440,21 +441,21 @@ mocha.describe('operations.ts', function () { throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); } - if(!dayjs('1999-01-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))){ + if (!dayjs('1999-01-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))) { throw new Error("wrong start " + b.body.Booking.Time.Start); } - - if(dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start){ + + if (dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start) { throw new Error("start is no iso " + b.body.Booking.Time.Start); - } + } - if(!dayjs('1999-01-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))){ + if (!dayjs('1999-01-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))) { throw new Error("wrong end " + b.body.Booking.Time.End); } - if(dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End){ + if (dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End) { throw new Error("end is no iso " + b.body.Booking.Time.End); - } + } } finally { } }); @@ -496,21 +497,21 @@ mocha.describe('operations.ts', function () { throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); } - if(!dayjs('1999-01-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))){ + if (!dayjs('1999-01-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))) { throw new Error("wrong start " + b.body.Booking.Time.Start); } - - if(dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start){ + + if (dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start) { throw new Error("start is no iso " + b.body.Booking.Time.Start); - } + } - if(!dayjs('1999-01-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))){ + if (!dayjs('1999-01-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))) { throw new Error("wrong end " + b.body.Booking.Time.End); } - if(dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End){ + if (dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End) { throw new Error("end is no iso " + b.body.Booking.Time.End); - } + } } finally { } }); @@ -556,26 +557,26 @@ mocha.describe('operations.ts', function () { throw new Error("wrong device 1 " + b.body.Booking.Devices[1]); } - if(!dayjs('1999-02-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))){ + if (!dayjs('1999-02-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))) { throw new Error("wrong start " + b.body.Booking.Time.Start); } - - if(dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start){ + + if (dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start) { throw new Error("start is no iso " + b.body.Booking.Time.Start); - } + } - if(!dayjs('1999-02-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))){ + if (!dayjs('1999-02-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))) { throw new Error("wrong end " + b.body.Booking.Time.End); } - if(dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End){ + if (dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End) { throw new Error("end is no iso " + b.body.Booking.Time.End); - } + } } finally { } }); - mocha.it('getBookingByID success group (creator)', async function () { + mocha.it('getBookingByID success group (creator)', async function () { try { let req = getFakeRequest({ user: "test", isAuthorized: true }); let b = await getBookingByID(req, { ID: "3" }); @@ -612,25 +613,25 @@ mocha.describe('operations.ts', function () { throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); } - if(!dayjs('1999-03-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))){ + if (!dayjs('1999-03-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))) { throw new Error("wrong start " + b.body.Booking.Time.Start); } - - if(dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start){ + + if (dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start) { throw new Error("start is no iso " + b.body.Booking.Time.Start); - } + } - if(!dayjs('1999-03-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))){ + if (!dayjs('1999-03-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))) { throw new Error("wrong end " + b.body.Booking.Time.End); } - if(dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End){ + if (dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End) { throw new Error("end is no iso " + b.body.Booking.Time.End); - } + } } finally { } }); - + mocha.it('getBookingByID booking not available', async function () { let req = getFakeRequest({ user: "test", isAuthorized: true }); let b = await getBookingByID(req, { ID: "99999999" }); @@ -643,19 +644,193 @@ mocha.describe('operations.ts', function () { mocha.it('deleteBookingByID authorization failed', async function () { - throw Error("Not implemented"); + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestFree(); + try { + let isError: boolean = false + + let req = getFakeRequest({ user: "badactor", isAuthorized: false }); + + try { + await deleteBookingByID(req, { ID: "1" }); + } catch (err) { + if (err.message == "test authorization failed") { + isError = true; + } else { + console.log(err.message); + throw err; + } + } + await sleep(250); + + if (!isError) { + throw new Error("no access violation detected"); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "booked") { + throw new Error("booking was deleted (status=" + rows[0].status + ")"); + } + + if (TestAMQPresults.size != 0) { + throw new Error("freed devices found " + MapToString(TestAMQPresults)); + } + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } }); - mocha.it('deleteBookingByID success', async function () { - throw Error("Not implemented"); + mocha.it('deleteBookingByID success single', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestFree(); + try { + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + + let res = await deleteBookingByID(req, { ID: "1" }); + await sleep(250); + + if (res.status != 200) { + if (res.status == 500) { + throw new Error(res.body); + } + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "cancelled") { + throw new Error("booking was not deleted (status=" + rows[0].status + ")"); + } + + if (TestAMQPresults.size != 1) { + throw new Error("wrong number of freed devices found " + MapToString(TestAMQPresults)); + } + + if (!TestAMQPresults.has(BigInt(1))) { + throw new Error("device not freed " + MapToString(TestAMQPresults)) + } + + if (Number(TestAMQPresults.get(BigInt(1))) != 1) { + throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + } + + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } + }); + + mocha.it('deleteBookingByID success multiple', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestFree(); + try { + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + + let res = await deleteBookingByID(req, { ID: "2" }); + await sleep(250); + + if (res.status != 200) { + if (res.status == 500) { + throw new Error(res.body); + } + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(2)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "cancelled") { + throw new Error("booking was not deleted (status=" + rows[0].status + ")"); + } + + if (TestAMQPresults.size != 2) { + throw new Error("wrong number of freed devices found " + MapToString(TestAMQPresults)); + } + + if (!TestAMQPresults.has(BigInt(2))) { + throw new Error("device not freed " + MapToString(TestAMQPresults)) + } + + if (Number(TestAMQPresults.get(BigInt(2))) != 1) { + throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + } + + if (!TestAMQPresults.has(BigInt(3))) { + throw new Error("device not freed " + MapToString(TestAMQPresults)) + } + + if (Number(TestAMQPresults.get(BigInt(3))) != 1) { + throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + } + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } }); mocha.it('deleteBookingByID booking not available', async function () { - throw Error("Not implemented"); + let req = getFakeRequest({ user: "test", isAuthorized: true }); + let b = await deleteBookingByID(req, { ID: "99999999" }); + + if (b.status !== 404) { + throw new Error("bad status code" + b.status); + } + }); + + + mocha.it('deleteBookingByID wrong status', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestFree(); + try { + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?",["active", BigInt(1)] ); + + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + let res = await deleteBookingByID(req, { ID: "1" }); + await sleep(250); + + if(res.status != 423){ + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "active") { + throw new Error("booking was deleted (status=" + rows[0].status + ")"); + } + + if (TestAMQPresults.size != 0) { + throw new Error("freed devices found " + MapToString(TestAMQPresults)); + } + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } }); + mocha.it('patchBookingByID authorization failed', async function () { throw Error("Not implemented"); }); diff --git a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp.ts b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_booking.ts similarity index 84% rename from services/booking/src/booking-frontend/src/operations/indextest_helper_amqp.ts rename to services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_booking.ts index 85accfc1..75789c97 100644 --- a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp.ts +++ b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_booking.ts @@ -9,14 +9,14 @@ let channel: amqplib.Channel; let amqpTestStarted = false; -export let TestAMQPresults = new Map(); +export let TestAMQPresultsBooking = new Map(); export function MapToString(map: Map): string { return JSON.stringify(Object.fromEntries(map)); } -export function ResetAMQPDeviceCount(): void { - TestAMQPresults = new Map(); +export function ResetAMQPBookingDeviceCount(): void { + TestAMQPresultsBooking = new Map(); }; async function helperLoop(): Promise { @@ -54,10 +54,10 @@ async function helperLoop(): Promise { } try { let key = "" + message.BookingID + "-" + message.Position + "-" + message.Device; - if(TestAMQPresults.has(key)) { - TestAMQPresults.set(key, TestAMQPresults.get(key)+1); + if(TestAMQPresultsBooking.has(key)) { + TestAMQPresultsBooking.set(key, TestAMQPresultsBooking.get(key)+1); } - TestAMQPresults.set(key, 1); + TestAMQPresultsBooking.set(key, 1); channel.ack(msg); } catch (err) { console.log("Error at helperLoop: " + err); @@ -65,7 +65,7 @@ async function helperLoop(): Promise { } }; -export async function StartAMQPTestFree(): Promise { +export async function StartAMQPTestBooking(): Promise { if (amqpTestStarted) { throw new Error("amqp mockup alreay started"); } @@ -85,7 +85,7 @@ export async function StartAMQPTestFree(): Promise { return; }; -export async function StopAMQPTestFree(): Promise { +export async function StopAMQPTestBooking(): Promise { if (!amqpTestStarted) { throw new Error("amqp mockup alreay stopped"); } diff --git a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts new file mode 100644 index 00000000..5110b617 --- /dev/null +++ b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts @@ -0,0 +1,100 @@ +import * as amqplib from 'amqplib'; +import { config } from '../config' +import { sleep } from '@crosslab/booking-service-common'; + + +let connection: amqplib.Connection; +let channel: amqplib.Channel; + +let amqpTestStarted = false; + +export let TestAMQPresults = new Map(); + +export function MapToString(map: Map): string { + return JSON.stringify(Object.fromEntries(map)); +} + +export function ResetAMQPDeviceCount(): void { + TestAMQPresults = new Map(); +}; + +async function helperLoop(): Promise { + while (true) { + let msg = await channel.get('device-freeing', { noAck: false }); + + if (typeof msg === 'boolean') { + await sleep(20); + continue; + } + + if (msg === null) { + continue; + } + + // Parse data + let data: bigint; + try { + data = BigInt(msg.content.toString()); + } catch (error) { + console.log('Can not parse message:', error); + try { + channel.ack(msg); + } catch (error) { + console.log('Can not ack message:', error); + } + continue; + } + try { + if(data === -9999n){ + amqpTestStarted = false; + return; + } + if(TestAMQPresults.has(data)) { + TestAMQPresults.set(data, TestAMQPresults.get(data)+1); + } + TestAMQPresults.set(data, 1); + channel.ack(msg); + } catch (err) { + console.log("Error at helperLoop: " + err); + } + } +}; + +export async function StartAMQPTestFree(): Promise { + if (amqpTestStarted) { + throw new Error("amqp mockup alreay started"); + } + + connection = await amqplib.connect(config.AmqpUrl); + channel = await connection.createChannel(); + + await channel.assertQueue("device-freeing", { + durable: true + }); + + while (await channel.get('device-freeing', { noAck: true })) { } + + helperLoop(); + amqpTestStarted = true; + + return; +}; + +export async function StopAMQPTestFree(): Promise { + if (!amqpTestStarted) { + throw new Error("amqp mockup alreay stopped"); + } + + if (!channel.sendToQueue("device-freeing", Buffer.from((-9999n).toString()), { persistent: true })) { + throw new Error("amqp queue full"); + } + + await sleep(1000); + await channel.close(); + channel = null; + await sleep(250); + await connection.close(); + connection = null; + + return; +}; From a86bf8eb4ab9dadfccb1041dfdb837ae670b3310 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 11 Jun 2024 14:39:34 +0000 Subject: [PATCH 33/79] Tested deleteBookingByIDDestroy() --- .../src/operations/index_test.ts | 183 +++++++++++++++++- 1 file changed, 178 insertions(+), 5 deletions(-) diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index 414f580e..e10d415f 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -19,7 +19,7 @@ import * as amqplib from 'amqplib'; import { MapToString, ResetAMQPBookingDeviceCount, StartAMQPTestBooking, StopAMQPTestBooking, TestAMQPresultsBooking } from './indextest_helper_amqp_booking' import { ResetAMQPDeviceCount, StartAMQPTestFree, StopAMQPTestFree, TestAMQPresults } from './indextest_helper_amqp_free' -import { postBooking, getBookingByID, deleteBookingByID } from './index'; +import { postBooking, getBookingByID, deleteBookingByID, deleteBookingByIDDestroy } from './index'; import { config } from '../config' let connection: amqplib.Connection; @@ -858,14 +858,187 @@ mocha.describe('operations.ts', function () { mocha.it('deleteBookingByIDDestroy authorization failed', async function () { - throw Error("Not implemented"); + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestFree(); + try { + let isError: boolean = false + + let req = getFakeRequest({ user: "badactor", isAuthorized: false }); + + try { + await deleteBookingByIDDestroy(req, { ID: "1" }); + } catch (err) { + if (err.message == "test authorization failed") { + isError = true; + } else { + console.log(err.message); + throw err; + } + } + await sleep(250); + + if (!isError) { + throw new Error("no access violation detected"); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "booked") { + throw new Error("booking was deleted (status=" + rows[0].status + ")"); + } + + if (TestAMQPresults.size != 0) { + throw new Error("freed devices found " + MapToString(TestAMQPresults)); + } + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } }); - mocha.it('deleteBookingByIDDestroy success', async function () { - throw Error("Not implemented"); + mocha.it('deleteBookingByIDDestroy success single', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestFree(); + try { + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + + let res = await deleteBookingByIDDestroy(req, { ID: "1" }); + await sleep(250); + + if (res.status != 200) { + if (res.status == 500) { + throw new Error(res.body); + } + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "cancelled") { + throw new Error("booking was not deleted (status=" + rows[0].status + ")"); + } + + if (TestAMQPresults.size != 1) { + throw new Error("wrong number of freed devices found " + MapToString(TestAMQPresults)); + } + + if (!TestAMQPresults.has(BigInt(1))) { + throw new Error("device not freed " + MapToString(TestAMQPresults)) + } + + if (Number(TestAMQPresults.get(BigInt(1))) != 1) { + throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + } + + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } + }); + + mocha.it('deleteBookingByIDDestroy success multiple', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestFree(); + try { + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + + let res = await deleteBookingByIDDestroy(req, { ID: "2" }); + await sleep(250); + + if (res.status != 200) { + if (res.status == 500) { + throw new Error(res.body); + } + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(2)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "cancelled") { + throw new Error("booking was not deleted (status=" + rows[0].status + ")"); + } + + if (TestAMQPresults.size != 2) { + throw new Error("wrong number of freed devices found " + MapToString(TestAMQPresults)); + } + + if (!TestAMQPresults.has(BigInt(2))) { + throw new Error("device not freed " + MapToString(TestAMQPresults)) + } + + if (Number(TestAMQPresults.get(BigInt(2))) != 1) { + throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + } + + if (!TestAMQPresults.has(BigInt(3))) { + throw new Error("device not freed " + MapToString(TestAMQPresults)) + } + + if (Number(TestAMQPresults.get(BigInt(3))) != 1) { + throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + } + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } }); mocha.it('deleteBookingByIDDestroy booking not available', async function () { - throw Error("Not implemented"); + let req = getFakeRequest({ user: "test", isAuthorized: true }); + let b = await deleteBookingByIDDestroy(req, { ID: "99999999" }); + + if (b.status !== 404) { + throw new Error("bad status code" + b.status); + } + }); + + + mocha.it('deleteBookingByIDDestroy wrong status', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestFree(); + try { + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?",["active", BigInt(1)] ); + + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + let res = await deleteBookingByIDDestroy(req, { ID: "1" }); + await sleep(250); + + if(res.status != 423){ + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "active") { + throw new Error("booking was deleted (status=" + rows[0].status + ")"); + } + + if (TestAMQPresults.size != 0) { + throw new Error("freed devices found " + MapToString(TestAMQPresults)); + } + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } }); }); From 8e8b9075c77bd2c86b57d22a8c5542f9a3d0adef Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Thu, 13 Jun 2024 15:16:52 +0000 Subject: [PATCH 34/79] Tested patchBookingByID() --- .../src/booking-frontend/api/component.yml | 11 +- .../booking-frontend/src/operations/index.ts | 35 +- .../src/operations/index_test.ts | 1062 ++++++++++++++++- .../booking/src/test_common/src/fakeserver.ts | 8 + 4 files changed, 1072 insertions(+), 44 deletions(-) diff --git a/services/booking/src/booking-frontend/api/component.yml b/services/booking/src/booking-frontend/api/component.yml index b025954e..becfe964 100644 --- a/services/booking/src/booking-frontend/api/component.yml +++ b/services/booking/src/booking-frontend/api/component.yml @@ -86,7 +86,7 @@ properties: Locked: type: boolean - description: Expresses whether the devices should be locked. Must match current status of booking. + description: Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set. Devices: type: array description: List of devices which should be added. @@ -113,6 +113,15 @@ BookingID: type: string format: uri + '400': + description: >- + The request was not build correctly (e.g. both Devices and Callback are requested). + See error returned for more details + content: + application/json: + schema: + type: string + description: Error description '401': description: No authorisation header found. '403': diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index 0f2c25eb..c1b53efb 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -149,7 +149,7 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter } export const deleteBookingByID: deleteBookingByIDSignature = async (request, parameters) => { - let requestID:bigint = BigInt(parameters.ID); + let requestID: bigint = BigInt(parameters.ID); await request.authorization.check_authorization_or_fail('delete', `booking:${requestID}`); @@ -157,7 +157,7 @@ export const deleteBookingByID: deleteBookingByIDSignature = async (request, par // Typescript seems to have problems to infer body correctly with case 500. // Therefore, the solution here is more complicated - if(code === 500) { + if (code === 500) { return { status: code, body: err ?? "No error", @@ -191,17 +191,22 @@ export const patchBookingByID: patchBookingByIDSignature = async (request, param } } - if (typeof(body.Callback) === "string") { + // if both are set, the request is invalid + if (typeof (body.Callback) === "string" && typeof (body.Devices) !== "undefined") { + return { + status: 400, + body: "can not add callback and devices in one request" + } + } else if (typeof (body.Callback) === "string") { // this is adding a callback await db.execute("INSERT INTO bookingcallbacks (`booking`, `url`) VALUES (?,?)", [requestID, body.Callback]); - } else if (typeof(body.Devices) !== undefined) { - // TODO: auth Check for scopes 'booking' and 'booking:use' + } else if (typeof (body.Devices) !== "undefined") { let Devices: Device[] = body.Devices as Device[]; - if (request.authorization.user === undefined || rows[0].user != request.authorization.user) { - return { - status: 401, - } - } + + // Set locked to default if not given + if(body.Locked == undefined){ + body.Locked = false; + } switch (body.Locked) { case true: @@ -246,7 +251,7 @@ export const patchBookingByID: patchBookingByIDSignature = async (request, param await channel.assertQueue("device-booking", { durable: true - }); + }); try { for (let i = 0; i < Devices.length; i++) { @@ -303,14 +308,14 @@ export const patchBookingByID: patchBookingByIDSignature = async (request, param } export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async (request, parameters) => { - let requestID:bigint = BigInt(parameters.ID); + let requestID: bigint = BigInt(parameters.ID); await request.authorization.check_authorization_or_fail('delete', `booking:${requestID}`); let [code, err] = await commonRemoveBooking(requestID) // Typescript seems to have problems to infer body correctly with case 500. // Therefore, the solution here is more complicated - if(code === 500) { + if (code === 500) { return { status: code, body: err ?? "No error", @@ -325,9 +330,9 @@ export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async } } -export default {postBooking, getBookingByID, deleteBookingByID, patchBookingByID, deleteBookingByIDDestroy} +export default { postBooking, getBookingByID, deleteBookingByID, patchBookingByID, deleteBookingByIDDestroy } -async function commonRemoveBooking(requestID: bigint) : Promise<[404|200|423|500, string|null]> { +async function commonRemoveBooking(requestID: bigint): Promise<[404 | 200 | 423 | 500, string | null]> { let success: boolean = false; let db = await mysql.createConnection(config.BookingDSN); diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index e10d415f..b4159a4d 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -19,7 +19,7 @@ import * as amqplib from 'amqplib'; import { MapToString, ResetAMQPBookingDeviceCount, StartAMQPTestBooking, StopAMQPTestBooking, TestAMQPresultsBooking } from './indextest_helper_amqp_booking' import { ResetAMQPDeviceCount, StartAMQPTestFree, StopAMQPTestFree, TestAMQPresults } from './indextest_helper_amqp_free' -import { postBooking, getBookingByID, deleteBookingByID, deleteBookingByIDDestroy } from './index'; +import { postBooking, getBookingByID, deleteBookingByID, deleteBookingByIDDestroy, patchBookingByID } from './index'; import { config } from '../config' let connection: amqplib.Connection; @@ -799,60 +799,1066 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestFree(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?",["active", BigInt(1)] ); + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); - let res = await deleteBookingByID(req, { ID: "1" }); + let res = await deleteBookingByID(req, { ID: "1" }); + await sleep(250); + + if (res.status != 423) { + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "active") { + throw new Error("booking was deleted (status=" + rows[0].status + ")"); + } + + if (TestAMQPresults.size != 0) { + throw new Error("freed devices found " + MapToString(TestAMQPresults)); + } + } finally { + db.end(); + await StopAMQPTestFree(); + ResetAMQPDeviceCount(); + } + }); + + + + + mocha.it('patchBookingByID authorization failed callback', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + let isError: boolean = false + + let req = getFakeRequest({ user: "badactor", isAuthorized: false }); + + try { + await patchBookingByID(req, { ID: "1" }, { Callback: "http://localhost:10801/test_callbacks/callback-test-new" }); + } catch (err) { + if (err.message == "test authorization failed") { + isError = true; + } else { + console.log(err.message); + throw err; + } + } + await sleep(250); + + if (!isError) { + throw new Error("no access violation detected"); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 1) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "booked") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + + mocha.it('patchBookingByID success unlocked callback', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Callback: "http://localhost:10801/test_callbacks/callback-test-new" }); + await sleep(250); + + if (res.status != 200) { + throw new Error("bad status code " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT `booking` FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length == 0) { + throw new Error("can not find booking"); + } + + if (rows.length > 1) { + throw new Error("number of rows too many " + rows.length); + } + + if (rows[0].booking != 1n) { + throw new Error("wrong booking id " + rows[0].bookingcallbacks); + } + + // Check devices haven't changed + [rows, _] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?", [BigInt(1)]); + if (rows.length == 0) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n > 1) { + throw new Error("number of bookeddevices wrong " + rows[0].n); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "booked") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + + mocha.it('patchBookingByID success locked callback', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); + + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Callback: "http://localhost:10801/test_callbacks/callback-test-new", Locked: true }); + await sleep(250); + + if (res.status != 200) { + throw new Error("bad status code " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT `booking` FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length == 0) { + throw new Error("can not find booking"); + } + + if (rows.length > 1) { + throw new Error("number of rows too many " + rows.length); + } + + if (rows[0].booking != 1n) { + throw new Error("wrong booking id " + rows[0].bookingcallbacks); + } + + // Check devices haven't changed + [rows, _] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?", [BigInt(1)]); + if (rows.length == 0) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n > 1) { + throw new Error("number of bookeddevices wrong " + rows[0].n); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "active") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + + mocha.it('patchBookingByID booking not available callback', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + let req = getFakeRequest({ user: "user.unittest.", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "999999999999" }, { Callback: "http://localhost:10801/test_callbacks/callback-test-new" }); + await sleep(250); + + if (res.status != 404) { + throw new Error("bad status code " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "booked") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + + mocha.it('patchBookingByID success unlocked devices', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }] }); + await sleep(250); + + if (res.status != 200) { + throw new Error("bad status code " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 2) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 0]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].originaldevice != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong originaldevice " + rows[0].originaldevice); + } + + [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 1]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].originaldevice != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { + throw new Error("wrong originaldevice " + rows[0].originaldevice); + } + + if (TestAMQPresultsBooking.size != 1) { + throw new Error("wrong number devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + if (!TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) { + throw new Error("wrong devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + if (Number(TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) != 1) { + throw new Error("wrong device number were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "pending") { + throw new Error("wrong status " + rows[0].status); + } + + // No new callbacks + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + + mocha.it('patchBookingByID success unlocked devices multiple', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }, { ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010" }] }); + await sleep(250); + + if (res.status != 200) { + throw new Error("bad status code " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 3) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 0]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].originaldevice != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong originaldevice " + rows[0].originaldevice); + } + + [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 1]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].originaldevice != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { + throw new Error("wrong originaldevice " + rows[0].originaldevice); + } + + [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 2]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].originaldevice != "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") { + throw new Error("wrong originaldevice " + rows[0].originaldevice); + } + + if (TestAMQPresultsBooking.size != 2) { + throw new Error("wrong number devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + if (!TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) { + throw new Error("wrong devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + if (Number(TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) != 1) { + throw new Error("wrong device number were requested " + MapToString(TestAMQPresultsBooking)); + } + + if (!TestAMQPresultsBooking.has("1-2-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010")) { + throw new Error("wrong devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + if (Number(TestAMQPresultsBooking.has("1-2-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010")) != 1) { + throw new Error("wrong device number were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "pending") { + throw new Error("wrong status " + rows[0].status); + } + // No new callbacks + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + + mocha.it('patchBookingByID unlocked devices set locked', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + + let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], Locked: true }); + await sleep(250); + + if (res.status != 423) { + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 1) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "booked") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + + mocha.it('patchBookingByID success locked devices', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); + + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], Locked: true }); + await sleep(250); + + if (res.status != 200) { + throw new Error("bad status code " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 2) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 0]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].originaldevice != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong originaldevice " + rows[0].originaldevice); + } + + [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 1]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].originaldevice != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { + throw new Error("wrong originaldevice " + rows[0].originaldevice); + } + + if (TestAMQPresultsBooking.size != 1) { + throw new Error("wrong number devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + if (!TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) { + throw new Error("wrong devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + if (Number(TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) != 1) { + throw new Error("wrong device number were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "active-pending") { + throw new Error("wrong status " + rows[0].status); + } + + // No new callbacks + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + + mocha.it('patchBookingByID locked devices forgot locked', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); + + let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], }); // no Locked here + await sleep(250); + + if (res.status != 423) { + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 1) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "active") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + + mocha.it('patchBookingByID booking not available devices', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + let req = getFakeRequest({ user: "user.unittest.", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "999999999999" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }] }); + await sleep(250); + + if (res.status != 404) { + throw new Error("bad status code " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "booked") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + + mocha.it('patchBookingByID wrong status unlocked devices (cancelled)', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["cancelled", BigInt(1)]); + + let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], }); + await sleep(250); + + if (res.status != 423) { + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 1) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "cancelled") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + + mocha.it('patchBookingByID wrong status unlocked devices (rejected)', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["rejected", BigInt(1)]); + + let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], }); await sleep(250); - if(res.status != 423){ + if (res.status != 423) { throw new Error("wrong status " + res.status); - } + } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); if (rows.length !== 1) { throw new Error("can not find booking"); } - if (rows[0].status != "active") { - throw new Error("booking was deleted (status=" + rows[0].status + ")"); + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); } - if (TestAMQPresults.size != 0) { - throw new Error("freed devices found " + MapToString(TestAMQPresults)); + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 1) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "rejected") { + throw new Error("wrong status " + rows[0].status); } } finally { db.end(); - await StopAMQPTestFree(); - ResetAMQPDeviceCount(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); } }); + mocha.it('patchBookingByID wrong status unlocked devices (active-pending)', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["active-pending", BigInt(1)]); + + let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], }); + await sleep(250); + + if (res.status != 423) { + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 1) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } - mocha.it('patchBookingByID authorization failed', async function () { - throw Error("Not implemented"); + if (rows[0].status != "active-pending") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } }); + mocha.it('patchBookingByID wrong status unlocked devices (active-rejected)', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["active-rejected", BigInt(1)]); + + let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], }); + await sleep(250); + + if (res.status != 423) { + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 1) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } - mocha.it('patchBookingByID success unlocked', async function () { - throw Error("Not implemented"); + if (rows[0].status != "active-rejected") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } }); - mocha.it('patchBookingByID success locked', async function () { - throw Error("Not implemented"); + mocha.it('patchBookingByID wrong status locked devices (cancelled)', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["cancelled", BigInt(1)]); + + let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], Locked: true }); + await sleep(250); + + if (res.status != 423) { + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 1) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "cancelled") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } }); - mocha.it('patchBookingByID booking not available', async function () { - throw Error("Not implemented"); + mocha.it('patchBookingByID wrong status locked devices (rejected)', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["rejected", BigInt(1)]); + + let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], Locked: true }); + await sleep(250); + + if (res.status != 423) { + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 1) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "rejected") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } }); - mocha.it('patchBookingByID wrong status unlocked', async function () { - throw Error("Not implemented"); + + mocha.it('patchBookingByID wrong status locked devices (pending)', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["pending", BigInt(1)]); + + let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], Locked: true }); + await sleep(250); + + if (res.status != 423) { + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find bookeddevices"); + } + + if (rows[0].n != 1) { + throw new Error("found " + rows[0].status + " bookeddevices"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "pending") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } }); - mocha.it('patchBookingByID wrong status locked', async function () { - throw Error("Not implemented"); + mocha.it('patchBookingByID both callback and devices', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + let req = getFakeRequest({ user: "user.unittest.", isAuthorized: true }); + + let res = await patchBookingByID(req, { ID: "1" }, { Callback: "http://localhost:10801/test_callbacks/callback-test-new", Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }] }); + await sleep(250); + + if (res.status != 400) { + throw new Error("bad status code " + res.status); + } + + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].n != 0) { + throw new Error("found " + rows[0].status + " new callbacks"); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + } + + [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "booked") { + throw new Error("wrong status " + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } }); @@ -1013,15 +2019,15 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestFree(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?",["active", BigInt(1)] ); + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); - let res = await deleteBookingByIDDestroy(req, { ID: "1" }); + let res = await deleteBookingByIDDestroy(req, { ID: "1" }); await sleep(250); - if(res.status != 423){ + if (res.status != 423) { throw new Error("wrong status " + res.status); - } + } let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); if (rows.length !== 1) { diff --git a/services/booking/src/test_common/src/fakeserver.ts b/services/booking/src/test_common/src/fakeserver.ts index fa7a0a06..699c0672 100644 --- a/services/booking/src/test_common/src/fakeserver.ts +++ b/services/booking/src/test_common/src/fakeserver.ts @@ -23,6 +23,7 @@ export var fakeServerConfig = { callback_test_local_two_second_was_called: false, callback_test_local_group_was_called: false, callback_test_remote_single_was_called: false, + callback_test_new_was_called: false, device_patch_list: [], booking_status: 'booked', }; @@ -227,6 +228,12 @@ export async function startFakeServer() { res.status(200).send(); }); + // to add in tests: http://localhost:10801/test_callbacks/callback-test-new + app.get('/test_callbacks/callback-test-new', (req, res) => { + fakeServerConfig.callback_test_new_was_called = true; + res.status(200).send(); + }); + app.post('/schedule', (req, res) => { switch (fakeServerConfig.schedule_service_status) { case 200: @@ -431,6 +438,7 @@ export function resetFakeServerVars() { fakeServerConfig.callback_test_local_two_second_was_called = false; fakeServerConfig.callback_test_local_group_was_called = false; fakeServerConfig.callback_test_remote_single_was_called = false; + fakeServerConfig.callback_test_new_was_called = false; fakeServerConfig.device_patch_list = []; fakeServerConfig.booking_status = 'booked'; } From 8de8f213812c8b9e0f250983b147ccde9905285c Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Thu, 13 Jun 2024 15:28:51 +0000 Subject: [PATCH 35/79] Updated booking test script --- services/booking/scripts/test.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/booking/scripts/test.sh b/services/booking/scripts/test.sh index eab0faa2..30d3a2a7 100755 --- a/services/booking/scripts/test.sh +++ b/services/booking/scripts/test.sh @@ -2,7 +2,9 @@ sudo service rabbitmq-server start sudo service mariadb start +sudo mysql -e "DROP DATABASE IF EXISTS unittest;" sudo mysql -e "CREATE DATABASE unittest DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;" +sudo mysql -e "DROP USER IF EXISTS 'test'@localhost;" sudo mysql -e "CREATE USER 'test'@localhost IDENTIFIED BY 'test';" sudo mysql -e "GRANT ALL PRIVILEGES ON unittest.* to 'test'@localhost;" sudo mysql -e "FLUSH PRIVILEGES;" @@ -18,8 +20,12 @@ result=0 cd "$current/src/schedule-service" npm test result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) -# cd "$current/src/booking-backend" -# npm test +cd "$current/src/booking-backend" +npm test +result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) +cd "$current/src/booking-frontend" +npm test +result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) cd "$current/src/device-reservation" npm test result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) From 913a494a8728e44f874deb3aacfc662744408efe Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 14 Jun 2024 14:39:19 +0000 Subject: [PATCH 36/79] Added some more test cases --- .../src/booking-backend/src/internal.ts | 8 +- .../booking-backend/src/operations/index.ts | 26 +++--- .../src/operations/index_test.ts | 37 +++++++- .../booking-frontend/src/operations/index.ts | 21 ++--- .../src/operations/index_test.ts | 88 +++++++++++++++++++ .../device-reservation/src/mainLoop_test.ts | 43 +++++++++ 6 files changed, 190 insertions(+), 33 deletions(-) diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 9d6b7c91..e63b3ac1 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -126,9 +126,9 @@ export async function handleCallback(type: callbackType, targetBooking: bigint, } // In the end - commit - db.commit(); + await db.commit(); } catch (err) { - db.rollback(); + await db.rollback(); throw err; } @@ -558,9 +558,9 @@ export async function freeDevice(internalreference: bigint) { await db.execute("UPDATE bookeddevices SET `bookeddevice`=?, `remotereference`=?, `local`=? WHERE `id`=?", [null, null, null, internalreference]); // Commit - db.commit(); + await db.commit(); } catch (err) { - db.rollback(); + await db.rollback(); throw err; } finally { db.end(); diff --git a/services/booking/src/booking-backend/src/operations/index.ts b/services/booking/src/booking-backend/src/operations/index.ts index 61e86dfa..eea53ee0 100644 --- a/services/booking/src/booking-backend/src/operations/index.ts +++ b/services/booking/src/booking-backend/src/operations/index.ts @@ -41,7 +41,7 @@ export const putBookingByIDLock: putBookingByIDLockSignature = async (request, case 'pending': case 'rejected': case 'cancelled': - db.rollback(); + await db.rollback(); return { status: 412, }; @@ -84,14 +84,12 @@ export const putBookingByIDLock: putBookingByIDLockSignature = async (request, status: 200, body: deviceList, }; - } catch (err) { - throw err; } finally { dispatchCallback(bookingID); - db.commit(); + await db.commit(); } } catch (err) { - db.rollback(); + await db.rollback(); throw err; } finally { db.end(); @@ -129,17 +127,17 @@ export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async (requ break; case 'active-pending': - await db.execute("UPDATE booking SET `status`='pending' WHERE `id`=?", [ - bookingID, - ]); - dispatchCallback(bookingID); - break; - + await db.execute("UPDATE booking SET `status`='pending' WHERE `id`=?", [ + bookingID, + ]); + dispatchCallback(bookingID); + break; + case 'pending': case 'rejected': case 'cancelled': - db.rollback(); + await db.rollback(); return { status: 412, }; @@ -152,12 +150,12 @@ export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async (requ throw Error('BUG: Unknown booking status ' + rows[0].status); } - db.commit(); + await db.commit(); return { status: 200, }; } catch (err) { - db.rollback(); + await db.rollback(); throw err; } finally { db.end(); diff --git a/services/booking/src/booking-backend/src/operations/index_test.ts b/services/booking/src/booking-backend/src/operations/index_test.ts index d49f4154..642e5a66 100644 --- a/services/booking/src/booking-backend/src/operations/index_test.ts +++ b/services/booking/src/booking-backend/src/operations/index_test.ts @@ -280,6 +280,17 @@ mocha.describe('operations.ts', function () { } }); + mocha.it('putBookingByIDLock no booking', async function () { + try { + let res = await putBookingByIDLock(getFakeRequest({ user: "unittest.user", isAuthorized: true }), { ID: "999999999999999" }); + await sleep(250); + if(res.status != 404){ + throw new Error("wrong status " + res.status) + } + } finally { + } + }); + mocha.it('deleteBookingByIDLock no authorization', async function () { let isError = false; try { @@ -333,7 +344,7 @@ mocha.describe('operations.ts', function () { await db.connect(); try { - let result = await putBookingByIDLock(getFakeRequest(), { ID: "1" }); + let result = await deleteBookingByIDLock(getFakeRequest(), { ID: "1" }); await sleep(250); if (result.status != 200) { @@ -344,7 +355,7 @@ mocha.describe('operations.ts', function () { if (rows.length == 0) { throw Error("booking not found") } - if (rows[0].status !== "active") { + if (rows[0].status !== "booked") { throw new Error("Wrong status " + rows[0].status); } } finally { @@ -402,6 +413,17 @@ mocha.describe('operations.ts', function () { } }); + mocha.it('deleteBookingByIDLock no booking', async function () { + try { + let res = await deleteBookingByIDLock(getFakeRequest({ user: "unittest.user", isAuthorized: true }), { ID: "999999999999999" }); + await sleep(250); + if(res.status != 404){ + throw new Error("wrong status " + res.status) + } + } finally { + } + }); + mocha.it('postBookingCallbackByID no authorization', async function () { let isError = false; try { @@ -425,4 +447,15 @@ mocha.describe('operations.ts', function () { await postBookingCallbackByID(getFakeRequest(), { ID: "1" }); await sleep(250); }); + + mocha.it('putBookingByIDLock no booking', async function () { + try { + let res = await postBookingCallbackByID(getFakeRequest({ user: "unittest.user", isAuthorized: true }), { ID: "999999999999999" }); + await sleep(250); + if(res.status != 404){ + throw new Error("wrong status " + res.status) + } + } finally { + } + }); }); diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index c1b53efb..2fa42988 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -71,7 +71,7 @@ export const postBooking: postBookingSignature = async (request, body) => { } } } catch (err) { - db.rollback(); + await db.rollback(); return { status: 500, @@ -115,6 +115,7 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter body.Booking.Status = rows[0].status; body.Booking.You = rows[0].user == request.authorization.user; body.Message = rows[0].message; + body.Locked = false; if (body.Booking.Status === "active" || body.Booking.Status === "active-pending" || body.Booking.Status == "active-rejected") { body.Locked = true; } @@ -130,7 +131,7 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter body: body } } catch (err) { - db.rollback(); + await db.rollback(); db.end(); return { @@ -138,7 +139,7 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter body: err.toString(), } } finally { - db.commit(); + await db.commit(); db.end(); }; @@ -225,12 +226,6 @@ export const patchBookingByID: patchBookingByIDSignature = async (request, param } await db.execute("UPDATE booking SET `status`=? WHERE id=?", ["pending", requestID]); break; - case undefined: - return { - status: 500, - body: "BUG: 'Locked' is missing", - } - break; default: throw Error("BUG: unknown status body.Locked: " + body.Locked); break; @@ -286,9 +281,9 @@ export const patchBookingByID: patchBookingByIDSignature = async (request, param } } finally { if (success) { - db.commit(); + await db.commit(); } else { - db.rollback(); + await db.rollback(); } db.end(); } @@ -392,9 +387,9 @@ async function commonRemoveBooking(requestID: bigint): Promise<[404 | 200 | 423 return [500, err.toString()]; } finally { if (success) { - db.commit(); + await db.commit(); } else { - db.rollback(); + await db.rollback(); } db.end(); } diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index b4159a4d..ed011c69 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -632,6 +632,67 @@ mocha.describe('operations.ts', function () { } }); + mocha.it('getBookingByID success single locked (creator)', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + try { + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); + + let req = getFakeRequest({ user: "test", isAuthorized: true }); + let b = await getBookingByID(req, { ID: "1" }); + + if (b.status !== 200) { + throw new Error("bad status code" + b.status); + } + + if (!b.body.Locked) { + throw new Error("booking is not locked"); + } + + if (b.body.Booking.ID != "1") { + throw new Error("bad id" + b.body.Booking.ID); + } + + if (!b.body.Booking.You) { + throw new Error("you is not set") + } + + if (b.body.Booking.External) { + throw new Error("booking is external"); + } + + if (b.body.Booking.Status != "active") { + throw new Error("wrong status" + b.body.Booking.Status); + } + + if (b.body.Booking.Devices.length != 1) { + throw new Error("wrong number of devices " + b.body.Booking.Devices.length); + } + + if (b.body.Booking.Devices[0] != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { + throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); + } + + if (!dayjs('1999-01-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))) { + throw new Error("wrong start " + b.body.Booking.Time.Start); + } + + if (dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start) { + throw new Error("start is no iso " + b.body.Booking.Time.Start); + } + + if (!dayjs('1999-01-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))) { + throw new Error("wrong end " + b.body.Booking.Time.End); + } + + if (dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End) { + throw new Error("end is no iso " + b.body.Booking.Time.End); + } + } finally { + db.end(); + } + }); + mocha.it('getBookingByID booking not available', async function () { let req = getFakeRequest({ user: "test", isAuthorized: true }); let b = await getBookingByID(req, { ID: "99999999" }); @@ -2047,4 +2108,31 @@ mocha.describe('operations.ts', function () { ResetAMQPDeviceCount(); } }); + + mocha.it('deleteBookingByIDDestroy double delete does nothing', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + try { + await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["cancelled", BigInt(1)]); + + let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + let res = await deleteBookingByIDDestroy(req, { ID: "1" }); + await sleep(250); + + if (res.status != 200) { + throw new Error("wrong status " + res.status); + } + + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + if (rows.length !== 1) { + throw new Error("can not find booking"); + } + + if (rows[0].status != "cancelled") { + throw new Error("booking status was deleted (status=" + rows[0].status + ")"); + } + } finally { + db.end(); + } + }); }); diff --git a/services/booking/src/device-reservation/src/mainLoop_test.ts b/services/booking/src/device-reservation/src/mainLoop_test.ts index a55095d4..9522b60a 100644 --- a/services/booking/src/device-reservation/src/mainLoop_test.ts +++ b/services/booking/src/device-reservation/src/mainLoop_test.ts @@ -563,6 +563,7 @@ mocha.describe('mainLoop.ts', function () { } }); + mocha.it('mainLoop.ts get missing values', async () => { let m = new ReservationMessage(ReservationRequest.Get, receiveQueue); @@ -582,6 +583,48 @@ mocha.describe('mainLoop.ts', function () { } }); + mocha.it('mainLoop.ts bad dates', async () => { + let m = new ReservationMessage(ReservationRequest.New, receiveQueue); + m.Device = new URL('http://localhost/device/superDevice'); + m.End = dayjs('2022-06-27T02:15:00Z'); + m.Start = dayjs('2022-06-27T03:45:00Z'); + + channel.sendToQueue(sendQueue, Buffer.from(JSON.stringify(m))); + await sleep(1000); + + let a = await channel.get(receiveQueue, { noAck: true }); + + if (a == null || typeof a === 'boolean') { + throw new Error('Did not receive answer message'); + } + + let data = JSON.parse(a.content.toString()); + + if (data.Successful) { + throw new Error("Reservation (1) was successful but shouldn't"); + } + + m = new ReservationMessage(ReservationRequest.New, receiveQueue); + m.Device = new URL('http://localhost/device/superDevice'); + m.End = dayjs('2022-06-27T02:15:00Z'); + m.Start = dayjs('2022-06-27T02:15:00Z'); + + channel.sendToQueue(sendQueue, Buffer.from(JSON.stringify(m))); + await sleep(1000); + + a = await channel.get(receiveQueue, { noAck: true }); + + if (a == null || typeof a === 'boolean') { + throw new Error('Did not receive answer message'); + } + + data = JSON.parse(a.content.toString()); + + if (data.Successful) { + throw new Error("Reservation (2) was successful but shouldn't"); + } + }) ; + mocha.it('mainLoop.ts delete missing values', async () => { let m = new ReservationMessage(ReservationRequest.Delete, receiveQueue); From 5bcb8b67d8b099d2160a4c409e210b75036c3840 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 14 Jun 2024 16:06:23 +0000 Subject: [PATCH 37/79] Updated dependencies --- services/booking/package-lock.json | 3791 +-- .../src/booking-backend/package-lock.json | 18328 ++------------- .../booking/src/booking-backend/package.json | 5 +- .../src/booking-frontend/package-lock.json | 19396 +--------------- .../booking/src/booking-frontend/package.json | 4 +- services/booking/src/common/package-lock.json | 279 +- .../src/device-reservation/package-lock.json | 1738 +- .../src/device-reservation/package.json | 6 +- .../src/schedule-service/package-lock.json | 18860 ++------------- .../booking/src/schedule-service/package.json | 4 +- .../booking/src/test_common/package-lock.json | 3268 +-- 11 files changed, 8171 insertions(+), 57508 deletions(-) diff --git a/services/booking/package-lock.json b/services/booking/package-lock.json index 0d4122e3..b6b26c42 100644 --- a/services/booking/package-lock.json +++ b/services/booking/package-lock.json @@ -18,7 +18,6 @@ } }, "../../helper/openapi-codegeneration": { - "name": "@cross-lab-project/openapi-codegen", "dev": true, "license": "UNLICENSED", "dependencies": { @@ -53,308 +52,162 @@ "typescript": "^5.2.2" } }, - "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/code-frame": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "peer": true, + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.9", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.1" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@babel/core/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "peer": true, - "bin": { - "semver": "bin/semver.js" } }, "node_modules/@babel/generator": { - "version": "7.22.9", - "dev": true, - "license": "MIT", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "peer": true, + "node_modules/@babel/helper-environment-visitor/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC", - "peer": true - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "license": "MIT", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/helper-function-name/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "peer": true, + "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "peer": true, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "license": "MIT", + "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "license": "MIT", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.22.6", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" - }, + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.5", - "license": "MIT", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.22.7", - "license": "MIT", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -362,56 +215,57 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.22.5", + "node_modules/@babel/runtime": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/runtime": { - "version": "7.22.6", - "dev": true, - "license": "MIT", + "node_modules/@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dependencies": { - "regenerator-runtime": "^0.13.11" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/template": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -419,133 +273,142 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", "dependencies": { - "ms": "2.1.2" + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" + "node_modules/@babel/traverse/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@babel/types": { - "version": "7.22.5", - "license": "MIT", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@cfaester/enzyme-adapter-react-18": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@cfaester/enzyme-adapter-react-18/-/enzyme-adapter-react-18-0.8.0.tgz", + "integrity": "sha512-3Z3ThTUouHwz8oIyhTYQljEMNRFtlVyc3VOOHCbxs47U6cnXs8K9ygi/c1tv49s7MBlTXeIcuN+Ttd9aPtILFQ==", + "dev": true, + "dependencies": { + "enzyme-shallow-equal": "^1.0.0", + "function.prototype.name": "^1.1.6", + "has": "^1.0.4", + "react-is": "^18.2.0", + "react-shallow-renderer": "^16.15.0" + }, + "peerDependencies": { + "enzyme": "^3.11.0", + "react": ">=18", + "react-dom": ">=18" + } + }, "node_modules/@cross-lab-project/openapi-codegen": { "resolved": "../../helper/openapi-codegeneration", "link": true }, "node_modules/@emotion/is-prop-valid": { - "version": "1.2.1", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", + "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", "dev": true, - "license": "MIT", "dependencies": { "@emotion/memoize": "^0.8.1" } }, "node_modules/@emotion/memoize": { "version": "0.8.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@emotion/stylis": { - "version": "0.8.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==", + "dev": true }, "node_modules/@emotion/unitless": { - "version": "0.7.5", - "dev": true, - "license": "MIT" + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", + "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==", + "dev": true }, "node_modules/@exodus/schemasafe": { - "version": "1.0.1", - "dev": true, - "license": "MIT" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", + "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==", + "dev": true }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "dev": true, - "license": "MIT", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "engines": { "node": ">=6.0.0" } }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "dev": true, - "license": "MIT", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, "node_modules/@redocly/ajv": { "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-9GWx27t7xWhDIR02PA18nzBdLcKQRgc46xNQvjFkrYk4UOmvKhJ/dawwiX0cCOeetN5LcaaiqQbVOWYK62SGHw==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -558,25 +421,28 @@ } }, "node_modules/@redocly/cli": { - "version": "1.0.2", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.15.0.tgz", + "integrity": "sha512-+KZp86YpCEJoRxr/pa2UXYv0EdyvsvcK5ddr2g5cPFoCU9z6FVaVSKGW/9ipX1UsRX3sDQfFIZfEpeA5hybpuA==", "dev": true, - "license": "MIT", "dependencies": { - "@redocly/openapi-core": "1.0.2", - "assert-node-version": "^1.0.3", + "@redocly/openapi-core": "1.15.0", + "abort-controller": "^3.0.0", "chokidar": "^3.5.1", "colorette": "^1.2.0", + "core-js": "^3.32.1", + "form-data": "^4.0.0", + "get-port-please": "^3.0.1", "glob": "^7.1.6", - "glob-promise": "^3.4.0", "handlebars": "^4.7.6", "mobx": "^6.0.4", - "portfinder": "^1.0.26", - "react": "^17.0.0", - "react-dom": "^17.0.0", - "redoc": "~2.0.0", + "node-fetch": "^2.6.1", + "react": "^17.0.0 || ^18.2.0", + "react-dom": "^17.0.0 || ^18.2.0", + "redoc": "~2.1.5", "semver": "^7.5.2", "simple-websocket": "^9.0.0", - "styled-components": "^5.1.1", + "styled-components": "^6.0.7", "yargs": "17.0.1" }, "bin": { @@ -584,16 +450,24 @@ "redocly": "bin/cli.js" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.19.0", + "npm": ">=7.0.0" } }, + "node_modules/@redocly/config": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.6.0.tgz", + "integrity": "sha512-hNVN3eTxFj2nHYX0gGzZxxXwdE0DXWeWou1TIK3HYf0S9VKVxTxjO9EZbMB7iVUqaHkeqy4PSjlBQcEgD0Ftjg==", + "dev": true + }, "node_modules/@redocly/openapi-core": { - "version": "1.0.2", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.15.0.tgz", + "integrity": "sha512-ac+3nn9y/dE+cgIVgIdq7eIisjZlBEJptLsCbOVLIsR2jb+O1SznXeyqy2MkTHMSs6zM/KHP4bMQy0DGmi7K0Q==", "dev": true, - "license": "MIT", "dependencies": { "@redocly/ajv": "^8.11.0", - "@types/node": "^14.11.8", + "@redocly/config": "^0.6.0", "colorette": "^1.2.0", "js-levenshtein": "^1.1.6", "js-yaml": "^4.1.0", @@ -604,57 +478,18 @@ "yaml-ast-parser": "0.0.43" }, "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@redocly/openapi-core/node_modules/@types/node": { - "version": "14.18.53", - "dev": true, - "license": "MIT" - }, - "node_modules/@redocly/openapi-core/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/@redocly/openapi-core/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@redocly/openapi-core/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@redocly/openapi-core/node_modules/minimatch": { - "version": "5.1.6", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" + "node": ">=14.19.0", + "npm": ">=7.0.0" } }, "node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.0.tgz", - "integrity": "sha512-YBepjbt+ZNBVmN3ev1amQH3lWCmHyt5qTbLCp/syXJRu/Kw2koXh44qayB1gMRxcL/gV8egmjN5xWSrYyfUtyw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", + "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", "dependencies": { "@babel/generator": "7.17.7", "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", + "@babel/traverse": "7.23.2", "@babel/types": "7.17.0", "javascript-natural-sort": "0.7.1", "lodash": "^4.17.21" @@ -669,910 +504,1311 @@ } } }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/stylis": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.5.tgz", + "integrity": "sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==", + "dev": true + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "event-target-shim": "^5.0.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=6.5" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" } }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=4" } }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": ">=6.9.0" + "node": ">= 8" } }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, "dependencies": { - "ms": "2.1.2" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" }, "engines": { - "node": ">=6.0" + "node": ">= 0.4" }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "engines": { - "node": ">=0.10.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@types/eslint": { - "version": "8.44.0", + "node_modules/array.prototype.filter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.4.tgz", + "integrity": "sha512-r+mCJ7zXgXElgR4IRC+fkvNCeoaavWBs6EdCso5Tbcf+iEMKzBU/His60lt34WEZ9vlb8wDkZvQGcVI5GwkfoQ==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-array-method-boxes-properly": "^1.0.0", + "es-object-atoms": "^1.0.0", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@types/eslint-scope": { - "version": "3.7.4", + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@types/estree": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@types/glob": { - "version": "8.0.0", + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, - "license": "MIT", "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@types/json-schema": { - "version": "7.0.11", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/minimatch": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "18.11.0", - "dev": true, - "license": "MIT" + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true }, - "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "dev": true, - "license": "MIT", - "peer": true + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, - "license": "MIT", - "peer": true + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true, - "license": "MIT", "peer": true }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" + "balanced-match": "^1.0.0" } }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, - "license": "MIT", - "peer": true + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", + "node_modules/call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dev": true + }, + "node_modules/camelize": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", + "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==", "dev": true, - "license": "MIT", - "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": { - "@xtuc/ieee754": "^1.2.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", + "node_modules/cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", "dev": true, - "license": "Apache-2.0", "peer": true, "dependencies": { - "@xtuc/long": "4.2.2" + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + }, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" } }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" } }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", + "dev": true + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", "dev": true, - "license": "MIT", - "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "color-name": "1.1.3" } }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/colorette": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@xtuc/long": "4.2.2" + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" } }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true, - "license": "BSD-3-Clause", "peer": true }, - "node_modules/@xtuc/long": { - "version": "4.2.2", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/core-js": { + "version": "3.37.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.1.tgz", + "integrity": "sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==", "dev": true, - "license": "Apache-2.0", - "peer": true + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } }, - "node_modules/acorn": { - "version": "8.10.0", + "node_modules/css-color-keywords": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", + "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==", "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "acorn": "bin/acorn" - }, "engines": { - "node": ">=0.4.0" + "node": ">=4" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", "dev": true, - "license": "MIT", "peer": true, - "peerDependencies": { - "acorn": "^8" + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", + "node_modules/css-to-react-native": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz", + "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" + "dependencies": { + "camelize": "^1.0.0", + "css-color-keywords": "^1.0.0", + "postcss-value-parser": "^4.0.2" } }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true, + "peer": true, "engines": { - "node": ">=4" + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" } }, - "node_modules/anymatch": { + "node_modules/csstype": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true + }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", "dev": true, - "license": "ISC", "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" }, "engines": { - "node": ">= 8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/assert-node-version": { - "version": "1.0.3", + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", "dev": true, - "license": "MIT", "dependencies": { - "expected-node-version": "^1.0.0", - "semver": "^5.0.3" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/assert-node-version/node_modules/semver": { - "version": "5.7.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/async": { - "version": "2.6.4", + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", "dev": true, - "license": "MIT", "dependencies": { - "lodash": "^4.17.14" + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/babel-plugin-styled-components": { - "version": "2.1.4", - "dev": true, - "license": "MIT", + "node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/plugin-syntax-jsx": "^7.22.5", - "lodash": "^4.17.21", - "picomatch": "^2.3.1" + "ms": "2.1.2" }, - "peerDependencies": { - "styled-components": ">= 2" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "dev": true, - "license": "MIT", "engines": { - "node": ">=8" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } + "node_modules/decko": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decko/-/decko-1.2.0.tgz", + "integrity": "sha512-m8FnyHXV1QX+S1cl+KPFDIl6NMkxtKsy6+U/aYyjrOqWMuwAwYWu7ePqrsUHtDR5Y8Yk2pi/KIDSgF+vT4cPOQ==", + "dev": true }, - "node_modules/braces": { - "version": "3.0.2", + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, - "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/browserslist": { - "version": "4.21.9", + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "peer": true, "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/buffer-from": { - "version": "1.1.2", + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, - "license": "MIT", - "peer": true + "engines": { + "node": ">=0.4.0" + } }, - "node_modules/call-me-maybe": { - "version": "1.0.1", + "node_modules/discontinuous-range": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", + "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==", "dev": true, - "license": "MIT" + "peer": true }, - "node_modules/camelize": { - "version": "1.0.1", + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "dev": true, - "license": "MIT", + "peer": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, - "node_modules/caniuse-lite": { - "version": "1.0.30001515", + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true, "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, { "type": "github", - "url": "https://github.com/sponsors/ai" + "url": "https://github.com/sponsors/fb55" } ], - "license": "CC-BY-4.0", "peer": true }, - "node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "peer": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "domelementtype": "^2.3.0" }, "engines": { - "node": ">=4" + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" } }, - "node_modules/chokidar": { - "version": "3.5.3", + "node_modules/dompurify": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.5.tgz", + "integrity": "sha512-lwG+n5h8QNpxtyrJW/gJWckL+1/DQiYMX8f7t8Z2AZTPw1esVrqjI63i7Zc2Gz0aKzLVMYC1V1PL/ky+aY/NgA==", + "dev": true + }, + "node_modules/domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", + "peer": true, "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" } }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, - "license": "MIT", "peer": true, "engines": { - "node": ">=6.0" + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/classnames": { - "version": "2.3.2", + "node_modules/enzyme": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.11.0.tgz", + "integrity": "sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw==", "dev": true, - "license": "MIT" - }, - "node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", + "peer": true, "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "array.prototype.flat": "^1.2.3", + "cheerio": "^1.0.0-rc.3", + "enzyme-shallow-equal": "^1.0.1", + "function.prototype.name": "^1.1.2", + "has": "^1.0.3", + "html-element-map": "^1.2.0", + "is-boolean-object": "^1.0.1", + "is-callable": "^1.1.5", + "is-number-object": "^1.0.4", + "is-regex": "^1.0.5", + "is-string": "^1.0.5", + "is-subset": "^0.1.1", + "lodash.escape": "^4.0.1", + "lodash.isequal": "^4.5.0", + "object-inspect": "^1.7.0", + "object-is": "^1.0.2", + "object.assign": "^4.1.0", + "object.entries": "^1.1.1", + "object.values": "^1.1.1", + "raf": "^3.4.1", + "rst-selector-parser": "^2.2.3", + "string.prototype.trim": "^1.2.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/clsx": { - "version": "1.2.1", + "node_modules/enzyme-shallow-equal": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.7.tgz", + "integrity": "sha512-/um0GFqUXnpM9SvKtje+9Tjoz3f1fpBC3eXRFrNs8kpYn69JljciYP7KZTqM/YQbUY9KUjvKB4jo/q+L6WGGvg==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", "dependencies": { - "color-name": "1.1.3" + "hasown": "^2.0.0", + "object-is": "^1.1.5" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "node_modules/colorette": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/convert-source-map": { - "version": "1.9.0", + "node_modules/es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", "dev": true, - "license": "MIT", "peer": true }, - "node_modules/core-js": { - "version": "3.31.1", + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", "dev": true, - "hasInstallScript": true, - "license": "MIT", - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" } }, - "node_modules/css-color-keywords": { - "version": "1.0.0", + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, - "license": "ISC", "engines": { - "node": ">=4" + "node": ">= 0.4" } }, - "node_modules/css-to-react-native": { - "version": "3.2.0", + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", "dev": true, - "license": "MIT", "dependencies": { - "camelize": "^1.0.0", - "css-color-keywords": "^1.0.0", - "postcss-value-parser": "^4.0.2" + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" } }, - "node_modules/debug": { - "version": "3.2.7", + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, - "license": "MIT", "dependencies": { - "ms": "^2.1.1" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" } }, - "node_modules/decko": { - "version": "1.2.0", - "dev": true - }, - "node_modules/dompurify": { - "version": "2.4.7", - "dev": true, - "license": "(MPL-2.0 OR Apache-2.0)" - }, - "node_modules/electron-to-chromium": { - "version": "1.4.459", - "dev": true, - "license": "ISC", - "peer": true - }, - "node_modules/emoji-regex": { - "version": "8.0.0", + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, - "license": "MIT" + "peer": true, + "dependencies": { + "hasown": "^2.0.0" + } }, - "node_modules/enhanced-resolve": { - "version": "5.15.0", + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" }, "engines": { - "node": ">=10.13.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-module-lexer": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/es6-promise": { "version": "3.3.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", + "dev": true }, "node_modules/escalade": { - "version": "3.1.1", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "engines": { "node": ">=0.8.0" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, - "license": "BSD-2-Clause", - "peer": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "to-regex-range": "^5.0.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/esrecurse": { - "version": "4.3.0", + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/foreach": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", + "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", + "dev": true + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, - "license": "BSD-2-Clause", - "peer": true, "dependencies": { - "estraverse": "^5.2.0" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" }, "engines": { - "node": ">=4.0" + "node": ">= 6" } }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, - "license": "BSD-2-Clause", - "peer": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=4.0" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, - "license": "BSD-2-Clause", - "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, "engines": { - "node": ">=4.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eventemitter3": { - "version": "4.0.7", + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, - "license": "MIT" + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/events": { - "version": "3.3.0", + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "license": "MIT", - "peer": true, "engines": { - "node": ">=0.8.x" + "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/expected-node-version": { + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-port-please": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.1.2.tgz", + "integrity": "sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ==", + "dev": true + }, + "node_modules/get-symbol-description": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, - "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "MIT" + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "MIT", - "peer": true + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } }, - "node_modules/fill-range": { - "version": "7.0.1", + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "MIT", "dependencies": { - "to-regex-range": "^5.0.1" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/foreach": { - "version": "2.0.6", + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, - "license": "MIT" + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/fs.realpath": { - "version": "1.0.0", + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, - "license": "ISC" + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "license": "MIT", - "peer": true, "engines": { - "node": ">=6.9.0" + "node": ">=0.10.0" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", "dev": true, - "license": "ISC", "engines": { - "node": "6.* || 8.* || >= 10.*" + "node": ">= 0.4.0" } }, - "node_modules/glob": { - "version": "7.2.3", + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { - "node": ">= 6" + "node": ">=4" } }, - "node_modules/glob-promise": { - "version": "3.4.0", + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, - "license": "ISC", "dependencies": { - "@types/glob": "*" - }, - "engines": { - "node": ">=4" + "es-define-property": "^1.0.0" }, - "peerDependencies": { - "glob": "*" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, - "license": "BSD-2-Clause", - "peer": true - }, - "node_modules/globals": { - "version": "11.12.0", - "license": "MIT", "engines": { - "node": ">=4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, - "license": "ISC", - "peer": true + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/handlebars": { - "version": "4.7.7", + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, - "license": "MIT", "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" + "has-symbols": "^1.0.3" }, "engines": { - "node": ">=0.4.7" + "node": ">= 0.4" }, - "optionalDependencies": { - "uglify-js": "^3.1.4" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-flag": { - "version": "3.0.0", - "license": "MIT", + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, "engines": { - "node": ">=4" + "node": ">= 0.4" } }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", + "node_modules/html-element-map": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.3.1.tgz", + "integrity": "sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg==", "dev": true, - "license": "BSD-3-Clause", + "peer": true, "dependencies": { - "react-is": "^16.7.0" + "array.prototype.filter": "^1.0.0", + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hoist-non-react-statics/node_modules/react-is": { - "version": "16.13.1", + "node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", "dev": true, - "license": "MIT" + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "peer": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" + } }, "node_modules/http2-client": { "version": "1.3.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz", + "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==", + "dev": true }, "node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -1580,13 +1816,57 @@ }, "node_modules/inherits": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, - "license": "ISC" + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/is-binary-path": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -1594,26 +1874,87 @@ "node": ">=8" } }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -1621,132 +1962,230 @@ "node": ">=0.10.0" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } }, - "node_modules/javascript-natural-sort": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", - "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==" - }, - "node_modules/jest-worker": { - "version": "27.5.1", + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, - "license": "MIT", - "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "has-flag": "^4.0.0" + "call-bind": "^1.0.7" }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/js-levenshtein": { - "version": "1.1.6", + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, - "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/js-tokens": { - "version": "4.0.0", - "license": "MIT" + "node_modules/is-subset": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", + "integrity": "sha512-6Ybun0IkarhmEqxXCNw/C0bna6Zb/TkfUX9UbwJtK6ObwAVCxmAP308WWTHviM/zAqXk05cdhYsUsZeGQh99iw==", + "dev": true, + "peer": true }, - "node_modules/jsesc": { - "version": "2.5.2", - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" }, "engines": { - "node": ">=4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, - "license": "MIT", - "peer": true + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/json-pointer": { - "version": "0.6.2", + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, - "license": "MIT", "dependencies": { - "foreach": "^2.0.4" + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/javascript-natural-sort": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", + "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==" + }, + "node_modules/js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", "dev": true, - "license": "MIT" + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/json5": { - "version": "2.2.3", + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", - "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "bin": { - "json5": "lib/cli.js" + "jsesc": "bin/jsesc" }, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/loader-runner": { - "version": "4.3.0", + "node_modules/json-pointer": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", + "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6.11.5" + "dependencies": { + "foreach": "^2.0.4" } }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "node_modules/lodash": { "version": "4.17.21", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.escape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz", + "integrity": "sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw==", + "dev": true, + "peer": true + }, + "node_modules/lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", + "dev": true, + "peer": true }, "node_modules/lodash.isequal": { "version": "4.5.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "dev": true }, "node_modules/loose-envify": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, - "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -1754,31 +2193,23 @@ "loose-envify": "cli.js" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/lunr": { "version": "2.3.9", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true }, "node_modules/mark.js": { "version": "8.11.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", + "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", + "dev": true }, "node_modules/marked": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, - "license": "MIT", "bin": { "marked": "bin/marked.js" }, @@ -1786,26 +2217,20 @@ "node": ">= 12" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/mime-db": { "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, - "license": "MIT", - "peer": true, "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { "mime-db": "1.52.0" }, @@ -1814,46 +2239,50 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, - "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=10" } }, "node_modules/minimist": { - "version": "1.2.7", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/mobx": { - "version": "6.9.1", + "version": "6.12.4", + "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.12.4.tgz", + "integrity": "sha512-uIymg89x+HmItX1p3MG+d09irn2k63J6biftZ5Ok+UpNojS1I3NJPLfcmJT9ANnUltNlHi+HQqrVyxiAN8ISYg==", "dev": true, - "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/mobx" } }, "node_modules/mobx-react": { - "version": "7.6.0", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-9.1.1.tgz", + "integrity": "sha512-gVV7AdSrAAxqXOJ2bAbGa5TkPqvITSzaPiiEkzpW4rRsMhSec7C2NBCJYILADHKp2tzOAIETGRsIY0UaCV5aEw==", "dev": true, - "license": "MIT", "dependencies": { - "mobx-react-lite": "^3.4.0" + "mobx-react-lite": "^4.0.7" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/mobx" }, "peerDependencies": { - "mobx": "^6.1.0", + "mobx": "^6.9.0", "react": "^16.8.0 || ^17 || ^18" }, "peerDependenciesMeta": { @@ -1866,15 +2295,19 @@ } }, "node_modules/mobx-react-lite": { - "version": "3.4.3", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-4.0.7.tgz", + "integrity": "sha512-RjwdseshK9Mg8On5tyJZHtGD+J78ZnCnRaxeQDSiciKVQDUbfZcXhmld0VMxAwvcTnPEHZySGGewm467Fcpreg==", "dev": true, - "license": "MIT", + "dependencies": { + "use-sync-external-store": "^1.2.0" + }, "funding": { "type": "opencollective", "url": "https://opencollective.com/mobx" }, "peerDependencies": { - "mobx": "^6.1.0", + "mobx": "^6.9.0", "react": "^16.8.0 || ^17 || ^18" }, "peerDependenciesMeta": { @@ -1886,20 +2319,70 @@ } } }, + "node_modules/moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==", + "dev": true, + "peer": true + }, "node_modules/ms": { - "version": "2.1.3", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/nearley": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", + "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", "dev": true, - "license": "MIT" + "peer": true, + "dependencies": { + "commander": "^2.19.0", + "moo": "^0.5.0", + "railroad-diagrams": "^1.0.0", + "randexp": "0.4.6" + }, + "bin": { + "nearley-railroad": "bin/nearley-railroad.js", + "nearley-test": "bin/nearley-test.js", + "nearley-unparse": "bin/nearley-unparse.js", + "nearleyc": "bin/nearleyc.js" + }, + "funding": { + "type": "individual", + "url": "https://nearley.js.org/#give-to-nearley" + } }, "node_modules/neo-async": { "version": "2.6.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true }, "node_modules/node-fetch": { - "version": "2.6.12", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, - "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -1917,8 +2400,9 @@ }, "node_modules/node-fetch-h2": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", + "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", "dev": true, - "license": "MIT", "dependencies": { "http2-client": "^1.2.5" }, @@ -1928,38 +2412,49 @@ }, "node_modules/node-readfiles": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", + "integrity": "sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==", "dev": true, - "license": "MIT", "dependencies": { "es6-promise": "^3.2.1" } }, - "node_modules/node-releases": { - "version": "2.0.13", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "peer": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, "node_modules/oas-kit-common": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", + "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "fast-safe-stringify": "^2.0.7" } }, "node_modules/oas-linter": { "version": "3.2.2", + "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.2.tgz", + "integrity": "sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@exodus/schemasafe": "^1.0.0-rc.2", "should": "^13.2.1", @@ -1971,8 +2466,9 @@ }, "node_modules/oas-resolver": { "version": "2.5.6", + "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.6.tgz", + "integrity": "sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "node-fetch-h2": "^2.3.0", "oas-kit-common": "^1.0.8", @@ -1989,16 +2485,18 @@ }, "node_modules/oas-schema-walker": { "version": "1.1.5", + "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz", + "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==", "dev": true, - "license": "BSD-3-Clause", "funding": { "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, "node_modules/oas-validator": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-5.0.8.tgz", + "integrity": "sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "call-me-maybe": "^1.0.1", "oas-kit-common": "^1.0.8", @@ -2015,57 +2513,182 @@ }, "node_modules/object-assign": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", + "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/openapi-sampler": { - "version": "1.3.1", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.5.1.tgz", + "integrity": "sha512-tIWIrZUKNAsbqf3bd9U1oH6JEXo8LNYuDlXw26By67EygpjT+ArFnsxxyTMjFWRfbqo5ozkvgSQDK69Gd8CddA==", "dev": true, - "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.7", "json-pointer": "0.6.2" } }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dev": true, + "peer": true, + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "dev": true, + "peer": true, + "dependencies": { + "domhandler": "^5.0.2", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, "node_modules/path-browserify": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true }, "node_modules/path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/perfect-scrollbar": { "version": "1.5.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.5.5.tgz", + "integrity": "sha512-dzalfutyP3e/FOpdlhVryN4AJ5XDVauVWxybSkLZmakFE2sS3y3pc4JnSprw8tGmHvkaG5Edr5T7LBTZ+WWU2g==", + "dev": true }, - "node_modules/picocolors": { - "version": "1.0.0", + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true, - "license": "ISC", "peer": true }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + }, "node_modules/picomatch": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -2075,16 +2698,18 @@ }, "node_modules/pluralize": { "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/polished": { - "version": "4.2.2", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/polished/-/polished-4.3.1.tgz", + "integrity": "sha512-OBatVyC/N7SCW/FaDHrSd+vn0o5cS855TOmYi4OkdWUMSJCET/xip//ch8xGUvtr3i44X9LVyWwQlRMTN3pwSA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.17.8" }, @@ -2092,39 +2717,53 @@ "node": ">=10" } }, - "node_modules/portfinder": { - "version": "1.0.32", + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", "dev": true, - "license": "MIT", - "dependencies": { - "async": "^2.6.4", - "debug": "^3.2.7", - "mkdirp": "^0.5.6" - }, "engines": { - "node": ">= 0.12.0" + "node": ">= 0.4" } }, - "node_modules/portfinder/node_modules/mkdirp": { - "version": "0.5.6", + "node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, - "license": "MIT", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { - "minimist": "^1.2.6" + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" }, - "bin": { - "mkdirp": "bin/cmd.js" + "engines": { + "node": "^10 || ^12 || >=14" } }, "node_modules/postcss-value-parser": { "version": "4.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -2137,16 +2776,18 @@ }, "node_modules/prismjs": { "version": "1.29.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", + "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/prop-types": { "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "dev": true, - "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -2155,19 +2796,23 @@ }, "node_modules/prop-types/node_modules/react-is": { "version": "16.13.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true }, "node_modules/punycode": { - "version": "2.1.1", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -2182,64 +2827,110 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] + }, + "node_modules/raf": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", + "dev": true, + "peer": true, + "dependencies": { + "performance-now": "^2.1.0" + } + }, + "node_modules/railroad-diagrams": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", + "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==", + "dev": true, + "peer": true + }, + "node_modules/randexp": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", + "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "dev": true, + "peer": true, + "dependencies": { + "discontinuous-range": "1.0.0", + "ret": "~0.1.10" + }, + "engines": { + "node": ">=0.12" + } }, "node_modules/randombytes": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/react": { - "version": "17.0.2", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dev": true, - "license": "MIT", "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "17.0.2", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dev": true, - "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "17.0.2" + "react": "^18.3.1" } }, "node_modules/react-is": { - "version": "18.2.0", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "node_modules/react-shallow-renderer": { + "version": "16.15.0", + "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz", + "integrity": "sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==", "dev": true, - "license": "MIT", - "peer": true + "dependencies": { + "object-assign": "^4.1.1", + "react-is": "^16.12.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0 || ^18.0.0" + } }, "node_modules/react-tabs": { - "version": "3.2.3", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-6.0.2.tgz", + "integrity": "sha512-aQXTKolnM28k3KguGDBSAbJvcowOQr23A+CUJdzJtOSDOtTwzEaJA+1U4KwhNL9+Obe+jFS7geuvA7ICQPXOnQ==", "dev": true, - "license": "MIT", "dependencies": { - "clsx": "^1.1.0", + "clsx": "^2.0.0", "prop-types": "^15.5.0" }, "peerDependencies": { - "react": "^16.3.0 || ^17.0.0-0" + "react": "^18.0.0" } }, "node_modules/readable-stream": { "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, - "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -2251,8 +2942,9 @@ }, "node_modules/readdirp": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -2261,31 +2953,32 @@ } }, "node_modules/redoc": { - "version": "2.0.0", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.1.5.tgz", + "integrity": "sha512-POSbVg+7WLf+/5/c6GWLxL7+9t2D+1WlZdLN0a6qaCQc+ih3XYzteRBkXEN5kjrYrRNjdspfxTZkDLN5WV3Tzg==", "dev": true, - "license": "MIT", "dependencies": { - "@redocly/openapi-core": "^1.0.0-beta.104", - "classnames": "^2.3.1", + "@cfaester/enzyme-adapter-react-18": "^0.8.0", + "@redocly/openapi-core": "^1.4.0", + "classnames": "^2.3.2", "decko": "^1.2.0", - "dompurify": "^2.2.8", - "eventemitter3": "^4.0.7", + "dompurify": "^3.0.6", + "eventemitter3": "^5.0.1", "json-pointer": "^0.6.2", "lunr": "^2.3.9", "mark.js": "^8.11.1", - "marked": "^4.0.15", - "mobx-react": "^7.2.0", - "openapi-sampler": "^1.3.0", + "marked": "^4.3.0", + "mobx-react": "^9.1.1", + "openapi-sampler": "^1.5.0", "path-browserify": "^1.0.1", "perfect-scrollbar": "^1.5.5", - "polished": "^4.1.3", - "prismjs": "^1.27.0", - "prop-types": "^15.7.2", - "react-tabs": "^3.2.2", + "polished": "^4.2.2", + "prismjs": "^1.29.0", + "prop-types": "^15.8.1", + "react-tabs": "^6.0.2", "slugify": "~1.4.7", "stickyfill": "^1.1.1", - "style-loader": "^3.3.1", - "swagger2openapi": "^7.0.6", + "swagger2openapi": "^7.0.8", "url-template": "^2.0.8" }, "engines": { @@ -2295,42 +2988,105 @@ "peerDependencies": { "core-js": "^3.1.4", "mobx": "^6.0.4", - "react": "^16.8.4 || ^17.0.0", - "react-dom": "^16.8.4 || ^17.0.0", - "styled-components": "^4.1.1 || ^5.1.1" + "react": "^16.8.4 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0", + "styled-components": "^4.1.1 || ^5.1.1 || ^6.0.5" } }, "node_modules/reftools": { "version": "1.1.9", + "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", + "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==", "dev": true, - "license": "BSD-3-Clause", "funding": { "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, "node_modules/regenerator-runtime": { - "version": "0.13.11", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, - "license": "MIT" + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/require-from-string": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/rst-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", + "integrity": "sha512-nDG1rZeP6oFTLN6yNDV/uiAvs1+FS/KlrEwh7+y7dpuApDBy6bI2HTBcc0/V8lv9OTqfyD34eF7au2pm8aBbhA==", + "dev": true, + "peer": true, + "dependencies": { + "lodash.flattendeep": "^4.4.0", + "nearley": "^2.7.10" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { @@ -2339,80 +3095,45 @@ }, { "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/scheduler": { - "version": "0.20.2", - "dev": true, - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/schema-utils": { - "version": "3.3.0", + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" }, "engines": { - "node": ">= 10.13.0" + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/schema-utils/node_modules/ajv": { - "version": "6.12.6", + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/schema-utils/node_modules/ajv-keywords": { - "version": "3.5.2", - "dev": true, - "license": "MIT", - "peer": true, - "peerDependencies": { - "ajv": "^6.9.1" + "loose-envify": "^1.1.0" } }, - "node_modules/schema-utils/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/semver": { - "version": "7.5.4", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -2420,24 +3141,49 @@ "node": ">=10" } }, - "node_modules/serialize-javascript": { - "version": "6.0.1", + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, - "license": "BSD-3-Clause", - "peer": true, "dependencies": { - "randombytes": "^2.1.0" + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/shallowequal": { "version": "1.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "dev": true }, "node_modules/should": { "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", "dev": true, - "license": "MIT", "dependencies": { "should-equal": "^2.0.0", "should-format": "^3.0.3", @@ -2448,16 +3194,18 @@ }, "node_modules/should-equal": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", "dev": true, - "license": "MIT", "dependencies": { "should-type": "^1.4.0" } }, "node_modules/should-format": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==", "dev": true, - "license": "MIT", "dependencies": { "should-type": "^1.3.0", "should-type-adaptors": "^1.0.1" @@ -2465,13 +3213,15 @@ }, "node_modules/should-type": { "version": "1.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==", + "dev": true }, "node_modules/should-type-adaptors": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", "dev": true, - "license": "MIT", "dependencies": { "should-type": "^1.3.0", "should-util": "^1.0.0" @@ -2479,11 +3229,32 @@ }, "node_modules/should-util": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==", + "dev": true + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, - "license": "MIT" + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/simple-websocket": { "version": "9.1.0", + "resolved": "https://registry.npmjs.org/simple-websocket/-/simple-websocket-9.1.0.tgz", + "integrity": "sha512-8MJPnjRN6A8UCp1I+H/dSFyjwJhp6wta4hsVRhjf8w9qBHRzxYt14RaOcjvQnhD1N4yKOddEjflwMnQM4VtXjQ==", "dev": true, "funding": [ { @@ -2499,7 +3270,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "debug": "^4.3.1", "queue-microtask": "^1.2.2", @@ -2508,69 +3278,52 @@ "ws": "^7.4.2" } }, - "node_modules/simple-websocket/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/simple-websocket/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/slugify": { "version": "1.4.7", + "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.4.7.tgz", + "integrity": "sha512-tf+h5W1IrjNm/9rKKj0JU2MDMruiopx0jjVA5zCdBtcGjfp0+c5rHw/zADLC3IeKlGHtVbHtpfzvYA0OYT+HKg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.0.0" } }, "node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "engines": { "node": ">=0.10.0" } }, - "node_modules/source-map-support": { - "version": "0.5.21", + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "engines": { + "node": ">=0.10.0" } }, "node_modules/stickyfill": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stickyfill/-/stickyfill-1.1.1.tgz", + "integrity": "sha512-GCp7vHAfpao+Qh/3Flh9DXEJ/qSi0KJwJw6zYlZOtRYXWUIpMM6mC2rIep/dK8RQqwW0KxGJIllmjPIBOGN8AA==", "dev": true }, "node_modules/string_decoder": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } }, "node_modules/string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -2580,50 +3333,85 @@ "node": ">=8" } }, - "node_modules/strip-ansi": { - "version": "6.0.1", + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, - "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/style-loader": { - "version": "3.3.3", + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, - "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, "engines": { - "node": ">= 12.13.0" + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" }, - "peerDependencies": { - "webpack": "^5.0.0" + "engines": { + "node": ">=8" } }, "node_modules/styled-components": { - "version": "5.3.11", + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.11.tgz", + "integrity": "sha512-Ui0jXPzbp1phYij90h12ksljKGqF8ncGx+pjrNPsSPhbUUjWT2tD1FwGo2LF6USCnbrsIhNngDfodhxbegfEOA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/traverse": "^7.4.5", - "@emotion/is-prop-valid": "^1.1.0", - "@emotion/stylis": "^0.8.4", - "@emotion/unitless": "^0.7.4", - "babel-plugin-styled-components": ">= 1.12.0", - "css-to-react-native": "^3.0.0", - "hoist-non-react-statics": "^3.0.0", - "shallowequal": "^1.1.0", - "supports-color": "^5.5.0" + "@emotion/is-prop-valid": "1.2.2", + "@emotion/unitless": "0.8.1", + "@types/stylis": "4.2.5", + "css-to-react-native": "3.2.0", + "csstype": "3.1.3", + "postcss": "8.4.38", + "shallowequal": "1.1.0", + "stylis": "4.3.2", + "tslib": "2.6.2" }, "engines": { - "node": ">=10" + "node": ">= 16" }, "funding": { "type": "opencollective", @@ -2631,13 +3419,19 @@ }, "peerDependencies": { "react": ">= 16.8.0", - "react-dom": ">= 16.8.0", - "react-is": ">= 16.8.0" + "react-dom": ">= 16.8.0" } }, + "node_modules/stylis": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.2.tgz", + "integrity": "sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==", + "dev": true + }, "node_modules/supports-color": { "version": "5.5.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { "has-flag": "^3.0.0" }, @@ -2647,8 +3441,9 @@ }, "node_modules/swagger2openapi": { "version": "7.0.8", + "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-7.0.8.tgz", + "integrity": "sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "call-me-maybe": "^1.0.1", "node-fetch": "^2.6.1", @@ -2671,100 +3466,116 @@ "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/tapable": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "peer": true, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/terser": { - "version": "5.19.0", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "BSD-2-Clause", - "peer": true, "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" + "is-number": "^7.0.0" }, - "bin": { - "terser": "bin/terser" + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" }, "engines": { - "node": ">=10" + "node": ">= 0.4" } }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.9", + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { - "node": ">= 10.13.0" + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, "engines": { - "node": ">=4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, - "license": "MIT", "dependencies": { - "is-number": "^7.0.0" + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" }, "engines": { - "node": ">=8.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/tr46": { - "version": "0.0.3", - "dev": true, - "license": "MIT" - }, "node_modules/uglify-js": { - "version": "3.17.4", + "version": "3.18.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.18.0.tgz", + "integrity": "sha512-SyVVbcNBCk0dzr9XL/R/ySrmYf0s372K6/hFklzgcp2lBFyXtw4I7BOdDjlLhE1aVqaI/SHWXWmYdlZxuyF38A==", "dev": true, - "license": "BSD-2-Clause", "optional": true, "bin": { "uglifyjs": "bin/uglifyjs" @@ -2773,146 +3584,113 @@ "node": ">=0.8.0" } }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "peer": true, "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/url-template": { "version": "2.0.8", + "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", + "integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==", + "dev": true + }, + "node_modules/use-sync-external-store": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz", + "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==", "dev": true, - "license": "BSD" + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } }, "node_modules/util-deprecate": { "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/watchpack": { - "version": "2.4.0", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "node_modules/webidl-conversions": { "version": "3.0.1", - "dev": true, - "license": "BSD-2-Clause" + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true }, - "node_modules/webpack": { - "version": "5.88.1", + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", - "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, - "node_modules/webpack-sources": { - "version": "3.2.3", + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=10.13.0" + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/whatwg-url": { - "version": "5.0.0", + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, - "license": "MIT", "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/wordwrap": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true }, "node_modules/wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -2927,8 +3705,9 @@ }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2941,8 +3720,9 @@ }, "node_modules/wrap-ansi/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2952,18 +3732,21 @@ }, "node_modules/wrap-ansi/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/ws": { "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.3.0" }, @@ -2982,34 +3765,33 @@ }, "node_modules/y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/yaml": { "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, - "license": "ISC", "engines": { "node": ">= 6" } }, "node_modules/yaml-ast-parser": { "version": "0.0.43", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", + "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==", + "dev": true }, "node_modules/yargs": { "version": "17.0.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.0.1.tgz", + "integrity": "sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==", "dev": true, - "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -3025,8 +3807,9 @@ }, "node_modules/yargs-parser": { "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } diff --git a/services/booking/src/booking-backend/package-lock.json b/services/booking/src/booking-backend/package-lock.json index 6ac671bf..b3151543 100644 --- a/services/booking/src/booking-backend/package-lock.json +++ b/services/booking/src/booking-backend/package-lock.json @@ -20,7 +20,7 @@ "@types/amqplib": "^0.10.1", "@types/express": "^4.17.13", "@types/lodash": "^4.14.198", - "ajv-formats": "^2.1.1", + "ajv-formats": "^3.0.1", "amqplib": "^0.10.2", "dayjs": "^1.11.5", "express": "^4.18.1", @@ -30,8 +30,7 @@ }, "devDependencies": { "@types/mocha": "^10.0.0", - "async-mutex": "^0.4.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "env-cmd": "^10.1.0", "mocha": "^10.0.0", "prettier": "^3.0.3", @@ -58,16324 +57,409 @@ "typescript": "^5.2.2" } }, - "../../../../clients/api/js/node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/code-frame": { - "version": "7.22.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/generator": { - "version": "7.17.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "dev": true, - "license": "MIT", + "../../../../helper/crosslab-typescript-addon": { + "name": "@cross-lab-project/codegen-typescript-addon", + "license": "UNLICENSED", "dependencies": { - "@babel/types": "^7.22.5" + "@apidevtools/swagger-parser": "^10.1.0", + "nunjucks": "^3.2.3" }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" + "devDependencies": { + "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/node": "^20.5.9", + "@types/nunjucks": "^3.2.3", + "@types/seedrandom": "^3.0.5", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "copyfiles": "^2.4.1", + "eslint": "^8.48.0", + "openapi-types": "^12.1.3", + "prettier": "^3.0.3", + "tsc-watch": "^6.0.4", + "typescript": "^5.2.2" }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", + "ajv": "^8.11.0", + "ajv-formats": "^2.1.1" } }, - "../../../../clients/api/js/node_modules/@babel/highlight": { - "version": "7.22.13", - "dev": true, - "license": "MIT", + "../../../../helper/openapi-codegeneration": { + "name": "@cross-lab-project/openapi-codegen", + "license": "UNLICENSED", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "@apidevtools/swagger-parser": "^10.1.0", + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", + "commander": "^11.0.0", + "deterministic-json-schema-faker": "^0.5.0-rcv.46", + "glob": "^10.3.4", + "json-schema-merge-allof": "^0.8.1", + "json-schema-to-typescript": "^13.1.1", + "nunjucks": "^3.2.4", + "quicktype-core": "^23.0.75", + "seedrandom": "^3.0.5", + "tiny-typed-emitter": "^2.1.0", + "yaml": "^2.3.2" }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/parser": { - "version": "7.22.13", - "dev": true, - "license": "MIT", "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/template": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" + "openapi-codegen": "lib/cjs/index.js" }, - "engines": { - "node": ">=6.9.0" + "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/node": "^20.5.9", + "@types/nunjucks": "^3.2.3", + "@types/seedrandom": "^3.0.5", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "eslint": "^8.48.0", + "openapi-types": "^12.1.3", + "prettier": "^3.0.3", + "tsc-watch": "^6.0.4", + "typescript": "^5.2.2" } }, - "../../../../clients/api/js/node_modules/@cross-lab-project/codegen-typescript-addon": { - "resolved": "../../../../helper/crosslab-typescript-addon", - "link": true - }, - "../../../../clients/api/js/node_modules/@cross-lab-project/openapi-codegen": { - "resolved": "../../../../helper/openapi-codegeneration", - "link": true - }, - "../../../../clients/api/js/node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", + "../../../common": { + "name": "@crosslab/service-common", + "license": "UNLICENSED", "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "express": "^4.18.1", + "express-winston": "^4.2.0", + "fetch-retry": "^5.0.6", + "jose": "^4.14.6", + "mysql": "^2.18.1", + "sqlite3": "^5.1.6", + "typeorm": "^0.3.17", + "uuid": "^9.0.0", + "winston": "^3.10.0", + "winston-loki": "^6.0.7" }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "../../../../clients/api/js/node_modules/@eslint-community/regexpp": { - "version": "4.8.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/express": "^4.17.13", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.9", + "@types/uuid": "^9.0.3", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "eslint": "^8.48.0", + "mocha": "^10.2.0", + "prettier": "^3.0.3", + "typescript": "^5.2.2" } }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "dev": true, - "license": "MIT", + "../common": { + "name": "@crosslab/booking-service-common", + "version": "0.0.1", + "license": "Apache-2.0", "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "@trivago/prettier-plugin-sort-imports": "^4.2.0" }, - "funding": { - "url": "https://opencollective.com/eslint" + "devDependencies": { + "@types/node": "^20.5.9", + "prettier": "^3.0.3", + "typescript": "^5.2.2" } }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", + "../device-reservation": { + "name": "@crosslab/service-device-reservation", + "version": "0.1.0", + "license": "Apache-2.0", "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "@crosslab/booking-service-common": "file:../common", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "amqplib": "^0.10.0", + "async-mutex": "^0.5.0", + "dayjs": "^1.11.5", + "mysql2": "^3.6.0", + "typescript": "^5.2.2" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "devDependencies": { + "@types/mocha": "^10.0.0", + "c8": "^10.1.0", + "mocha": "^10.0.0", + "mocha-suppress-logs": "^0.5.1", + "prettier": "^3.0.3" } }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", + "../test_common": { + "name": "@crosslab/booking-service-test-common", + "version": "0.0.1", + "license": "Apache-2.0", "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@eslint/js": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../clients/api/js/node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../../clients/api/js/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../../clients/api/js/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../../clients/api/js/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@types/json-schema": { - "version": "7.0.12", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@types/node": { - "version": "18.17.12", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@types/semver": { - "version": "7.5.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../clients/api/js/node_modules/acorn": { - "version": "8.10.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../clients/api/js/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../clients/api/js/node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../clients/api/js/node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/ansi-sequence-parser": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../clients/api/js/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../../clients/api/js/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../clients/api/js/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../../../clients/api/js/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/cross-fetch": { - "version": "3.1.8", - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "../../../../clients/api/js/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../clients/api/js/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../../clients/api/js/node_modules/eslint": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../../../clients/api/js/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/esquery": { - "version": "1.5.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../clients/api/js/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/fast-glob": { - "version": "3.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../../clients/api/js/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../../clients/api/js/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../../clients/api/js/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../clients/api/js/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/flat-cache": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.7", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../../clients/api/js/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../clients/api/js/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../../clients/api/js/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../../clients/api/js/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../../clients/api/js/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../../clients/api/js/node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../../clients/api/js/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../clients/api/js/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/jsonc-parser": { - "version": "3.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/keyv": { - "version": "4.5.3", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "../../../../clients/api/js/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../clients/api/js/node_modules/lunr": { - "version": "2.3.9", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/marked": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 12" - } - }, - "../../../../clients/api/js/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../../clients/api/js/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../../clients/api/js/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/node-fetch": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../../clients/api/js/node_modules/optionator": { - "version": "0.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../clients/api/js/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../../clients/api/js/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/prettier": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../../clients/api/js/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../clients/api/js/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/require-from-string": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../clients/api/js/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../../clients/api/js/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../clients/api/js/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/shiki": { - "version": "0.14.3", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-sequence-parser": "^1.1.0", - "jsonc-parser": "^3.2.0", - "vscode-oniguruma": "^1.7.0", - "vscode-textmate": "^8.0.0" - } - }, - "../../../../clients/api/js/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../../clients/api/js/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../../clients/api/js/node_modules/tsutils": { - "version": "3.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "../../../../clients/api/js/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/typedoc": { - "version": "0.23.28", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "lunr": "^2.3.9", - "marked": "^4.2.12", - "minimatch": "^7.1.3", - "shiki": "^0.14.1" - }, - "bin": { - "typedoc": "bin/typedoc" - }, - "engines": { - "node": ">= 14.14" - }, - "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x" - } - }, - "../../../../clients/api/js/node_modules/typedoc/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../../clients/api/js/node_modules/typedoc/node_modules/minimatch": { - "version": "7.4.6", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../clients/api/js/node_modules/typescript": { - "version": "4.9.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../../../../clients/api/js/node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../../clients/api/js/node_modules/vscode-oniguruma": { - "version": "1.7.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/vscode-textmate": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "../../../../clients/api/js/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "../../../../clients/api/js/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon": { - "name": "@cross-lab-project/codegen-typescript-addon", - "dev": true, - "license": "UNLICENSED", - "dependencies": { - "@apidevtools/swagger-parser": "^10.1.0", - "nunjucks": "^3.2.3" - }, - "devDependencies": { - "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "copyfiles": "^2.4.1", - "eslint": "^8.48.0", - "openapi-types": "^12.1.3", - "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" - }, - "peerDependencies": { - "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", - "ajv": "^8.11.0", - "ajv-formats": "^2.1.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@ampproject/remapping": { - "version": "2.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.6", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.13.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/openapi-schemas": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/swagger-methods": { - "version": "3.0.2", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/swagger-parser": { - "version": "10.1.0", - "license": "MIT", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "9.0.6", - "@apidevtools/openapi-schemas": "^2.1.0", - "@apidevtools/swagger-methods": "^3.0.2", - "@jsdevtools/ono": "^7.1.3", - "ajv": "^8.6.3", - "ajv-draft-04": "^1.0.0", - "call-me-maybe": "^1.0.1" - }, - "peerDependencies": { - "openapi-types": ">=7" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/code-frame": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/compat-data": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/core": { - "version": "7.17.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/generator": { - "version": "7.17.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-imports/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms": { - "version": "7.20.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.10", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/generator": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/traverse": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-simple-access/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.13", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/generator": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/traverse": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/highlight": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/parser": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@cross-lab-project/openapi-codegen": { - "resolved": "../../../../helper/openapi-codegeneration", - "link": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/core": "7.17.8", - "@babel/generator": "7.17.7", - "@babel/parser": "7.18.9", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/json-schema": { - "version": "7.0.11", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/node": { - "version": "17.0.45", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/nunjucks": { - "version": "3.2.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/seedrandom": { - "version": "3.0.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/semver": { - "version": "7.3.13", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/type-utils": "5.52.0", - "@typescript-eslint/utils": "5.52.0", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/parser": { - "version": "5.51.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/typescript-estree": "5.51.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/scope-manager": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.52.0", - "@typescript-eslint/utils": "5.52.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.52.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/types": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.51.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/typescript-estree": "5.52.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.52.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-core": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-core/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-dom": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-ssr": "3.2.47", - "@vue/reactivity-transform": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-ssr": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@vue/compiler-dom": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/reactivity-transform": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/reactivity-transform/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/shared": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/a-sync-waterfall": { - "version": "1.0.1", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/acorn": { - "version": "8.8.2", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ajv-draft-04": { - "version": "1.0.0", - "license": "MIT", - "peerDependencies": { - "ajv": "^8.5.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "peer": true, - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/argparse": { - "version": "1.0.10", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/asap": { - "version": "2.0.6", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/browserslist": { - "version": "4.21.5", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/call-me-maybe": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/caniuse-lite": { - "version": "1.0.30001452", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ], - "license": "CC-BY-4.0" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/color-convert": { - "name": "process-nextick-args", - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/copyfiles": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "glob": "^7.0.5", - "minimatch": "^3.0.3", - "mkdirp": "^1.0.4", - "noms": "0.0.0", - "through2": "^2.0.1", - "untildify": "^4.0.0", - "yargs": "^16.1.0" - }, - "bin": { - "copyfiles": "copyfiles", - "copyup": "copyfiles" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/core-util-is": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/duplexer": { - "version": "0.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/electron-to-chromium": { - "version": "1.4.295", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint": { - "version": "8.34.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint/eslintrc": "^1.4.1", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-utils": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/optionator": { - "version": "0.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/espree": { - "version": "9.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esprima": { - "version": "4.0.1", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esquery": { - "version": "1.4.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/estree-walker": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/event-stream": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-glob": { - "version": "3.2.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/flat-cache": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/from": { - "version": "0.1.7", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/grapheme-splitter": { - "version": "1.0.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/isarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/js-sdsl": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/js-yaml": { - "version": "3.14.1", - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/map-stream": { - "version": "0.1.0", - "dev": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/mkdirp": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/nanoid": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/node-cleanup": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/node-releases": { - "version": "2.0.10", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms": { - "version": "0.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "~1.0.31" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms/node_modules/isarray": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms/node_modules/readable-stream": { - "version": "1.0.34", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms/node_modules/string_decoder": { - "version": "0.10.31", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/nunjucks": { - "version": "3.2.4", - "license": "BSD-2-Clause", - "dependencies": { - "a-sync-waterfall": "^1.0.0", - "asap": "^2.0.3", - "commander": "^5.1.0" - }, - "bin": { - "nunjucks-precompile": "bin/precompile" - }, - "engines": { - "node": ">= 6.9.0" - }, - "peerDependencies": { - "chokidar": "^3.3.0" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/nunjucks/node_modules/commander": { - "version": "5.1.0", - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/openapi-types": { - "version": "12.1.0", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/pause-stream": { - "version": "0.0.11", - "dev": true, - "license": [ - "MIT", - "Apache2" - ], - "dependencies": { - "through": "~2.3" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/postcss": { - "version": "8.4.21", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/prettier": { - "version": "2.8.4", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/process-nextick-args": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ps-tree": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "event-stream": "=3.3.4" - }, - "bin": { - "ps-tree": "bin/ps-tree.js" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/readable-stream": { - "version": "2.3.7", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/require-from-string": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/semver": { - "version": "6.3.0", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/source-map-js": { - "version": "1.0.2", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/sourcemap-codec": { - "version": "1.4.8", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/split": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "through": "2" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/sprintf-js": { - "version": "1.0.3", - "license": "BSD-3-Clause" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/stream-combiner": { - "version": "0.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/string_decoder": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/string-argv": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.19" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/through": { - "version": "2.3.8", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/through2": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/tsc-watch": { - "version": "5.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "node-cleanup": "^2.1.2", - "ps-tree": "^1.2.0", - "string-argv": "^0.1.1", - "strip-ansi": "^6.0.0" - }, - "bin": { - "tsc-watch": "index.js" - }, - "engines": { - "node": ">=8.17.0" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/tsutils": { - "version": "3.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/typescript": { - "version": "4.9.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/untildify": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/update-browserslist-db": { - "version": "1.0.10", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/util-deprecate": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/word-wrap": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/xtend": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yargs": { - "version": "16.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yargs-parser": { - "version": "20.2.9", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration": { - "name": "@cross-lab-project/openapi-codegen", - "dev": true, - "license": "UNLICENSED", - "dependencies": { - "@apidevtools/swagger-parser": "^10.1.0", - "ajv": "^8.12.0", - "ajv-formats": "^2.1.1", - "commander": "^11.0.0", - "deterministic-json-schema-faker": "^0.5.0-rcv.46", - "glob": "^10.3.4", - "json-schema-merge-allof": "^0.8.1", - "json-schema-to-typescript": "^13.1.1", - "nunjucks": "^3.2.4", - "quicktype-core": "^23.0.75", - "seedrandom": "^3.0.5", - "tiny-typed-emitter": "^2.1.0", - "yaml": "^2.3.2" - }, - "bin": { - "openapi-codegen": "lib/cjs/index.js" - }, - "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", - "openapi-types": "^12.1.3", - "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@ampproject/remapping": { - "version": "2.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.6", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.13.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/openapi-schemas": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/swagger-methods": { - "version": "3.0.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/swagger-parser": { - "version": "10.1.0", - "license": "MIT", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "9.0.6", - "@apidevtools/openapi-schemas": "^2.1.0", - "@apidevtools/swagger-methods": "^3.0.2", - "@jsdevtools/ono": "^7.1.3", - "ajv": "^8.6.3", - "ajv-draft-04": "^1.0.0", - "call-me-maybe": "^1.0.1" - }, - "peerDependencies": { - "openapi-types": ">=7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/code-frame": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/compat-data": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/core": { - "version": "7.17.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/generator": { - "version": "7.17.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/generator/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-imports/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms": { - "version": "7.20.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.10", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/generator": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/traverse": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-simple-access/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.13", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/generator": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/traverse": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/highlight": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/parser": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/template": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/template/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../../helper/openapi-codegeneration/node_modules/@isaacs/cliui": { - "version": "8.0.2", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@mark.probst/unicode-properties": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "brfs": "^1.4.0", - "unicode-trie": "^0.3.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/core": "7.17.8", - "@babel/generator": "7.17.7", - "@babel/parser": "7.18.9", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/glob": { - "version": "8.0.0", - "license": "MIT", - "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/json-schema": { - "version": "7.0.11", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/lodash": { - "version": "4.14.187", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/minimatch": { - "version": "5.1.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/node": { - "version": "17.0.45", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/nunjucks": { - "version": "3.2.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/prettier": { - "version": "2.7.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/seedrandom": { - "version": "3.0.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/semver": { - "version": "7.3.13", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/type-utils": "5.51.0", - "@typescript-eslint/utils": "5.51.0", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/parser": { - "version": "5.51.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/typescript-estree": "5.51.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/scope-manager": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/type-utils": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.51.0", - "@typescript-eslint/utils": "5.51.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/types": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.51.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/typescript-estree": "5.51.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-core": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-dom": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-sfc": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-ssr": "3.2.47", - "@vue/reactivity-transform": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-sfc/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-ssr": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@vue/compiler-dom": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/reactivity-transform": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/reactivity-transform/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/shared": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/openapi-codegeneration/node_modules/a-sync-waterfall": { - "version": "1.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/acorn": { - "version": "7.4.1", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ajv": { - "version": "8.11.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ajv-draft-04": { - "version": "1.0.0", - "license": "MIT", - "peerDependencies": { - "ajv": "^8.5.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/any-promise": { - "version": "1.3.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/argparse": { - "version": "1.0.10", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/asap": { - "version": "2.0.6", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/balanced-match": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/brace-expansion": { - "version": "1.1.11", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/brfs": { - "version": "1.6.1", - "license": "MIT", - "dependencies": { - "quote-stream": "^1.0.1", - "resolve": "^1.1.5", - "static-module": "^2.2.0", - "through2": "^2.0.0" - }, - "bin": { - "brfs": "bin/cmd.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/browser-or-node": { - "version": "1.3.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/browserslist": { - "version": "4.21.5", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/buffer-equal": { - "version": "0.0.1", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/buffer-from": { - "version": "1.1.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/call-me-maybe": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/caniuse-lite": { - "version": "1.0.30001451", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ], - "license": "CC-BY-4.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/cli-color": { - "version": "2.0.3", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.61", - "es6-iterator": "^2.0.3", - "memoizee": "^0.4.15", - "timers-ext": "^0.1.7" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/collection-utils": { - "version": "1.0.1", - "license": "Apache-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/commander": { - "version": "9.4.1", - "license": "MIT", - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/compute-gcd": { - "version": "1.2.1", - "dependencies": { - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/compute-lcm": { - "version": "1.1.2", - "dependencies": { - "compute-gcd": "^1.2.1", - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/concat-map": { - "version": "0.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/concat-stream": { - "version": "1.6.2", - "engines": [ - "node >= 0.8" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/convert-source-map": { - "version": "1.9.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/cross-spawn": { - "version": "7.0.3", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/d": { - "version": "1.0.1", - "license": "ISC", - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/deep-is": { - "version": "0.1.4", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/deterministic-json-schema-faker": { - "version": "0.5.0-rcv.46", - "license": "MIT", - "dependencies": { - "json-schema-ref-parser": "^6.1.0", - "jsonpath-plus": "^5.1.0" - }, - "bin": { - "jsf": "bin/gen.cjs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/deterministic-json-schema-faker/node_modules/json-schema-ref-parser": { - "version": "6.1.0", - "license": "MIT", - "dependencies": { - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.12.1", - "ono": "^4.0.11" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/duplexer": { - "version": "0.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/duplexer2": { - "version": "0.1.4", - "license": "BSD-3-Clause", - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eastasianwidth": { - "version": "0.2.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/electron-to-chromium": { - "version": "1.4.295", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/emoji-regex": { - "version": "9.2.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/encoding": { - "version": "0.1.13", - "license": "MIT", - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/es5-ext": { - "version": "0.10.62", - "hasInstallScript": true, - "license": "ISC", - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/es6-iterator": { - "version": "2.0.3", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/es6-symbol": { - "version": "3.1.3", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/es6-weak-map": { - "version": "2.0.3", - "license": "ISC", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/escodegen": { - "version": "1.9.1", - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/escodegen/node_modules/esprima": { - "version": "3.1.3", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint": { - "version": "8.34.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint/eslintrc": "^1.4.1", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-utils": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/optionator": { - "version": "0.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/espree": { - "version": "9.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/espree/node_modules/acorn": { - "version": "8.8.2", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esprima": { - "version": "4.0.1", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esquery": { - "version": "1.4.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/estraverse": { - "version": "4.3.0", - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/estree-walker": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/openapi-codegeneration/node_modules/esutils": { - "version": "2.0.3", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/event-emitter": { - "version": "0.3.5", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/event-stream": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ext": { - "version": "1.7.0", - "license": "ISC", - "dependencies": { - "type": "^2.7.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ext/node_modules/type": { - "version": "2.7.2", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/falafel": { - "version": "2.2.5", - "license": "MIT", - "dependencies": { - "acorn": "^7.1.1", - "isarray": "^2.0.1" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/falafel/node_modules/isarray": { - "version": "2.0.5", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-glob": { - "version": "3.2.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-levenshtein": { - "version": "2.0.6", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/flat-cache": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/foreground-child": { - "version": "3.1.1", - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/format-util": { - "version": "1.0.5", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/from": { - "version": "0.1.7", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fs.realpath": { - "version": "1.0.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/get-stdin": { - "version": "8.0.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob": { - "version": "10.3.3", - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob-promise": { - "version": "3.4.0", - "license": "ISC", - "dependencies": { - "@types/glob": "*" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "glob": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob/node_modules/minimatch": { - "version": "9.0.3", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/grapheme-splitter": { - "version": "1.0.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/inflight": { - "version": "1.0.6", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/is-core-module": { - "version": "2.11.0", - "license": "MIT", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-extglob": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-glob": { - "version": "4.0.3", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-promise": { - "version": "2.2.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/is-stream": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-url": { - "version": "1.2.4", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/isarray": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/isexe": { - "version": "2.0.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/isomorphic-fetch": { - "version": "2.2.1", - "license": "MIT", - "dependencies": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/jackspeak": { - "version": "2.2.3", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/js-base64": { - "version": "2.6.4", - "license": "BSD-3-Clause" - }, - "../../../../helper/openapi-codegeneration/node_modules/js-sdsl": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/js-yaml": { - "version": "3.14.1", - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-compare": { - "version": "0.2.2", - "license": "MIT", - "dependencies": { - "lodash": "^4.17.4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-merge-allof": { - "version": "0.8.1", - "license": "MIT", - "dependencies": { - "compute-lcm": "^1.1.2", - "json-schema-compare": "^0.2.2", - "lodash": "^4.17.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript": { - "version": "10.1.5", - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.6", - "@types/lodash": "^4.14.168", - "@types/prettier": "^2.1.5", - "cli-color": "^2.0.0", - "get-stdin": "^8.0.0", - "glob": "^7.1.6", - "glob-promise": "^3.4.0", - "is-glob": "^4.0.1", - "json-schema-ref-parser": "^9.0.6", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.20", - "minimist": "^1.2.5", - "mkdirp": "^1.0.4", - "mz": "^2.7.0", - "prettier": "^2.2.0" - }, - "bin": { - "json2ts": "dist/src/cli.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.9", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", - "js-yaml": "^4.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/argparse": { - "version": "2.0.1", - "license": "Python-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/glob": { - "version": "7.2.3", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/js-yaml": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/json-schema-ref-parser": { - "version": "9.0.9", - "license": "MIT", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "9.0.9" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/json-stringify-safe": { - "version": "5.0.1", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/jsonpath-plus": { - "version": "5.1.0", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/levn": { - "version": "0.3.0", - "license": "MIT", - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/lru-queue": { - "version": "0.1.0", - "license": "MIT", - "dependencies": { - "es5-ext": "~0.10.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/magic-string": { - "version": "0.22.5", - "license": "MIT", - "dependencies": { - "vlq": "^0.2.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/map-stream": { - "version": "0.1.0", - "dev": true - }, - "../../../../helper/openapi-codegeneration/node_modules/memoizee": { - "version": "0.4.15", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.53", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/merge-source-map": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "source-map": "^0.5.6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/merge-source-map/node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/minimatch": { - "version": "3.1.2", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/minimist": { - "version": "1.2.8", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/minipass": { - "version": "7.0.3", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/mkdirp": { - "version": "1.0.4", - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/mz": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/nanoid": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/next-tick": { - "version": "1.1.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/node-cleanup": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/node-fetch": { - "version": "1.7.3", - "license": "MIT", - "dependencies": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/node-releases": { - "version": "2.0.10", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/nunjucks": { - "version": "3.2.3", - "license": "BSD-2-Clause", - "dependencies": { - "a-sync-waterfall": "^1.0.0", - "asap": "^2.0.3", - "commander": "^5.1.0" - }, - "bin": { - "nunjucks-precompile": "bin/precompile" - }, - "engines": { - "node": ">= 6.9.0" - }, - "peerDependencies": { - "chokidar": "^3.3.0" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/nunjucks/node_modules/commander": { - "version": "5.1.0", - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/object-assign": { - "version": "4.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/object-inspect": { - "version": "1.4.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/once": { - "version": "1.4.0", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ono": { - "version": "4.0.11", - "license": "MIT", - "dependencies": { - "format-util": "^1.0.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/openapi-types": { - "version": "12.1.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/optionator": { - "version": "0.8.3", - "license": "MIT", - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/pako": { - "version": "1.0.11", - "license": "(MIT AND Zlib)" - }, - "../../../../helper/openapi-codegeneration/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-is-absolute": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-key": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-parse": { - "version": "1.0.7", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/path-scurry": { - "version": "1.10.1", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.0.1", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/pause-stream": { - "version": "0.0.11", - "dev": true, - "license": [ - "MIT", - "Apache2" - ], - "dependencies": { - "through": "~2.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/pluralize": { - "version": "7.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/postcss": { - "version": "8.4.21", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/prelude-ls": { - "version": "1.1.2", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/prettier": { - "version": "2.8.4", - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/process-nextick-args": { - "version": "1.0.7", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/ps-tree": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "event-stream": "=3.3.4" - }, - "bin": { - "ps-tree": "bin/ps-tree.js" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/quicktype-core": { - "version": "6.1.12", - "license": "Apache-2.0", - "dependencies": { - "@mark.probst/unicode-properties": "~1.1.0", - "browser-or-node": "^1.2.1", - "collection-utils": "^1.0.1", - "is-url": "^1.2.4", - "isomorphic-fetch": "^2.2.1", - "js-base64": "^2.4.3", - "pako": "^1.0.6", - "pluralize": "^7.0.0", - "readable-stream": "2.3.0", - "urijs": "^1.19.1", - "wordwrap": "^1.0.0", - "yaml": "^1.5.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/quote-stream": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "buffer-equal": "0.0.1", - "minimist": "^1.1.3", - "through2": "^2.0.0" - }, - "bin": { - "quote-stream": "bin/cmd.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/readable-stream": { - "version": "2.3.0", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "safe-buffer": "~5.1.0", - "string_decoder": "~1.0.0", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/require-from-string": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/resolve": { - "version": "1.22.1", - "license": "MIT", - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/seedrandom": { - "version": "3.0.5", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/semver": { - "version": "6.3.0", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/shallow-copy": { - "version": "0.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/shebang-command": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/shebang-regex": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/signal-exit": { - "version": "4.1.0", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/source-map": { - "version": "0.6.1", - "devOptional": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/source-map-js": { - "version": "1.0.2", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/sourcemap-codec": { - "version": "1.4.8", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/openapi-codegeneration/node_modules/split": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "through": "2" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/sprintf-js": { - "version": "1.0.3", - "license": "BSD-3-Clause" - }, - "../../../../helper/openapi-codegeneration/node_modules/static-eval": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "escodegen": "^1.11.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/static-eval/node_modules/escodegen": { - "version": "1.14.3", - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module": { - "version": "2.2.5", - "license": "MIT", - "dependencies": { - "concat-stream": "~1.6.0", - "convert-source-map": "^1.5.1", - "duplexer2": "~0.1.4", - "escodegen": "~1.9.0", - "falafel": "^2.1.0", - "has": "^1.0.1", - "magic-string": "^0.22.4", - "merge-source-map": "1.0.4", - "object-inspect": "~1.4.0", - "quote-stream": "~1.0.2", - "readable-stream": "~2.3.3", - "shallow-copy": "~0.0.1", - "static-eval": "^2.0.0", - "through2": "~2.0.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module/node_modules/process-nextick-args": { - "version": "2.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module/node_modules/readable-stream": { - "version": "2.3.7", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/stream-combiner": { - "version": "0.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string_decoder": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-argv": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.19" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width": { - "version": "5.1.2", - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width/node_modules/ansi-regex": { - "version": "6.0.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/thenify": { - "version": "3.3.1", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/thenify-all": { - "version": "1.6.0", - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/through": { - "version": "2.3.8", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/through2": { - "version": "2.0.5", - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/through2/node_modules/process-nextick-args": { - "version": "2.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/through2/node_modules/readable-stream": { - "version": "2.3.7", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/through2/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/timers-ext": { - "version": "0.1.7", - "license": "ISC", - "dependencies": { - "es5-ext": "~0.10.46", - "next-tick": "1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/tiny-inflate": { - "version": "1.0.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/tiny-typed-emitter": { - "version": "2.1.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/tsc-watch": { - "version": "5.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "node-cleanup": "^2.1.2", - "ps-tree": "^1.2.0", - "string-argv": "^0.1.1", - "strip-ansi": "^6.0.0" - }, - "bin": { - "tsc-watch": "index.js" - }, - "engines": { - "node": ">=8.17.0" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../../helper/openapi-codegeneration/node_modules/tsutils": { - "version": "3.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/type": { - "version": "1.2.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/type-check": { - "version": "0.3.2", - "license": "MIT", - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/typedarray": { - "version": "0.0.6", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/typescript": { - "version": "4.9.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/unicode-trie": { - "version": "0.3.1", - "license": "MIT", - "dependencies": { - "pako": "^0.2.5", - "tiny-inflate": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/unicode-trie/node_modules/pako": { - "version": "0.2.9", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/update-browserslist-db": { - "version": "1.0.10", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/urijs": { - "version": "1.19.11", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/util-deprecate": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-array": { - "version": "1.0.6", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-function": { - "version": "1.0.2" - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-integer": { - "version": "1.0.5", - "dependencies": { - "validate.io-number": "^1.0.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-integer-array": { - "version": "1.0.0", - "dependencies": { - "validate.io-array": "^1.0.3", - "validate.io-integer": "^1.0.4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-number": { - "version": "1.0.3" - }, - "../../../../helper/openapi-codegeneration/node_modules/vlq": { - "version": "0.2.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/whatwg-fetch": { - "version": "3.6.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/which": { - "version": "2.0.2", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/word-wrap": { - "version": "1.2.3", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wordwrap": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi": { - "version": "8.1.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.0.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrappy": { - "version": "1.0.2", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/xtend": { - "version": "4.0.2", - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/yaml": { - "version": "1.10.2", - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/tsdoc-theme": { - "name": "@cross-lab-project/tsdoc-theme", - "extraneous": true, - "license": "UNLICENSED", - "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.0.0", - "@typescript-eslint/eslint-plugin": "^5.51.0", - "@typescript-eslint/parser": "^5.51.0", - "eslint": "^8.34.0", - "typedoc": "^0.23.20", - "typescript": "^4.8.4" - }, - "peerDependencies": { - "typedoc": "^0.23.20" - } - }, - "../../../common": { - "name": "@crosslab/service-common", - "license": "UNLICENSED", - "dependencies": { - "express": "^4.18.1", - "express-winston": "^4.2.0", - "fetch-retry": "^5.0.6", - "jose": "^4.14.6", - "mysql": "^2.18.1", - "sqlite3": "^5.1.6", - "typeorm": "^0.3.17", - "uuid": "^9.0.0", - "winston": "^3.10.0", - "winston-loki": "^6.0.7" - }, - "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/express": "^4.17.13", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.9", - "@types/uuid": "^9.0.3", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", - "mocha": "^10.2.0", - "prettier": "^3.0.3", - "typescript": "^5.2.2" - } - }, - "../../../common/node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/@babel/code-frame": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/generator": { - "version": "7.17.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/highlight": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/parser": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../common/node_modules/@babel/runtime": { - "version": "7.22.11", - "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/template": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@colors/colors": { - "version": "1.5.0", - "license": "MIT", - "engines": { - "node": ">=0.1.90" - } - }, - "../../../common/node_modules/@dabh/diagnostics": { - "version": "2.0.3", - "license": "MIT", - "dependencies": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, - "../../../common/node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "../../../common/node_modules/@eslint-community/regexpp": { - "version": "4.8.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "../../../common/node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/@eslint/js": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../common/node_modules/@gar/promisify": { - "version": "1.1.3", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../common/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../common/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.10", - "license": "BSD-3-Clause", - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "../../../common/node_modules/@napi-rs/snappy-linux-x64-gnu": { - "version": "7.1.1", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/@napi-rs/snappy-linux-x64-musl": { - "version": "7.1.1", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/@npmcli/fs": { - "version": "1.1.1", - "license": "ISC", - "optional": true, - "dependencies": { - "@gar/promisify": "^1.0.1", - "semver": "^7.3.5" - } - }, - "../../../common/node_modules/@npmcli/move-file": { - "version": "1.1.2", - "license": "MIT", - "optional": true, - "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/base64": { - "version": "1.1.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "../../../common/node_modules/@protobufjs/float": { - "version": "1.0.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/path": { - "version": "1.1.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/pool": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@sqltools/formatter": { - "version": "1.2.5", - "license": "MIT" - }, - "../../../common/node_modules/@tootallnate/once": { - "version": "1.1.2", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "../../../common/node_modules/@types/body-parser": { - "version": "1.19.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/connect": { - "version": "3.4.35", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/express": { - "version": "4.17.17", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "../../../common/node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "../../../common/node_modules/@types/json-schema": { - "version": "7.0.11", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/mime": { - "version": "1.3.2", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/node": { - "version": "18.16.1", - "license": "MIT" - }, - "../../../common/node_modules/@types/qs": { - "version": "6.9.7", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/range-parser": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/semver": { - "version": "7.3.13", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/send": { - "version": "0.17.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/serve-static": { - "version": "1.15.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mime": "*", - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/triple-beam": { - "version": "1.3.2", - "license": "MIT" - }, - "../../../common/node_modules/@types/uuid": { - "version": "9.0.2", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/type-utils": "5.59.1", - "@typescript-eslint/utils": "5.59.1", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/parser": { - "version": "5.59.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/typescript-estree": "5.59.1", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/scope-manager": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/visitor-keys": "5.59.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../common/node_modules/@typescript-eslint/type-utils": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.59.1", - "@typescript-eslint/utils": "5.59.1", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/types": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../common/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.59.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/visitor-keys": "5.59.1", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/utils": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/typescript-estree": "5.59.1", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../common/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.59.1", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../common/node_modules/abbrev": { - "version": "1.1.1", - "license": "ISC" - }, - "../../../common/node_modules/accepts": { - "version": "1.3.8", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/acorn": { - "version": "8.10.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../common/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../common/node_modules/agent-base": { - "version": "6.0.2", - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "../../../common/node_modules/agentkeepalive": { - "version": "4.3.0", - "license": "MIT", - "optional": true, - "dependencies": { - "debug": "^4.1.0", - "depd": "^2.0.0", - "humanize-ms": "^1.2.1" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "../../../common/node_modules/aggregate-error": { - "version": "3.1.0", - "license": "MIT", - "optional": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../common/node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/any-promise": { - "version": "1.3.0", - "license": "MIT" - }, - "../../../common/node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/app-root-path": { - "version": "3.1.0", - "license": "MIT", - "engines": { - "node": ">= 6.0.0" - } - }, - "../../../common/node_modules/aproba": { - "version": "2.0.0", - "license": "ISC" - }, - "../../../common/node_modules/are-we-there-yet": { - "version": "2.0.0", - "license": "ISC", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../common/node_modules/array-flatten": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../common/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/async": { - "version": "3.2.4", - "license": "MIT" - }, - "../../../common/node_modules/async-exit-hook": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../common/node_modules/balanced-match": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../common/node_modules/base64-js": { - "version": "1.5.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../common/node_modules/bignumber.js": { - "version": "9.0.0", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/binary-extensions": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../../../common/node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/body-parser/node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/brace-expansion": { - "version": "1.1.11", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../common/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/browser-stdout": { - "version": "1.3.1", - "dev": true, - "license": "ISC" - }, - "../../../common/node_modules/btoa": { - "version": "1.2.1", - "license": "(MIT OR Apache-2.0)", - "bin": { - "btoa": "bin/btoa.js" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../../../common/node_modules/buffer": { - "version": "6.0.3", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "../../../common/node_modules/bytes": { - "version": "3.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/cacache": { - "version": "15.3.0", - "license": "ISC", - "optional": true, - "dependencies": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - }, - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../../../common/node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/chownr": { - "version": "2.0.0", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/clean-stack": { - "version": "2.2.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/cli-highlight": { - "version": "2.1.11", - "license": "ISC", - "dependencies": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "bin": { - "highlight": "bin/highlight" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../common/node_modules/cli-highlight/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/cliui": { - "version": "7.0.4", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../../../common/node_modules/color": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, - "../../../common/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../../common/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "../../../common/node_modules/color-string": { - "version": "1.9.1", - "license": "MIT", - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "../../../common/node_modules/color-support": { - "version": "1.1.3", - "license": "ISC", - "bin": { - "color-support": "bin.js" - } - }, - "../../../common/node_modules/colorspace": { - "version": "1.1.4", - "license": "MIT", - "dependencies": { - "color": "^3.1.3", - "text-hex": "1.0.x" - } - }, - "../../../common/node_modules/concat-map": { - "version": "0.0.1", - "license": "MIT" - }, - "../../../common/node_modules/console-control-strings": { - "version": "1.1.0", - "license": "ISC" - }, - "../../../common/node_modules/content-disposition": { - "version": "0.5.4", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/content-type": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/cookie-signature": { - "version": "1.0.6", - "license": "MIT" - }, - "../../../common/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../../../common/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/date-fns": { - "version": "2.30.0", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, - "../../../common/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../common/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/delegates": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../common/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10" - } - }, - "../../../common/node_modules/depd": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/destroy": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../../../common/node_modules/detect-libc": { - "version": "2.0.1", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/diff": { - "version": "5.0.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../../../common/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../common/node_modules/dotenv": { - "version": "16.0.3", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/ee-first": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../common/node_modules/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "../../../common/node_modules/enabled": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/encodeurl": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/encoding": { - "version": "0.1.13", - "license": "MIT", - "optional": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "../../../common/node_modules/env-paths": { - "version": "2.2.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/err-code": { - "version": "2.0.3", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/escalade": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/escape-html": { - "version": "1.0.3", - "license": "MIT" - }, - "../../../common/node_modules/escape-string-regexp": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../common/node_modules/eslint": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../../common/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/esquery": { - "version": "1.5.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../common/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/etag": { - "version": "1.8.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/express": { - "version": "4.18.2", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "../../../common/node_modules/express-winston": { - "version": "4.2.0", - "license": "MIT", - "dependencies": { - "chalk": "^2.4.2", - "lodash": "^4.17.21" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "winston": ">=3.x <4" - } - }, - "../../../common/node_modules/express/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/express/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/fast-deep-equal": { - "version": "3.1.3", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/fast-glob": { - "version": "3.2.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../common/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../common/node_modules/fecha": { - "version": "4.2.3", - "license": "MIT" - }, - "../../../common/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../common/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/finalhandler": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/flat": { - "version": "5.0.2", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "../../../common/node_modules/flat-cache": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../common/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../common/node_modules/fn.name": { - "version": "1.1.0", - "license": "MIT" - }, - "../../../common/node_modules/forwarded": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/fresh": { - "version": "0.5.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/fs-minipass": { - "version": "2.1.0", - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/fs.realpath": { - "version": "1.0.0", - "license": "ISC" - }, - "../../../common/node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../common/node_modules/gauge": { - "version": "3.0.2", - "license": "ISC", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../../../common/node_modules/get-caller-file": { - "version": "2.0.5", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../../../common/node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/glob": { - "version": "7.2.0", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../common/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/graceful-fs": { - "version": "4.2.11", - "license": "ISC", - "optional": true - }, - "../../../common/node_modules/grapheme-splitter": { - "version": "1.0.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../../../common/node_modules/has-flag": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/has-symbols": { - "version": "1.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/has-unicode": { - "version": "2.0.1", - "license": "ISC" - }, - "../../../common/node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "../../../common/node_modules/highlight.js": { - "version": "10.7.3", - "license": "BSD-3-Clause", - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/http-cache-semantics": { - "version": "4.1.1", - "license": "BSD-2-Clause", - "optional": true - }, - "../../../common/node_modules/http-errors": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/http-proxy-agent": { - "version": "4.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/https-proxy-agent": { - "version": "5.0.1", - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/humanize-ms": { - "version": "1.2.1", - "license": "MIT", - "optional": true, - "dependencies": { - "ms": "^2.0.0" - } - }, - "../../../common/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "optional": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/ieee754": { - "version": "1.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../common/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/imurmurhash": { - "version": "0.1.4", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../common/node_modules/indent-string": { - "version": "4.0.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/infer-owner": { - "version": "1.0.4", - "license": "ISC", - "optional": true - }, - "../../../common/node_modules/inflight": { - "version": "1.0.6", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../common/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../../../common/node_modules/ip": { - "version": "2.0.0", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/ipaddr.js": { - "version": "1.9.1", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "../../../common/node_modules/is-arrayish": { - "version": "0.3.2", - "license": "MIT" - }, - "../../../common/node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/is-lambda": { - "version": "1.0.1", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../common/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-plain-obj": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT", - "optional": true, - "peer": true - }, - "../../../common/node_modules/is-stream": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/isarray": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../common/node_modules/isexe": { - "version": "2.0.0", - "devOptional": true, - "license": "ISC" - }, - "../../../common/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/jose": { - "version": "4.14.4", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/panva" - } - }, - "../../../common/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../common/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/kuler": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "../../../common/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/logform": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "@colors/colors": "1.5.0", - "@types/triple-beam": "^1.3.2", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "safe-stable-stringify": "^2.3.1", - "triple-beam": "^1.3.0" - } - }, - "../../../common/node_modules/long": { - "version": "5.2.3", - "license": "Apache-2.0" - }, - "../../../common/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/make-dir": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../../../common/node_modules/make-fetch-happen": { - "version": "9.1.0", - "license": "ISC", - "optional": true, - "dependencies": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/media-typer": { - "version": "0.3.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/merge-descriptors": { - "version": "1.0.1", - "license": "MIT" - }, - "../../../common/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/methods": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../common/node_modules/mime": { - "version": "1.6.0", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/mime-db": { - "version": "1.52.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/minimatch": { - "version": "3.1.2", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/minipass": { - "version": "3.3.6", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/minipass-collect": { - "version": "1.0.2", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/minipass-fetch": { - "version": "1.4.1", - "license": "MIT", - "optional": true, - "dependencies": { - "minipass": "^3.1.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "optionalDependencies": { - "encoding": "^0.1.12" - } - }, - "../../../common/node_modules/minipass-flush": { - "version": "1.0.5", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/minipass-pipeline": { - "version": "1.2.4", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/minipass-sized": { - "version": "1.0.3", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/minizlib": { - "version": "2.1.2", - "license": "MIT", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/mkdirp": { - "version": "1.0.4", - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/mocha": { - "version": "10.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "../../../common/node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../common/node_modules/mocha/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/mocha/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "../../../common/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../../../common/node_modules/mysql": { - "version": "2.18.1", - "license": "MIT", - "dependencies": { - "bignumber.js": "9.0.0", - "readable-stream": "2.3.7", - "safe-buffer": "5.1.2", - "sqlstring": "2.3.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/mysql/node_modules/readable-stream": { - "version": "2.3.7", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../common/node_modules/mysql/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../../../common/node_modules/mysql/node_modules/sqlstring": { - "version": "2.3.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/mysql/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../common/node_modules/mysql2": { - "version": "3.3.3", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "denque": "^2.1.0", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^5.2.1", - "lru-cache": "^8.0.0", - "named-placeholders": "^1.1.3", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../../../common/node_modules/mysql2/node_modules/lru-cache": { - "version": "8.0.5", - "license": "ISC", - "optional": true, - "peer": true, - "engines": { - "node": ">=16.14" - } - }, - "../../../common/node_modules/mz": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "../../../common/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../common/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "optional": true, - "peer": true, - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../../../common/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/node-addon-api": { - "version": "4.3.0", - "license": "MIT" - }, - "../../../common/node_modules/node-fetch": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "../../../common/node_modules/node-gyp": { - "version": "8.4.1", - "license": "MIT", - "optional": true, - "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" - }, - "engines": { - "node": ">= 10.12.0" - } - }, - "../../../common/node_modules/node-gyp/node_modules/are-we-there-yet": { - "version": "3.0.1", - "license": "ISC", - "optional": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "../../../common/node_modules/node-gyp/node_modules/gauge": { - "version": "4.0.4", - "license": "ISC", - "optional": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "../../../common/node_modules/node-gyp/node_modules/npmlog": { - "version": "6.0.2", - "license": "ISC", - "optional": true, - "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "../../../common/node_modules/nopt": { - "version": "5.0.0", - "license": "ISC", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/npmlog": { - "version": "5.0.1", - "license": "ISC", - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "../../../common/node_modules/object-assign": { - "version": "4.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/on-finished": { - "version": "2.4.1", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/once": { - "version": "1.4.0", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../common/node_modules/one-time": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "fn.name": "1.x.x" - } - }, - "../../../common/node_modules/optionator": { - "version": "0.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/p-map": { - "version": "4.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/parse5": { - "version": "5.1.1", - "license": "MIT" - }, - "../../../common/node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "parse5": "^6.0.1" - } - }, - "../../../common/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { - "version": "6.0.1", - "license": "MIT" - }, - "../../../common/node_modules/parseurl": { - "version": "1.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/path-is-absolute": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/path-to-regexp": { - "version": "0.1.7", - "license": "MIT" - }, - "../../../common/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../common/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/prettier": { - "version": "2.8.8", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../common/node_modules/process-nextick-args": { - "version": "2.0.1", - "license": "MIT" - }, - "../../../common/node_modules/promise-inflight": { - "version": "1.0.1", - "license": "ISC", - "optional": true - }, - "../../../common/node_modules/promise-retry": { - "version": "2.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/protobufjs": { - "version": "7.2.4", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../common/node_modules/proxy-addr": { - "version": "2.0.7", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../../../common/node_modules/punycode": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/qs": { - "version": "6.11.0", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../common/node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "../../../common/node_modules/range-parser": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/raw-body/node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "../../../common/node_modules/reflect-metadata": { - "version": "0.1.13", - "license": "Apache-2.0" - }, - "../../../common/node_modules/regenerator-runtime": { - "version": "0.14.0", - "license": "MIT" - }, - "../../../common/node_modules/require-directory": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/retry": { - "version": "0.12.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 4" - } - }, - "../../../common/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/rimraf": { - "version": "3.0.2", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../common/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../common/node_modules/safe-stable-stringify": { - "version": "2.4.3", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../../../common/node_modules/semver": { - "version": "7.5.0", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/send": { - "version": "0.18.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/send/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/send/node_modules/ms": { - "version": "2.1.3", - "license": "MIT" - }, - "../../../common/node_modules/seq-queue": { - "version": "0.0.5", - "optional": true, - "peer": true - }, - "../../../common/node_modules/serialize-javascript": { - "version": "6.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "../../../common/node_modules/serve-static": { - "version": "1.15.0", - "license": "MIT", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/set-blocking": { - "version": "2.0.0", - "license": "ISC" - }, - "../../../common/node_modules/setprototypeof": { - "version": "1.2.0", - "license": "ISC" - }, - "../../../common/node_modules/sha.js": { - "version": "2.4.11", - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "../../../common/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/signal-exit": { - "version": "3.0.7", - "license": "ISC" - }, - "../../../common/node_modules/simple-swizzle": { - "version": "0.2.2", - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "../../../common/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/smart-buffer": { - "version": "4.2.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "../../../common/node_modules/snappy": { - "version": "7.1.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "optionalDependencies": { - "@napi-rs/snappy-android-arm-eabi": "7.1.1", - "@napi-rs/snappy-android-arm64": "7.1.1", - "@napi-rs/snappy-darwin-arm64": "7.1.1", - "@napi-rs/snappy-darwin-x64": "7.1.1", - "@napi-rs/snappy-freebsd-x64": "7.1.1", - "@napi-rs/snappy-linux-arm-gnueabihf": "7.1.1", - "@napi-rs/snappy-linux-arm64-gnu": "7.1.1", - "@napi-rs/snappy-linux-arm64-musl": "7.1.1", - "@napi-rs/snappy-linux-x64-gnu": "7.1.1", - "@napi-rs/snappy-linux-x64-musl": "7.1.1", - "@napi-rs/snappy-win32-arm64-msvc": "7.1.1", - "@napi-rs/snappy-win32-ia32-msvc": "7.1.1", - "@napi-rs/snappy-win32-x64-msvc": "7.1.1" - } - }, - "../../../common/node_modules/socks": { - "version": "2.7.1", - "license": "MIT", - "optional": true, - "dependencies": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" - } - }, - "../../../common/node_modules/socks-proxy-agent": { - "version": "6.2.1", - "license": "MIT", - "optional": true, - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/sqlite3": { - "version": "5.1.6", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.0", - "node-addon-api": "^4.2.0", - "tar": "^6.1.11" - }, - "optionalDependencies": { - "node-gyp": "8.x" - }, - "peerDependencies": { - "node-gyp": "8.x" - }, - "peerDependenciesMeta": { - "node-gyp": { - "optional": true - } - } - }, - "../../../common/node_modules/sqlstring": { - "version": "2.3.3", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/ssri": { - "version": "8.0.1", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.1.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/stack-trace": { - "version": "0.0.10", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/statuses": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/string_decoder": { - "version": "1.3.0", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "../../../common/node_modules/string-width": { - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/supports-color": { - "version": "5.5.0", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/tar": { - "version": "6.1.13", - "license": "ISC", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^4.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/tar/node_modules/minipass": { - "version": "4.2.8", - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/text-hex": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../common/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/thenify": { - "version": "3.3.1", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "../../../common/node_modules/thenify-all": { - "version": "1.6.0", - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "../../../common/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../common/node_modules/toidentifier": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "../../../common/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "../../../common/node_modules/triple-beam": { - "version": "1.3.0", - "license": "MIT" - }, - "../../../common/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../common/node_modules/tsutils": { - "version": "3.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "../../../common/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/type-is": { - "version": "1.6.18", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/typeorm": { - "version": "0.3.17", - "license": "MIT", - "dependencies": { - "@sqltools/formatter": "^1.2.5", - "app-root-path": "^3.1.0", - "buffer": "^6.0.3", - "chalk": "^4.1.2", - "cli-highlight": "^2.1.11", - "date-fns": "^2.29.3", - "debug": "^4.3.4", - "dotenv": "^16.0.3", - "glob": "^8.1.0", - "mkdirp": "^2.1.3", - "reflect-metadata": "^0.1.13", - "sha.js": "^2.4.11", - "tslib": "^2.5.0", - "uuid": "^9.0.0", - "yargs": "^17.6.2" - }, - "bin": { - "typeorm": "cli.js", - "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js", - "typeorm-ts-node-esm": "cli-ts-node-esm.js" - }, - "engines": { - "node": ">= 12.9.0" - }, - "funding": { - "url": "https://opencollective.com/typeorm" - }, - "peerDependencies": { - "@google-cloud/spanner": "^5.18.0", - "@sap/hana-client": "^2.12.25", - "better-sqlite3": "^7.1.2 || ^8.0.0", - "hdb-pool": "^0.1.6", - "ioredis": "^5.0.4", - "mongodb": "^5.2.0", - "mssql": "^9.1.1", - "mysql2": "^2.2.5 || ^3.0.1", - "oracledb": "^5.1.0", - "pg": "^8.5.1", - "pg-native": "^3.0.0", - "pg-query-stream": "^4.0.0", - "redis": "^3.1.1 || ^4.0.0", - "sql.js": "^1.4.0", - "sqlite3": "^5.0.3", - "ts-node": "^10.7.0", - "typeorm-aurora-data-api-driver": "^2.0.0" - }, - "peerDependenciesMeta": { - "@google-cloud/spanner": { - "optional": true - }, - "@sap/hana-client": { - "optional": true - }, - "better-sqlite3": { - "optional": true - }, - "hdb-pool": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "mongodb": { - "optional": true - }, - "mssql": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "oracledb": { - "optional": true - }, - "pg": { - "optional": true - }, - "pg-native": { - "optional": true - }, - "pg-query-stream": { - "optional": true - }, - "redis": { - "optional": true - }, - "sql.js": { - "optional": true - }, - "sqlite3": { - "optional": true - }, - "ts-node": { - "optional": true - }, - "typeorm-aurora-data-api-driver": { - "optional": true - } - } - }, - "../../../common/node_modules/typeorm/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/typeorm/node_modules/brace-expansion": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../common/node_modules/typeorm/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/typeorm/node_modules/cliui": { - "version": "8.0.1", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/typeorm/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/typeorm/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../common/node_modules/typeorm/node_modules/glob": { - "version": "8.1.0", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/typeorm/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/typeorm/node_modules/minimatch": { - "version": "5.1.6", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/typeorm/node_modules/mkdirp": { - "version": "2.1.6", - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/typeorm/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/typeorm/node_modules/tslib": { - "version": "2.5.0", - "license": "0BSD" - }, - "../../../common/node_modules/typeorm/node_modules/yargs": { - "version": "17.7.1", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/typeorm/node_modules/yargs-parser": { - "version": "21.1.1", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/typescript": { - "version": "4.9.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../../../common/node_modules/unique-filename": { - "version": "1.1.1", - "license": "ISC", - "optional": true, - "dependencies": { - "unique-slug": "^2.0.0" - } - }, - "../../../common/node_modules/unique-slug": { - "version": "2.0.2", - "license": "ISC", - "optional": true, - "dependencies": { - "imurmurhash": "^0.1.4" - } - }, - "../../../common/node_modules/unpipe": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/uri-js": { - "version": "4.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../common/node_modules/url-polyfill": { - "version": "1.1.12", - "license": "MIT" - }, - "../../../common/node_modules/util-deprecate": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../common/node_modules/utils-merge": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "../../../common/node_modules/uuid": { - "version": "9.0.0", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../../../common/node_modules/vary": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "../../../common/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "../../../common/node_modules/which": { - "version": "2.0.2", - "devOptional": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/wide-align": { - "version": "1.1.5", - "license": "ISC", - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "../../../common/node_modules/winston": { - "version": "3.10.0", - "license": "MIT", - "dependencies": { - "@colors/colors": "1.5.0", - "@dabh/diagnostics": "^2.0.2", - "async": "^3.2.3", - "is-stream": "^2.0.0", - "logform": "^2.4.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "safe-stable-stringify": "^2.3.1", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.5.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "../../../common/node_modules/winston-loki": { - "version": "6.0.7", - "license": "MIT", - "dependencies": { - "async-exit-hook": "2.0.1", - "btoa": "^1.2.1", - "protobufjs": "^7.2.4", - "url-polyfill": "^1.1.12", - "winston-transport": "^4.3.0" - }, - "optionalDependencies": { - "snappy": "7.1.1" - } - }, - "../../../common/node_modules/winston-transport": { - "version": "4.5.0", - "license": "MIT", - "dependencies": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", - "triple-beam": "^1.3.0" - }, - "engines": { - "node": ">= 6.4.0" - } - }, - "../../../common/node_modules/workerpool": { - "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" - }, - "../../../common/node_modules/wrap-ansi": { - "version": "7.0.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../common/node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../common/node_modules/wrappy": { - "version": "1.0.2", - "license": "ISC" - }, - "../../../common/node_modules/y18n": { - "version": "5.0.8", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, - "../../../common/node_modules/yargs": { - "version": "16.2.0", - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yargs-parser": { - "version": "20.2.4", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yargs-unparser": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../common": { - "name": "@crosslab/booking-service-common", - "version": "0.0.1", - "license": "Apache-2.0", - "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0" - }, - "devDependencies": { - "@types/node": "^20.5.9", - "prettier": "^3.0.3", - "typescript": "^5.2.2" - } - }, - "../common/node_modules/@types/node": { - "version": "20.4.2", - "dev": true, - "license": "MIT" - }, - "../common/node_modules/typescript": { - "version": "5.1.6", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../device-reservation": { - "name": "@crosslab/service-device-reservation", - "version": "0.1.0", - "license": "Apache-2.0", - "dependencies": { - "@crosslab/booking-service-common": "file:../common", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "amqplib": "^0.10.0", - "async-mutex": "^0.4.0", - "dayjs": "^1.11.5", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" - }, - "devDependencies": { - "@types/mocha": "^10.0.0", - "c8": "^9.1.0", - "mocha": "^10.0.0", - "mocha-suppress-logs": "^0.3.1", - "prettier": "^3.0.3" - } - }, - "../device-reservation/node_modules/@acuminous/bitsyntax": { - "version": "0.1.2", - "license": "MIT", - "dependencies": { - "buffer-more-ints": "~1.0.0", - "debug": "^4.3.4", - "safe-buffer": "~5.1.2" - }, - "engines": { - "node": ">=0.8" - } - }, - "../device-reservation/node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true - }, - "../device-reservation/node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../device-reservation/node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" - }, - "../device-reservation/node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "@acuminous/bitsyntax": "^0.1.2", - "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", - "url-parse": "~1.5.10" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../device-reservation/node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../device-reservation/node_modules/async-mutex": { - "version": "0.4.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "../device-reservation/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/binary-extensions": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../device-reservation/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/browser-stdout": { - "version": "1.3.1", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" - }, - "../device-reservation/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../device-reservation/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../device-reservation/node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../device-reservation/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../device-reservation/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../device-reservation/node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" - }, - "../device-reservation/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../device-reservation/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, - "../device-reservation/node_modules/diff": { - "version": "5.0.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../device-reservation/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/flat": { - "version": "5.0.2", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "../device-reservation/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../device-reservation/node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../device-reservation/node_modules/glob": { - "version": "7.2.0", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../device-reservation/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../device-reservation/node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../device-reservation/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../device-reservation/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "../device-reservation/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../device-reservation/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../device-reservation/node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../device-reservation/node_modules/is-plain-obj": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT" - }, - "../device-reservation/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "../device-reservation/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../device-reservation/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/long": { - "version": "4.0.0", - "license": "Apache-2.0" - }, - "../device-reservation/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/minimatch": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/mocha": { - "version": "10.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "../device-reservation/node_modules/mocha-suppress-logs": { - "version": "0.3.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/mysql2": { - "version": "2.3.3", - "license": "MIT", - "dependencies": { - "denque": "^2.0.1", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../device-reservation/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../device-reservation/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../device-reservation/node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../device-reservation/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../device-reservation/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../device-reservation/node_modules/querystringify": { - "version": "2.2.0", - "license": "MIT" - }, - "../device-reservation/node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "../device-reservation/node_modules/readable-stream": { - "version": "1.1.14", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "../device-reservation/node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "../device-reservation/node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/requires-port": { - "version": "1.0.0", - "license": "MIT" - }, - "../device-reservation/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/seq-queue": { - "version": "0.0.5" - }, - "../device-reservation/node_modules/serialize-javascript": { - "version": "6.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "../device-reservation/node_modules/sqlstring": { - "version": "2.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../device-reservation/node_modules/string_decoder": { - "version": "0.10.31", - "license": "MIT" - }, - "../device-reservation/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "../device-reservation/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../device-reservation/node_modules/tslib": { - "version": "2.6.0", - "license": "0BSD" - }, - "../device-reservation/node_modules/typescript": { - "version": "4.9.5", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../device-reservation/node_modules/url-parse": { - "version": "1.5.10", - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "../device-reservation/node_modules/workerpool": { - "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" - }, - "../device-reservation/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../device-reservation/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, - "../device-reservation/node_modules/yargs": { - "version": "16.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-parser": { - "version": "20.2.4", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-unparser": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../test_common": { - "name": "@crosslab/booking-service-test-common", - "version": "0.0.1", - "license": "Apache-2.0", - "dependencies": { - "@crosslab/booking-service-common": "file:../common", - "@crosslab/service-device-reservation": "file:../device-reservation", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "@types/express": "^4.17.13", - "amqplib": "^0.10.3", - "dayjs": "^1.11.5", - "express": "^4.18.1", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" - }, - "devDependencies": { - "node-mocks-http": "^1.14.1", - "prettier": "^3.0.3" - } - }, - "../test_common/node_modules/@acuminous/bitsyntax": { - "version": "0.1.2", - "license": "MIT", - "dependencies": { - "buffer-more-ints": "~1.0.0", - "debug": "^4.3.4", - "safe-buffer": "~5.1.2" - }, - "engines": { - "node": ">=0.8" - } - }, - "../test_common/node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true - }, - "../test_common/node_modules/@crosslab/service-device-reservation": { - "resolved": "../device-reservation", - "link": true - }, - "../test_common/node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/body-parser": { - "version": "1.19.2", - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/connect": { - "version": "3.4.35", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/express": { - "version": "4.17.17", - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "../test_common/node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "../test_common/node_modules/@types/http-errors": { - "version": "2.0.1", - "license": "MIT" - }, - "../test_common/node_modules/@types/mime": { - "version": "1.3.2", - "license": "MIT" - }, - "../test_common/node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" - }, - "../test_common/node_modules/@types/qs": { - "version": "6.9.7", - "license": "MIT" - }, - "../test_common/node_modules/@types/range-parser": { - "version": "1.2.4", - "license": "MIT" - }, - "../test_common/node_modules/@types/send": { - "version": "0.17.1", - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/serve-static": { - "version": "1.15.2", - "license": "MIT", - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, - "../test_common/node_modules/accepts": { - "version": "1.3.8", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "@acuminous/bitsyntax": "^0.1.2", - "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", - "url-parse": "~1.5.10" - }, - "engines": { - "node": ">=10" - } - }, - "../test_common/node_modules/array-flatten": { - "version": "1.1.1", - "license": "MIT" - }, - "../test_common/node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../test_common/node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" - }, - "../test_common/node_modules/bytes": { - "version": "3.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/content-disposition": { - "version": "0.5.4", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../test_common/node_modules/content-type": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/cookie-signature": { - "version": "1.0.6", - "license": "MIT" - }, - "../test_common/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../test_common/node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" - }, - "../test_common/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../test_common/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, - "../test_common/node_modules/depd": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/destroy": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../test_common/node_modules/ee-first": { - "version": "1.1.1", - "license": "MIT" - }, - "../test_common/node_modules/encodeurl": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/escape-html": { - "version": "1.0.3", - "license": "MIT" - }, - "../test_common/node_modules/etag": { - "version": "1.8.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/express": { - "version": "4.18.2", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "../test_common/node_modules/express/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/express/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/express/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../test_common/node_modules/finalhandler": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/forwarded": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/fresh": { - "version": "0.5.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "../test_common/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../test_common/node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../test_common/node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/has-symbols": { - "version": "1.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/http-errors": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../test_common/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../test_common/node_modules/ipaddr.js": { - "version": "1.9.1", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "../test_common/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT" - }, - "../test_common/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "../test_common/node_modules/long": { - "version": "4.0.0", - "license": "Apache-2.0" - }, - "../test_common/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../test_common/node_modules/media-typer": { - "version": "0.3.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/merge-descriptors": { - "version": "1.0.1", - "license": "MIT" - }, - "../test_common/node_modules/methods": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/mime": { - "version": "1.6.0", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "../test_common/node_modules/mime-db": { - "version": "1.52.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../test_common/node_modules/mysql2": { - "version": "2.3.3", - "license": "MIT", - "dependencies": { - "denque": "^2.0.1", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../test_common/node_modules/mysql2/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../test_common/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../test_common/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../test_common/node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/on-finished": { - "version": "2.4.1", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/parseurl": { - "version": "1.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/path-to-regexp": { - "version": "0.1.7", - "license": "MIT" - }, - "../test_common/node_modules/proxy-addr": { - "version": "2.0.7", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../test_common/node_modules/qs": { - "version": "6.11.0", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/querystringify": { - "version": "2.2.0", - "license": "MIT" - }, - "../test_common/node_modules/range-parser": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/readable-stream": { - "version": "1.1.14", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "../test_common/node_modules/requires-port": { - "version": "1.0.0", - "license": "MIT" - }, - "../test_common/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../test_common/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../test_common/node_modules/send": { - "version": "0.18.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../test_common/node_modules/send/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/send/node_modules/ms": { - "version": "2.1.3", - "license": "MIT" - }, - "../test_common/node_modules/seq-queue": { - "version": "0.0.5" - }, - "../test_common/node_modules/serve-static": { - "version": "1.15.0", - "license": "MIT", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" + "@crosslab/booking-service-common": "file:../common", + "@crosslab/service-device-reservation": "file:../device-reservation", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "@types/express": "^4.17.13", + "amqplib": "^0.10.3", + "dayjs": "^1.11.5", + "express": "^4.18.1", + "mysql2": "^3.6.0", + "typescript": "^5.2.2" }, - "engines": { - "node": ">= 0.8.0" + "devDependencies": { + "node-mocks-http": "^1.14.1", + "prettier": "^3.0.3" } }, - "../test_common/node_modules/setprototypeof": { - "version": "1.2.0", - "license": "ISC" - }, - "../test_common/node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", + "node_modules/@acuminous/bitsyntax": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@acuminous/bitsyntax/-/bitsyntax-0.1.2.tgz", + "integrity": "sha512-29lUK80d1muEQqiUsSo+3A0yP6CdspgC95EnKBMi22Xlwt79i/En4Vr67+cXhU+cZjbti3TgGGC5wy1stIywVQ==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "buffer-more-ints": "~1.0.0", + "debug": "^4.3.4", + "safe-buffer": "~5.1.2" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/sqlstring": { - "version": "2.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/statuses": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/string_decoder": { - "version": "0.10.31", - "license": "MIT" - }, - "../test_common/node_modules/toidentifier": { - "version": "1.0.1", - "license": "MIT", "engines": { - "node": ">=0.6" + "node": ">=0.8" } }, - "../test_common/node_modules/type-is": { - "version": "1.6.18", - "license": "MIT", + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">=6.9.0" } }, - "../test_common/node_modules/typescript": { - "version": "4.9.5", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "node_modules/@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "dependencies": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" }, "engines": { - "node": ">=4.2.0" - } - }, - "../test_common/node_modules/unpipe": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" + "node": ">=6.9.0" } }, - "../test_common/node_modules/url-parse": { - "version": "1.5.10", - "license": "MIT", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "../test_common/node_modules/utils-merge": { - "version": "1.0.1", - "license": "MIT", + "@babel/types": "^7.24.7" + }, "engines": { - "node": ">= 0.4.0" + "node": ">=6.9.0" } }, - "../test_common/node_modules/vary": { - "version": "1.1.2", - "license": "MIT", + "node_modules/@babel/helper-environment-visitor/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, "engines": { - "node": ">= 0.8" + "node": ">=6.9.0" } }, - "../test_common/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, - "node_modules/@acuminous/bitsyntax": { - "version": "0.1.2", - "license": "MIT", + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dependencies": { - "buffer-more-ints": "~1.0.0", - "debug": "^4.3.4", - "safe-buffer": "~5.1.2" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { - "node": ">=0.8" + "node": ">=6.9.0" } }, - "node_modules/@babel/code-frame": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/helper-function-name/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/highlight": "^7.22.5" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dependencies": { + "@babel/types": "^7.24.7" + }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "license": "MIT", + "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "license": "MIT", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "license": "MIT", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.5", - "license": "MIT", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" + "node_modules/@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "bin": { + "parser": "bin/babel-parser.js" }, "engines": { - "node": ">=4" + "node": ">=6.0.0" } }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", + "node_modules/@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { - "node": ">=4" + "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", + "node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "license": "MIT", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, "engines": { - "node": ">=4" + "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "license": "MIT", + "node_modules/@babel/traverse": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dependencies": { - "has-flag": "^3.0.0" + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", + "debug": "^4.1.0", + "globals": "^11.1.0" }, "engines": { - "node": ">=4" + "node": ">=6.9.0" } }, - "node_modules/@babel/parser": { - "version": "7.22.7", - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" }, "engines": { - "node": ">=6.0.0" + "node": ">=6.9.0" } }, - "node_modules/@babel/template": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/traverse/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/types": { - "version": "7.22.5", - "license": "MIT", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -16416,136 +500,215 @@ "resolved": "../device-reservation", "link": true }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, - "license": "MIT", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "license": "MIT", "engines": { - "node": ">=6.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, - "license": "MIT" + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.0.tgz", - "integrity": "sha512-YBepjbt+ZNBVmN3ev1amQH3lWCmHyt5qTbLCp/syXJRu/Kw2koXh44qayB1gMRxcL/gV8egmjN5xWSrYyfUtyw==", + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" + "ansi-regex": "^6.0.1" }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" + "engines": { + "node": ">=12" }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=6.9.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" } }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { - "node": ">=6.9.0" + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "engines": { + "node": ">=6.0.0" } }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, "engines": { - "node": ">=0.10.0" + "node": ">=14" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", + "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", + "dependencies": { + "@babel/generator": "7.17.7", + "@babel/parser": "^7.20.5", + "@babel/traverse": "7.23.2", + "@babel/types": "7.17.0", + "javascript-natural-sort": "0.7.1", + "lodash": "^4.17.21" + }, + "peerDependencies": { + "@vue/compiler-sfc": "3.x", + "prettier": "2.x - 3.x" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } } }, "node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@types/amqplib/-/amqplib-0.10.5.tgz", + "integrity": "sha512-/cSykxROY7BWwDoi4Y4/jLAuZTshZxd8Ey1QYa/VaXriMotBDoou7V/twJiOSHzU6t1Kp1AHAUXGCgqq+6DNeg==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/body-parser": { - "version": "1.19.2", - "license": "MIT", + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", "dependencies": { "@types/connect": "*", "@types/node": "*" } }, "node_modules/@types/connect": { - "version": "3.4.35", - "license": "MIT", + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/express": { - "version": "4.17.17", - "license": "MIT", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -16554,8 +717,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "license": "MIT", + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz", + "integrity": "sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg==", "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -16564,8 +728,9 @@ } }, "node_modules/@types/http-errors": { - "version": "2.0.1", - "license": "MIT" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", @@ -16574,51 +739,62 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.14.198", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.198.tgz", - "integrity": "sha512-trNJ/vtMZYMLhfN45uLq4ShQSw0/S7xCTLLVM+WM1rmFpba/VS42jVUgaO3w/NOLiWR/09lnYk0yMaA/atdIsg==" + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==" }, "node_modules/@types/mime": { - "version": "1.3.2", - "license": "MIT" + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", + "dev": true }, "node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/qs": { - "version": "6.9.7", - "license": "MIT" + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" }, "node_modules/@types/range-parser": { - "version": "1.2.4", - "license": "MIT" + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" }, "node_modules/@types/send": { - "version": "0.17.1", - "license": "MIT", + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", "dependencies": { "@types/mime": "^1", "@types/node": "*" } }, "node_modules/@types/serve-static": { - "version": "1.15.2", - "license": "MIT", + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dependencies": { "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" + "@types/node": "*", + "@types/send": "*" } }, "node_modules/accepts": { "version": "1.3.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -16628,13 +804,14 @@ } }, "node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "uri-js": "^4.4.1" }, "funding": { "type": "github", @@ -16642,8 +819,9 @@ } }, "node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", "dependencies": { "ajv": "^8.0.0" }, @@ -16657,8 +835,9 @@ } }, "node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.10.4.tgz", + "integrity": "sha512-DMZ4eCEjAVdX1II2TfIUpJhfKAuoCeDIo/YyETbfAqehHTXxxs7WOOd+N1Xxr4cKhx12y23zk8/os98FxlZHrw==", "dependencies": { "@acuminous/bitsyntax": "^0.1.2", "buffer-more-ints": "~1.0.0", @@ -16671,38 +850,38 @@ }, "node_modules/ansi-colors": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-regex": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dependencies": { - "color-convert": "^2.0.1" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=4" } }, "node_modules/anymatch": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, - "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -16713,40 +892,40 @@ }, "node_modules/argparse": { "version": "2.0.1", - "dev": true, - "license": "Python-2.0" + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-flatten": { "version": "1.1.1", - "license": "MIT" - }, - "node_modules/async-mutex": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/balanced-match": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/binary-extensions": { - "version": "2.2.0", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -16754,7 +933,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -16765,29 +944,33 @@ }, "node_modules/body-parser/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/braces": { - "version": "3.0.2", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, - "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -16795,24 +978,27 @@ }, "node_modules/browser-stdout": { "version": "1.3.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true }, "node_modules/buffer-more-ints": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-1.0.0.tgz", + "integrity": "sha512-EMetuGFz5SLsT0QTnXzINh4Ksr+oo4i+UGTXEshiGCQWnsgSs7ZhJ8fzlwQ+OzEMs0MpDAMr1hxnblp5a4vcHg==" }, "node_modules/bytes": { "version": "3.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "engines": { "node": ">= 0.8" } }, "node_modules/c8": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", - "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", + "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -16822,7 +1008,7 @@ "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", - "test-exclude": "^6.0.0", + "test-exclude": "^7.0.1", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" @@ -16831,117 +1017,64 @@ "c8": "bin/c8.js" }, "engines": { - "node": ">=14.14.0" - } - }, - "node_modules/c8/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/c8/node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" + "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/c8/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" + "peerDependencies": { + "monocart-coverage-reports": "^2" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "peerDependenciesMeta": { + "monocart-coverage-reports": { + "optional": true + } } }, - "node_modules/c8/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" }, "engines": { - "node": ">=12" - } - }, - "node_modules/c8/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/chalk": { - "version": "4.1.2", + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": { - "has-flag": "^4.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/chokidar": { "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "funding": [ { @@ -16949,7 +1082,6 @@ "url": "https://paulmillr.com/funding/" } ], - "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -16967,47 +1099,45 @@ } }, "node_modules/cliui": { - "version": "7.0.4", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "color-name": "1.1.3" } }, "node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/commander": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/content-disposition": { "version": "0.5.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dependencies": { "safe-buffer": "5.2.1" }, @@ -17017,6 +1147,8 @@ }, "node_modules/content-disposition/node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "funding": [ { "type": "github", @@ -17030,35 +1162,45 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/content-type": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "engines": { "node": ">= 0.6" } }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } }, "node_modules/cookie-signature": { "version": "1.0.6", - "license": "MIT" + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/core-util-is": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -17069,12 +1211,14 @@ } }, "node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" + "version": "1.11.11", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", + "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" }, "node_modules/debug": { - "version": "4.3.4", - "license": "MIT", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { "ms": "2.1.2" }, @@ -17087,23 +1231,54 @@ } } }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/denque": { "version": "2.1.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", "engines": { "node": ">=0.10" } }, "node_modules/depd": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "engines": { "node": ">= 0.8" } }, "node_modules/destroy": { "version": "1.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -17111,32 +1286,43 @@ }, "node_modules/diff": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ee-first": { "version": "1.1.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/emoji-regex": { "version": "8.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/encodeurl": { "version": "1.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "engines": { "node": ">= 0.8" } }, "node_modules/env-cmd": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/env-cmd/-/env-cmd-10.1.0.tgz", + "integrity": "sha512-mMdWTT9XKN7yNth/6N6g2GuKuJTsKMDHlQFUDacb/heQRRWOTIZ42t1rMHnQu4jYxU1ajdTeJM+9eEETlqToMA==", "dev": true, - "license": "MIT", "dependencies": { "commander": "^4.0.0", "cross-spawn": "^7.0.0" @@ -17148,46 +1334,66 @@ "node": ">=8.0.0" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { - "version": "3.1.1", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-html": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.8.0" } }, "node_modules/etag": { "version": "1.8.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "engines": { "node": ">= 0.6" } }, "node_modules/express": { - "version": "4.18.2", - "license": "MIT", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -17220,17 +1426,21 @@ }, "node_modules/express/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/express/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/express/node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "funding": [ { "type": "github", @@ -17244,17 +1454,18 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fill-range": { - "version": "7.0.1", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -17264,7 +1475,8 @@ }, "node_modules/finalhandler": { "version": "1.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -17280,19 +1492,22 @@ }, "node_modules/finalhandler/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -17306,77 +1521,123 @@ }, "node_modules/flat": { "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, - "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } }, + "node_modules/foreground-child": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz", + "integrity": "sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/forwarded": { "version": "0.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "engines": { "node": ">= 0.6" } }, "node_modules/fresh": { "version": "0.5.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "engines": { "node": ">= 0.6" } }, "node_modules/fs.realpath": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, - "license": "ISC" + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, "node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/generate-function": { "version": "2.3.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", "dependencies": { "is-property": "^1.0.2" } }, "node_modules/get-caller-file": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/glob": { - "version": "7.2.0", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -17384,8 +1645,9 @@ }, "node_modules/glob-parent": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -17393,54 +1655,48 @@ "node": ">= 6" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/globals": { "version": "11.12.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "engines": { "node": ">=4" } }, - "node_modules/has": { - "version": "1.0.3", - "license": "MIT", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dependencies": { - "function-bind": "^1.1.1" + "get-intrinsic": "^1.1.3" }, - "engines": { - "node": ">= 0.4.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { - "node": ">=8" + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -17450,7 +1706,8 @@ }, "node_modules/has-symbols": { "version": "1.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "engines": { "node": ">= 0.4" }, @@ -17458,22 +1715,36 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, - "license": "MIT", "bin": { "he": "bin/he" } }, "node_modules/html-escaper": { "version": "2.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, "node_modules/http-errors": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -17487,7 +1758,8 @@ }, "node_modules/iconv-lite": { "version": "0.4.24", - "license": "MIT", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -17497,8 +1769,10 @@ }, "node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -17506,19 +1780,22 @@ }, "node_modules/inherits": { "version": "2.0.4", - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ipaddr.js": { "version": "1.9.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "engines": { "node": ">= 0.10" } }, "node_modules/is-binary-path": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -17528,24 +1805,27 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -17555,28 +1835,32 @@ }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/is-plain-obj": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-property": { "version": "1.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" }, "node_modules/is-unicode-supported": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -17586,17 +1870,20 @@ }, "node_modules/isarray": { "version": "0.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=8" } @@ -17615,52 +1902,20 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-report/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report/node_modules/make-dir": { + "node_modules/istanbul-lib-report/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/istanbul-lib-report/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, "engines": { - "node": ">=10" + "node": ">=8" } }, "node_modules/istanbul-lib-report/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -17681,6 +1936,24 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/javascript-natural-sort": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", @@ -17688,12 +1961,14 @@ }, "node_modules/js-tokens": { "version": "4.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -17703,7 +1978,8 @@ }, "node_modules/jsesc": { "version": "2.5.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "bin": { "jsesc": "bin/jsesc" }, @@ -17713,12 +1989,14 @@ }, "node_modules/json-schema-traverse": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -17731,12 +2009,14 @@ }, "node_modules/lodash": { "version": "4.17.21", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/log-symbols": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -17748,6 +2028,76 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", @@ -17761,27 +2111,46 @@ "node": ">=16.14" } }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/media-typer": { "version": "0.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "engines": { "node": ">= 0.6" } }, "node_modules/merge-descriptors": { "version": "1.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "node_modules/methods": { "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "engines": { "node": ">= 0.6" } }, "node_modules/mime": { "version": "1.6.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "bin": { "mime": "cli.js" }, @@ -17791,14 +2160,16 @@ }, "node_modules/mime-db": { "version": "1.52.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { "mime-db": "1.52.0" }, @@ -17808,8 +2179,9 @@ }, "node_modules/minimatch": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -17817,10 +2189,20 @@ "node": ">=10" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mocha": { - "version": "10.2.0", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", @@ -17829,13 +2211,12 @@ "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.2.0", + "glob": "8.1.0", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", @@ -17849,26 +2230,121 @@ "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/mocha/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/mocha/node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, - "license": "MIT" + "engines": { + "node": ">=10" + } }, "node_modules/ms": { "version": "2.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mysql2": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.6.0.tgz", - "integrity": "sha512-EWUGAhv6SphezurlfI2Fpt0uJEWLmirrtQR7SkbTHFC+4/mJBrPiSzHESHKAWKG7ALVD6xaG/NBjjd1DGJGQQQ==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.1.tgz", + "integrity": "sha512-6zo1T3GILsXMCex3YEu7hCz2OXLUarxFsxvFcUHWMpkPtmZLeTTWgRdc1gWyNJiYt6AxITmIf9bZDRy/jAfWew==", "dependencies": { "denque": "^2.1.0", "generate-function": "^2.3.1", @@ -17885,7 +2361,8 @@ }, "node_modules/mysql2/node_modules/iconv-lite": { "version": "0.6.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -17895,7 +2372,8 @@ }, "node_modules/named-placeholders": { "version": "1.1.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", "dependencies": { "lru-cache": "^7.14.1" }, @@ -17905,47 +2383,41 @@ }, "node_modules/named-placeholders/node_modules/lru-cache": { "version": "7.18.3", - "license": "ISC", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "engines": { "node": ">=12" } }, - "node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/negotiator": { "version": "0.6.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "engines": { "node": ">= 0.6" } }, "node_modules/normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/on-finished": { "version": "2.4.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dependencies": { "ee-first": "1.1.1" }, @@ -17955,16 +2427,18 @@ }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -17977,8 +2451,9 @@ }, "node_modules/p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -17991,43 +2466,70 @@ }, "node_modules/parseurl": { "version": "1.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "engines": { "node": ">= 0.8" } }, "node_modules/path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/path-key": { - "version": "3.1.1", + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "dev": true, - "license": "MIT", "engines": { - "node": ">=8" + "node": "14 || >=16.14" } }, "node_modules/path-to-regexp": { "version": "0.1.7", - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "node_modules/picomatch": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -18036,9 +2538,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -18051,7 +2553,8 @@ }, "node_modules/proxy-addr": { "version": "2.0.7", - "license": "MIT", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -18061,15 +2564,17 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } }, "node_modules/qs": { "version": "6.11.0", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dependencies": { "side-channel": "^1.0.4" }, @@ -18082,26 +2587,30 @@ }, "node_modules/querystringify": { "version": "2.2.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, "node_modules/randombytes": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/range-parser": { "version": "1.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "engines": { "node": ">= 0.6" } }, "node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -18114,7 +2623,8 @@ }, "node_modules/readable-stream": { "version": "1.1.14", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -18124,8 +2634,9 @@ }, "node_modules/readdirp": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -18135,34 +2646,52 @@ }, "node_modules/require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/require-from-string": { "version": "2.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "engines": { "node": ">=0.10.0" } }, "node_modules/requires-port": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "node_modules/safe-buffer": { "version": "5.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safer-buffer": { "version": "2.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } }, "node_modules/send": { "version": "0.18.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -18184,33 +2713,40 @@ }, "node_modules/send/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/send/node_modules/ms": { "version": "2.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/seq-queue": { - "version": "0.0.5" + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" }, "node_modules/serialize-javascript": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } }, "node_modules/serve-static": { "version": "1.15.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -18221,14 +2757,32 @@ "node": ">= 0.8.0" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", - "license": "ISC" + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -18238,19 +2792,25 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -18258,36 +2818,77 @@ }, "node_modules/siginfo": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "license": "ISC" + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } }, "node_modules/sqlstring": { "version": "2.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", "engines": { "node": ">= 0.6" } }, "node_modules/stackback": { "version": "0.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true }, "node_modules/statuses": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "engines": { "node": ">= 0.8" } }, "node_modules/string_decoder": { "version": "0.10.31", - "license": "MIT" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" }, "node_modules/string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -18299,8 +2900,22 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -18310,8 +2925,9 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -18320,63 +2936,80 @@ } }, "node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { - "has-flag": "^4.0.0" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">=4" } }, "node_modules/test-exclude": { - "version": "6.0.0", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, - "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", + "node_modules/test-exclude/node_modules/glob": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, - "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, - "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/to-fast-properties": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "engines": { "node": ">=4" } }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -18386,19 +3019,16 @@ }, "node_modules/toidentifier": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "engines": { "node": ">=0.6" } }, - "node_modules/tslib": { - "version": "2.6.0", - "dev": true, - "license": "0BSD" - }, "node_modules/type-is": { "version": "1.6.18", - "license": "MIT", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -18408,9 +3038,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -18419,23 +3049,31 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/unpipe": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "engines": { "node": ">= 0.8" } }, "node_modules/uri-js": { "version": "4.4.1", - "license": "BSD-2-Clause", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/url-parse": { "version": "1.5.10", - "license": "MIT", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -18443,7 +3081,8 @@ }, "node_modules/utils-merge": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "engines": { "node": ">= 0.4.0" } @@ -18462,23 +3101,19 @@ "node": ">=10.12.0" } }, - "node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, "node_modules/vary": { "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "engines": { "node": ">= 0.8" } }, "node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -18491,8 +3126,9 @@ }, "node_modules/why-is-node-running": { "version": "2.2.2", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", "dev": true, - "license": "MIT", "dependencies": { "siginfo": "^2.0.0", "stackback": "0.0.2" @@ -18506,13 +3142,33 @@ }, "node_modules/workerpool": { "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true }, "node_modules/wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -18525,54 +3181,119 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { - "version": "16.2.0", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "license": "MIT", "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.4", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "license": "ISC", "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-unparser": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "license": "MIT", "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -18583,32 +3304,11 @@ "node": ">=10" } }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, diff --git a/services/booking/src/booking-backend/package.json b/services/booking/src/booking-backend/package.json index 062b0535..3bd039e2 100644 --- a/services/booking/src/booking-backend/package.json +++ b/services/booking/src/booking-backend/package.json @@ -26,7 +26,7 @@ "@types/amqplib": "^0.10.1", "@types/express": "^4.17.13", "@types/lodash": "^4.14.198", - "ajv-formats": "^2.1.1", + "ajv-formats": "^3.0.1", "amqplib": "^0.10.2", "dayjs": "^1.11.5", "express": "^4.18.1", @@ -36,8 +36,7 @@ }, "devDependencies": { "@types/mocha": "^10.0.0", - "async-mutex": "^0.4.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "env-cmd": "^10.1.0", "mocha": "^10.0.0", "prettier": "^3.0.3", diff --git a/services/booking/src/booking-frontend/package-lock.json b/services/booking/src/booking-frontend/package-lock.json index 5650fb05..07876700 100644 --- a/services/booking/src/booking-frontend/package-lock.json +++ b/services/booking/src/booking-frontend/package-lock.json @@ -18,7 +18,7 @@ "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "@types/express": "^4.17.13", - "ajv-formats": "^2.1.1", + "ajv-formats": "^3.0.1", "amqplib": "^0.10.2", "dayjs": "^1.11.7", "express": "^4.18.1", @@ -27,18052 +27,174 @@ }, "devDependencies": { "@types/mocha": "^10.0.6", - "c8": "^9.1.0", + "c8": "^10.1.2", "env-cmd": "^10.1.0", "mocha": "^10.4.0", "prettier": "^3.0.3" } }, - "../../../../clients/api/js": { - "name": "@cross-lab-project/api-client", - "license": "ISC", + "../../../../helper/crosslab-typescript-addon": { + "name": "@cross-lab-project/codegen-typescript-addon", + "license": "UNLICENSED", "dependencies": { - "ajv-formats": "^2.1.1", - "cross-fetch": "^4.0.0" + "@apidevtools/swagger-parser": "^10.1.0", + "nunjucks": "^3.2.3" }, "devDependencies": { - "@cross-lab-project/codegen-typescript-addon": "file:../../../helper/crosslab-typescript-addon", - "@cross-lab-project/openapi-codegen": "file:../../../helper/openapi-codegeneration", + "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/node": "^20.5.9", + "@types/nunjucks": "^3.2.3", + "@types/seedrandom": "^3.0.5", "@typescript-eslint/eslint-plugin": "^6.6.0", "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.34.0", + "copyfiles": "^2.4.1", + "eslint": "^8.48.0", + "openapi-types": "^12.1.3", "prettier": "^3.0.3", - "typedoc": "^0.25.1", + "tsc-watch": "^6.0.4", "typescript": "^5.2.2" - } - }, - "../../../../clients/api/js/node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/code-frame": { - "version": "7.22.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/generator": { - "version": "7.17.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", + "ajv": "^8.11.0", + "ajv-formats": "^2.1.1" } }, - "../../../../clients/api/js/node_modules/@babel/highlight": { - "version": "7.22.13", - "dev": true, - "license": "MIT", + "../../../../helper/openapi-codegeneration": { + "name": "@cross-lab-project/openapi-codegen", + "license": "UNLICENSED", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "@apidevtools/swagger-parser": "^10.1.0", + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", + "commander": "^11.0.0", + "deterministic-json-schema-faker": "^0.5.0-rcv.46", + "glob": "^10.3.4", + "json-schema-merge-allof": "^0.8.1", + "json-schema-to-typescript": "^13.1.1", + "nunjucks": "^3.2.4", + "quicktype-core": "^23.0.75", + "seedrandom": "^3.0.5", + "tiny-typed-emitter": "^2.1.0", + "yaml": "^2.3.2" }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/parser": { - "version": "7.22.13", - "dev": true, - "license": "MIT", "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/template": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../clients/api/js/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" + "openapi-codegen": "lib/cjs/index.js" }, - "engines": { - "node": ">=6.9.0" + "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/node": "^20.5.9", + "@types/nunjucks": "^3.2.3", + "@types/seedrandom": "^3.0.5", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "eslint": "^8.48.0", + "openapi-types": "^12.1.3", + "prettier": "^3.0.3", + "tsc-watch": "^6.0.4", + "typescript": "^5.2.2" } }, - "../../../../clients/api/js/node_modules/@cross-lab-project/codegen-typescript-addon": { - "resolved": "../../../../helper/crosslab-typescript-addon", - "link": true - }, - "../../../../clients/api/js/node_modules/@cross-lab-project/openapi-codegen": { - "resolved": "../../../../helper/openapi-codegeneration", - "link": true - }, - "../../../../clients/api/js/node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", + "../../../common": { + "name": "@crosslab/service-common", + "license": "UNLICENSED", "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "express": "^4.18.1", + "express-winston": "^4.2.0", + "fetch-retry": "^5.0.6", + "jose": "^4.14.6", + "mysql": "^2.18.1", + "sqlite3": "^5.1.6", + "typeorm": "^0.3.17", + "uuid": "^9.0.0", + "winston": "^3.10.0", + "winston-loki": "^6.0.7" }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "../../../../clients/api/js/node_modules/@eslint-community/regexpp": { - "version": "4.8.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/express": "^4.17.13", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.9", + "@types/uuid": "^9.0.3", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "eslint": "^8.48.0", + "mocha": "^10.2.0", + "prettier": "^3.0.3", + "typescript": "^5.2.2" } }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "dev": true, - "license": "MIT", + "../booking-backend": { + "name": "@crosslab/service-booking-backend", + "version": "0.0.1", + "license": "Apache-2.0", "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "@cross-lab-project/api-client": "file:../../../../clients/api/js", + "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", + "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", + "@cross-lab-project/service-common": "file:../../../common", + "@crosslab/booking-service-common": "file:../common", + "@crosslab/booking-service-test-common": "file:../test_common", + "@crosslab/service-device-reservation": "file:../device-reservation", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "@types/express": "^4.17.13", + "@types/lodash": "^4.14.198", + "amqplib": "^0.10.2", + "dayjs": "^1.11.5", + "express": "^4.18.1", + "lodash": "^4.17.21", + "mysql2": "^3.6.0", + "typescript": "^5.2.2" }, - "funding": { - "url": "https://opencollective.com/eslint" + "devDependencies": { + "@types/mocha": "^10.0.0", + "c8": "^10.1.2", + "env-cmd": "^10.1.0", + "mocha": "^10.0.0", + "prettier": "^3.0.3", + "why-is-node-running": "^2.2.2" } }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", + "../common": { + "name": "@crosslab/booking-service-common", + "version": "0.0.1", + "license": "Apache-2.0", "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "@trivago/prettier-plugin-sort-imports": "^4.2.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@eslint/js": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../clients/api/js/node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../../clients/api/js/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../../clients/api/js/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../../clients/api/js/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@types/json-schema": { - "version": "7.0.12", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@types/node": { - "version": "18.17.12", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@types/semver": { - "version": "7.5.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../clients/api/js/node_modules/acorn": { - "version": "8.10.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../clients/api/js/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../clients/api/js/node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../clients/api/js/node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/ansi-sequence-parser": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../clients/api/js/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../../clients/api/js/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../clients/api/js/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../../../clients/api/js/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/cross-fetch": { - "version": "3.1.8", - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "../../../../clients/api/js/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../clients/api/js/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../../clients/api/js/node_modules/eslint": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../../../clients/api/js/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/esquery": { - "version": "1.5.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../clients/api/js/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/fast-glob": { - "version": "3.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../../clients/api/js/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../../clients/api/js/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../../clients/api/js/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../clients/api/js/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/flat-cache": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.7", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../../clients/api/js/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../clients/api/js/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../../clients/api/js/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../../clients/api/js/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../../clients/api/js/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../../clients/api/js/node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../../clients/api/js/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../clients/api/js/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/jsonc-parser": { - "version": "3.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/keyv": { - "version": "4.5.3", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "../../../../clients/api/js/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../clients/api/js/node_modules/lunr": { - "version": "2.3.9", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/marked": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 12" - } - }, - "../../../../clients/api/js/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../../clients/api/js/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../../clients/api/js/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/node-fetch": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../../clients/api/js/node_modules/optionator": { - "version": "0.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../clients/api/js/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../../clients/api/js/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/prettier": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../../clients/api/js/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../clients/api/js/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/require-from-string": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../clients/api/js/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../../clients/api/js/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../clients/api/js/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/shiki": { - "version": "0.14.3", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-sequence-parser": "^1.1.0", - "jsonc-parser": "^3.2.0", - "vscode-oniguruma": "^1.7.0", - "vscode-textmate": "^8.0.0" - } - }, - "../../../../clients/api/js/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../../clients/api/js/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../../clients/api/js/node_modules/tsutils": { - "version": "3.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "../../../../clients/api/js/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/typedoc": { - "version": "0.23.28", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "lunr": "^2.3.9", - "marked": "^4.2.12", - "minimatch": "^7.1.3", - "shiki": "^0.14.1" - }, - "bin": { - "typedoc": "bin/typedoc" - }, - "engines": { - "node": ">= 14.14" - }, - "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x" - } - }, - "../../../../clients/api/js/node_modules/typedoc/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../../clients/api/js/node_modules/typedoc/node_modules/minimatch": { - "version": "7.4.6", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../clients/api/js/node_modules/typescript": { - "version": "4.9.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../../../../clients/api/js/node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../../clients/api/js/node_modules/vscode-oniguruma": { - "version": "1.7.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/vscode-textmate": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "../../../../clients/api/js/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "../../../../clients/api/js/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon": { - "name": "@cross-lab-project/codegen-typescript-addon", - "license": "UNLICENSED", - "dependencies": { - "@apidevtools/swagger-parser": "^10.1.0", - "nunjucks": "^3.2.3" - }, - "devDependencies": { - "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "copyfiles": "^2.4.1", - "eslint": "^8.48.0", - "openapi-types": "^12.1.3", - "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" - }, - "peerDependencies": { - "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", - "ajv": "^8.11.0", - "ajv-formats": "^2.1.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@ampproject/remapping": { - "version": "2.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.6", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.13.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/openapi-schemas": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/swagger-methods": { - "version": "3.0.2", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/swagger-parser": { - "version": "10.1.0", - "license": "MIT", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "9.0.6", - "@apidevtools/openapi-schemas": "^2.1.0", - "@apidevtools/swagger-methods": "^3.0.2", - "@jsdevtools/ono": "^7.1.3", - "ajv": "^8.6.3", - "ajv-draft-04": "^1.0.0", - "call-me-maybe": "^1.0.1" - }, - "peerDependencies": { - "openapi-types": ">=7" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/code-frame": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/compat-data": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/core": { - "version": "7.17.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/generator": { - "version": "7.17.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-imports/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms": { - "version": "7.20.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.10", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/generator": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/traverse": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-module-transforms/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-simple-access/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.13", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/generator": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/traverse": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helpers/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/highlight": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/parser": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@cross-lab-project/openapi-codegen": { - "resolved": "../../../../helper/openapi-codegeneration", - "link": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/core": "7.17.8", - "@babel/generator": "7.17.7", - "@babel/parser": "7.18.9", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/json-schema": { - "version": "7.0.11", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/node": { - "version": "17.0.45", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/nunjucks": { - "version": "3.2.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/seedrandom": { - "version": "3.0.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/semver": { - "version": "7.3.13", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/type-utils": "5.52.0", - "@typescript-eslint/utils": "5.52.0", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/parser": { - "version": "5.51.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/typescript-estree": "5.51.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/scope-manager": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.52.0", - "@typescript-eslint/utils": "5.52.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.52.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/types": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.51.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/typescript-estree": "5.52.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.52.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.52.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.52.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-core": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-core/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-dom": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-ssr": "3.2.47", - "@vue/reactivity-transform": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-ssr": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@vue/compiler-dom": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/reactivity-transform": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/reactivity-transform/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/shared": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/a-sync-waterfall": { - "version": "1.0.1", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/acorn": { - "version": "8.8.2", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ajv-draft-04": { - "version": "1.0.0", - "license": "MIT", - "peerDependencies": { - "ajv": "^8.5.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "peer": true, - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/argparse": { - "version": "1.0.10", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/asap": { - "version": "2.0.6", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/browserslist": { - "version": "4.21.5", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/call-me-maybe": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/caniuse-lite": { - "version": "1.0.30001452", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ], - "license": "CC-BY-4.0" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/color-convert": { - "name": "process-nextick-args", - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/copyfiles": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "glob": "^7.0.5", - "minimatch": "^3.0.3", - "mkdirp": "^1.0.4", - "noms": "0.0.0", - "through2": "^2.0.1", - "untildify": "^4.0.0", - "yargs": "^16.1.0" - }, - "bin": { - "copyfiles": "copyfiles", - "copyup": "copyfiles" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/core-util-is": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/duplexer": { - "version": "0.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/electron-to-chromium": { - "version": "1.4.295", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint": { - "version": "8.34.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint/eslintrc": "^1.4.1", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-utils": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/optionator": { - "version": "0.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/espree": { - "version": "9.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esprima": { - "version": "4.0.1", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esquery": { - "version": "1.4.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/estree-walker": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/event-stream": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-glob": { - "version": "3.2.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/flat-cache": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/from": { - "version": "0.1.7", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/grapheme-splitter": { - "version": "1.0.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/isarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/js-sdsl": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/js-yaml": { - "version": "3.14.1", - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/map-stream": { - "version": "0.1.0", - "dev": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/mkdirp": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/nanoid": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/node-cleanup": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/node-releases": { - "version": "2.0.10", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms": { - "version": "0.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "~1.0.31" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms/node_modules/isarray": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms/node_modules/readable-stream": { - "version": "1.0.34", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms/node_modules/string_decoder": { - "version": "0.10.31", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/nunjucks": { - "version": "3.2.4", - "license": "BSD-2-Clause", - "dependencies": { - "a-sync-waterfall": "^1.0.0", - "asap": "^2.0.3", - "commander": "^5.1.0" - }, - "bin": { - "nunjucks-precompile": "bin/precompile" - }, - "engines": { - "node": ">= 6.9.0" - }, - "peerDependencies": { - "chokidar": "^3.3.0" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/nunjucks/node_modules/commander": { - "version": "5.1.0", - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/openapi-types": { - "version": "12.1.0", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/pause-stream": { - "version": "0.0.11", - "dev": true, - "license": [ - "MIT", - "Apache2" - ], - "dependencies": { - "through": "~2.3" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/postcss": { - "version": "8.4.21", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/prettier": { - "version": "2.8.4", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/process-nextick-args": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ps-tree": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "event-stream": "=3.3.4" - }, - "bin": { - "ps-tree": "bin/ps-tree.js" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/readable-stream": { - "version": "2.3.7", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/require-from-string": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/semver": { - "version": "6.3.0", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/source-map-js": { - "version": "1.0.2", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/sourcemap-codec": { - "version": "1.4.8", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/split": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "through": "2" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/sprintf-js": { - "version": "1.0.3", - "license": "BSD-3-Clause" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/stream-combiner": { - "version": "0.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/string_decoder": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/string-argv": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.19" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/through": { - "version": "2.3.8", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/through2": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/tsc-watch": { - "version": "5.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "node-cleanup": "^2.1.2", - "ps-tree": "^1.2.0", - "string-argv": "^0.1.1", - "strip-ansi": "^6.0.0" - }, - "bin": { - "tsc-watch": "index.js" - }, - "engines": { - "node": ">=8.17.0" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/tsutils": { - "version": "3.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/typescript": { - "version": "4.9.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/untildify": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/update-browserslist-db": { - "version": "1.0.10", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/util-deprecate": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/word-wrap": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/xtend": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yargs": { - "version": "16.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yargs-parser": { - "version": "20.2.9", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration": { - "name": "@cross-lab-project/openapi-codegen", - "license": "UNLICENSED", - "dependencies": { - "@apidevtools/swagger-parser": "^10.1.0", - "ajv": "^8.12.0", - "ajv-formats": "^2.1.1", - "commander": "^11.0.0", - "deterministic-json-schema-faker": "^0.5.0-rcv.46", - "glob": "^10.3.4", - "json-schema-merge-allof": "^0.8.1", - "json-schema-to-typescript": "^13.1.1", - "nunjucks": "^3.2.4", - "quicktype-core": "^23.0.75", - "seedrandom": "^3.0.5", - "tiny-typed-emitter": "^2.1.0", - "yaml": "^2.3.2" - }, - "bin": { - "openapi-codegen": "lib/cjs/index.js" - }, - "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", - "openapi-types": "^12.1.3", - "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@ampproject/remapping": { - "version": "2.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.6", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.13.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/openapi-schemas": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/swagger-methods": { - "version": "3.0.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/swagger-parser": { - "version": "10.1.0", - "license": "MIT", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "9.0.6", - "@apidevtools/openapi-schemas": "^2.1.0", - "@apidevtools/swagger-methods": "^3.0.2", - "@jsdevtools/ono": "^7.1.3", - "ajv": "^8.6.3", - "ajv-draft-04": "^1.0.0", - "call-me-maybe": "^1.0.1" - }, - "peerDependencies": { - "openapi-types": ">=7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/code-frame": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/compat-data": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/core": { - "version": "7.17.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/generator": { - "version": "7.17.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/generator/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-imports/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms": { - "version": "7.20.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.10", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/generator": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/traverse": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-module-transforms/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-simple-access/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.13", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/generator": { - "version": "7.20.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/traverse": { - "version": "7.20.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helpers/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/highlight": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/parser": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/template": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/template/node_modules/@babel/parser": { - "version": "7.20.15", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../../helper/openapi-codegeneration/node_modules/@isaacs/cliui": { - "version": "8.0.2", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@mark.probst/unicode-properties": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "brfs": "^1.4.0", - "unicode-trie": "^0.3.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/core": "7.17.8", - "@babel/generator": "7.17.7", - "@babel/parser": "7.18.9", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/glob": { - "version": "8.0.0", - "license": "MIT", - "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/json-schema": { - "version": "7.0.11", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/lodash": { - "version": "4.14.187", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/minimatch": { - "version": "5.1.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/node": { - "version": "17.0.45", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/nunjucks": { - "version": "3.2.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/prettier": { - "version": "2.7.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/seedrandom": { - "version": "3.0.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/semver": { - "version": "7.3.13", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/type-utils": "5.51.0", - "@typescript-eslint/utils": "5.51.0", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/parser": { - "version": "5.51.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/typescript-estree": "5.51.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/scope-manager": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/type-utils": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.51.0", - "@typescript-eslint/utils": "5.51.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/types": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.51.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/visitor-keys": "5.51.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.51.0", - "@typescript-eslint/types": "5.51.0", - "@typescript-eslint/typescript-estree": "5.51.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.51.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.51.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-core": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-dom": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-sfc": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-ssr": "3.2.47", - "@vue/reactivity-transform": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-sfc/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-ssr": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@vue/compiler-dom": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/reactivity-transform": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/reactivity-transform/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/shared": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/openapi-codegeneration/node_modules/a-sync-waterfall": { - "version": "1.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/acorn": { - "version": "7.4.1", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ajv": { - "version": "8.11.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ajv-draft-04": { - "version": "1.0.0", - "license": "MIT", - "peerDependencies": { - "ajv": "^8.5.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/any-promise": { - "version": "1.3.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/argparse": { - "version": "1.0.10", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/asap": { - "version": "2.0.6", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/balanced-match": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/brace-expansion": { - "version": "1.1.11", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/brfs": { - "version": "1.6.1", - "license": "MIT", - "dependencies": { - "quote-stream": "^1.0.1", - "resolve": "^1.1.5", - "static-module": "^2.2.0", - "through2": "^2.0.0" - }, - "bin": { - "brfs": "bin/cmd.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/browser-or-node": { - "version": "1.3.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/browserslist": { - "version": "4.21.5", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/buffer-equal": { - "version": "0.0.1", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/buffer-from": { - "version": "1.1.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/call-me-maybe": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/caniuse-lite": { - "version": "1.0.30001451", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ], - "license": "CC-BY-4.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/cli-color": { - "version": "2.0.3", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.61", - "es6-iterator": "^2.0.3", - "memoizee": "^0.4.15", - "timers-ext": "^0.1.7" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/collection-utils": { - "version": "1.0.1", - "license": "Apache-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/commander": { - "version": "9.4.1", - "license": "MIT", - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/compute-gcd": { - "version": "1.2.1", - "dependencies": { - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/compute-lcm": { - "version": "1.1.2", - "dependencies": { - "compute-gcd": "^1.2.1", - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/concat-map": { - "version": "0.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/concat-stream": { - "version": "1.6.2", - "engines": [ - "node >= 0.8" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/convert-source-map": { - "version": "1.9.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/cross-spawn": { - "version": "7.0.3", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/d": { - "version": "1.0.1", - "license": "ISC", - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/deep-is": { - "version": "0.1.4", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/deterministic-json-schema-faker": { - "version": "0.5.0-rcv.46", - "license": "MIT", - "dependencies": { - "json-schema-ref-parser": "^6.1.0", - "jsonpath-plus": "^5.1.0" - }, - "bin": { - "jsf": "bin/gen.cjs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/deterministic-json-schema-faker/node_modules/json-schema-ref-parser": { - "version": "6.1.0", - "license": "MIT", - "dependencies": { - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.12.1", - "ono": "^4.0.11" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/duplexer": { - "version": "0.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/duplexer2": { - "version": "0.1.4", - "license": "BSD-3-Clause", - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eastasianwidth": { - "version": "0.2.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/electron-to-chromium": { - "version": "1.4.295", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/emoji-regex": { - "version": "9.2.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/encoding": { - "version": "0.1.13", - "license": "MIT", - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/es5-ext": { - "version": "0.10.62", - "hasInstallScript": true, - "license": "ISC", - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/es6-iterator": { - "version": "2.0.3", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/es6-symbol": { - "version": "3.1.3", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/es6-weak-map": { - "version": "2.0.3", - "license": "ISC", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/escodegen": { - "version": "1.9.1", - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/escodegen/node_modules/esprima": { - "version": "3.1.3", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint": { - "version": "8.34.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint/eslintrc": "^1.4.1", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-utils": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/optionator": { - "version": "0.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/espree": { - "version": "9.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/espree/node_modules/acorn": { - "version": "8.8.2", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esprima": { - "version": "4.0.1", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esquery": { - "version": "1.4.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/estraverse": { - "version": "4.3.0", - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/estree-walker": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/openapi-codegeneration/node_modules/esutils": { - "version": "2.0.3", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/event-emitter": { - "version": "0.3.5", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/event-stream": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ext": { - "version": "1.7.0", - "license": "ISC", - "dependencies": { - "type": "^2.7.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ext/node_modules/type": { - "version": "2.7.2", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/falafel": { - "version": "2.2.5", - "license": "MIT", - "dependencies": { - "acorn": "^7.1.1", - "isarray": "^2.0.1" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/falafel/node_modules/isarray": { - "version": "2.0.5", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-glob": { - "version": "3.2.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-levenshtein": { - "version": "2.0.6", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/flat-cache": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/foreground-child": { - "version": "3.1.1", - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/format-util": { - "version": "1.0.5", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/from": { - "version": "0.1.7", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fs.realpath": { - "version": "1.0.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/get-stdin": { - "version": "8.0.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob": { - "version": "10.3.3", - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob-promise": { - "version": "3.4.0", - "license": "ISC", - "dependencies": { - "@types/glob": "*" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "glob": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob/node_modules/minimatch": { - "version": "9.0.3", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/grapheme-splitter": { - "version": "1.0.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/inflight": { - "version": "1.0.6", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/is-core-module": { - "version": "2.11.0", - "license": "MIT", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-extglob": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-glob": { - "version": "4.0.3", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-promise": { - "version": "2.2.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/is-stream": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-url": { - "version": "1.2.4", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/isarray": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/isexe": { - "version": "2.0.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/isomorphic-fetch": { - "version": "2.2.1", - "license": "MIT", - "dependencies": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/jackspeak": { - "version": "2.2.3", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/js-base64": { - "version": "2.6.4", - "license": "BSD-3-Clause" - }, - "../../../../helper/openapi-codegeneration/node_modules/js-sdsl": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/js-yaml": { - "version": "3.14.1", - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-compare": { - "version": "0.2.2", - "license": "MIT", - "dependencies": { - "lodash": "^4.17.4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-merge-allof": { - "version": "0.8.1", - "license": "MIT", - "dependencies": { - "compute-lcm": "^1.1.2", - "json-schema-compare": "^0.2.2", - "lodash": "^4.17.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript": { - "version": "10.1.5", - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.6", - "@types/lodash": "^4.14.168", - "@types/prettier": "^2.1.5", - "cli-color": "^2.0.0", - "get-stdin": "^8.0.0", - "glob": "^7.1.6", - "glob-promise": "^3.4.0", - "is-glob": "^4.0.1", - "json-schema-ref-parser": "^9.0.6", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.20", - "minimist": "^1.2.5", - "mkdirp": "^1.0.4", - "mz": "^2.7.0", - "prettier": "^2.2.0" - }, - "bin": { - "json2ts": "dist/src/cli.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.9", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", - "js-yaml": "^4.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/argparse": { - "version": "2.0.1", - "license": "Python-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/glob": { - "version": "7.2.3", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/js-yaml": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/json-schema-ref-parser": { - "version": "9.0.9", - "license": "MIT", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "9.0.9" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/json-stringify-safe": { - "version": "5.0.1", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/jsonpath-plus": { - "version": "5.1.0", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/levn": { - "version": "0.3.0", - "license": "MIT", - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/lru-queue": { - "version": "0.1.0", - "license": "MIT", - "dependencies": { - "es5-ext": "~0.10.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/magic-string": { - "version": "0.22.5", - "license": "MIT", - "dependencies": { - "vlq": "^0.2.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/map-stream": { - "version": "0.1.0", - "dev": true - }, - "../../../../helper/openapi-codegeneration/node_modules/memoizee": { - "version": "0.4.15", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.53", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/merge-source-map": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "source-map": "^0.5.6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/merge-source-map/node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/minimatch": { - "version": "3.1.2", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/minimist": { - "version": "1.2.8", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/minipass": { - "version": "7.0.3", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/mkdirp": { - "version": "1.0.4", - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/mz": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/nanoid": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/next-tick": { - "version": "1.1.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/node-cleanup": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/node-fetch": { - "version": "1.7.3", - "license": "MIT", - "dependencies": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/node-releases": { - "version": "2.0.10", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/nunjucks": { - "version": "3.2.3", - "license": "BSD-2-Clause", - "dependencies": { - "a-sync-waterfall": "^1.0.0", - "asap": "^2.0.3", - "commander": "^5.1.0" - }, - "bin": { - "nunjucks-precompile": "bin/precompile" - }, - "engines": { - "node": ">= 6.9.0" - }, - "peerDependencies": { - "chokidar": "^3.3.0" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/nunjucks/node_modules/commander": { - "version": "5.1.0", - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/object-assign": { - "version": "4.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/object-inspect": { - "version": "1.4.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/once": { - "version": "1.4.0", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ono": { - "version": "4.0.11", - "license": "MIT", - "dependencies": { - "format-util": "^1.0.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/openapi-types": { - "version": "12.1.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/optionator": { - "version": "0.8.3", - "license": "MIT", - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/pako": { - "version": "1.0.11", - "license": "(MIT AND Zlib)" - }, - "../../../../helper/openapi-codegeneration/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-is-absolute": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-key": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-parse": { - "version": "1.0.7", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/path-scurry": { - "version": "1.10.1", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.0.1", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/pause-stream": { - "version": "0.0.11", - "dev": true, - "license": [ - "MIT", - "Apache2" - ], - "dependencies": { - "through": "~2.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/pluralize": { - "version": "7.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/postcss": { - "version": "8.4.21", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/prelude-ls": { - "version": "1.1.2", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/prettier": { - "version": "2.8.4", - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/process-nextick-args": { - "version": "1.0.7", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/ps-tree": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "event-stream": "=3.3.4" - }, - "bin": { - "ps-tree": "bin/ps-tree.js" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/quicktype-core": { - "version": "6.1.12", - "license": "Apache-2.0", - "dependencies": { - "@mark.probst/unicode-properties": "~1.1.0", - "browser-or-node": "^1.2.1", - "collection-utils": "^1.0.1", - "is-url": "^1.2.4", - "isomorphic-fetch": "^2.2.1", - "js-base64": "^2.4.3", - "pako": "^1.0.6", - "pluralize": "^7.0.0", - "readable-stream": "2.3.0", - "urijs": "^1.19.1", - "wordwrap": "^1.0.0", - "yaml": "^1.5.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/quote-stream": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "buffer-equal": "0.0.1", - "minimist": "^1.1.3", - "through2": "^2.0.0" - }, - "bin": { - "quote-stream": "bin/cmd.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/readable-stream": { - "version": "2.3.0", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "safe-buffer": "~5.1.0", - "string_decoder": "~1.0.0", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/require-from-string": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/resolve": { - "version": "1.22.1", - "license": "MIT", - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/seedrandom": { - "version": "3.0.5", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/semver": { - "version": "6.3.0", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/shallow-copy": { - "version": "0.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/shebang-command": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/shebang-regex": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/signal-exit": { - "version": "4.1.0", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/source-map": { - "version": "0.6.1", - "devOptional": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/source-map-js": { - "version": "1.0.2", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/sourcemap-codec": { - "version": "1.4.8", - "dev": true, - "license": "MIT", - "peer": true - }, - "../../../../helper/openapi-codegeneration/node_modules/split": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "through": "2" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/sprintf-js": { - "version": "1.0.3", - "license": "BSD-3-Clause" - }, - "../../../../helper/openapi-codegeneration/node_modules/static-eval": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "escodegen": "^1.11.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/static-eval/node_modules/escodegen": { - "version": "1.14.3", - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module": { - "version": "2.2.5", - "license": "MIT", - "dependencies": { - "concat-stream": "~1.6.0", - "convert-source-map": "^1.5.1", - "duplexer2": "~0.1.4", - "escodegen": "~1.9.0", - "falafel": "^2.1.0", - "has": "^1.0.1", - "magic-string": "^0.22.4", - "merge-source-map": "1.0.4", - "object-inspect": "~1.4.0", - "quote-stream": "~1.0.2", - "readable-stream": "~2.3.3", - "shallow-copy": "~0.0.1", - "static-eval": "^2.0.0", - "through2": "~2.0.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module/node_modules/process-nextick-args": { - "version": "2.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module/node_modules/readable-stream": { - "version": "2.3.7", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/static-module/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/stream-combiner": { - "version": "0.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string_decoder": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-argv": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.19" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width": { - "version": "5.1.2", - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width/node_modules/ansi-regex": { - "version": "6.0.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/thenify": { - "version": "3.3.1", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/thenify-all": { - "version": "1.6.0", - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/through": { - "version": "2.3.8", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/through2": { - "version": "2.0.5", - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/through2/node_modules/process-nextick-args": { - "version": "2.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/through2/node_modules/readable-stream": { - "version": "2.3.7", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/through2/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/timers-ext": { - "version": "0.1.7", - "license": "ISC", - "dependencies": { - "es5-ext": "~0.10.46", - "next-tick": "1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/tiny-inflate": { - "version": "1.0.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/tiny-typed-emitter": { - "version": "2.1.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/tsc-watch": { - "version": "5.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "node-cleanup": "^2.1.2", - "ps-tree": "^1.2.0", - "string-argv": "^0.1.1", - "strip-ansi": "^6.0.0" - }, - "bin": { - "tsc-watch": "index.js" - }, - "engines": { - "node": ">=8.17.0" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../../helper/openapi-codegeneration/node_modules/tsutils": { - "version": "3.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/type": { - "version": "1.2.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/type-check": { - "version": "0.3.2", - "license": "MIT", - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/typedarray": { - "version": "0.0.6", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/typescript": { - "version": "4.9.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/unicode-trie": { - "version": "0.3.1", - "license": "MIT", - "dependencies": { - "pako": "^0.2.5", - "tiny-inflate": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/unicode-trie/node_modules/pako": { - "version": "0.2.9", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/update-browserslist-db": { - "version": "1.0.10", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/urijs": { - "version": "1.19.11", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/util-deprecate": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-array": { - "version": "1.0.6", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-function": { - "version": "1.0.2" - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-integer": { - "version": "1.0.5", - "dependencies": { - "validate.io-number": "^1.0.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-integer-array": { - "version": "1.0.0", - "dependencies": { - "validate.io-array": "^1.0.3", - "validate.io-integer": "^1.0.4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-number": { - "version": "1.0.3" - }, - "../../../../helper/openapi-codegeneration/node_modules/vlq": { - "version": "0.2.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/whatwg-fetch": { - "version": "3.6.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/which": { - "version": "2.0.2", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/word-wrap": { - "version": "1.2.3", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wordwrap": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi": { - "version": "8.1.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.0.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrappy": { - "version": "1.0.2", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/xtend": { - "version": "4.0.2", - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/yaml": { - "version": "1.10.2", - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/tsdoc-theme": { - "name": "@cross-lab-project/tsdoc-theme", - "extraneous": true, - "license": "UNLICENSED", - "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.0.0", - "@typescript-eslint/eslint-plugin": "^5.51.0", - "@typescript-eslint/parser": "^5.51.0", - "eslint": "^8.34.0", - "typedoc": "^0.23.20", - "typescript": "^4.8.4" - }, - "peerDependencies": { - "typedoc": "^0.23.20" - } - }, - "../../../common": { - "name": "@crosslab/service-common", - "license": "UNLICENSED", - "dependencies": { - "express": "^4.18.1", - "express-winston": "^4.2.0", - "fetch-retry": "^5.0.6", - "jose": "^4.14.6", - "mysql": "^2.18.1", - "sqlite3": "^5.1.6", - "typeorm": "^0.3.17", - "uuid": "^9.0.0", - "winston": "^3.10.0", - "winston-loki": "^6.0.7" - }, - "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/express": "^4.17.13", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.9", - "@types/uuid": "^9.0.3", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", - "mocha": "^10.2.0", - "prettier": "^3.0.3", - "typescript": "^5.2.2" - } - }, - "../../../common/node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/@babel/code-frame": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/generator": { - "version": "7.17.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/highlight": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/parser": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../common/node_modules/@babel/runtime": { - "version": "7.22.11", - "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/template": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@colors/colors": { - "version": "1.5.0", - "license": "MIT", - "engines": { - "node": ">=0.1.90" - } - }, - "../../../common/node_modules/@dabh/diagnostics": { - "version": "2.0.3", - "license": "MIT", - "dependencies": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, - "../../../common/node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "../../../common/node_modules/@eslint-community/regexpp": { - "version": "4.8.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "../../../common/node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/@eslint/js": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../common/node_modules/@gar/promisify": { - "version": "1.1.3", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../common/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../common/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.10", - "license": "BSD-3-Clause", - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "../../../common/node_modules/@napi-rs/snappy-linux-x64-gnu": { - "version": "7.1.1", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/@napi-rs/snappy-linux-x64-musl": { - "version": "7.1.1", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/@npmcli/fs": { - "version": "1.1.1", - "license": "ISC", - "optional": true, - "dependencies": { - "@gar/promisify": "^1.0.1", - "semver": "^7.3.5" - } - }, - "../../../common/node_modules/@npmcli/move-file": { - "version": "1.1.2", - "license": "MIT", - "optional": true, - "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/base64": { - "version": "1.1.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "../../../common/node_modules/@protobufjs/float": { - "version": "1.0.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/path": { - "version": "1.1.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/pool": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@sqltools/formatter": { - "version": "1.2.5", - "license": "MIT" - }, - "../../../common/node_modules/@tootallnate/once": { - "version": "1.1.2", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "../../../common/node_modules/@types/body-parser": { - "version": "1.19.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/connect": { - "version": "3.4.35", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/express": { - "version": "4.17.17", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "../../../common/node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "../../../common/node_modules/@types/json-schema": { - "version": "7.0.11", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/mime": { - "version": "1.3.2", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/node": { - "version": "18.16.1", - "license": "MIT" - }, - "../../../common/node_modules/@types/qs": { - "version": "6.9.7", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/range-parser": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/semver": { - "version": "7.3.13", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/send": { - "version": "0.17.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/serve-static": { - "version": "1.15.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mime": "*", - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/triple-beam": { - "version": "1.3.2", - "license": "MIT" - }, - "../../../common/node_modules/@types/uuid": { - "version": "9.0.2", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/type-utils": "5.59.1", - "@typescript-eslint/utils": "5.59.1", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/parser": { - "version": "5.59.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/typescript-estree": "5.59.1", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/scope-manager": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/visitor-keys": "5.59.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../common/node_modules/@typescript-eslint/type-utils": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.59.1", - "@typescript-eslint/utils": "5.59.1", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/types": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../common/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.59.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/visitor-keys": "5.59.1", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/utils": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/typescript-estree": "5.59.1", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../common/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.59.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.59.1", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../common/node_modules/abbrev": { - "version": "1.1.1", - "license": "ISC" - }, - "../../../common/node_modules/accepts": { - "version": "1.3.8", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/acorn": { - "version": "8.10.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../common/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../common/node_modules/agent-base": { - "version": "6.0.2", - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "../../../common/node_modules/agentkeepalive": { - "version": "4.3.0", - "license": "MIT", - "optional": true, - "dependencies": { - "debug": "^4.1.0", - "depd": "^2.0.0", - "humanize-ms": "^1.2.1" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "../../../common/node_modules/aggregate-error": { - "version": "3.1.0", - "license": "MIT", - "optional": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../common/node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/any-promise": { - "version": "1.3.0", - "license": "MIT" - }, - "../../../common/node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/app-root-path": { - "version": "3.1.0", - "license": "MIT", - "engines": { - "node": ">= 6.0.0" - } - }, - "../../../common/node_modules/aproba": { - "version": "2.0.0", - "license": "ISC" - }, - "../../../common/node_modules/are-we-there-yet": { - "version": "2.0.0", - "license": "ISC", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../common/node_modules/array-flatten": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../common/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/async": { - "version": "3.2.4", - "license": "MIT" - }, - "../../../common/node_modules/async-exit-hook": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../common/node_modules/balanced-match": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../common/node_modules/base64-js": { - "version": "1.5.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../common/node_modules/bignumber.js": { - "version": "9.0.0", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/binary-extensions": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../../../common/node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/body-parser/node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/brace-expansion": { - "version": "1.1.11", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../common/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/browser-stdout": { - "version": "1.3.1", - "dev": true, - "license": "ISC" - }, - "../../../common/node_modules/btoa": { - "version": "1.2.1", - "license": "(MIT OR Apache-2.0)", - "bin": { - "btoa": "bin/btoa.js" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../../../common/node_modules/buffer": { - "version": "6.0.3", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "../../../common/node_modules/bytes": { - "version": "3.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/cacache": { - "version": "15.3.0", - "license": "ISC", - "optional": true, - "dependencies": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - }, - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../../../common/node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/chownr": { - "version": "2.0.0", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/clean-stack": { - "version": "2.2.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/cli-highlight": { - "version": "2.1.11", - "license": "ISC", - "dependencies": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "bin": { - "highlight": "bin/highlight" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../common/node_modules/cli-highlight/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/cliui": { - "version": "7.0.4", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../../../common/node_modules/color": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, - "../../../common/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../../common/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "../../../common/node_modules/color-string": { - "version": "1.9.1", - "license": "MIT", - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "../../../common/node_modules/color-support": { - "version": "1.1.3", - "license": "ISC", - "bin": { - "color-support": "bin.js" - } - }, - "../../../common/node_modules/colorspace": { - "version": "1.1.4", - "license": "MIT", - "dependencies": { - "color": "^3.1.3", - "text-hex": "1.0.x" - } - }, - "../../../common/node_modules/concat-map": { - "version": "0.0.1", - "license": "MIT" - }, - "../../../common/node_modules/console-control-strings": { - "version": "1.1.0", - "license": "ISC" - }, - "../../../common/node_modules/content-disposition": { - "version": "0.5.4", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/content-type": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/cookie-signature": { - "version": "1.0.6", - "license": "MIT" - }, - "../../../common/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../../../common/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/date-fns": { - "version": "2.30.0", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, - "../../../common/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../common/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/delegates": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../common/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10" - } - }, - "../../../common/node_modules/depd": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/destroy": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../../../common/node_modules/detect-libc": { - "version": "2.0.1", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/diff": { - "version": "5.0.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../../../common/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../common/node_modules/dotenv": { - "version": "16.0.3", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/ee-first": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../common/node_modules/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "../../../common/node_modules/enabled": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/encodeurl": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/encoding": { - "version": "0.1.13", - "license": "MIT", - "optional": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "../../../common/node_modules/env-paths": { - "version": "2.2.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/err-code": { - "version": "2.0.3", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/escalade": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/escape-html": { - "version": "1.0.3", - "license": "MIT" - }, - "../../../common/node_modules/escape-string-regexp": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../common/node_modules/eslint": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../../../common/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/esquery": { - "version": "1.5.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../common/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/etag": { - "version": "1.8.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/express": { - "version": "4.18.2", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "../../../common/node_modules/express-winston": { - "version": "4.2.0", - "license": "MIT", - "dependencies": { - "chalk": "^2.4.2", - "lodash": "^4.17.21" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "winston": ">=3.x <4" - } - }, - "../../../common/node_modules/express/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/express/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/fast-deep-equal": { - "version": "3.1.3", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/fast-glob": { - "version": "3.2.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../common/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../common/node_modules/fecha": { - "version": "4.2.3", - "license": "MIT" - }, - "../../../common/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../common/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/finalhandler": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/flat": { - "version": "5.0.2", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "../../../common/node_modules/flat-cache": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../common/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../common/node_modules/fn.name": { - "version": "1.1.0", - "license": "MIT" - }, - "../../../common/node_modules/forwarded": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/fresh": { - "version": "0.5.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/fs-minipass": { - "version": "2.1.0", - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/fs.realpath": { - "version": "1.0.0", - "license": "ISC" - }, - "../../../common/node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../common/node_modules/gauge": { - "version": "3.0.2", - "license": "ISC", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../../../common/node_modules/get-caller-file": { - "version": "2.0.5", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../../../common/node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/glob": { - "version": "7.2.0", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../common/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/graceful-fs": { - "version": "4.2.11", - "license": "ISC", - "optional": true - }, - "../../../common/node_modules/grapheme-splitter": { - "version": "1.0.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../../../common/node_modules/has-flag": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/has-symbols": { - "version": "1.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/has-unicode": { - "version": "2.0.1", - "license": "ISC" - }, - "../../../common/node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "../../../common/node_modules/highlight.js": { - "version": "10.7.3", - "license": "BSD-3-Clause", - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/http-cache-semantics": { - "version": "4.1.1", - "license": "BSD-2-Clause", - "optional": true - }, - "../../../common/node_modules/http-errors": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/http-proxy-agent": { - "version": "4.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/https-proxy-agent": { - "version": "5.0.1", - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/humanize-ms": { - "version": "1.2.1", - "license": "MIT", - "optional": true, - "dependencies": { - "ms": "^2.0.0" - } - }, - "../../../common/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "optional": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/ieee754": { - "version": "1.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../common/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/imurmurhash": { - "version": "0.1.4", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../common/node_modules/indent-string": { - "version": "4.0.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/infer-owner": { - "version": "1.0.4", - "license": "ISC", - "optional": true - }, - "../../../common/node_modules/inflight": { - "version": "1.0.6", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../common/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../../../common/node_modules/ip": { - "version": "2.0.0", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/ipaddr.js": { - "version": "1.9.1", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "../../../common/node_modules/is-arrayish": { - "version": "0.3.2", - "license": "MIT" - }, - "../../../common/node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/is-lambda": { - "version": "1.0.1", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../common/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-plain-obj": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT", - "optional": true, - "peer": true - }, - "../../../common/node_modules/is-stream": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/isarray": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../common/node_modules/isexe": { - "version": "2.0.0", - "devOptional": true, - "license": "ISC" - }, - "../../../common/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/jose": { - "version": "4.14.4", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/panva" - } - }, - "../../../common/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../common/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/kuler": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "../../../common/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/logform": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "@colors/colors": "1.5.0", - "@types/triple-beam": "^1.3.2", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "safe-stable-stringify": "^2.3.1", - "triple-beam": "^1.3.0" - } - }, - "../../../common/node_modules/long": { - "version": "5.2.3", - "license": "Apache-2.0" - }, - "../../../common/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/make-dir": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../../../common/node_modules/make-fetch-happen": { - "version": "9.1.0", - "license": "ISC", - "optional": true, - "dependencies": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/media-typer": { - "version": "0.3.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/merge-descriptors": { - "version": "1.0.1", - "license": "MIT" - }, - "../../../common/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/methods": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../common/node_modules/mime": { - "version": "1.6.0", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/mime-db": { - "version": "1.52.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/minimatch": { - "version": "3.1.2", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/minipass": { - "version": "3.3.6", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/minipass-collect": { - "version": "1.0.2", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/minipass-fetch": { - "version": "1.4.1", - "license": "MIT", - "optional": true, - "dependencies": { - "minipass": "^3.1.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "optionalDependencies": { - "encoding": "^0.1.12" - } - }, - "../../../common/node_modules/minipass-flush": { - "version": "1.0.5", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/minipass-pipeline": { - "version": "1.2.4", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/minipass-sized": { - "version": "1.0.3", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/minizlib": { - "version": "2.1.2", - "license": "MIT", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/mkdirp": { - "version": "1.0.4", - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/mocha": { - "version": "10.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "../../../common/node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../common/node_modules/mocha/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/mocha/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "../../../common/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../../../common/node_modules/mysql": { - "version": "2.18.1", - "license": "MIT", - "dependencies": { - "bignumber.js": "9.0.0", - "readable-stream": "2.3.7", - "safe-buffer": "5.1.2", - "sqlstring": "2.3.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/mysql/node_modules/readable-stream": { - "version": "2.3.7", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../common/node_modules/mysql/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../../../common/node_modules/mysql/node_modules/sqlstring": { - "version": "2.3.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/mysql/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../common/node_modules/mysql2": { - "version": "3.3.3", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "denque": "^2.1.0", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^5.2.1", - "lru-cache": "^8.0.0", - "named-placeholders": "^1.1.3", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../../../common/node_modules/mysql2/node_modules/lru-cache": { - "version": "8.0.5", - "license": "ISC", - "optional": true, - "peer": true, - "engines": { - "node": ">=16.14" - } - }, - "../../../common/node_modules/mz": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "../../../common/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../common/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "optional": true, - "peer": true, - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../../../common/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/node-addon-api": { - "version": "4.3.0", - "license": "MIT" - }, - "../../../common/node_modules/node-fetch": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "../../../common/node_modules/node-gyp": { - "version": "8.4.1", - "license": "MIT", - "optional": true, - "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" - }, - "engines": { - "node": ">= 10.12.0" - } - }, - "../../../common/node_modules/node-gyp/node_modules/are-we-there-yet": { - "version": "3.0.1", - "license": "ISC", - "optional": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "../../../common/node_modules/node-gyp/node_modules/gauge": { - "version": "4.0.4", - "license": "ISC", - "optional": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "../../../common/node_modules/node-gyp/node_modules/npmlog": { - "version": "6.0.2", - "license": "ISC", - "optional": true, - "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "../../../common/node_modules/nopt": { - "version": "5.0.0", - "license": "ISC", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/npmlog": { - "version": "5.0.1", - "license": "ISC", - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "../../../common/node_modules/object-assign": { - "version": "4.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/on-finished": { - "version": "2.4.1", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/once": { - "version": "1.4.0", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../common/node_modules/one-time": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "fn.name": "1.x.x" - } - }, - "../../../common/node_modules/optionator": { - "version": "0.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/p-map": { - "version": "4.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/parse5": { - "version": "5.1.1", - "license": "MIT" - }, - "../../../common/node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "parse5": "^6.0.1" - } - }, - "../../../common/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { - "version": "6.0.1", - "license": "MIT" - }, - "../../../common/node_modules/parseurl": { - "version": "1.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/path-is-absolute": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/path-to-regexp": { - "version": "0.1.7", - "license": "MIT" - }, - "../../../common/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../common/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/prettier": { - "version": "2.8.8", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../common/node_modules/process-nextick-args": { - "version": "2.0.1", - "license": "MIT" - }, - "../../../common/node_modules/promise-inflight": { - "version": "1.0.1", - "license": "ISC", - "optional": true - }, - "../../../common/node_modules/promise-retry": { - "version": "2.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/protobufjs": { - "version": "7.2.4", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../common/node_modules/proxy-addr": { - "version": "2.0.7", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../../../common/node_modules/punycode": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/qs": { - "version": "6.11.0", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../common/node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "../../../common/node_modules/range-parser": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/raw-body/node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "../../../common/node_modules/reflect-metadata": { - "version": "0.1.13", - "license": "Apache-2.0" - }, - "../../../common/node_modules/regenerator-runtime": { - "version": "0.14.0", - "license": "MIT" - }, - "../../../common/node_modules/require-directory": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/retry": { - "version": "0.12.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 4" - } - }, - "../../../common/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/rimraf": { - "version": "3.0.2", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../common/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../common/node_modules/safe-stable-stringify": { - "version": "2.4.3", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../../../common/node_modules/semver": { - "version": "7.5.0", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/send": { - "version": "0.18.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/send/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/send/node_modules/ms": { - "version": "2.1.3", - "license": "MIT" - }, - "../../../common/node_modules/seq-queue": { - "version": "0.0.5", - "optional": true, - "peer": true - }, - "../../../common/node_modules/serialize-javascript": { - "version": "6.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "../../../common/node_modules/serve-static": { - "version": "1.15.0", - "license": "MIT", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/set-blocking": { - "version": "2.0.0", - "license": "ISC" - }, - "../../../common/node_modules/setprototypeof": { - "version": "1.2.0", - "license": "ISC" - }, - "../../../common/node_modules/sha.js": { - "version": "2.4.11", - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "../../../common/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/signal-exit": { - "version": "3.0.7", - "license": "ISC" - }, - "../../../common/node_modules/simple-swizzle": { - "version": "0.2.2", - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "../../../common/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/smart-buffer": { - "version": "4.2.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "../../../common/node_modules/snappy": { - "version": "7.1.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "optionalDependencies": { - "@napi-rs/snappy-android-arm-eabi": "7.1.1", - "@napi-rs/snappy-android-arm64": "7.1.1", - "@napi-rs/snappy-darwin-arm64": "7.1.1", - "@napi-rs/snappy-darwin-x64": "7.1.1", - "@napi-rs/snappy-freebsd-x64": "7.1.1", - "@napi-rs/snappy-linux-arm-gnueabihf": "7.1.1", - "@napi-rs/snappy-linux-arm64-gnu": "7.1.1", - "@napi-rs/snappy-linux-arm64-musl": "7.1.1", - "@napi-rs/snappy-linux-x64-gnu": "7.1.1", - "@napi-rs/snappy-linux-x64-musl": "7.1.1", - "@napi-rs/snappy-win32-arm64-msvc": "7.1.1", - "@napi-rs/snappy-win32-ia32-msvc": "7.1.1", - "@napi-rs/snappy-win32-x64-msvc": "7.1.1" - } - }, - "../../../common/node_modules/socks": { - "version": "2.7.1", - "license": "MIT", - "optional": true, - "dependencies": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" - } - }, - "../../../common/node_modules/socks-proxy-agent": { - "version": "6.2.1", - "license": "MIT", - "optional": true, - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/sqlite3": { - "version": "5.1.6", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.0", - "node-addon-api": "^4.2.0", - "tar": "^6.1.11" - }, - "optionalDependencies": { - "node-gyp": "8.x" - }, - "peerDependencies": { - "node-gyp": "8.x" - }, - "peerDependenciesMeta": { - "node-gyp": { - "optional": true - } - } - }, - "../../../common/node_modules/sqlstring": { - "version": "2.3.3", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/ssri": { - "version": "8.0.1", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.1.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/stack-trace": { - "version": "0.0.10", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/statuses": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/string_decoder": { - "version": "1.3.0", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "../../../common/node_modules/string-width": { - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/supports-color": { - "version": "5.5.0", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/tar": { - "version": "6.1.13", - "license": "ISC", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^4.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/tar/node_modules/minipass": { - "version": "4.2.8", - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/text-hex": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../common/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/thenify": { - "version": "3.3.1", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "../../../common/node_modules/thenify-all": { - "version": "1.6.0", - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "../../../common/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../common/node_modules/toidentifier": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "../../../common/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "../../../common/node_modules/triple-beam": { - "version": "1.3.0", - "license": "MIT" - }, - "../../../common/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../../../common/node_modules/tsutils": { - "version": "3.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "../../../common/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/type-is": { - "version": "1.6.18", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/typeorm": { - "version": "0.3.17", - "license": "MIT", - "dependencies": { - "@sqltools/formatter": "^1.2.5", - "app-root-path": "^3.1.0", - "buffer": "^6.0.3", - "chalk": "^4.1.2", - "cli-highlight": "^2.1.11", - "date-fns": "^2.29.3", - "debug": "^4.3.4", - "dotenv": "^16.0.3", - "glob": "^8.1.0", - "mkdirp": "^2.1.3", - "reflect-metadata": "^0.1.13", - "sha.js": "^2.4.11", - "tslib": "^2.5.0", - "uuid": "^9.0.0", - "yargs": "^17.6.2" - }, - "bin": { - "typeorm": "cli.js", - "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js", - "typeorm-ts-node-esm": "cli-ts-node-esm.js" - }, - "engines": { - "node": ">= 12.9.0" - }, - "funding": { - "url": "https://opencollective.com/typeorm" - }, - "peerDependencies": { - "@google-cloud/spanner": "^5.18.0", - "@sap/hana-client": "^2.12.25", - "better-sqlite3": "^7.1.2 || ^8.0.0", - "hdb-pool": "^0.1.6", - "ioredis": "^5.0.4", - "mongodb": "^5.2.0", - "mssql": "^9.1.1", - "mysql2": "^2.2.5 || ^3.0.1", - "oracledb": "^5.1.0", - "pg": "^8.5.1", - "pg-native": "^3.0.0", - "pg-query-stream": "^4.0.0", - "redis": "^3.1.1 || ^4.0.0", - "sql.js": "^1.4.0", - "sqlite3": "^5.0.3", - "ts-node": "^10.7.0", - "typeorm-aurora-data-api-driver": "^2.0.0" - }, - "peerDependenciesMeta": { - "@google-cloud/spanner": { - "optional": true - }, - "@sap/hana-client": { - "optional": true - }, - "better-sqlite3": { - "optional": true - }, - "hdb-pool": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "mongodb": { - "optional": true - }, - "mssql": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "oracledb": { - "optional": true - }, - "pg": { - "optional": true - }, - "pg-native": { - "optional": true - }, - "pg-query-stream": { - "optional": true - }, - "redis": { - "optional": true - }, - "sql.js": { - "optional": true - }, - "sqlite3": { - "optional": true - }, - "ts-node": { - "optional": true - }, - "typeorm-aurora-data-api-driver": { - "optional": true - } - } - }, - "../../../common/node_modules/typeorm/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/typeorm/node_modules/brace-expansion": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../common/node_modules/typeorm/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/typeorm/node_modules/cliui": { - "version": "8.0.1", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/typeorm/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/typeorm/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../common/node_modules/typeorm/node_modules/glob": { - "version": "8.1.0", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/typeorm/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/typeorm/node_modules/minimatch": { - "version": "5.1.6", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/typeorm/node_modules/mkdirp": { - "version": "2.1.6", - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/typeorm/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/typeorm/node_modules/tslib": { - "version": "2.5.0", - "license": "0BSD" - }, - "../../../common/node_modules/typeorm/node_modules/yargs": { - "version": "17.7.1", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/typeorm/node_modules/yargs-parser": { - "version": "21.1.1", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/typescript": { - "version": "4.9.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../../../common/node_modules/unique-filename": { - "version": "1.1.1", - "license": "ISC", - "optional": true, - "dependencies": { - "unique-slug": "^2.0.0" - } - }, - "../../../common/node_modules/unique-slug": { - "version": "2.0.2", - "license": "ISC", - "optional": true, - "dependencies": { - "imurmurhash": "^0.1.4" - } - }, - "../../../common/node_modules/unpipe": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/uri-js": { - "version": "4.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../common/node_modules/url-polyfill": { - "version": "1.1.12", - "license": "MIT" - }, - "../../../common/node_modules/util-deprecate": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../common/node_modules/utils-merge": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "../../../common/node_modules/uuid": { - "version": "9.0.0", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../../../common/node_modules/vary": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "../../../common/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "../../../common/node_modules/which": { - "version": "2.0.2", - "devOptional": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/wide-align": { - "version": "1.1.5", - "license": "ISC", - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "../../../common/node_modules/winston": { - "version": "3.10.0", - "license": "MIT", - "dependencies": { - "@colors/colors": "1.5.0", - "@dabh/diagnostics": "^2.0.2", - "async": "^3.2.3", - "is-stream": "^2.0.0", - "logform": "^2.4.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "safe-stable-stringify": "^2.3.1", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.5.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "../../../common/node_modules/winston-loki": { - "version": "6.0.7", - "license": "MIT", - "dependencies": { - "async-exit-hook": "2.0.1", - "btoa": "^1.2.1", - "protobufjs": "^7.2.4", - "url-polyfill": "^1.1.12", - "winston-transport": "^4.3.0" - }, - "optionalDependencies": { - "snappy": "7.1.1" - } - }, - "../../../common/node_modules/winston-transport": { - "version": "4.5.0", - "license": "MIT", - "dependencies": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", - "triple-beam": "^1.3.0" - }, - "engines": { - "node": ">= 6.4.0" - } - }, - "../../../common/node_modules/workerpool": { - "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" - }, - "../../../common/node_modules/wrap-ansi": { - "version": "7.0.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../common/node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../common/node_modules/wrappy": { - "version": "1.0.2", - "license": "ISC" - }, - "../../../common/node_modules/y18n": { - "version": "5.0.8", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, - "../../../common/node_modules/yargs": { - "version": "16.2.0", - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yargs-parser": { - "version": "20.2.4", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yargs-unparser": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend": { - "name": "@crosslab/service-booking-backend", - "version": "0.0.1", - "license": "Apache-2.0", - "dependencies": { - "@cross-lab-project/api-client": "file:../../../../clients/api/js", - "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", - "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", - "@cross-lab-project/service-common": "file:../../../common", - "@crosslab/booking-service-common": "file:../common", - "@crosslab/booking-service-test-common": "file:../test_common", - "@crosslab/service-device-reservation": "file:../device-reservation", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "@types/express": "^4.17.13", - "@types/lodash": "^4.14.198", - "ajv-formats": "^2.1.1", - "amqplib": "^0.10.2", - "dayjs": "^1.11.5", - "express": "^4.18.1", - "lodash": "^4.17.21", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" - }, - "devDependencies": { - "@types/mocha": "^10.0.0", - "async-mutex": "^0.4.0", - "c8": "^9.1.0", - "env-cmd": "^10.1.0", - "mocha": "^10.0.0", - "prettier": "^3.0.3", - "why-is-node-running": "^2.2.2" - } - }, - "../booking-backend/node_modules/@acuminous/bitsyntax": { - "version": "0.1.2", - "license": "MIT", - "dependencies": { - "buffer-more-ints": "~1.0.0", - "debug": "^4.3.4", - "safe-buffer": "~5.1.2" - }, - "engines": { - "node": ">=0.8" - } - }, - "../booking-backend/node_modules/@cross-lab-project/api-client": { - "resolved": "../../../../clients/api/js", - "link": true - }, - "../booking-backend/node_modules/@cross-lab-project/codegen-typescript-addon": { - "resolved": "../../../../helper/crosslab-typescript-addon", - "link": true - }, - "../booking-backend/node_modules/@cross-lab-project/openapi-codegen": { - "resolved": "../../../../helper/openapi-codegeneration", - "link": true - }, - "../booking-backend/node_modules/@cross-lab-project/service-common": { - "resolved": "../../../common", - "link": true - }, - "../booking-backend/node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true - }, - "../booking-backend/node_modules/@crosslab/booking-service-test-common": { - "resolved": "../test_common", - "link": true - }, - "../booking-backend/node_modules/@crosslab/service-device-reservation": { - "resolved": "../device-reservation", - "link": true - }, - "../booking-backend/node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../booking-backend/node_modules/@types/body-parser": { - "version": "1.19.2", - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "../booking-backend/node_modules/@types/connect": { - "version": "3.4.35", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../booking-backend/node_modules/@types/express": { - "version": "4.17.17", - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "../booking-backend/node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "../booking-backend/node_modules/@types/http-errors": { - "version": "2.0.1", - "license": "MIT" - }, - "../booking-backend/node_modules/@types/lodash": { - "version": "4.14.195", - "license": "MIT" - }, - "../booking-backend/node_modules/@types/mime": { - "version": "1.3.2", - "license": "MIT" - }, - "../booking-backend/node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" - }, - "../booking-backend/node_modules/@types/qs": { - "version": "6.9.7", - "license": "MIT" - }, - "../booking-backend/node_modules/@types/range-parser": { - "version": "1.2.4", - "license": "MIT" - }, - "../booking-backend/node_modules/@types/send": { - "version": "0.17.1", - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "../booking-backend/node_modules/@types/serve-static": { - "version": "1.15.2", - "license": "MIT", - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, - "../booking-backend/node_modules/accepts": { - "version": "1.3.8", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../booking-backend/node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../booking-backend/node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "@acuminous/bitsyntax": "^0.1.2", - "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", - "url-parse": "~1.5.10" - }, - "engines": { - "node": ">=10" - } - }, - "../booking-backend/node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../booking-backend/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../booking-backend/node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../booking-backend/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../booking-backend/node_modules/array-flatten": { - "version": "1.1.1", - "license": "MIT" - }, - "../booking-backend/node_modules/async-mutex": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "../booking-backend/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/binary-extensions": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../booking-backend/node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../booking-backend/node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../booking-backend/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/browser-stdout": { - "version": "1.3.1", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/bytes": { - "version": "3.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../booking-backend/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../booking-backend/node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../booking-backend/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../booking-backend/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/commander": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../booking-backend/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/content-disposition": { - "version": "0.5.4", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../booking-backend/node_modules/content-type": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/cookie-signature": { - "version": "1.0.6", - "license": "MIT" - }, - "../booking-backend/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../booking-backend/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../booking-backend/node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" - }, - "../booking-backend/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../booking-backend/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, - "../booking-backend/node_modules/depd": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/destroy": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../booking-backend/node_modules/diff": { - "version": "5.0.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../booking-backend/node_modules/ee-first": { - "version": "1.1.1", - "license": "MIT" - }, - "../booking-backend/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/encodeurl": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/env-cmd": { - "version": "10.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "commander": "^4.0.0", - "cross-spawn": "^7.0.0" - }, - "bin": { - "env-cmd": "bin/env-cmd.js" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../booking-backend/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../booking-backend/node_modules/escape-html": { - "version": "1.0.3", - "license": "MIT" - }, - "../booking-backend/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/etag": { - "version": "1.8.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/express": { - "version": "4.18.2", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "../booking-backend/node_modules/express/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../booking-backend/node_modules/express/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/express/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../booking-backend/node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "../booking-backend/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/finalhandler": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../booking-backend/node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/flat": { - "version": "5.0.2", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "../booking-backend/node_modules/forwarded": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/fresh": { - "version": "0.5.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "../booking-backend/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../booking-backend/node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../booking-backend/node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/glob": { - "version": "7.2.0", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../booking-backend/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../booking-backend/node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../booking-backend/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../booking-backend/node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../booking-backend/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/has-symbols": { - "version": "1.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "../booking-backend/node_modules/http-errors": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../booking-backend/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../booking-backend/node_modules/ipaddr.js": { - "version": "1.9.1", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "../booking-backend/node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../booking-backend/node_modules/is-plain-obj": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT" - }, - "../booking-backend/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "../booking-backend/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../booking-backend/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "../booking-backend/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/long": { - "version": "4.0.0", - "license": "Apache-2.0" - }, - "../booking-backend/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../booking-backend/node_modules/media-typer": { - "version": "0.3.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/merge-descriptors": { - "version": "1.0.1", - "license": "MIT" - }, - "../booking-backend/node_modules/methods": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/mime": { - "version": "1.6.0", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "../booking-backend/node_modules/mime-db": { - "version": "1.52.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/minimatch": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../booking-backend/node_modules/mocha": { - "version": "10.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "../booking-backend/node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../booking-backend/node_modules/mysql2": { - "version": "2.3.3", - "license": "MIT", - "dependencies": { - "denque": "^2.0.1", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../booking-backend/node_modules/mysql2/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../booking-backend/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../booking-backend/node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../booking-backend/node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/on-finished": { - "version": "2.4.1", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../booking-backend/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/parseurl": { - "version": "1.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/path-to-regexp": { - "version": "0.1.7", - "license": "MIT" - }, - "../booking-backend/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../booking-backend/node_modules/proxy-addr": { - "version": "2.0.7", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../booking-backend/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../booking-backend/node_modules/qs": { - "version": "6.11.0", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/querystringify": { - "version": "2.2.0", - "license": "MIT" - }, - "../booking-backend/node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "../booking-backend/node_modules/range-parser": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/readable-stream": { - "version": "1.1.14", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "../booking-backend/node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "../booking-backend/node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/require-from-string": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../booking-backend/node_modules/requires-port": { - "version": "1.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../booking-backend/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../booking-backend/node_modules/send": { - "version": "0.18.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../booking-backend/node_modules/send/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../booking-backend/node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../booking-backend/node_modules/send/node_modules/ms": { - "version": "2.1.3", - "license": "MIT" - }, - "../booking-backend/node_modules/seq-queue": { - "version": "0.0.5" - }, - "../booking-backend/node_modules/serialize-javascript": { - "version": "6.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "../booking-backend/node_modules/serve-static": { - "version": "1.15.0", - "license": "MIT", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../booking-backend/node_modules/setprototypeof": { - "version": "1.2.0", - "license": "ISC" - }, - "../booking-backend/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../booking-backend/node_modules/siginfo": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/sqlstring": { - "version": "2.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/stackback": { - "version": "0.0.2", - "dev": true, - "license": "MIT" - }, - "../booking-backend/node_modules/statuses": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/string_decoder": { - "version": "0.10.31", - "license": "MIT" - }, - "../booking-backend/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "../booking-backend/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../booking-backend/node_modules/toidentifier": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "../booking-backend/node_modules/tslib": { - "version": "2.6.0", - "dev": true, - "license": "0BSD" - }, - "../booking-backend/node_modules/type-is": { - "version": "1.6.18", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../booking-backend/node_modules/typescript": { - "version": "4.9.5", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../booking-backend/node_modules/unpipe": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../booking-backend/node_modules/url-parse": { - "version": "1.5.10", - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "../booking-backend/node_modules/utils-merge": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "../booking-backend/node_modules/vary": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../booking-backend/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../booking-backend/node_modules/why-is-node-running": { - "version": "2.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "../booking-backend/node_modules/workerpool": { - "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" - }, - "../booking-backend/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../booking-backend/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../booking-backend/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../booking-backend/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, - "../booking-backend/node_modules/yargs": { - "version": "16.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../booking-backend/node_modules/yargs-parser": { - "version": "20.2.4", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../booking-backend/node_modules/yargs-unparser": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../booking-backend/node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../booking-backend/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../common": { - "name": "@crosslab/booking-service-common", - "version": "0.0.1", - "license": "Apache-2.0", - "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0" - }, - "devDependencies": { - "@types/node": "^20.5.9", - "prettier": "^3.0.3", - "typescript": "^5.2.2" - } - }, - "../common/node_modules/@types/node": { - "version": "20.4.2", - "dev": true, - "license": "MIT" - }, - "../common/node_modules/typescript": { - "version": "5.1.6", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../device-reservation": { - "name": "@crosslab/service-device-reservation", - "version": "0.1.0", - "license": "Apache-2.0", - "dependencies": { - "@crosslab/booking-service-common": "file:../common", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "amqplib": "^0.10.0", - "async-mutex": "^0.4.0", - "dayjs": "^1.11.5", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" - }, - "devDependencies": { - "@types/mocha": "^10.0.0", - "c8": "^9.1.0", - "mocha": "^10.0.0", - "mocha-suppress-logs": "^0.3.1", - "prettier": "^3.0.3" - } - }, - "../device-reservation/node_modules/@acuminous/bitsyntax": { - "version": "0.1.2", - "license": "MIT", - "dependencies": { - "buffer-more-ints": "~1.0.0", - "debug": "^4.3.4", - "safe-buffer": "~5.1.2" - }, - "engines": { - "node": ">=0.8" - } - }, - "../device-reservation/node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true - }, - "../device-reservation/node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../device-reservation/node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" - }, - "../device-reservation/node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "@acuminous/bitsyntax": "^0.1.2", - "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", - "url-parse": "~1.5.10" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../device-reservation/node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../device-reservation/node_modules/async-mutex": { - "version": "0.4.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "../device-reservation/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/binary-extensions": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../device-reservation/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/browser-stdout": { - "version": "1.3.1", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" - }, - "../device-reservation/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../device-reservation/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../device-reservation/node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../device-reservation/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../device-reservation/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../device-reservation/node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" - }, - "../device-reservation/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../device-reservation/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, - "../device-reservation/node_modules/diff": { - "version": "5.0.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../device-reservation/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/flat": { - "version": "5.0.2", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "../device-reservation/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../device-reservation/node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../device-reservation/node_modules/glob": { - "version": "7.2.0", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../device-reservation/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../device-reservation/node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../device-reservation/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../device-reservation/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "../device-reservation/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../device-reservation/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../device-reservation/node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../device-reservation/node_modules/is-plain-obj": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT" - }, - "../device-reservation/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "../device-reservation/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../device-reservation/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/long": { - "version": "4.0.0", - "license": "Apache-2.0" - }, - "../device-reservation/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/minimatch": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/mocha": { - "version": "10.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "../device-reservation/node_modules/mocha-suppress-logs": { - "version": "0.3.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/mysql2": { - "version": "2.3.3", - "license": "MIT", - "dependencies": { - "denque": "^2.0.1", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../device-reservation/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../device-reservation/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../device-reservation/node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../device-reservation/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../device-reservation/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../device-reservation/node_modules/querystringify": { - "version": "2.2.0", - "license": "MIT" - }, - "../device-reservation/node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "../device-reservation/node_modules/readable-stream": { - "version": "1.1.14", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "../device-reservation/node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "../device-reservation/node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/requires-port": { - "version": "1.0.0", - "license": "MIT" - }, - "../device-reservation/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/seq-queue": { - "version": "0.0.5" - }, - "../device-reservation/node_modules/serialize-javascript": { - "version": "6.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "../device-reservation/node_modules/sqlstring": { - "version": "2.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../device-reservation/node_modules/string_decoder": { - "version": "0.10.31", - "license": "MIT" - }, - "../device-reservation/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "../device-reservation/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../device-reservation/node_modules/tslib": { - "version": "2.6.0", - "license": "0BSD" - }, - "../device-reservation/node_modules/typescript": { - "version": "4.9.5", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../device-reservation/node_modules/url-parse": { - "version": "1.5.10", - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "../device-reservation/node_modules/workerpool": { - "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" - }, - "../device-reservation/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../device-reservation/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, - "../device-reservation/node_modules/yargs": { - "version": "16.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-parser": { - "version": "20.2.4", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-unparser": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../test_common": { - "name": "@crosslab/booking-service-test-common", - "version": "0.0.1", - "license": "Apache-2.0", - "dependencies": { - "@crosslab/booking-service-common": "file:../common", - "@crosslab/service-device-reservation": "file:../device-reservation", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "@types/express": "^4.17.13", - "amqplib": "^0.10.3", - "dayjs": "^1.11.5", - "express": "^4.18.1", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" - }, - "devDependencies": { - "node-mocks-http": "^1.14.1", - "prettier": "^3.0.3" - } - }, - "../test_common/node_modules/@acuminous/bitsyntax": { - "version": "0.1.2", - "license": "MIT", - "dependencies": { - "buffer-more-ints": "~1.0.0", - "debug": "^4.3.4", - "safe-buffer": "~5.1.2" - }, - "engines": { - "node": ">=0.8" - } - }, - "../test_common/node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true - }, - "../test_common/node_modules/@crosslab/service-device-reservation": { - "resolved": "../device-reservation", - "link": true - }, - "../test_common/node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/body-parser": { - "version": "1.19.2", - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/connect": { - "version": "3.4.35", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/express": { - "version": "4.17.17", - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "../test_common/node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "../test_common/node_modules/@types/http-errors": { - "version": "2.0.1", - "license": "MIT" - }, - "../test_common/node_modules/@types/mime": { - "version": "1.3.2", - "license": "MIT" - }, - "../test_common/node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" - }, - "../test_common/node_modules/@types/qs": { - "version": "6.9.7", - "license": "MIT" - }, - "../test_common/node_modules/@types/range-parser": { - "version": "1.2.4", - "license": "MIT" - }, - "../test_common/node_modules/@types/send": { - "version": "0.17.1", - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/serve-static": { - "version": "1.15.2", - "license": "MIT", - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, - "../test_common/node_modules/accepts": { - "version": "1.3.8", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "@acuminous/bitsyntax": "^0.1.2", - "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", - "url-parse": "~1.5.10" - }, - "engines": { - "node": ">=10" - } - }, - "../test_common/node_modules/array-flatten": { - "version": "1.1.1", - "license": "MIT" - }, - "../test_common/node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../test_common/node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" - }, - "../test_common/node_modules/bytes": { - "version": "3.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/content-disposition": { - "version": "0.5.4", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../test_common/node_modules/content-type": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/cookie-signature": { - "version": "1.0.6", - "license": "MIT" - }, - "../test_common/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../test_common/node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" - }, - "../test_common/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../test_common/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, - "../test_common/node_modules/depd": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/destroy": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../test_common/node_modules/ee-first": { - "version": "1.1.1", - "license": "MIT" - }, - "../test_common/node_modules/encodeurl": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/escape-html": { - "version": "1.0.3", - "license": "MIT" - }, - "../test_common/node_modules/etag": { - "version": "1.8.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/express": { - "version": "4.18.2", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "../test_common/node_modules/express/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/express/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/express/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../test_common/node_modules/finalhandler": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/forwarded": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/fresh": { - "version": "0.5.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "../test_common/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../test_common/node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../test_common/node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/has-symbols": { - "version": "1.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/http-errors": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../test_common/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../test_common/node_modules/ipaddr.js": { - "version": "1.9.1", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "../test_common/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT" - }, - "../test_common/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "../test_common/node_modules/long": { - "version": "4.0.0", - "license": "Apache-2.0" - }, - "../test_common/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../test_common/node_modules/media-typer": { - "version": "0.3.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/merge-descriptors": { - "version": "1.0.1", - "license": "MIT" - }, - "../test_common/node_modules/methods": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/mime": { - "version": "1.6.0", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "../test_common/node_modules/mime-db": { - "version": "1.52.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../test_common/node_modules/mysql2": { - "version": "2.3.3", - "license": "MIT", - "dependencies": { - "denque": "^2.0.1", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../test_common/node_modules/mysql2/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../test_common/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../test_common/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../test_common/node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/on-finished": { - "version": "2.4.1", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/parseurl": { - "version": "1.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/path-to-regexp": { - "version": "0.1.7", - "license": "MIT" - }, - "../test_common/node_modules/proxy-addr": { - "version": "2.0.7", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../test_common/node_modules/qs": { - "version": "6.11.0", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/querystringify": { - "version": "2.2.0", - "license": "MIT" - }, - "../test_common/node_modules/range-parser": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/readable-stream": { - "version": "1.1.14", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "../test_common/node_modules/requires-port": { - "version": "1.0.0", - "license": "MIT" - }, - "../test_common/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../test_common/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../test_common/node_modules/send": { - "version": "0.18.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../test_common/node_modules/send/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/send/node_modules/ms": { - "version": "2.1.3", - "license": "MIT" - }, - "../test_common/node_modules/seq-queue": { - "version": "0.0.5" - }, - "../test_common/node_modules/serve-static": { - "version": "1.15.0", - "license": "MIT", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../test_common/node_modules/setprototypeof": { - "version": "1.2.0", - "license": "ISC" - }, - "../test_common/node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/sqlstring": { - "version": "2.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/statuses": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/string_decoder": { - "version": "0.10.31", - "license": "MIT" - }, - "../test_common/node_modules/toidentifier": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "../test_common/node_modules/type-is": { - "version": "1.6.18", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/typescript": { - "version": "4.9.5", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../test_common/node_modules/unpipe": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/url-parse": { - "version": "1.5.10", - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "../test_common/node_modules/utils-merge": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "../test_common/node_modules/vary": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" + "devDependencies": { + "@types/node": "^20.5.9", + "prettier": "^3.0.3", + "typescript": "^5.2.2" } }, - "../test_common/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" + "../test_common": { + "name": "@crosslab/booking-service-test-common", + "version": "0.0.1", + "license": "Apache-2.0", + "dependencies": { + "@crosslab/booking-service-common": "file:../common", + "@crosslab/service-device-reservation": "file:../device-reservation", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "@types/express": "^4.17.13", + "amqplib": "^0.10.3", + "dayjs": "^1.11.5", + "express": "^4.18.1", + "mysql2": "^3.6.0", + "typescript": "^5.2.2" + }, + "devDependencies": { + "node-mocks-http": "^1.14.1", + "prettier": "^3.0.3" + } }, "node_modules/@acuminous/bitsyntax": { "version": "0.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@acuminous/bitsyntax/-/bitsyntax-0.1.2.tgz", + "integrity": "sha512-29lUK80d1muEQqiUsSo+3A0yP6CdspgC95EnKBMi22Xlwt79i/En4Vr67+cXhU+cZjbti3TgGGC5wy1stIywVQ==", "dependencies": { "buffer-more-ints": "~1.0.0", "debug": "^4.3.4", @@ -18083,12 +205,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -18108,32 +230,48 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -18141,23 +279,23 @@ } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -18165,23 +303,23 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -18189,38 +327,39 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.15.tgz", - "integrity": "sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", - "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.22.16", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.16.tgz", - "integrity": "sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -18229,25 +368,25 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -18255,18 +394,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -18274,6 +413,33 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/types": { "version": "7.17.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", @@ -18316,6 +482,102 @@ "resolved": "../booking-backend", "link": true }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -18325,11 +587,31 @@ "node": ">=8" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "engines": { "node": ">=6.0.0" } @@ -18337,27 +619,35 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.0.tgz", - "integrity": "sha512-YBepjbt+ZNBVmN3ev1amQH3lWCmHyt5qTbLCp/syXJRu/Kw2koXh44qayB1gMRxcL/gV8egmjN5xWSrYyfUtyw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", + "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", "dependencies": { "@babel/generator": "7.17.7", "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", + "@babel/traverse": "7.23.2", "@babel/types": "7.17.0", "javascript-natural-sort": "0.7.1", "lodash": "^4.17.21" @@ -18373,30 +663,34 @@ } }, "node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@types/amqplib/-/amqplib-0.10.5.tgz", + "integrity": "sha512-/cSykxROY7BWwDoi4Y4/jLAuZTshZxd8Ey1QYa/VaXriMotBDoou7V/twJiOSHzU6t1Kp1AHAUXGCgqq+6DNeg==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/body-parser": { - "version": "1.19.2", - "license": "MIT", + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", "dependencies": { "@types/connect": "*", "@types/node": "*" } }, "node_modules/@types/connect": { - "version": "3.4.35", - "license": "MIT", + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/express": { - "version": "4.17.17", - "license": "MIT", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -18405,8 +699,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "license": "MIT", + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz", + "integrity": "sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg==", "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -18415,8 +710,9 @@ } }, "node_modules/@types/http-errors": { - "version": "2.0.1", - "license": "MIT" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", @@ -18425,8 +721,9 @@ "dev": true }, "node_modules/@types/mime": { - "version": "1.3.2", - "license": "MIT" + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/mocha": { "version": "10.0.6", @@ -18435,37 +732,46 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/qs": { - "version": "6.9.7", - "license": "MIT" + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" }, "node_modules/@types/range-parser": { - "version": "1.2.4", - "license": "MIT" + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" }, "node_modules/@types/send": { - "version": "0.17.1", - "license": "MIT", + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", "dependencies": { "@types/mime": "^1", "@types/node": "*" } }, "node_modules/@types/serve-static": { - "version": "1.15.2", - "license": "MIT", + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dependencies": { "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" + "@types/node": "*", + "@types/send": "*" } }, "node_modules/accepts": { "version": "1.3.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -18475,13 +781,14 @@ } }, "node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "uri-js": "^4.4.1" }, "funding": { "type": "github", @@ -18489,8 +796,9 @@ } }, "node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", "dependencies": { "ajv": "^8.0.0" }, @@ -18504,8 +812,9 @@ } }, "node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.10.4.tgz", + "integrity": "sha512-DMZ4eCEjAVdX1II2TfIUpJhfKAuoCeDIo/YyETbfAqehHTXxxs7WOOd+N1Xxr4cKhx12y23zk8/os98FxlZHrw==", "dependencies": { "@acuminous/bitsyntax": "^0.1.2", "buffer-more-ints": "~1.0.0", @@ -18566,7 +875,8 @@ }, "node_modules/array-flatten": { "version": "1.1.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/balanced-match": { "version": "1.0.2", @@ -18587,11 +897,12 @@ } }, "node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -18599,7 +910,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -18610,14 +921,16 @@ }, "node_modules/body-parser/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/brace-expansion": { "version": "2.0.1", @@ -18648,19 +961,21 @@ }, "node_modules/buffer-more-ints": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-1.0.0.tgz", + "integrity": "sha512-EMetuGFz5SLsT0QTnXzINh4Ksr+oo4i+UGTXEshiGCQWnsgSs7ZhJ8fzlwQ+OzEMs0MpDAMr1hxnblp5a4vcHg==" }, "node_modules/bytes": { "version": "3.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "engines": { "node": ">= 0.8" } }, "node_modules/c8": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", - "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", + "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -18670,7 +985,7 @@ "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", - "test-exclude": "^6.0.0", + "test-exclude": "^7.0.1", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" @@ -18679,56 +994,30 @@ "c8": "bin/c8.js" }, "engines": { - "node": ">=14.14.0" - } - }, - "node_modules/c8/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "node": ">=18" }, - "engines": { - "node": ">=12" - } - }, - "node_modules/c8/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "peerDependencies": { + "monocart-coverage-reports": "^2" }, - "engines": { - "node": ">=12" - } - }, - "node_modules/c8/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" + "peerDependenciesMeta": { + "monocart-coverage-reports": { + "optional": true + } } }, "node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -18787,14 +1076,17 @@ } }, "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/color-convert": { @@ -18812,21 +1104,17 @@ }, "node_modules/commander": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, "node_modules/content-disposition": { "version": "0.5.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dependencies": { "safe-buffer": "5.2.1" }, @@ -18836,6 +1124,8 @@ }, "node_modules/content-disposition/node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "funding": [ { "type": "github", @@ -18849,12 +1139,12 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/content-type": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "engines": { "node": ">= 0.6" } @@ -18866,24 +1156,28 @@ "dev": true }, "node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } }, "node_modules/cookie-signature": { "version": "1.0.6", - "license": "MIT" + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/core-util-is": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -18894,12 +1188,14 @@ } }, "node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" + "version": "1.11.11", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", + "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" }, "node_modules/debug": { - "version": "4.3.4", - "license": "MIT", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { "ms": "2.1.2" }, @@ -18924,23 +1220,42 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/denque": { "version": "2.1.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", "engines": { "node": ">=0.10" } }, "node_modules/depd": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "engines": { "node": ">= 0.8" } }, "node_modules/destroy": { "version": "1.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -18955,9 +1270,16 @@ "node": ">=0.3.1" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ee-first": { "version": "1.1.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -18967,15 +1289,17 @@ }, "node_modules/encodeurl": { "version": "1.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "engines": { "node": ">= 0.8" } }, "node_modules/env-cmd": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/env-cmd/-/env-cmd-10.1.0.tgz", + "integrity": "sha512-mMdWTT9XKN7yNth/6N6g2GuKuJTsKMDHlQFUDacb/heQRRWOTIZ42t1rMHnQu4jYxU1ajdTeJM+9eEETlqToMA==", "dev": true, - "license": "MIT", "dependencies": { "commander": "^4.0.0", "cross-spawn": "^7.0.0" @@ -18987,6 +1311,25 @@ "node": ">=8.0.0" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -18998,7 +1341,8 @@ }, "node_modules/escape-html": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "node_modules/escape-string-regexp": { "version": "1.0.5", @@ -19010,21 +1354,23 @@ }, "node_modules/etag": { "version": "1.8.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "engines": { "node": ">= 0.6" } }, "node_modules/express": { - "version": "4.18.2", - "license": "MIT", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -19057,17 +1403,21 @@ }, "node_modules/express/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/express/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/express/node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "funding": [ { "type": "github", @@ -19081,12 +1431,12 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fill-range": { "version": "7.1.1", @@ -19102,7 +1452,8 @@ }, "node_modules/finalhandler": { "version": "1.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -19118,14 +1469,16 @@ }, "node_modules/finalhandler/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/find-up": { "version": "5.0.0", @@ -19153,9 +1506,9 @@ } }, "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz", + "integrity": "sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", @@ -19170,14 +1523,16 @@ }, "node_modules/forwarded": { "version": "0.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "engines": { "node": ">= 0.6" } }, "node_modules/fresh": { "version": "0.5.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "engines": { "node": ">= 0.6" } @@ -19203,12 +1558,17 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/generate-function": { "version": "2.3.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", "dependencies": { "is-property": "^1.0.2" } @@ -19223,13 +1583,18 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -19239,6 +1604,7 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -19274,14 +1640,15 @@ "node": ">=4" } }, - "node_modules/has": { - "version": "1.0.3", - "license": "MIT", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dependencies": { - "function-bind": "^1.1.1" + "get-intrinsic": "^1.1.3" }, - "engines": { - "node": ">= 0.4.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-flag": { @@ -19292,9 +1659,21 @@ "node": ">=4" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -19304,7 +1683,8 @@ }, "node_modules/has-symbols": { "version": "1.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "engines": { "node": ">= 0.4" }, @@ -19312,6 +1692,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -19329,7 +1720,8 @@ }, "node_modules/http-errors": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -19343,7 +1735,8 @@ }, "node_modules/iconv-lite": { "version": "0.4.24", - "license": "MIT", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -19364,11 +1757,13 @@ }, "node_modules/inherits": { "version": "2.0.4", - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ipaddr.js": { "version": "1.9.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "engines": { "node": ">= 0.10" } @@ -19435,7 +1830,8 @@ }, "node_modules/is-property": { "version": "1.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" }, "node_modules/is-unicode-supported": { "version": "0.1.0", @@ -19451,12 +1847,14 @@ }, "node_modules/isarray": { "version": "0.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", @@ -19515,6 +1913,24 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/javascript-natural-sort": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", @@ -19550,7 +1966,8 @@ }, "node_modules/json-schema-traverse": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/locate-path": { "version": "6.0.0", @@ -19688,25 +2105,29 @@ }, "node_modules/media-typer": { "version": "0.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "engines": { "node": ">= 0.6" } }, "node_modules/merge-descriptors": { "version": "1.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "node_modules/methods": { "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "engines": { "node": ">= 0.6" } }, "node_modules/mime": { "version": "1.6.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "bin": { "mime": "cli.js" }, @@ -19716,14 +2137,16 @@ }, "node_modules/mime-db": { "version": "1.52.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { "mime-db": "1.52.0" }, @@ -19743,6 +2166,15 @@ "node": ">=10" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mocha": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", @@ -19778,6 +2210,40 @@ "node": ">= 14.0.0" } }, + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/mocha/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/mocha/node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/mocha/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -19820,14 +2286,42 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mysql2": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.6.0.tgz", - "integrity": "sha512-EWUGAhv6SphezurlfI2Fpt0uJEWLmirrtQR7SkbTHFC+4/mJBrPiSzHESHKAWKG7ALVD6xaG/NBjjd1DGJGQQQ==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.1.tgz", + "integrity": "sha512-6zo1T3GILsXMCex3YEu7hCz2OXLUarxFsxvFcUHWMpkPtmZLeTTWgRdc1gWyNJiYt6AxITmIf9bZDRy/jAfWew==", "dependencies": { "denque": "^2.1.0", "generate-function": "^2.3.1", @@ -19844,7 +2338,8 @@ }, "node_modules/mysql2/node_modules/iconv-lite": { "version": "0.6.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -19854,7 +2349,8 @@ }, "node_modules/named-placeholders": { "version": "1.1.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", "dependencies": { "lru-cache": "^7.14.1" }, @@ -19864,14 +2360,16 @@ }, "node_modules/named-placeholders/node_modules/lru-cache": { "version": "7.18.3", - "license": "ISC", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "engines": { "node": ">=12" } }, "node_modules/negotiator": { "version": "0.6.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "engines": { "node": ">= 0.6" } @@ -19886,15 +2384,17 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/on-finished": { "version": "2.4.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dependencies": { "ee-first": "1.1.1" }, @@ -19943,7 +2443,8 @@ }, "node_modules/parseurl": { "version": "1.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "engines": { "node": ">= 0.8" } @@ -19957,26 +2458,49 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/path-key": { - "version": "3.1.1", + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "dev": true, - "license": "MIT", "engines": { - "node": ">=8" + "node": "14 || >=16.14" } }, "node_modules/path-to-regexp": { "version": "0.1.7", - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -19991,9 +2515,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -20006,7 +2530,8 @@ }, "node_modules/proxy-addr": { "version": "2.0.7", - "license": "MIT", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -20016,15 +2541,17 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } }, "node_modules/qs": { "version": "6.11.0", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dependencies": { "side-channel": "^1.0.4" }, @@ -20037,7 +2564,8 @@ }, "node_modules/querystringify": { "version": "2.2.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, "node_modules/randombytes": { "version": "2.1.0", @@ -20050,14 +2578,16 @@ }, "node_modules/range-parser": { "version": "1.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "engines": { "node": ">= 0.6" } }, "node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -20070,7 +2600,8 @@ }, "node_modules/readable-stream": { "version": "1.1.14", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -20101,22 +2632,26 @@ }, "node_modules/require-from-string": { "version": "2.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "engines": { "node": ">=0.10.0" } }, "node_modules/requires-port": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "node_modules/safe-buffer": { "version": "5.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safer-buffer": { "version": "2.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/semver": { "version": "7.6.2", @@ -20132,7 +2667,8 @@ }, "node_modules/send": { "version": "0.18.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -20154,21 +2690,26 @@ }, "node_modules/send/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/send/node_modules/ms": { "version": "2.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/seq-queue": { - "version": "0.0.5" + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" }, "node_modules/serialize-javascript": { "version": "6.0.0", @@ -20181,7 +2722,8 @@ }, "node_modules/serve-static": { "version": "1.15.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -20192,14 +2734,32 @@ "node": ">= 0.8.0" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", - "license": "ISC" + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -20209,19 +2769,25 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -20249,21 +2815,24 @@ }, "node_modules/sqlstring": { "version": "2.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", "engines": { "node": ">= 0.6" } }, "node_modules/statuses": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "engines": { "node": ">= 0.8" } }, "node_modules/string_decoder": { "version": "0.10.31", - "license": "MIT" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" }, "node_modules/string-width": { "version": "4.2.3", @@ -20279,6 +2848,21 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -20291,6 +2875,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -20315,59 +2912,54 @@ } }, "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, "dependencies": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "node": ">=18" } }, "node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/to-fast-properties": { @@ -20392,14 +2984,16 @@ }, "node_modules/toidentifier": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "engines": { "node": ">=0.6" } }, "node_modules/type-is": { "version": "1.6.18", - "license": "MIT", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -20409,9 +3003,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -20420,23 +3014,31 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/unpipe": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "engines": { "node": ">= 0.8" } }, "node_modules/uri-js": { "version": "4.4.1", - "license": "BSD-2-Clause", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/url-parse": { "version": "1.5.10", - "license": "MIT", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -20444,7 +3046,8 @@ }, "node_modules/utils-merge": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "engines": { "node": ">= 0.4.0" } @@ -20465,15 +3068,17 @@ }, "node_modules/vary": { "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "engines": { "node": ">= 0.8" } }, "node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -20507,6 +3112,57 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -20556,30 +3212,30 @@ } }, "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-unparser": { diff --git a/services/booking/src/booking-frontend/package.json b/services/booking/src/booking-frontend/package.json index bcb3f4fa..50f9ceb6 100644 --- a/services/booking/src/booking-frontend/package.json +++ b/services/booking/src/booking-frontend/package.json @@ -24,7 +24,7 @@ "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "@types/express": "^4.17.13", - "ajv-formats": "^2.1.1", + "ajv-formats": "^3.0.1", "amqplib": "^0.10.2", "dayjs": "^1.11.7", "express": "^4.18.1", @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/mocha": "^10.0.6", - "c8": "^9.1.0", + "c8": "^10.1.2", "env-cmd": "^10.1.0", "mocha": "^10.4.0", "prettier": "^3.0.3" diff --git a/services/booking/src/common/package-lock.json b/services/booking/src/common/package-lock.json index 974b6f54..74087416 100644 --- a/services/booking/src/common/package-lock.json +++ b/services/booking/src/common/package-lock.json @@ -18,12 +18,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -43,32 +43,48 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -76,23 +92,23 @@ } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -100,23 +116,23 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -124,38 +140,39 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.15.tgz", - "integrity": "sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", - "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.22.16", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.16.tgz", - "integrity": "sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -164,25 +181,25 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -190,18 +207,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -209,6 +226,33 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/types": { "version": "7.17.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", @@ -221,14 +265,57 @@ "node": ">=6.9.0" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.0.tgz", - "integrity": "sha512-YBepjbt+ZNBVmN3ev1amQH3lWCmHyt5qTbLCp/syXJRu/Kw2koXh44qayB1gMRxcL/gV8egmjN5xWSrYyfUtyw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", + "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", "dependencies": { "@babel/generator": "7.17.7", "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", + "@babel/traverse": "7.23.2", "@babel/types": "7.17.0", "javascript-natural-sort": "0.7.1", "lodash": "^4.17.21" @@ -244,10 +331,13 @@ } }, "node_modules/@types/node": { - "version": "20.5.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.9.tgz", - "integrity": "sha512-PcGNd//40kHAS3sTlzKB9C9XL4K0sTup8nbG5lC14kzEteTNuAFh9u5nA0o5TWnSG2r/JNPRXFVcHJIIeRlmqQ==", - "dev": true + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/ansi-styles": { "version": "3.2.1", @@ -287,9 +377,9 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { "ms": "2.1.2" }, @@ -357,10 +447,15 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -399,9 +494,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -410,6 +505,12 @@ "engines": { "node": ">=14.17" } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true } } } diff --git a/services/booking/src/device-reservation/package-lock.json b/services/booking/src/device-reservation/package-lock.json index c3641bce..ec61f6f2 100644 --- a/services/booking/src/device-reservation/package-lock.json +++ b/services/booking/src/device-reservation/package-lock.json @@ -13,21 +13,20 @@ "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "amqplib": "^0.10.0", - "async-mutex": "^0.4.0", + "async-mutex": "^0.5.0", "dayjs": "^1.11.5", "mysql2": "^3.6.0", "typescript": "^5.2.2" }, "devDependencies": { "@types/mocha": "^10.0.0", - "c8": "^9.1.0", + "c8": "^10.1.0", "mocha": "^10.0.0", - "mocha-suppress-logs": "^0.3.1", + "mocha-suppress-logs": "^0.5.1", "prettier": "^3.0.3" } }, "../common": { - "name": "@crosslab/booking-service-common", "version": "0.0.1", "license": "Apache-2.0", "dependencies": { @@ -39,26 +38,10 @@ "typescript": "^5.2.2" } }, - "../common/node_modules/@types/node": { - "version": "20.4.2", - "dev": true, - "license": "MIT" - }, - "../common/node_modules/typescript": { - "version": "5.1.6", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/@acuminous/bitsyntax": { "version": "0.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@acuminous/bitsyntax/-/bitsyntax-0.1.2.tgz", + "integrity": "sha512-29lUK80d1muEQqiUsSo+3A0yP6CdspgC95EnKBMi22Xlwt79i/En4Vr67+cXhU+cZjbti3TgGGC5wy1stIywVQ==", "dependencies": { "buffer-more-ints": "~1.0.0", "debug": "^4.3.4", @@ -69,139 +52,161 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.5", - "license": "MIT", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dependencies": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "dependencies": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/helper-environment-visitor/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "license": "MIT", + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/helper-function-name/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dependencies": { + "@babel/types": "^7.24.7" + }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.22.5", - "license": "MIT", + "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dependencies": { - "color-convert": "^1.9.0" + "@babel/types": "^7.24.7" }, "engines": { - "node": ">=4" + "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", + "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" + "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "license": "MIT", + "node_modules/@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", "engines": { - "node": ">=0.8.0" + "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "license": "MIT", + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "engines": { - "node": ">=4" + "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "license": "MIT", + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "has-flag": "^3.0.0" + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { - "node": ">=4" + "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.22.7", - "license": "MIT", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -210,23 +215,84 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", - "license": "MIT", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/types": { - "version": "7.22.5", - "license": "MIT", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -243,44 +309,172 @@ "resolved": "../common", "link": true }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "engines": { "node": ">=6.0.0" } }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "dev": true, - "license": "MIT", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, - "license": "MIT" + "optional": true, + "engines": { + "node": ">=14" + } }, "node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.0.tgz", - "integrity": "sha512-YBepjbt+ZNBVmN3ev1amQH3lWCmHyt5qTbLCp/syXJRu/Kw2koXh44qayB1gMRxcL/gV8egmjN5xWSrYyfUtyw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", + "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", "dependencies": { "@babel/generator": "7.17.7", "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", + "@babel/traverse": "7.23.2", "@babel/types": "7.17.0", "javascript-natural-sort": "0.7.1", "lodash": "^4.17.21" @@ -295,62 +489,10 @@ } } }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@types/amqplib/-/amqplib-0.10.5.tgz", + "integrity": "sha512-/cSykxROY7BWwDoi4Y4/jLAuZTshZxd8Ey1QYa/VaXriMotBDoou7V/twJiOSHzU6t1Kp1AHAUXGCgqq+6DNeg==", "dependencies": { "@types/node": "*" } @@ -362,17 +504,23 @@ "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", + "dev": true }, "node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.10.4.tgz", + "integrity": "sha512-DMZ4eCEjAVdX1II2TfIUpJhfKAuoCeDIo/YyETbfAqehHTXxxs7WOOd+N1Xxr4cKhx12y23zk8/os98FxlZHrw==", "dependencies": { "@acuminous/bitsyntax": "^0.1.2", "buffer-more-ints": "~1.0.0", @@ -385,38 +533,38 @@ }, "node_modules/ansi-colors": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-regex": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dependencies": { - "color-convert": "^2.0.1" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=4" } }, "node_modules/anymatch": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, - "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -427,43 +575,52 @@ }, "node_modules/argparse": { "version": "2.0.1", - "dev": true, - "license": "Python-2.0" + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/async-mutex": { - "version": "0.4.0", - "license": "MIT", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.5.0.tgz", + "integrity": "sha512-1A94B18jkJ3DYq284ohPxoXbfTA5HsQ7/Mf4DEhcyLx3Bz27Rh59iScbB6EPiP+B+joue6YCxcMXSbFC1tZKwA==", "dependencies": { "tslib": "^2.4.0" } }, "node_modules/balanced-match": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/binary-extensions": { - "version": "2.2.0", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/braces": { - "version": "3.0.2", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, - "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -471,17 +628,19 @@ }, "node_modules/browser-stdout": { "version": "1.3.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true }, "node_modules/buffer-more-ints": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-1.0.0.tgz", + "integrity": "sha512-EMetuGFz5SLsT0QTnXzINh4Ksr+oo4i+UGTXEshiGCQWnsgSs7ZhJ8fzlwQ+OzEMs0MpDAMr1hxnblp5a4vcHg==" }, "node_modules/c8": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", - "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", + "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -491,7 +650,7 @@ "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", - "test-exclude": "^6.0.0", + "test-exclude": "^7.0.1", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" @@ -500,106 +659,46 @@ "c8": "bin/c8.js" }, "engines": { - "node": ">=14.14.0" - } - }, - "node_modules/c8/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/c8/node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" + "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/c8/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/c8/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "peerDependencies": { + "monocart-coverage-reports": "^2" }, - "engines": { - "node": ">=12" - } - }, - "node_modules/c8/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" + "peerDependenciesMeta": { + "monocart-coverage-reports": { + "optional": true + } } }, - "node_modules/chalk": { - "version": "4.1.2", + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": { - "has-flag": "^4.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/chokidar": { "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "funding": [ { @@ -607,7 +706,6 @@ "url": "https://paulmillr.com/funding/" } ], - "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -625,44 +723,57 @@ } }, "node_modules/cliui": { - "version": "7.0.4", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, - "node_modules/color-convert": { - "version": "2.0.1", + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, "engines": { - "node": ">=7.0.0" + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" } }, "node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, - "node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true }, "node_modules/core-util-is": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -673,67 +784,89 @@ } }, "node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" + "version": "1.11.11", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", + "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" }, "node_modules/debug": { - "version": "4.3.4", - "license": "MIT", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { "ms": "2.1.2" }, "engines": { "node": ">=6.0" }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/denque": { "version": "2.1.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", "engines": { "node": ">=0.10" } }, "node_modules/diff": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/emoji-regex": { "version": "8.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/escalade": { - "version": "3.1.1", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.8.0" } }, "node_modules/fill-range": { - "version": "7.0.1", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -743,8 +876,9 @@ }, "node_modules/find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -758,46 +892,81 @@ }, "node_modules/flat": { "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, - "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } }, + "node_modules/foreground-child": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz", + "integrity": "sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, - "license": "ISC" + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, "node_modules/generate-function": { "version": "2.3.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", "dependencies": { "is-property": "^1.0.2" } }, "node_modules/get-caller-file": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/glob": { - "version": "7.2.0", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -805,8 +974,9 @@ }, "node_modules/glob-parent": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -814,57 +984,41 @@ "node": ">= 6" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/globals": { "version": "11.12.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "engines": { "node": ">=4" } }, "node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/he": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, - "license": "MIT", "bin": { "he": "bin/he" } }, "node_modules/html-escaper": { "version": "2.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, "node_modules/iconv-lite": { "version": "0.6.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -874,8 +1028,10 @@ }, "node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -883,12 +1039,14 @@ }, "node_modules/inherits": { "version": "2.0.4", - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/is-binary-path": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -898,24 +1056,27 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -925,28 +1086,32 @@ }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/is-plain-obj": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-property": { "version": "1.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" }, "node_modules/is-unicode-supported": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -956,17 +1121,20 @@ }, "node_modules/isarray": { "version": "0.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=8" } @@ -985,52 +1153,20 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-report/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report/node_modules/make-dir": { + "node_modules/istanbul-lib-report/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/istanbul-lib-report/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, "engines": { - "node": ">=10" + "node": ">=8" } }, "node_modules/istanbul-lib-report/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -1051,6 +1187,24 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/javascript-natural-sort": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", @@ -1058,12 +1212,14 @@ }, "node_modules/js-tokens": { "version": "4.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -1073,7 +1229,8 @@ }, "node_modules/jsesc": { "version": "2.5.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "bin": { "jsesc": "bin/jsesc" }, @@ -1083,8 +1240,9 @@ }, "node_modules/locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -1102,8 +1260,9 @@ }, "node_modules/log-symbols": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -1115,6 +1274,76 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", @@ -1128,10 +1357,26 @@ "node": ">=16.14" } }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1139,63 +1384,171 @@ "node": ">=10" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mocha": { - "version": "10.2.0", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", + "dev": true, + "dependencies": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "8.1.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/mocha-suppress-logs": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mocha-suppress-logs/-/mocha-suppress-logs-0.5.1.tgz", + "integrity": "sha512-f4BhMiCABgCt3tlXiOcRydWreNCkfvgXgNL2ZclfXPdLNcY7jfyNy3Oi5wwPuxx++UyuNiIx3F7orvckAfrKzw==", + "dev": true, + "dependencies": { + "clone": "^2.1.2" + } + }, + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/mocha/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/mocha/node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "license": "MIT", "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" + "has-flag": "^4.0.0" }, "engines": { - "node": ">= 14.0.0" + "node": ">=10" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/mocha-suppress-logs": { - "version": "0.3.1", + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, - "license": "MIT" + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, - "license": "MIT" + "engines": { + "node": ">=10" + } }, "node_modules/ms": { "version": "2.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mysql2": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.6.0.tgz", - "integrity": "sha512-EWUGAhv6SphezurlfI2Fpt0uJEWLmirrtQR7SkbTHFC+4/mJBrPiSzHESHKAWKG7ALVD6xaG/NBjjd1DGJGQQQ==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.1.tgz", + "integrity": "sha512-6zo1T3GILsXMCex3YEu7hCz2OXLUarxFsxvFcUHWMpkPtmZLeTTWgRdc1gWyNJiYt6AxITmIf9bZDRy/jAfWew==", "dependencies": { "denque": "^2.1.0", "generate-function": "^2.3.1", @@ -1212,7 +1565,8 @@ }, "node_modules/named-placeholders": { "version": "1.1.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", "dependencies": { "lru-cache": "^7.14.1" }, @@ -1222,42 +1576,35 @@ }, "node_modules/named-placeholders/node_modules/lru-cache": { "version": "7.18.3", - "license": "ISC", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "engines": { "node": ">=12" } }, - "node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -1270,8 +1617,9 @@ }, "node_modules/p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -1284,32 +1632,57 @@ }, "node_modules/path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/path-key": { - "version": "3.1.1", + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, - "license": "MIT", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "dev": true, + "engines": { + "node": "14 || >=16.14" } }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + }, "node_modules/picomatch": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -1318,9 +1691,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -1333,19 +1706,22 @@ }, "node_modules/querystringify": { "version": "2.2.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, "node_modules/randombytes": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/readable-stream": { "version": "1.1.14", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -1355,8 +1731,9 @@ }, "node_modules/readdirp": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -1366,39 +1743,59 @@ }, "node_modules/require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/requires-port": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "node_modules/safe-buffer": { "version": "5.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safer-buffer": { "version": "2.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } }, "node_modules/seq-queue": { - "version": "0.0.5" + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" }, "node_modules/serialize-javascript": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } }, "node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -1408,27 +1805,66 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/sqlstring": { "version": "2.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", "engines": { "node": ">= 0.6" } }, "node_modules/string_decoder": { "version": "0.10.31", - "license": "MIT" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" }, "node_modules/string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -1440,8 +1876,22 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -1451,8 +1901,9 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -1461,63 +1912,80 @@ } }, "node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { - "has-flag": "^4.0.0" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">=4" } }, "node_modules/test-exclude": { - "version": "6.0.0", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, - "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", + "node_modules/test-exclude/node_modules/glob": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, - "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, - "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/to-fast-properties": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "engines": { "node": ">=4" } }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -1526,13 +1994,14 @@ } }, "node_modules/tslib": { - "version": "2.6.0", - "license": "0BSD" + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1541,9 +2010,15 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/url-parse": { "version": "1.5.10", - "license": "MIT", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -1563,16 +2038,11 @@ "node": ">=10.12.0" } }, - "node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, "node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -1585,13 +2055,33 @@ }, "node_modules/workerpool": { "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true }, "node_modules/wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -1604,54 +2094,119 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { - "version": "16.2.0", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "license": "MIT", "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.4", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "license": "ISC", "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-unparser": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "license": "MIT", "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -1662,32 +2217,11 @@ "node": ">=10" } }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, diff --git a/services/booking/src/device-reservation/package.json b/services/booking/src/device-reservation/package.json index 3343b3ec..cff00ff6 100644 --- a/services/booking/src/device-reservation/package.json +++ b/services/booking/src/device-reservation/package.json @@ -17,16 +17,16 @@ "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "amqplib": "^0.10.0", - "async-mutex": "^0.4.0", + "async-mutex": "^0.5.0", "dayjs": "^1.11.5", "mysql2": "^3.6.0", "typescript": "^5.2.2" }, "devDependencies": { "@types/mocha": "^10.0.0", - "c8": "^9.1.0", + "c8": "^10.1.0", "mocha": "^10.0.0", - "mocha-suppress-logs": "^0.3.1", + "mocha-suppress-logs": "^0.5.1", "prettier": "^3.0.3" } } diff --git a/services/booking/src/schedule-service/package-lock.json b/services/booking/src/schedule-service/package-lock.json index a60e221b..426eed99 100644 --- a/services/booking/src/schedule-service/package-lock.json +++ b/services/booking/src/schedule-service/package-lock.json @@ -18,7 +18,7 @@ "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/express": "^4.17.13", "@types/lodash": "^4.14.198", - "ajv-formats": "^2.1.1", + "ajv-formats": "^3.0.1", "dayjs": "^1.11.5", "express": "^4.18.1", "lodash": "^4.17.21", @@ -27,7 +27,7 @@ }, "devDependencies": { "@types/mocha": "^10.0.0", - "c8": "^9.1.0", + "c8": "^10.1.0", "env-cmd": "^10.1.0", "mocha": "^10.0.0", "prettier": "^3.0.3" @@ -53,30 +53,148 @@ "typescript": "^5.2.2" } }, - "../../../../clients/api/js/node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "../../../../helper/crosslab-typescript-addon": { + "name": "@cross-lab-project/codegen-typescript-addon", + "license": "UNLICENSED", + "dependencies": { + "@apidevtools/swagger-parser": "^10.1.0", + "nunjucks": "^3.2.3" + }, + "devDependencies": { + "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/node": "^20.5.9", + "@types/nunjucks": "^3.2.3", + "@types/seedrandom": "^3.0.5", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "copyfiles": "^2.4.1", + "eslint": "^8.48.0", + "openapi-types": "^12.1.3", + "prettier": "^3.0.3", + "tsc-watch": "^6.0.4", + "typescript": "^5.2.2" + }, + "peerDependencies": { + "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", + "ajv": "^8.11.0", + "ajv-formats": "^2.1.1" } }, - "../../../../clients/api/js/node_modules/@babel/code-frame": { - "version": "7.22.13", - "dev": true, - "license": "MIT", + "../../../../helper/openapi-codegeneration": { + "name": "@cross-lab-project/openapi-codegen", + "license": "UNLICENSED", + "dependencies": { + "@apidevtools/swagger-parser": "^10.1.0", + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", + "commander": "^11.0.0", + "deterministic-json-schema-faker": "^0.5.0-rcv.46", + "glob": "^10.3.4", + "json-schema-merge-allof": "^0.8.1", + "json-schema-to-typescript": "^13.1.1", + "nunjucks": "^3.2.4", + "quicktype-core": "^23.0.75", + "seedrandom": "^3.0.5", + "tiny-typed-emitter": "^2.1.0", + "yaml": "^2.3.2" + }, + "bin": { + "openapi-codegen": "lib/cjs/index.js" + }, + "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/node": "^20.5.9", + "@types/nunjucks": "^3.2.3", + "@types/seedrandom": "^3.0.5", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "eslint": "^8.48.0", + "openapi-types": "^12.1.3", + "prettier": "^3.0.3", + "tsc-watch": "^6.0.4", + "typescript": "^5.2.2" + } + }, + "../../../common": { + "name": "@crosslab/service-common", + "license": "UNLICENSED", + "dependencies": { + "express": "^4.18.1", + "express-winston": "^4.2.0", + "fetch-retry": "^5.0.6", + "jose": "^4.14.6", + "mysql": "^2.18.1", + "sqlite3": "^5.1.6", + "typeorm": "^0.3.17", + "uuid": "^9.0.0", + "winston": "^3.10.0", + "winston-loki": "^6.0.7" + }, + "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/express": "^4.17.13", + "@types/mocha": "^10.0.1", + "@types/node": "^20.5.9", + "@types/uuid": "^9.0.3", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "eslint": "^8.48.0", + "mocha": "^10.2.0", + "prettier": "^3.0.3", + "typescript": "^5.2.2" + } + }, + "../common": { + "name": "@crosslab/booking-service-common", + "version": "0.0.1", + "license": "Apache-2.0", + "dependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0" + }, + "devDependencies": { + "@types/node": "^20.5.9", + "prettier": "^3.0.3", + "typescript": "^5.2.2" + } + }, + "../test_common": { + "name": "@crosslab/booking-service-test-common", + "version": "0.0.1", + "license": "Apache-2.0", + "dependencies": { + "@crosslab/booking-service-common": "file:../common", + "@crosslab/service-device-reservation": "file:../device-reservation", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "@types/express": "^4.17.13", + "amqplib": "^0.10.3", + "dayjs": "^1.11.5", + "express": "^4.18.1", + "mysql2": "^3.6.0", + "typescript": "^5.2.2" + }, + "devDependencies": { + "node-mocks-http": "^1.14.1", + "prettier": "^3.0.3" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/generator": { + "node_modules/@babel/generator": { "version": "7.17.7", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", "dependencies": { "@babel/types": "^7.17.0", "jsesc": "^2.5.1", @@ -86,120 +204,137 @@ "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dependencies": { + "@babel/types": "^7.24.7" + }, "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-environment-visitor/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "dev": true, - "license": "MIT", + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/highlight": { - "version": "7.22.13", - "dev": true, - "license": "MIT", + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/parser": { - "version": "7.22.13", - "dev": true, - "license": "MIT", + "node_modules/@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -207,45 +342,45 @@ "node": ">=6.0.0" } }, - "../../../../clients/api/js/node_modules/@babel/template": { - "version": "7.22.5", - "dev": true, - "license": "MIT", + "node_modules/@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.22.11", - "dev": true, - "license": "MIT", + "node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", + "node_modules/@babel/traverse": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -253,10 +388,37 @@ "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@babel/types": { + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { "version": "7.17.0", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dependencies": { "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" @@ -265,16860 +427,237 @@ "node": ">=6.9.0" } }, - "../../../../clients/api/js/node_modules/@cross-lab-project/codegen-typescript-addon": { + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@cross-lab-project/api-client": { + "resolved": "../../../../clients/api/js", + "link": true + }, + "node_modules/@cross-lab-project/codegen-typescript-addon": { "resolved": "../../../../helper/crosslab-typescript-addon", "link": true }, - "../../../../clients/api/js/node_modules/@cross-lab-project/openapi-codegen": { + "node_modules/@cross-lab-project/openapi-codegen": { "resolved": "../../../../helper/openapi-codegeneration", "link": true }, - "../../../../clients/api/js/node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", + "node_modules/@cross-lab-project/service-common": { + "resolved": "../../../common", + "link": true + }, + "node_modules/@crosslab/booking-service-common": { + "resolved": "../common", + "link": true + }, + "node_modules/@crosslab/booking-service-test-common": { + "resolved": "../test_common", + "link": true + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, - "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "../../../../clients/api/js/node_modules/@eslint-community/regexpp": { - "version": "4.8.0", - "dev": true, - "license": "MIT", "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": ">=12" } }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc": { - "version": "2.1.2", + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "engines": { + "node": ">=12" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, - "license": "MIT", "dependencies": { - "type-fest": "^0.20.2" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "../../../../clients/api/js/node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@eslint/js": { - "version": "8.48.0", + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, - "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "../../../../clients/api/js/node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../../clients/api/js/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../../clients/api/js/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../../clients/api/js/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@types/json-schema": { - "version": "7.0.12", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@types/node": { - "version": "20.5.9", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@types/semver": { - "version": "7.5.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/type-utils": "6.6.0", - "@typescript-eslint/utils": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/parser": { - "version": "6.6.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/typescript-estree": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/scope-manager": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/type-utils": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "6.6.0", - "@typescript-eslint/utils": "6.6.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/types": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.6.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/utils": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/typescript-estree": "6.6.0", - "semver": "^7.5.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "../../../../clients/api/js/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.6.0", - "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "6.6.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../clients/api/js/node_modules/acorn": { - "version": "8.10.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=0.4.0" - } - }, - "../../../../clients/api/js/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../clients/api/js/node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "node": ">=12" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../clients/api/js/node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/ansi-sequence-parser": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "../../../../clients/api/js/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../clients/api/js/node_modules/array-union": { - "version": "2.1.0", + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "../../../../clients/api/js/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../../clients/api/js/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dependencies": { - "fill-range": "^7.0.1" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { - "node": ">=8" + "node": ">=6.0.0" } }, - "../../../../clients/api/js/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "engines": { - "node": ">=6" + "node": ">=6.0.0" } }, - "../../../../clients/api/js/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" + "node": ">=6.0.0" } }, - "../../../../clients/api/js/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, - "../../../../clients/api/js/node_modules/cross-fetch": { - "version": "4.0.0", - "license": "MIT", + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dependencies": { - "node-fetch": "^2.6.12" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "../../../../clients/api/js/node_modules/cross-spawn": { - "version": "7.0.3", + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, + "optional": true, "engines": { - "node": ">= 8" + "node": ">=14" } }, - "../../../../clients/api/js/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../clients/api/js/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../../clients/api/js/node_modules/eslint": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../clients/api/js/node_modules/esquery": { - "version": "1.5.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../clients/api/js/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../clients/api/js/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/fast-glob": { - "version": "3.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../../clients/api/js/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../../clients/api/js/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../../clients/api/js/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../clients/api/js/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/flat-cache": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.7", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../../clients/api/js/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../clients/api/js/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../../clients/api/js/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../../clients/api/js/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../../clients/api/js/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../../clients/api/js/node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../../clients/api/js/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../clients/api/js/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/jsonc-parser": { - "version": "3.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/keyv": { - "version": "4.5.3", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "../../../../clients/api/js/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../clients/api/js/node_modules/lunr": { - "version": "2.3.9", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/marked": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 12" - } - }, - "../../../../clients/api/js/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../../clients/api/js/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../../clients/api/js/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/node-fetch": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "../../../../clients/api/js/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../../clients/api/js/node_modules/optionator": { - "version": "0.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../clients/api/js/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../../clients/api/js/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/prettier": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../../clients/api/js/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../clients/api/js/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/require-from-string": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../clients/api/js/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../../clients/api/js/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../clients/api/js/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/shiki": { - "version": "0.14.3", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-sequence-parser": "^1.1.0", - "jsonc-parser": "^3.2.0", - "vscode-oniguruma": "^1.7.0", - "vscode-textmate": "^8.0.0" - } - }, - "../../../../clients/api/js/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../clients/api/js/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../clients/api/js/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../clients/api/js/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../../clients/api/js/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/ts-api-utils": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16.13.0" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "../../../../clients/api/js/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../clients/api/js/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../clients/api/js/node_modules/typedoc": { - "version": "0.25.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "lunr": "^2.3.9", - "marked": "^4.3.0", - "minimatch": "^9.0.3", - "shiki": "^0.14.1" - }, - "bin": { - "typedoc": "bin/typedoc" - }, - "engines": { - "node": ">= 16" - }, - "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x" - } - }, - "../../../../clients/api/js/node_modules/typedoc/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../../clients/api/js/node_modules/typedoc/node_modules/minimatch": { - "version": "9.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../clients/api/js/node_modules/typescript": { - "version": "5.2.2", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../../../../clients/api/js/node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../../clients/api/js/node_modules/vscode-oniguruma": { - "version": "1.7.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/vscode-textmate": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../clients/api/js/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "../../../../clients/api/js/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "../../../../clients/api/js/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../clients/api/js/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../clients/api/js/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon": { - "name": "@cross-lab-project/codegen-typescript-addon", - "dev": true, - "license": "UNLICENSED", - "dependencies": { - "@apidevtools/swagger-parser": "^10.1.0", - "nunjucks": "^3.2.3" - }, - "devDependencies": { - "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "copyfiles": "^2.4.1", - "eslint": "^8.48.0", - "openapi-types": "^12.1.3", - "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" - }, - "peerDependencies": { - "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", - "ajv": "^8.11.0", - "ajv-formats": "^2.1.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.6", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.13.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/openapi-schemas": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/swagger-methods": { - "version": "3.0.2", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@apidevtools/swagger-parser": { - "version": "10.1.0", - "license": "MIT", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "9.0.6", - "@apidevtools/openapi-schemas": "^2.1.0", - "@apidevtools/swagger-methods": "^3.0.2", - "@jsdevtools/ono": "^7.1.3", - "ajv": "^8.6.3", - "ajv-draft-04": "^1.0.0", - "call-me-maybe": "^1.0.1" - }, - "peerDependencies": { - "openapi-types": ">=7" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/code-frame": { - "version": "7.22.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/generator": { - "version": "7.17.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/highlight": { - "version": "7.22.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/parser": { - "version": "7.22.16", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@cross-lab-project/openapi-codegen": { - "resolved": "../../../../helper/openapi-codegeneration", - "link": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint-community/regexpp": { - "version": "4.8.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@eslint/js": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/json-schema": { - "version": "7.0.12", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/node": { - "version": "20.5.9", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/nunjucks": { - "version": "3.2.3", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/seedrandom": { - "version": "3.0.5", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@types/semver": { - "version": "7.5.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/type-utils": "6.6.0", - "@typescript-eslint/utils": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/parser": { - "version": "6.6.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/typescript-estree": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/scope-manager": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/type-utils": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "6.6.0", - "@typescript-eslint/utils": "6.6.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/types": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.6.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/utils": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/typescript-estree": "6.6.0", - "semver": "^7.5.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "6.6.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-core": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-core/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-dom": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-ssr": "3.2.47", - "@vue/reactivity-transform": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-sfc/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/compiler-ssr": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@vue/compiler-dom": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/reactivity-transform": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/reactivity-transform/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/@vue/shared": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/a-sync-waterfall": { - "version": "1.0.1", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/acorn": { - "version": "8.10.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ajv-draft-04": { - "version": "1.0.0", - "license": "MIT", - "peerDependencies": { - "ajv": "^8.5.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "peer": true, - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/argparse": { - "version": "1.0.10", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/asap": { - "version": "2.0.6", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/call-me-maybe": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/chalk/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/color-convert": { - "name": "process-nextick-args", - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/copyfiles": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "glob": "^7.0.5", - "minimatch": "^3.0.3", - "mkdirp": "^1.0.4", - "noms": "0.0.0", - "through2": "^2.0.1", - "untildify": "^4.0.0", - "yargs": "^16.1.0" - }, - "bin": { - "copyfiles": "copyfiles", - "copyup": "copyfiles" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/core-util-is": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/duplexer": { - "version": "0.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esprima": { - "version": "4.0.1", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esquery": { - "version": "1.5.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/estree-walker": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/event-stream": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-glob": { - "version": "3.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/flat-cache": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.7", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/from": { - "version": "0.1.7", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/isarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/js-yaml": { - "version": "3.14.1", - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/keyv": { - "version": "4.5.3", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/map-stream": { - "version": "0.1.0", - "dev": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/mkdirp": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/nanoid": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/node-cleanup": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms": { - "version": "0.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "~1.0.31" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms/node_modules/isarray": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms/node_modules/readable-stream": { - "version": "1.0.34", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/noms/node_modules/string_decoder": { - "version": "0.10.31", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/nunjucks": { - "version": "3.2.4", - "license": "BSD-2-Clause", - "dependencies": { - "a-sync-waterfall": "^1.0.0", - "asap": "^2.0.3", - "commander": "^5.1.0" - }, - "bin": { - "nunjucks-precompile": "bin/precompile" - }, - "engines": { - "node": ">= 6.9.0" - }, - "peerDependencies": { - "chokidar": "^3.3.0" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/nunjucks/node_modules/commander": { - "version": "5.1.0", - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/openapi-types": { - "version": "12.1.3", - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/optionator": { - "version": "0.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/pause-stream": { - "version": "0.0.11", - "dev": true, - "license": [ - "MIT", - "Apache2" - ], - "dependencies": { - "through": "~2.3" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/postcss": { - "version": "8.4.21", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - ], - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/prettier": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/process-nextick-args": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ps-tree": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "event-stream": "=3.3.4" - }, - "bin": { - "ps-tree": "bin/ps-tree.js" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/readable-stream": { - "version": "2.3.7", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/require-from-string": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/source-map-js": { - "version": "1.0.2", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/sourcemap-codec": { - "version": "1.4.8", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "../../../../helper/crosslab-typescript-addon/node_modules/split": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "through": "2" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/sprintf-js": { - "version": "1.0.3", - "license": "BSD-3-Clause" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/stream-combiner": { - "version": "0.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/string_decoder": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/string-argv": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.19" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/through": { - "version": "2.3.8", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/through2": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/ts-api-utils": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16.13.0" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/tsc-watch": { - "version": "6.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "node-cleanup": "^2.1.2", - "ps-tree": "^1.2.0", - "string-argv": "^0.3.1" - }, - "bin": { - "tsc-watch": "dist/lib/tsc-watch.js" - }, - "engines": { - "node": ">=12.12.0" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/typescript": { - "version": "5.2.2", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/untildify": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/util-deprecate": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/xtend": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yargs": { - "version": "16.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yargs-parser": { - "version": "20.2.9", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/crosslab-typescript-addon/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration": { - "name": "@cross-lab-project/openapi-codegen", - "dev": true, - "license": "UNLICENSED", - "dependencies": { - "@apidevtools/swagger-parser": "^10.1.0", - "ajv": "^8.12.0", - "ajv-formats": "^2.1.1", - "commander": "^11.0.0", - "deterministic-json-schema-faker": "^0.5.0-rcv.46", - "glob": "^10.3.4", - "json-schema-merge-allof": "^0.8.1", - "json-schema-to-typescript": "^13.1.1", - "nunjucks": "^3.2.4", - "quicktype-core": "^23.0.75", - "seedrandom": "^3.0.5", - "tiny-typed-emitter": "^2.1.0", - "yaml": "^2.3.2" - }, - "bin": { - "openapi-codegen": "lib/cjs/index.js" - }, - "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", - "openapi-types": "^12.1.3", - "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.6", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.13.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/openapi-schemas": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/swagger-methods": { - "version": "3.0.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@apidevtools/swagger-parser": { - "version": "10.1.0", - "license": "MIT", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "9.0.6", - "@apidevtools/openapi-schemas": "^2.1.0", - "@apidevtools/swagger-methods": "^3.0.2", - "@jsdevtools/ono": "^7.1.3", - "ajv": "^8.6.3", - "ajv-draft-04": "^1.0.0", - "call-me-maybe": "^1.0.1" - }, - "peerDependencies": { - "openapi-types": ">=7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/code-frame": { - "version": "7.22.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/generator": { - "version": "7.17.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/generator/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/highlight": { - "version": "7.22.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/parser": { - "version": "7.22.16", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/template": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@bcherny/json-schema-ref-parser": { - "version": "10.0.5-fork", - "license": "MIT", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", - "js-yaml": "^4.1.0" - }, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/philsturgeon" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@bcherny/json-schema-ref-parser/node_modules/argparse": { - "version": "2.0.1", - "license": "Python-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/@bcherny/json-schema-ref-parser/node_modules/js-yaml": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint-community/regexpp": { - "version": "4.8.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@eslint/js": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@glideapps/ts-necessities": { - "version": "2.1.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../../helper/openapi-codegeneration/node_modules/@isaacs/cliui": { - "version": "8.0.2", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/glob": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/json-schema": { - "version": "7.0.12", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/lodash": { - "version": "4.14.187", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/minimatch": { - "version": "5.1.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/node": { - "version": "20.5.9", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/nunjucks": { - "version": "3.2.3", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/seedrandom": { - "version": "3.0.5", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/semver": { - "version": "7.5.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@types/urijs": { - "version": "1.19.20", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/type-utils": "6.6.0", - "@typescript-eslint/utils": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/parser": { - "version": "6.6.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/typescript-estree": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/scope-manager": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/type-utils": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "6.6.0", - "@typescript-eslint/utils": "6.6.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/types": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.6.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/utils": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/typescript-estree": "6.6.0", - "semver": "^7.5.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "6.6.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-core": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-dom": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-sfc": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-ssr": "3.2.47", - "@vue/reactivity-transform": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-sfc/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/compiler-ssr": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@vue/compiler-dom": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/reactivity-transform": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/reactivity-transform/node_modules/magic-string": { - "version": "0.25.9", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/@vue/shared": { - "version": "3.2.47", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "../../../../helper/openapi-codegeneration/node_modules/a-sync-waterfall": { - "version": "1.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/abort-controller": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/acorn": { - "version": "8.10.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ajv-draft-04": { - "version": "1.0.0", - "license": "MIT", - "peerDependencies": { - "ajv": "^8.5.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/any-promise": { - "version": "1.3.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/argparse": { - "version": "1.0.10", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/asap": { - "version": "2.0.6", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/balanced-match": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/base64-js": { - "version": "1.5.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/brace-expansion": { - "version": "1.1.11", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/browser-or-node": { - "version": "2.1.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/buffer": { - "version": "6.0.3", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/call-me-maybe": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/cli-color": { - "version": "2.0.3", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.61", - "es6-iterator": "^2.0.3", - "memoizee": "^0.4.15", - "timers-ext": "^0.1.7" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/collection-utils": { - "version": "1.0.1", - "license": "Apache-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/commander": { - "version": "11.0.0", - "license": "MIT", - "engines": { - "node": ">=16" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/compute-gcd": { - "version": "1.2.1", - "dependencies": { - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/compute-lcm": { - "version": "1.1.2", - "dependencies": { - "compute-gcd": "^1.2.1", - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/concat-map": { - "version": "0.0.1", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/cross-fetch": { - "version": "4.0.0", - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/cross-spawn": { - "version": "7.0.3", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/d": { - "version": "1.0.1", - "license": "ISC", - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/deterministic-json-schema-faker": { - "version": "0.5.0-rcv.46", - "license": "MIT", - "dependencies": { - "json-schema-ref-parser": "^6.1.0", - "jsonpath-plus": "^5.1.0" - }, - "bin": { - "jsf": "bin/gen.cjs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/deterministic-json-schema-faker/node_modules/json-schema-ref-parser": { - "version": "6.1.0", - "license": "MIT", - "dependencies": { - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.12.1", - "ono": "^4.0.11" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/duplexer": { - "version": "0.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/eastasianwidth": { - "version": "0.2.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/emoji-regex": { - "version": "9.2.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/es5-ext": { - "version": "0.10.62", - "hasInstallScript": true, - "license": "ISC", - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/es6-iterator": { - "version": "2.0.3", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/es6-symbol": { - "version": "3.1.3", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/es6-weak-map": { - "version": "2.0.3", - "license": "ISC", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esprima": { - "version": "4.0.1", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esquery": { - "version": "1.5.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/estree-walker": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "../../../../helper/openapi-codegeneration/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/event-emitter": { - "version": "0.3.5", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/event-stream": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/event-target-shim": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/events": { - "version": "3.3.0", - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ext": { - "version": "1.7.0", - "license": "ISC", - "dependencies": { - "type": "^2.7.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ext/node_modules/type": { - "version": "2.7.2", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-glob": { - "version": "3.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/flat-cache": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.7", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/foreground-child": { - "version": "3.1.1", - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/format-util": { - "version": "1.0.5", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/from": { - "version": "0.1.7", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/fs.realpath": { - "version": "1.0.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/get-stdin": { - "version": "8.0.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob": { - "version": "10.3.4", - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/glob/node_modules/minimatch": { - "version": "9.0.3", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ieee754": { - "version": "1.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "../../../../helper/openapi-codegeneration/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/inflight": { - "version": "1.0.6", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/is-extglob": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-glob": { - "version": "4.0.3", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/is-promise": { - "version": "2.2.2", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/is-url": { - "version": "1.2.4", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/isexe": { - "version": "2.0.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/jackspeak": { - "version": "2.2.3", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/js-base64": { - "version": "3.7.5", - "license": "BSD-3-Clause" - }, - "../../../../helper/openapi-codegeneration/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/js-yaml": { - "version": "3.14.1", - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-compare": { - "version": "0.2.2", - "license": "MIT", - "dependencies": { - "lodash": "^4.17.4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-merge-allof": { - "version": "0.8.1", - "license": "MIT", - "dependencies": { - "compute-lcm": "^1.1.2", - "json-schema-compare": "^0.2.2", - "lodash": "^4.17.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript": { - "version": "13.1.1", - "license": "MIT", - "dependencies": { - "@bcherny/json-schema-ref-parser": "10.0.5-fork", - "@types/json-schema": "^7.0.11", - "@types/lodash": "^4.14.182", - "@types/prettier": "^2.6.1", - "cli-color": "^2.0.2", - "get-stdin": "^8.0.0", - "glob": "^7.1.6", - "glob-promise": "^4.2.2", - "is-glob": "^4.0.3", - "lodash": "^4.17.21", - "minimist": "^1.2.6", - "mkdirp": "^1.0.4", - "mz": "^2.7.0", - "prettier": "^2.6.2" - }, - "bin": { - "json2ts": "dist/src/cli.js" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/@types/prettier": { - "version": "2.7.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/glob": { - "version": "7.2.3", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/glob-promise": { - "version": "4.2.2", - "license": "MIT", - "dependencies": { - "@types/glob": "^7.1.3" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "type": "individual", - "url": "https://github.com/sponsors/ahmadnassri" - }, - "peerDependencies": { - "glob": "^7.1.6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-to-typescript/node_modules/prettier": { - "version": "2.8.8", - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/jsonpath-plus": { - "version": "5.1.0", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/keyv": { - "version": "4.5.3", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/lru-queue": { - "version": "0.1.0", - "license": "MIT", - "dependencies": { - "es5-ext": "~0.10.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/map-stream": { - "version": "0.1.0", - "dev": true - }, - "../../../../helper/openapi-codegeneration/node_modules/memoizee": { - "version": "0.4.15", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.53", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/minimatch": { - "version": "3.1.2", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/minimist": { - "version": "1.2.8", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/minipass": { - "version": "7.0.3", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/mkdirp": { - "version": "1.0.4", - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/mz": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/nanoid": { - "version": "3.3.4", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/next-tick": { - "version": "1.1.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/node-cleanup": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/node-fetch": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/nunjucks": { - "version": "3.2.4", - "license": "BSD-2-Clause", - "dependencies": { - "a-sync-waterfall": "^1.0.0", - "asap": "^2.0.3", - "commander": "^5.1.0" - }, - "bin": { - "nunjucks-precompile": "bin/precompile" - }, - "engines": { - "node": ">= 6.9.0" - }, - "peerDependencies": { - "chokidar": "^3.3.0" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } - } - }, - "../../../../helper/openapi-codegeneration/node_modules/nunjucks/node_modules/commander": { - "version": "5.1.0", - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/object-assign": { - "version": "4.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/once": { - "version": "1.4.0", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ono": { - "version": "4.0.11", - "license": "MIT", - "dependencies": { - "format-util": "^1.0.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/openapi-types": { - "version": "12.1.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/optionator": { - "version": "0.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/pako": { - "version": "1.0.11", - "license": "(MIT AND Zlib)" - }, - "../../../../helper/openapi-codegeneration/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-is-absolute": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-key": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-scurry": { - "version": "1.10.1", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.0.1", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/pause-stream": { - "version": "0.0.11", - "dev": true, - "license": [ - "MIT", - "Apache2" - ], - "dependencies": { - "through": "~2.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true - }, - "../../../../helper/openapi-codegeneration/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/pluralize": { - "version": "8.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/postcss": { - "version": "8.4.21", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - ], - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/prettier": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/process": { - "version": "0.11.10", - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/ps-tree": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "event-stream": "=3.3.4" - }, - "bin": { - "ps-tree": "bin/ps-tree.js" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/quicktype-core": { - "version": "23.0.75", - "license": "Apache-2.0", - "dependencies": { - "@glideapps/ts-necessities": "2.1.3", - "@types/urijs": "^1.19.19", - "browser-or-node": "^2.1.1", - "collection-utils": "^1.0.1", - "cross-fetch": "^4.0.0", - "is-url": "^1.2.4", - "js-base64": "^3.7.5", - "lodash": "^4.17.21", - "pako": "^1.0.6", - "pluralize": "^8.0.0", - "readable-stream": "4.4.2", - "unicode-properties": "^1.4.1", - "urijs": "^1.19.1", - "wordwrap": "^1.0.0", - "yaml": "^2.3.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/readable-stream": { - "version": "4.4.2", - "license": "MIT", - "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/require-from-string": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/seedrandom": { - "version": "3.0.5", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/shebang-command": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/shebang-regex": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/signal-exit": { - "version": "4.1.0", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/source-map-js": { - "version": "1.0.2", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/sourcemap-codec": { - "version": "1.4.8", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "../../../../helper/openapi-codegeneration/node_modules/split": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "through": "2" - }, - "engines": { - "node": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/sprintf-js": { - "version": "1.0.3", - "license": "BSD-3-Clause" - }, - "../../../../helper/openapi-codegeneration/node_modules/stream-combiner": { - "version": "0.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string_decoder": { - "version": "1.3.0", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-argv": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.19" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width": { - "version": "5.1.2", - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width/node_modules/ansi-regex": { - "version": "6.0.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/thenify": { - "version": "3.3.1", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/thenify-all": { - "version": "1.6.0", - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/through": { - "version": "2.3.8", - "dev": true, - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/timers-ext": { - "version": "0.1.7", - "license": "ISC", - "dependencies": { - "es5-ext": "~0.10.46", - "next-tick": "1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/tiny-inflate": { - "version": "1.0.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/tiny-typed-emitter": { - "version": "2.1.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/ts-api-utils": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16.13.0" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/tsc-watch": { - "version": "6.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "node-cleanup": "^2.1.2", - "ps-tree": "^1.2.0", - "string-argv": "^0.3.1" - }, - "bin": { - "tsc-watch": "dist/lib/tsc-watch.js" - }, - "engines": { - "node": ">=12.12.0" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/type": { - "version": "1.2.0", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/typescript": { - "version": "5.2.2", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/unicode-properties": { - "version": "1.4.1", - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.0", - "unicode-trie": "^2.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/unicode-trie": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "pako": "^0.2.5", - "tiny-inflate": "^1.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/unicode-trie/node_modules/pako": { - "version": "0.2.9", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/urijs": { - "version": "1.19.11", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-array": { - "version": "1.0.6", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-function": { - "version": "1.0.2" - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-integer": { - "version": "1.0.5", - "dependencies": { - "validate.io-number": "^1.0.3" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-integer-array": { - "version": "1.0.0", - "dependencies": { - "validate.io-array": "^1.0.3", - "validate.io-integer": "^1.0.4" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/validate.io-number": { - "version": "1.0.3" - }, - "../../../../helper/openapi-codegeneration/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "../../../../helper/openapi-codegeneration/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/which": { - "version": "2.0.2", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wordwrap": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi": { - "version": "8.1.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.0.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/wrappy": { - "version": "1.0.2", - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "../../../../helper/openapi-codegeneration/node_modules/yaml": { - "version": "2.3.2", - "license": "ISC", - "engines": { - "node": ">= 14" - } - }, - "../../../../helper/openapi-codegeneration/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common": { - "name": "@crosslab/service-common", - "license": "UNLICENSED", - "dependencies": { - "express": "^4.18.1", - "express-winston": "^4.2.0", - "fetch-retry": "^5.0.6", - "jose": "^4.14.6", - "mysql": "^2.18.1", - "sqlite3": "^5.1.6", - "typeorm": "^0.3.17", - "uuid": "^9.0.0", - "winston": "^3.10.0", - "winston-loki": "^6.0.7" - }, - "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/express": "^4.17.13", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.9", - "@types/uuid": "^9.0.3", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", - "mocha": "^10.2.0", - "prettier": "^3.0.3", - "typescript": "^5.2.2" - } - }, - "../../../common/node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/@babel/code-frame": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/generator": { - "version": "7.17.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/highlight": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/parser": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../common/node_modules/@babel/runtime": { - "version": "7.22.11", - "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/template": { - "version": "7.20.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.21.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/traverse": { - "version": "7.17.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@babel/types": { - "version": "7.17.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../../../common/node_modules/@colors/colors": { - "version": "1.5.0", - "license": "MIT", - "engines": { - "node": ">=0.1.90" - } - }, - "../../../common/node_modules/@dabh/diagnostics": { - "version": "2.0.3", - "license": "MIT", - "dependencies": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, - "../../../common/node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "../../../common/node_modules/@eslint-community/regexpp": { - "version": "4.8.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "../../../common/node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/@eslint/js": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../../../common/node_modules/@gar/promisify": { - "version": "1.1.3", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../../../common/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../../../common/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.10", - "license": "BSD-3-Clause", - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "../../../common/node_modules/@napi-rs/snappy-linux-x64-gnu": { - "version": "7.1.1", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/@napi-rs/snappy-linux-x64-musl": { - "version": "7.1.1", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/@npmcli/fs": { - "version": "1.1.1", - "license": "ISC", - "optional": true, - "dependencies": { - "@gar/promisify": "^1.0.1", - "semver": "^7.3.5" - } - }, - "../../../common/node_modules/@npmcli/move-file": { - "version": "1.1.2", - "license": "MIT", - "optional": true, - "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/base64": { - "version": "1.1.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "../../../common/node_modules/@protobufjs/float": { - "version": "1.0.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/path": { - "version": "1.1.2", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/pool": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/@sqltools/formatter": { - "version": "1.2.5", - "license": "MIT" - }, - "../../../common/node_modules/@tootallnate/once": { - "version": "1.1.2", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "../../../common/node_modules/@types/body-parser": { - "version": "1.19.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/connect": { - "version": "3.4.35", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/express": { - "version": "4.17.17", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "../../../common/node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "../../../common/node_modules/@types/json-schema": { - "version": "7.0.12", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/mime": { - "version": "1.3.2", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/node": { - "version": "20.5.9", - "license": "MIT" - }, - "../../../common/node_modules/@types/qs": { - "version": "6.9.7", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/range-parser": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/semver": { - "version": "7.5.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@types/send": { - "version": "0.17.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/serve-static": { - "version": "1.15.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mime": "*", - "@types/node": "*" - } - }, - "../../../common/node_modules/@types/triple-beam": { - "version": "1.3.2", - "license": "MIT" - }, - "../../../common/node_modules/@types/uuid": { - "version": "9.0.3", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/type-utils": "6.6.0", - "@typescript-eslint/utils": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/parser": { - "version": "6.6.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/typescript-estree": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/scope-manager": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../common/node_modules/@typescript-eslint/type-utils": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "6.6.0", - "@typescript-eslint/utils": "6.6.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/types": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../common/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.6.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/visitor-keys": "6.6.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../../../common/node_modules/@typescript-eslint/utils": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.6.0", - "@typescript-eslint/types": "6.6.0", - "@typescript-eslint/typescript-estree": "6.6.0", - "semver": "^7.5.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "../../../common/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "6.6.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../../../common/node_modules/abbrev": { - "version": "1.1.1", - "license": "ISC" - }, - "../../../common/node_modules/accepts": { - "version": "1.3.8", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/acorn": { - "version": "8.10.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../../../common/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../../../common/node_modules/agent-base": { - "version": "6.0.2", - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "../../../common/node_modules/agentkeepalive": { - "version": "4.3.0", - "license": "MIT", - "optional": true, - "dependencies": { - "debug": "^4.1.0", - "depd": "^2.0.0", - "humanize-ms": "^1.2.1" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "../../../common/node_modules/aggregate-error": { - "version": "3.1.0", - "license": "MIT", - "optional": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../../../common/node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/any-promise": { - "version": "1.3.0", - "license": "MIT" - }, - "../../../common/node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/app-root-path": { - "version": "3.1.0", - "license": "MIT", - "engines": { - "node": ">= 6.0.0" - } - }, - "../../../common/node_modules/aproba": { - "version": "2.0.0", - "license": "ISC" - }, - "../../../common/node_modules/are-we-there-yet": { - "version": "2.0.0", - "license": "ISC", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../../../common/node_modules/array-flatten": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../common/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/async": { - "version": "3.2.4", - "license": "MIT" - }, - "../../../common/node_modules/async-exit-hook": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../common/node_modules/balanced-match": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../common/node_modules/base64-js": { - "version": "1.5.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../common/node_modules/bignumber.js": { - "version": "9.0.0", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/binary-extensions": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../../../common/node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/body-parser/node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/brace-expansion": { - "version": "1.1.11", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../../../common/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/browser-stdout": { - "version": "1.3.1", - "dev": true, - "license": "ISC" - }, - "../../../common/node_modules/btoa": { - "version": "1.2.1", - "license": "(MIT OR Apache-2.0)", - "bin": { - "btoa": "bin/btoa.js" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../../../common/node_modules/buffer": { - "version": "6.0.3", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "../../../common/node_modules/bytes": { - "version": "3.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/cacache": { - "version": "15.3.0", - "license": "ISC", - "optional": true, - "dependencies": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - }, - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../../../common/node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/chownr": { - "version": "2.0.0", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/clean-stack": { - "version": "2.2.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/cli-highlight": { - "version": "2.1.11", - "license": "ISC", - "dependencies": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "bin": { - "highlight": "bin/highlight" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../common/node_modules/cli-highlight/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/cli-highlight/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/cliui": { - "version": "7.0.4", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../../../common/node_modules/color": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, - "../../../common/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../../../common/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "../../../common/node_modules/color-string": { - "version": "1.9.1", - "license": "MIT", - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "../../../common/node_modules/color-support": { - "version": "1.1.3", - "license": "ISC", - "bin": { - "color-support": "bin.js" - } - }, - "../../../common/node_modules/colorspace": { - "version": "1.1.4", - "license": "MIT", - "dependencies": { - "color": "^3.1.3", - "text-hex": "1.0.x" - } - }, - "../../../common/node_modules/concat-map": { - "version": "0.0.1", - "license": "MIT" - }, - "../../../common/node_modules/console-control-strings": { - "version": "1.1.0", - "license": "ISC" - }, - "../../../common/node_modules/content-disposition": { - "version": "0.5.4", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/content-type": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/cookie-signature": { - "version": "1.0.6", - "license": "MIT" - }, - "../../../common/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../../../common/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/date-fns": { - "version": "2.30.0", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, - "../../../common/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../../../common/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/delegates": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../common/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10" - } - }, - "../../../common/node_modules/depd": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/destroy": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../../../common/node_modules/detect-libc": { - "version": "2.0.1", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/diff": { - "version": "5.0.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../../../common/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../../../common/node_modules/dotenv": { - "version": "16.0.3", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/ee-first": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../common/node_modules/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "../../../common/node_modules/enabled": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/encodeurl": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/encoding": { - "version": "0.1.13", - "license": "MIT", - "optional": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "../../../common/node_modules/env-paths": { - "version": "2.2.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/err-code": { - "version": "2.0.3", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/escalade": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/escape-html": { - "version": "1.0.3", - "license": "MIT" - }, - "../../../common/node_modules/escape-string-regexp": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../../../common/node_modules/eslint": { - "version": "8.48.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../../../common/node_modules/esquery": { - "version": "1.5.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../../../common/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../../../common/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/etag": { - "version": "1.8.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/express": { - "version": "4.18.2", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "../../../common/node_modules/express-winston": { - "version": "4.2.0", - "license": "MIT", - "dependencies": { - "chalk": "^2.4.2", - "lodash": "^4.17.21" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "winston": ">=3.x <4" - } - }, - "../../../common/node_modules/express/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/express/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/fast-deep-equal": { - "version": "3.1.3", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/fast-glob": { - "version": "3.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../../../common/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../../../common/node_modules/fecha": { - "version": "4.2.3", - "license": "MIT" - }, - "../../../common/node_modules/fetch-retry": { - "version": "5.0.6", - "license": "MIT" - }, - "../../../common/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../common/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/finalhandler": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/flat": { - "version": "5.0.2", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "../../../common/node_modules/flat-cache": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../../../common/node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" - }, - "../../../common/node_modules/fn.name": { - "version": "1.1.0", - "license": "MIT" - }, - "../../../common/node_modules/forwarded": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/fresh": { - "version": "0.5.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/fs-minipass": { - "version": "2.1.0", - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/fs.realpath": { - "version": "1.0.0", - "license": "ISC" - }, - "../../../common/node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "../../../common/node_modules/gauge": { - "version": "3.0.2", - "license": "ISC", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../../../common/node_modules/get-caller-file": { - "version": "2.0.5", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../../../common/node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/glob": { - "version": "7.2.0", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../../../common/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/graceful-fs": { - "version": "4.2.11", - "license": "ISC", - "optional": true - }, - "../../../common/node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../../../common/node_modules/has-flag": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/has-symbols": { - "version": "1.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/has-unicode": { - "version": "2.0.1", - "license": "ISC" - }, - "../../../common/node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "../../../common/node_modules/highlight.js": { - "version": "10.7.3", - "license": "BSD-3-Clause", - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/http-cache-semantics": { - "version": "4.1.1", - "license": "BSD-2-Clause", - "optional": true - }, - "../../../common/node_modules/http-errors": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/http-proxy-agent": { - "version": "4.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/https-proxy-agent": { - "version": "5.0.1", - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/humanize-ms": { - "version": "1.2.1", - "license": "MIT", - "optional": true, - "dependencies": { - "ms": "^2.0.0" - } - }, - "../../../common/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "optional": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/ieee754": { - "version": "1.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "../../../common/node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../../../common/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/imurmurhash": { - "version": "0.1.4", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../../../common/node_modules/indent-string": { - "version": "4.0.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/infer-owner": { - "version": "1.0.4", - "license": "ISC", - "optional": true - }, - "../../../common/node_modules/inflight": { - "version": "1.0.6", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../../../common/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../../../common/node_modules/ip": { - "version": "2.0.0", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/ipaddr.js": { - "version": "1.9.1", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "../../../common/node_modules/is-arrayish": { - "version": "0.3.2", - "license": "MIT" - }, - "../../../common/node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/is-lambda": { - "version": "1.0.1", - "license": "MIT", - "optional": true - }, - "../../../common/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../../../common/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-plain-obj": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT", - "optional": true, - "peer": true - }, - "../../../common/node_modules/is-stream": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/isarray": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../common/node_modules/isexe": { - "version": "2.0.0", - "devOptional": true, - "license": "ISC" - }, - "../../../common/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/jose": { - "version": "4.14.6", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/panva" - } - }, - "../../../common/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../../../common/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/kuler": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "../../../common/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/logform": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "@colors/colors": "1.5.0", - "@types/triple-beam": "^1.3.2", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "safe-stable-stringify": "^2.3.1", - "triple-beam": "^1.3.0" - } - }, - "../../../common/node_modules/long": { - "version": "5.2.3", - "license": "Apache-2.0" - }, - "../../../common/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/make-dir": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../../../common/node_modules/make-fetch-happen": { - "version": "9.1.0", - "license": "ISC", - "optional": true, - "dependencies": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/media-typer": { - "version": "0.3.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/merge-descriptors": { - "version": "1.0.1", - "license": "MIT" - }, - "../../../common/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/methods": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../../../common/node_modules/mime": { - "version": "1.6.0", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/mime-db": { - "version": "1.52.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/minimatch": { - "version": "3.1.2", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/minipass": { - "version": "3.3.6", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/minipass-collect": { - "version": "1.0.2", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/minipass-fetch": { - "version": "1.4.1", - "license": "MIT", - "optional": true, - "dependencies": { - "minipass": "^3.1.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "optionalDependencies": { - "encoding": "^0.1.12" - } - }, - "../../../common/node_modules/minipass-flush": { - "version": "1.0.5", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/minipass-pipeline": { - "version": "1.2.4", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/minipass-sized": { - "version": "1.0.3", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/minizlib": { - "version": "2.1.2", - "license": "MIT", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/mkdirp": { - "version": "1.0.4", - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/mocha": { - "version": "10.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "../../../common/node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../common/node_modules/mocha/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/mocha/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "../../../common/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../../../common/node_modules/mysql": { - "version": "2.18.1", - "license": "MIT", - "dependencies": { - "bignumber.js": "9.0.0", - "readable-stream": "2.3.7", - "safe-buffer": "5.1.2", - "sqlstring": "2.3.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/mysql/node_modules/readable-stream": { - "version": "2.3.7", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "../../../common/node_modules/mysql/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../../../common/node_modules/mysql/node_modules/sqlstring": { - "version": "2.3.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/mysql/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "../../../common/node_modules/mysql2": { - "version": "3.3.3", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "denque": "^2.1.0", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^5.2.1", - "lru-cache": "^8.0.0", - "named-placeholders": "^1.1.3", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../../../common/node_modules/mysql2/node_modules/lru-cache": { - "version": "8.0.5", - "license": "ISC", - "optional": true, - "peer": true, - "engines": { - "node": ">=16.14" - } - }, - "../../../common/node_modules/mz": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "../../../common/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../common/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "optional": true, - "peer": true, - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../../../common/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/node-addon-api": { - "version": "4.3.0", - "license": "MIT" - }, - "../../../common/node_modules/node-fetch": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "../../../common/node_modules/node-gyp": { - "version": "8.4.1", - "license": "MIT", - "optional": true, - "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" - }, - "engines": { - "node": ">= 10.12.0" - } - }, - "../../../common/node_modules/node-gyp/node_modules/are-we-there-yet": { - "version": "3.0.1", - "license": "ISC", - "optional": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "../../../common/node_modules/node-gyp/node_modules/gauge": { - "version": "4.0.4", - "license": "ISC", - "optional": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "../../../common/node_modules/node-gyp/node_modules/npmlog": { - "version": "6.0.2", - "license": "ISC", - "optional": true, - "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "../../../common/node_modules/nopt": { - "version": "5.0.0", - "license": "ISC", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/npmlog": { - "version": "5.0.1", - "license": "ISC", - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "../../../common/node_modules/object-assign": { - "version": "4.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/on-finished": { - "version": "2.4.1", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/once": { - "version": "1.4.0", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../../../common/node_modules/one-time": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "fn.name": "1.x.x" - } - }, - "../../../common/node_modules/optionator": { - "version": "0.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/p-map": { - "version": "4.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/parse5": { - "version": "5.1.1", - "license": "MIT" - }, - "../../../common/node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "parse5": "^6.0.1" - } - }, - "../../../common/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { - "version": "6.0.1", - "license": "MIT" - }, - "../../../common/node_modules/parseurl": { - "version": "1.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/path-is-absolute": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/path-to-regexp": { - "version": "0.1.7", - "license": "MIT" - }, - "../../../common/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../../../common/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/prettier": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../../../common/node_modules/process-nextick-args": { - "version": "2.0.1", - "license": "MIT" - }, - "../../../common/node_modules/promise-inflight": { - "version": "1.0.1", - "license": "ISC", - "optional": true - }, - "../../../common/node_modules/promise-retry": { - "version": "2.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/protobufjs": { - "version": "7.2.4", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../../../common/node_modules/proxy-addr": { - "version": "2.0.7", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../../../common/node_modules/punycode": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../../../common/node_modules/qs": { - "version": "6.11.0", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../common/node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "../../../common/node_modules/range-parser": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/raw-body/node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../../../common/node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "../../../common/node_modules/reflect-metadata": { - "version": "0.1.13", - "license": "Apache-2.0" - }, - "../../../common/node_modules/regenerator-runtime": { - "version": "0.14.0", - "license": "MIT" - }, - "../../../common/node_modules/require-directory": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/retry": { - "version": "0.12.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 4" - } - }, - "../../../common/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/rimraf": { - "version": "3.0.2", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../../../common/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../../../common/node_modules/safe-stable-stringify": { - "version": "2.4.3", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../../../common/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/send": { - "version": "0.18.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/send/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../../../common/node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../../../common/node_modules/send/node_modules/ms": { - "version": "2.1.3", - "license": "MIT" - }, - "../../../common/node_modules/seq-queue": { - "version": "0.0.5", - "optional": true, - "peer": true - }, - "../../../common/node_modules/serialize-javascript": { - "version": "6.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "../../../common/node_modules/serve-static": { - "version": "1.15.0", - "license": "MIT", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/set-blocking": { - "version": "2.0.0", - "license": "ISC" - }, - "../../../common/node_modules/setprototypeof": { - "version": "1.2.0", - "license": "ISC" - }, - "../../../common/node_modules/sha.js": { - "version": "2.4.11", - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "../../../common/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../../../common/node_modules/signal-exit": { - "version": "3.0.7", - "license": "ISC" - }, - "../../../common/node_modules/simple-swizzle": { - "version": "0.2.2", - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "../../../common/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/smart-buffer": { - "version": "4.2.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "../../../common/node_modules/snappy": { - "version": "7.1.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "optionalDependencies": { - "@napi-rs/snappy-android-arm-eabi": "7.1.1", - "@napi-rs/snappy-android-arm64": "7.1.1", - "@napi-rs/snappy-darwin-arm64": "7.1.1", - "@napi-rs/snappy-darwin-x64": "7.1.1", - "@napi-rs/snappy-freebsd-x64": "7.1.1", - "@napi-rs/snappy-linux-arm-gnueabihf": "7.1.1", - "@napi-rs/snappy-linux-arm64-gnu": "7.1.1", - "@napi-rs/snappy-linux-arm64-musl": "7.1.1", - "@napi-rs/snappy-linux-x64-gnu": "7.1.1", - "@napi-rs/snappy-linux-x64-musl": "7.1.1", - "@napi-rs/snappy-win32-arm64-msvc": "7.1.1", - "@napi-rs/snappy-win32-ia32-msvc": "7.1.1", - "@napi-rs/snappy-win32-x64-msvc": "7.1.1" - } - }, - "../../../common/node_modules/socks": { - "version": "2.7.1", - "license": "MIT", - "optional": true, - "dependencies": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" - } - }, - "../../../common/node_modules/socks-proxy-agent": { - "version": "6.2.1", - "license": "MIT", - "optional": true, - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, - "../../../common/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../../../common/node_modules/sqlite3": { - "version": "5.1.6", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.0", - "node-addon-api": "^4.2.0", - "tar": "^6.1.11" - }, - "optionalDependencies": { - "node-gyp": "8.x" - }, - "peerDependencies": { - "node-gyp": "8.x" - }, - "peerDependenciesMeta": { - "node-gyp": { - "optional": true - } - } - }, - "../../../common/node_modules/sqlstring": { - "version": "2.3.3", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/ssri": { - "version": "8.0.1", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.1.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/stack-trace": { - "version": "0.0.10", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "../../../common/node_modules/statuses": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/string_decoder": { - "version": "1.3.0", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "../../../common/node_modules/string-width": { - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/supports-color": { - "version": "5.5.0", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/tar": { - "version": "6.1.13", - "license": "ISC", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^4.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/tar/node_modules/minipass": { - "version": "4.2.8", - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/text-hex": { - "version": "1.0.0", - "license": "MIT" - }, - "../../../common/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../../../common/node_modules/thenify": { - "version": "3.3.1", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "../../../common/node_modules/thenify-all": { - "version": "1.6.0", - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "../../../common/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../../../common/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../../../common/node_modules/toidentifier": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "../../../common/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "../../../common/node_modules/triple-beam": { - "version": "1.3.0", - "license": "MIT" - }, - "../../../common/node_modules/ts-api-utils": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16.13.0" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "../../../common/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../../../common/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../../../common/node_modules/type-is": { - "version": "1.6.18", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../../../common/node_modules/typeorm": { - "version": "0.3.17", - "license": "MIT", - "dependencies": { - "@sqltools/formatter": "^1.2.5", - "app-root-path": "^3.1.0", - "buffer": "^6.0.3", - "chalk": "^4.1.2", - "cli-highlight": "^2.1.11", - "date-fns": "^2.29.3", - "debug": "^4.3.4", - "dotenv": "^16.0.3", - "glob": "^8.1.0", - "mkdirp": "^2.1.3", - "reflect-metadata": "^0.1.13", - "sha.js": "^2.4.11", - "tslib": "^2.5.0", - "uuid": "^9.0.0", - "yargs": "^17.6.2" - }, - "bin": { - "typeorm": "cli.js", - "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js", - "typeorm-ts-node-esm": "cli-ts-node-esm.js" - }, - "engines": { - "node": ">= 12.9.0" - }, - "funding": { - "url": "https://opencollective.com/typeorm" - }, - "peerDependencies": { - "@google-cloud/spanner": "^5.18.0", - "@sap/hana-client": "^2.12.25", - "better-sqlite3": "^7.1.2 || ^8.0.0", - "hdb-pool": "^0.1.6", - "ioredis": "^5.0.4", - "mongodb": "^5.2.0", - "mssql": "^9.1.1", - "mysql2": "^2.2.5 || ^3.0.1", - "oracledb": "^5.1.0", - "pg": "^8.5.1", - "pg-native": "^3.0.0", - "pg-query-stream": "^4.0.0", - "redis": "^3.1.1 || ^4.0.0", - "sql.js": "^1.4.0", - "sqlite3": "^5.0.3", - "ts-node": "^10.7.0", - "typeorm-aurora-data-api-driver": "^2.0.0" - }, - "peerDependenciesMeta": { - "@google-cloud/spanner": { - "optional": true - }, - "@sap/hana-client": { - "optional": true - }, - "better-sqlite3": { - "optional": true - }, - "hdb-pool": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "mongodb": { - "optional": true - }, - "mssql": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "oracledb": { - "optional": true - }, - "pg": { - "optional": true - }, - "pg-native": { - "optional": true - }, - "pg-query-stream": { - "optional": true - }, - "redis": { - "optional": true - }, - "sql.js": { - "optional": true - }, - "sqlite3": { - "optional": true - }, - "ts-node": { - "optional": true - }, - "typeorm-aurora-data-api-driver": { - "optional": true - } - } - }, - "../../../common/node_modules/typeorm/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/typeorm/node_modules/brace-expansion": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../../../common/node_modules/typeorm/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../../../common/node_modules/typeorm/node_modules/cliui": { - "version": "8.0.1", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/typeorm/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/typeorm/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../common/node_modules/typeorm/node_modules/glob": { - "version": "8.1.0", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/typeorm/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/typeorm/node_modules/minimatch": { - "version": "5.1.6", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/typeorm/node_modules/mkdirp": { - "version": "2.1.6", - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../../../common/node_modules/typeorm/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../../../common/node_modules/typeorm/node_modules/tslib": { - "version": "2.5.0", - "license": "0BSD" - }, - "../../../common/node_modules/typeorm/node_modules/yargs": { - "version": "17.7.1", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/typeorm/node_modules/yargs-parser": { - "version": "21.1.1", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../../../common/node_modules/typescript": { - "version": "5.2.2", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../../../common/node_modules/unique-filename": { - "version": "1.1.1", - "license": "ISC", - "optional": true, - "dependencies": { - "unique-slug": "^2.0.0" - } - }, - "../../../common/node_modules/unique-slug": { - "version": "2.0.2", - "license": "ISC", - "optional": true, - "dependencies": { - "imurmurhash": "^0.1.4" - } - }, - "../../../common/node_modules/unpipe": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/uri-js": { - "version": "4.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../../../common/node_modules/url-polyfill": { - "version": "1.1.12", - "license": "MIT" - }, - "../../../common/node_modules/util-deprecate": { - "version": "1.0.2", - "license": "MIT" - }, - "../../../common/node_modules/utils-merge": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "../../../common/node_modules/uuid": { - "version": "9.0.0", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../../../common/node_modules/vary": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../../../common/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "../../../common/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "../../../common/node_modules/which": { - "version": "2.0.2", - "devOptional": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../../../common/node_modules/wide-align": { - "version": "1.1.5", - "license": "ISC", - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "../../../common/node_modules/winston": { - "version": "3.10.0", - "license": "MIT", - "dependencies": { - "@colors/colors": "1.5.0", - "@dabh/diagnostics": "^2.0.2", - "async": "^3.2.3", - "is-stream": "^2.0.0", - "logform": "^2.4.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "safe-stable-stringify": "^2.3.1", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.5.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "../../../common/node_modules/winston-loki": { - "version": "6.0.7", - "license": "MIT", - "dependencies": { - "async-exit-hook": "2.0.1", - "btoa": "^1.2.1", - "protobufjs": "^7.2.4", - "url-polyfill": "^1.1.12", - "winston-transport": "^4.3.0" - }, - "optionalDependencies": { - "snappy": "7.1.1" - } - }, - "../../../common/node_modules/winston-transport": { - "version": "4.5.0", - "license": "MIT", - "dependencies": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", - "triple-beam": "^1.3.0" - }, - "engines": { - "node": ">= 6.4.0" - } - }, - "../../../common/node_modules/workerpool": { - "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" - }, - "../../../common/node_modules/wrap-ansi": { - "version": "7.0.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../../../common/node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../../../common/node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../../../common/node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "../../../common/node_modules/wrappy": { - "version": "1.0.2", - "license": "ISC" - }, - "../../../common/node_modules/y18n": { - "version": "5.0.8", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, - "../../../common/node_modules/yargs": { - "version": "16.2.0", - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yargs-parser": { - "version": "20.2.4", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yargs-unparser": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../../../common/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../common": { - "name": "@crosslab/booking-service-common", - "version": "0.0.1", - "license": "Apache-2.0", - "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0" - }, - "devDependencies": { - "@types/node": "^20.5.9", - "prettier": "^3.0.3", - "typescript": "^5.2.2" - } - }, - "../common/node_modules/@babel/code-frame": { - "version": "7.22.13", - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/generator": { - "version": "7.17.7", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.22.15", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.22.15", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.22.15", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.15", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/highlight": { - "version": "7.22.13", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/parser": { - "version": "7.22.16", - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../common/node_modules/@babel/template": { - "version": "7.22.15", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.22.15", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/traverse": { - "version": "7.17.3", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@babel/types": { - "version": "7.17.0", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../common/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "../common/node_modules/@types/node": { - "version": "20.5.9", - "dev": true, - "license": "MIT" - }, - "../common/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../common/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../common/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../common/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "../common/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../common/node_modules/escape-string-regexp": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../common/node_modules/globals": { - "version": "11.12.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../common/node_modules/has-flag": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../common/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "license": "MIT" - }, - "../common/node_modules/js-tokens": { - "version": "4.0.0", - "license": "MIT" - }, - "../common/node_modules/jsesc": { - "version": "2.5.2", - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../common/node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "../common/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../common/node_modules/prettier": { - "version": "3.0.3", - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../common/node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../common/node_modules/supports-color": { - "version": "5.5.0", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../common/node_modules/to-fast-properties": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../common/node_modules/typescript": { - "version": "5.2.2", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../device-reservation": { - "name": "@crosslab/service-device-reservation", - "version": "0.1.0", - "license": "Apache-2.0", - "dependencies": { - "@crosslab/booking-service-common": "file:../common", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "amqplib": "^0.10.0", - "async-mutex": "^0.4.0", - "dayjs": "^1.11.5", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" - }, - "devDependencies": { - "@types/mocha": "^10.0.0", - "mocha": "^10.0.0", - "mocha-suppress-logs": "^0.3.1", - "nyc": "^15.1.0", - "prettier": "^3.0.3" - } - }, - "../device-reservation/node_modules/@acuminous/bitsyntax": { - "version": "0.1.2", - "license": "MIT", - "dependencies": { - "buffer-more-ints": "~1.0.0", - "debug": "^4.3.4", - "safe-buffer": "~5.1.2" - }, - "engines": { - "node": ">=0.8" - } - }, - "../device-reservation/node_modules/@ampproject/remapping": { - "version": "2.2.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@babel/code-frame": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/compat-data": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/core": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.9", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "../device-reservation/node_modules/@babel/generator": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-compilation-targets": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../device-reservation/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "../device-reservation/node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../device-reservation/node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helpers": { - "version": "7.22.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/highlight": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/parser": { - "version": "7.22.7", - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@babel/template": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/traverse": { - "version": "7.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/types": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "../device-reservation/node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "../device-reservation/node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/generator": { - "version": "7.17.7", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse": { - "version": "7.17.3", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/types": { - "version": "7.17.0", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@trivago/prettier-plugin-sort-imports/node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../device-reservation/node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" - }, - "../device-reservation/node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "@acuminous/bitsyntax": "^0.1.2", - "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", - "url-parse": "~1.5.10" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../device-reservation/node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/append-transform": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/archy": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../device-reservation/node_modules/async-mutex": { - "version": "0.4.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "../device-reservation/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/binary-extensions": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../device-reservation/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/browser-stdout": { - "version": "1.3.1", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/browserslist": { - "version": "4.21.9", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../device-reservation/node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" - }, - "../device-reservation/node_modules/caching-transform": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/caniuse-lite": { - "version": "1.0.30001516", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "../device-reservation/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../device-reservation/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../device-reservation/node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../device-reservation/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../device-reservation/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../device-reservation/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" - }, - "../device-reservation/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../device-reservation/node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/default-require-extensions": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, - "../device-reservation/node_modules/diff": { - "version": "5.0.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../device-reservation/node_modules/electron-to-chromium": { - "version": "1.4.461", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "../device-reservation/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/flat": { - "version": "5.0.2", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "../device-reservation/node_modules/foreground-child": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../device-reservation/node_modules/fromentries": { - "version": "1.3.2", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../device-reservation/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../device-reservation/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../device-reservation/node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "../device-reservation/node_modules/glob": { - "version": "7.2.0", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../device-reservation/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../device-reservation/node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../device-reservation/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../device-reservation/node_modules/globals": { - "version": "11.12.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "../device-reservation/node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../device-reservation/node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../device-reservation/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../device-reservation/node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../device-reservation/node_modules/is-plain-obj": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT" - }, - "../device-reservation/node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "../device-reservation/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-report": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/istanbul-reports": { - "version": "3.1.5", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "license": "MIT" - }, - "../device-reservation/node_modules/js-tokens": { - "version": "4.0.0", - "license": "MIT" - }, - "../device-reservation/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../device-reservation/node_modules/jsesc": { - "version": "2.5.2", - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "../device-reservation/node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/long": { - "version": "5.2.3", - "license": "Apache-2.0" - }, - "../device-reservation/node_modules/lru-cache": { - "version": "8.0.5", - "license": "ISC", - "engines": { - "node": ">=16.14" - } - }, - "../device-reservation/node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/minimatch": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/mocha": { - "version": "10.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "../device-reservation/node_modules/mocha-suppress-logs": { - "version": "0.3.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/mysql2": { - "version": "3.6.0", - "license": "MIT", - "dependencies": { - "denque": "^2.1.0", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^5.2.1", - "lru-cache": "^8.0.0", - "named-placeholders": "^1.1.3", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../device-reservation/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../device-reservation/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../device-reservation/node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../device-reservation/node_modules/node-preload": { - "version": "0.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/node-releases": { - "version": "2.0.13", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/nyc": { - "version": "15.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "../device-reservation/node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "../device-reservation/node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../device-reservation/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/p-map": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../device-reservation/node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/prettier": { - "version": "3.0.3", - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../device-reservation/node_modules/process-on-spawn": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/querystringify": { - "version": "2.2.0", - "license": "MIT" - }, - "../device-reservation/node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "../device-reservation/node_modules/readable-stream": { - "version": "1.1.14", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "../device-reservation/node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "../device-reservation/node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/require-main-filename": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/requires-port": { - "version": "1.0.0", - "license": "MIT" - }, - "../device-reservation/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../device-reservation/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../device-reservation/node_modules/seq-queue": { - "version": "0.0.5" - }, - "../device-reservation/node_modules/serialize-javascript": { - "version": "6.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "../device-reservation/node_modules/set-blocking": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/spawn-wrap": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "../device-reservation/node_modules/sqlstring": { - "version": "2.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../device-reservation/node_modules/string_decoder": { - "version": "0.10.31", - "license": "MIT" - }, - "../device-reservation/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "../device-reservation/node_modules/test-exclude": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../device-reservation/node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../device-reservation/node_modules/to-fast-properties": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../device-reservation/node_modules/tslib": { - "version": "2.6.0", - "license": "0BSD" - }, - "../device-reservation/node_modules/type-fest": { - "version": "0.8.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "../device-reservation/node_modules/typescript": { - "version": "5.2.2", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../device-reservation/node_modules/update-browserslist-db": { - "version": "1.0.11", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "../device-reservation/node_modules/url-parse": { - "version": "1.5.10", - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "../device-reservation/node_modules/uuid": { - "version": "8.3.2", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../device-reservation/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/which-module": { - "version": "2.0.1", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/workerpool": { - "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" - }, - "../device-reservation/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../device-reservation/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/write-file-atomic": { - "version": "3.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "../device-reservation/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs": { - "version": "16.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-parser": { - "version": "20.2.4", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-unparser": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../test_common": { - "name": "@crosslab/booking-service-test-common", - "version": "0.0.1", - "license": "Apache-2.0", - "dependencies": { - "@crosslab/booking-service-common": "file:../common", - "@crosslab/service-device-reservation": "file:../device-reservation", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "@types/express": "^4.17.13", - "amqplib": "^0.10.3", - "dayjs": "^1.11.5", - "express": "^4.18.1", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" - }, - "devDependencies": { - "node-mocks-http": "^1.14.1", - "prettier": "^3.0.3" - } - }, - "../test_common/node_modules/@acuminous/bitsyntax": { - "version": "0.1.2", - "license": "MIT", - "dependencies": { - "buffer-more-ints": "~1.0.0", - "debug": "^4.3.4", - "safe-buffer": "~5.1.2" - }, - "engines": { - "node": ">=0.8" - } - }, - "../test_common/node_modules/@babel/code-frame": { - "version": "7.22.13", - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/generator": { - "version": "7.17.7", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.22.15", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.22.15", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.22.15", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.15", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/highlight": { - "version": "7.22.13", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/parser": { - "version": "7.22.16", - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../test_common/node_modules/@babel/template": { - "version": "7.22.15", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.22.15", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/traverse": { - "version": "7.17.3", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@babel/types": { - "version": "7.17.0", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../test_common/node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true - }, - "../test_common/node_modules/@crosslab/service-device-reservation": { - "resolved": "../device-reservation", - "link": true - }, - "../test_common/node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "../test_common/node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/body-parser": { - "version": "1.19.2", - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/connect": { - "version": "3.4.35", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/express": { - "version": "4.17.21", - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "../test_common/node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "../test_common/node_modules/@types/http-errors": { - "version": "2.0.1", - "license": "MIT" - }, - "../test_common/node_modules/@types/mime": { - "version": "1.3.2", - "license": "MIT" - }, - "../test_common/node_modules/@types/node": { - "version": "20.11.20", - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "../test_common/node_modules/@types/qs": { - "version": "6.9.7", - "license": "MIT" - }, - "../test_common/node_modules/@types/range-parser": { - "version": "1.2.4", - "license": "MIT" - }, - "../test_common/node_modules/@types/send": { - "version": "0.17.1", - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "../test_common/node_modules/@types/serve-static": { - "version": "1.15.2", - "license": "MIT", - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, - "../test_common/node_modules/accepts": { - "version": "1.3.8", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "@acuminous/bitsyntax": "^0.1.2", - "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", - "url-parse": "~1.5.10" - }, - "engines": { - "node": ">=10" - } - }, - "../test_common/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../test_common/node_modules/array-flatten": { - "version": "1.1.1", - "license": "MIT" - }, - "../test_common/node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../test_common/node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" - }, - "../test_common/node_modules/bytes": { - "version": "3.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../test_common/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../test_common/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "../test_common/node_modules/content-disposition": { - "version": "0.5.4", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../test_common/node_modules/content-type": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/cookie-signature": { - "version": "1.0.6", - "license": "MIT" - }, - "../test_common/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../test_common/node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" - }, - "../test_common/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../test_common/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, - "../test_common/node_modules/depd": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/destroy": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "../test_common/node_modules/ee-first": { - "version": "1.1.1", - "license": "MIT" - }, - "../test_common/node_modules/encodeurl": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/escape-html": { - "version": "1.0.3", - "license": "MIT" - }, - "../test_common/node_modules/escape-string-regexp": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../test_common/node_modules/etag": { - "version": "1.8.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/express": { - "version": "4.18.2", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "../test_common/node_modules/express/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/express/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/express/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../test_common/node_modules/finalhandler": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/forwarded": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/fresh": { - "version": "0.5.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "../test_common/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../test_common/node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/globals": { - "version": "11.12.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../test_common/node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "../test_common/node_modules/has-flag": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../test_common/node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/has-symbols": { - "version": "1.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/http-errors": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../test_common/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../test_common/node_modules/ipaddr.js": { - "version": "1.9.1", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "../test_common/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT" - }, - "../test_common/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "../test_common/node_modules/javascript-natural-sort": { - "version": "0.7.1", - "license": "MIT" - }, - "../test_common/node_modules/js-tokens": { - "version": "4.0.0", - "license": "MIT" - }, - "../test_common/node_modules/jsesc": { - "version": "2.5.2", - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../test_common/node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "../test_common/node_modules/long": { - "version": "5.2.3", - "license": "Apache-2.0" - }, - "../test_common/node_modules/lru-cache": { - "version": "8.0.5", - "license": "ISC", - "engines": { - "node": ">=16.14" - } - }, - "../test_common/node_modules/media-typer": { - "version": "0.3.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/merge-descriptors": { - "version": "1.0.1", - "license": "MIT" - }, - "../test_common/node_modules/methods": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/mime": { - "version": "1.6.0", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "../test_common/node_modules/mime-db": { - "version": "1.52.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../test_common/node_modules/mysql2": { - "version": "3.6.0", - "license": "MIT", - "dependencies": { - "denque": "^2.1.0", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^5.2.1", - "lru-cache": "^8.0.0", - "named-placeholders": "^1.1.3", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../test_common/node_modules/mysql2/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../test_common/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../test_common/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../test_common/node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/node-mocks-http": { - "version": "1.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/express": "^4.17.21", - "@types/node": "^20.10.6", - "accepts": "^1.3.7", - "content-disposition": "^0.5.3", - "depd": "^1.1.0", - "fresh": "^0.5.2", - "merge-descriptors": "^1.0.1", - "methods": "^1.1.2", - "mime": "^1.3.4", - "parseurl": "^1.3.3", - "range-parser": "^1.2.0", - "type-is": "^1.6.18" - }, - "engines": { - "node": ">=14" - } - }, - "../test_common/node_modules/node-mocks-http/node_modules/depd": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/on-finished": { - "version": "2.4.1", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/parseurl": { - "version": "1.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/path-to-regexp": { - "version": "0.1.7", - "license": "MIT" - }, - "../test_common/node_modules/prettier": { - "version": "3.0.3", - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../test_common/node_modules/proxy-addr": { - "version": "2.0.7", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "../test_common/node_modules/qs": { - "version": "6.11.0", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/querystringify": { - "version": "2.2.0", - "license": "MIT" - }, - "../test_common/node_modules/range-parser": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/readable-stream": { - "version": "1.1.14", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "../test_common/node_modules/requires-port": { - "version": "1.0.0", - "license": "MIT" - }, - "../test_common/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../test_common/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../test_common/node_modules/send": { - "version": "0.18.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../test_common/node_modules/send/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "../test_common/node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "../test_common/node_modules/send/node_modules/ms": { - "version": "2.1.3", - "license": "MIT" - }, - "../test_common/node_modules/seq-queue": { - "version": "0.0.5" - }, - "../test_common/node_modules/serve-static": { - "version": "1.15.0", - "license": "MIT", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../test_common/node_modules/setprototypeof": { - "version": "1.2.0", - "license": "ISC" - }, - "../test_common/node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../test_common/node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../test_common/node_modules/sqlstring": { - "version": "2.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/statuses": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/string_decoder": { - "version": "0.10.31", - "license": "MIT" - }, - "../test_common/node_modules/supports-color": { - "version": "5.5.0", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../test_common/node_modules/to-fast-properties": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../test_common/node_modules/toidentifier": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "../test_common/node_modules/type-is": { - "version": "1.6.18", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../test_common/node_modules/typescript": { - "version": "5.2.2", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../test_common/node_modules/undici-types": { - "version": "5.26.5", - "license": "MIT" - }, - "../test_common/node_modules/unpipe": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "../test_common/node_modules/url-parse": { - "version": "1.5.10", - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "../test_common/node_modules/utils-merge": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "../test_common/node_modules/vary": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.22.7", - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/template": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "node_modules/@cross-lab-project/api-client": { - "resolved": "../../../../clients/api/js", - "link": true - }, - "node_modules/@cross-lab-project/codegen-typescript-addon": { - "resolved": "../../../../helper/crosslab-typescript-addon", - "link": true - }, - "node_modules/@cross-lab-project/openapi-codegen": { - "resolved": "../../../../helper/openapi-codegeneration", - "link": true - }, - "node_modules/@cross-lab-project/service-common": { - "resolved": "../../../common", - "link": true - }, - "node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true - }, - "node_modules/@crosslab/booking-service-test-common": { - "resolved": "../test_common", - "link": true - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, - "node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "license": "Apache-2.0", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/generator": { - "version": "7.17.7", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse": { - "version": "7.17.3", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/types": { - "version": "7.17.0", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", + "node_modules/@trivago/prettier-plugin-sort-imports": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", + "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", "dependencies": { - "ms": "2.1.2" + "@babel/generator": "7.17.7", + "@babel/parser": "^7.20.5", + "@babel/traverse": "7.23.2", + "@babel/types": "7.17.0", + "javascript-natural-sort": "0.7.1", + "lodash": "^4.17.21" }, - "engines": { - "node": ">=6.0" + "peerDependencies": { + "@vue/compiler-sfc": "3.x", + "prettier": "2.x - 3.x" }, "peerDependenciesMeta": { - "supports-color": { + "@vue/compiler-sfc": { "optional": true } } }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@types/body-parser": { - "version": "1.19.2", - "license": "MIT", + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", "dependencies": { "@types/connect": "*", "@types/node": "*" } }, "node_modules/@types/connect": { - "version": "3.4.35", - "license": "MIT", + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/express": { "version": "4.17.21", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -17127,8 +666,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "license": "MIT", + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz", + "integrity": "sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg==", "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -17137,8 +677,9 @@ } }, "node_modules/@types/http-errors": { - "version": "2.0.1", - "license": "MIT" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", @@ -17147,53 +688,62 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.14.198", - "license": "MIT" + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==" }, "node_modules/@types/mime": { - "version": "1.3.2", - "license": "MIT" + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", + "dev": true }, "node_modules/@types/node": { - "version": "20.11.19", - "license": "MIT", + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@types/qs": { - "version": "6.9.7", - "license": "MIT" + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" }, "node_modules/@types/range-parser": { - "version": "1.2.4", - "license": "MIT" + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" }, "node_modules/@types/send": { - "version": "0.17.1", - "license": "MIT", + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", "dependencies": { "@types/mime": "^1", "@types/node": "*" } }, "node_modules/@types/serve-static": { - "version": "1.15.2", - "license": "MIT", + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dependencies": { "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" + "@types/node": "*", + "@types/send": "*" } }, "node_modules/accepts": { "version": "1.3.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -17203,13 +753,14 @@ } }, "node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "uri-js": "^4.4.1" }, "funding": { "type": "github", @@ -17217,8 +768,9 @@ } }, "node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", "dependencies": { "ajv": "^8.0.0" }, @@ -17233,38 +785,38 @@ }, "node_modules/ansi-colors": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-regex": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dependencies": { - "color-convert": "^2.0.1" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=4" } }, "node_modules/anymatch": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, - "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -17275,32 +827,40 @@ }, "node_modules/argparse": { "version": "2.0.1", - "dev": true, - "license": "Python-2.0" + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-flatten": { "version": "1.1.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/balanced-match": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/binary-extensions": { - "version": "2.2.0", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -17308,7 +868,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -17317,20 +877,35 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/braces": { - "version": "3.0.2", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, - "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -17338,20 +913,22 @@ }, "node_modules/browser-stdout": { "version": "1.3.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true }, "node_modules/bytes": { "version": "3.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "engines": { "node": ">= 0.8" } }, "node_modules/c8": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", - "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", + "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -17361,7 +938,7 @@ "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", - "test-exclude": "^6.0.0", + "test-exclude": "^7.0.1", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" @@ -17370,117 +947,64 @@ "c8": "bin/c8.js" }, "engines": { - "node": ">=14.14.0" - } - }, - "node_modules/c8/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/c8/node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" + "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/c8/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" + "peerDependencies": { + "monocart-coverage-reports": "^2" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "peerDependenciesMeta": { + "monocart-coverage-reports": { + "optional": true + } } }, - "node_modules/c8/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" }, "engines": { - "node": ">=12" - } - }, - "node_modules/c8/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/chalk": { - "version": "4.1.2", + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": { - "has-flag": "^4.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/chokidar": { "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "funding": [ { @@ -17488,7 +1012,6 @@ "url": "https://paulmillr.com/funding/" } ], - "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -17506,47 +1029,45 @@ } }, "node_modules/cliui": { - "version": "7.0.4", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "color-name": "1.1.3" } }, "node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/commander": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/content-disposition": { "version": "0.5.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dependencies": { "safe-buffer": "5.2.1" }, @@ -17556,26 +1077,36 @@ }, "node_modules/content-type": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "engines": { "node": ">= 0.6" } }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } }, "node_modules/cookie-signature": { "version": "1.0.6", - "license": "MIT" + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -17586,33 +1117,74 @@ } }, "node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" + "version": "1.11.11", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", + "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" }, "node_modules/debug": { - "version": "2.6.9", - "license": "MIT", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { - "ms": "2.0.0" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/denque": { "version": "2.1.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", "engines": { "node": ">=0.10" } }, "node_modules/depd": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "engines": { "node": ">= 0.8" } }, "node_modules/destroy": { "version": "1.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -17620,32 +1192,43 @@ }, "node_modules/diff": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ee-first": { "version": "1.1.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/emoji-regex": { "version": "8.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/encodeurl": { "version": "1.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "engines": { "node": ">= 0.8" } }, "node_modules/env-cmd": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/env-cmd/-/env-cmd-10.1.0.tgz", + "integrity": "sha512-mMdWTT9XKN7yNth/6N6g2GuKuJTsKMDHlQFUDacb/heQRRWOTIZ42t1rMHnQu4jYxU1ajdTeJM+9eEETlqToMA==", "dev": true, - "license": "MIT", "dependencies": { "commander": "^4.0.0", "cross-spawn": "^7.0.0" @@ -17657,46 +1240,66 @@ "node": ">=8.0.0" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { - "version": "3.1.1", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-html": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.8.0" } }, "node_modules/etag": { "version": "1.8.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "engines": { "node": ">= 0.6" } }, "node_modules/express": { - "version": "4.18.2", - "license": "MIT", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -17727,14 +1330,29 @@ "node": ">= 0.10.0" } }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fill-range": { - "version": "7.0.1", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -17744,7 +1362,8 @@ }, "node_modules/finalhandler": { "version": "1.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -17758,10 +1377,24 @@ "node": ">= 0.8" } }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -17775,77 +1408,123 @@ }, "node_modules/flat": { "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, - "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } }, + "node_modules/foreground-child": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz", + "integrity": "sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/forwarded": { "version": "0.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "engines": { "node": ">= 0.6" } }, "node_modules/fresh": { "version": "0.5.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "engines": { "node": ">= 0.6" } }, "node_modules/fs.realpath": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, - "license": "ISC" + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, "node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/generate-function": { "version": "2.3.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", "dependencies": { "is-property": "^1.0.2" } }, "node_modules/get-caller-file": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/glob": { - "version": "7.2.0", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -17853,8 +1532,9 @@ }, "node_modules/glob-parent": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -17862,54 +1542,48 @@ "node": ">= 6" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/globals": { "version": "11.12.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "engines": { "node": ">=4" } }, - "node_modules/has": { - "version": "1.0.3", - "license": "MIT", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dependencies": { - "function-bind": "^1.1.1" + "get-intrinsic": "^1.1.3" }, - "engines": { - "node": ">= 0.4.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { - "node": ">=8" + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -17919,7 +1593,8 @@ }, "node_modules/has-symbols": { "version": "1.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "engines": { "node": ">= 0.4" }, @@ -17927,22 +1602,36 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, - "license": "MIT", "bin": { "he": "bin/he" } }, "node_modules/html-escaper": { "version": "2.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, "node_modules/http-errors": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -17956,7 +1645,8 @@ }, "node_modules/iconv-lite": { "version": "0.4.24", - "license": "MIT", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -17966,8 +1656,10 @@ }, "node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -17975,19 +1667,22 @@ }, "node_modules/inherits": { "version": "2.0.4", - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ipaddr.js": { "version": "1.9.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "engines": { "node": ">= 0.10" } }, "node_modules/is-binary-path": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -17997,24 +1692,27 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -18024,28 +1722,32 @@ }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/is-plain-obj": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-property": { "version": "1.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" }, "node_modules/is-unicode-supported": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -18055,13 +1757,15 @@ }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=8" } @@ -18080,52 +1784,20 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-report/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report/node_modules/make-dir": { + "node_modules/istanbul-lib-report/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/istanbul-lib-report/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, "engines": { - "node": ">=10" + "node": ">=8" } }, "node_modules/istanbul-lib-report/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -18146,18 +1818,39 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/javascript-natural-sort": { "version": "0.7.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", + "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==" }, "node_modules/js-tokens": { "version": "4.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -18167,7 +1860,8 @@ }, "node_modules/jsesc": { "version": "2.5.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "bin": { "jsesc": "bin/jsesc" }, @@ -18177,12 +1871,14 @@ }, "node_modules/json-schema-traverse": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -18195,12 +1891,14 @@ }, "node_modules/lodash": { "version": "4.17.21", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/log-symbols": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -18212,38 +1910,129 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/long": { "version": "5.2.3", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, "node_modules/lru-cache": { "version": "8.0.5", - "license": "ISC", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", + "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", "engines": { "node": ">=16.14" } }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/media-typer": { "version": "0.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "engines": { "node": ">= 0.6" } }, "node_modules/merge-descriptors": { "version": "1.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "node_modules/methods": { "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "engines": { "node": ">= 0.6" } }, "node_modules/mime": { "version": "1.6.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "bin": { "mime": "cli.js" }, @@ -18253,14 +2042,16 @@ }, "node_modules/mime-db": { "version": "1.52.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { "mime-db": "1.52.0" }, @@ -18270,8 +2061,9 @@ }, "node_modules/minimatch": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -18279,10 +2071,20 @@ "node": ">=10" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mocha": { - "version": "10.2.0", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", @@ -18291,13 +2093,12 @@ "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.2.0", + "glob": "8.1.0", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", @@ -18312,16 +2113,24 @@ }, "engines": { "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, "node_modules/mocha/node_modules/debug": { "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -18334,23 +2143,90 @@ } } }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", + "node_modules/mocha/node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, - "license": "MIT" + "engines": { + "node": ">=10" + } }, "node_modules/ms": { - "version": "2.0.0", - "license": "MIT" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mysql2": { - "version": "3.6.0", - "license": "MIT", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.1.tgz", + "integrity": "sha512-6zo1T3GILsXMCex3YEu7hCz2OXLUarxFsxvFcUHWMpkPtmZLeTTWgRdc1gWyNJiYt6AxITmIf9bZDRy/jAfWew==", "dependencies": { "denque": "^2.1.0", "generate-function": "^2.3.1", @@ -18367,7 +2243,8 @@ }, "node_modules/mysql2/node_modules/iconv-lite": { "version": "0.6.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -18377,7 +2254,8 @@ }, "node_modules/named-placeholders": { "version": "1.1.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", "dependencies": { "lru-cache": "^7.14.1" }, @@ -18387,47 +2265,41 @@ }, "node_modules/named-placeholders/node_modules/lru-cache": { "version": "7.18.3", - "license": "ISC", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "engines": { "node": ">=12" } }, - "node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/negotiator": { "version": "0.6.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "engines": { "node": ">= 0.6" } }, "node_modules/normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/on-finished": { "version": "2.4.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dependencies": { "ee-first": "1.1.1" }, @@ -18437,16 +2309,18 @@ }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -18459,8 +2333,9 @@ }, "node_modules/p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -18473,43 +2348,70 @@ }, "node_modules/parseurl": { "version": "1.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "engines": { "node": ">= 0.8" } }, "node_modules/path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/path-key": { - "version": "3.1.1", + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, - "license": "MIT", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "dev": true, + "engines": { + "node": "14 || >=16.14" } }, "node_modules/path-to-regexp": { "version": "0.1.7", - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "node_modules/picomatch": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -18518,8 +2420,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "license": "MIT", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -18532,7 +2435,8 @@ }, "node_modules/proxy-addr": { "version": "2.0.7", - "license": "MIT", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -18542,15 +2446,17 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } }, "node_modules/qs": { "version": "6.11.0", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dependencies": { "side-channel": "^1.0.4" }, @@ -18563,22 +2469,25 @@ }, "node_modules/randombytes": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/range-parser": { "version": "1.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "engines": { "node": ">= 0.6" } }, "node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -18591,8 +2500,9 @@ }, "node_modules/readdirp": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -18602,21 +2512,25 @@ }, "node_modules/require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/require-from-string": { "version": "2.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "engines": { "node": ">=0.10.0" } }, "node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "funding": [ { "type": "github", @@ -18630,16 +2544,29 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/safer-buffer": { "version": "2.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } }, "node_modules/send": { "version": "0.18.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -18659,24 +2586,42 @@ "node": ">= 0.8.0" } }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/send/node_modules/ms": { "version": "2.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/seq-queue": { - "version": "0.0.5" + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" }, "node_modules/serialize-javascript": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } }, "node_modules/serve-static": { "version": "1.15.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -18687,14 +2632,32 @@ "node": ">= 0.8.0" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", - "license": "ISC" + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -18704,42 +2667,86 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/sqlstring": { "version": "2.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", "engines": { "node": ">= 0.6" } }, "node_modules/statuses": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "engines": { "node": ">= 0.8" } }, "node_modules/string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -18751,8 +2758,22 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -18762,8 +2783,9 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -18772,63 +2794,80 @@ } }, "node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { - "has-flag": "^4.0.0" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">=4" } }, "node_modules/test-exclude": { - "version": "6.0.0", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, - "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", + "node_modules/test-exclude/node_modules/glob": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, - "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, - "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/to-fast-properties": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "engines": { "node": ">=4" } }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -18838,14 +2877,16 @@ }, "node_modules/toidentifier": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "engines": { "node": ">=0.6" } }, "node_modules/type-is": { "version": "1.6.18", - "license": "MIT", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -18855,8 +2896,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "license": "Apache-2.0", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -18867,25 +2909,29 @@ }, "node_modules/undici-types": { "version": "5.26.5", - "license": "MIT" + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/unpipe": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "engines": { "node": ">= 0.8" } }, "node_modules/uri-js": { "version": "4.4.1", - "license": "BSD-2-Clause", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/utils-merge": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "engines": { "node": ">= 0.4.0" } @@ -18904,23 +2950,19 @@ "node": ">=10.12.0" } }, - "node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, "node_modules/vary": { "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "engines": { "node": ">= 0.8" } }, "node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -18933,13 +2975,33 @@ }, "node_modules/workerpool": { "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true }, "node_modules/wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -18952,54 +3014,119 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { - "version": "16.2.0", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "license": "MIT", "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.4", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "license": "ISC", "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-unparser": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "license": "MIT", "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -19010,32 +3137,11 @@ "node": ">=10" } }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, diff --git a/services/booking/src/schedule-service/package.json b/services/booking/src/schedule-service/package.json index 960f7ccd..0db54b8d 100644 --- a/services/booking/src/schedule-service/package.json +++ b/services/booking/src/schedule-service/package.json @@ -24,7 +24,7 @@ "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/express": "^4.17.13", "@types/lodash": "^4.14.198", - "ajv-formats": "^2.1.1", + "ajv-formats": "^3.0.1", "dayjs": "^1.11.5", "express": "^4.18.1", "lodash": "^4.17.21", @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/mocha": "^10.0.0", - "c8": "^9.1.0", + "c8": "^10.1.0", "env-cmd": "^10.1.0", "mocha": "^10.0.0", "prettier": "^3.0.3" diff --git a/services/booking/src/test_common/package-lock.json b/services/booking/src/test_common/package-lock.json index f80f3e77..2884b77f 100644 --- a/services/booking/src/test_common/package-lock.json +++ b/services/booking/src/test_common/package-lock.json @@ -26,7 +26,6 @@ } }, "../common": { - "name": "@crosslab/booking-service-common", "version": "0.0.1", "license": "Apache-2.0", "dependencies": { @@ -38,2525 +37,31 @@ "typescript": "^5.2.2" } }, - "../common/node_modules/@types/node": { - "version": "20.4.2", - "dev": true, - "license": "MIT" - }, - "../common/node_modules/typescript": { - "version": "5.1.6", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../device-reservation": { - "name": "@crosslab/service-device-reservation", - "version": "0.1.0", - "license": "Apache-2.0", - "dependencies": { - "@crosslab/booking-service-common": "file:../common", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "amqplib": "^0.10.0", - "async-mutex": "^0.4.0", - "dayjs": "^1.11.5", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" - }, - "devDependencies": { - "@types/mocha": "^10.0.0", - "mocha": "^10.0.0", - "mocha-suppress-logs": "^0.3.1", - "nyc": "^15.1.0", - "prettier": "^3.0.3" - } - }, - "../device-reservation/node_modules/@acuminous/bitsyntax": { - "version": "0.1.2", - "license": "MIT", - "dependencies": { - "buffer-more-ints": "~1.0.0", - "debug": "^4.3.4", - "safe-buffer": "~5.1.2" - }, - "engines": { - "node": ">=0.8" - } - }, - "../device-reservation/node_modules/@ampproject/remapping": { - "version": "2.2.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@babel/code-frame": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/compat-data": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/core": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.9", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "../device-reservation/node_modules/@babel/generator": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-compilation-targets": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../device-reservation/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "../device-reservation/node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../device-reservation/node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/helpers": { - "version": "7.22.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/highlight": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/@babel/parser": { - "version": "7.22.7", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@babel/template": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/traverse": { - "version": "7.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@babel/types": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/@crosslab/booking-service-common": { - "resolved": "../common", - "link": true - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../device-reservation/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "../device-reservation/node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../device-reservation/node_modules/@types/mocha": { - "version": "10.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/@types/node": { - "version": "20.4.2", - "license": "MIT" - }, - "../device-reservation/node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "@acuminous/bitsyntax": "^0.1.2", - "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", - "url-parse": "~1.5.10" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../device-reservation/node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/append-transform": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/archy": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../device-reservation/node_modules/async-mutex": { - "version": "0.4.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "../device-reservation/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/binary-extensions": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../device-reservation/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/browser-stdout": { - "version": "1.3.1", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/browserslist": { - "version": "4.21.9", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../device-reservation/node_modules/buffer-more-ints": { - "version": "1.0.0", - "license": "MIT" - }, - "../device-reservation/node_modules/caching-transform": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/caniuse-lite": { - "version": "1.0.30001516", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "../device-reservation/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../device-reservation/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "../device-reservation/node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../device-reservation/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../device-reservation/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "../device-reservation/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" - }, - "../device-reservation/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../device-reservation/node_modules/decamelize": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/default-require-extensions": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/denque": { - "version": "2.1.0", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, - "../device-reservation/node_modules/diff": { - "version": "5.0.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../device-reservation/node_modules/electron-to-chromium": { - "version": "1.4.461", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "../device-reservation/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/flat": { - "version": "5.0.2", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "../device-reservation/node_modules/foreground-child": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../device-reservation/node_modules/fromentries": { - "version": "1.3.2", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../device-reservation/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.2" - } - }, - "../device-reservation/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../device-reservation/node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../device-reservation/node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "../device-reservation/node_modules/glob": { - "version": "7.2.0", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../device-reservation/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../device-reservation/node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../device-reservation/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../device-reservation/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/he": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "../device-reservation/node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../device-reservation/node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../device-reservation/node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "../device-reservation/node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../device-reservation/node_modules/is-plain-obj": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/is-property": { - "version": "1.0.2", - "license": "MIT" - }, - "../device-reservation/node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "../device-reservation/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-report": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/istanbul-reports": { - "version": "3.1.5", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../device-reservation/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/long": { - "version": "4.0.0", - "license": "Apache-2.0" - }, - "../device-reservation/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/minimatch": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/mocha": { - "version": "10.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "../device-reservation/node_modules/mocha-suppress-logs": { - "version": "0.3.1", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/mysql2": { - "version": "2.3.3", - "license": "MIT", - "dependencies": { - "denque": "^2.0.1", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "../device-reservation/node_modules/named-placeholders": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "../device-reservation/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../device-reservation/node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "../device-reservation/node_modules/node-preload": { - "version": "0.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/node-releases": { - "version": "2.0.13", - "dev": true, - "license": "MIT" - }, - "../device-reservation/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/nyc": { - "version": "15.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "../device-reservation/node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "../device-reservation/node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../device-reservation/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/p-map": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../device-reservation/node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../device-reservation/node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/process-on-spawn": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/querystringify": { - "version": "2.2.0", - "license": "MIT" - }, - "../device-reservation/node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "../device-reservation/node_modules/readable-stream": { - "version": "1.1.14", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "../device-reservation/node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "../device-reservation/node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/require-main-filename": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/requires-port": { - "version": "1.0.0", - "license": "MIT" - }, - "../device-reservation/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../device-reservation/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "../device-reservation/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../device-reservation/node_modules/seq-queue": { - "version": "0.0.5" - }, - "../device-reservation/node_modules/serialize-javascript": { - "version": "6.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "../device-reservation/node_modules/set-blocking": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../device-reservation/node_modules/spawn-wrap": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "../device-reservation/node_modules/sqlstring": { - "version": "2.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../device-reservation/node_modules/string_decoder": { - "version": "0.10.31", - "license": "MIT" - }, - "../device-reservation/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "../device-reservation/node_modules/test-exclude": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../device-reservation/node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../device-reservation/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../device-reservation/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../device-reservation/node_modules/tslib": { - "version": "2.6.0", - "license": "0BSD" - }, - "../device-reservation/node_modules/type-fest": { - "version": "0.8.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "../device-reservation/node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "../device-reservation/node_modules/typescript": { - "version": "4.9.5", + "../device-reservation": { + "version": "0.1.0", "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../device-reservation/node_modules/update-browserslist-db": { - "version": "1.0.11", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "../device-reservation/node_modules/url-parse": { - "version": "1.5.10", - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "../device-reservation/node_modules/uuid": { - "version": "8.3.2", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "../device-reservation/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../device-reservation/node_modules/which-module": { - "version": "2.0.1", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/workerpool": { - "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" - }, - "../device-reservation/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../device-reservation/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../device-reservation/node_modules/write-file-atomic": { - "version": "3.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "../device-reservation/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, - "../device-reservation/node_modules/yargs": { - "version": "16.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-parser": { - "version": "20.2.4", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-unparser": { - "version": "2.0.0", - "dev": true, - "license": "MIT", "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../device-reservation/node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../device-reservation/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" + "@crosslab/booking-service-common": "file:../common", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "amqplib": "^0.10.0", + "async-mutex": "^0.5.0", + "dayjs": "^1.11.5", + "mysql2": "^3.6.0", + "typescript": "^5.2.2" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "devDependencies": { + "@types/mocha": "^10.0.0", + "c8": "^10.1.0", + "mocha": "^10.0.0", + "mocha-suppress-logs": "^0.5.1", + "prettier": "^3.0.3" } }, "node_modules/@acuminous/bitsyntax": { "version": "0.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@acuminous/bitsyntax/-/bitsyntax-0.1.2.tgz", + "integrity": "sha512-29lUK80d1muEQqiUsSo+3A0yP6CdspgC95EnKBMi22Xlwt79i/En4Vr67+cXhU+cZjbti3TgGGC5wy1stIywVQ==", "dependencies": { "buffer-more-ints": "~1.0.0", "debug": "^4.3.4", @@ -2567,12 +72,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -2592,32 +97,48 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2625,23 +146,23 @@ } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2649,23 +170,23 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2673,38 +194,39 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.15.tgz", - "integrity": "sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", - "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.22.16", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.16.tgz", - "integrity": "sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -2713,25 +235,25 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.15.tgz", - "integrity": "sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2739,18 +261,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -2758,6 +280,33 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/types": { "version": "7.17.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", @@ -2778,14 +327,57 @@ "resolved": "../device-reservation", "link": true }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.0.tgz", - "integrity": "sha512-YBepjbt+ZNBVmN3ev1amQH3lWCmHyt5qTbLCp/syXJRu/Kw2koXh44qayB1gMRxcL/gV8egmjN5xWSrYyfUtyw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", + "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", "dependencies": { "@babel/generator": "7.17.7", "@babel/parser": "^7.20.5", - "@babel/traverse": "7.17.3", + "@babel/traverse": "7.23.2", "@babel/types": "7.17.0", "javascript-natural-sort": "0.7.1", "lodash": "^4.17.21" @@ -2801,23 +393,26 @@ } }, "node_modules/@types/amqplib": { - "version": "0.10.1", - "license": "MIT", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@types/amqplib/-/amqplib-0.10.5.tgz", + "integrity": "sha512-/cSykxROY7BWwDoi4Y4/jLAuZTshZxd8Ey1QYa/VaXriMotBDoou7V/twJiOSHzU6t1Kp1AHAUXGCgqq+6DNeg==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/body-parser": { - "version": "1.19.2", - "license": "MIT", + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", "dependencies": { "@types/connect": "*", "@types/node": "*" } }, "node_modules/@types/connect": { - "version": "3.4.35", - "license": "MIT", + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dependencies": { "@types/node": "*" } @@ -2834,8 +429,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "license": "MIT", + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz", + "integrity": "sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg==", "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -2844,49 +440,56 @@ } }, "node_modules/@types/http-errors": { - "version": "2.0.1", - "license": "MIT" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" }, "node_modules/@types/mime": { - "version": "1.3.2", - "license": "MIT" + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/node": { - "version": "20.11.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz", - "integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==", + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@types/qs": { - "version": "6.9.7", - "license": "MIT" + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" }, "node_modules/@types/range-parser": { - "version": "1.2.4", - "license": "MIT" + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" }, "node_modules/@types/send": { - "version": "0.17.1", - "license": "MIT", + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", "dependencies": { "@types/mime": "^1", "@types/node": "*" } }, "node_modules/@types/serve-static": { - "version": "1.15.2", - "license": "MIT", + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dependencies": { "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" + "@types/node": "*", + "@types/send": "*" } }, "node_modules/accepts": { "version": "1.3.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -2896,8 +499,9 @@ } }, "node_modules/amqplib": { - "version": "0.10.3", - "license": "MIT", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.10.4.tgz", + "integrity": "sha512-DMZ4eCEjAVdX1II2TfIUpJhfKAuoCeDIo/YyETbfAqehHTXxxs7WOOd+N1Xxr4cKhx12y23zk8/os98FxlZHrw==", "dependencies": { "@acuminous/bitsyntax": "^0.1.2", "buffer-more-ints": "~1.0.0", @@ -2921,14 +525,16 @@ }, "node_modules/array-flatten": { "version": "1.1.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -2936,7 +542,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -2947,32 +553,43 @@ }, "node_modules/body-parser/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/buffer-more-ints": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-1.0.0.tgz", + "integrity": "sha512-EMetuGFz5SLsT0QTnXzINh4Ksr+oo4i+UGTXEshiGCQWnsgSs7ZhJ8fzlwQ+OzEMs0MpDAMr1hxnblp5a4vcHg==" }, "node_modules/bytes": { "version": "3.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "engines": { "node": ">= 0.8" } }, "node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3006,7 +623,8 @@ }, "node_modules/content-disposition": { "version": "0.5.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dependencies": { "safe-buffer": "5.2.1" }, @@ -3016,6 +634,8 @@ }, "node_modules/content-disposition/node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "funding": [ { "type": "github", @@ -3029,38 +649,43 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/content-type": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "engines": { "node": ">= 0.6" } }, "node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } }, "node_modules/cookie-signature": { "version": "1.0.6", - "license": "MIT" + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/core-util-is": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/dayjs": { - "version": "1.11.9", - "license": "MIT" + "version": "1.11.11", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", + "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" }, "node_modules/debug": { - "version": "4.3.4", - "license": "MIT", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { "ms": "2.1.2" }, @@ -3073,23 +698,42 @@ } } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/denque": { "version": "2.1.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", "engines": { "node": ">=0.10" } }, "node_modules/depd": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "engines": { "node": ">= 0.8" } }, "node_modules/destroy": { "version": "1.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -3097,18 +741,40 @@ }, "node_modules/ee-first": { "version": "1.1.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/encodeurl": { "version": "1.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "engines": { "node": ">= 0.8" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escape-html": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "node_modules/escape-string-regexp": { "version": "1.0.5", @@ -3120,21 +786,23 @@ }, "node_modules/etag": { "version": "1.8.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "engines": { "node": ">= 0.6" } }, "node_modules/express": { - "version": "4.18.2", - "license": "MIT", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -3167,17 +835,21 @@ }, "node_modules/express/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/express/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/express/node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "funding": [ { "type": "github", @@ -3191,12 +863,12 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/finalhandler": { "version": "1.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -3212,48 +884,62 @@ }, "node_modules/finalhandler/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/forwarded": { "version": "0.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "engines": { "node": ">= 0.6" } }, "node_modules/fresh": { "version": "0.5.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "engines": { "node": ">= 0.6" } }, "node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/generate-function": { "version": "2.3.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", "dependencies": { "is-property": "^1.0.2" } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3267,14 +953,15 @@ "node": ">=4" } }, - "node_modules/has": { - "version": "1.0.3", - "license": "MIT", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dependencies": { - "function-bind": "^1.1.1" + "get-intrinsic": "^1.1.3" }, - "engines": { - "node": ">= 0.4.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-flag": { @@ -3285,9 +972,21 @@ "node": ">=4" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -3297,7 +996,8 @@ }, "node_modules/has-symbols": { "version": "1.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "engines": { "node": ">= 0.4" }, @@ -3305,9 +1005,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/http-errors": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -3321,7 +1033,8 @@ }, "node_modules/iconv-lite": { "version": "0.4.24", - "license": "MIT", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -3331,22 +1044,26 @@ }, "node_modules/inherits": { "version": "2.0.4", - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ipaddr.js": { "version": "1.9.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "engines": { "node": ">= 0.10" } }, "node_modules/is-property": { "version": "1.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" }, "node_modules/isarray": { "version": "0.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" }, "node_modules/javascript-natural-sort": { "version": "0.7.1", @@ -3389,25 +1106,29 @@ }, "node_modules/media-typer": { "version": "0.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "engines": { "node": ">= 0.6" } }, "node_modules/merge-descriptors": { "version": "1.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "node_modules/methods": { "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "engines": { "node": ">= 0.6" } }, "node_modules/mime": { "version": "1.6.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "bin": { "mime": "cli.js" }, @@ -3417,14 +1138,16 @@ }, "node_modules/mime-db": { "version": "1.52.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { "mime-db": "1.52.0" }, @@ -3434,12 +1157,13 @@ }, "node_modules/ms": { "version": "2.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mysql2": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.6.0.tgz", - "integrity": "sha512-EWUGAhv6SphezurlfI2Fpt0uJEWLmirrtQR7SkbTHFC+4/mJBrPiSzHESHKAWKG7ALVD6xaG/NBjjd1DGJGQQQ==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.1.tgz", + "integrity": "sha512-6zo1T3GILsXMCex3YEu7hCz2OXLUarxFsxvFcUHWMpkPtmZLeTTWgRdc1gWyNJiYt6AxITmIf9bZDRy/jAfWew==", "dependencies": { "denque": "^2.1.0", "generate-function": "^2.3.1", @@ -3456,7 +1180,8 @@ }, "node_modules/mysql2/node_modules/iconv-lite": { "version": "0.6.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -3466,7 +1191,8 @@ }, "node_modules/named-placeholders": { "version": "1.1.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", "dependencies": { "lru-cache": "^7.14.1" }, @@ -3476,14 +1202,16 @@ }, "node_modules/named-placeholders/node_modules/lru-cache": { "version": "7.18.3", - "license": "ISC", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "engines": { "node": ">=12" } }, "node_modules/negotiator": { "version": "0.6.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "engines": { "node": ">= 0.6" } @@ -3521,15 +1249,17 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/on-finished": { "version": "2.4.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dependencies": { "ee-first": "1.1.1" }, @@ -3539,19 +1269,26 @@ }, "node_modules/parseurl": { "version": "1.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "engines": { "node": ">= 0.8" } }, "node_modules/path-to-regexp": { "version": "0.1.7", - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -3564,7 +1301,8 @@ }, "node_modules/proxy-addr": { "version": "2.0.7", - "license": "MIT", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -3575,7 +1313,8 @@ }, "node_modules/qs": { "version": "6.11.0", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dependencies": { "side-channel": "^1.0.4" }, @@ -3588,18 +1327,21 @@ }, "node_modules/querystringify": { "version": "2.2.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, "node_modules/range-parser": { "version": "1.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "engines": { "node": ">= 0.6" } }, "node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -3612,7 +1354,8 @@ }, "node_modules/readable-stream": { "version": "1.1.14", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -3622,19 +1365,23 @@ }, "node_modules/requires-port": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "node_modules/safe-buffer": { "version": "5.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safer-buffer": { "version": "2.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/send": { "version": "0.18.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -3656,25 +1403,31 @@ }, "node_modules/send/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/send/node_modules/ms": { "version": "2.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/seq-queue": { - "version": "0.0.5" + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" }, "node_modules/serve-static": { "version": "1.15.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -3685,17 +1438,39 @@ "node": ">= 0.8.0" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", - "license": "ISC" + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3711,21 +1486,24 @@ }, "node_modules/sqlstring": { "version": "2.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", "engines": { "node": ">= 0.6" } }, "node_modules/statuses": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "engines": { "node": ">= 0.8" } }, "node_modules/string_decoder": { "version": "0.10.31", - "license": "MIT" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" }, "node_modules/supports-color": { "version": "5.5.0", @@ -3748,14 +1526,16 @@ }, "node_modules/toidentifier": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "engines": { "node": ">=0.6" } }, "node_modules/type-is": { "version": "1.6.18", - "license": "MIT", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -3765,9 +1545,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3783,14 +1563,16 @@ }, "node_modules/unpipe": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "engines": { "node": ">= 0.8" } }, "node_modules/url-parse": { "version": "1.5.10", - "license": "MIT", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -3798,14 +1580,16 @@ }, "node_modules/utils-merge": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "engines": { "node": ">= 0.4.0" } }, "node_modules/vary": { "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "engines": { "node": ">= 0.8" } From 586ba4851917ba09864148a9af59ad1060416487 Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Mon, 24 Jun 2024 11:55:05 +0000 Subject: [PATCH 38/79] WIP: booking service integration --- .jobs.yml | 36 +- .../python/src/crosslab/api_client/client.py | 212 +- .../python/src/crosslab/api_client/schemas.py | 270 + clients/api/python/tests/test_openapi.py | 1272 ++ services/experiment/package.json | 1 + .../src/clients/booking/basicValidation.cjs | 12839 ++++++++++++++++ .../src/clients/booking/basicValidation.d.cts | 299 + .../experiment/src/clients/booking/client.ts | 861 ++ .../src/clients/booking/requestValidation.ts | 678 + .../src/clients/booking/signatures.ts | 1107 ++ .../experiment/src/clients/booking/types.ts | 404 + services/experiment/src/clients/index.ts | 15 +- .../src/methods/experimentStatus/book.ts | 42 +- .../src/methods/experimentStatus/index.ts | 5 + .../experimentStatus/setup/bookingLocking.ts | 33 +- .../experimentStatus/setup/bookingUpdate.ts | 21 +- .../src/operations/experiments/get.ts | 14 +- 17 files changed, 18034 insertions(+), 75 deletions(-) create mode 100644 services/experiment/src/clients/booking/basicValidation.cjs create mode 100644 services/experiment/src/clients/booking/basicValidation.d.cts create mode 100644 services/experiment/src/clients/booking/client.ts create mode 100644 services/experiment/src/clients/booking/requestValidation.ts create mode 100644 services/experiment/src/clients/booking/signatures.ts create mode 100644 services/experiment/src/clients/booking/types.ts diff --git a/.jobs.yml b/.jobs.yml index f272ef38..14402d67 100644 --- a/.jobs.yml +++ b/.jobs.yml @@ -129,24 +129,24 @@ services/authorization: - test services/booking: - - script: build-spec -# - script: lint-spec -# dependencies: -# - services/booking:build-spec -# tags: -# - test -# - script: build -# dependencies: -# - services/booking:build-spec -# - services/common:build -# - helper/crosslab-typescript-addon:build -# - helper/openapi-codegeneration:build -# - clients/api/js:build -# - script: test -# dependencies: -# - services/booking:build -# tags: -# - test + - script: build-spec + - script: lint-spec + dependencies: + - services/booking:build-spec + tags: + - test + - script: build + dependencies: + - services/booking:build-spec + - services/common:build + - helper/crosslab-typescript-addon:build + - helper/openapi-codegeneration:build + - clients/api/js:build + - script: test + dependencies: + - services/booking:build + tags: + - test services/device: - script: build-spec diff --git a/clients/api/python/src/crosslab/api_client/client.py b/clients/api/python/src/crosslab/api_client/client.py index 1684d94c..94666600 100644 --- a/clients/api/python/src/crosslab/api_client/client.py +++ b/clients/api/python/src/crosslab/api_client/client.py @@ -62,7 +62,19 @@ GetInstitutionResponse, UpdateInstitutionRequest, UpdateInstitutionResponse, - DeleteInstitutionResponse + DeleteInstitutionResponse, + ScheduleRequest, + ScheduleResponse, + NewBookingRequest, + NewBookingResponse, + UpdateBookingRequest, + UpdateBookingResponse, + DeleteBookingResponse, + GetBookingResponse, + DestroyBookingResponse, + LockBookingResponse, + UnlockBookingResponse, + BookingCallbackResponse ) @@ -1164,3 +1176,201 @@ async def delete_institution(self, url: str) -> DeleteInstitutionResponse: # no if status == 204: return resp raise Exception(f"Unexpected status code: {status}") + + async def schedule(self, url: str = "/schedule", body: Optional[ScheduleRequest] = None) -> ScheduleResponse: # noqa: E501 + """ + Returns the free / booked times for given experiment. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(schedule)?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'/schedule' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="post", body=body) + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def newBooking(self, url: str = "/booking", body: Optional[NewBookingRequest] = None) -> NewBookingResponse: # noqa: E501 + """ + Books an experiment. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(booking)?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'/booking' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="post", body=body) + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def updateBooking(self, url: str, body: UpdateBookingRequest) -> UpdateBookingResponse: # noqa: E501 + """ + Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)()?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="patch", body=body) + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def deleteBooking(self, url: str) -> DeleteBookingResponse: # noqa: E501 + """ + Cancels a booking, as long as the booking was originally done by you. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)()?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="delete") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def getBooking(self, url: str) -> GetBookingResponse: # noqa: E501 + """ + Returns whether a list of devices is currently booked for a user. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)()?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="get") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def destroyBooking(self, url: str) -> DestroyBookingResponse: # noqa: E501 + """ + Allows selected persons (like lab manager) to remove a user booking. To avoid mistakes, this is a different path than normal delete. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)(\/destroy)?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'/destroy' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="delete") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def lockBooking(self, url: str) -> LockBookingResponse: # noqa: E501 + """ + Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)(\/lock)?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'/lock' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="put") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def unlockBooking(self, url: str) -> UnlockBookingResponse: # noqa: E501 + """ + Unlocks all devices belonging to a booking, status will be set to 'booked'. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)(\/lock)?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'/lock' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="delete") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def bookingCallback(self, url: str) -> BookingCallbackResponse: # noqa: E501 + """ + Callback used for updating device info / booking info. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking_callback\/[^?]*?)()?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="post") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") diff --git a/clients/api/python/src/crosslab/api_client/schemas.py b/clients/api/python/src/crosslab/api_client/schemas.py index 41dae853..35465c97 100644 --- a/clients/api/python/src/crosslab/api_client/schemas.py +++ b/clients/api/python/src/crosslab/api_client/schemas.py @@ -3627,3 +3627,273 @@ class UpdateInstitutionResponse200(TypedDict): DeleteInstitutionResponse: TypeAlias = None + + +class ScheduleRequestExperimentDevicesItems(TypedDict): + """ + A device might either be a physical/virtual device or a group of device.Properties: + - ID: Unique ID of the device. Contains the institution (by having an end point at that institution) + """ + ID: str + + +class ScheduleRequestExperiment(TypedDict): + """ + An experiment describes a set of devices and how they should be connected (potentially among other metadata).Properties: + - Devices: List of devices used in experiment. + - Description: User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + """ + Devices: List[ScheduleRequestExperimentDevicesItems] + Description: NotRequired[str] + + +class ScheduleRequestTime(TypedDict): + """ + A time slot represents a slice of time used for bookings.Properties: + - Start: Start time of the booking. + - End: End time of the booking. + """ + Start: str + End: str + + +class ScheduleRequest(TypedDict): + """ + Properties: + - Experiment: An experiment describes a set of devices and how they should be connected (potentially among other metadata). + - Time: A time slot represents a slice of time used for bookings. + - Combined: If true, show only one timetable per device instead of one for all available physical devices. + - onlyOwn: (private) Show only devices of this institution. Give an error if a device of an other institution is requested. + """ + Experiment: ScheduleRequestExperiment + Time: ScheduleRequestTime + Combined: NotRequired[bool] + onlyOwn: NotRequired[bool] + + +class ScheduleResponse200ItemsBookedItems(TypedDict): + """ + A time slot represents a slice of time used for bookings.Properties: + - Start: Start time of the booking. + - End: End time of the booking. + """ + Start: str + End: str + + +class ScheduleResponse200ItemsFreeItems(TypedDict): + """ + A time slot represents a slice of time used for bookings.Properties: + - Start: Start time of the booking. + - End: End time of the booking. + """ + Start: str + End: str + + +class ScheduleResponse200Items(TypedDict): + """ + Properties: + - Device: ID of the device (or * if combined). + - Booked: Array of booked times. + - Free: Array of free times. + """ + Device: str + Booked: List[ScheduleResponse200ItemsBookedItems] + Free: List[ScheduleResponse200ItemsFreeItems] + + +ScheduleResponse200: TypeAlias = List[ScheduleResponse200Items] + + +ScheduleResponse404: TypeAlias = str + + +ScheduleResponse422: TypeAlias = str + + +ScheduleResponse500: TypeAlias = str + + +ScheduleResponse: TypeAlias = Union[ScheduleResponse200, ScheduleResponse404, ScheduleResponse422, ScheduleResponse500] + + +class NewBookingRequestDevicesItems(TypedDict): + """ + A device might either be a physical/virtual device or a group of device.Properties: + - ID: Unique ID of the device. Contains the institution (by having an end point at that institution) + """ + ID: str + + +class NewBookingRequestTime(TypedDict): + """ + A time slot represents a slice of time used for bookings.Properties: + - Start: Start time of the booking. + - End: End time of the booking. + """ + Start: str + End: str + + +class NewBookingRequest(TypedDict): + """ + Properties: + - Devices: List of devices which should be added. + - Time: A time slot represents a slice of time used for bookings. + - Type: Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + """ + Devices: List[NewBookingRequestDevicesItems] + Time: NewBookingRequestTime + Type: NotRequired[Literal["normal"]] + + +class NewBookingResponse200(TypedDict): + """ + Properties: + - BookingID: ID at which the booking can be managed. + """ + BookingID: str + + +NewBookingResponse500: TypeAlias = str + + +NewBookingResponse: TypeAlias = Union[NewBookingResponse200, NewBookingResponse500] + + +class UpdateBookingRequestAlt1DevicesItems(TypedDict): + """ + A device might either be a physical/virtual device or a group of device.Properties: + - ID: Unique ID of the device. Contains the institution (by having an end point at that institution) + """ + ID: str + + +class UpdateBookingRequestAlt1(TypedDict): + """ + Use this request for adding devices.Properties: + - Locked: Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set. + - Devices: List of devices which should be added. + """ + Locked: NotRequired[bool] + Devices: NotRequired[List[UpdateBookingRequestAlt1DevicesItems]] + + +class UpdateBookingRequestAlt2(TypedDict): + """ + Use this request for adding callbacks.Properties: + - Callback: Callback which should be called at changes. + """ + Callback: NotRequired[str] + + +UpdateBookingRequest = Union[UpdateBookingRequestAlt1, UpdateBookingRequestAlt2] + + +class UpdateBookingResponse200(TypedDict): + """ + Properties: + - BookingID + """ + BookingID: str + + +UpdateBookingResponse400: TypeAlias = str + + +UpdateBookingResponse500: TypeAlias = str + + +UpdateBookingResponse: TypeAlias = Union[UpdateBookingResponse200, UpdateBookingResponse400, UpdateBookingResponse500] + + +DeleteBookingResponse500: TypeAlias = str + + +DeleteBookingResponse: TypeAlias = DeleteBookingResponse500 + + +class GetBookingResponse200BookingTime(TypedDict): + """ + A time slot represents a slice of time used for bookings.Properties: + - Start: Start time of the booking. + - End: End time of the booking. + """ + Start: str + End: str + + +class GetBookingResponse200Booking(TypedDict): + """ + A booking in the booking system.Properties: + - ID: Unique ID of the booking. + - Time: A time slot represents a slice of time used for bookings. + - Devices + - Type: Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + - Status: Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + - You: If true, this booking was done by you. + - External: Shows whether the booking was done by an external institution. + - Message: User readable notes about the status of the booking (e.g. if devices are unknown). + """ + ID: str + Time: GetBookingResponse200BookingTime + Devices: List[str] + Type: NotRequired[Literal["normal"]] + Status: Literal["pending", "booked", "rejected", "cancelled", "active", "active-pending", "active-rejected"] + You: bool + External: bool + Message: NotRequired[str] + + +class GetBookingResponse200(TypedDict): + """ + Properties: + - Booking: A booking in the booking system. + - Locked: Shows if the booking is in a locked status. + """ + Booking: GetBookingResponse200Booking + Locked: bool + + +GetBookingResponse500: TypeAlias = str + + +GetBookingResponse: TypeAlias = Union[GetBookingResponse200, GetBookingResponse500] + + +DestroyBookingResponse500: TypeAlias = str + + +DestroyBookingResponse: TypeAlias = DestroyBookingResponse500 + + +class LockBookingResponse200Items(TypedDict): + """ + Properties: + - Requested + - Selected + """ + Requested: str + Selected: str + + +LockBookingResponse200: TypeAlias = List[LockBookingResponse200Items] + + +LockBookingResponse500: TypeAlias = str + + +LockBookingResponse: TypeAlias = Union[LockBookingResponse200, LockBookingResponse500] + + +UnlockBookingResponse500: TypeAlias = str + + +UnlockBookingResponse: TypeAlias = UnlockBookingResponse500 + + +BookingCallbackResponse500: TypeAlias = str + + +BookingCallbackResponse: TypeAlias = BookingCallbackResponse500 diff --git a/clients/api/python/tests/test_openapi.py b/clients/api/python/tests/test_openapi.py index eb8da9f9..cf1a1e4f 100644 --- a/clients/api/python/tests/test_openapi.py +++ b/clients/api/python/tests/test_openapi.py @@ -5572,3 +5572,1275 @@ async def test_delete_institution(aioresponses: aioresponses): async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=full_url, **parameters) + + +@pytest.mark.asyncio +async def test_schedule(aioresponses: aioresponses): + url = r'/schedule' + url_variant = r'schedule' + full_url = BASE_URL+r'/schedule' + + request = json.loads(r'{"Experiment":{"Devices":[{"ID":"https://eoKzcaLEO.jigrLrN,QtmSeOrwdDkjY4"},{"ID":"https://dJaL.omM0GRYOmeEyMOG8,lOwfYgxMRtEfPZWHiX,HISaF0nFZxn37U4ILuINMGozBLrh.aOLN8uc6"}],"Description":"in dolore pariatur ut"},"Time":{"Start":"1981-06-10T04:14:08.0Z","End":"1951-06-17T02:47:39.0Z"}}') + + parameter_list = [{}, ] + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Device":"deserunt","Booked":[{"Start":"1948-05-28T02:28:12.0Z","End":"2011-12-30T01:38:02.0Z"},{"Start":"1985-12-18T10:09:01.0Z","End":"1978-01-18T18:32:01.0Z"}],"Free":[{"Start":"1961-12-22T19:04:41.0Z","End":"2001-11-27T06:05:08.0Z"},{"Start":"2012-02-02T16:18:57.0Z","End":"1966-03-15T22:35:31.0Z"},{"Start":"1982-08-02T04:58:59.0Z","End":"1994-05-06T05:04:50.0Z"},{"Start":"2008-12-26T17:21:24.0Z","End":"1983-12-05T17:38:55.0Z"}]},{"Device":"voluptate sed","Booked":[{"Start":"2013-11-17T05:48:45.0Z","End":"1998-12-07T01:30:34.0Z"},{"Start":"1984-09-11T04:11:16.0Z","End":"1970-10-28T01:19:38.0Z"},{"Start":"1958-04-10T07:56:51.0Z","End":"1960-07-18T04:47:46.0Z"}],"Free":[{"Start":"1982-08-29T04:12:21.0Z","End":"1968-11-30T13:07:01.0Z"}]},{"Device":"irure laboris consequat minim","Booked":[{"Start":"2010-02-25T04:35:02.0Z","End":"1959-09-10T01:34:53.0Z"}],"Free":[{"Start":"2001-04-09T22:29:19.0Z","End":"2005-06-04T08:28:39.0Z"},{"Start":"1979-01-07T05:35:26.0Z","End":"2019-06-10T21:57:56.0Z"},{"Start":"1971-01-18T04:03:03.0Z","End":"1960-05-19T05:07:48.0Z"}]},{"Device":"est et","Booked":[{"Start":"1969-01-26T21:55:52.0Z","End":"2014-09-15T10:37:51.0Z"},{"Start":"1976-11-11T14:44:42.0Z","End":"2013-12-15T19:03:32.0Z"}],"Free":[{"Start":"1963-05-16T13:25:55.0Z","End":"2011-06-21T19:03:17.0Z"},{"Start":"1944-05-29T20:44:47.0Z","End":"1962-03-04T14:52:27.0Z"},{"Start":"1977-04-02T14:22:19.0Z","End":"2011-07-11T16:07:14.0Z"}]}]') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.schedule(body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Device":"deserunt","Booked":[{"Start":"1948-05-28T02:28:12.0Z","End":"2011-12-30T01:38:02.0Z"},{"Start":"1985-12-18T10:09:01.0Z","End":"1978-01-18T18:32:01.0Z"}],"Free":[{"Start":"1961-12-22T19:04:41.0Z","End":"2001-11-27T06:05:08.0Z"},{"Start":"2012-02-02T16:18:57.0Z","End":"1966-03-15T22:35:31.0Z"},{"Start":"1982-08-02T04:58:59.0Z","End":"1994-05-06T05:04:50.0Z"},{"Start":"2008-12-26T17:21:24.0Z","End":"1983-12-05T17:38:55.0Z"}]},{"Device":"voluptate sed","Booked":[{"Start":"2013-11-17T05:48:45.0Z","End":"1998-12-07T01:30:34.0Z"},{"Start":"1984-09-11T04:11:16.0Z","End":"1970-10-28T01:19:38.0Z"},{"Start":"1958-04-10T07:56:51.0Z","End":"1960-07-18T04:47:46.0Z"}],"Free":[{"Start":"1982-08-29T04:12:21.0Z","End":"1968-11-30T13:07:01.0Z"}]},{"Device":"irure laboris consequat minim","Booked":[{"Start":"2010-02-25T04:35:02.0Z","End":"1959-09-10T01:34:53.0Z"}],"Free":[{"Start":"2001-04-09T22:29:19.0Z","End":"2005-06-04T08:28:39.0Z"},{"Start":"1979-01-07T05:35:26.0Z","End":"2019-06-10T21:57:56.0Z"},{"Start":"1971-01-18T04:03:03.0Z","End":"1960-05-19T05:07:48.0Z"}]},{"Device":"est et","Booked":[{"Start":"1969-01-26T21:55:52.0Z","End":"2014-09-15T10:37:51.0Z"},{"Start":"1976-11-11T14:44:42.0Z","End":"2013-12-15T19:03:32.0Z"}],"Free":[{"Start":"1963-05-16T13:25:55.0Z","End":"2011-06-21T19:03:17.0Z"},{"Start":"1944-05-29T20:44:47.0Z","End":"1962-03-04T14:52:27.0Z"},{"Start":"1977-04-02T14:22:19.0Z","End":"2011-07-11T16:07:14.0Z"}]}]') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.schedule(url=url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Device":"deserunt","Booked":[{"Start":"1948-05-28T02:28:12.0Z","End":"2011-12-30T01:38:02.0Z"},{"Start":"1985-12-18T10:09:01.0Z","End":"1978-01-18T18:32:01.0Z"}],"Free":[{"Start":"1961-12-22T19:04:41.0Z","End":"2001-11-27T06:05:08.0Z"},{"Start":"2012-02-02T16:18:57.0Z","End":"1966-03-15T22:35:31.0Z"},{"Start":"1982-08-02T04:58:59.0Z","End":"1994-05-06T05:04:50.0Z"},{"Start":"2008-12-26T17:21:24.0Z","End":"1983-12-05T17:38:55.0Z"}]},{"Device":"voluptate sed","Booked":[{"Start":"2013-11-17T05:48:45.0Z","End":"1998-12-07T01:30:34.0Z"},{"Start":"1984-09-11T04:11:16.0Z","End":"1970-10-28T01:19:38.0Z"},{"Start":"1958-04-10T07:56:51.0Z","End":"1960-07-18T04:47:46.0Z"}],"Free":[{"Start":"1982-08-29T04:12:21.0Z","End":"1968-11-30T13:07:01.0Z"}]},{"Device":"irure laboris consequat minim","Booked":[{"Start":"2010-02-25T04:35:02.0Z","End":"1959-09-10T01:34:53.0Z"}],"Free":[{"Start":"2001-04-09T22:29:19.0Z","End":"2005-06-04T08:28:39.0Z"},{"Start":"1979-01-07T05:35:26.0Z","End":"2019-06-10T21:57:56.0Z"},{"Start":"1971-01-18T04:03:03.0Z","End":"1960-05-19T05:07:48.0Z"}]},{"Device":"est et","Booked":[{"Start":"1969-01-26T21:55:52.0Z","End":"2014-09-15T10:37:51.0Z"},{"Start":"1976-11-11T14:44:42.0Z","End":"2013-12-15T19:03:32.0Z"}],"Free":[{"Start":"1963-05-16T13:25:55.0Z","End":"2011-06-21T19:03:17.0Z"},{"Start":"1944-05-29T20:44:47.0Z","End":"1962-03-04T14:52:27.0Z"},{"Start":"1977-04-02T14:22:19.0Z","End":"2011-07-11T16:07:14.0Z"}]}]') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.schedule(url=url_variant, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Device":"deserunt","Booked":[{"Start":"1948-05-28T02:28:12.0Z","End":"2011-12-30T01:38:02.0Z"},{"Start":"1985-12-18T10:09:01.0Z","End":"1978-01-18T18:32:01.0Z"}],"Free":[{"Start":"1961-12-22T19:04:41.0Z","End":"2001-11-27T06:05:08.0Z"},{"Start":"2012-02-02T16:18:57.0Z","End":"1966-03-15T22:35:31.0Z"},{"Start":"1982-08-02T04:58:59.0Z","End":"1994-05-06T05:04:50.0Z"},{"Start":"2008-12-26T17:21:24.0Z","End":"1983-12-05T17:38:55.0Z"}]},{"Device":"voluptate sed","Booked":[{"Start":"2013-11-17T05:48:45.0Z","End":"1998-12-07T01:30:34.0Z"},{"Start":"1984-09-11T04:11:16.0Z","End":"1970-10-28T01:19:38.0Z"},{"Start":"1958-04-10T07:56:51.0Z","End":"1960-07-18T04:47:46.0Z"}],"Free":[{"Start":"1982-08-29T04:12:21.0Z","End":"1968-11-30T13:07:01.0Z"}]},{"Device":"irure laboris consequat minim","Booked":[{"Start":"2010-02-25T04:35:02.0Z","End":"1959-09-10T01:34:53.0Z"}],"Free":[{"Start":"2001-04-09T22:29:19.0Z","End":"2005-06-04T08:28:39.0Z"},{"Start":"1979-01-07T05:35:26.0Z","End":"2019-06-10T21:57:56.0Z"},{"Start":"1971-01-18T04:03:03.0Z","End":"1960-05-19T05:07:48.0Z"}]},{"Device":"est et","Booked":[{"Start":"1969-01-26T21:55:52.0Z","End":"2014-09-15T10:37:51.0Z"},{"Start":"1976-11-11T14:44:42.0Z","End":"2013-12-15T19:03:32.0Z"}],"Free":[{"Start":"1963-05-16T13:25:55.0Z","End":"2011-06-21T19:03:17.0Z"},{"Start":"1944-05-29T20:44:47.0Z","End":"1962-03-04T14:52:27.0Z"},{"Start":"1977-04-02T14:22:19.0Z","End":"2011-07-11T16:07:14.0Z"}]}]') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.schedule(url=full_url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + response_404_dict = json.loads(r'"commodo in"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404, payload=response_404_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + response_404_dict = json.loads(r'"commodo in"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404, payload=response_404_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_404_dict = json.loads(r'"commodo in"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404, payload=response_404_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_404_dict = json.loads(r'"commodo in"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404, payload=response_404_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + response_422_dict = json.loads(r'"mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=422, payload=response_422_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + response_422_dict = json.loads(r'"mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=422, payload=response_422_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_422_dict = json.loads(r'"mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=422, payload=response_422_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_422_dict = json.loads(r'"mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=422, payload=response_422_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + +@pytest.mark.asyncio +async def test_newBooking(aioresponses: aioresponses): + url = r'/booking' + url_variant = r'booking' + full_url = BASE_URL+r'/booking' + + request = json.loads(r'{"Devices":[{"ID":"https://oCCTTNStvcBbcmLKslaSMmqVGx.auzBY3BJWu8x-QporrHYcC9bqsef8NDutN5ohOWawZbhZ8r"},{"ID":"http://fxAFgbruxuEEUzmlpkQyPQjTvbNrEUlw.dbgFCsvm,LZ+kIzgghTNqyNTtrGAlQq2MjmMn1grGk2ZkZRGoZxQ+A0N"}],"Time":{"Start":"1957-06-19T20:42:50.0Z","End":"2017-12-16T17:13:02.0Z"},"Type":"normal"}') + + parameter_list = [{}, ] + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"https://zurWHxnuNekdQetiawWc.uncovYoMyvENFntDMplEsNtcFgBUP17FfZ2Wkcx1SeQnu+iggAOfJGk"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.newBooking(body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"https://zurWHxnuNekdQetiawWc.uncovYoMyvENFntDMplEsNtcFgBUP17FfZ2Wkcx1SeQnu+iggAOfJGk"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.newBooking(url=url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"https://zurWHxnuNekdQetiawWc.uncovYoMyvENFntDMplEsNtcFgBUP17FfZ2Wkcx1SeQnu+iggAOfJGk"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.newBooking(url=url_variant, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"https://zurWHxnuNekdQetiawWc.uncovYoMyvENFntDMplEsNtcFgBUP17FfZ2Wkcx1SeQnu+iggAOfJGk"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.newBooking(url=full_url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ea mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ea mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ea mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ea mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=full_url, body=request, **parameters) + + +@pytest.mark.asyncio +async def test_updateBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + + request = json.loads(r'{"Locked":true,"Devices":[{"ID":"http://k.wgaOIBHxZfiNzV7AkaVuQ1UvsgVbtXmOHr3UacIqwT3BazSLm68y1Js"},{"ID":"https://ohlnuiclAHELGBqVjSlJNnwurIJTY.dfpkNwARhVGSLnPEP8jC7LYUNTZu-+lz9F5bZHXYqjq"}]}') + + parameter_list = [{}, ] + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"http://akJjTPgNsQCcPFMaZe.zlmvloXia0bqBjdT1Rfy3PSFGpCVkgqoAa9GgiZHg4r"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.updateBooking(url=url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"http://akJjTPgNsQCcPFMaZe.zlmvloXia0bqBjdT1Rfy3PSFGpCVkgqoAa9GgiZHg4r"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"http://akJjTPgNsQCcPFMaZe.zlmvloXia0bqBjdT1Rfy3PSFGpCVkgqoAa9GgiZHg4r"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.updateBooking(url=full_url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_400_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400, payload=response_400_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_400_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400, payload=response_400_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_400_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400, payload=response_400_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + +@pytest.mark.asyncio +async def test_deleteBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + + parameter_list = [{}, ] + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + +@pytest.mark.asyncio +async def test_getBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + + parameter_list = [{}, ] + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"Booking":{"ID":"https://qhQkiiruUxtUtbGmjaXwNC.neZld0VWn5OHMWi2rZ8oi-sv2W7RJlGiu6E4TtMQzwHyNISGmkg+CY2OCvHTxFBaYGO0u","Time":{"Start":"1964-12-11T17:12:39.0Z","End":"1983-03-23T22:36:39.0Z"},"Devices":["https://MSoPGR.qbojgUH2Y+tqKvMJEQorqAvvxtqCXZthUzmwJuZ-2MkJyv5WEWtPYwH9n,F","http://dvGWLhbJbQJ.ejdS","https://gVgJcnupaGdLWloiORp.eroxDq3cPowUmAwFkPcgEW,oivqBNl1+MGJFwwoJyw,Hn","http://ySSHqBm.dwyCPbuiqQ0Xmz-.4"],"Status":"rejected","You":false,"External":false,"Message":"adipisicing ad id pariatur nulla","Type":"normal"},"Locked":false}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.getBooking(url=url, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"Booking":{"ID":"https://qhQkiiruUxtUtbGmjaXwNC.neZld0VWn5OHMWi2rZ8oi-sv2W7RJlGiu6E4TtMQzwHyNISGmkg+CY2OCvHTxFBaYGO0u","Time":{"Start":"1964-12-11T17:12:39.0Z","End":"1983-03-23T22:36:39.0Z"},"Devices":["https://MSoPGR.qbojgUH2Y+tqKvMJEQorqAvvxtqCXZthUzmwJuZ-2MkJyv5WEWtPYwH9n,F","http://dvGWLhbJbQJ.ejdS","https://gVgJcnupaGdLWloiORp.eroxDq3cPowUmAwFkPcgEW,oivqBNl1+MGJFwwoJyw,Hn","http://ySSHqBm.dwyCPbuiqQ0Xmz-.4"],"Status":"rejected","You":false,"External":false,"Message":"adipisicing ad id pariatur nulla","Type":"normal"},"Locked":false}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.getBooking(url=url_variant, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"Booking":{"ID":"https://qhQkiiruUxtUtbGmjaXwNC.neZld0VWn5OHMWi2rZ8oi-sv2W7RJlGiu6E4TtMQzwHyNISGmkg+CY2OCvHTxFBaYGO0u","Time":{"Start":"1964-12-11T17:12:39.0Z","End":"1983-03-23T22:36:39.0Z"},"Devices":["https://MSoPGR.qbojgUH2Y+tqKvMJEQorqAvvxtqCXZthUzmwJuZ-2MkJyv5WEWtPYwH9n,F","http://dvGWLhbJbQJ.ejdS","https://gVgJcnupaGdLWloiORp.eroxDq3cPowUmAwFkPcgEW,oivqBNl1+MGJFwwoJyw,Hn","http://ySSHqBm.dwyCPbuiqQ0Xmz-.4"],"Status":"rejected","You":false,"External":false,"Message":"adipisicing ad id pariatur nulla","Type":"normal"},"Locked":false}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.getBooking(url=full_url, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"elit commodo minim eu"') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"elit commodo minim eu"') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"elit commodo minim eu"') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=full_url, **parameters) + + +@pytest.mark.asyncio +async def test_destroyBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/destroy' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/destroy' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/destroy' + + parameter_list = [{}, ] + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + +@pytest.mark.asyncio +async def test_lockBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + + parameter_list = [{}, ] + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Requested":"http://yiRyQY.upcxSE+-Dt+yeL","Selected":"https://aEfpYLsPzTiKHUjDdaZqyoDJwdYyi.rfmpCGiIatB7d6ON,0Wr2XkcBvhL3t6nyVirx8SDzb"},{"Requested":"https://toVVoQmUnSXuahwfeTRxpNnDE.yug7Zz9nBIdQhW2GZYygo31sewyh.G","Selected":"https://XQIUSphplmT.pubUJoCRaU9etAf0uivpRC0jsje"},{"Requested":"http://Kvsu.pyqaRVJ1uwJ8xaFz1uG4rpgnZCX9zyfTcIwWdiBhXpoISjdduhUDF7E.vDe","Selected":"https://zNdrBJZQW.dqqlUM1nRzvtbRxn7+Fb6zHE3eCJCd,5rMpCPM3tut64+SnKGZIOayPKVhIItvniaBYx5zat7b"},{"Requested":"https://fdZmspjHNxJbzMQYgWwCJpuojNSkAVlOa.ngfhBC3TgaCQn-pN,xiJngw3PjoMMmYluRriS33e","Selected":"https://VhHcokmycuzIDimdpNZcNDEwblRDme.fdciB9nT,qyP8szCg9nMT2EnE-lfj7LQEbLZ0owZ7Q,WJbT"},{"Requested":"https://JzNxIalMPxPXEijJi.uumgKo-dgJE","Selected":"https://tuN.faDII-kaqNvW"}]') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.lockBooking(url=url, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Requested":"http://yiRyQY.upcxSE+-Dt+yeL","Selected":"https://aEfpYLsPzTiKHUjDdaZqyoDJwdYyi.rfmpCGiIatB7d6ON,0Wr2XkcBvhL3t6nyVirx8SDzb"},{"Requested":"https://toVVoQmUnSXuahwfeTRxpNnDE.yug7Zz9nBIdQhW2GZYygo31sewyh.G","Selected":"https://XQIUSphplmT.pubUJoCRaU9etAf0uivpRC0jsje"},{"Requested":"http://Kvsu.pyqaRVJ1uwJ8xaFz1uG4rpgnZCX9zyfTcIwWdiBhXpoISjdduhUDF7E.vDe","Selected":"https://zNdrBJZQW.dqqlUM1nRzvtbRxn7+Fb6zHE3eCJCd,5rMpCPM3tut64+SnKGZIOayPKVhIItvniaBYx5zat7b"},{"Requested":"https://fdZmspjHNxJbzMQYgWwCJpuojNSkAVlOa.ngfhBC3TgaCQn-pN,xiJngw3PjoMMmYluRriS33e","Selected":"https://VhHcokmycuzIDimdpNZcNDEwblRDme.fdciB9nT,qyP8szCg9nMT2EnE-lfj7LQEbLZ0owZ7Q,WJbT"},{"Requested":"https://JzNxIalMPxPXEijJi.uumgKo-dgJE","Selected":"https://tuN.faDII-kaqNvW"}]') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.lockBooking(url=url_variant, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Requested":"http://yiRyQY.upcxSE+-Dt+yeL","Selected":"https://aEfpYLsPzTiKHUjDdaZqyoDJwdYyi.rfmpCGiIatB7d6ON,0Wr2XkcBvhL3t6nyVirx8SDzb"},{"Requested":"https://toVVoQmUnSXuahwfeTRxpNnDE.yug7Zz9nBIdQhW2GZYygo31sewyh.G","Selected":"https://XQIUSphplmT.pubUJoCRaU9etAf0uivpRC0jsje"},{"Requested":"http://Kvsu.pyqaRVJ1uwJ8xaFz1uG4rpgnZCX9zyfTcIwWdiBhXpoISjdduhUDF7E.vDe","Selected":"https://zNdrBJZQW.dqqlUM1nRzvtbRxn7+Fb6zHE3eCJCd,5rMpCPM3tut64+SnKGZIOayPKVhIItvniaBYx5zat7b"},{"Requested":"https://fdZmspjHNxJbzMQYgWwCJpuojNSkAVlOa.ngfhBC3TgaCQn-pN,xiJngw3PjoMMmYluRriS33e","Selected":"https://VhHcokmycuzIDimdpNZcNDEwblRDme.fdciB9nT,qyP8szCg9nMT2EnE-lfj7LQEbLZ0owZ7Q,WJbT"},{"Requested":"https://JzNxIalMPxPXEijJi.uumgKo-dgJE","Selected":"https://tuN.faDII-kaqNvW"}]') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.lockBooking(url=full_url, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"enim culpa"') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"enim culpa"') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"enim culpa"') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + +@pytest.mark.asyncio +async def test_unlockBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + + parameter_list = [{}, ] + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + +@pytest.mark.asyncio +async def test_bookingCallback(aioresponses: aioresponses): + url = r'/booking_callback/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + url_variant = r'booking_callback/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + full_url = BASE_URL+r'/booking_callback/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + + parameter_list = [{}, ] + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.bookingCallback(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.bookingCallback(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.bookingCallback(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=full_url, **parameters) diff --git a/services/experiment/package.json b/services/experiment/package.json index c10d4d0e..6b2941c8 100644 --- a/services/experiment/package.json +++ b/services/experiment/package.json @@ -18,6 +18,7 @@ "build:generate:code": "npx openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", "build:generate:test": "npx openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service:test -o test/generated", "build:generate:device": "npx openapi-codegen -i ../device/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/device && prettier ./src/clients/device --write", + "build:generate:booking": "npx openapi-codegen -i ../booking/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/booking && prettier ./src/clients/booking --write", "build:compile": "tsc && cp src/generated/*.cjs app/generated && cp src/clients/device/basicValidation.cjs app/clients/device/", "build:add-shebang": "bash scripts/add-shebang.sh", "build": "npm-run-all build:*", diff --git a/services/experiment/src/clients/booking/basicValidation.cjs b/services/experiment/src/clients/booking/basicValidation.cjs new file mode 100644 index 00000000..b791fa74 --- /dev/null +++ b/services/experiment/src/clients/booking/basicValidation.cjs @@ -0,0 +1,12839 @@ +/* eslint-disable */ +//@ts-nocheck +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +'use strict'; +exports.validateBooking = validate21; +const schema6 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'Booking', + 'x-location': '#/components/schemas/Booking', + 'x-schema-type': 'all', +}; +const formats0 = require('ajv-formats/dist/formats').fullFormats.uri; +const formats2 = require('ajv-formats/dist/formats').fullFormats['date-time']; +function validate21( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate21.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema6.required, + parentSchema: schema6, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.ID.type, + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema6.properties.Time.required, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.Start.type, + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.End.type, + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.properties.Time.type, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Devices.items.type, + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema6.properties.Devices.type, + parentSchema: schema6.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Type.type, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Type.enum, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Status.type, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Status.enum, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.You.type, + parentSchema: schema6.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.External.type, + parentSchema: schema6.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Message.type, + parentSchema: schema6.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate21.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.type, + parentSchema: schema6, + data, + }, + ]; + return false; + } + } + validate21.errors = vErrors; + return errors === 0; +} +exports.validateDevice = validate22; +const schema7 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'Device', + 'x-location': '#/components/schemas/Device', + 'x-schema-type': 'all', +}; +function validate22( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate22.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema7.required, + parentSchema: schema7, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema7.properties.ID.type, + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate22.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema7.type, + parentSchema: schema7, + data, + }, + ]; + return false; + } + } + validate22.errors = vErrors; + return errors === 0; +} +exports.validateExperiment = validate23; +const schema8 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + }, + }, + 'x-standalone': true, + 'x-name': 'Experiment', + 'x-location': '#/components/schemas/Experiment', + 'x-schema-type': 'all', +}; +function validate23( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate23.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema8.required, + parentSchema: schema8, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema8.properties.Devices.items.required, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema8.properties.Devices.items.properties.ID.type, + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.properties.Devices.items.type, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema8.properties.Devices.type, + parentSchema: schema8.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate23.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema8.properties.Description.type, + parentSchema: schema8.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate23.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.type, + parentSchema: schema8, + data, + }, + ]; + return false; + } + } + validate23.errors = vErrors; + return errors === 0; +} +exports.validateTimeslot = validate24; +const schema9 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'Timeslot', + 'x-location': '#/components/schemas/Timeslot', + 'x-schema-type': 'all', +}; +function validate24( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate24.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema9.required, + parentSchema: schema9, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.Start.type, + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.End.type, + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate24.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema9.type, + parentSchema: schema9, + data, + }, + ]; + return false; + } + } + validate24.errors = vErrors; + return errors === 0; +} +exports.validateID = validate25; +const schema10 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'ID', + 'x-location': '#/components/parameters/ID/schema', + 'x-schema-type': 'all', +}; +function validate25( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate25.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema10.type, + parentSchema: schema10, + data, + }, + ]; + return false; + } + validate25.errors = vErrors; + return errors === 0; +} +exports.validateScheduleBody = validate26; +const schema11 = { + type: 'object', + required: ['Experiment', 'Time'], + properties: { + Experiment: { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Combined: { + type: 'boolean', + description: + 'If true, show only one timetable per device instead of one for all available physical devices.', + }, + onlyOwn: { + type: 'boolean', + description: + '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleBody', + 'x-location': '#/paths//schedule/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate26( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate26.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema11.required, + parentSchema: schema11, + data, + }, + ]; + return false; + } else { + if (data.Experiment !== undefined) { + let data0 = data.Experiment; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.Devices === undefined && (missing1 = 'Devices')) { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema11.properties.Experiment.required, + parentSchema: schema11.properties.Experiment, + data: data0, + }, + ]; + return false; + } else { + if (data0.Devices !== undefined) { + let data1 = data0.Devices; + const _errs3 = errors; + if (errors === _errs3) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs5 = errors; + if (errors === _errs5) { + if ( + data2 && + typeof data2 == 'object' && + !Array.isArray(data2) + ) { + let missing2; + if (data2.ID === undefined && (missing2 = 'ID')) { + validate26.errors = [ + { + instancePath: + instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema11.properties.Experiment.properties.Devices + .items.required, + parentSchema: + schema11.properties.Experiment.properties.Devices + .items, + data: data2, + }, + ]; + return false; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate26.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema11.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.properties.Experiment.properties + .Devices.items.properties.ID.type, + parentSchema: + schema11.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema11.properties.Experiment.properties.Devices.items + .type, + parentSchema: + schema11.properties.Experiment.properties.Devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs5 === errors; + if (!valid2) { + break; + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment/Devices', + schemaPath: '#/properties/Experiment/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema11.properties.Experiment.properties.Devices.type, + parentSchema: schema11.properties.Experiment.properties.Devices, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Description !== undefined) { + let data4 = data0.Description; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment/Description', + schemaPath: + '#/properties/Experiment/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.properties.Experiment.properties.Description.type, + parentSchema: + schema11.properties.Experiment.properties.Description, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.properties.Experiment.type, + parentSchema: schema11.properties.Experiment, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data5 = data.Time; + const _errs11 = errors; + if (errors === _errs11) { + if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { + let missing3; + if ( + (data5.Start === undefined && (missing3 = 'Start')) || + (data5.End === undefined && (missing3 = 'End')) + ) { + validate26.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema11.properties.Time.required, + parentSchema: schema11.properties.Time, + data: data5, + }, + ]; + return false; + } else { + if (data5.Start !== undefined) { + let data6 = data5.Start; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats2.validate(data6)) { + validate26.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema11.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.properties.Time.properties.Start.type, + parentSchema: schema11.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data5.End !== undefined) { + let data7 = data5.End; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats2.validate(data7)) { + validate26.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema11.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.properties.Time.properties.End.type, + parentSchema: schema11.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.properties.Time.type, + parentSchema: schema11.properties.Time, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Combined !== undefined) { + let data8 = data.Combined; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate26.errors = [ + { + instancePath: instancePath + '/Combined', + schemaPath: '#/properties/Combined/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema11.properties.Combined.type, + parentSchema: schema11.properties.Combined, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.onlyOwn !== undefined) { + let data9 = data.onlyOwn; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate26.errors = [ + { + instancePath: instancePath + '/onlyOwn', + schemaPath: '#/properties/onlyOwn/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema11.properties.onlyOwn.type, + parentSchema: schema11.properties.onlyOwn, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } else { + validate26.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.type, + parentSchema: schema11, + data, + }, + ]; + return false; + } + } + validate26.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse200 = validate27; +const schema12 = { + type: 'array', + items: { + type: 'object', + required: ['Device', 'Booked', 'Free'], + properties: { + Device: { type: 'string', description: 'ID of the device (or * if combined).' }, + Booked: { + type: 'array', + description: 'Array of booked times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + Free: { + type: 'array', + description: 'Array of free times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleResponse200', + 'x-location': '#/paths//schedule/post/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate27( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Device === undefined && (missing0 = 'Device')) || + (data0.Booked === undefined && (missing0 = 'Booked')) || + (data0.Free === undefined && (missing0 = 'Free')) + ) { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema12.items.required, + parentSchema: schema12.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Device !== undefined) { + let data1 = data0.Device; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Device', + schemaPath: '#/items/properties/Device/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema12.items.properties.Device.type, + parentSchema: schema12.items.properties.Device, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Booked !== undefined) { + let data2 = data0.Booked; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len1 = data2.length; + for (let i1 = 0; i1 < len1; i1++) { + let data3 = data2[i1]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.Start === undefined && (missing1 = 'Start')) || + (data3.End === undefined && (missing1 = 'End')) + ) { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema12.items.properties.Booked.items.required, + parentSchema: schema12.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Booked.items + .properties.Start.type, + parentSchema: + schema12.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Booked.items + .properties.End.type, + parentSchema: + schema12.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema12.items.properties.Booked.items.type, + parentSchema: schema12.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked', + schemaPath: '#/items/properties/Booked/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema12.items.properties.Booked.type, + parentSchema: schema12.items.properties.Booked, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Free !== undefined) { + let data6 = data0.Free; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid4 = true; + const len2 = data6.length; + for (let i2 = 0; i2 < len2; i2++) { + let data7 = data6[i2]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if ( + (data7.Start === undefined && (missing2 = 'Start')) || + (data7.End === undefined && (missing2 = 'End')) + ) { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema12.items.properties.Free.items.required, + parentSchema: schema12.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.Start !== undefined) { + let data8 = data7.Start; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats2.validate(data8)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Free.items + .properties.Start.type, + parentSchema: + schema12.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } + } + var valid5 = _errs17 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data7.End !== undefined) { + let data9 = data7.End; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats2.validate(data9)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Free.items + .properties.End.type, + parentSchema: + schema12.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } + } + var valid5 = _errs19 === errors; + } else { + var valid5 = true; + } + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema12.items.properties.Free.items.type, + parentSchema: schema12.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } + } + var valid4 = _errs15 === errors; + if (!valid4) { + break; + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free', + schemaPath: '#/items/properties/Free/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema12.items.properties.Free.type, + parentSchema: schema12.items.properties.Free, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema12.items.type, + parentSchema: schema12.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate27.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema12.type, + parentSchema: schema12, + data, + }, + ]; + return false; + } + } + validate27.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse404 = validate28; +const schema13 = { + type: 'string', + description: 'First unknown device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse404', + 'x-location': '#/paths//schedule/post/responses/404/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate28( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate28.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema13.type, + parentSchema: schema13, + data, + }, + ]; + return false; + } + validate28.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse422 = validate29; +const schema14 = { + type: 'string', + description: 'First virtual device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse422', + 'x-location': '#/paths//schedule/post/responses/422/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate29( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate29.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.type, + parentSchema: schema14, + data, + }, + ]; + return false; + } + validate29.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse500 = validate30; +const schema15 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'scheduleResponse500', + 'x-location': '#/paths//schedule/post/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate30( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate30.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.type, + parentSchema: schema15, + data, + }, + ]; + return false; + } + validate30.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingBody = validate31; +const schema16 = { + type: 'object', + required: ['Devices', 'Time'], + properties: { + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingBody', + 'x-location': '#/paths//booking/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate31( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate31.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema16.required, + parentSchema: schema16, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema16.properties.Devices.items.required, + parentSchema: schema16.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema16.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema16.properties.Devices.items.properties.ID.type, + parentSchema: + schema16.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.properties.Devices.items.type, + parentSchema: schema16.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema16.properties.Devices.type, + parentSchema: schema16.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data3 = data.Time; + const _errs7 = errors; + if (errors === _errs7) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing2; + if ( + (data3.Start === undefined && (missing2 = 'Start')) || + (data3.End === undefined && (missing2 = 'End')) + ) { + validate31.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema16.properties.Time.required, + parentSchema: schema16.properties.Time, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate31.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema16.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Time.properties.Start.type, + parentSchema: schema16.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate31.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema16.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Time.properties.End.type, + parentSchema: schema16.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.properties.Time.type, + parentSchema: schema16.properties.Time, + data: data3, + }, + ]; + return false; + } + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Type.type, + parentSchema: schema16.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate31.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema16.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema16.properties.Type.enum, + parentSchema: schema16.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate31.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.type, + parentSchema: schema16, + data, + }, + ]; + return false; + } + } + validate31.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse200 = validate32; +const schema17 = { + type: 'object', + required: ['BookingID'], + properties: { + BookingID: { + type: 'string', + format: 'uri', + description: 'ID at which the booking can be managed.', + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingResponse200', + 'x-location': '#/paths//booking/post/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate32( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate32.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema17.required, + parentSchema: schema17, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate32.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema17.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.BookingID.type, + parentSchema: schema17.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate32.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.type, + parentSchema: schema17, + data, + }, + ]; + return false; + } + } + validate32.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse500 = validate33; +const schema18 = { + description: 'Error description', + type: 'string', + 'x-standalone': false, + 'x-name': 'newBookingResponse500', + 'x-location': '#/paths//booking/post/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate33( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate33.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.type, + parentSchema: schema18, + data, + }, + ]; + return false; + } + validate33.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingBody = validate34; +const schema19 = { + anyOf: [ + { + type: 'object', + description: 'Use this request for adding devices.', + properties: { + Locked: { + type: 'boolean', + description: + 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', + }, + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + }, + }, + { + type: 'object', + description: 'Use this request for adding callbacks.', + properties: { + Callback: { + type: 'string', + format: 'uri', + description: 'Callback which should be called at changes.', + }, + }, + }, + ], + 'x-standalone': false, + 'x-name': 'updateBookingBody', + 'x-location': '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate34( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Locked !== undefined) { + let data0 = data.Locked; + const _errs3 = errors; + if (typeof data0 !== 'boolean') { + const err0 = { + instancePath: instancePath + '/Locked', + schemaPath: '#/anyOf/0/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema19.anyOf[0].properties.Locked.type, + parentSchema: schema19.anyOf[0].properties.Locked, + data: data0, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.Devices !== undefined) { + let data1 = data.Devices; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing0; + if (data2.ID === undefined && (missing0 = 'ID')) { + const err1 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema19.anyOf[0].properties.Devices.items.required, + parentSchema: schema19.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + const err2 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema19.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } else { + const err3 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema19.anyOf[0].properties.Devices.items.properties.ID + .type, + parentSchema: + schema19.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + } + } + } + } + } else { + const err4 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.anyOf[0].properties.Devices.items.type, + parentSchema: schema19.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + const err5 = { + instancePath: instancePath + '/Devices', + schemaPath: '#/anyOf/0/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema19.anyOf[0].properties.Devices.type, + parentSchema: schema19.anyOf[0].properties.Devices, + data: data1, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.anyOf[0].type, + parentSchema: schema19.anyOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Callback !== undefined) { + let data4 = data.Callback; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + const err7 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema19.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema19.anyOf[1].properties.Callback.type, + parentSchema: schema19.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } else { + const err9 = { + instancePath, + schemaPath: '#/anyOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.anyOf[1].type, + parentSchema: schema19.anyOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var _valid0 = _errs11 === errors; + valid0 = valid0 || _valid0; + } + if (!valid0) { + const err10 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema19.anyOf, + parentSchema: schema19, + data, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + validate34.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate34.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse200 = validate35; +const schema20 = { + type: 'object', + required: ['BookingID'], + properties: { BookingID: { type: 'string', format: 'uri' } }, + 'x-standalone': false, + 'x-name': 'updateBookingResponse200', + 'x-location': + '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate35( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate35.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema20.required, + parentSchema: schema20, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate35.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema20.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema20.properties.BookingID.type, + parentSchema: schema20.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate35.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema20.type, + parentSchema: schema20, + data, + }, + ]; + return false; + } + } + validate35.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse400 = validate36; +const schema21 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse400', + 'x-location': + '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate36( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate36.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.type, + parentSchema: schema21, + data, + }, + ]; + return false; + } + validate36.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse500 = validate37; +const schema22 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate37( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate37.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.type, + parentSchema: schema22, + data, + }, + ]; + return false; + } + validate37.errors = vErrors; + return errors === 0; +} +exports.validateDeleteBookingResponse500 = validate38; +const schema23 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'deleteBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate38( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate38.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.type, + parentSchema: schema23, + data, + }, + ]; + return false; + } + validate38.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse200 = validate39; +const schema24 = { + type: 'object', + required: ['Booking', 'Locked'], + properties: { + Booking: { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + }, + Locked: { + type: 'boolean', + description: 'Shows if the booking is in a locked status.', + }, + }, + 'x-standalone': false, + 'x-name': 'getBookingResponse200', + 'x-location': '#/paths//booking/{ID}/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate39( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Booking === undefined && (missing0 = 'Booking')) || + (data.Locked === undefined && (missing0 = 'Locked')) + ) { + validate39.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema24.required, + parentSchema: schema24, + data, + }, + ]; + return false; + } else { + if (data.Booking !== undefined) { + let data0 = data.Booking; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.ID === undefined && (missing1 = 'ID')) || + (data0.Time === undefined && (missing1 = 'Time')) || + (data0.Devices === undefined && (missing1 = 'Devices')) || + (data0.Status === undefined && (missing1 = 'Status')) || + (data0.You === undefined && (missing1 = 'You')) || + (data0.External === undefined && (missing1 = 'External')) + ) { + validate39.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema24.properties.Booking.required, + parentSchema: schema24.properties.Booking, + data: data0, + }, + ]; + return false; + } else { + if (data0.ID !== undefined) { + let data1 = data0.ID; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema24.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema24.properties.Booking.properties.ID.type, + parentSchema: schema24.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Time !== undefined) { + let data2 = data0.Time; + const _errs5 = errors; + if (errors === _errs5) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if ( + (data2.Start === undefined && (missing2 = 'Start')) || + (data2.End === undefined && (missing2 = 'End')) + ) { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema24.properties.Booking.properties.Time.required, + parentSchema: schema24.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } else { + if (data2.Start !== undefined) { + let data3 = data2.Start; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate39.errors = [ + { + instancePath: + instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema24.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema24.properties.Booking.properties.Time + .properties.Start.type, + parentSchema: + schema24.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data2.End !== undefined) { + let data4 = data2.End; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate39.errors = [ + { + instancePath: + instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema24.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema24.properties.Booking.properties.Time + .properties.End.type, + parentSchema: + schema24.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema24.properties.Booking.properties.Time.type, + parentSchema: schema24.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Devices !== undefined) { + let data5 = data0.Devices; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate39.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema24.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } else { + validate39.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema24.properties.Booking.properties.Devices + .items.type, + parentSchema: + schema24.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } + } + var valid3 = _errs13 === errors; + if (!valid3) { + break; + } + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/Devices', + schemaPath: '#/properties/Booking/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema24.properties.Booking.properties.Devices.type, + parentSchema: + schema24.properties.Booking.properties.Devices, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Type !== undefined) { + let data7 = data0.Type; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema24.properties.Booking.properties.Type.type, + parentSchema: schema24.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + if (!(data7 === 'normal')) { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/enum', + keyword: 'enum', + params: { + allowedValues: + schema24.properties.Booking.properties.Type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema24.properties.Booking.properties.Type.enum, + parentSchema: schema24.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + var valid1 = _errs15 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Status !== undefined) { + let data8 = data0.Status; + const _errs17 = errors; + if (typeof data8 !== 'string') { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema24.properties.Booking.properties.Status.type, + parentSchema: + schema24.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + if ( + !( + data8 === 'pending' || + data8 === 'booked' || + data8 === 'rejected' || + data8 === 'cancelled' || + data8 === 'active' || + data8 === 'active-pending' || + data8 === 'active-rejected' + ) + ) { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/enum', + keyword: 'enum', + params: { + allowedValues: + schema24.properties.Booking.properties.Status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema24.properties.Booking.properties.Status.enum, + parentSchema: + schema24.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + var valid1 = _errs17 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.You !== undefined) { + let data9 = data0.You; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/You', + schemaPath: '#/properties/Booking/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema24.properties.Booking.properties.You.type, + parentSchema: + schema24.properties.Booking.properties.You, + data: data9, + }, + ]; + return false; + } + var valid1 = _errs19 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.External !== undefined) { + let data10 = data0.External; + const _errs21 = errors; + if (typeof data10 !== 'boolean') { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/External', + schemaPath: + '#/properties/Booking/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema24.properties.Booking.properties.External + .type, + parentSchema: + schema24.properties.Booking.properties.External, + data: data10, + }, + ]; + return false; + } + var valid1 = _errs21 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Message !== undefined) { + let data11 = data0.Message; + const _errs23 = errors; + if (typeof data11 !== 'string') { + validate39.errors = [ + { + instancePath: instancePath + '/Booking/Message', + schemaPath: + '#/properties/Booking/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema24.properties.Booking.properties.Message + .type, + parentSchema: + schema24.properties.Booking.properties.Message, + data: data11, + }, + ]; + return false; + } + var valid1 = _errs23 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema24.properties.Booking.type, + parentSchema: schema24.properties.Booking, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Locked !== undefined) { + let data12 = data.Locked; + const _errs25 = errors; + if (typeof data12 !== 'boolean') { + validate39.errors = [ + { + instancePath: instancePath + '/Locked', + schemaPath: '#/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema24.properties.Locked.type, + parentSchema: schema24.properties.Locked, + data: data12, + }, + ]; + return false; + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate39.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema24.type, + parentSchema: schema24, + data, + }, + ]; + return false; + } + } + validate39.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse500 = validate40; +const schema25 = { + type: 'string', + description: 'Error code', + 'x-standalone': false, + 'x-name': 'getBookingResponse500', + 'x-location': '#/paths//booking/{ID}/get/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate40( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate40.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.type, + parentSchema: schema25, + data, + }, + ]; + return false; + } + validate40.errors = vErrors; + return errors === 0; +} +exports.validateDestroyBookingResponse500 = validate41; +const schema26 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'destroyBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/destroy/delete/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate41( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate41.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.type, + parentSchema: schema26, + data, + }, + ]; + return false; + } + validate41.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse200 = validate42; +const schema27 = { + type: 'array', + description: + 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', + items: { + type: 'object', + required: ['Requested', 'Selected'], + properties: { + Requested: { type: 'string', format: 'uri' }, + Selected: { type: 'string', format: 'uri' }, + }, + }, + 'x-standalone': false, + 'x-name': 'lockBookingResponse200', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate42( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Requested === undefined && (missing0 = 'Requested')) || + (data0.Selected === undefined && (missing0 = 'Selected')) + ) { + validate42.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema27.items.required, + parentSchema: schema27.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Requested !== undefined) { + let data1 = data0.Requested; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate42.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema27.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.items.properties.Requested.type, + parentSchema: schema27.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Selected !== undefined) { + let data2 = data0.Selected; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate42.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema27.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.items.properties.Selected.type, + parentSchema: schema27.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.items.type, + parentSchema: schema27.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate42.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.type, + parentSchema: schema27, + data, + }, + ]; + return false; + } + } + validate42.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse500 = validate43; +const schema28 = { + type: 'string', + description: 'Error string', + 'x-standalone': false, + 'x-name': 'lockBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate43( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate43.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema28.type, + parentSchema: schema28, + data, + }, + ]; + return false; + } + validate43.errors = vErrors; + return errors === 0; +} +exports.validateUnlockBookingResponse500 = validate44; +const schema29 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'unlockBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate44( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate44.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema29.type, + parentSchema: schema29, + data, + }, + ]; + return false; + } + validate44.errors = vErrors; + return errors === 0; +} +exports.validateBookingCallbackResponse500 = validate45; +const schema30 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'bookingCallbackResponse500', + 'x-location': + '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate45( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate45.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema30.type, + parentSchema: schema30, + data, + }, + ]; + return false; + } + validate45.errors = vErrors; + return errors === 0; +} +exports.validateBookingRequest = validate46; +const schema31 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingRequest', + 'x-location': '#/components/schemas/Booking_request', + 'x-schema-type': 'request', +}; +function validate46( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate46.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema31.required, + parentSchema: schema31, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate46.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema31.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate46.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.properties.ID.type, + parentSchema: schema31.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate46.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema31.properties.Time.required, + parentSchema: schema31.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate46.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema31.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate46.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.properties.Time.properties.Start.type, + parentSchema: schema31.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate46.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema31.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate46.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.properties.Time.properties.End.type, + parentSchema: schema31.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate46.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema31.properties.Time.type, + parentSchema: schema31.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate46.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema31.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate46.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.properties.Devices.items.type, + parentSchema: schema31.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate46.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema31.properties.Devices.type, + parentSchema: schema31.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate46.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.properties.Type.type, + parentSchema: schema31.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate46.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema31.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema31.properties.Type.enum, + parentSchema: schema31.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate46.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.properties.Status.type, + parentSchema: schema31.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate46.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema31.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema31.properties.Status.enum, + parentSchema: schema31.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate46.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema31.properties.You.type, + parentSchema: schema31.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate46.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema31.properties.External.type, + parentSchema: schema31.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate46.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.properties.Message.type, + parentSchema: schema31.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate46.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema31.type, + parentSchema: schema31, + data, + }, + ]; + return false; + } + } + validate46.errors = vErrors; + return errors === 0; +} +exports.validateBookingResponse = validate47; +const schema32 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingResponse', + 'x-location': '#/components/schemas/Booking_response', + 'x-schema-type': 'response', +}; +function validate47( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate47.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema32.required, + parentSchema: schema32, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate47.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema32.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.properties.ID.type, + parentSchema: schema32.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate47.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema32.properties.Time.required, + parentSchema: schema32.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate47.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema32.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.properties.Time.properties.Start.type, + parentSchema: schema32.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate47.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema32.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.properties.Time.properties.End.type, + parentSchema: schema32.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema32.properties.Time.type, + parentSchema: schema32.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate47.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema32.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.properties.Devices.items.type, + parentSchema: schema32.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema32.properties.Devices.type, + parentSchema: schema32.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate47.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.properties.Type.type, + parentSchema: schema32.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate47.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema32.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema32.properties.Type.enum, + parentSchema: schema32.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate47.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.properties.Status.type, + parentSchema: schema32.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate47.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema32.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema32.properties.Status.enum, + parentSchema: schema32.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate47.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema32.properties.You.type, + parentSchema: schema32.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate47.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema32.properties.External.type, + parentSchema: schema32.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate47.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.properties.Message.type, + parentSchema: schema32.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate47.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema32.type, + parentSchema: schema32, + data, + }, + ]; + return false; + } + } + validate47.errors = vErrors; + return errors === 0; +} +exports.validateDeviceRequest = validate48; +const schema33 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceRequest', + 'x-location': '#/components/schemas/Device_request', + 'x-schema-type': 'request', +}; +function validate48( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate48.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema33.required, + parentSchema: schema33, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate48.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema33.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate48.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema33.properties.ID.type, + parentSchema: schema33.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate48.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema33.type, + parentSchema: schema33, + data, + }, + ]; + return false; + } + } + validate48.errors = vErrors; + return errors === 0; +} +exports.validateDeviceResponse = validate49; +const schema34 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceResponse', + 'x-location': '#/components/schemas/Device_response', + 'x-schema-type': 'response', +}; +function validate49( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate49.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema34.required, + parentSchema: schema34, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate49.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema34.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate49.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema34.properties.ID.type, + parentSchema: schema34.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate49.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema34.type, + parentSchema: schema34, + data, + }, + ]; + return false; + } + } + validate49.errors = vErrors; + return errors === 0; +} +exports.validateExperimentRequest = validate50; +const schema35 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentRequest', + 'x-location': '#/components/schemas/Experiment_request', + 'x-schema-type': 'request', +}; +function validate50( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate50.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema35.required, + parentSchema: schema35, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate50.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema35.properties.Devices.items.required, + parentSchema: schema35.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate50.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema35.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate50.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema35.properties.Devices.items.properties.ID.type, + parentSchema: + schema35.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate50.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema35.properties.Devices.items.type, + parentSchema: schema35.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate50.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema35.properties.Devices.type, + parentSchema: schema35.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate50.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema35.properties.Description.type, + parentSchema: schema35.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate50.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema35.type, + parentSchema: schema35, + data, + }, + ]; + return false; + } + } + validate50.errors = vErrors; + return errors === 0; +} +exports.validateExperimentResponse = validate51; +const schema36 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentResponse', + 'x-location': '#/components/schemas/Experiment_response', + 'x-schema-type': 'response', +}; +function validate51( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate51.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema36.required, + parentSchema: schema36, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate51.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema36.properties.Devices.items.required, + parentSchema: schema36.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate51.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema36.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate51.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema36.properties.Devices.items.properties.ID.type, + parentSchema: + schema36.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate51.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema36.properties.Devices.items.type, + parentSchema: schema36.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate51.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema36.properties.Devices.type, + parentSchema: schema36.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate51.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema36.properties.Description.type, + parentSchema: schema36.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate51.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema36.type, + parentSchema: schema36, + data, + }, + ]; + return false; + } + } + validate51.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotRequest = validate52; +const schema37 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotRequest', + 'x-location': '#/components/schemas/Timeslot_request', + 'x-schema-type': 'request', +}; +function validate52( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate52.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema37.required, + parentSchema: schema37, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate52.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema37.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate52.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema37.properties.Start.type, + parentSchema: schema37.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate52.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema37.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate52.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema37.properties.End.type, + parentSchema: schema37.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate52.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema37.type, + parentSchema: schema37, + data, + }, + ]; + return false; + } + } + validate52.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotResponse = validate53; +const schema38 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotResponse', + 'x-location': '#/components/schemas/Timeslot_response', + 'x-schema-type': 'response', +}; +function validate53( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate53.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema38.required, + parentSchema: schema38, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate53.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema38.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate53.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema38.properties.Start.type, + parentSchema: schema38.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate53.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema38.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate53.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema38.properties.End.type, + parentSchema: schema38.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate53.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema38.type, + parentSchema: schema38, + data, + }, + ]; + return false; + } + } + validate53.errors = vErrors; + return errors === 0; +} +exports.validateIDRequest = validate54; +const schema39 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDRequest', + 'x-location': '#/components/parameters/ID/schema_request', + 'x-schema-type': 'request', +}; +function validate54( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate54.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema39.type, + parentSchema: schema39, + data, + }, + ]; + return false; + } + validate54.errors = vErrors; + return errors === 0; +} +exports.validateIDResponse = validate55; +const schema40 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDResponse', + 'x-location': '#/components/parameters/ID/schema_response', + 'x-schema-type': 'response', +}; +function validate55( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate55.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema40.type, + parentSchema: schema40, + data, + }, + ]; + return false; + } + validate55.errors = vErrors; + return errors === 0; +} +exports.validateScheduleBodyRequest = validate56; +const schema41 = { + type: 'object', + required: ['Experiment', 'Time'], + properties: { + Experiment: { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Combined: { + type: 'boolean', + description: + 'If true, show only one timetable per device instead of one for all available physical devices.', + }, + onlyOwn: { + type: 'boolean', + description: + '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleBodyRequest', + 'x-location': + '#/paths//schedule/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate56( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate56.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema41.required, + parentSchema: schema41, + data, + }, + ]; + return false; + } else { + if (data.Experiment !== undefined) { + let data0 = data.Experiment; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.Devices === undefined && (missing1 = 'Devices')) { + validate56.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema41.properties.Experiment.required, + parentSchema: schema41.properties.Experiment, + data: data0, + }, + ]; + return false; + } else { + if (data0.Devices !== undefined) { + let data1 = data0.Devices; + const _errs3 = errors; + if (errors === _errs3) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs5 = errors; + if (errors === _errs5) { + if ( + data2 && + typeof data2 == 'object' && + !Array.isArray(data2) + ) { + let missing2; + if (data2.ID === undefined && (missing2 = 'ID')) { + validate56.errors = [ + { + instancePath: + instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema41.properties.Experiment.properties.Devices + .items.required, + parentSchema: + schema41.properties.Experiment.properties.Devices + .items, + data: data2, + }, + ]; + return false; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate56.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema41.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } else { + validate56.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema41.properties.Experiment.properties + .Devices.items.properties.ID.type, + parentSchema: + schema41.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } + } + } + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema41.properties.Experiment.properties.Devices.items + .type, + parentSchema: + schema41.properties.Experiment.properties.Devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs5 === errors; + if (!valid2) { + break; + } + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/Experiment/Devices', + schemaPath: '#/properties/Experiment/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema41.properties.Experiment.properties.Devices.type, + parentSchema: schema41.properties.Experiment.properties.Devices, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Description !== undefined) { + let data4 = data0.Description; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate56.errors = [ + { + instancePath: instancePath + '/Experiment/Description', + schemaPath: + '#/properties/Experiment/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema41.properties.Experiment.properties.Description.type, + parentSchema: + schema41.properties.Experiment.properties.Description, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema41.properties.Experiment.type, + parentSchema: schema41.properties.Experiment, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data5 = data.Time; + const _errs11 = errors; + if (errors === _errs11) { + if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { + let missing3; + if ( + (data5.Start === undefined && (missing3 = 'Start')) || + (data5.End === undefined && (missing3 = 'End')) + ) { + validate56.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema41.properties.Time.required, + parentSchema: schema41.properties.Time, + data: data5, + }, + ]; + return false; + } else { + if (data5.Start !== undefined) { + let data6 = data5.Start; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats2.validate(data6)) { + validate56.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema41.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema41.properties.Time.properties.Start.type, + parentSchema: schema41.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data5.End !== undefined) { + let data7 = data5.End; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats2.validate(data7)) { + validate56.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema41.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema41.properties.Time.properties.End.type, + parentSchema: schema41.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema41.properties.Time.type, + parentSchema: schema41.properties.Time, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Combined !== undefined) { + let data8 = data.Combined; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate56.errors = [ + { + instancePath: instancePath + '/Combined', + schemaPath: '#/properties/Combined/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema41.properties.Combined.type, + parentSchema: schema41.properties.Combined, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.onlyOwn !== undefined) { + let data9 = data.onlyOwn; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate56.errors = [ + { + instancePath: instancePath + '/onlyOwn', + schemaPath: '#/properties/onlyOwn/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema41.properties.onlyOwn.type, + parentSchema: schema41.properties.onlyOwn, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } else { + validate56.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema41.type, + parentSchema: schema41, + data, + }, + ]; + return false; + } + } + validate56.errors = vErrors; + return errors === 0; +} +exports.validateScheduleBodyResponse = validate57; +const schema42 = { + type: 'object', + required: ['Experiment', 'Time'], + properties: { + Experiment: { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Combined: { + type: 'boolean', + description: + 'If true, show only one timetable per device instead of one for all available physical devices.', + }, + onlyOwn: { + type: 'boolean', + description: + '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleBodyResponse', + 'x-location': + '#/paths//schedule/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate57( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate57.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema42.required, + parentSchema: schema42, + data, + }, + ]; + return false; + } else { + if (data.Experiment !== undefined) { + let data0 = data.Experiment; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.Devices === undefined && (missing1 = 'Devices')) { + validate57.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema42.properties.Experiment.required, + parentSchema: schema42.properties.Experiment, + data: data0, + }, + ]; + return false; + } else { + if (data0.Devices !== undefined) { + let data1 = data0.Devices; + const _errs3 = errors; + if (errors === _errs3) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs5 = errors; + if (errors === _errs5) { + if ( + data2 && + typeof data2 == 'object' && + !Array.isArray(data2) + ) { + let missing2; + if (data2.ID === undefined && (missing2 = 'ID')) { + validate57.errors = [ + { + instancePath: + instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema42.properties.Experiment.properties.Devices + .items.required, + parentSchema: + schema42.properties.Experiment.properties.Devices + .items, + data: data2, + }, + ]; + return false; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate57.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema42.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } else { + validate57.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema42.properties.Experiment.properties + .Devices.items.properties.ID.type, + parentSchema: + schema42.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } + } + } + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema42.properties.Experiment.properties.Devices.items + .type, + parentSchema: + schema42.properties.Experiment.properties.Devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs5 === errors; + if (!valid2) { + break; + } + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/Experiment/Devices', + schemaPath: '#/properties/Experiment/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema42.properties.Experiment.properties.Devices.type, + parentSchema: schema42.properties.Experiment.properties.Devices, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Description !== undefined) { + let data4 = data0.Description; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/Experiment/Description', + schemaPath: + '#/properties/Experiment/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema42.properties.Experiment.properties.Description.type, + parentSchema: + schema42.properties.Experiment.properties.Description, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.properties.Experiment.type, + parentSchema: schema42.properties.Experiment, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data5 = data.Time; + const _errs11 = errors; + if (errors === _errs11) { + if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { + let missing3; + if ( + (data5.Start === undefined && (missing3 = 'Start')) || + (data5.End === undefined && (missing3 = 'End')) + ) { + validate57.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema42.properties.Time.required, + parentSchema: schema42.properties.Time, + data: data5, + }, + ]; + return false; + } else { + if (data5.Start !== undefined) { + let data6 = data5.Start; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats2.validate(data6)) { + validate57.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema42.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema42.properties.Time.properties.Start.type, + parentSchema: schema42.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data5.End !== undefined) { + let data7 = data5.End; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats2.validate(data7)) { + validate57.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema42.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema42.properties.Time.properties.End.type, + parentSchema: schema42.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.properties.Time.type, + parentSchema: schema42.properties.Time, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Combined !== undefined) { + let data8 = data.Combined; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate57.errors = [ + { + instancePath: instancePath + '/Combined', + schemaPath: '#/properties/Combined/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema42.properties.Combined.type, + parentSchema: schema42.properties.Combined, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.onlyOwn !== undefined) { + let data9 = data.onlyOwn; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate57.errors = [ + { + instancePath: instancePath + '/onlyOwn', + schemaPath: '#/properties/onlyOwn/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema42.properties.onlyOwn.type, + parentSchema: schema42.properties.onlyOwn, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } else { + validate57.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.type, + parentSchema: schema42, + data, + }, + ]; + return false; + } + } + validate57.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse200Request = validate58; +const schema43 = { + type: 'array', + items: { + type: 'object', + required: ['Device', 'Booked', 'Free'], + properties: { + Device: { type: 'string', description: 'ID of the device (or * if combined).' }, + Booked: { + type: 'array', + description: 'Array of booked times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + Free: { + type: 'array', + description: 'Array of free times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleResponse200Request', + 'x-location': + '#/paths//schedule/post/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate58( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Device === undefined && (missing0 = 'Device')) || + (data0.Booked === undefined && (missing0 = 'Booked')) || + (data0.Free === undefined && (missing0 = 'Free')) + ) { + validate58.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema43.items.required, + parentSchema: schema43.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Device !== undefined) { + let data1 = data0.Device; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Device', + schemaPath: '#/items/properties/Device/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema43.items.properties.Device.type, + parentSchema: schema43.items.properties.Device, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Booked !== undefined) { + let data2 = data0.Booked; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len1 = data2.length; + for (let i1 = 0; i1 < len1; i1++) { + let data3 = data2[i1]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.Start === undefined && (missing1 = 'Start')) || + (data3.End === undefined && (missing1 = 'End')) + ) { + validate58.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema43.items.properties.Booked.items.required, + parentSchema: schema43.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate58.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema43.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.items.properties.Booked.items + .properties.Start.type, + parentSchema: + schema43.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate58.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema43.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.items.properties.Booked.items + .properties.End.type, + parentSchema: + schema43.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.items.properties.Booked.items.type, + parentSchema: schema43.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked', + schemaPath: '#/items/properties/Booked/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema43.items.properties.Booked.type, + parentSchema: schema43.items.properties.Booked, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Free !== undefined) { + let data6 = data0.Free; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid4 = true; + const len2 = data6.length; + for (let i2 = 0; i2 < len2; i2++) { + let data7 = data6[i2]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if ( + (data7.Start === undefined && (missing2 = 'Start')) || + (data7.End === undefined && (missing2 = 'End')) + ) { + validate58.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema43.items.properties.Free.items.required, + parentSchema: schema43.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.Start !== undefined) { + let data8 = data7.Start; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats2.validate(data8)) { + validate58.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema43.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.items.properties.Free.items + .properties.Start.type, + parentSchema: + schema43.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } + } + var valid5 = _errs17 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data7.End !== undefined) { + let data9 = data7.End; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats2.validate(data9)) { + validate58.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema43.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.items.properties.Free.items + .properties.End.type, + parentSchema: + schema43.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } + } + var valid5 = _errs19 === errors; + } else { + var valid5 = true; + } + } + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.items.properties.Free.items.type, + parentSchema: schema43.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } + } + var valid4 = _errs15 === errors; + if (!valid4) { + break; + } + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free', + schemaPath: '#/items/properties/Free/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema43.items.properties.Free.type, + parentSchema: schema43.items.properties.Free, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.items.type, + parentSchema: schema43.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate58.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema43.type, + parentSchema: schema43, + data, + }, + ]; + return false; + } + } + validate58.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse200Response = validate59; +const schema44 = { + type: 'array', + items: { + type: 'object', + required: ['Device', 'Booked', 'Free'], + properties: { + Device: { type: 'string', description: 'ID of the device (or * if combined).' }, + Booked: { + type: 'array', + description: 'Array of booked times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + Free: { + type: 'array', + description: 'Array of free times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleResponse200Response', + 'x-location': + '#/paths//schedule/post/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate59( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Device === undefined && (missing0 = 'Device')) || + (data0.Booked === undefined && (missing0 = 'Booked')) || + (data0.Free === undefined && (missing0 = 'Free')) + ) { + validate59.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema44.items.required, + parentSchema: schema44.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Device !== undefined) { + let data1 = data0.Device; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate59.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Device', + schemaPath: '#/items/properties/Device/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema44.items.properties.Device.type, + parentSchema: schema44.items.properties.Device, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Booked !== undefined) { + let data2 = data0.Booked; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len1 = data2.length; + for (let i1 = 0; i1 < len1; i1++) { + let data3 = data2[i1]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.Start === undefined && (missing1 = 'Start')) || + (data3.End === undefined && (missing1 = 'End')) + ) { + validate59.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema44.items.properties.Booked.items.required, + parentSchema: schema44.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate59.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema44.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate59.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema44.items.properties.Booked.items + .properties.Start.type, + parentSchema: + schema44.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate59.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema44.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate59.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema44.items.properties.Booked.items + .properties.End.type, + parentSchema: + schema44.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate59.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema44.items.properties.Booked.items.type, + parentSchema: schema44.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate59.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked', + schemaPath: '#/items/properties/Booked/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema44.items.properties.Booked.type, + parentSchema: schema44.items.properties.Booked, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Free !== undefined) { + let data6 = data0.Free; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid4 = true; + const len2 = data6.length; + for (let i2 = 0; i2 < len2; i2++) { + let data7 = data6[i2]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if ( + (data7.Start === undefined && (missing2 = 'Start')) || + (data7.End === undefined && (missing2 = 'End')) + ) { + validate59.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema44.items.properties.Free.items.required, + parentSchema: schema44.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.Start !== undefined) { + let data8 = data7.Start; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats2.validate(data8)) { + validate59.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema44.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } else { + validate59.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema44.items.properties.Free.items + .properties.Start.type, + parentSchema: + schema44.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } + } + var valid5 = _errs17 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data7.End !== undefined) { + let data9 = data7.End; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats2.validate(data9)) { + validate59.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema44.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } else { + validate59.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema44.items.properties.Free.items + .properties.End.type, + parentSchema: + schema44.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } + } + var valid5 = _errs19 === errors; + } else { + var valid5 = true; + } + } + } + } else { + validate59.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema44.items.properties.Free.items.type, + parentSchema: schema44.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } + } + var valid4 = _errs15 === errors; + if (!valid4) { + break; + } + } + } else { + validate59.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free', + schemaPath: '#/items/properties/Free/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema44.items.properties.Free.type, + parentSchema: schema44.items.properties.Free, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate59.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema44.items.type, + parentSchema: schema44.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate59.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema44.type, + parentSchema: schema44, + data, + }, + ]; + return false; + } + } + validate59.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse404Request = validate60; +const schema45 = { + type: 'string', + description: 'First unknown device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse404Request', + 'x-location': + '#/paths//schedule/post/responses/404/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate60( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate60.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema45.type, + parentSchema: schema45, + data, + }, + ]; + return false; + } + validate60.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse404Response = validate61; +const schema46 = { + type: 'string', + description: 'First unknown device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse404Response', + 'x-location': + '#/paths//schedule/post/responses/404/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate61( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate61.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema46.type, + parentSchema: schema46, + data, + }, + ]; + return false; + } + validate61.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse422Request = validate62; +const schema47 = { + type: 'string', + description: 'First virtual device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse422Request', + 'x-location': + '#/paths//schedule/post/responses/422/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate62( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate62.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema47.type, + parentSchema: schema47, + data, + }, + ]; + return false; + } + validate62.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse422Response = validate63; +const schema48 = { + type: 'string', + description: 'First virtual device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse422Response', + 'x-location': + '#/paths//schedule/post/responses/422/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate63( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate63.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema48.type, + parentSchema: schema48, + data, + }, + ]; + return false; + } + validate63.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse500Request = validate64; +const schema49 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'scheduleResponse500Request', + 'x-location': + '#/paths//schedule/post/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate64( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate64.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema49.type, + parentSchema: schema49, + data, + }, + ]; + return false; + } + validate64.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse500Response = validate65; +const schema50 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'scheduleResponse500Response', + 'x-location': + '#/paths//schedule/post/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate65( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate65.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema50.type, + parentSchema: schema50, + data, + }, + ]; + return false; + } + validate65.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingBodyRequest = validate66; +const schema51 = { + type: 'object', + required: ['Devices', 'Time'], + properties: { + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingBodyRequest', + 'x-location': + '#/paths//booking/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate66( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate66.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema51.required, + parentSchema: schema51, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate66.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema51.properties.Devices.items.required, + parentSchema: schema51.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate66.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema51.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate66.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema51.properties.Devices.items.properties.ID.type, + parentSchema: + schema51.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate66.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema51.properties.Devices.items.type, + parentSchema: schema51.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate66.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema51.properties.Devices.type, + parentSchema: schema51.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data3 = data.Time; + const _errs7 = errors; + if (errors === _errs7) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing2; + if ( + (data3.Start === undefined && (missing2 = 'Start')) || + (data3.End === undefined && (missing2 = 'End')) + ) { + validate66.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema51.properties.Time.required, + parentSchema: schema51.properties.Time, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate66.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema51.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate66.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema51.properties.Time.properties.Start.type, + parentSchema: schema51.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate66.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema51.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate66.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema51.properties.Time.properties.End.type, + parentSchema: schema51.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate66.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema51.properties.Time.type, + parentSchema: schema51.properties.Time, + data: data3, + }, + ]; + return false; + } + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate66.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema51.properties.Type.type, + parentSchema: schema51.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate66.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema51.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema51.properties.Type.enum, + parentSchema: schema51.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate66.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema51.type, + parentSchema: schema51, + data, + }, + ]; + return false; + } + } + validate66.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingBodyResponse = validate67; +const schema52 = { + type: 'object', + required: ['Devices', 'Time'], + properties: { + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingBodyResponse', + 'x-location': + '#/paths//booking/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate67( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate67.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema52.required, + parentSchema: schema52, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate67.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema52.properties.Devices.items.required, + parentSchema: schema52.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate67.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema52.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate67.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema52.properties.Devices.items.properties.ID.type, + parentSchema: + schema52.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate67.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema52.properties.Devices.items.type, + parentSchema: schema52.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate67.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema52.properties.Devices.type, + parentSchema: schema52.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data3 = data.Time; + const _errs7 = errors; + if (errors === _errs7) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing2; + if ( + (data3.Start === undefined && (missing2 = 'Start')) || + (data3.End === undefined && (missing2 = 'End')) + ) { + validate67.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema52.properties.Time.required, + parentSchema: schema52.properties.Time, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate67.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema52.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate67.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema52.properties.Time.properties.Start.type, + parentSchema: schema52.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate67.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema52.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate67.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema52.properties.Time.properties.End.type, + parentSchema: schema52.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate67.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema52.properties.Time.type, + parentSchema: schema52.properties.Time, + data: data3, + }, + ]; + return false; + } + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate67.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema52.properties.Type.type, + parentSchema: schema52.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate67.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema52.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema52.properties.Type.enum, + parentSchema: schema52.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate67.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema52.type, + parentSchema: schema52, + data, + }, + ]; + return false; + } + } + validate67.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse200Request = validate68; +const schema53 = { + type: 'object', + required: ['BookingID'], + properties: { + BookingID: { + type: 'string', + format: 'uri', + description: 'ID at which the booking can be managed.', + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingResponse200Request', + 'x-location': + '#/paths//booking/post/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate68( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate68.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema53.required, + parentSchema: schema53, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate68.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema53.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate68.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema53.properties.BookingID.type, + parentSchema: schema53.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate68.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema53.type, + parentSchema: schema53, + data, + }, + ]; + return false; + } + } + validate68.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse200Response = validate69; +const schema54 = { + type: 'object', + required: ['BookingID'], + properties: { + BookingID: { + type: 'string', + format: 'uri', + description: 'ID at which the booking can be managed.', + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingResponse200Response', + 'x-location': + '#/paths//booking/post/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate69( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate69.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema54.required, + parentSchema: schema54, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate69.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate69.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.properties.BookingID.type, + parentSchema: schema54.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate69.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.type, + parentSchema: schema54, + data, + }, + ]; + return false; + } + } + validate69.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse500Request = validate70; +const schema55 = { + description: 'Error description', + type: 'string', + 'x-standalone': false, + 'x-name': 'newBookingResponse500Request', + 'x-location': + '#/paths//booking/post/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate70( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate70.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.type, + parentSchema: schema55, + data, + }, + ]; + return false; + } + validate70.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse500Response = validate71; +const schema56 = { + description: 'Error description', + type: 'string', + 'x-standalone': false, + 'x-name': 'newBookingResponse500Response', + 'x-location': + '#/paths//booking/post/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate71( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate71.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.type, + parentSchema: schema56, + data, + }, + ]; + return false; + } + validate71.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingBodyRequest = validate72; +const schema57 = { + anyOf: [ + { + type: 'object', + description: 'Use this request for adding devices.', + properties: { + Locked: { + type: 'boolean', + description: + 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', + }, + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + }, + }, + { + type: 'object', + description: 'Use this request for adding callbacks.', + properties: { + Callback: { + type: 'string', + format: 'uri', + description: 'Callback which should be called at changes.', + }, + }, + }, + ], + 'x-standalone': false, + 'x-name': 'updateBookingBodyRequest', + 'x-location': + '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate72( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Locked !== undefined) { + let data0 = data.Locked; + const _errs3 = errors; + if (typeof data0 !== 'boolean') { + const err0 = { + instancePath: instancePath + '/Locked', + schemaPath: '#/anyOf/0/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema57.anyOf[0].properties.Locked.type, + parentSchema: schema57.anyOf[0].properties.Locked, + data: data0, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.Devices !== undefined) { + let data1 = data.Devices; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing0; + if (data2.ID === undefined && (missing0 = 'ID')) { + const err1 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema57.anyOf[0].properties.Devices.items.required, + parentSchema: schema57.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + const err2 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } else { + const err3 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[0].properties.Devices.items.properties.ID + .type, + parentSchema: + schema57.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + } + } + } + } + } else { + const err4 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[0].properties.Devices.items.type, + parentSchema: schema57.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + const err5 = { + instancePath: instancePath + '/Devices', + schemaPath: '#/anyOf/0/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[0].properties.Devices.type, + parentSchema: schema57.anyOf[0].properties.Devices, + data: data1, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[0].type, + parentSchema: schema57.anyOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Callback !== undefined) { + let data4 = data.Callback; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + const err7 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema57.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[1].properties.Callback.type, + parentSchema: schema57.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } else { + const err9 = { + instancePath, + schemaPath: '#/anyOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[1].type, + parentSchema: schema57.anyOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var _valid0 = _errs11 === errors; + valid0 = valid0 || _valid0; + } + if (!valid0) { + const err10 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema57.anyOf, + parentSchema: schema57, + data, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + validate72.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate72.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingBodyResponse = validate73; +const schema58 = { + anyOf: [ + { + type: 'object', + description: 'Use this request for adding devices.', + properties: { + Locked: { + type: 'boolean', + description: + 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', + }, + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + }, + }, + { + type: 'object', + description: 'Use this request for adding callbacks.', + properties: { + Callback: { + type: 'string', + format: 'uri', + description: 'Callback which should be called at changes.', + }, + }, + }, + ], + 'x-standalone': false, + 'x-name': 'updateBookingBodyResponse', + 'x-location': + '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate73( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Locked !== undefined) { + let data0 = data.Locked; + const _errs3 = errors; + if (typeof data0 !== 'boolean') { + const err0 = { + instancePath: instancePath + '/Locked', + schemaPath: '#/anyOf/0/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema58.anyOf[0].properties.Locked.type, + parentSchema: schema58.anyOf[0].properties.Locked, + data: data0, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.Devices !== undefined) { + let data1 = data.Devices; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing0; + if (data2.ID === undefined && (missing0 = 'ID')) { + const err1 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema58.anyOf[0].properties.Devices.items.required, + parentSchema: schema58.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + const err2 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } else { + const err3 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[0].properties.Devices.items.properties.ID + .type, + parentSchema: + schema58.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + } + } + } + } + } else { + const err4 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[0].properties.Devices.items.type, + parentSchema: schema58.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + const err5 = { + instancePath: instancePath + '/Devices', + schemaPath: '#/anyOf/0/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[0].properties.Devices.type, + parentSchema: schema58.anyOf[0].properties.Devices, + data: data1, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[0].type, + parentSchema: schema58.anyOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Callback !== undefined) { + let data4 = data.Callback; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + const err7 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[1].properties.Callback.type, + parentSchema: schema58.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } else { + const err9 = { + instancePath, + schemaPath: '#/anyOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[1].type, + parentSchema: schema58.anyOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var _valid0 = _errs11 === errors; + valid0 = valid0 || _valid0; + } + if (!valid0) { + const err10 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema58.anyOf, + parentSchema: schema58, + data, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + validate73.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate73.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse200Request = validate74; +const schema59 = { + type: 'object', + required: ['BookingID'], + properties: { BookingID: { type: 'string', format: 'uri' } }, + 'x-standalone': false, + 'x-name': 'updateBookingResponse200Request', + 'x-location': + '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate74( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate74.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema59.required, + parentSchema: schema59, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate74.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema59.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema59.properties.BookingID.type, + parentSchema: schema59.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate74.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema59.type, + parentSchema: schema59, + data, + }, + ]; + return false; + } + } + validate74.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse200Response = validate75; +const schema60 = { + type: 'object', + required: ['BookingID'], + properties: { BookingID: { type: 'string', format: 'uri' } }, + 'x-standalone': false, + 'x-name': 'updateBookingResponse200Response', + 'x-location': + '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate75( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate75.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema60.required, + parentSchema: schema60, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate75.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema60.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate75.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema60.properties.BookingID.type, + parentSchema: schema60.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate75.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema60.type, + parentSchema: schema60, + data, + }, + ]; + return false; + } + } + validate75.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse400Request = validate76; +const schema61 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse400Request', + 'x-location': + '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate76( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate76.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema61.type, + parentSchema: schema61, + data, + }, + ]; + return false; + } + validate76.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse400Response = validate77; +const schema62 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse400Response', + 'x-location': + '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate77( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate77.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema62.type, + parentSchema: schema62, + data, + }, + ]; + return false; + } + validate77.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse500Request = validate78; +const schema63 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate78( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate78.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema63.type, + parentSchema: schema63, + data, + }, + ]; + return false; + } + validate78.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse500Response = validate79; +const schema64 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate79( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate79.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.type, + parentSchema: schema64, + data, + }, + ]; + return false; + } + validate79.errors = vErrors; + return errors === 0; +} +exports.validateDeleteBookingResponse500Request = validate80; +const schema65 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'deleteBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate80( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate80.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema65.type, + parentSchema: schema65, + data, + }, + ]; + return false; + } + validate80.errors = vErrors; + return errors === 0; +} +exports.validateDeleteBookingResponse500Response = validate81; +const schema66 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'deleteBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate81( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate81.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema66.type, + parentSchema: schema66, + data, + }, + ]; + return false; + } + validate81.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse200Request = validate82; +const schema67 = { + type: 'object', + required: ['Booking', 'Locked'], + properties: { + Booking: { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + }, + Locked: { + type: 'boolean', + description: 'Shows if the booking is in a locked status.', + }, + }, + 'x-standalone': false, + 'x-name': 'getBookingResponse200Request', + 'x-location': + '#/paths//booking/{ID}/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate82( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Booking === undefined && (missing0 = 'Booking')) || + (data.Locked === undefined && (missing0 = 'Locked')) + ) { + validate82.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema67.required, + parentSchema: schema67, + data, + }, + ]; + return false; + } else { + if (data.Booking !== undefined) { + let data0 = data.Booking; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.ID === undefined && (missing1 = 'ID')) || + (data0.Time === undefined && (missing1 = 'Time')) || + (data0.Devices === undefined && (missing1 = 'Devices')) || + (data0.Status === undefined && (missing1 = 'Status')) || + (data0.You === undefined && (missing1 = 'You')) || + (data0.External === undefined && (missing1 = 'External')) + ) { + validate82.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema67.properties.Booking.required, + parentSchema: schema67.properties.Booking, + data: data0, + }, + ]; + return false; + } else { + if (data0.ID !== undefined) { + let data1 = data0.ID; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema67.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema67.properties.Booking.properties.ID.type, + parentSchema: schema67.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Time !== undefined) { + let data2 = data0.Time; + const _errs5 = errors; + if (errors === _errs5) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if ( + (data2.Start === undefined && (missing2 = 'Start')) || + (data2.End === undefined && (missing2 = 'End')) + ) { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema67.properties.Booking.properties.Time.required, + parentSchema: schema67.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } else { + if (data2.Start !== undefined) { + let data3 = data2.Start; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate82.errors = [ + { + instancePath: + instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema67.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.properties.Booking.properties.Time + .properties.Start.type, + parentSchema: + schema67.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data2.End !== undefined) { + let data4 = data2.End; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate82.errors = [ + { + instancePath: + instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema67.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.properties.Booking.properties.Time + .properties.End.type, + parentSchema: + schema67.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema67.properties.Booking.properties.Time.type, + parentSchema: schema67.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Devices !== undefined) { + let data5 = data0.Devices; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate82.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema67.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } else { + validate82.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.properties.Booking.properties.Devices + .items.type, + parentSchema: + schema67.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } + } + var valid3 = _errs13 === errors; + if (!valid3) { + break; + } + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/Devices', + schemaPath: '#/properties/Booking/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema67.properties.Booking.properties.Devices.type, + parentSchema: + schema67.properties.Booking.properties.Devices, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Type !== undefined) { + let data7 = data0.Type; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema67.properties.Booking.properties.Type.type, + parentSchema: schema67.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + if (!(data7 === 'normal')) { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/enum', + keyword: 'enum', + params: { + allowedValues: + schema67.properties.Booking.properties.Type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema67.properties.Booking.properties.Type.enum, + parentSchema: schema67.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + var valid1 = _errs15 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Status !== undefined) { + let data8 = data0.Status; + const _errs17 = errors; + if (typeof data8 !== 'string') { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.properties.Booking.properties.Status.type, + parentSchema: + schema67.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + if ( + !( + data8 === 'pending' || + data8 === 'booked' || + data8 === 'rejected' || + data8 === 'cancelled' || + data8 === 'active' || + data8 === 'active-pending' || + data8 === 'active-rejected' + ) + ) { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/enum', + keyword: 'enum', + params: { + allowedValues: + schema67.properties.Booking.properties.Status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema67.properties.Booking.properties.Status.enum, + parentSchema: + schema67.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + var valid1 = _errs17 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.You !== undefined) { + let data9 = data0.You; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/You', + schemaPath: '#/properties/Booking/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema67.properties.Booking.properties.You.type, + parentSchema: + schema67.properties.Booking.properties.You, + data: data9, + }, + ]; + return false; + } + var valid1 = _errs19 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.External !== undefined) { + let data10 = data0.External; + const _errs21 = errors; + if (typeof data10 !== 'boolean') { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/External', + schemaPath: + '#/properties/Booking/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema67.properties.Booking.properties.External + .type, + parentSchema: + schema67.properties.Booking.properties.External, + data: data10, + }, + ]; + return false; + } + var valid1 = _errs21 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Message !== undefined) { + let data11 = data0.Message; + const _errs23 = errors; + if (typeof data11 !== 'string') { + validate82.errors = [ + { + instancePath: instancePath + '/Booking/Message', + schemaPath: + '#/properties/Booking/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.properties.Booking.properties.Message + .type, + parentSchema: + schema67.properties.Booking.properties.Message, + data: data11, + }, + ]; + return false; + } + var valid1 = _errs23 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema67.properties.Booking.type, + parentSchema: schema67.properties.Booking, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Locked !== undefined) { + let data12 = data.Locked; + const _errs25 = errors; + if (typeof data12 !== 'boolean') { + validate82.errors = [ + { + instancePath: instancePath + '/Locked', + schemaPath: '#/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema67.properties.Locked.type, + parentSchema: schema67.properties.Locked, + data: data12, + }, + ]; + return false; + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate82.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema67.type, + parentSchema: schema67, + data, + }, + ]; + return false; + } + } + validate82.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse200Response = validate83; +const schema68 = { + type: 'object', + required: ['Booking', 'Locked'], + properties: { + Booking: { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + }, + Locked: { + type: 'boolean', + description: 'Shows if the booking is in a locked status.', + }, + }, + 'x-standalone': false, + 'x-name': 'getBookingResponse200Response', + 'x-location': + '#/paths//booking/{ID}/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate83( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Booking === undefined && (missing0 = 'Booking')) || + (data.Locked === undefined && (missing0 = 'Locked')) + ) { + validate83.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema68.required, + parentSchema: schema68, + data, + }, + ]; + return false; + } else { + if (data.Booking !== undefined) { + let data0 = data.Booking; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.ID === undefined && (missing1 = 'ID')) || + (data0.Time === undefined && (missing1 = 'Time')) || + (data0.Devices === undefined && (missing1 = 'Devices')) || + (data0.Status === undefined && (missing1 = 'Status')) || + (data0.You === undefined && (missing1 = 'You')) || + (data0.External === undefined && (missing1 = 'External')) + ) { + validate83.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema68.properties.Booking.required, + parentSchema: schema68.properties.Booking, + data: data0, + }, + ]; + return false; + } else { + if (data0.ID !== undefined) { + let data1 = data0.ID; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema68.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema68.properties.Booking.properties.ID.type, + parentSchema: schema68.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Time !== undefined) { + let data2 = data0.Time; + const _errs5 = errors; + if (errors === _errs5) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if ( + (data2.Start === undefined && (missing2 = 'Start')) || + (data2.End === undefined && (missing2 = 'End')) + ) { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema68.properties.Booking.properties.Time.required, + parentSchema: schema68.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } else { + if (data2.Start !== undefined) { + let data3 = data2.Start; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate83.errors = [ + { + instancePath: + instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema68.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.properties.Booking.properties.Time + .properties.Start.type, + parentSchema: + schema68.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data2.End !== undefined) { + let data4 = data2.End; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate83.errors = [ + { + instancePath: + instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema68.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.properties.Booking.properties.Time + .properties.End.type, + parentSchema: + schema68.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema68.properties.Booking.properties.Time.type, + parentSchema: schema68.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Devices !== undefined) { + let data5 = data0.Devices; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate83.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema68.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } else { + validate83.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.properties.Booking.properties.Devices + .items.type, + parentSchema: + schema68.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } + } + var valid3 = _errs13 === errors; + if (!valid3) { + break; + } + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/Devices', + schemaPath: '#/properties/Booking/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema68.properties.Booking.properties.Devices.type, + parentSchema: + schema68.properties.Booking.properties.Devices, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Type !== undefined) { + let data7 = data0.Type; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema68.properties.Booking.properties.Type.type, + parentSchema: schema68.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + if (!(data7 === 'normal')) { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/enum', + keyword: 'enum', + params: { + allowedValues: + schema68.properties.Booking.properties.Type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema68.properties.Booking.properties.Type.enum, + parentSchema: schema68.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + var valid1 = _errs15 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Status !== undefined) { + let data8 = data0.Status; + const _errs17 = errors; + if (typeof data8 !== 'string') { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.properties.Booking.properties.Status.type, + parentSchema: + schema68.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + if ( + !( + data8 === 'pending' || + data8 === 'booked' || + data8 === 'rejected' || + data8 === 'cancelled' || + data8 === 'active' || + data8 === 'active-pending' || + data8 === 'active-rejected' + ) + ) { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/enum', + keyword: 'enum', + params: { + allowedValues: + schema68.properties.Booking.properties.Status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema68.properties.Booking.properties.Status.enum, + parentSchema: + schema68.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + var valid1 = _errs17 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.You !== undefined) { + let data9 = data0.You; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/You', + schemaPath: '#/properties/Booking/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema68.properties.Booking.properties.You.type, + parentSchema: + schema68.properties.Booking.properties.You, + data: data9, + }, + ]; + return false; + } + var valid1 = _errs19 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.External !== undefined) { + let data10 = data0.External; + const _errs21 = errors; + if (typeof data10 !== 'boolean') { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/External', + schemaPath: + '#/properties/Booking/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema68.properties.Booking.properties.External + .type, + parentSchema: + schema68.properties.Booking.properties.External, + data: data10, + }, + ]; + return false; + } + var valid1 = _errs21 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Message !== undefined) { + let data11 = data0.Message; + const _errs23 = errors; + if (typeof data11 !== 'string') { + validate83.errors = [ + { + instancePath: instancePath + '/Booking/Message', + schemaPath: + '#/properties/Booking/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.properties.Booking.properties.Message + .type, + parentSchema: + schema68.properties.Booking.properties.Message, + data: data11, + }, + ]; + return false; + } + var valid1 = _errs23 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema68.properties.Booking.type, + parentSchema: schema68.properties.Booking, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Locked !== undefined) { + let data12 = data.Locked; + const _errs25 = errors; + if (typeof data12 !== 'boolean') { + validate83.errors = [ + { + instancePath: instancePath + '/Locked', + schemaPath: '#/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema68.properties.Locked.type, + parentSchema: schema68.properties.Locked, + data: data12, + }, + ]; + return false; + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate83.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema68.type, + parentSchema: schema68, + data, + }, + ]; + return false; + } + } + validate83.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse500Request = validate84; +const schema69 = { + type: 'string', + description: 'Error code', + 'x-standalone': false, + 'x-name': 'getBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/get/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate84( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate84.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema69.type, + parentSchema: schema69, + data, + }, + ]; + return false; + } + validate84.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse500Response = validate85; +const schema70 = { + type: 'string', + description: 'Error code', + 'x-standalone': false, + 'x-name': 'getBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/get/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate85( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate85.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema70.type, + parentSchema: schema70, + data, + }, + ]; + return false; + } + validate85.errors = vErrors; + return errors === 0; +} +exports.validateDestroyBookingResponse500Request = validate86; +const schema71 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'destroyBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/destroy/delete/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate86( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate86.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema71.type, + parentSchema: schema71, + data, + }, + ]; + return false; + } + validate86.errors = vErrors; + return errors === 0; +} +exports.validateDestroyBookingResponse500Response = validate87; +const schema72 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'destroyBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/destroy/delete/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate87( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate87.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema72.type, + parentSchema: schema72, + data, + }, + ]; + return false; + } + validate87.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse200Request = validate88; +const schema73 = { + type: 'array', + description: + 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', + items: { + type: 'object', + required: ['Requested', 'Selected'], + properties: { + Requested: { type: 'string', format: 'uri' }, + Selected: { type: 'string', format: 'uri' }, + }, + }, + 'x-standalone': false, + 'x-name': 'lockBookingResponse200Request', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate88( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Requested === undefined && (missing0 = 'Requested')) || + (data0.Selected === undefined && (missing0 = 'Selected')) + ) { + validate88.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema73.items.required, + parentSchema: schema73.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Requested !== undefined) { + let data1 = data0.Requested; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate88.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema73.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } else { + validate88.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema73.items.properties.Requested.type, + parentSchema: schema73.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Selected !== undefined) { + let data2 = data0.Selected; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate88.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema73.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } else { + validate88.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema73.items.properties.Selected.type, + parentSchema: schema73.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate88.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema73.items.type, + parentSchema: schema73.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate88.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema73.type, + parentSchema: schema73, + data, + }, + ]; + return false; + } + } + validate88.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse200Response = validate89; +const schema74 = { + type: 'array', + description: + 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', + items: { + type: 'object', + required: ['Requested', 'Selected'], + properties: { + Requested: { type: 'string', format: 'uri' }, + Selected: { type: 'string', format: 'uri' }, + }, + }, + 'x-standalone': false, + 'x-name': 'lockBookingResponse200Response', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate89( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Requested === undefined && (missing0 = 'Requested')) || + (data0.Selected === undefined && (missing0 = 'Selected')) + ) { + validate89.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema74.items.required, + parentSchema: schema74.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Requested !== undefined) { + let data1 = data0.Requested; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate89.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema74.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } else { + validate89.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema74.items.properties.Requested.type, + parentSchema: schema74.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Selected !== undefined) { + let data2 = data0.Selected; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate89.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema74.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } else { + validate89.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema74.items.properties.Selected.type, + parentSchema: schema74.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate89.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema74.items.type, + parentSchema: schema74.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate89.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema74.type, + parentSchema: schema74, + data, + }, + ]; + return false; + } + } + validate89.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse500Request = validate90; +const schema75 = { + type: 'string', + description: 'Error string', + 'x-standalone': false, + 'x-name': 'lockBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate90( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate90.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema75.type, + parentSchema: schema75, + data, + }, + ]; + return false; + } + validate90.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse500Response = validate91; +const schema76 = { + type: 'string', + description: 'Error string', + 'x-standalone': false, + 'x-name': 'lockBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate91( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate91.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema76.type, + parentSchema: schema76, + data, + }, + ]; + return false; + } + validate91.errors = vErrors; + return errors === 0; +} +exports.validateUnlockBookingResponse500Request = validate92; +const schema77 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'unlockBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate92( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate92.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema77.type, + parentSchema: schema77, + data, + }, + ]; + return false; + } + validate92.errors = vErrors; + return errors === 0; +} +exports.validateUnlockBookingResponse500Response = validate93; +const schema78 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'unlockBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate93( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate93.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema78.type, + parentSchema: schema78, + data, + }, + ]; + return false; + } + validate93.errors = vErrors; + return errors === 0; +} +exports.validateBookingCallbackResponse500Request = validate94; +const schema79 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'bookingCallbackResponse500Request', + 'x-location': + '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate94( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate94.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema79.type, + parentSchema: schema79, + data, + }, + ]; + return false; + } + validate94.errors = vErrors; + return errors === 0; +} +exports.validateBookingCallbackResponse500Response = validate95; +const schema80 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'bookingCallbackResponse500Response', + 'x-location': + '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate95( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate95.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema80.type, + parentSchema: schema80, + data, + }, + ]; + return false; + } + validate95.errors = vErrors; + return errors === 0; +} diff --git a/services/experiment/src/clients/booking/basicValidation.d.cts b/services/experiment/src/clients/booking/basicValidation.d.cts new file mode 100644 index 00000000..ba22ef40 --- /dev/null +++ b/services/experiment/src/clients/booking/basicValidation.d.cts @@ -0,0 +1,299 @@ +export declare function validateBooking( + object: unknown, +): Booking; + +export declare function validateDevice( + object: unknown, +): Device; + +export declare function validateExperiment( + object: unknown, +): Experiment; + +export declare function validateTimeslot( + object: unknown, +): Timeslot; + +export declare function validateID( + object: unknown, +): ID; + +export declare function validateScheduleBody( + object: unknown, +): scheduleBody; + +export declare function validateScheduleResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse200; + +export declare function validateScheduleResponse404< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse404; + +export declare function validateScheduleResponse422< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse422; + +export declare function validateScheduleResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse500; + +export declare function validateNewBookingBody( + object: unknown, +): newBookingBody; + +export declare function validateNewBookingResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse200; + +export declare function validateNewBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse500; + +export declare function validateUpdateBookingBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingBody; + +export declare function validateUpdateBookingResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse200; + +export declare function validateUpdateBookingResponse400< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse400; + +export declare function validateUpdateBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse500; + +export declare function validateDeleteBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): deleteBookingResponse500; + +export declare function validateGetBookingResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse200; + +export declare function validateGetBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse500; + +export declare function validateDestroyBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): destroyBookingResponse500; + +export declare function validateLockBookingResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse200; + +export declare function validateLockBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse500; + +export declare function validateUnlockBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): unlockBookingResponse500; + +export declare function validateBookingCallbackResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): bookingCallbackResponse500; + +export declare function validateBookingRequest( + object: unknown, +): BookingRequest; + +export declare function validateBookingResponse( + object: unknown, +): BookingResponse; + +export declare function validateDeviceRequest( + object: unknown, +): DeviceRequest; + +export declare function validateDeviceResponse( + object: unknown, +): DeviceResponse; + +export declare function validateExperimentRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentRequest; + +export declare function validateExperimentResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentResponse; + +export declare function validateTimeslotRequest( + object: unknown, +): TimeslotRequest; + +export declare function validateTimeslotResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): TimeslotResponse; + +export declare function validateIDRequest( + object: unknown, +): IDRequest; + +export declare function validateIDResponse( + object: unknown, +): IDResponse; + +export declare function validateScheduleBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleBodyRequest; + +export declare function validateScheduleBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleBodyResponse; + +export declare function validateScheduleResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse200Request; + +export declare function validateScheduleResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse200Response; + +export declare function validateScheduleResponse404Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse404Request; + +export declare function validateScheduleResponse404Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse404Response; + +export declare function validateScheduleResponse422Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse422Request; + +export declare function validateScheduleResponse422Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse422Response; + +export declare function validateScheduleResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse500Request; + +export declare function validateScheduleResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse500Response; + +export declare function validateNewBookingBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingBodyRequest; + +export declare function validateNewBookingBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingBodyResponse; + +export declare function validateNewBookingResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse200Request; + +export declare function validateNewBookingResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse200Response; + +export declare function validateNewBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse500Request; + +export declare function validateNewBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse500Response; + +export declare function validateUpdateBookingBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingBodyRequest; + +export declare function validateUpdateBookingBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingBodyResponse; + +export declare function validateUpdateBookingResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse200Request; + +export declare function validateUpdateBookingResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse200Response; + +export declare function validateUpdateBookingResponse400Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse400Request; + +export declare function validateUpdateBookingResponse400Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse400Response; + +export declare function validateUpdateBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse500Request; + +export declare function validateUpdateBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse500Response; + +export declare function validateDeleteBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): deleteBookingResponse500Request; + +export declare function validateDeleteBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): deleteBookingResponse500Response; + +export declare function validateGetBookingResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse200Request; + +export declare function validateGetBookingResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse200Response; + +export declare function validateGetBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse500Request; + +export declare function validateGetBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse500Response; + +export declare function validateDestroyBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): destroyBookingResponse500Request; + +export declare function validateDestroyBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): destroyBookingResponse500Response; + +export declare function validateLockBookingResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse200Request; + +export declare function validateLockBookingResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse200Response; + +export declare function validateLockBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse500Request; + +export declare function validateLockBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse500Response; + +export declare function validateUnlockBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): unlockBookingResponse500Request; + +export declare function validateUnlockBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): unlockBookingResponse500Response; + +export declare function validateBookingCallbackResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): bookingCallbackResponse500Request; + +export declare function validateBookingCallbackResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): bookingCallbackResponse500Response; diff --git a/services/experiment/src/clients/booking/client.ts b/services/experiment/src/clients/booking/client.ts new file mode 100644 index 00000000..b2aea867 --- /dev/null +++ b/services/experiment/src/clients/booking/client.ts @@ -0,0 +1,861 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; + +import * as RequestValidation from './requestValidation.js'; +import * as Signatures from './signatures.js'; +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * This error class should be used if an error occurs during validation of a request/response. + * @category Errors + */ +export class ValidationError extends Error { + public errors: unknown; + + constructor(message: string, errors: unknown) { + super(message); + this.name = 'ValidationError'; + this.errors = errors; + } +} + +/** + * This error class should be used if an error occurs while fetching a request. + * @category Errors + */ +export class FetchError extends Error { + constructor(message: string) { + super(message); + this.name = 'FetchError'; + } +} + +/** + * This error class should be used if the response of the server has a status + * greater than or equal to 400. This error should contain the validated response. + * @category Errors + */ +export class UnsuccessfulRequestError extends Error { + public response: Types.ResponseData; + + constructor(message: string, response: Types.ResponseData) { + super(message); + this.response = response; + this.name = 'UnsuccessfulRequestError'; + } +} + +/** + * This error class should be used if the validation of an url fails. + * @category Errors + */ +export class InvalidUrlError extends Error { + constructor(message: string) { + super(message); + this.name = 'InvalidUrlError'; + } +} + +/** + * This function attempts to parse a Response as ResponseData. + */ +async function parseResponse(response: Response): Promise { + let text = null; + try { + text = await response.text(); + const json = JSON.parse(text); + return { status: response.status, body: json }; + } catch { + return { status: response.status, body: text }; + } +} + +/** + * This function checks if a string is a valid http url. + * @param string The string to be checked. + * @returns True if the string is a valid http url. + */ +function isValidHttpUrl(string: string) { + let url; + + try { + url = new URL(string); + } catch (_) { + return false; + } + + return url.protocol === 'http:' || url.protocol === 'https:'; +} + +/** + * This function takes an url and a pattern for the requested endpoint and parses the contained path parameters. + * @param url The url to be parsed. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the provided url does not end with the provided endpoint. + * @returns An array containing all parsed path parameters in order of appearance. + * @example + * // returns ["username", "role_name"] + * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function parsePathParameters(url: string, endpoint: string): string[] { + const parameterRegex = '([a-zA-Z0-9-:]+)'; + const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); + const matches = url.match(regex); + + if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint'); + + return matches.slice(1); +} + +/** + * This function validates a given http url and parses its path parameters. + * @param url The url to be validated. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the validation of the provided url fails. + * @returns An array containing all parsed path parameters in order of appearance (see {@link parsePathParameters}). + * @example + * // returns ["username", "role_name"] + * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { + if (!isValidHttpUrl(url)) + throw new InvalidUrlError('Provided url is not a valid http url'); + if (!url.startsWith(baseUrl)) + throw new InvalidUrlError('Provided url does not start with the provided base url'); + const pathParameters = parsePathParameters(url, endpoint); + + let extendedBaseUrl = baseUrl + endpoint; + + pathParameters.forEach(pathParameter => { + extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); + }); + + if (url !== extendedBaseUrl) + throw new InvalidUrlError('Provided url does not match extended base url'); + + return pathParameters; +} + +/** + * This function appends a given endpoint to an url. + * @param url The url to append the endpoint to. + * @param endpoint The endpoint to be appended. + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id", "/token") + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id/", "/token") + * @returns The url with the appended endpoint. + */ +function appendToUrl(url: string, endpoint: string) { + return url.endsWith('/') ? `${url.slice(0, -1)}${endpoint}` : `${url}${endpoint}`; +} + +/** + * Client for the use of the Crosslab API + * @category Client + */ +export class Client { + public readonly baseUrl: string; + public readonly serviceUrl: string; + public accessToken: string; + private fixedHeaders: [string, string][]; + private fetch = async (url: RequestInfo | URL, init: RequestInit) => { + let raw_response; + try { + if ( + url.toString().startsWith(this.baseUrl) || + url.toString().startsWith(this.serviceUrl) + ) { + raw_response = await fetch(url, init); + } else { + raw_response = await fetch( + appendToUrl( + this.baseUrl, + '/proxy?' + new URLSearchParams([['URL', url.toString()]]).toString(), + ), + init, + ); + } + } catch (error) { + if (error instanceof Error) { + throw new FetchError(error.message); + } else if (typeof error === 'string') { + throw new FetchError(error); + } else { + throw new FetchError('Something went wrong while trying to fetch the request'); + } + } + return await parseResponse(raw_response); + }; + + /** + * @category Constructors + */ + constructor( + baseUrl: string, + options: { + serviceUrl?: string; + accessToken?: string; + fixedHeaders?: [string, string][]; + }, + ) { + this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; + this.serviceUrl = options.serviceUrl + ? options.serviceUrl.endsWith('/') + ? options.serviceUrl.slice(0, -1) + : options.serviceUrl + : this.baseUrl; + this.accessToken = options.accessToken ?? ''; + this.fixedHeaders = options.fixedHeaders ?? []; + } + + /** + * Returns the free / booked times for given experiment. + * + * @param body + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * Timetable of free/booked time. If 'Combined' is set to true, an array with only one entry is returned containing the combined timetable. + */ + public async schedule( + body: { + /** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ + Experiment: Types.Experiment<'request'>; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * If true, show only one timetable per device instead of one for all available physical devices. + */ + Combined?: boolean; + /** + * (private) Show only devices of this institution. Give an error if a device of an other institution is requested. + */ + onlyOwn?: boolean; + [k: string]: unknown; + }, + options?: { + headers?: [string, string][]; + url?: string; + }, + ): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/schedule'); + + if (!RequestValidation.validateScheduleInput(body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateScheduleInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }); + + if (!RequestValidation.validateScheduleOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateScheduleOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Books an experiment. + * + * @param body + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The booking was accepted. The booking status will display whether the booking of all devices was successful. + */ + public async newBooking( + body: { + /** + * List of devices which should be added. + */ + Devices: Types.Device<'request'>[]; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + [k: string]: unknown; + }, + options?: { + headers?: [string, string][]; + url?: string; + }, + ): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/booking'); + + if (!RequestValidation.validateNewBookingInput(body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateNewBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }); + + if (!RequestValidation.validateNewBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateNewBookingOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. + * + * @param url + * Url of the resource to be accessed. + * @param body + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The booking change was accepted. The booking status will display whether the booking of all devices was successful. + */ + public async updateBooking( + url: string, + body: + | { + /** + * Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set. + */ + Locked?: boolean; + /** + * List of devices which should be added. + */ + Devices?: Types.Device<'request'>[]; + [k: string]: unknown; + } + | { + /** + * Callback which should be called at changes. + */ + Callback?: string; + [k: string]: unknown; + }, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateUpdateBookingInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateUpdateBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'PATCH', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }); + + if (!RequestValidation.validateUpdateBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateUpdateBookingOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Cancels a booking, as long as the booking was originally done by you. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The booking was cancelled. All associated devices were released. + */ + public async deleteBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateDeleteBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateDeleteBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateDeleteBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateDeleteBookingOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Returns whether a list of devices is currently booked for a user. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * Returns the current booking. + */ + public async getBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateGetBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateGetBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateGetBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateGetBookingOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Allows selected persons (like lab manager) to remove a user booking. To avoid mistakes, this is a different path than normal delete. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The booking was cancelled. All associated devices were released. + */ + public async destroyBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}/destroy'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/destroy'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateDestroyBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateDestroyBookingInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateDestroyBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateDestroyBookingOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * All devices were booked by user. + */ + public async lockBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateLockBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateLockBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'PUT', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateLockBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateLockBookingOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Unlocks all devices belonging to a booking, status will be set to 'booked'. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * Unlocking was successful. + */ + public async unlockBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateUnlockBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateUnlockBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateUnlockBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateUnlockBookingOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Callback used for updating device info / booking info. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * Update was processed. + */ + public async bookingCallback( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking_callback/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking_callback/{}'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateBookingCallbackInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateBookingCallbackInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateBookingCallbackOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateBookingCallbackOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } +} diff --git a/services/experiment/src/clients/booking/requestValidation.ts b/services/experiment/src/clients/booking/requestValidation.ts new file mode 100644 index 00000000..86d9ff55 --- /dev/null +++ b/services/experiment/src/clients/booking/requestValidation.ts @@ -0,0 +1,678 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as BasicValidation from './basicValidation.cjs'; +import * as Signatures from './signatures.js'; +import { FunctionWithErrors, ResponseData } from './types.js'; + +/** + * This function validates the inputs to schedule() + */ +export function validateScheduleInput(body: Signatures.ScheduleBody) { + if (body === undefined) { + return true; + } + + if (!BasicValidation.validateScheduleBodyRequest(body)) { + (validateScheduleInput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of schedule() + */ +export function validateScheduleOutput( + response: ResponseData, +): response is Signatures.ScheduleResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateScheduleResponse200Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + if (!BasicValidation.validateScheduleResponse404Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse404Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 422) { + if (!BasicValidation.validateScheduleResponse422Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse422Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateScheduleResponse500Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateScheduleOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to newBooking() + */ +export function validateNewBookingInput(body: Signatures.NewBookingBody) { + if (body === undefined) { + return true; + } + + if (!BasicValidation.validateNewBookingBodyRequest(body)) { + (validateNewBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateNewBookingBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of newBooking() + */ +export function validateNewBookingOutput( + response: ResponseData, +): response is Signatures.NewBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateNewBookingResponse200Response(response.body)) { + (validateNewBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateNewBookingResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateNewBookingResponse500Response(response.body)) { + (validateNewBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateNewBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateNewBookingOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to updateBooking() + */ +export function validateUpdateBookingInput( + parameters: Signatures.UpdateBookingParameters, + body: Signatures.UpdateBookingBody, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateUpdateBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + if (!BasicValidation.validateUpdateBookingBodyRequest(body)) { + (validateUpdateBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateBookingBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of updateBooking() + */ +export function validateUpdateBookingOutput( + response: ResponseData, +): response is Signatures.UpdateBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateUpdateBookingResponse200Response(response.body)) { + (validateUpdateBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateBookingResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + if (!BasicValidation.validateUpdateBookingResponse400Response(response.body)) { + (validateUpdateBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateBookingResponse400Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 423) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateUpdateBookingResponse500Response(response.body)) { + (validateUpdateBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateUpdateBookingOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to deleteBooking() + */ +export function validateDeleteBookingInput( + parameters: Signatures.DeleteBookingParameters, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateDeleteBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of deleteBooking() + */ +export function validateDeleteBookingOutput( + response: ResponseData, +): response is Signatures.DeleteBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 423) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateDeleteBookingResponse500Response(response.body)) { + (validateDeleteBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateDeleteBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateDeleteBookingOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to getBooking() + */ +export function validateGetBookingInput(parameters: Signatures.GetBookingParameters) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateGetBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of getBooking() + */ +export function validateGetBookingOutput( + response: ResponseData, +): response is Signatures.GetBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateGetBookingResponse200Response(response.body)) { + (validateGetBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateGetBookingResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateGetBookingResponse500Response(response.body)) { + (validateGetBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateGetBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateGetBookingOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to destroyBooking() + */ +export function validateDestroyBookingInput( + parameters: Signatures.DestroyBookingParameters, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateDestroyBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of destroyBooking() + */ +export function validateDestroyBookingOutput( + response: ResponseData, +): response is Signatures.DestroyBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 423) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateDestroyBookingResponse500Response(response.body)) { + (validateDestroyBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateDestroyBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateDestroyBookingOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to lockBooking() + */ +export function validateLockBookingInput(parameters: Signatures.LockBookingParameters) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateLockBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of lockBooking() + */ +export function validateLockBookingOutput( + response: ResponseData, +): response is Signatures.LockBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateLockBookingResponse200Response(response.body)) { + (validateLockBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateLockBookingResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 412) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateLockBookingResponse500Response(response.body)) { + (validateLockBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateLockBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateLockBookingOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to unlockBooking() + */ +export function validateUnlockBookingInput( + parameters: Signatures.UnlockBookingParameters, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateUnlockBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of unlockBooking() + */ +export function validateUnlockBookingOutput( + response: ResponseData, +): response is Signatures.UnlockBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 412) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateUnlockBookingResponse500Response(response.body)) { + (validateUnlockBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateUnlockBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateUnlockBookingOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to bookingCallback() + */ +export function validateBookingCallbackInput( + parameters: Signatures.BookingCallbackParameters, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateBookingCallbackInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of bookingCallback() + */ +export function validateBookingCallbackOutput( + response: ResponseData, +): response is Signatures.BookingCallbackResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateBookingCallbackResponse500Response(response.body)) { + (validateBookingCallbackOutput as FunctionWithErrors).errors = ( + BasicValidation.validateBookingCallbackResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateBookingCallbackOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} diff --git a/services/experiment/src/clients/booking/signatures.ts b/services/experiment/src/clients/booking/signatures.ts new file mode 100644 index 00000000..015d1325 --- /dev/null +++ b/services/experiment/src/clients/booking/signatures.ts @@ -0,0 +1,1107 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * Typing for the body of the request made by schedule() + * @category schedule() + */ +export type ScheduleBody = + | { + /** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ + Experiment: Types.Experiment<'request'>; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * If true, show only one timetable per device instead of one for all available physical devices. + */ + Combined?: boolean; + /** + * (private) Show only devices of this institution. Give an error if a device of an other institution is requested. + */ + onlyOwn?: boolean; + [k: string]: unknown; + } + | undefined; + +/** + * Typing for all possible responses to the request made by schedule() + * @category schedule() + */ +export type ScheduleResponse = ScheduleSuccessResponse | ScheduleErrorResponse; + +/** + * Typing for all successful responses to the request made by schedule() + * @category schedule() + */ +export type ScheduleSuccessResponse = ScheduleResponse200; + +/** + * Typing for all error responses to the request made by schedule() + * @category schedule() + */ +export type ScheduleErrorResponse = + | ScheduleResponse400 + | ScheduleResponse401 + | ScheduleResponse403 + | ScheduleResponse404 + | ScheduleResponse422 + | ScheduleResponse500 + | ScheduleResponse503; + +/** + * Typing for a response with status 200 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + /** + * ID of the device (or * if combined). + */ + Device: string; + /** + * Array of booked times. + */ + Booked: Types.Timeslot<'response'>[]; + /** + * Array of free times. + */ + Free: Types.Timeslot<'response'>[]; + [k: string]: unknown; + }[]; +} + +/** + * Typing for a response with status 400 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 422 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse422 extends Types.ErrorResponse { + status: 422; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 500 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the body of the request made by newBooking() + * @category newBooking() + */ +export type NewBookingBody = + | { + /** + * List of devices which should be added. + */ + Devices: Types.Device<'request'>[]; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + [k: string]: unknown; + } + | undefined; + +/** + * Typing for all possible responses to the request made by newBooking() + * @category newBooking() + */ +export type NewBookingResponse = NewBookingSuccessResponse | NewBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by newBooking() + * @category newBooking() + */ +export type NewBookingSuccessResponse = NewBookingResponse200; + +/** + * Typing for all error responses to the request made by newBooking() + * @category newBooking() + */ +export type NewBookingErrorResponse = + | NewBookingResponse401 + | NewBookingResponse403 + | NewBookingResponse500 + | NewBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by newBooking() + * @category newBooking() + */ +export interface NewBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + /** + * ID at which the booking can be managed. + */ + BookingID: string; + [k: string]: unknown; + }; +} + +/** + * Typing for a response with status 401 to the request made by newBooking() + * @category newBooking() + */ +export interface NewBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by newBooking() + * @category newBooking() + */ +export interface NewBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by newBooking() + * @category newBooking() + */ +export interface NewBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by newBooking() + * @category newBooking() + */ +export interface NewBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by updateBooking() + * @category updateBooking() + */ +export type UpdateBookingParameters = { + ID: string; +}; + +/** + * Typing for the body of the request made by updateBooking() + * @category updateBooking() + */ +export type UpdateBookingBody = + | { + /** + * Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set. + */ + Locked?: boolean; + /** + * List of devices which should be added. + */ + Devices?: Types.Device<'request'>[]; + [k: string]: unknown; + } + | { + /** + * Callback which should be called at changes. + */ + Callback?: string; + [k: string]: unknown; + }; + +/** + * Typing for all possible responses to the request made by updateBooking() + * @category updateBooking() + */ +export type UpdateBookingResponse = + | UpdateBookingSuccessResponse + | UpdateBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by updateBooking() + * @category updateBooking() + */ +export type UpdateBookingSuccessResponse = UpdateBookingResponse200; + +/** + * Typing for all error responses to the request made by updateBooking() + * @category updateBooking() + */ +export type UpdateBookingErrorResponse = + | UpdateBookingResponse400 + | UpdateBookingResponse401 + | UpdateBookingResponse403 + | UpdateBookingResponse404 + | UpdateBookingResponse423 + | UpdateBookingResponse500 + | UpdateBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + BookingID: string; + [k: string]: unknown; + }; +} + +/** + * Typing for a response with status 400 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 401 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 423 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse423 extends Types.ErrorResponse { + status: 423; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by deleteBooking() + * @category deleteBooking() + */ +export type DeleteBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by deleteBooking() + * @category deleteBooking() + */ +export type DeleteBookingResponse = + | DeleteBookingSuccessResponse + | DeleteBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by deleteBooking() + * @category deleteBooking() + */ +export type DeleteBookingSuccessResponse = DeleteBookingResponse200; + +/** + * Typing for all error responses to the request made by deleteBooking() + * @category deleteBooking() + */ +export type DeleteBookingErrorResponse = + | DeleteBookingResponse401 + | DeleteBookingResponse403 + | DeleteBookingResponse404 + | DeleteBookingResponse423 + | DeleteBookingResponse500 + | DeleteBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 423 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse423 extends Types.ErrorResponse { + status: 423; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by getBooking() + * @category getBooking() + */ +export type GetBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by getBooking() + * @category getBooking() + */ +export type GetBookingResponse = GetBookingSuccessResponse | GetBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by getBooking() + * @category getBooking() + */ +export type GetBookingSuccessResponse = GetBookingResponse200; + +/** + * Typing for all error responses to the request made by getBooking() + * @category getBooking() + */ +export type GetBookingErrorResponse = + | GetBookingResponse401 + | GetBookingResponse403 + | GetBookingResponse404 + | GetBookingResponse500 + | GetBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + /** + * A booking in the booking system. + */ + Booking: Types.Booking<'response'>; + /** + * Shows if the booking is in a locked status. + */ + Locked: boolean; + [k: string]: unknown; + }; +} + +/** + * Typing for a response with status 401 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by destroyBooking() + * @category destroyBooking() + */ +export type DestroyBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by destroyBooking() + * @category destroyBooking() + */ +export type DestroyBookingResponse = + | DestroyBookingSuccessResponse + | DestroyBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by destroyBooking() + * @category destroyBooking() + */ +export type DestroyBookingSuccessResponse = DestroyBookingResponse200; + +/** + * Typing for all error responses to the request made by destroyBooking() + * @category destroyBooking() + */ +export type DestroyBookingErrorResponse = + | DestroyBookingResponse401 + | DestroyBookingResponse403 + | DestroyBookingResponse404 + | DestroyBookingResponse423 + | DestroyBookingResponse500 + | DestroyBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 423 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse423 extends Types.ErrorResponse { + status: 423; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingResponse = LockBookingSuccessResponse | LockBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingSuccessResponse = LockBookingResponse200; + +/** + * Typing for all error responses to the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingErrorResponse = + | LockBookingResponse401 + | LockBookingResponse403 + | LockBookingResponse404 + | LockBookingResponse412 + | LockBookingResponse500 + | LockBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + Requested: string; + Selected: string; + [k: string]: unknown; + }[]; +} + +/** + * Typing for a response with status 401 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 412 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse412 extends Types.ErrorResponse { + status: 412; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingResponse = + | UnlockBookingSuccessResponse + | UnlockBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingSuccessResponse = UnlockBookingResponse200; + +/** + * Typing for all error responses to the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingErrorResponse = + | UnlockBookingResponse401 + | UnlockBookingResponse403 + | UnlockBookingResponse404 + | UnlockBookingResponse412 + | UnlockBookingResponse500 + | UnlockBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 412 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse412 extends Types.ErrorResponse { + status: 412; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackResponse = + | BookingCallbackSuccessResponse + | BookingCallbackErrorResponse; + +/** + * Typing for all successful responses to the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackSuccessResponse = BookingCallbackResponse200; + +/** + * Typing for all error responses to the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackErrorResponse = + | BookingCallbackResponse404 + | BookingCallbackResponse500 + | BookingCallbackResponse503; + +/** + * Typing for a response with status 200 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} diff --git a/services/experiment/src/clients/booking/types.ts b/services/experiment/src/clients/booking/types.ts new file mode 100644 index 00000000..1630020b --- /dev/null +++ b/services/experiment/src/clients/booking/types.ts @@ -0,0 +1,404 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as _BasicValidation from './basicValidation.cjs'; + +/** + * @internal + */ +export interface FunctionWithErrors { + (...args: unknown[]): unknown; + errors?: unknown; +} + +/** + * @internal + */ +export interface RequestInfo { + method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'OPTIONS' | 'PATCH' | 'HEAD'; + body?: string; + headers?: [string, string][]; +} + +/** + * @internal + */ +export type FetchFunction = ( + url: string, + info?: RequestInfo, +) => Promise | ResponseData; + +export interface ResponseData { + status: number; + headers?: { + [key: string]: string | undefined; + }; + body?: unknown; +} + +export interface SuccessResponse extends ResponseData { + success?: true; +} + +export interface ErrorResponse extends ResponseData { + success?: false; +} + +/** + * @internal + */ +export function isSuccessResponse(response: ResponseData): response is SuccessResponse { + return response.status < 400; +} + +/** + * @internal + */ +export function isErrorResponse(response: ResponseData): response is ErrorResponse { + return response.status >= 400; +} + +/** + * This type allows to pick the required properties of another type. + */ +export type Require = Partial & { + [Property in Key]-?: Type[Property]; +}; + +export type SizedTuple< + T, + MIN extends number | undefined = undefined, + MAX extends number | undefined = undefined, +> = MIN extends number + ? MAX extends number + ? _SizedTuple> + : TupleObject> & T[] + : MAX extends number + ? _SizedTuple, true> + : T[]; + +type _SizedTuple = ARR extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? Tuple | _SizedTuple + : never; + +type Tuple = _Tuple< + T, + NumericRangeTuple +>; + +type _Tuple = N extends [ + infer HEAD, + ...infer TAIL extends number[], +] + ? HEAD extends 0 + ? [] | _Tuple + : [T, ..._Tuple] + : []; + +type TupleObject = N extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? TAIL extends [] + ? Record + : { [P in HEAD]: T } & TupleObject + : Record; + +export type NumericRange< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number = never, +> = ARR['length'] extends END + ? ACC | START | END + : NumericRange< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : ACC | ARR['length'] + >; + +type NumericRangeTuple< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number[] = [], +> = ARR['length'] extends END + ? [START, ...ACC, END] + : NumericRangeTuple< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : [...ACC, ARR['length']] + >; + +/** + * A booking in the booking system. + */ +export type Booking = T extends 'all' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : never; + +/** + * A device might either be a physical/virtual device or a group of device. + */ +export type Device = T extends 'all' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : never; + +/** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ +export type Experiment = T extends 'all' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'request'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'response'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + */ + Description?: string; + [k: string]: unknown; + } + : never; + +/** + * A time slot represents a slice of time used for bookings. + */ +export type Timeslot = T extends 'all' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : never; diff --git a/services/experiment/src/clients/index.ts b/services/experiment/src/clients/index.ts index 51776c7f..ea525e51 100644 --- a/services/experiment/src/clients/index.ts +++ b/services/experiment/src/clients/index.ts @@ -1,13 +1,18 @@ import { RequestHandler } from 'express'; import { config } from '../config.js'; +import { Client as BookingClient } from './booking/client.js'; import { Client as DeviceClient } from './device/client.js'; export const device = new DeviceClient(config.BASE_URL, { serviceUrl: config.DEVICE_SERVICE_URL, fixedHeaders: [['x-request-authentication', 'experiment-service']], }); -export const clients = { device }; +export const booking = new BookingClient(config.BASE_URL, { + serviceUrl: config.DEVICE_SERVICE_URL, + fixedHeaders: [['x-request-authentication', 'experiment-service']], +}); +export const clients = { device, booking }; export type Clients = typeof clients; declare global { @@ -33,7 +38,13 @@ export const middleware: RequestHandler = (req, _res, next) => { serviceUrl: config.DEVICE_SERVICE_URL, fixedHeaders: fixed_headers, }); - req.clients = { device: bound_device }; + + const bound_booking = new BookingClient(config.BASE_URL, { + serviceUrl: config.DEVICE_SERVICE_URL, + fixedHeaders: fixed_headers, + }); + + req.clients = { device: bound_device, booking: bound_booking }; next(); }; diff --git a/services/experiment/src/methods/experimentStatus/book.ts b/services/experiment/src/methods/experimentStatus/book.ts index 6122d6ac..81743024 100644 --- a/services/experiment/src/methods/experimentStatus/book.ts +++ b/services/experiment/src/methods/experimentStatus/book.ts @@ -1,9 +1,9 @@ import { MissingPropertyError } from '@crosslab/service-common'; import { logger } from '@crosslab/service-common'; +import { clients } from '../../clients/index.js'; import { repositories } from '../../database/dataSource.js'; import { ExperimentModel } from '../../database/model.js'; -// import { apiClient } from '../api.js' import { experimentUrlFromId } from '../url.js'; /** @@ -17,29 +17,27 @@ export async function bookExperiment(experimentModel: ExperimentModel) { if (!experimentModel.devices || experimentModel.devices.length === 0) throw new MissingPropertyError(`Experiment ${experimentUrl} has no devices`, 400); - // const currentTime = new Date() - // const startTime = new Date(experimentModel.bookingStart ?? currentTime) - // const endTime = new Date( - // experimentModel.bookingEnd ?? startTime.getTime() + 60 * 60 * 1000 - // ) + const currentTime = new Date(); + const startTime = new Date(experimentModel.bookingStart ?? currentTime); + const endTime = new Date( + experimentModel.bookingEnd ?? startTime.getTime() + 60 * 60 * 1000, + ); - // // TODO: error handling - // const { BookingID } = await apiClient.bookExperiment({ - // Experiment: { - // Devices: experimentModel.devices.map((device) => { - // return { ID: device.url } - // }), - // }, - // Time: { - // Start: startTime.toISOString(), - // End: endTime.toISOString(), - // }, - // Type: 'normal', - // }) + // TODO: error handling + const { BookingID } = await clients.booking.newBooking({ + Devices: experimentModel.devices.map(device => { + return { ID: device.url }; + }), + Time: { + Start: startTime.toISOString(), + End: endTime.toISOString(), + }, + Type: 'normal', + }); - // experimentModel.bookingStart = startTime.toISOString() - // experimentModel.bookingEnd = endTime.toISOString() - // experimentModel.bookingID = BookingID + experimentModel.bookingStart = startTime.toISOString(); + experimentModel.bookingEnd = endTime.toISOString(); + experimentModel.bookingID = BookingID; experimentModel.status = 'booked'; await repositories.experiment.save(experimentModel); diff --git a/services/experiment/src/methods/experimentStatus/index.ts b/services/experiment/src/methods/experimentStatus/index.ts index 3e90352a..3cf7df13 100644 --- a/services/experiment/src/methods/experimentStatus/index.ts +++ b/services/experiment/src/methods/experimentStatus/index.ts @@ -35,6 +35,11 @@ export async function transitionExperiment( ); break; case 'booked': + if (experimentModel.status !== 'created' && experimentModel.status !== 'booked') + throw new InvalidChangeError( + `Cannot change status of experiment from "${experimentModel.status}" to "booked"`, + 400, + ); return await bookExperiment(experimentModel); case 'running': return await runExperiment(experimentModel, clients); diff --git a/services/experiment/src/methods/experimentStatus/setup/bookingLocking.ts b/services/experiment/src/methods/experimentStatus/setup/bookingLocking.ts index e12e3faf..23641117 100644 --- a/services/experiment/src/methods/experimentStatus/setup/bookingLocking.ts +++ b/services/experiment/src/methods/experimentStatus/setup/bookingLocking.ts @@ -1,5 +1,6 @@ -import { InvalidValueError, logger } from '@crosslab/service-common'; +import { MissingEntityError, logger } from '@crosslab/service-common'; +import { clients } from '../../../clients/index.js'; import { repositories } from '../../../database/dataSource.js'; import { ExperimentModel } from '../../../database/model.js'; import { InvalidStateError, MalformedExperimentError } from '../../../types/errors.js'; @@ -7,8 +8,6 @@ import { validateExperimentStatus } from '../../../types/typeguards.js'; import { ResolvedDevice } from '../../../types/types.js'; import { experimentUrlFromId } from '../../url.js'; -// import { apiClient } from '../../api.js' - export async function lockBookingExperiment( experimentModel: ExperimentModel, resolvedDevices: ResolvedDevice[], @@ -30,31 +29,25 @@ export async function lockBookingExperiment( 500, ); - // NOTE: temporary solution while booking service is not available - for (const resolvedDevice of resolvedDevices) { - if (resolvedDevice.type !== 'group') { - continue; - } + // TODO: error handling + const lockedDevices = await clients.booking.lockBooking(experimentModel.bookingID); - if (resolvedDevice.devices.length === 0) - throw new InvalidValueError(`Resolved device group contains no devices`, 400); + for (const [index, resolvedDevice] of resolvedDevices.entries()) { + if (resolvedDevice.type !== 'group') continue; - const index = experimentModel.devices.findIndex( - device => device.url === resolvedDevice.url, - ); + const lockedDeviceUrl = lockedDevices.find( + mapping => mapping.Requested === resolvedDevice.url, + )?.Selected; - if (index === -1) - throw new InvalidValueError( - `Resolved device group is not contained in the experiment`, + if (!lockedDeviceUrl) + throw new MissingEntityError( + `No device has been booked for device group "${resolvedDevice.url}"!`, 500, ); - experimentModel.devices[index].resolvedDevice = resolvedDevice.devices[0].url; + experimentModel.devices[index].resolvedDevice = lockedDeviceUrl; } - // TODO: error handling - // await apiClient.lockBooking(experimentModel.bookingID) - experimentModel.status = 'booking-locked'; await repositories.experiment.save(experimentModel); diff --git a/services/experiment/src/methods/experimentStatus/setup/bookingUpdate.ts b/services/experiment/src/methods/experimentStatus/setup/bookingUpdate.ts index 47cc7d4a..1d4c8493 100644 --- a/services/experiment/src/methods/experimentStatus/setup/bookingUpdate.ts +++ b/services/experiment/src/methods/experimentStatus/setup/bookingUpdate.ts @@ -1,5 +1,6 @@ import { logger } from '@crosslab/service-common'; +import { clients } from '../../../clients/index.js'; import { repositories } from '../../../database/dataSource.js'; import { ExperimentModel } from '../../../database/model.js'; import { InvalidStateError, MalformedExperimentError } from '../../../types/errors.js'; @@ -7,11 +8,9 @@ import { validateExperimentStatus } from '../../../types/typeguards.js'; import { sendStatusUpdateMessages } from '../../statusUpdateMessage.js'; import { experimentUrlFromId } from '../../url.js'; -// import { apiClient } from '../../api.js' - export async function updateBookingExperiment( experimentModel: ExperimentModel, - _newDeviceUrls: string[], + newDeviceUrls: string[], ) { const experimentUrl = experimentUrlFromId(experimentModel.uuid); logger.log('info', 'Attempting to update booking for experiment', { @@ -31,14 +30,14 @@ export async function updateBookingExperiment( ); // TODO: error handling - // await apiClient.updateBooking(experimentModel.bookingID, { - // Locked: true, - // Devices: newDeviceUrls.map((newDeviceUrl) => { - // return { - // ID: newDeviceUrl, - // } - // }), - // }) + await clients.booking.updateBooking(experimentModel.bookingID, { + Locked: true, + Devices: newDeviceUrls.map(newDeviceUrl => { + return { + ID: newDeviceUrl, + }; + }), + }); experimentModel.status = 'booking-updated'; diff --git a/services/experiment/src/operations/experiments/get.ts b/services/experiment/src/operations/experiments/get.ts index 457ad421..2a6e210b 100644 --- a/services/experiment/src/operations/experiments/get.ts +++ b/services/experiment/src/operations/experiments/get.ts @@ -2,6 +2,7 @@ import { logger } from '@crosslab/service-common'; import { repositories } from '../../database/dataSource.js'; import { getExperimentsSignature } from '../../generated/signatures.js'; +import { experimentUrlFromId } from '../../methods/url.js'; /** * This function implements the functionality for handling GET requests on @@ -14,11 +15,22 @@ export const getExperiments: getExperimentsSignature = async req => { await req.authorization.check_authorization_or_fail('view', 'experiment'); const experimentModels = await repositories.experiment.find(); + + const visibility = await Promise.all( + experimentModels.map(experiment => + req.authorization.check_authorization( + 'view', + `experiment:${experimentUrlFromId(experiment.uuid)}`, + ), + ), + ); + + const visibleExperiments = experimentModels.filter((_value, index) => visibility[index].result); logger.log('info', 'Successfully handled GET request on endpoint /experiments'); return { status: 200, - body: await Promise.all(experimentModels.map(repositories.experiment.formatOverview)), + body: await Promise.all(visibleExperiments.map(repositories.experiment.formatOverview)), }; }; From bff4b68d02e25b54da2e0754d05a9e68ab0bff88 Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Mon, 24 Jun 2024 13:17:37 +0000 Subject: [PATCH 39/79] WIP: builder --- .jobs.yml | 30 + clients/soa/python/.vscode/settings.json | 2 +- clients/soa/python/scripts/lint.sh | 8 +- clients/soa/python/scripts/test.sh | 8 +- clients/soa/python/tox.ini | 6 +- .../python/.vscode/settings.json | 2 +- .../python/scripts/lint.sh | 8 +- .../python/scripts/test.sh | 9 +- .../electricalConnection/python/tox.ini | 10 +- .../soa_services/file/python/scripts/lint.sh | 8 +- .../soa_services/file/python/scripts/test.sh | 9 +- clients/soa_services/file/python/tox.ini | 10 +- .../message/python/scripts/lint.sh | 8 +- .../message/python/scripts/test.sh | 9 +- clients/soa_services/message/python/tox.ini | 10 +- .../parameter/python/scripts/lint.sh | 8 +- .../parameter/python/scripts/test.sh | 9 +- clients/soa_services/parameter/python/tox.ini | 10 +- .../webcam/python/scripts/lint.sh | 8 +- .../webcam/python/scripts/test.sh | 9 +- clients/soa_services/webcam/python/tox.ini | 10 +- helper/builder/package-lock.json | 1799 +++++++++++++++++ helper/builder/package.json | 29 + helper/builder/src/actions/clean.ts | 60 + helper/builder/src/actions/hash.ts | 32 + helper/builder/src/actions/run-job.ts | 124 ++ helper/builder/src/dependency-graph.ts | 174 ++ helper/builder/src/helper/get-hash.ts | 18 + helper/builder/src/helper/get-status.ts | 20 + helper/builder/src/helper/render-execution.ts | 69 + helper/builder/src/helper/run-script.ts | 34 + helper/builder/src/helper/run-set-scene.ts | 22 + helper/builder/src/helper/sigint-handler.ts | 21 + helper/builder/src/index.ts | 3 + helper/builder/src/projects-loader.ts | 60 + helper/builder/src/prompts/main-menu.ts | 60 + .../src/prompts/select-job-execution.ts | 25 + helper/builder/src/prompts/select-job.ts | 29 + helper/builder/src/prompts/select-project.ts | 32 + helper/builder/src/root-directory.ts | 16 + helper/builder/tsconfig.json | 12 + 41 files changed, 2788 insertions(+), 42 deletions(-) create mode 100644 helper/builder/package-lock.json create mode 100644 helper/builder/package.json create mode 100644 helper/builder/src/actions/clean.ts create mode 100644 helper/builder/src/actions/hash.ts create mode 100644 helper/builder/src/actions/run-job.ts create mode 100644 helper/builder/src/dependency-graph.ts create mode 100644 helper/builder/src/helper/get-hash.ts create mode 100644 helper/builder/src/helper/get-status.ts create mode 100644 helper/builder/src/helper/render-execution.ts create mode 100644 helper/builder/src/helper/run-script.ts create mode 100644 helper/builder/src/helper/run-set-scene.ts create mode 100644 helper/builder/src/helper/sigint-handler.ts create mode 100644 helper/builder/src/index.ts create mode 100644 helper/builder/src/projects-loader.ts create mode 100644 helper/builder/src/prompts/main-menu.ts create mode 100644 helper/builder/src/prompts/select-job-execution.ts create mode 100644 helper/builder/src/prompts/select-job.ts create mode 100644 helper/builder/src/prompts/select-project.ts create mode 100644 helper/builder/src/root-directory.ts create mode 100644 helper/builder/tsconfig.json diff --git a/.jobs.yml b/.jobs.yml index f272ef38..f84beecb 100644 --- a/.jobs.yml +++ b/.jobs.yml @@ -28,6 +28,7 @@ helper/python-test-helper: - script: test dependencies: - helper/python-test-helper:build + - helper/python-test-helper:lint tags: - test @@ -97,6 +98,7 @@ services/auth: - script: test dependencies: - services/auth:build + - services/auth:lint tags: - test @@ -114,6 +116,7 @@ services/authorization: - script: build dependencies: - services/common:build + - services/common:lint - script: build-docker dependencies: - services/authorization:build @@ -125,6 +128,7 @@ services/authorization: - script: test dependencies: - services/authorization:build + - services/authorization:lint tags: - test @@ -289,6 +293,7 @@ clients/api/python: - script: test dependencies: - clients/api/python:build + - clients/api/python:lint tags: - test @@ -305,7 +310,9 @@ clients/soa/python: - test - script: test dependencies: + - clients/api/python:test - clients/soa/python:build + - clients/soa/python:lint - helper/python-test-helper:test tags: - test @@ -333,7 +340,10 @@ clients/soa_services/electricalConnection/python: - test - script: test dependencies: + - clients/api/python:test + - clients/soa/python:test - clients/soa_services/electricalConnection/python:build + - clients/soa_services/electricalConnection/python:lint - helper/python-test-helper:test tags: - test @@ -360,7 +370,10 @@ clients/soa_services/webcam/python: - test - script: test dependencies: + - clients/api/python:test + - clients/soa/python:test - clients/soa_services/webcam/python:build + - clients/soa_services/webcam/python:lint - helper/python-test-helper:test tags: - test @@ -387,7 +400,10 @@ clients/soa_services/file/python: - test - script: test dependencies: + - clients/api/python:test + - clients/soa/python:test - clients/soa_services/file/python:build + - clients/soa_services/file/python:lint - helper/python-test-helper:test tags: - test @@ -414,7 +430,10 @@ clients/soa_services/message/python: - test - script: test dependencies: + - clients/api/python:test + - clients/soa/python:test - clients/soa_services/message/python:build + - clients/soa_services/message/python:lint - helper/python-test-helper:test tags: - test @@ -441,7 +460,10 @@ clients/soa_services/parameter/python: - test - script: test dependencies: + - clients/api/python:test + - clients/soa/python:test - clients/soa_services/message/python:build + - clients/soa_services/message/python:lint - helper/python-test-helper:test tags: - test @@ -471,6 +493,14 @@ integration-test: - services/experiment:build - services/federation:build - services/gateway:build + - services/auth:build-docker + - services/authorization:build-docker + - services/device:build-docker + - services/experiment:build-docker + - services/federation:build-docker + - services/gateway:build-docker + - services/auth:test + - services/authorization:test - clients/api/js:build - clients/soa/js:build - clients/soa_services/electricalConnection/js:build diff --git a/clients/soa/python/.vscode/settings.json b/clients/soa/python/.vscode/settings.json index 2aadde0b..327eb86c 100644 --- a/clients/soa/python/.vscode/settings.json +++ b/clients/soa/python/.vscode/settings.json @@ -7,7 +7,7 @@ "editor.defaultFormatter": "ms-python.black-formatter", "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" }, }, "isort.args": [ diff --git a/clients/soa/python/scripts/lint.sh b/clients/soa/python/scripts/lint.sh index c739c426..82243291 100755 --- a/clients/soa/python/scripts/lint.sh +++ b/clients/soa/python/scripts/lint.sh @@ -1,3 +1,9 @@ #!/bin/sh -tox -e lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../../helper/python-test-helper/dist/python-latest.tar.gz ./dependencies/python-test-helper.tar.gz + +tox -e lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa/python/scripts/test.sh b/clients/soa/python/scripts/test.sh index 088c7722..08cd57ad 100755 --- a/clients/soa/python/scripts/test.sh +++ b/clients/soa/python/scripts/test.sh @@ -1,3 +1,9 @@ #!/bin/sh -tox --recreate --skip-env lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../../helper/python-test-helper/dist/python-latest.tar.gz ./dependencies/python-test-helper.tar.gz + +tox --recreate --skip-env lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa/python/tox.ini b/clients/soa/python/tox.ini index 1f31716d..4bfb7a09 100644 --- a/clients/soa/python/tox.ini +++ b/clients/soa/python/tox.ini @@ -23,8 +23,8 @@ deps = pytest-aiohttp python-dateutil pyee - ../../api/python - ../../../helper/python-test-helper + ./dependencies/api-client.tar.gz + ./dependencies/python-test-helper.tar.gz commands = coverage run --source crosslab.soa_client -m pytest -W error -W ignore:pkg_resources:DeprecationWarning @@ -51,7 +51,7 @@ deps = flake8 mypy types-python-dateutil - ../../api/python + ./dependencies/api-client.tar.gz commands = flake8 src mypy --check-untyped-defs src diff --git a/clients/soa_services/electricalConnection/python/.vscode/settings.json b/clients/soa_services/electricalConnection/python/.vscode/settings.json index 8f7703e3..c115d7cb 100644 --- a/clients/soa_services/electricalConnection/python/.vscode/settings.json +++ b/clients/soa_services/electricalConnection/python/.vscode/settings.json @@ -7,7 +7,7 @@ "editor.defaultFormatter": "ms-python.black-formatter", "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" }, }, "isort.args": [ diff --git a/clients/soa_services/electricalConnection/python/scripts/lint.sh b/clients/soa_services/electricalConnection/python/scripts/lint.sh index c739c426..d22fb7a7 100755 --- a/clients/soa_services/electricalConnection/python/scripts/lint.sh +++ b/clients/soa_services/electricalConnection/python/scripts/lint.sh @@ -1,3 +1,9 @@ #!/bin/sh -tox -e lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../soa/python/dist/python-latest.tar.gz ./dependencies/soa-client.tar.gz + +tox -e lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa_services/electricalConnection/python/scripts/test.sh b/clients/soa_services/electricalConnection/python/scripts/test.sh index 088c7722..9a774f37 100755 --- a/clients/soa_services/electricalConnection/python/scripts/test.sh +++ b/clients/soa_services/electricalConnection/python/scripts/test.sh @@ -1,3 +1,10 @@ #!/bin/sh -tox --recreate --skip-env lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../soa/python/dist/python-latest.tar.gz ./dependencies/soa-client.tar.gz +cp ../../../helper/python-test-helper/dist/python-latest.tar.gz ./dependencies/python-test-helper.tar.gz + +tox --recreate --skip-env lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa_services/electricalConnection/python/tox.ini b/clients/soa_services/electricalConnection/python/tox.ini index c5720eba..c8ec6e0d 100644 --- a/clients/soa_services/electricalConnection/python/tox.ini +++ b/clients/soa_services/electricalConnection/python/tox.ini @@ -13,9 +13,9 @@ deps = coverage pytest pytest-asyncio - ../../../api/python - ../../../soa/python - ../../../../helper/python-test-helper + ./dependencies/api-client.tar.gz + ./dependencies/soa-client.tar.gz + ./dependencies/python-test-helper.tar.gz commands = coverage run --source crosslab.soa_services.electrical -m pytest -W error -W ignore:pkg_resources:DeprecationWarning @@ -42,8 +42,8 @@ basepython = deps = flake8 mypy - -e ../../../api/python - -e ../../../soa/python + ./dependencies/api-client.tar.gz + ./dependencies/soa-client.tar.gz commands = flake8 src mypy --check-untyped-defs src diff --git a/clients/soa_services/file/python/scripts/lint.sh b/clients/soa_services/file/python/scripts/lint.sh index c739c426..d22fb7a7 100755 --- a/clients/soa_services/file/python/scripts/lint.sh +++ b/clients/soa_services/file/python/scripts/lint.sh @@ -1,3 +1,9 @@ #!/bin/sh -tox -e lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../soa/python/dist/python-latest.tar.gz ./dependencies/soa-client.tar.gz + +tox -e lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa_services/file/python/scripts/test.sh b/clients/soa_services/file/python/scripts/test.sh index 088c7722..9a774f37 100755 --- a/clients/soa_services/file/python/scripts/test.sh +++ b/clients/soa_services/file/python/scripts/test.sh @@ -1,3 +1,10 @@ #!/bin/sh -tox --recreate --skip-env lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../soa/python/dist/python-latest.tar.gz ./dependencies/soa-client.tar.gz +cp ../../../helper/python-test-helper/dist/python-latest.tar.gz ./dependencies/python-test-helper.tar.gz + +tox --recreate --skip-env lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa_services/file/python/tox.ini b/clients/soa_services/file/python/tox.ini index 876f9e8d..2e0493f9 100644 --- a/clients/soa_services/file/python/tox.ini +++ b/clients/soa_services/file/python/tox.ini @@ -11,9 +11,9 @@ envlist = deps = coverage pytest - ../../../api/python - ../../../soa/python - ../../../../helper/python-test-helper + ./dependencies/api-client.tar.gz + ./dependencies/soa-client.tar.gz + ./dependencies/python-test-helper.tar.gz commands = coverage run --source crosslab.soa_services.file -m pytest @@ -38,8 +38,8 @@ basepython = deps = flake8 mypy - ../../../api/python - ../../../soa/python + ./dependencies/api-client.tar.gz + ./dependencies/soa-client.tar.gz commands = flake8 src mypy --check-untyped-defs src diff --git a/clients/soa_services/message/python/scripts/lint.sh b/clients/soa_services/message/python/scripts/lint.sh index c739c426..d22fb7a7 100755 --- a/clients/soa_services/message/python/scripts/lint.sh +++ b/clients/soa_services/message/python/scripts/lint.sh @@ -1,3 +1,9 @@ #!/bin/sh -tox -e lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../soa/python/dist/python-latest.tar.gz ./dependencies/soa-client.tar.gz + +tox -e lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa_services/message/python/scripts/test.sh b/clients/soa_services/message/python/scripts/test.sh index 088c7722..9a774f37 100755 --- a/clients/soa_services/message/python/scripts/test.sh +++ b/clients/soa_services/message/python/scripts/test.sh @@ -1,3 +1,10 @@ #!/bin/sh -tox --recreate --skip-env lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../soa/python/dist/python-latest.tar.gz ./dependencies/soa-client.tar.gz +cp ../../../helper/python-test-helper/dist/python-latest.tar.gz ./dependencies/python-test-helper.tar.gz + +tox --recreate --skip-env lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa_services/message/python/tox.ini b/clients/soa_services/message/python/tox.ini index 6447d415..c5e4b3c4 100644 --- a/clients/soa_services/message/python/tox.ini +++ b/clients/soa_services/message/python/tox.ini @@ -11,9 +11,9 @@ envlist = deps = coverage pytest - ../../../api/python - ../../../soa/python - ../../../../helper/python-test-helper + ./dependencies/api-client.tar.gz + ./dependencies/soa-client.tar.gz + ./dependencies/python-test-helper.tar.gz commands = coverage run --source crosslab.soa_services.message -m pytest -W error -W ignore:pkg_resources:DeprecationWarning @@ -38,8 +38,8 @@ basepython = deps = flake8 mypy - ../../../api/python - ../../../soa/python + ./dependencies/api-client.tar.gz + ./dependencies/soa-client.tar.gz commands = flake8 src mypy --check-untyped-defs src diff --git a/clients/soa_services/parameter/python/scripts/lint.sh b/clients/soa_services/parameter/python/scripts/lint.sh index c739c426..d22fb7a7 100755 --- a/clients/soa_services/parameter/python/scripts/lint.sh +++ b/clients/soa_services/parameter/python/scripts/lint.sh @@ -1,3 +1,9 @@ #!/bin/sh -tox -e lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../soa/python/dist/python-latest.tar.gz ./dependencies/soa-client.tar.gz + +tox -e lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa_services/parameter/python/scripts/test.sh b/clients/soa_services/parameter/python/scripts/test.sh index 088c7722..9a774f37 100755 --- a/clients/soa_services/parameter/python/scripts/test.sh +++ b/clients/soa_services/parameter/python/scripts/test.sh @@ -1,3 +1,10 @@ #!/bin/sh -tox --recreate --skip-env lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../soa/python/dist/python-latest.tar.gz ./dependencies/soa-client.tar.gz +cp ../../../helper/python-test-helper/dist/python-latest.tar.gz ./dependencies/python-test-helper.tar.gz + +tox --recreate --skip-env lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa_services/parameter/python/tox.ini b/clients/soa_services/parameter/python/tox.ini index 3cc5f317..907c5b40 100644 --- a/clients/soa_services/parameter/python/tox.ini +++ b/clients/soa_services/parameter/python/tox.ini @@ -11,9 +11,9 @@ envlist = deps = coverage pytest - ../../../api/python - ../../../soa/python - ../../../../helper/python-test-helper + ./dependencies/api-client.tar.gz + ./dependencies/soa-client.tar.gz + ./dependencies/python-test-helper.tar.gz commands = coverage run --source crosslab.soa_services.parameter -m pytest -W error -W ignore:pkg_resources:DeprecationWarning @@ -38,8 +38,8 @@ basepython = deps = flake8 mypy - ../../../api/python - ../../../soa/python + ./dependencies/api-client.tar.gz + ./dependencies/soa-client.tar.gz commands = flake8 src mypy --check-untyped-defs src diff --git a/clients/soa_services/webcam/python/scripts/lint.sh b/clients/soa_services/webcam/python/scripts/lint.sh index c739c426..d22fb7a7 100755 --- a/clients/soa_services/webcam/python/scripts/lint.sh +++ b/clients/soa_services/webcam/python/scripts/lint.sh @@ -1,3 +1,9 @@ #!/bin/sh -tox -e lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../soa/python/dist/python-latest.tar.gz ./dependencies/soa-client.tar.gz + +tox -e lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa_services/webcam/python/scripts/test.sh b/clients/soa_services/webcam/python/scripts/test.sh index 088c7722..9a774f37 100755 --- a/clients/soa_services/webcam/python/scripts/test.sh +++ b/clients/soa_services/webcam/python/scripts/test.sh @@ -1,3 +1,10 @@ #!/bin/sh -tox --recreate --skip-env lint \ No newline at end of file +mkdir -p dependencies +cp ../../api/python/dist/python-latest.tar.gz ./dependencies/api-client.tar.gz +cp ../../soa/python/dist/python-latest.tar.gz ./dependencies/soa-client.tar.gz +cp ../../../helper/python-test-helper/dist/python-latest.tar.gz ./dependencies/python-test-helper.tar.gz + +tox --recreate --skip-env lint + +rm -r dependencies \ No newline at end of file diff --git a/clients/soa_services/webcam/python/tox.ini b/clients/soa_services/webcam/python/tox.ini index f20a7a8b..508e1106 100644 --- a/clients/soa_services/webcam/python/tox.ini +++ b/clients/soa_services/webcam/python/tox.ini @@ -12,9 +12,9 @@ deps = coverage pytest pytest-asyncio - ../../../api/python - ../../../soa/python - ../../../../helper/python-test-helper + ./dependencies/api-client.tar.gz + ./dependencies/soa-client.tar.gz + ./dependencies/python-test-helper.tar.gz commands = coverage run --source crosslab.soa_services.webcam -m pytest -W error -W ignore:pkg_resources:DeprecationWarning @@ -39,8 +39,8 @@ basepython = deps = flake8 mypy - ../../../api/python - ../../../soa/python + ./dependencies/api-client.tar.gz + ./dependencies/soa-client.tar.gz commands = flake8 src mypy --check-untyped-defs src diff --git a/helper/builder/package-lock.json b/helper/builder/package-lock.json new file mode 100644 index 00000000..966e4237 --- /dev/null +++ b/helper/builder/package-lock.json @@ -0,0 +1,1799 @@ +{ + "name": "builder", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "builder", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "chalk": "^5.3.0", + "fuzzy": "^0.1.3", + "inquirer": "^9.2.19", + "inquirer-autocomplete-prompt": "^3.0.1", + "inquirer-search-list": "^1.2.6", + "js-yaml": "^4.1.0", + "terminal-kit": "^3.1.1" + }, + "devDependencies": { + "@types/inquirer": "^9.0.7", + "@types/inquirer-autocomplete-prompt": "^3.0.3", + "@types/js-yaml": "^4.0.9", + "@types/node": "^20.12.7", + "@types/terminal-kit": "^2.5.6", + "tsx": "^4.7.2", + "typescript": "^5.4.5" + } + }, + "node_modules/@cronvel/get-pixels": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@cronvel/get-pixels/-/get-pixels-3.4.1.tgz", + "integrity": "sha512-gB5C5nDIacLUdsMuW8YsM9SzK3vaFANe4J11CVXpovpy7bZUGrcJKmc6m/0gWG789pKr6XSZY2aEetjFvSRw5g==", + "dependencies": { + "jpeg-js": "^0.4.4", + "ndarray": "^1.0.19", + "ndarray-pack": "^1.1.1", + "node-bitmap": "0.0.1", + "omggif": "^1.0.10", + "pngjs": "^6.0.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@inquirer/figures": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.1.tgz", + "integrity": "sha512-mtup3wVKia3ZwULPHcbs4Mor8Voi+iIXEWD7wCNbIO6lYR62oPCTQyrddi5OMYVXHzeCSoneZwJuS8sBvlEwDw==", + "engines": { + "node": ">=18" + } + }, + "node_modules/@ljharb/through": { + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.13.tgz", + "integrity": "sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/@types/inquirer": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-9.0.7.tgz", + "integrity": "sha512-Q0zyBupO6NxGRZut/JdmqYKOnN95Eg5V8Csg3PGKkP+FnvsUZx1jAyK7fztIszxxMuoBA6E3KXWvdZVXIpx60g==", + "dev": true, + "dependencies": { + "@types/through": "*", + "rxjs": "^7.2.0" + } + }, + "node_modules/@types/inquirer-autocomplete-prompt": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/inquirer-autocomplete-prompt/-/inquirer-autocomplete-prompt-3.0.3.tgz", + "integrity": "sha512-OQCW09mEECgvhcppbQRgZSmWskWv58l+WwyUvWB1oxTu3CZj8keYSDZR9U8owUzJ5Zeux5kacN9iVPJLXcoLXg==", + "dev": true, + "dependencies": { + "@types/inquirer": "*" + } + }, + "node_modules/@types/js-yaml": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", + "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", + "dev": true + }, + "node_modules/@types/nextgen-events": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@types/nextgen-events/-/nextgen-events-1.1.4.tgz", + "integrity": "sha512-YczHp+887i3MpHUOCOztk7y10SklNZ3aQlToKnu0LON0ZdFpgwq8POtnATAoFz8V1IxyR6d8pp8ZyYkUIy26Cw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/terminal-kit": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@types/terminal-kit/-/terminal-kit-2.5.6.tgz", + "integrity": "sha512-S5kRC7wzduRj/Wrc8BCRPfQBSWi3bj3CCUBIkmrzBzrc0sjgxPqYZPvdDxhuBGCsOPZFJiDSrzUa9mYXVOOm4g==", + "dev": true, + "dependencies": { + "@types/nextgen-events": "*" + } + }, + "node_modules/@types/through": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.33.tgz", + "integrity": "sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, + "node_modules/chroma-js": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chroma-js/-/chroma-js-2.4.2.tgz", + "integrity": "sha512-U9eDw6+wt7V8z5NncY2jJfZa+hUH8XEj8FQHgFJTrUFnJfXYf4Ml4adI2vXZOjqRDpFWtYVWypDfZwnJ+HIR4A==" + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/cwise-compiler": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", + "integrity": "sha512-WXlK/m+Di8DMMcCjcWr4i+XzcQra9eCdXIJrgh4TUgh0pIS/yJduLxS9JgefsHJ/YVLdgPtXm9r62W92MvanEQ==", + "dependencies": { + "uniq": "^1.0.0" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/fuzzy": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/fuzzy/-/fuzzy-0.1.3.tgz", + "integrity": "sha512-/gZffu4ykarLrCiP3Ygsa86UAo1E5vEVlvTrpkKywXSbP9Xhln3oSp9QSV57gEq3JFFpGJ4GZ+5zdEp3FcUh4w==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-tsconfig": { + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", + "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/inquirer": { + "version": "9.2.19", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.19.tgz", + "integrity": "sha512-WpxOT71HGsFya6/mj5PUue0sWwbpbiPfAR+332zLj/siB0QA1PZM8v3GepegFV1Op189UxHUCF6y8AySdtOMVA==", + "dependencies": { + "@inquirer/figures": "^1.0.1", + "@ljharb/through": "^2.3.13", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/inquirer-autocomplete-prompt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/inquirer-autocomplete-prompt/-/inquirer-autocomplete-prompt-3.0.1.tgz", + "integrity": "sha512-DQBXwX2fVQPVUzu4v4lGgtNgyjcX2+rTyphb2MeSOQh3xUayKAfHAF4y0KgsMi06m6ZiR3xIOdzMZMfQgX2m9w==", + "dependencies": { + "ansi-escapes": "^6.0.0", + "figures": "^5.0.0", + "picocolors": "^1.0.0", + "run-async": "^2.4.1", + "rxjs": "^7.5.6" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "inquirer": "^9.1.0" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/ansi-escapes": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.1.tgz", + "integrity": "sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/figures": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz", + "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==", + "dependencies": { + "escape-string-regexp": "^5.0.0", + "is-unicode-supported": "^1.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/inquirer-search-list": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/inquirer-search-list/-/inquirer-search-list-1.2.6.tgz", + "integrity": "sha512-C4pKSW7FOYnkAloH8rB4FiM91H1v08QFZZJh6KRt//bMfdDBIhgdX8wjHvrVH2bu5oIo6wYqGpzSBxkeClPxew==", + "dependencies": { + "chalk": "^2.3.0", + "figures": "^2.0.0", + "fuzzy": "^0.1.3", + "inquirer": "^3.3.0" + } + }, + "node_modules/inquirer-search-list/node_modules/ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha512-j/Toj7f1z98Hh2cYo2BVr85EpIRWqUi7rtRSGxh/cqUjqrnJe9l9UE7IUGd2vQ2p+kSHLkSzObQPZPLUC6TQwg==" + }, + "node_modules/inquirer-search-list/node_modules/cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", + "dependencies": { + "restore-cursor": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==" + }, + "node_modules/inquirer-search-list/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/inquirer-search-list/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/inquirer-search-list/node_modules/external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dependencies": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/inquirer-search-list/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "dependencies": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "node_modules/inquirer-search-list/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==" + }, + "node_modules/inquirer-search-list/node_modules/onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", + "dependencies": { + "mimic-fn": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", + "dependencies": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/inquirer-search-list/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-search-list/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/iota-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz", + "integrity": "sha512-pZ2xT+LOHckCatGQ3DcG/a+QuEqvoxqkiL7tvE8nn3uuu+f6i1TtpB5/FtWFbxUuVr5PZCx8KskuGatbJDXOWA==" + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jpeg-js": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz", + "integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/lazyness": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/lazyness/-/lazyness-1.2.0.tgz", + "integrity": "sha512-KenL6EFbwxBwRxG93t0gcUyi0Nw0Ub31FJKN1laA4UscdkL1K1AxUd0gYZdcLU3v+x+wcFi4uQKS5hL+fk500g==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/ndarray": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/ndarray/-/ndarray-1.0.19.tgz", + "integrity": "sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ==", + "dependencies": { + "iota-array": "^1.0.0", + "is-buffer": "^1.0.2" + } + }, + "node_modules/ndarray-pack": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz", + "integrity": "sha512-51cECUJMT0rUZNQa09EoKsnFeDL4x2dHRT0VR5U2H5ZgEcm95ZDWcMA5JShroXjHOejmAD/fg8+H+OvUnVXz2g==", + "dependencies": { + "cwise-compiler": "^1.1.2", + "ndarray": "^1.0.13" + } + }, + "node_modules/nextgen-events": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/nextgen-events/-/nextgen-events-1.5.3.tgz", + "integrity": "sha512-P6qw6kenNXP+J9XlKJNi/MNHUQ+Lx5K8FEcSfX7/w8KJdZan5+BB5MKzuNgL2RTjHG1Svg8SehfseVEp8zAqwA==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/node-bitmap": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz", + "integrity": "sha512-Jx5lPaaLdIaOsj2mVLWMWulXF6GQVdyLvNSxmiYCvZ8Ma2hfKX0POoR2kgKOqz+oFsRreq0yYZjQ2wjE9VNzCA==", + "engines": { + "node": ">=v0.6.5" + } + }, + "node_modules/omggif": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz", + "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==" + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/pngjs": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-6.0.0.tgz", + "integrity": "sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg==", + "engines": { + "node": ">=12.13.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha512-Cun9QucwK6MIrp3mry/Y7hqD1oFqTYLQ4pGxaHTjIdaFDWRGGLikqp6u8LcWJnzpoALg9hap+JGk8sFIUuEGNA==" + }, + "node_modules/rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha512-3xPNZGW93oCjiO7PtKxRK6iOVYBWBvtf9QHDfU23Oc+dLIQmAV//UnyXV/yihv81VS/UqoQPk4NegS8EFi55Hg==", + "dependencies": { + "rx-lite": "*" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, + "node_modules/seventh": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/seventh/-/seventh-0.9.2.tgz", + "integrity": "sha512-C+dnbBXIEycnrN6/CpFt/Rt8ccMzAX3wbwJU61RTfC8lYPMzSkKkAVWnUEMTZDHdvtlrTupZeCUK4G+uP4TmRQ==", + "dependencies": { + "setimmediate": "^1.0.5" + }, + "engines": { + "node": ">=16.13.0" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-kit": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/string-kit/-/string-kit-0.18.2.tgz", + "integrity": "sha512-LInRG+5UVQc8WeWPKi5MITq50hBmmncNuB8bgNRJjSi695cMPLEJf+eNmUYt+PQSkgrZRbzMMmQ5mKAl7PfIxw==", + "engines": { + "node": ">=14.15.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/terminal-kit": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/terminal-kit/-/terminal-kit-3.1.1.tgz", + "integrity": "sha512-R+R47zBQ14Ax2NZCLeuVl2GwonDwQN4iAsjQZICW8gMzaV+VIJMvL4qhUQtzDOhENADyNPQvY1Vz5G0bHHkLEA==", + "dependencies": { + "@cronvel/get-pixels": "^3.4.1", + "chroma-js": "^2.4.2", + "lazyness": "^1.2.0", + "ndarray": "^1.0.19", + "nextgen-events": "^1.5.3", + "seventh": "^0.9.2", + "string-kit": "^0.18.1", + "tree-kit": "^0.8.7" + }, + "engines": { + "node": ">=16.13.0" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tree-kit": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/tree-kit/-/tree-kit-0.8.7.tgz", + "integrity": "sha512-BA/cp8KBvbBDkunxIuoBqzz3pYHL7J8QdzbKohK09urOpHFYqEe/xWGKkECEQG+LvfREd1GNqH3643GYFX8wSQ==", + "engines": { + "node": ">=16.13.0" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/tsx": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.2.tgz", + "integrity": "sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==", + "dev": true, + "dependencies": { + "esbuild": "~0.19.10", + "get-tsconfig": "^4.7.2" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + } + } +} diff --git a/helper/builder/package.json b/helper/builder/package.json new file mode 100644 index 00000000..73915ba4 --- /dev/null +++ b/helper/builder/package.json @@ -0,0 +1,29 @@ +{ + "name": "builder", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "start": "tsx src/index.ts" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/inquirer": "^9.0.7", + "@types/inquirer-autocomplete-prompt": "^3.0.3", + "@types/js-yaml": "^4.0.9", + "@types/node": "^20.12.7", + "@types/terminal-kit": "^2.5.6", + "tsx": "^4.7.2", + "typescript": "^5.4.5" + }, + "dependencies": { + "chalk": "^5.3.0", + "fuzzy": "^0.1.3", + "inquirer": "^9.2.19", + "inquirer-autocomplete-prompt": "^3.0.1", + "inquirer-search-list": "^1.2.6", + "js-yaml": "^4.1.0", + "terminal-kit": "^3.1.1" + } +} diff --git a/helper/builder/src/actions/clean.ts b/helper/builder/src/actions/clean.ts new file mode 100644 index 00000000..3bae5627 --- /dev/null +++ b/helper/builder/src/actions/clean.ts @@ -0,0 +1,60 @@ +import path from "path"; +import fs from "fs"; +import { execSync } from "child_process"; + +export async function clean(directoryPath: string, script?: string) { + const directory = fs.readdirSync(directoryPath); + const foldersToDelete = ["node_modules", "dist", "build"]; + const packageBakPath = path.resolve(directoryPath, "package.bak"); + const packageJsonPath = path.resolve(directoryPath, "package.json"); + const packageResolvedJsonPath = path.resolve( + directoryPath, + "package.resolved.json" + ); + + for (const item of directory) { + const itemPath = path.resolve(directoryPath, item); + const stat = fs.statSync(itemPath); + + if (!stat.isDirectory()) continue; + + if (foldersToDelete.includes(item)) { + if (item !== "dist") { + try { + fs.rmSync(itemPath, { recursive: true, force: true }); + } catch (error) { + if ( + error && + typeof error === "object" && + "code" in error && + error.code === "EACCES" + ) + execSync(`sudo rm -rf ${itemPath}`); + } + continue; + } + + for (const file of fs.readdirSync(path.resolve(directoryPath, item))) { + if (file.startsWith(script ? `${script}.` : "")) + fs.rmSync(path.resolve(directoryPath, item, file), { force: true }); + } + } + } + + if ( + fs.existsSync(packageResolvedJsonPath) && + fs.existsSync(packageBakPath) && + fs.existsSync(packageJsonPath) + ) { + const packageJson = fs.readFileSync(packageJsonPath, { encoding: "utf-8" }); + const packageResolvedJson = fs.readFileSync(packageResolvedJsonPath, { + encoding: "utf-8", + }); + + if (packageJson === packageResolvedJson) { + fs.renameSync(packageBakPath, packageJsonPath); + } + + fs.rmSync(packageResolvedJsonPath); + } +} diff --git a/helper/builder/src/actions/hash.ts b/helper/builder/src/actions/hash.ts new file mode 100644 index 00000000..1bb92f9d --- /dev/null +++ b/helper/builder/src/actions/hash.ts @@ -0,0 +1,32 @@ +import { execSync } from "child_process"; +import { DependencyGraph } from "../dependency-graph"; +import path from "path"; +import { rootDirectory } from "../root-directory"; +import { Job } from "../projects-loader"; +import fs from "fs"; + +export function hash(job: Job, dependencyGraph: DependencyGraph): string { + const paths = [ + ...(job.paths + ? job.paths.map((p) => path.resolve(rootDirectory, job.project, p)) + : [path.resolve(rootDirectory, job.project)]), + path.resolve(rootDirectory, job.project, `scripts/${job.script}.sh`), + ]; + + for (const dependency of dependencyGraph.getDependencies(`${job.title}`)) { + const [dependencyProject, dependencyScript] = dependency.split(":"); + const dependencyPath = path.resolve( + rootDirectory, + dependencyProject, + `dist/${dependencyScript}.hash` + ); + if (fs.existsSync(dependencyPath)) paths.push(dependencyPath); + } + + return execSync( + `bash ${rootDirectory}/scripts/helper.d/path_hash.sh -p ${paths.join( + " -p " + )}`, + { encoding: "utf-8" } + ); +} diff --git a/helper/builder/src/actions/run-job.ts b/helper/builder/src/actions/run-job.ts new file mode 100644 index 00000000..9d9c2588 --- /dev/null +++ b/helper/builder/src/actions/run-job.ts @@ -0,0 +1,124 @@ +import chalk from "chalk"; +import path from "path"; +import { DependencyGraph, buildDependencyGraph } from "../dependency-graph"; +import { Job, Project, loadJob } from "../projects-loader"; +import fs from "fs"; +import { clean } from "./clean"; +import { rootDirectory } from "../root-directory"; +import { hash } from "./hash"; +import { runSetScene } from "../helper/run-set-scene"; +import { runScript } from "../helper/run-script"; +import { getHash } from "../helper/get-hash"; +import { getStatus } from "../helper/get-status"; +import { RunningJob, renderExecution } from "../helper/render-execution"; + +export async function runJob( + job: Job, + projects: Project[], + execution: "clean" | "normal" | "retry" +) { + const dependencyGraph = buildDependencyGraph([job], projects); + return await _run(dependencyGraph, projects, execution); +} + +export async function runDependencyGraph( + dependencyGraph: DependencyGraph, + projects: Project[], + execution: "clean" | "normal" | "retry" +) { + return _run(dependencyGraph, projects, execution); +} + +async function _run( + dependencyGraph: DependencyGraph, + projects: Project[], + execution: "clean" | "normal" | "retry" +) { + const runningJobs: RunningJob[] = []; + const stopRender = renderExecution(runningJobs, dependencyGraph); + + await dependencyGraph.invert().traverse(async (node, abort) => { + const currentJob = loadJob(node, projects); + if ( + !abort && + (execution === "clean" || + (execution === "retry" && getStatus(currentJob) === "failed") || + (execution === "normal" && + getHash(currentJob) !== hash(currentJob, dependencyGraph))) + ) + await clean( + path.resolve(rootDirectory, currentJob.project), + currentJob.script + ); + + return true; + }); + + await dependencyGraph.invert().traverse(async (node, abort) => { + const currentJob = loadJob(node, projects); + const projectPath = path.resolve(rootDirectory, currentJob.project); + const distPath = path.resolve(projectPath, "dist"); + const statusPath = path.resolve(distPath, `${currentJob.script}.status`); + const hashPath = path.resolve(distPath, `${currentJob.script}.hash`); + const logPath = path.resolve(distPath, `${currentJob.script}.log`); + const badgePath = path.resolve(distPath, `${currentJob.script}.badge`); + + fs.rmSync(badgePath, { force: true }); + fs.rmSync(logPath, { force: true }); + if (!fs.existsSync(distPath)) fs.mkdirSync(distPath); + + const runningJob = { + project: currentJob.project, + script: currentJob.script, + status: abort ? chalk.yellow("aborted") : "running", + }; + runningJobs.push(runningJob); + + if (abort) return false; + + const status = + getHash(currentJob) === hash(currentJob, dependencyGraph) + ? `skipped (${getStatus(currentJob)})` + : await runScript(currentJob, logPath); + + switch (status) { + case "success": + runningJob.status = chalk.green("success"); + break; + case "failed": + runningJob.status = chalk.red("failed"); + break; + case "skipped (success)": + runningJob.status = chalk.green("skipped (success)"); + break; + case "skipped (failed)": + runningJob.status = chalk.red("skipped (failed)"); + break; + case "aborted": + runningJob.status = chalk.yellow("aborted"); + break; + default: + runningJob.status = chalk.gray(status); + } + + if ( + fs.existsSync( + path.resolve(rootDirectory, currentJob.project, "scripts/set-scene.sh") + ) + ) + await runSetScene(currentJob.project); + + if (status !== "aborted" && !status.includes("skipped")) { + fs.writeFileSync( + statusPath, + status.includes("success") ? "success" : "failed" + ); + fs.writeFileSync(hashPath, hash(currentJob, dependencyGraph)); + } + return status.includes("success"); + }); + + await new Promise((resolve) => setTimeout(resolve, 150)); + + stopRender(); +} diff --git a/helper/builder/src/dependency-graph.ts b/helper/builder/src/dependency-graph.ts new file mode 100644 index 00000000..de5bedae --- /dev/null +++ b/helper/builder/src/dependency-graph.ts @@ -0,0 +1,174 @@ +import { terminal } from "terminal-kit"; +import { Job, Project } from "./projects-loader"; + +type Node = string; +type Edge = { + from: Node; + to: Node; +}; +type Path = { + from: Node; + to: Node; + edges: Edge[]; +}; + +export class DependencyGraph { + private roots: Node[] = []; + private leaves: Node[] = []; + private _nodes: Node[] = []; + private edges: Edge[] = []; + private paths: Path[] = []; + + public get nodes() { + return this._nodes; + } + + public addNode(node: Node): void { + if (this._nodes.find((n) => n === node)) return; + this._nodes.push(node); + this.roots.push(node); + this.leaves.push(node); + } + + public addEdge(from: Node, to: Node): void { + if (!this._nodes.find((node) => node === from)) + throw new Error(`Could not find node "${from}"!`); + if (!this._nodes.find((node) => node === to)) + throw new Error(`Could not find node "${to}"!`); + if (from === to) + throw new Error("The dependency graph must not contain any loops!"); + + if (this.edges.find((e) => e.from === from && e.to === to)) return; + + const edge: Edge = { from, to }; + this.edges.push(edge); + this.paths.push({ from, to, edges: [edge] }); + + this.roots = this.roots.filter((root) => edge.to !== root); + this.leaves = this.leaves.filter((leave) => edge.from !== leave); + + for (const path of this.paths) { + if (path.to === from && path.from === to) { + console.error("Found a loop:", [...path.edges, edge]); + throw new Error("The dependency graph must not contain any loops!"); + } + if (path.to === from) + this.paths.push({ from: path.from, to, edges: [...path.edges, edge] }); + } + } + + public invert(): DependencyGraph { + const invertedDependencyGraph = new DependencyGraph(); + + for (const node of this.nodes) { + invertedDependencyGraph.addNode(node); + } + + for (const edge of this.edges) { + invertedDependencyGraph.addEdge(edge.to, edge.from); + } + + return invertedDependencyGraph; + } + + public getDependents(node: Node): Node[] { + return this.edges + .filter((edge) => edge.to === node) + .map((edge) => edge.from); + } + + public getDependencies(node: Node): Node[] { + return this.edges + .filter((edge) => edge.from === node) + .map((edge) => edge.to); + } + + public traverse( + f: (node: Node, abort: boolean) => Promise | boolean + ) { + const running: Promise[] = []; + + return new Promise((resolve) => { + const started: Set = new Set(); + const finished: Set = new Set(); + const failed: Set = new Set(); + + const tf = async (node: Node, abort: boolean) => { + started.add(node); + const success = await f(node, abort); + finished.add(node); + if (!success || abort) failed.add(node); + + if (finished.size === this.nodes.length) { + resolve(); + return; + } + + const dependencies = this.getDependencies(node); + for (const dependency of dependencies) { + const dependents = this.getDependents(dependency); + + if ( + dependents.filter((dependent) => failed.has(dependent)).length > + 0 && + !started.has(dependency) + ) { + running.push(tf(dependency, true)); + continue; + } + + const dependentsLeft = dependents.filter( + (dependent) => !finished.has(dependent) + ).length; + if (!dependentsLeft && !started.has(dependency)) + running.push(tf(dependency, false)); + } + }; + + for (const root of this.roots) { + running.push(tf(root, false)); + } + }); + } +} + +function addDependency( + from: Job, + to: Job, + projects: Project[], + dependencyGraph: DependencyGraph +): void { + dependencyGraph.addNode(to.title); + dependencyGraph.addEdge(from.title, to.title); + + for (const dependency of to.dependencies ?? []) { + const [projectName, script] = dependency.split(":"); + const project = projects.find((p) => p.name === projectName); + const dependencyJob = project?.jobs.find((j) => j.script === script); + if (!dependencyJob) throw new Error(`Could not find job "${dependency}"`); + + addDependency(to, dependencyJob, projects, dependencyGraph); + } +} + +export function buildDependencyGraph( + jobs: Job[], + projects: Project[] +): DependencyGraph { + const dependencyGraph = new DependencyGraph(); + + for (const job of jobs) { + dependencyGraph.addNode(job.title); + + for (const dependency of job.dependencies ?? []) { + const [projectName, script] = dependency.split(":"); + const project = projects.find((p) => p.name === projectName); + const dependencyJob = project?.jobs.find((j) => j.script === script); + if (!dependencyJob) throw new Error(`Could not find job "${dependency}"`); + + addDependency(job, dependencyJob, projects, dependencyGraph); + } + } + + return dependencyGraph; +} diff --git a/helper/builder/src/helper/get-hash.ts b/helper/builder/src/helper/get-hash.ts new file mode 100644 index 00000000..8fa62fe3 --- /dev/null +++ b/helper/builder/src/helper/get-hash.ts @@ -0,0 +1,18 @@ +import fs from "fs"; +import path from "path"; +import { rootDirectory } from "../root-directory"; +import { Job } from "../projects-loader"; + +export function getHash(job: Job): string | undefined { + const hashPath = path.resolve( + rootDirectory, + job.project, + `dist/${job.script}.hash` + ); + + if (fs.existsSync(hashPath)) { + return fs.readFileSync(hashPath, { encoding: "utf-8" }); + } + + return undefined; +} diff --git a/helper/builder/src/helper/get-status.ts b/helper/builder/src/helper/get-status.ts new file mode 100644 index 00000000..035b1711 --- /dev/null +++ b/helper/builder/src/helper/get-status.ts @@ -0,0 +1,20 @@ +import fs from "fs"; +import path from "path"; +import { rootDirectory } from "../root-directory"; +import { Job } from "../projects-loader"; + +export function getStatus(job: Job): string | undefined { + const statusPath = path.resolve( + rootDirectory, + job.project, + `dist/${job.script}.status` + ); + + if (fs.existsSync(statusPath)) { + return fs + .readFileSync(statusPath, { encoding: "utf-8" }) + .replace(/\s/g, ""); + } + + return undefined; +} diff --git a/helper/builder/src/helper/render-execution.ts b/helper/builder/src/helper/render-execution.ts new file mode 100644 index 00000000..0a0e5b63 --- /dev/null +++ b/helper/builder/src/helper/render-execution.ts @@ -0,0 +1,69 @@ +import { terminal } from "terminal-kit"; +import { DependencyGraph } from "../dependency-graph"; + +export type RunningJob = { project: string; script: string; status: string }; + +export function renderExecution( + runningJobs: RunningJob[], + dependencyGraph: DependencyGraph +): () => void { + const status = { x: 0 }; + const loadingInterval = loadingAnimation(status); + const chars = ["â ™", "â ˜", "â °", "â ´", "â ¤", "â ¦", "â †", "â ƒ", "â ‹", "â ‰"]; + let maxLength = 0; + dependencyGraph.nodes.forEach((n) => { + if (n.length > maxLength) maxLength = n.length; + }); + + let printedJobs = 0; + + const interval = setInterval(() => { + const up = printedJobs; + up > 0 && terminal.up(up); + terminal.eraseDisplayBelow(); + terminal.blue( + `Running: ${ + runningJobs.filter((job) => job.status === "running").length + }, Success: ${ + runningJobs.filter((job) => job.status.includes("success")).length + }, Failed: ${ + runningJobs.filter((job) => job.status.includes("failed")).length + }\n` + ); + for (const runningJob of runningJobs) { + if (runningJob.status === "running") + terminal.blue( + `Executing "${runningJob.project}:${runningJob.script}" ${" ".repeat( + maxLength - runningJob.project.length - runningJob.script.length + 1 + )} ${ + runningJob.status === "running" + ? chars[status.x] + : runningJob.status + }\n` + ); + } + printedJobs = + runningJobs.filter((job) => job.status === "running").length + 1; + }, 100); + + return () => { + clearInterval(interval); + clearInterval(loadingInterval); + runningJobs + .filter((job) => job.status.includes("failed")) + .forEach((job) => + terminal.red(`Job ${job.project}:${job.script} failed!\n`) + ); + }; +} + +function loadingAnimation(status: { x: number }, delay = 200) { + status.x = 0; + + const chars = ["â ™", "â ˜", "â °", "â ´", "â ¤", "â ¦", "â †", "â ƒ", "â ‹", "â ‰"]; + + return setInterval(function () { + status.x++; + status.x = status.x % chars.length; + }, delay); +} diff --git a/helper/builder/src/helper/run-script.ts b/helper/builder/src/helper/run-script.ts new file mode 100644 index 00000000..0aa6e35a --- /dev/null +++ b/helper/builder/src/helper/run-script.ts @@ -0,0 +1,34 @@ +import { spawn } from "child_process"; +import path from "path"; +import { rootDirectory } from "../root-directory"; +import fs from "fs"; +import { Job } from "../projects-loader"; +import { addProcess } from "./sigint-handler"; + +export async function runScript( + job: Job, + logPath: string +): Promise<"success" | "failed" | "skipped" | "aborted"> { + const childProcess = spawn("bash", [`scripts/${job.script}.sh`], { + cwd: path.resolve(rootDirectory, job.project), + detached: true, + }); + + return new Promise<"success" | "failed" | "skipped" | "aborted">( + (resolve) => { + addProcess(childProcess, () => resolve("aborted")); + childProcess.on("error", () => { + resolve("failed"); + }); + childProcess.on("exit", () => { + resolve(childProcess.exitCode === 0 ? "success" : "failed"); + }); + childProcess.stdout.on("data", (data) => { + fs.appendFileSync(logPath, data); + }); + childProcess.stderr.on("data", (data) => { + fs.appendFileSync(logPath, data); + }); + } + ); +} diff --git a/helper/builder/src/helper/run-set-scene.ts b/helper/builder/src/helper/run-set-scene.ts new file mode 100644 index 00000000..fa196b1f --- /dev/null +++ b/helper/builder/src/helper/run-set-scene.ts @@ -0,0 +1,22 @@ +import { spawn } from "child_process"; +import path from "path"; +import { rootDirectory } from "../root-directory"; +import { addProcess } from "./sigint-handler"; + +export async function runSetScene(project: string) { + const setSceneProcess = spawn("bash", [`scripts/set-scene.sh`], { + cwd: path.resolve(rootDirectory, project), + detached: true, + }); + + addProcess(setSceneProcess); + + return new Promise((resolve) => { + setSceneProcess.on("error", () => { + resolve(false); + }); + setSceneProcess.on("exit", () => { + resolve(setSceneProcess.exitCode === 0); + }); + }); +} diff --git a/helper/builder/src/helper/sigint-handler.ts b/helper/builder/src/helper/sigint-handler.ts new file mode 100644 index 00000000..cf27c34e --- /dev/null +++ b/helper/builder/src/helper/sigint-handler.ts @@ -0,0 +1,21 @@ +const processes: [ + { pid?: number; exitCode: number | null }, + (() => void) | undefined +][] = []; + +process.on("SIGINT", function () { + for (const proc of processes) { + if (proc[0].pid && proc[0].exitCode === null) + try { + process.kill(-proc[0].pid); + } catch {} + if (proc[1]) proc[1](); + } +}); + +export function addProcess( + proc: { pid?: number; exitCode: number | null }, + callback?: () => void +) { + processes.push([proc, callback]); +} diff --git a/helper/builder/src/index.ts b/helper/builder/src/index.ts new file mode 100644 index 00000000..5c6c093e --- /dev/null +++ b/helper/builder/src/index.ts @@ -0,0 +1,3 @@ +import { mainMenu } from "./prompts/main-menu"; + +mainMenu(); diff --git a/helper/builder/src/projects-loader.ts b/helper/builder/src/projects-loader.ts new file mode 100644 index 00000000..1fbe41ea --- /dev/null +++ b/helper/builder/src/projects-loader.ts @@ -0,0 +1,60 @@ +import fs from "fs"; +import yaml from "js-yaml"; + +export type Job = { + project: string; + title: string; + script: string; + paths?: string[]; + dependencies?: string[]; + tags?: string[]; +}; + +export type Project = { + name: string; + jobs: Job[]; +}; + +type JobPrototype = { + script: string; + dependencies?: string[]; +}; + +type ProjectsDictionary = { + [k: string]: JobPrototype[]; +}; + +export function loadProjects(): Project[] { + const jobsFile = fs.readFileSync("../../.jobs.yml", { encoding: "utf-8" }); + const projectsPrototype = yaml.load(jobsFile) as ProjectsDictionary; + const projects: Project[] = []; + + for (const projectName of Object.keys(projectsPrototype)) { + projects.push({ + name: projectName, + jobs: [ + ...projectsPrototype[projectName].map((job) => { + return { + title: `${projectName}:${job.script}`, + project: projectName, + ...job, + }; + }), + ], + }); + } + + return projects; +} + +export function loadJob(jobTitle: string, projects: Project[]): Job { + const [projectName, script] = jobTitle.split(":"); + + const result = projects + .find((project) => project.name === projectName) + ?.jobs.find((job) => job.script === script); + + if (!result) throw new Error(`could not load job "${jobTitle}"`); + + return result; +} diff --git a/helper/builder/src/prompts/main-menu.ts b/helper/builder/src/prompts/main-menu.ts new file mode 100644 index 00000000..ce937e60 --- /dev/null +++ b/helper/builder/src/prompts/main-menu.ts @@ -0,0 +1,60 @@ +import inquirer from "inquirer"; +import { loadJob, loadProjects } from "../projects-loader"; +import { selectProjectPrompt } from "./select-project"; +import { selectJobPrompt } from "./select-job"; +import { runDependencyGraph, runJob } from "../actions/run-job"; +import { clean } from "../actions/clean"; +import path from "path"; +import { rootDirectory } from "../root-directory"; +import { selectJobExecutionPrompt } from "./select-job-execution"; +import { DependencyGraph, buildDependencyGraph } from "../dependency-graph"; + +export async function mainMenu() { + const projects = loadProjects(); + + const { action } = await inquirer.prompt({ + type: "list", + name: "action", + loop: false, + message: "Select an action:", + choices: [ + "run specific job", + "clean project build files", + "build all", + "execute all jobs", + ], + }); + + switch (action) { + case "run specific job": { + const project = await selectProjectPrompt(projects); + const job = await selectJobPrompt(project.jobs); + const execution = await selectJobExecutionPrompt(); + await runJob(job, projects, execution); + break; + } + case "clean project build files": { + const project = await selectProjectPrompt(projects); + await clean(path.resolve(rootDirectory, project.name)); + break; + } + case "build all": { + const projects = loadProjects(); + const jobs = projects.flatMap((project) => + project.jobs.filter((job) => job.script === "build") + ); + const dependencyGraph = buildDependencyGraph(jobs, projects); + const execution = await selectJobExecutionPrompt(); + await runDependencyGraph(dependencyGraph, projects, execution); + break; + } + case "execute all jobs": { + const projects = loadProjects(); + const jobs = projects.flatMap((project) => project.jobs); + const dependencyGraph = buildDependencyGraph(jobs, projects); + const execution = await selectJobExecutionPrompt(); + await runDependencyGraph(dependencyGraph, projects, execution); + break; + } + } +} diff --git a/helper/builder/src/prompts/select-job-execution.ts b/helper/builder/src/prompts/select-job-execution.ts new file mode 100644 index 00000000..c2f2617d --- /dev/null +++ b/helper/builder/src/prompts/select-job-execution.ts @@ -0,0 +1,25 @@ +import inquirer from "inquirer"; +import AutocompletePrompt from "inquirer-autocomplete-prompt"; +import fuzzy from "fuzzy"; + +inquirer.registerPrompt("autocomplete", AutocompletePrompt); + +export async function selectJobExecutionPrompt(): Promise< + "clean" | "normal" | "retry" +> { + const { execution } = await inquirer.prompt({ + type: "autocomplete", + name: "execution", + message: "Select how to execute the job:", + source: (_: unknown, input = "") => searchExecutionName(input), + } as { name: "execution" }); + + return execution; +} + +function searchExecutionName(input = "") { + const executionNames = ["normal", "retry", "clean"]; + const results = fuzzy.filter(input, executionNames).map((el) => el.original); + + return results; +} diff --git a/helper/builder/src/prompts/select-job.ts b/helper/builder/src/prompts/select-job.ts new file mode 100644 index 00000000..51d43db0 --- /dev/null +++ b/helper/builder/src/prompts/select-job.ts @@ -0,0 +1,29 @@ +import inquirer from "inquirer"; +import { Job } from "../projects-loader"; +import AutocompletePrompt from "inquirer-autocomplete-prompt"; +import fuzzy from "fuzzy"; + +inquirer.registerPrompt("autocomplete", AutocompletePrompt); + +export async function selectJobPrompt(jobs: Job[]): Promise { + const { job } = await inquirer.prompt({ + type: "autocomplete", + name: "job", + message: "Select a job:", + source: (_: unknown, input = "") => searchScriptName(jobs, input), + } as { name: "job" }); + + return job; +} + +function searchScriptName(jobs: Job[], input = "") { + const scriptNames = jobs.map((job) => job.script); + const results = fuzzy.filter(input, scriptNames).map((el) => { + return { + name: el.original, + value: jobs.find((job) => job.script === el.original), + }; + }); + + return results; +} diff --git a/helper/builder/src/prompts/select-project.ts b/helper/builder/src/prompts/select-project.ts new file mode 100644 index 00000000..5833880c --- /dev/null +++ b/helper/builder/src/prompts/select-project.ts @@ -0,0 +1,32 @@ +import inquirer from "inquirer"; +import AutocompletePrompt from "inquirer-autocomplete-prompt"; +import { Project } from "../projects-loader"; +import fuzzy from "fuzzy"; + +inquirer.registerPrompt("autocomplete", AutocompletePrompt); + +export async function selectProjectPrompt( + projects: Project[] +): Promise { + const { project } = await inquirer.prompt({ + type: "autocomplete", + name: "project", + message: "Select a project:", + source: (_: unknown, input: string) => searchProjectName(projects, input), + loop: false, + } as { name: "project" }); + + return project; +} + +async function searchProjectName(projects: Project[], input = "") { + const projectNames = projects.map((project) => project.name); + const results = fuzzy.filter(input, projectNames).map((el) => { + return { + name: el.original, + value: projects.find((project) => project.name === el.original), + }; + }); + + return results; +} diff --git a/helper/builder/src/root-directory.ts b/helper/builder/src/root-directory.ts new file mode 100644 index 00000000..805108bb --- /dev/null +++ b/helper/builder/src/root-directory.ts @@ -0,0 +1,16 @@ +import path from "path"; + +function resolveRootDirectory() { + let currentDir = path.resolve(""); + let i = 1; + + while (!currentDir.endsWith("crosslab")) { + if (currentDir === "/") + throw new Error("Expected root directory with name 'crosslab'"); + currentDir = path.resolve("../".repeat(i++)); + } + + return currentDir; +} + +export const rootDirectory = resolveRootDirectory(); diff --git a/helper/builder/tsconfig.json b/helper/builder/tsconfig.json new file mode 100644 index 00000000..07bf27fd --- /dev/null +++ b/helper/builder/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "commonjs", + "rootDir": "./src", + "outDir": "./dist", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + } +} From a77e4c2f49af223992d8bf4c13d5317207eabc07 Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Tue, 25 Jun 2024 07:53:12 +0000 Subject: [PATCH 40/79] WIP: booking service integration --- .../src/methods/experimentStatus/book.ts | 20 +++++- .../src/methods/experimentStatus/finish.ts | 69 ++++++++++++++----- 2 files changed, 72 insertions(+), 17 deletions(-) diff --git a/services/experiment/src/methods/experimentStatus/book.ts b/services/experiment/src/methods/experimentStatus/book.ts index 81743024..cf1710b0 100644 --- a/services/experiment/src/methods/experimentStatus/book.ts +++ b/services/experiment/src/methods/experimentStatus/book.ts @@ -1,4 +1,4 @@ -import { MissingPropertyError } from '@crosslab/service-common'; +import { InvalidChangeError, MissingPropertyError } from '@crosslab/service-common'; import { logger } from '@crosslab/service-common'; import { clients } from '../../clients/index.js'; @@ -17,6 +17,24 @@ export async function bookExperiment(experimentModel: ExperimentModel) { if (!experimentModel.devices || experimentModel.devices.length === 0) throw new MissingPropertyError(`Experiment ${experimentUrl} has no devices`, 400); + if ( + experimentModel.bookingID && + experimentModel.bookingStart && + experimentModel.bookingEnd + ) { + const booking = await clients.booking.getBooking(experimentModel.bookingID); + if ( + Date.parse(booking.Booking.Time.Start) !== + Date.parse(experimentModel.bookingStart) || + Date.parse(booking.Booking.Time.End) !== Date.parse(experimentModel.bookingEnd) + ) { + throw new InvalidChangeError( + `The start and end of a booking cannot be changed!`, + 400, + ); + } + } + const currentTime = new Date(); const startTime = new Date(experimentModel.bookingStart ?? currentTime); const endTime = new Date( diff --git a/services/experiment/src/methods/experimentStatus/finish.ts b/services/experiment/src/methods/experimentStatus/finish.ts index 6ff945ae..44c3f136 100644 --- a/services/experiment/src/methods/experimentStatus/finish.ts +++ b/services/experiment/src/methods/experimentStatus/finish.ts @@ -1,7 +1,8 @@ import { logger } from '@crosslab/service-common'; import assert from 'assert'; -import { UnsuccessfulRequestError } from '../../clients/device/client.js'; +import { UnsuccessfulRequestError as UnsuccessfulRequestErrorBooking } from '../../clients/booking/client.js'; +import { UnsuccessfulRequestError as UnsuccessfulRequestErrorDevice } from '../../clients/device/client.js'; import { Clients } from '../../clients/index.js'; import { repositories } from '../../database/dataSource.js'; import { ExperimentModel } from '../../database/model.js'; @@ -27,23 +28,23 @@ export async function finishExperiment( case 'booked': { assert(validateExperimentStatus(experimentModel, 'booked')); - // await apiClient.deleteBooking(experimentModel.bookingID) + await deleteBooking(experimentModel, clients); break; } case 'booking-locked': { assert(validateExperimentStatus(experimentModel, 'booking-locked')); - // await apiClient.unlockBooking(experimentModel.bookingID) - // await apiClient.deleteBooking(experimentModel.bookingID) + await unlockBooking(experimentModel, clients); + await deleteBooking(experimentModel, clients); break; } case 'devices-instantiated': { assert(validateExperimentStatus(experimentModel, 'devices-instantiated')); - // await apiClient.unlockBooking(experimentModel.bookingID) - // await apiClient.deleteBooking(experimentModel.bookingID) + await unlockBooking(experimentModel, clients); + await deleteBooking(experimentModel, clients); await deleteInstances(experimentModel, clients); break; @@ -51,8 +52,8 @@ export async function finishExperiment( case 'booking-updated': { assert(validateExperimentStatus(experimentModel, 'booking-updated')); - // await apiClient.unlockBooking(experimentModel.bookingID) - // await apiClient.deleteBooking(experimentModel.bookingID) + await unlockBooking(experimentModel, clients); + await deleteBooking(experimentModel, clients); await deleteInstances(experimentModel, clients); break; @@ -60,8 +61,8 @@ export async function finishExperiment( case 'peerconnections-created': { assert(validateExperimentStatus(experimentModel, 'peerconnections-created')); - // await apiClient.unlockBooking(experimentModel.bookingID) - // await apiClient.deleteBooking(experimentModel.bookingID) + await unlockBooking(experimentModel, clients); + await deleteBooking(experimentModel, clients); await deletePeerconnections(experimentModel, clients); await deleteInstances(experimentModel, clients); @@ -70,8 +71,8 @@ export async function finishExperiment( case 'running': { assert(validateExperimentStatus(experimentModel, 'running')); - // await apiClient.unlockBooking(experimentModel.bookingID) - // await apiClient.deleteBooking(experimentModel.bookingID) + await unlockBooking(experimentModel, clients); + await deleteBooking(experimentModel, clients); await deletePeerconnections(experimentModel, clients); await deleteInstances(experimentModel, clients); @@ -98,8 +99,11 @@ async function deleteInstances(experiment: ExperimentModel, clients: Clients) { try { await clients.device.deleteDevice(device.instance.url); } catch (error) { - if (error instanceof UnsuccessfulRequestError && error.response.status === 404) - break; + if ( + error instanceof UnsuccessfulRequestErrorDevice && + error.response.status === 404 + ) + continue; throw error; } } @@ -113,10 +117,43 @@ async function deletePeerconnections(experiment: ExperimentModel, clients: Clien try { await clients.device.deletePeerconnection(peerconnection.url); } catch (error) { - if (error instanceof UnsuccessfulRequestError && error.response.status === 404) - break; + if ( + error instanceof UnsuccessfulRequestErrorDevice && + error.response.status === 404 + ) + continue; throw error; } } } } + +async function unlockBooking(experiment: ExperimentModel, clients: Clients) { + if (experiment.bookingID) { + try { + await clients.booking.unlockBooking(experiment.bookingID); + } catch (error) { + if ( + error instanceof UnsuccessfulRequestErrorBooking && + error.response.status === 404 + ) + return; + throw error; + } + } +} + +async function deleteBooking(experiment: ExperimentModel, clients: Clients) { + if (experiment.bookingID) { + try { + await clients.booking.deleteBooking(experiment.bookingID); + } catch (error) { + if ( + error instanceof UnsuccessfulRequestErrorBooking && + error.response.status === 404 + ) + return; + throw error; + } + } +} From f6bdac3980009109837381a8c39bed07e60e94e8 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 25 Jun 2024 10:46:21 +0200 Subject: [PATCH 41/79] Callbacks are POST and send {Status: "status"} --- services/booking/src/booking-backend/src/internal.ts | 11 ++++++++--- services/booking/src/test_common/src/fakeserver.ts | 12 ++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index e63b3ac1..5b8108a3 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -193,12 +193,17 @@ export async function dispatchCallback(bookingID: bigint) { let db = await mysql.createConnection(config.BookingDSN); await db.connect(); + let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [bookingID]); + if (rows.length == 0) { + throw new Error("booking" + bookingID + " does not exist"); + } + let status: string = rows[0].status; try { - let [rows, fields]: [any, any] = await db.execute("SELECT `id`, `url` FROM bookingcallbacks WHERE booking=? FOR UPDATE", [bookingID]); + [rows, _] = await db.execute("SELECT `id`, `url` FROM bookingcallbacks WHERE booking=? FOR UPDATE", [bookingID]); for (let i = 0; i < rows.length; i++) { try { - let response = await fetch(rows[i].url, { method: 'GET' }); + let response = await fetch(rows[i].url, { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "Status": status }) }); if (response.status == 404 || response.status == 410) { // Code depends on service // Callback no longer needed await db.execute("DELETE FROM bookingcallbacks WHERE id=?", [rows[i].id]); @@ -636,7 +641,7 @@ export async function DeleteBooking(bookingID: bigint, targetStatus = "cancelled if (message !== undefined && message !== "") { let [rows, fields] = await db.execute("SELECT `message` FROM booking WHERE id=?", [bookingID]); let targetMessage: string = ""; - if (rows[0].message === undefined || rows[0].message === null|| rows[0].message == "" ) { + if (rows[0].message === undefined || rows[0].message === null || rows[0].message == "") { targetMessage = message; } else { targetMessage = rows[0].message + "\n" + message; diff --git a/services/booking/src/test_common/src/fakeserver.ts b/services/booking/src/test_common/src/fakeserver.ts index 699c0672..325a3e14 100644 --- a/services/booking/src/test_common/src/fakeserver.ts +++ b/services/booking/src/test_common/src/fakeserver.ts @@ -203,33 +203,33 @@ export async function startFakeServer() { } }); - app.get('/test_callbacks/test-local-single', (req, res) => { + app.post('/test_callbacks/test-local-single', (req, res) => { fakeServerConfig.callback_test_local_single_was_called = true; res.status(200).send(); }); - app.get('/test_callbacks/test-local-two-first', (req, res) => { + app.post('/test_callbacks/test-local-two-first', (req, res) => { fakeServerConfig.callback_test_local_two_first_was_called = true; res.status(200).send(); }); - app.get('/test_callbacks/test-local-two-second', (req, res) => { + app.post('/test_callbacks/test-local-two-second', (req, res) => { fakeServerConfig.callback_test_local_two_second_was_called = true; res.status(200).send(); }); - app.get('/test_callbacks/test-local-group', (req, res) => { + app.post('/test_callbacks/test-local-group', (req, res) => { fakeServerConfig.callback_test_local_group_was_called = true; res.status(200).send(); }); - app.get('/test_callbacks/test-remote-single', (req, res) => { + app.post('/test_callbacks/test-remote-single', (req, res) => { fakeServerConfig.callback_test_remote_single_was_called = true; res.status(200).send(); }); // to add in tests: http://localhost:10801/test_callbacks/callback-test-new - app.get('/test_callbacks/callback-test-new', (req, res) => { + app.post('/test_callbacks/callback-test-new', (req, res) => { fakeServerConfig.callback_test_new_was_called = true; res.status(200).send(); }); From 59a7f4a948eac59d9b88522a62bc08c8a678d672 Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Tue, 25 Jun 2024 10:40:29 +0000 Subject: [PATCH 42/79] WIP: booking service integration --- services/experiment/src/methods/callbacks.ts | 8 +- .../src/methods/experimentStatus/book.ts | 8 ++ .../operations/callbacks/callbackHandler.ts | 134 ++++++++++++------ .../src/operations/callbacks/index.ts | 7 +- .../src/operations/callbacks/types.ts | 25 ++++ 5 files changed, 131 insertions(+), 51 deletions(-) create mode 100644 services/experiment/src/operations/callbacks/types.ts diff --git a/services/experiment/src/methods/callbacks.ts b/services/experiment/src/methods/callbacks.ts index 8df8b310..dccb6486 100644 --- a/services/experiment/src/methods/callbacks.ts +++ b/services/experiment/src/methods/callbacks.ts @@ -53,10 +53,10 @@ export async function sendChangedCallback(experiment: ExperimentModel) { if (res.status === 410) { const changedCallbackURLs = changedCallbacks.get(experiment.uuid); - changedCallbacks.set( - experiment.uuid, - changedCallbackURLs?.filter(cbUrl => cbUrl != url), - ); + const newCallbackURLs = changedCallbackURLs?.filter(cbUrl => cbUrl != url) ?? []; + if (newCallbackURLs.length > 0) + changedCallbacks.set(experiment.uuid, newCallbackURLs); + else changedCallbacks.delete(experiment.uuid); } } catch (error) { logger.log('error', 'An error occurred while sending a changed-callback', { diff --git a/services/experiment/src/methods/experimentStatus/book.ts b/services/experiment/src/methods/experimentStatus/book.ts index cf1710b0..f120e65a 100644 --- a/services/experiment/src/methods/experimentStatus/book.ts +++ b/services/experiment/src/methods/experimentStatus/book.ts @@ -4,6 +4,8 @@ import { logger } from '@crosslab/service-common'; import { clients } from '../../clients/index.js'; import { repositories } from '../../database/dataSource.js'; import { ExperimentModel } from '../../database/model.js'; +import { callbackHandler } from '../../operations/callbacks/callbackHandler.js'; +import { callbackUrl } from '../../operations/callbacks/index.js'; import { experimentUrlFromId } from '../url.js'; /** @@ -53,6 +55,12 @@ export async function bookExperiment(experimentModel: ExperimentModel) { Type: 'normal', }); + await clients.booking.updateBooking(BookingID, { + Callback: callbackUrl, + }); + + callbackHandler.addListener('booking', BookingID, experimentModel.uuid); + experimentModel.bookingStart = startTime.toISOString(); experimentModel.bookingEnd = endTime.toISOString(); experimentModel.bookingID = BookingID; diff --git a/services/experiment/src/operations/callbacks/callbackHandler.ts b/services/experiment/src/operations/callbacks/callbackHandler.ts index 12d011d5..81032b0a 100644 --- a/services/experiment/src/operations/callbacks/callbackHandler.ts +++ b/services/experiment/src/operations/callbacks/callbackHandler.ts @@ -15,18 +15,35 @@ import { EventCallback } from '../../generated/types.js'; import { finishExperiment } from '../../methods/experimentStatus/finish.js'; import { mutexManager } from '../../methods/mutexManager.js'; import { sendStatusUpdateMessages } from '../../methods/statusUpdateMessage.js'; +import { BookingChangedCallback, isBookingChangedCallback } from './types.js'; class CallbackHandler { - private deviceListeners: Map = new Map(); - private peerconnectionListeners: Map = new Map(); - private deviceMutex: Mutex = new Mutex(); - private peerconnectionMutex: Mutex = new Mutex(); + private callbackListeners: { + device: Map; + peerconnection: Map; + booking: Map; + } = { + device: new Map(), + peerconnection: new Map(), + booking: new Map(), + }; + private mutexes: { + device: Mutex; + peerconnection: Mutex; + booking: Mutex; + } = { + device: new Mutex(), + peerconnection: new Mutex(), + booking: new Mutex(), + }; - public async handleCallback(callback: EventCallback): Promise<200 | 410> { + public async handleEventCallback(callback: EventCallback): Promise<200 | 410> { const release = callback.eventType === 'device-changed' - ? await this.deviceMutex.acquire() - : await this.peerconnectionMutex.acquire(); + ? await this.mutexes.device.acquire() + : callback.eventType === 'booking-changed' + ? await this.mutexes.booking.acquire() + : await this.mutexes.peerconnection.acquire(); try { switch (callback.eventType) { @@ -51,6 +68,14 @@ class CallbackHandler { 400, ); return await this.handlePeerconnectionStatusChangedCallback(callback); + case 'booking-changed': + if (!isBookingChangedCallback(callback)) { + throw new MalformedBodyError( + 'Body of request is not a valid booking-changed event callback', + 400, + ); + } + return await this.handleBookingChangedCallback(callback); default: throw new InvalidValueError( `Event-callbacks of type "${callback.eventType}" are not supported`, @@ -63,51 +88,30 @@ class CallbackHandler { } public addListener( - type: 'device' | 'peerconnection', + type: 'device' | 'peerconnection' | 'booking', url: string, experimentUuid: string, ) { - switch (type) { - case 'device': { - const listeners = this.deviceListeners.get(url) ?? []; - if (!listeners.includes(experimentUuid)) listeners.push(experimentUuid); - this.deviceListeners.set(url, listeners); - break; - } - case 'peerconnection': { - const listeners = this.peerconnectionListeners.get(url) ?? []; - if (!listeners.includes(experimentUuid)) listeners.push(experimentUuid); - this.peerconnectionListeners.set(url, listeners); - break; - } - } + const listeners = this.callbackListeners[type].get(url) ?? []; + if (!listeners.includes(experimentUuid)) listeners.push(experimentUuid); + this.callbackListeners[type].set(url, listeners); } public removeListener( - type: 'device' | 'peerconnection', + type: 'device' | 'peerconnection' | 'booking', url: string, experimentUuid: string, ) { - switch (type) { - case 'device': { - const listeners = this.deviceListeners.get(url) ?? []; - const newListeners = listeners.filter(listener => listener !== experimentUuid); - this.deviceListeners.set(url, newListeners); - break; - } - case 'peerconnection': { - const listeners = this.peerconnectionListeners.get(url) ?? []; - const newListeners = listeners.filter(listener => listener !== experimentUuid); - this.deviceListeners.set(url, newListeners); - break; - } - } + const listeners = this.callbackListeners[type].get(url) ?? []; + const newListeners = listeners.filter(listener => listener !== experimentUuid); + if (newListeners.length > 0) this.callbackListeners[type].set(url, newListeners); + else this.callbackListeners[type].delete(url); } private async handleDeviceChangedCallback( callback: DeviceChangedEventCallback, ): Promise<200 | 410> { - const listeners = this.deviceListeners.get(callback.device.url) ?? []; + const listeners = this.callbackListeners.device.get(callback.device.url) ?? []; for (const listener of listeners) { const release = await mutexManager.acquire(listener); @@ -142,11 +146,11 @@ class CallbackHandler { } } - const newListeners = this.deviceListeners.get(callback.device.url) ?? []; + const newListeners = this.callbackListeners.device.get(callback.device.url) ?? []; if (newListeners.length > 0) { return 200; } else { - this.deviceListeners.delete(callback.device.url); + this.callbackListeners.device.delete(callback.device.url); return 410; } } @@ -154,7 +158,8 @@ class CallbackHandler { private async handlePeerconnectionClosedCallback( callback: PeerconnectionClosedEventCallback, ): Promise<200 | 410> { - const listeners = this.peerconnectionListeners.get(callback.peerconnection.url) ?? []; + const listeners = + this.callbackListeners.peerconnection.get(callback.peerconnection.url) ?? []; for (const listener of listeners) { const release = await mutexManager.acquire(listener); @@ -181,11 +186,11 @@ class CallbackHandler { } const newListeners = - this.peerconnectionListeners.get(callback.peerconnection.url) ?? []; + this.callbackListeners.peerconnection.get(callback.peerconnection.url) ?? []; if (newListeners.length > 0) { return 200; } else { - this.peerconnectionListeners.delete(callback.peerconnection.url); + this.callbackListeners.peerconnection.delete(callback.peerconnection.url); return 410; } } @@ -193,7 +198,8 @@ class CallbackHandler { private async handlePeerconnectionStatusChangedCallback( callback: PeerconnectionStatusChangedEventCallback, ): Promise<200 | 410> { - const listeners = this.peerconnectionListeners.get(callback.peerconnection.url) ?? []; + const listeners = + this.callbackListeners.peerconnection.get(callback.peerconnection.url) ?? []; for (const listener of listeners) { const release = await mutexManager.acquire(listener); @@ -256,11 +262,47 @@ class CallbackHandler { } const newListeners = - this.peerconnectionListeners.get(callback.peerconnection.url) ?? []; + this.callbackListeners.peerconnection.get(callback.peerconnection.url) ?? []; + if (newListeners.length > 0) { + return 200; + } else { + this.callbackListeners.peerconnection.delete(callback.peerconnection.url); + return 410; + } + } + + private async handleBookingChangedCallback( + callback: BookingChangedCallback, + ): Promise<200 | 410> { + const listeners = this.callbackListeners.booking.get(callback.url) ?? []; + + for (const listener of listeners) { + const release = await mutexManager.acquire(listener); + + try { + const experimentModel = await repositories.experiment.findOneOrFail({ + where: { uuid: listener }, + }); + + if (experimentModel.bookingID !== callback.url) { + this.removeListener('booking', callback.url, listener); + continue; + } + + const booking = await clients.booking.getBooking(callback.url); + + if (booking.Booking.Status === 'cancelled') + await finishExperiment(experimentModel, clients); + } finally { + release(); + } + } + + const newListeners = this.callbackListeners.booking.get(callback.url) ?? []; if (newListeners.length > 0) { return 200; } else { - this.peerconnectionListeners.delete(callback.peerconnection.url); + this.callbackListeners.booking.delete(callback.url); return 410; } } diff --git a/services/experiment/src/operations/callbacks/index.ts b/services/experiment/src/operations/callbacks/index.ts index d90d8577..dc067829 100644 --- a/services/experiment/src/operations/callbacks/index.ts +++ b/services/experiment/src/operations/callbacks/index.ts @@ -21,9 +21,14 @@ export function callbackHandling(app: express.Application) { const callback = req.body; logger.log('info', 'received a callback', { data: { callback } }); + if (!('callbackType' in callback)) { + callback.callbackType = 'event'; + callback.eventType = 'booking-changed'; + } + switch (callback.callbackType) { case 'event': - return res.status(await callbackHandler.handleCallback(callback)).send(); + return res.status(await callbackHandler.handleEventCallback(callback)).send(); default: throw new InvalidValueError( `Callbacks of type "${callback.callbackType}" are not supported`, diff --git a/services/experiment/src/operations/callbacks/types.ts b/services/experiment/src/operations/callbacks/types.ts new file mode 100644 index 00000000..66c40825 --- /dev/null +++ b/services/experiment/src/operations/callbacks/types.ts @@ -0,0 +1,25 @@ +export type BookingChangedCallback = { + callbackType: 'event'; + eventType: 'booking-changed'; + url: string; + status: string; +}; + +export function isBookingChangedCallback( + callback: unknown, +): callback is BookingChangedCallback { + return ( + typeof callback === 'object' && + callback !== null && + 'callbackType' in callback && + typeof callback.callbackType === 'string' && + callback.callbackType === 'event' && + 'eventType' in callback && + typeof callback.eventType === 'string' && + callback.eventType === 'booking-changed' && + 'url' in callback && + typeof callback.url === 'string' && + 'status' in callback && + typeof callback.status === 'string' + ); +} From c21f6c10f4fcd37d9c012e33c0620b3f875eb6d4 Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Thu, 27 Jun 2024 09:36:30 +0000 Subject: [PATCH 43/79] WIP: booking service integration --- .../python/src/crosslab/api_client/client.py | 13 +++++++-- clients/api/python/tests/test_openapi.py | 2 +- .../api/parameters/experiment_status.yml | 7 +++++ .../experiment/api/resources/experiments.yml | 2 ++ services/experiment/package.json | 2 +- .../src/methods/experimentStatus/run.ts | 29 +++++++++++++++++-- .../operations/callbacks/callbackHandler.ts | 3 +- .../src/operations/callbacks/types.ts | 25 ---------------- .../src/operations/experiments/get.ts | 16 +++++++--- services/experiment/src/types/typeguards.ts | 21 +++++++++++++- services/experiment/src/types/types.ts | 7 +++++ .../clients/experiment/basicValidation.cjs | 2 +- .../clients/experiment/basicValidation.d.cts | 12 ++++++++ services/lti/src/clients/experiment/client.ts | 16 ++++++++-- .../clients/experiment/requestValidation.ts | 16 +++++++++- .../lti/src/clients/experiment/signatures.ts | 8 +++++ 16 files changed, 139 insertions(+), 42 deletions(-) create mode 100644 services/experiment/api/parameters/experiment_status.yml delete mode 100644 services/experiment/src/operations/callbacks/types.ts diff --git a/clients/api/python/src/crosslab/api_client/client.py b/clients/api/python/src/crosslab/api_client/client.py index 94666600..aa03c721 100644 --- a/clients/api/python/src/crosslab/api_client/client.py +++ b/clients/api/python/src/crosslab/api_client/client.py @@ -813,7 +813,7 @@ async def patch_peerconnection_device_status(self, url: str, body: PatchPeerconn return resp raise Exception(f"Unexpected status code: {status}") - async def list_experiments(self, url: str = "/experiments") -> ListExperimentsResponse: # noqa: E501 + async def list_experiments(self, url: str = "/experiments", experimentStatus: Optional[str] = None) -> ListExperimentsResponse: # noqa: E501 """ List experiments """ # noqa: E501 @@ -827,8 +827,17 @@ async def list_experiments(self, url: str = "/experiments") -> ListExperimentsRe valid_url = '/'+m.group(2)+'/experiments' if valid_url.startswith('//'): valid_url = valid_url[1:] + + # build query params + query_params: Dict[str, Union[List[str], str]] = {} + if experimentStatus: + if isinstance(experimentStatus, list): + query_params['experimentStatus'] = experimentStatus + else: + query_params['experimentStatus'] = str(experimentStatus) + # make http call - status, resp = await self._fetch(valid_url, method="get") + status, resp = await self._fetch(valid_url, method="get", params=query_params) # transform response if status == 200: diff --git a/clients/api/python/tests/test_openapi.py b/clients/api/python/tests/test_openapi.py index cf1a1e4f..7336d2a1 100644 --- a/clients/api/python/tests/test_openapi.py +++ b/clients/api/python/tests/test_openapi.py @@ -3466,7 +3466,7 @@ async def test_list_experiments(aioresponses: aioresponses): url_variant = r'experiments' full_url = BASE_URL+r'/experiments' - parameter_list = [{}, ] + parameter_list = [{"experimentStatus": "test_string", }, {}, ] for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"http://NwclrXAIoAJHMVyKoIoS.xxfoad9OtNWxMyq2kGx5D4","status":"created"},{"url":"https://gpvQwLgrWBBvxozT.rdbpyyMAR8WSBkoXtkDeX7BysNkrZe.8SlFVwdKIGbmewpJjeU0ayCar6q74SqFK8vAvqSrmK1BfSqgJCQPcF","status":"created"}]') diff --git a/services/experiment/api/parameters/experiment_status.yml b/services/experiment/api/parameters/experiment_status.yml new file mode 100644 index 00000000..9568fa77 --- /dev/null +++ b/services/experiment/api/parameters/experiment_status.yml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=https://cross-lab-project.github.io/crosslab/meta-schemas/openapi-parameter.json +in: query +name: experimentStatus +description: Only retrieve experiments with this status. +required: false +schema: + type: string diff --git a/services/experiment/api/resources/experiments.yml b/services/experiment/api/resources/experiments.yml index 59879534..974c3326 100644 --- a/services/experiment/api/resources/experiments.yml +++ b/services/experiment/api/resources/experiments.yml @@ -9,6 +9,8 @@ get: - experiment - experiment:read - experiment:read:owned + parameters: + - $ref: '../parameters/experiment_status.yml' responses: 200: description: The list of all experiments. diff --git a/services/experiment/package.json b/services/experiment/package.json index 6b2941c8..d2460705 100644 --- a/services/experiment/package.json +++ b/services/experiment/package.json @@ -19,7 +19,7 @@ "build:generate:test": "npx openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service:test -o test/generated", "build:generate:device": "npx openapi-codegen -i ../device/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/device && prettier ./src/clients/device --write", "build:generate:booking": "npx openapi-codegen -i ../booking/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/booking && prettier ./src/clients/booking --write", - "build:compile": "tsc && cp src/generated/*.cjs app/generated && cp src/clients/device/basicValidation.cjs app/clients/device/", + "build:compile": "tsc && cp src/generated/*.cjs app/generated && cp src/clients/device/basicValidation.cjs app/clients/device/ && cp src/clients/booking/basicValidation.cjs app/clients/booking/", "build:add-shebang": "bash scripts/add-shebang.sh", "build": "npm-run-all build:*", "start": "node app/index.js", diff --git a/services/experiment/src/methods/experimentStatus/run.ts b/services/experiment/src/methods/experimentStatus/run.ts index 09d878a9..f4bad153 100644 --- a/services/experiment/src/methods/experimentStatus/run.ts +++ b/services/experiment/src/methods/experimentStatus/run.ts @@ -1,10 +1,15 @@ -import { MissingEntityError, MissingPropertyError } from '@crosslab/service-common'; +import { + InvalidChangeError, + MissingEntityError, + MissingPropertyError, +} from '@crosslab/service-common'; import { logger } from '@crosslab/service-common'; import { Clients } from '../../clients/index.js'; import { repositories } from '../../database/dataSource.js'; import { ExperimentModel } from '../../database/model.js'; -import { InvalidStateError } from '../../types/errors.js'; +import { InvalidStateError, MalformedExperimentError } from '../../types/errors.js'; +import { validateExperimentStatus } from '../../types/typeguards.js'; import { ResolvedDevice } from '../../types/types.js'; import { experimentUrlFromId } from '../url.js'; import { bookExperiment } from './book.js'; @@ -34,6 +39,26 @@ export async function runExperiment(experimentModel: ExperimentModel, clients: C await bookExperiment(experimentModel); } + // check if booking times have changed and throw error because currently times may not be changed + if (experimentModel.status === 'booked') { + if (!validateExperimentStatus(experimentModel, 'booked')) + throw new MalformedExperimentError( + `Experiment is in status 'booked', but does not satisfy the requirements for this status`, + 500, + ); + const booking = await clients.booking.getBooking(experimentModel.bookingID); + if ( + Date.parse(experimentModel.bookingStart) !== + Date.parse(booking.Booking.Time.Start) || + Date.parse(experimentModel.bookingEnd) !== Date.parse(booking.Booking.Time.End) + ) { + throw new InvalidChangeError( + `The start and end of a booking cannot be changed!`, + 400, + ); + } + } + const resolvedDevices: ResolvedDevice[] = await Promise.all( experimentModel.devices.map(async device => { try { diff --git a/services/experiment/src/operations/callbacks/callbackHandler.ts b/services/experiment/src/operations/callbacks/callbackHandler.ts index 81032b0a..d0cd3ea2 100644 --- a/services/experiment/src/operations/callbacks/callbackHandler.ts +++ b/services/experiment/src/operations/callbacks/callbackHandler.ts @@ -15,7 +15,8 @@ import { EventCallback } from '../../generated/types.js'; import { finishExperiment } from '../../methods/experimentStatus/finish.js'; import { mutexManager } from '../../methods/mutexManager.js'; import { sendStatusUpdateMessages } from '../../methods/statusUpdateMessage.js'; -import { BookingChangedCallback, isBookingChangedCallback } from './types.js'; +import { isBookingChangedCallback } from '../../types/typeguards.js'; +import { BookingChangedCallback } from '../../types/types.js'; class CallbackHandler { private callbackListeners: { diff --git a/services/experiment/src/operations/callbacks/types.ts b/services/experiment/src/operations/callbacks/types.ts deleted file mode 100644 index 66c40825..00000000 --- a/services/experiment/src/operations/callbacks/types.ts +++ /dev/null @@ -1,25 +0,0 @@ -export type BookingChangedCallback = { - callbackType: 'event'; - eventType: 'booking-changed'; - url: string; - status: string; -}; - -export function isBookingChangedCallback( - callback: unknown, -): callback is BookingChangedCallback { - return ( - typeof callback === 'object' && - callback !== null && - 'callbackType' in callback && - typeof callback.callbackType === 'string' && - callback.callbackType === 'event' && - 'eventType' in callback && - typeof callback.eventType === 'string' && - callback.eventType === 'booking-changed' && - 'url' in callback && - typeof callback.url === 'string' && - 'status' in callback && - typeof callback.status === 'string' - ); -} diff --git a/services/experiment/src/operations/experiments/get.ts b/services/experiment/src/operations/experiments/get.ts index 2a6e210b..eaee9744 100644 --- a/services/experiment/src/operations/experiments/get.ts +++ b/services/experiment/src/operations/experiments/get.ts @@ -9,13 +9,13 @@ import { experimentUrlFromId } from '../../methods/url.js'; * /experiments endpoint. * @param authorization The authorization helper object for the request. */ -export const getExperiments: getExperimentsSignature = async req => { +export const getExperiments: getExperimentsSignature = async (req, parameters) => { logger.log('info', 'Handling GET request on endpoint /experiments'); await req.authorization.check_authorization_or_fail('view', 'experiment'); const experimentModels = await repositories.experiment.find(); - + const visibility = await Promise.all( experimentModels.map(experiment => req.authorization.check_authorization( @@ -25,12 +25,20 @@ export const getExperiments: getExperimentsSignature = async req => { ), ); - const visibleExperiments = experimentModels.filter((_value, index) => visibility[index].result); + const visibleExperiments = experimentModels.filter( + (_value, index) => visibility[index].result, + ); + + const experiments = parameters.experimentStatus + ? visibleExperiments.filter( + experiment => experiment.status === parameters.experimentStatus, + ) + : visibleExperiments; logger.log('info', 'Successfully handled GET request on endpoint /experiments'); return { status: 200, - body: await Promise.all(visibleExperiments.map(repositories.experiment.formatOverview)), + body: await Promise.all(experiments.map(repositories.experiment.formatOverview)), }; }; diff --git a/services/experiment/src/types/typeguards.ts b/services/experiment/src/types/typeguards.ts index 445d7a8a..81a128aa 100644 --- a/services/experiment/src/types/typeguards.ts +++ b/services/experiment/src/types/typeguards.ts @@ -1,5 +1,5 @@ import { ExperimentModel } from '../database/model.js'; -import { ExperimentModelStatusMapping } from './types.js'; +import { BookingChangedCallback, ExperimentModelStatusMapping } from './types.js'; export function validateExperimentStatus( experimentModel: ExperimentModel, @@ -122,3 +122,22 @@ function hasBooking(_experimentModel: ExperimentModel) { function hasDevices(experimentModel: ExperimentModel) { return experimentModel.devices && experimentModel.devices.length > 0; } + +export function isBookingChangedCallback( + callback: unknown, +): callback is BookingChangedCallback { + return ( + typeof callback === 'object' && + callback !== null && + 'callbackType' in callback && + typeof callback.callbackType === 'string' && + callback.callbackType === 'event' && + 'eventType' in callback && + typeof callback.eventType === 'string' && + callback.eventType === 'booking-changed' && + 'url' in callback && + typeof callback.url === 'string' && + 'status' in callback && + typeof callback.status === 'string' + ); +} diff --git a/services/experiment/src/types/types.ts b/services/experiment/src/types/types.ts index 03cb858e..5860a60b 100644 --- a/services/experiment/src/types/types.ts +++ b/services/experiment/src/types/types.ts @@ -56,3 +56,10 @@ export type ExperimentModelStatusMapping = : T extends 'finished' ? ExperimentModel : never; + +export type BookingChangedCallback = { + callbackType: 'event'; + eventType: 'booking-changed'; + url: string; + status: string; +}; diff --git a/services/lti/src/clients/experiment/basicValidation.cjs b/services/lti/src/clients/experiment/basicValidation.cjs index a787c166..e49bb9eb 100644 --- a/services/lti/src/clients/experiment/basicValidation.cjs +++ b/services/lti/src/clients/experiment/basicValidation.cjs @@ -5,4 +5,4 @@ * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, * and run openapi-codegeneration to regenerate this file. */ -"use strict";exports.validateExperimentOverview = validate21;const schema6 = {"title":"Experiment Overview","type":"object","properties":{"url":{"type":"string","description":"URL of the experiment","format":"uri","readOnly":true},"status":{"anyOf":[{"type":"string","description":"Status of the experiment","readOnly":true,"enum":["created","booked","setup","running","finished"]},{"type":"string","description":"Status of the experiment","writeOnly":true,"enum":["created","booked","running","finished"]}]}},"required":["url","status"],"x-standalone":true,"x-name":"ExperimentOverview","x-location":"#/components/schemas/experiment_overview","x-schema-type":"all"};const formats0 = require("ajv-formats/dist/formats").fullFormats.uri;function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.url === undefined) && (missing0 = "url")) || ((data.status === undefined) && (missing0 = "status"))){validate21.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'",schema:schema6.required,parentSchema:schema6,data}];return false;}else {if(data.url !== undefined){let data0 = data.url;const _errs1 = errors;if(errors === _errs1){if(errors === _errs1){if(typeof data0 === "string"){if(!(formats0(data0))){validate21.errors = [{instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\"",schema:"uri",parentSchema:schema6.properties.url,data:data0}];return false;}}else {validate21.errors = [{instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema6.properties.url.type,parentSchema:schema6.properties.url,data:data0}];return false;}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.status !== undefined){let data1 = data.status;const _errs3 = errors;const _errs4 = errors;let valid1 = false;const _errs5 = errors;if(typeof data1 !== "string"){const err0 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema6.properties.status.anyOf[0].type,parentSchema:schema6.properties.status.anyOf[0],data:data1};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(!(((((data1 === "created") || (data1 === "booked")) || (data1 === "setup")) || (data1 === "running")) || (data1 === "finished"))){const err1 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf/0/enum",keyword:"enum",params:{allowedValues: schema6.properties.status.anyOf[0].enum},message:"must be equal to one of the allowed values",schema:schema6.properties.status.anyOf[0].enum,parentSchema:schema6.properties.status.anyOf[0],data:data1};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs5 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs7 = errors;if(typeof data1 !== "string"){const err2 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf/1/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema6.properties.status.anyOf[1].type,parentSchema:schema6.properties.status.anyOf[1],data:data1};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(!((((data1 === "created") || (data1 === "booked")) || (data1 === "running")) || (data1 === "finished"))){const err3 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf/1/enum",keyword:"enum",params:{allowedValues: schema6.properties.status.anyOf[1].enum},message:"must be equal to one of the allowed values",schema:schema6.properties.status.anyOf[1].enum,parentSchema:schema6.properties.status.anyOf[1],data:data1};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs7 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf",schema:schema6.properties.status.anyOf,parentSchema:schema6.properties.status,data:data1};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;validate21.errors = vErrors;return false;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}var valid0 = _errs3 === errors;}else {var valid0 = true;}}}}else {validate21.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema6.type,parentSchema:schema6,data}];return false;}}validate21.errors = vErrors;return errors === 0;}exports.validateDevice = validate22;const schema7 = {"title":"Device","type":"object","properties":{"device":{"description":"URL to the [device](https://cross-lab-project.github.io/crosslab/api/device.html#get-/devices/-device_id-).","type":"string","format":"uri"},"role":{"type":"string","description":"The name of the device's role."}},"required":["device","role"],"x-standalone":true,"x-name":"Device","x-location":"#/components/schemas/device","x-schema-type":"all"};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.device === undefined) && (missing0 = "device")) || ((data.role === undefined) && (missing0 = "role"))){validate22.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'",schema:schema7.required,parentSchema:schema7,data}];return false;}else {if(data.device !== undefined){let data0 = data.device;const _errs1 = errors;if(errors === _errs1){if(errors === _errs1){if(typeof data0 === "string"){if(!(formats0(data0))){validate22.errors = [{instancePath:instancePath+"/device",schemaPath:"#/properties/device/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\"",schema:"uri",parentSchema:schema7.properties.device,data:data0}];return false;}}else {validate22.errors = [{instancePath:instancePath+"/device",schemaPath:"#/properties/device/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema7.properties.device.type,parentSchema:schema7.properties.device,data:data0}];return false;}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.role !== undefined){let data1 = data.role;const _errs3 = errors;if(typeof data1 !== "string"){validate22.errors = [{instancePath:instancePath+"/role",schemaPath:"#/properties/role/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema7.properties.role.type,parentSchema:schema7.properties.role,data:data1}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}}}}else {validate22.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema7.type,parentSchema:schema7,data}];return false;}}validate22.errors = vErrors;return errors === 0;}exports.validateRole = validate23;const schema8 = {"title":"role","type":"object","properties":{"name":{"type":"string","description":"Name for an experiment role."},"description":{"type":"string"},"configuration":{"type":"object","description":"Configuration for all devices with this role.","additionalProperties":true}},"required":["name"],"x-standalone":true,"x-name":"Role","x-location":"#/components/schemas/role","x-schema-type":"all"};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.name === undefined) && (missing0 = "name")){validate23.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'",schema:schema8.required,parentSchema:schema8,data}];return false;}else {if(data.name !== undefined){let data0 = data.name;const _errs1 = errors;if(typeof data0 !== "string"){validate23.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema8.properties.name.type,parentSchema:schema8.properties.name,data:data0}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.description !== undefined){let data1 = data.description;const _errs3 = errors;if(typeof data1 !== "string"){validate23.errors = [{instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema8.properties.description.type,parentSchema:schema8.properties.description,data:data1}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.configuration !== undefined){let data2 = data.configuration;const _errs5 = errors;if(errors === _errs5){if(data2 && typeof data2 == "object" && !Array.isArray(data2)){}else {validate23.errors = [{instancePath:instancePath+"/configuration",schemaPath:"#/properties/configuration/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema8.properties.configuration.type,parentSchema:schema8.properties.configuration,data:data2}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}else {validate23.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema8.type,parentSchema:schema8,data}];return false;}}validate23.errors = vErrors;return errors === 0;}exports.validateParticipant = validate24;const schema9 = {"title":"Participant","type":"object","properties":{"role":{"type":"string","description":"The name of the participant's role."},"serviceId":{"type":"string"},"config":{"type":"object","description":"Service configuration of the participant.\n\nThis configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration).\n","additionalProperties":true}},"x-standalone":true,"x-name":"Participant","x-location":"#/components/schemas/participant","x-schema-type":"all"};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){if(data.role !== undefined){let data0 = data.role;const _errs1 = errors;if(typeof data0 !== "string"){validate24.errors = [{instancePath:instancePath+"/role",schemaPath:"#/properties/role/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema9.properties.role.type,parentSchema:schema9.properties.role,data:data0}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.serviceId !== undefined){let data1 = data.serviceId;const _errs3 = errors;if(typeof data1 !== "string"){validate24.errors = [{instancePath:instancePath+"/serviceId",schemaPath:"#/properties/serviceId/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema9.properties.serviceId.type,parentSchema:schema9.properties.serviceId,data:data1}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.config !== undefined){let data2 = data.config;const _errs5 = errors;if(errors === _errs5){if(data2 && typeof data2 == "object" && !Array.isArray(data2)){}else {validate24.errors = [{instancePath:instancePath+"/config",schemaPath:"#/properties/config/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema9.properties.config.type,parentSchema:schema9.properties.config,data:data2}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}else {validate24.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema9.type,parentSchema:schema9,data}];return false;}}validate24.errors = vErrors;return errors === 0;}exports.validateServiceConfiguration = validate25;const schema10 = {"title":"Service Configuration","type":"object","properties":{"serviceType":{"type":"string","format":"uri","description":"Type of the service"},"configuration":{"type":"object","description":"Configuration of the service\n\nThis configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration).\n","additionalProperties":true},"participants":{"type":"array","description":"List of participants for the service","items":{"title":"Participant","type":"object","properties":{"role":{"type":"string","description":"The name of the participant's role."},"serviceId":{"type":"string"},"config":{"type":"object","description":"Service configuration of the participant.\n\nThis configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration).\n","additionalProperties":true}}}}},"x-standalone":true,"x-name":"ServiceConfiguration","x-location":"#/components/schemas/service_configuration","x-schema-type":"all"};function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){if(data.serviceType !== undefined){let data0 = data.serviceType;const _errs1 = errors;if(errors === _errs1){if(errors === _errs1){if(typeof data0 === "string"){if(!(formats0(data0))){validate25.errors = [{instancePath:instancePath+"/serviceType",schemaPath:"#/properties/serviceType/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\"",schema:"uri",parentSchema:schema10.properties.serviceType,data:data0}];return false;}}else {validate25.errors = [{instancePath:instancePath+"/serviceType",schemaPath:"#/properties/serviceType/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema10.properties.serviceType.type,parentSchema:schema10.properties.serviceType,data:data0}];return false;}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.configuration !== undefined){let data1 = data.configuration;const _errs3 = errors;if(errors === _errs3){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){}else {validate25.errors = [{instancePath:instancePath+"/configuration",schemaPath:"#/properties/configuration/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema10.properties.configuration.type,parentSchema:schema10.properties.configuration,data:data1}];return false;}}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.participants !== undefined){let data2 = data.participants;const _errs6 = errors;if(errors === _errs6){if(Array.isArray(data2)){var valid1 = true;const len0 = data2.length;for(let i0=0; i0 +export declare function validateExperimentStatus( + object: unknown +): ExperimentStatus + export declare function validateChangedURL( object: unknown ): ChangedURL @@ -242,6 +246,14 @@ export declare function validateTemplateUpdateResponse +export declare function validateExperimentStatusRequest( + object: unknown +): ExperimentStatusRequest + +export declare function validateExperimentStatusResponse( + object: unknown +): ExperimentStatusResponse + export declare function validateChangedURLRequest( object: unknown ): ChangedURLRequest diff --git a/services/lti/src/clients/experiment/client.ts b/services/lti/src/clients/experiment/client.ts index e97cb4b3..65e924ce 100644 --- a/services/lti/src/clients/experiment/client.ts +++ b/services/lti/src/clients/experiment/client.ts @@ -222,6 +222,8 @@ export class Client { /** * List experiments * + * @param options.experimentStatus + * Only retrieve experiments with this status. * @param options.url * Url of the to be used. * @@ -239,14 +241,22 @@ export class Client { */ public async listExperiments( options?: { - headers?: [string, string][],url?: string}): Promise { + headers?: [string, string][],experimentStatus?: string,url?: string}): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, "/experiments") + const parameters = { + experimentStatus: options?.experimentStatus, + } - if (!RequestValidation.validateListExperimentsInput()) + const query: [string,string][] = [] + + if (parameters["experimentStatus"]) + query.push(["experimentStatus", parameters["experimentStatus"].toString()]) + + if (!RequestValidation.validateListExperimentsInput(parameters)) throw new ValidationError( 'Request validation failed!', (RequestValidation.validateListExperimentsInput as Types.FunctionWithErrors).errors @@ -254,7 +264,7 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "GET", headers: [ ["Content-Type", "application/json"], diff --git a/services/lti/src/clients/experiment/requestValidation.ts b/services/lti/src/clients/experiment/requestValidation.ts index e2fc37af..77391b54 100644 --- a/services/lti/src/clients/experiment/requestValidation.ts +++ b/services/lti/src/clients/experiment/requestValidation.ts @@ -11,7 +11,21 @@ import * as BasicValidation from "./basicValidation.cjs" /** * This function validates the inputs to listExperiments() */ -export function validateListExperimentsInput() { +export function validateListExperimentsInput(parameters: Signatures.ListExperimentsParameters) { + if (parameters) { + if ( + !BasicValidation.validateExperimentStatusRequest(parameters["experimentStatus"]) + && parameters['experimentStatus'] !== undefined + ) { + (validateListExperimentsInput as FunctionWithErrors).errors = (BasicValidation.validateExperimentStatusRequest as FunctionWithErrors).errors + return false + } + } else { + if (parameters !== undefined) { + return false + } + } + return true } diff --git a/services/lti/src/clients/experiment/signatures.ts b/services/lti/src/clients/experiment/signatures.ts index 8abb4a02..4b4fbdd5 100644 --- a/services/lti/src/clients/experiment/signatures.ts +++ b/services/lti/src/clients/experiment/signatures.ts @@ -11,6 +11,14 @@ import * as Types from "./types.js" // @ts-ignore import { type Require } from "./types.js" +/** + * Typing for the parameters of the request made by listExperiments() + * @category listExperiments() + */ +export type ListExperimentsParameters = { + "experimentStatus"?: string, +} + /** * Typing for all possible responses to the request made by listExperiments() * @category listExperiments() From a1c0616c3be85f4be65555487148d5765c642198 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Mon, 8 Jul 2024 12:41:47 +0000 Subject: [PATCH 44/79] Send URL+ID in Callback --- services/booking/src/booking-backend/src/internal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 5b8108a3..54a829bc 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -203,7 +203,7 @@ export async function dispatchCallback(bookingID: bigint) { [rows, _] = await db.execute("SELECT `id`, `url` FROM bookingcallbacks WHERE booking=? FOR UPDATE", [bookingID]); for (let i = 0; i < rows.length; i++) { try { - let response = await fetch(rows[i].url, { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "Status": status }) }); + let response = await fetch(rows[i].url, { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "status": status, "url": config.OwnURL + "/booking/" + bookingID.toString(), "id": bookingID.toString() }) }); if (response.status == 404 || response.status == 410) { // Code depends on service // Callback no longer needed await db.execute("DELETE FROM bookingcallbacks WHERE id=?", [rows[i].id]); From 5f3af2ba1f4ef19834a503230c58cce41402074d Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Mon, 8 Jul 2024 13:11:05 +0000 Subject: [PATCH 45/79] Fixed line length of API strings --- services/booking/api/types.yml | 10 ++++++++-- services/booking/src/booking-backend/api/component.yml | 4 +++- .../booking/src/booking-frontend/api/component.yml | 4 +++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/services/booking/api/types.yml b/services/booking/api/types.yml index cf811aa8..1eb66373 100644 --- a/services/booking/api/types.yml +++ b/services/booking/api/types.yml @@ -37,7 +37,11 @@ components: enum: - normal Status: - description: Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + description: > + Current status of the booking. While the booking is pending, it can not be used. + Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, + 'cancelled' when the booking was deleted / cancelled after it was once active. + The 'active-*' will be used when a device was added after the booking was locked. type: string enum: - pending @@ -81,7 +85,9 @@ components: $ref: '#/components/schemas/Device' Description: type: string - description: User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + description: > + User provided description, for example might be a reason for the booking (e.g. maintenance) + or a link to the experiment. Might be empty or missing. Timeslot: title: Timeslot description: A time slot represents a slice of time used for bookings. diff --git a/services/booking/src/booking-backend/api/component.yml b/services/booking/src/booking-backend/api/component.yml index 0a2d925e..4e41ff70 100644 --- a/services/booking/src/booking-backend/api/component.yml +++ b/services/booking/src/booking-backend/api/component.yml @@ -15,7 +15,9 @@ tags: - booking-backend summary: >- - Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. + Locks the current booking so the devices can be used. + This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. + If called multiple times, the booking will be locked only once. responses: '200': description: All devices were booked by user. diff --git a/services/booking/src/booking-frontend/api/component.yml b/services/booking/src/booking-frontend/api/component.yml index becfe964..1eb6a7cb 100644 --- a/services/booking/src/booking-frontend/api/component.yml +++ b/services/booking/src/booking-frontend/api/component.yml @@ -75,7 +75,9 @@ description: ID of Booking tags: - booking-frontend - summary: Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. + summary: > + Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. + For adding devices, the scope 'booking:use' is required. requestBody: content: application/json: From 11b78df05f3c206909077e0cf4fdc5579c81620c Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Mon, 8 Jul 2024 14:25:26 +0000 Subject: [PATCH 46/79] Updated config files to get all vars from env --- .../booking/src/booking-backend/src/config.ts | 8 ++++++- .../src/booking-frontend/src/config.ts | 8 ++++++- .../src/device-reservation/src/config.ts | 14 +++++++++++ .../src/device-reservation/src/mainLoop.ts | 8 ++++--- .../device-reservation/src/mainLoop_test.ts | 23 ++++++++++--------- .../src/schedule-service/src/config.ts | 8 ++++++- 6 files changed, 52 insertions(+), 17 deletions(-) create mode 100644 services/booking/src/device-reservation/src/config.ts diff --git a/services/booking/src/booking-backend/src/config.ts b/services/booking/src/booking-backend/src/config.ts index 0d195d0c..136d62a7 100644 --- a/services/booking/src/booking-backend/src/config.ts +++ b/services/booking/src/booking-backend/src/config.ts @@ -1,6 +1,6 @@ import { baseConfig, die } from '@crosslab/booking-service-common'; -const PORT = parseInt(process.env.PORT ?? '3000'); +const PORT = parseInt(process.env.PORT ?? '3005'); const DEFAULT_BASE_URL = 'http://localhost:' + PORT; export const config = { @@ -16,4 +16,10 @@ export const config = { die('the environment variable SECURITY_AUDIENCE is not defined!'), API_TOKEN: process.env.API_TOKEN ?? die('the environment variable API_TOKEN is not defined!'), + BookingDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + ReservationDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + CallbackDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + OwnURL: process.env.BASE_URL ?? DEFAULT_BASE_URL, + InstitutePrefix:[process.env.BASE_URL ?? DEFAULT_BASE_URL], + AmqpUrl: process.env.AMQP_URL ?? baseConfig.AmqpUrl, }; diff --git a/services/booking/src/booking-frontend/src/config.ts b/services/booking/src/booking-frontend/src/config.ts index 5e319897..f6fb4dab 100644 --- a/services/booking/src/booking-frontend/src/config.ts +++ b/services/booking/src/booking-frontend/src/config.ts @@ -1,6 +1,6 @@ import { baseConfig, die } from '@crosslab/booking-service-common'; -const PORT = parseInt(process.env.PORT ?? '3000'); +const PORT = parseInt(process.env.PORT ?? '3004'); const DEFAULT_BASE_URL = 'http://localhost:' + PORT; export const config = { @@ -14,4 +14,10 @@ export const config = { SECURITY_AUDIENCE: process.env.SECURITY_AUDIENCE ?? die('the environment variable SECURITY_AUDIENCE is not defined!'), + BookingDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + ReservationDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + CallbackDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + OwnURL: process.env.BASE_URL ?? DEFAULT_BASE_URL, + InstitutePrefix:[process.env.BASE_URL ?? DEFAULT_BASE_URL], + AmqpUrl: process.env.AMQP_URL ?? baseConfig.AmqpUrl, }; diff --git a/services/booking/src/device-reservation/src/config.ts b/services/booking/src/device-reservation/src/config.ts new file mode 100644 index 00000000..e3962433 --- /dev/null +++ b/services/booking/src/device-reservation/src/config.ts @@ -0,0 +1,14 @@ +import { baseConfig, die } from '@crosslab/booking-service-common'; + +const PORT = parseInt(process.env.PORT ?? '3004'); +const DEFAULT_BASE_URL = 'http://localhost:' + PORT; + +export const config = { + ...baseConfig, + BookingDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + ReservationDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + CallbackDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + OwnURL: process.env.BASE_URL ?? DEFAULT_BASE_URL, + InstitutePrefix:[process.env.BASE_URL ?? DEFAULT_BASE_URL], + AmqpUrl: process.env.AMQP_URL ?? baseConfig.AmqpUrl, +}; diff --git a/services/booking/src/device-reservation/src/mainLoop.ts b/services/booking/src/device-reservation/src/mainLoop.ts index f62e4e5a..396d0a70 100644 --- a/services/booking/src/device-reservation/src/mainLoop.ts +++ b/services/booking/src/device-reservation/src/mainLoop.ts @@ -1,9 +1,11 @@ -import { BelongsToUs, baseConfig, sleep } from '@crosslab/booking-service-common'; +import { BelongsToUs, sleep } from '@crosslab/booking-service-common'; import * as amqplib from 'amqplib'; import { Mutex, withTimeout } from 'async-mutex'; import * as crypto from 'crypto'; import * as mysql from 'mysql2/promise'; +import { config } from './config'; + import { ErrorTimeoutText, ReservationAnswer, @@ -22,7 +24,7 @@ var mutex = withTimeout(new Mutex(), 5000, new Error(ErrorTimeoutText)); export async function mainLoop(): Promise { while (true) { try { - let connection = await amqplib.connect(baseConfig.AmqpUrl); + let connection = await amqplib.connect(config.AmqpUrl); let channel = await connection.createChannel(); await channel.assertQueue('device-reservation', { @@ -59,7 +61,7 @@ export async function mainLoop(): Promise { try { // Process message let answer: ReservationAnswer; - let db = await mysql.createConnection(baseConfig.ReservationDSN); + let db = await mysql.createConnection(config.ReservationDSN); await db.connect(); try { let rows: any, fields: any; diff --git a/services/booking/src/device-reservation/src/mainLoop_test.ts b/services/booking/src/device-reservation/src/mainLoop_test.ts index 9522b60a..28d94cb7 100644 --- a/services/booking/src/device-reservation/src/mainLoop_test.ts +++ b/services/booking/src/device-reservation/src/mainLoop_test.ts @@ -1,8 +1,9 @@ -import { baseConfig, sleep } from '@crosslab/booking-service-common'; +import { sleep } from '@crosslab/booking-service-common'; import * as amqplib from 'amqplib'; import dayjs from 'dayjs'; import * as mocha from 'mocha'; import * as mysql from 'mysql2/promise'; +import { config } from './config'; import { mainLoop } from './mainLoop'; import { @@ -22,17 +23,17 @@ mocha.describe('mainLoop.ts', function () { this.timeout(10000); mocha.before(function () { - // baseConfig - baseConfig.OwnURL = 'http://localhost:10801'; - baseConfig.InstitutePrefix = ['http://localhost:10801']; - baseConfig.ReservationDSN = + // config + config.OwnURL = 'http://localhost:10801'; + config.InstitutePrefix = ['http://localhost:10801']; + config.ReservationDSN = 'mysql://test:test@localhost/unittest?supportBigNumbers=true&bigNumberStrings=true'; }); mocha.beforeEach(async function () { // Setup database try { - let db = await mysql.createConnection(baseConfig.ReservationDSN); + let db = await mysql.createConnection(config.ReservationDSN); await db.connect(); await db.execute( 'CREATE TABLE reservation (`id` BIGINT UNSIGNED AUTO_INCREMENT, `device` TEXT NOT NULL, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `bookingreference` TEXT NOT NULL, PRIMARY KEY (`id`))', @@ -71,7 +72,7 @@ mocha.describe('mainLoop.ts', function () { } // Connect to amqp - connection = await amqplib.connect(baseConfig.AmqpUrl); + connection = await amqplib.connect(config.AmqpUrl); channel = await connection.createChannel(); await channel.assertQueue(receiveQueue, { @@ -83,16 +84,16 @@ mocha.describe('mainLoop.ts', function () { }); // Drain queues - while (await channel.get(receiveQueue, { noAck: true })) {} + while (await channel.get(receiveQueue, { noAck: true })) { } - while (await channel.get(sendQueue, { noAck: true })) {} + while (await channel.get(sendQueue, { noAck: true })) { } mainLoop(); await sleep(1000); }); mocha.afterEach(async function () { - let db = await mysql.createConnection(baseConfig.ReservationDSN); + let db = await mysql.createConnection(config.ReservationDSN); await db.connect(); await db.execute('DROP TABLE reservation'); db.end(); @@ -623,7 +624,7 @@ mocha.describe('mainLoop.ts', function () { if (data.Successful) { throw new Error("Reservation (2) was successful but shouldn't"); } - }) ; + }); mocha.it('mainLoop.ts delete missing values', async () => { let m = new ReservationMessage(ReservationRequest.Delete, receiveQueue); diff --git a/services/booking/src/schedule-service/src/config.ts b/services/booking/src/schedule-service/src/config.ts index 0d195d0c..b373106b 100644 --- a/services/booking/src/schedule-service/src/config.ts +++ b/services/booking/src/schedule-service/src/config.ts @@ -1,6 +1,6 @@ import { baseConfig, die } from '@crosslab/booking-service-common'; -const PORT = parseInt(process.env.PORT ?? '3000'); +const PORT = parseInt(process.env.PORT ?? '3006'); const DEFAULT_BASE_URL = 'http://localhost:' + PORT; export const config = { @@ -16,4 +16,10 @@ export const config = { die('the environment variable SECURITY_AUDIENCE is not defined!'), API_TOKEN: process.env.API_TOKEN ?? die('the environment variable API_TOKEN is not defined!'), + BookingDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + ReservationDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + CallbackDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, + OwnURL: process.env.BASE_URL ?? DEFAULT_BASE_URL, + InstitutePrefix:[process.env.BASE_URL ?? DEFAULT_BASE_URL], + AmqpUrl: process.env.AMQP_URL ?? baseConfig.AmqpUrl, }; From a35d3b7154874e153882dfd3e1d8b2187ee68c92 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Mon, 8 Jul 2024 15:27:39 +0000 Subject: [PATCH 47/79] Don't allow anonymous user to create bookings --- services/authorization/policy/crosslab.rego | 1 + 1 file changed, 1 insertion(+) diff --git a/services/authorization/policy/crosslab.rego b/services/authorization/policy/crosslab.rego index 4dad1d91..6862c113 100644 --- a/services/authorization/policy/crosslab.rego +++ b/services/authorization/policy/crosslab.rego @@ -99,6 +99,7 @@ rebac_allow if { rebac_allow if { object in ["booking:~~~TYPE~~~"] input.action in ["create"] + not subject in ["user:anonymous"] } # Allow everyone to create an experiment From 44c50e3560012ba6bdffa11d1793ef20e72635ed Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 9 Jul 2024 08:31:09 +0000 Subject: [PATCH 48/79] Fixed test with config change --- services/booking/src/device-reservation/src/index.ts | 1 + services/booking/src/device-reservation/src/mainLoop.ts | 1 + .../booking/src/test_common/src/devicereservationhelper.ts | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/services/booking/src/device-reservation/src/index.ts b/services/booking/src/device-reservation/src/index.ts index eb4db477..0be3ade1 100644 --- a/services/booking/src/device-reservation/src/index.ts +++ b/services/booking/src/device-reservation/src/index.ts @@ -2,6 +2,7 @@ import { mainLoop } from './mainLoop'; export * from './mainLoop'; export * from './messageDefinition'; +export * from './config'; console.log('Starting reservation service'); diff --git a/services/booking/src/device-reservation/src/mainLoop.ts b/services/booking/src/device-reservation/src/mainLoop.ts index 396d0a70..9b1969f6 100644 --- a/services/booking/src/device-reservation/src/mainLoop.ts +++ b/services/booking/src/device-reservation/src/mainLoop.ts @@ -307,6 +307,7 @@ export async function mainLoop(): Promise { break; } } catch (error) { + console.log("Can not process request: " + error); // Do not jump out here, always send an answer to caller answer = { Type: data.Type, diff --git a/services/booking/src/test_common/src/devicereservationhelper.ts b/services/booking/src/test_common/src/devicereservationhelper.ts index 50ba3c65..d4f002c0 100644 --- a/services/booking/src/test_common/src/devicereservationhelper.ts +++ b/services/booking/src/test_common/src/devicereservationhelper.ts @@ -3,12 +3,17 @@ import { ReservationMessage, ReservationRequest, mainLoop, + config, } from '@crosslab/service-device-reservation'; +import {getSQLDNS} from './setup'; import * as amqplib from 'amqplib'; var running: boolean = false; export async function startDeviceReservation() { + config.BookingDSN = getSQLDNS(); + config.ReservationDSN = getSQLDNS(); + config.CallbackDSN = getSQLDNS(); if (running) { throw Error('reservation already started'); } From f8c8f20190fd835d7d4eb5671d0d56a111b8ebf8 Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Thu, 11 Jul 2024 15:13:40 +0000 Subject: [PATCH 49/79] wip booking service integration --- .jobs.yml | 6 +- .../python/src/crosslab/api_client/client.py | 3 +- .../python/src/crosslab/api_client/schemas.py | 2 + .../electricalConnection/python/setup.cfg | 2 +- .../soa_services/parameter/python/setup.cfg | 2 +- common/node/tsconfig-app.json | 42 +- deployment/production/core/.env | 6 +- .../config/mariadb/00_init_dbs_and_users.sql | 12 +- deployment/production/core/docker-compose.yml | 62 +- .../templates/service-client/client.ts.njk | 3 +- helper/dummy-device/python/setup.cfg | 2 +- helper/python-test-helper/setup.cfg | 2 +- .../config/mariadb/00_init_dbs_and_users.sql | 32 + .../config/rabbitmq/definitions.json | 19 + .../config/rabbitmq/enabled_plugins | 1 + .../config/rabbitmq/rabbitmq.conf | 2 + integration-test/docker-compose.yaml | 210 +- integration-test/scripts/test.sh | 4 + services/authorization/policy/crosslab.rego | 2 +- services/booking/scripts/build-docker.sh | 20 + services/booking/scripts/test.sh | 11 +- .../booking/src/booking-backend/.env-cmdrc | 15 +- .../booking/src/booking-backend/Dockerfile | 17 + .../src/booking-backend/package-lock.json | 1511 +- .../booking/src/booking-backend/package.json | 17 +- .../booking-backend/scripts/add-shebang.sh | 1 + .../booking-backend/scripts/build-docker.sh | 1 + .../src/booking-backend/scripts/test.sh | 4 + .../src/booking-backend/src/amqpHandle.ts | 10 +- .../booking/src/booking-backend/src/config.ts | 12 +- .../booking/src/booking-backend/src/index.ts | 24 +- .../booking-backend/src/integration_test.ts | 702 +- .../src/integrationtest_helper_amqp.ts | 157 +- .../src/booking-backend/src/internal.ts | 1344 +- .../src/messageDefinition_test.ts | 2 +- .../booking-backend/src/operations/index.ts | 21 +- .../src/operations/index_test.ts | 374 +- .../booking/src/booking-backend/tsconfig.json | 26 +- .../booking/src/booking-frontend/.env-cmdrc | 13 +- .../booking/src/booking-frontend/Dockerfile | 17 + .../src/booking-frontend/api/component.yml | 1 + .../src/booking-frontend/package-lock.json | 1558 +- .../booking/src/booking-frontend/package.json | 16 +- .../booking-frontend/scripts/add-shebang.sh | 1 + .../booking-frontend/scripts/build-docker.sh | 1 + .../src/booking-frontend/scripts/test.sh | 4 + .../src/booking-frontend/src/config.ts | 12 +- .../booking/src/booking-frontend/src/index.ts | 13 +- .../booking-frontend/src/operations/index.ts | 821 +- .../src/operations/index_test.ts | 2153 +- .../indextest_helper_amqp_booking.ts | 164 +- .../operations/indextest_helper_amqp_free.ts | 152 +- .../src/booking-frontend/tsconfig.json | 22 +- services/booking/src/common/package-lock.json | 3329 +- services/booking/src/common/package.json | 62 +- services/booking/src/common/src/auth.ts | 2 +- .../booking-backend/basicValidation.cjs | 3937 + .../booking-backend/basicValidation.d.cts | 107 + .../src/clients/booking-backend/client.ts | 420 + .../booking-backend/requestValidation.ts | 208 + .../src/clients/booking-backend/signatures.ts | 329 + .../src/clients/booking-backend/types.ts | 410 + .../booking-frontend}/basicValidation.cjs | 10629 +- .../booking-frontend}/basicValidation.d.cts | 108 - .../src/clients/booking-frontend/client.ts | 587 + .../booking-frontend/requestValidation.ts | 377 + .../clients/booking-frontend}/signatures.ts | 478 - .../src/clients/booking-frontend/types.ts | 410 + .../src/clients/device/basicValidation.cjs | 163692 +++++++++++++++ .../src/clients/device/basicValidation.d.cts | 779 + .../src/common/src/clients/device/client.ts | 1444 + .../src/clients/device/requestValidation.ts | 1136 + .../common/src/clients/device/signatures.ts | 1764 + .../src/common/src/clients/device/types.ts | 3805 + .../booking/src/common/src/clients/index.ts | 72 + .../schedule-service/basicValidation.cjs | 6650 + .../schedule-service/basicValidation.d.cts | 119 + .../src/clients/schedule-service/client.ts | 305 + .../schedule-service/requestValidation.ts | 100 + .../clients/schedule-service/signatures.ts | 173 + .../src/clients/schedule-service/types.ts | 410 + services/booking/src/common/src/config.ts | 5 + services/booking/src/common/src/index.ts | 7 +- services/booking/src/common/tsconfig.json | 26 +- .../booking/src/device-reservation/Dockerfile | 15 + .../src/device-reservation/package-lock.json | 1425 +- .../src/device-reservation/package.json | 15 +- .../device-reservation/scripts/add-shebang.sh | 1 + .../scripts/build-docker.sh | 1 + .../src/device-reservation/scripts/test.sh | 4 + .../src/device-reservation/src/index.ts | 16 +- .../src/device-reservation/src/mainLoop.ts | 8 +- .../device-reservation/src/mainLoop_test.ts | 11 +- .../src/messageDefinition.ts | 2 +- .../src/messageDefinition_test.ts | 2 +- .../src/device-reservation/tsconfig.json | 25 +- .../booking/src/schedule-service/.env-cmdrc | 14 +- .../booking/src/schedule-service/Dockerfile | 17 + .../src/schedule-service/package-lock.json | 1253 +- .../booking/src/schedule-service/package.json | 16 +- .../schedule-service/scripts/add-shebang.sh | 1 + .../schedule-service/scripts/build-docker.sh | 1 + .../src/schedule-service/scripts/test.sh | 4 + .../src/schedule-service/src/config.ts | 12 +- .../booking/src/schedule-service/src/index.ts | 20 +- .../schedule-service/src/operations/index.ts | 66 +- .../src/operations/operations_test.ts | 498 +- .../src/schedule-service/src/timetable.ts | 4 +- .../schedule-service/src/timetable_test.ts | 4 +- .../src/schedule-service/tsconfig.json | 13 +- .../booking/src/test_common/package-lock.json | 100 +- services/booking/src/test_common/package.json | 14 +- .../src/devicereservationhelper.ts | 9 +- .../src/test_common/src/fakerequest.ts | 72 +- .../booking/src/test_common/src/fakeserver.ts | 41 +- services/booking/src/test_common/src/index.ts | 8 +- services/booking/src/test_common/src/setup.ts | 11 +- .../booking/src/test_common/tsconfig.json | 26 +- services/device/api/resources/device.yml | 1 + services/experiment/package.json | 6 +- .../booking-backend/basicValidation.cjs | 3937 + .../booking-backend/basicValidation.d.cts | 107 + .../src/clients/booking-backend/client.ts | 420 + .../booking-backend/requestValidation.ts | 211 + .../src/clients/booking-backend/signatures.ts | 329 + .../{booking => booking-backend}/types.ts | 6 + .../booking-frontend/basicValidation.cjs | 8434 + .../booking-frontend/basicValidation.d.cts | 191 + .../{booking => booking-frontend}/client.ts | 314 +- .../requestValidation.ts | 296 - .../clients/booking-frontend/signatures.ts | 629 + .../src/clients/booking-frontend/types.ts | 410 + services/experiment/src/clients/index.ts | 40 +- .../schedule-service/basicValidation.cjs | 6650 + .../schedule-service/basicValidation.d.cts | 119 + .../src/clients/schedule-service/client.ts | 303 + .../schedule-service/requestValidation.ts | 101 + .../clients/schedule-service/signatures.ts | 173 + .../src/clients/schedule-service/types.ts | 410 + services/experiment/src/config.ts | 3 + .../src/methods/experimentStatus/book.ts | 6 +- .../src/methods/experimentStatus/finish.ts | 27 +- .../src/methods/experimentStatus/run.ts | 2 +- .../experimentStatus/setup/bookingLocking.ts | 4 +- .../experimentStatus/setup/bookingUpdate.ts | 2 +- .../operations/callbacks/callbackHandler.ts | 2 +- services/gateway/conf/api_backends.conf | 12 + services/gateway/conf/api_gateway.conf | 1 + services/gateway/conf/booking_service.conf | 59 + 149 files changed, 225877 insertions(+), 12568 deletions(-) create mode 100755 integration-test/config/mariadb/00_init_dbs_and_users.sql create mode 100644 integration-test/config/rabbitmq/definitions.json create mode 100644 integration-test/config/rabbitmq/enabled_plugins create mode 100644 integration-test/config/rabbitmq/rabbitmq.conf create mode 100755 services/booking/scripts/build-docker.sh create mode 100644 services/booking/src/booking-backend/Dockerfile create mode 120000 services/booking/src/booking-backend/scripts/add-shebang.sh create mode 120000 services/booking/src/booking-backend/scripts/build-docker.sh create mode 100755 services/booking/src/booking-backend/scripts/test.sh create mode 100644 services/booking/src/booking-frontend/Dockerfile create mode 120000 services/booking/src/booking-frontend/scripts/add-shebang.sh create mode 120000 services/booking/src/booking-frontend/scripts/build-docker.sh create mode 100755 services/booking/src/booking-frontend/scripts/test.sh create mode 100644 services/booking/src/common/src/clients/booking-backend/basicValidation.cjs create mode 100644 services/booking/src/common/src/clients/booking-backend/basicValidation.d.cts create mode 100644 services/booking/src/common/src/clients/booking-backend/client.ts create mode 100644 services/booking/src/common/src/clients/booking-backend/requestValidation.ts create mode 100644 services/booking/src/common/src/clients/booking-backend/signatures.ts create mode 100644 services/booking/src/common/src/clients/booking-backend/types.ts rename services/{experiment/src/clients/booking => booking/src/common/src/clients/booking-frontend}/basicValidation.cjs (56%) rename services/{experiment/src/clients/booking => booking/src/common/src/clients/booking-frontend}/basicValidation.d.cts (62%) create mode 100644 services/booking/src/common/src/clients/booking-frontend/client.ts create mode 100644 services/booking/src/common/src/clients/booking-frontend/requestValidation.ts rename services/{experiment/src/clients/booking => booking/src/common/src/clients/booking-frontend}/signatures.ts (56%) create mode 100644 services/booking/src/common/src/clients/booking-frontend/types.ts create mode 100644 services/booking/src/common/src/clients/device/basicValidation.cjs create mode 100644 services/booking/src/common/src/clients/device/basicValidation.d.cts create mode 100644 services/booking/src/common/src/clients/device/client.ts create mode 100644 services/booking/src/common/src/clients/device/requestValidation.ts create mode 100644 services/booking/src/common/src/clients/device/signatures.ts create mode 100644 services/booking/src/common/src/clients/device/types.ts create mode 100644 services/booking/src/common/src/clients/index.ts create mode 100644 services/booking/src/common/src/clients/schedule-service/basicValidation.cjs create mode 100644 services/booking/src/common/src/clients/schedule-service/basicValidation.d.cts create mode 100644 services/booking/src/common/src/clients/schedule-service/client.ts create mode 100644 services/booking/src/common/src/clients/schedule-service/requestValidation.ts create mode 100644 services/booking/src/common/src/clients/schedule-service/signatures.ts create mode 100644 services/booking/src/common/src/clients/schedule-service/types.ts create mode 100644 services/booking/src/device-reservation/Dockerfile create mode 120000 services/booking/src/device-reservation/scripts/add-shebang.sh create mode 120000 services/booking/src/device-reservation/scripts/build-docker.sh create mode 100755 services/booking/src/device-reservation/scripts/test.sh create mode 100644 services/booking/src/schedule-service/Dockerfile create mode 120000 services/booking/src/schedule-service/scripts/add-shebang.sh create mode 120000 services/booking/src/schedule-service/scripts/build-docker.sh create mode 100755 services/booking/src/schedule-service/scripts/test.sh mode change 100644 => 120000 services/booking/src/schedule-service/tsconfig.json create mode 100644 services/experiment/src/clients/booking-backend/basicValidation.cjs create mode 100644 services/experiment/src/clients/booking-backend/basicValidation.d.cts create mode 100644 services/experiment/src/clients/booking-backend/client.ts create mode 100644 services/experiment/src/clients/booking-backend/requestValidation.ts create mode 100644 services/experiment/src/clients/booking-backend/signatures.ts rename services/experiment/src/clients/{booking => booking-backend}/types.ts (99%) create mode 100644 services/experiment/src/clients/booking-frontend/basicValidation.cjs create mode 100644 services/experiment/src/clients/booking-frontend/basicValidation.d.cts rename services/experiment/src/clients/{booking => booking-frontend}/client.ts (63%) rename services/experiment/src/clients/{booking => booking-frontend}/requestValidation.ts (56%) create mode 100644 services/experiment/src/clients/booking-frontend/signatures.ts create mode 100644 services/experiment/src/clients/booking-frontend/types.ts create mode 100644 services/experiment/src/clients/schedule-service/basicValidation.cjs create mode 100644 services/experiment/src/clients/schedule-service/basicValidation.d.cts create mode 100644 services/experiment/src/clients/schedule-service/client.ts create mode 100644 services/experiment/src/clients/schedule-service/requestValidation.ts create mode 100644 services/experiment/src/clients/schedule-service/signatures.ts create mode 100644 services/experiment/src/clients/schedule-service/types.ts create mode 100644 services/gateway/conf/booking_service.conf diff --git a/.jobs.yml b/.jobs.yml index e8e1b41b..f7e4e255 100644 --- a/.jobs.yml +++ b/.jobs.yml @@ -149,6 +149,9 @@ services/booking: - script: test dependencies: - services/booking:build + - script: build-docker + dependencies: + - services/booking:build tags: - test @@ -488,13 +491,14 @@ integration-test: - services/common:build - services/auth:build - services/authorization:build -# - services/booking:build + - services/booking:build - services/device:build - services/experiment:build - services/federation:build - services/gateway:build - services/auth:build-docker - services/authorization:build-docker + - services/booking:build-docker - services/device:build-docker - services/experiment:build-docker - services/federation:build-docker diff --git a/clients/api/python/src/crosslab/api_client/client.py b/clients/api/python/src/crosslab/api_client/client.py index aa03c721..88270b24 100644 --- a/clients/api/python/src/crosslab/api_client/client.py +++ b/clients/api/python/src/crosslab/api_client/client.py @@ -1233,6 +1233,7 @@ async def newBooking(self, url: str = "/booking", body: Optional[NewBookingReque async def updateBooking(self, url: str, body: UpdateBookingRequest) -> UpdateBookingResponse: # noqa: E501 """ Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. + """ # noqa: E501 if not self.BASE_URL: raise Exception("No base url set") @@ -1320,7 +1321,7 @@ async def destroyBooking(self, url: str) -> DestroyBookingResponse: # noqa: E50 async def lockBooking(self, url: str) -> LockBookingResponse: # noqa: E501 """ - Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. + Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. """ # noqa: E501 if not self.BASE_URL: raise Exception("No base url set") diff --git a/clients/api/python/src/crosslab/api_client/schemas.py b/clients/api/python/src/crosslab/api_client/schemas.py index 35465c97..c8c187dc 100644 --- a/clients/api/python/src/crosslab/api_client/schemas.py +++ b/clients/api/python/src/crosslab/api_client/schemas.py @@ -3642,6 +3642,7 @@ class ScheduleRequestExperiment(TypedDict): An experiment describes a set of devices and how they should be connected (potentially among other metadata).Properties: - Devices: List of devices used in experiment. - Description: User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + """ Devices: List[ScheduleRequestExperimentDevicesItems] Description: NotRequired[str] @@ -3832,6 +3833,7 @@ class GetBookingResponse200Booking(TypedDict): - Devices - Type: Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - Status: Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + - You: If true, this booking was done by you. - External: Shows whether the booking was done by an external institution. - Message: User readable notes about the status of the booking (e.g. if devices are unknown). diff --git a/clients/soa_services/electricalConnection/python/setup.cfg b/clients/soa_services/electricalConnection/python/setup.cfg index d63a0c34..e3081a90 100644 --- a/clients/soa_services/electricalConnection/python/setup.cfg +++ b/clients/soa_services/electricalConnection/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = crosslab_soa_service_electrical -version = +version = 0.2.7+dev.ce78fa35 author = Johannes Nau author_email = johannes.nau@tu-ilmenau.de description = The CrossLab SOA Electrical Service diff --git a/clients/soa_services/parameter/python/setup.cfg b/clients/soa_services/parameter/python/setup.cfg index 62264a09..cf098035 100644 --- a/clients/soa_services/parameter/python/setup.cfg +++ b/clients/soa_services/parameter/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = crosslab_soa_service_parameter -version = +version = 0.2.7+dev.ce78fa35 author = Johannes Nau author_email = johannes.nau@tu-ilmenau.de description = The CrossLab SOA parameter Service. diff --git a/common/node/tsconfig-app.json b/common/node/tsconfig-app.json index d634fbe1..d9d21f70 100644 --- a/common/node/tsconfig-app.json +++ b/common/node/tsconfig-app.json @@ -1,23 +1,23 @@ { - "compilerOptions": { - "module": "Node16", - "moduleResolution": "Node16", - "allowSyntheticDefaultImports": true, - "target": "ES2022", - "lib": ["ES2022"], - "esModuleInterop": true, - "outDir": "app", - "rootDir": "src", - "strict": true, - "noImplicitAny": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "sourceMap": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "skipLibCheck": true, - }, - "include": ["src"] + "compilerOptions": { + "module": "Node16", + "moduleResolution": "Node16", + "allowSyntheticDefaultImports": true, + "target": "ES2022", + "lib": ["ES2022"], + "esModuleInterop": true, + "outDir": "app", + "rootDir": "src", + "strict": true, + "noImplicitAny": true, + // "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "skipLibCheck": true + }, + "include": ["src"] } diff --git a/deployment/production/core/.env b/deployment/production/core/.env index f92dd9aa..0723bd27 100644 --- a/deployment/production/core/.env +++ b/deployment/production/core/.env @@ -29,4 +29,8 @@ COOKIE_SECRET= # The Logging level for the application # Options are: fatal, error, warn, info, debug, trace # Default is warn -# LOGGING_LEVEL=info \ No newline at end of file +# LOGGING_LEVEL=info + +# The default password for rabbitmq +# Choose a strong password. E.g. using `pwgen 64` +RABBITMQ_PASSWORD= \ No newline at end of file diff --git a/deployment/production/core/config/mariadb/00_init_dbs_and_users.sql b/deployment/production/core/config/mariadb/00_init_dbs_and_users.sql index 2fde4749..9793e62e 100755 --- a/deployment/production/core/config/mariadb/00_init_dbs_and_users.sql +++ b/deployment/production/core/config/mariadb/00_init_dbs_and_users.sql @@ -4,6 +4,7 @@ CREATE DATABASE IF NOT EXISTS device DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf CREATE DATABASE IF NOT EXISTS experiment DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; CREATE DATABASE IF NOT EXISTS federation DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; CREATE DATABASE IF NOT EXISTS lti DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; +CREATE DATABASE IF NOT EXISTS booking DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; CREATE USER IF NOT EXISTS authentication@'%'; CREATE USER IF NOT EXISTS authorization@'%'; @@ -11,6 +12,7 @@ CREATE USER IF NOT EXISTS device@'%'; CREATE USER IF NOT EXISTS experiment@'%'; CREATE USER IF NOT EXISTS federation@'%'; CREATE USER IF NOT EXISTS lti@'%'; +CREATE USER IF NOT EXISTS booking@'%'; GRANT ALL PRIVILEGES ON authentication.* to authentication@'%'; GRANT ALL PRIVILEGES ON authorization.* to authorization@'%'; @@ -18,5 +20,13 @@ GRANT ALL PRIVILEGES ON device.* to device@'%'; GRANT ALL PRIVILEGES ON experiment.* to experiment@'%'; GRANT ALL PRIVILEGES ON federation.* to federation@'%'; GRANT ALL PRIVILEGES ON lti.* to lti@'%'; +GRANT ALL PRIVILEGES ON booking.* to booking@'%'; -FLUSH PRIVILEGES; \ No newline at end of file +FLUSH PRIVILEGES; + +USE booking; +CREATE TABLE booking (`id` BIGINT UNSIGNED AUTO_INCREMENT, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `type` ENUM('normal'), `status` ENUM('pending', 'booked', 'rejected', 'cancelled', 'active', 'active-pending', 'active-rejected') NOT NULL, `user` TEXT NOT NULL, `message` LONGTEXT, PRIMARY KEY (`id`)); +CREATE TABLE bookeddevices (`id` BIGINT UNSIGNED AUTO_INCREMENT, `booking` BIGINT UNSIGNED NOT NULL, `originaldevice` TEXT NOT NULL, `originalposition` INT NOT NULL, `bookeddevice` TEXT, `remotereference` TEXT, `local` BOOLEAN, PRIMARY KEY (`id`), `reservation` BIGINT UNSIGNED, FOREIGN KEY(`booking`) REFERENCES booking (`id`) ON DELETE CASCADE ON UPDATE RESTRICT); +CREATE TABLE bookingcallbacks (`id` BIGINT UNSIGNED AUTO_INCREMENT, `booking` BIGINT UNSIGNED NOT NULL, `url` TEXT NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY(`booking`) REFERENCES booking (`id`) ON DELETE CASCADE ON UPDATE RESTRICT); +CREATE TABLE callback (`id` VARCHAR(600), `type` INTEGER, `targetbooking` BIGINT UNSIGNED NOT NULL, `parameters` JSON NOT NULL DEFAULT "{}", PRIMARY KEY(`id`)); +CREATE TABLE reservation (`id` BIGINT UNSIGNED AUTO_INCREMENT, `device` TEXT NOT NULL, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `bookingreference` TEXT NOT NULL, PRIMARY KEY (`id`)); \ No newline at end of file diff --git a/deployment/production/core/docker-compose.yml b/deployment/production/core/docker-compose.yml index 6b1f1b3b..0343ba48 100644 --- a/deployment/production/core/docker-compose.yml +++ b/deployment/production/core/docker-compose.yml @@ -23,7 +23,7 @@ x-config: &common-config AUTHORIZATION_SERVER: "http://authorization:3010" AUTHORIZATION_PSK: "${AUTHORIZATION_PSK:?}" LOGGING: "${LOGGING_LEVEL:-warn}" - BASE_URL: https://${API_BASE_URL} + BASE_URL: ${API_BASE_URL} DB_TYPE: mariadb DB_HOST: db DB_PORT: 3306 @@ -31,10 +31,16 @@ x-config: &common-config DEVICE_SERVICE_URL: "http://device:3001" EXPERIMENT_SERVICE_URL: "http://experiment:3002" FEDERATION_SERVICE_URL: "http://federation:3003" + BOOKING_FRONTEND_URL: "http://booking-frontend:3004" + BOOKING_BACKEND_URL: "http://booking-backend:3005" + SCHEDULE_SERVICE_URL: "http://schedule-service:3006" AUTH_SERVICE_DOMAIN: "authentication:3000" DEVICE_SERVICE_DOMAIN: "device:3001" EXPERIMENT_SERVICE_DOMAIN: "experiment:3002" FEDERATION_SERVICE_DOMAIN: "federation:3003" + BOOKING_FRONTEND_DOMAIN: "booking-frontend:3004" + BOOKING_BACKEND_DOMAIN: "booking-backend:3005" + SCHEDULE_SERVICE_DOMAIN: "schedule-service:3006" AUTHORIZATION_SERVICE_DOMAIN: "authorization:3010" services: @@ -49,8 +55,25 @@ services: environment: MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:?} healthcheck: - test: ["CMD", "healthcheck.sh", "--su=mysql", "--connect", "--innodb_initialized"] + test: + [ + "CMD", + "healthcheck.sh", + "--su=mysql", + "--connect", + "--innodb_initialized", + ] restart: on-failure + rabbitmq: + image: rabbitmq:3.13.4 + environment: + RABBITMQ_DEFAULT_USER: rabbitmq + RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD:?} + volumes: + - ~/.docker-conf/rabbitmq/data:/var/lib/rabbitmq + - ~/.docker-conf/rabbitmq/log:/var/log/rabbitmq + networks: + backend: gateway: image: crosslab/gateway-service:latest ports: @@ -84,6 +107,41 @@ services: networks: backend: restart: on-failure + booking-frontend: + image: crosslab/booking-frontend:latest + environment: + <<: *common-config + BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true + AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@rabbitmq:5672 + networks: + backend: + restart: on-failure + booking-backend: + image: crosslab/booking-backend:latest + environment: + <<: *common-config + BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true + AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@rabbitmq:5672 + networks: + backend: + restart: on-failure + schedule: + image: crosslab/schedule-service:latest + environment: + <<: *common-config + BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true + networks: + backend: + restart: on-failure + device-reservation: + image: crosslab/device-reservation:latest + environment: + <<: *common-config + BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true + AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@rabbitmq:5672 + networks: + backend: + restart: on-failure device: image: crosslab/device-service:latest environment: diff --git a/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk b/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk index 07b723c4..6d1c490b 100644 --- a/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk +++ b/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk @@ -349,7 +349,8 @@ export class Client { {#- Add declaration of request body if defined #} {%- if operation.requestBody -%} {{- bodyName + ": " -}} - {{- operation.requestBody.schema | typeDeclaration(schemas, { "prefixDirectlyResolved": "Types.", "schemaType": "request" }) if operation.requestBody.schema else "Signatures." + cap_name + "Body" -}}, + {{- operation.requestBody.schema | typeDeclaration(schemas, { "prefixDirectlyResolved": "Types.", "schemaType": "request" }) if operation.requestBody.schema else "Signatures." + cap_name + "Body" -}} + {{- " | undefined" if not operation.requestBody.required -}}, {%- endif -%} {#- Add declaration of required parameters #} diff --git a/helper/dummy-device/python/setup.cfg b/helper/dummy-device/python/setup.cfg index 6aab4baf..e0039c05 100644 --- a/helper/dummy-device/python/setup.cfg +++ b/helper/dummy-device/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = dummy_device -version = +version = 0.2.7+dev.ce78fa35 author = Johannes Nau author_email = johannes.nau@tu-ilmenau.de description = The Crosslab Dummy Device diff --git a/helper/python-test-helper/setup.cfg b/helper/python-test-helper/setup.cfg index ce5c58ce..e03b324b 100644 --- a/helper/python-test-helper/setup.cfg +++ b/helper/python-test-helper/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = test_helper -version = +version = 0.0.0+dev.ce78fa35 author = Johannes Nau author_email = johannes.nau@tu-ilmenau.de description = Helper Project used in python tests diff --git a/integration-test/config/mariadb/00_init_dbs_and_users.sql b/integration-test/config/mariadb/00_init_dbs_and_users.sql new file mode 100755 index 00000000..9793e62e --- /dev/null +++ b/integration-test/config/mariadb/00_init_dbs_and_users.sql @@ -0,0 +1,32 @@ +CREATE DATABASE IF NOT EXISTS authentication DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; +CREATE DATABASE IF NOT EXISTS authorization DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; +CREATE DATABASE IF NOT EXISTS device DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; +CREATE DATABASE IF NOT EXISTS experiment DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; +CREATE DATABASE IF NOT EXISTS federation DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; +CREATE DATABASE IF NOT EXISTS lti DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; +CREATE DATABASE IF NOT EXISTS booking DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; + +CREATE USER IF NOT EXISTS authentication@'%'; +CREATE USER IF NOT EXISTS authorization@'%'; +CREATE USER IF NOT EXISTS device@'%'; +CREATE USER IF NOT EXISTS experiment@'%'; +CREATE USER IF NOT EXISTS federation@'%'; +CREATE USER IF NOT EXISTS lti@'%'; +CREATE USER IF NOT EXISTS booking@'%'; + +GRANT ALL PRIVILEGES ON authentication.* to authentication@'%'; +GRANT ALL PRIVILEGES ON authorization.* to authorization@'%'; +GRANT ALL PRIVILEGES ON device.* to device@'%'; +GRANT ALL PRIVILEGES ON experiment.* to experiment@'%'; +GRANT ALL PRIVILEGES ON federation.* to federation@'%'; +GRANT ALL PRIVILEGES ON lti.* to lti@'%'; +GRANT ALL PRIVILEGES ON booking.* to booking@'%'; + +FLUSH PRIVILEGES; + +USE booking; +CREATE TABLE booking (`id` BIGINT UNSIGNED AUTO_INCREMENT, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `type` ENUM('normal'), `status` ENUM('pending', 'booked', 'rejected', 'cancelled', 'active', 'active-pending', 'active-rejected') NOT NULL, `user` TEXT NOT NULL, `message` LONGTEXT, PRIMARY KEY (`id`)); +CREATE TABLE bookeddevices (`id` BIGINT UNSIGNED AUTO_INCREMENT, `booking` BIGINT UNSIGNED NOT NULL, `originaldevice` TEXT NOT NULL, `originalposition` INT NOT NULL, `bookeddevice` TEXT, `remotereference` TEXT, `local` BOOLEAN, PRIMARY KEY (`id`), `reservation` BIGINT UNSIGNED, FOREIGN KEY(`booking`) REFERENCES booking (`id`) ON DELETE CASCADE ON UPDATE RESTRICT); +CREATE TABLE bookingcallbacks (`id` BIGINT UNSIGNED AUTO_INCREMENT, `booking` BIGINT UNSIGNED NOT NULL, `url` TEXT NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY(`booking`) REFERENCES booking (`id`) ON DELETE CASCADE ON UPDATE RESTRICT); +CREATE TABLE callback (`id` VARCHAR(600), `type` INTEGER, `targetbooking` BIGINT UNSIGNED NOT NULL, `parameters` JSON NOT NULL DEFAULT "{}", PRIMARY KEY(`id`)); +CREATE TABLE reservation (`id` BIGINT UNSIGNED AUTO_INCREMENT, `device` TEXT NOT NULL, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `bookingreference` TEXT NOT NULL, PRIMARY KEY (`id`)); \ No newline at end of file diff --git a/integration-test/config/rabbitmq/definitions.json b/integration-test/config/rabbitmq/definitions.json new file mode 100644 index 00000000..82684754 --- /dev/null +++ b/integration-test/config/rabbitmq/definitions.json @@ -0,0 +1,19 @@ +{ + "vhosts": [{ "name": "/" }], + "users": [ + { + "name": "rabbitmq", + "password_hash": "MrBZnOlA6iRKCx8KO2zJXGBv5wJjlNy1lsdX0MWuffvInj5I", + "tags": ["administrator"] + } + ], + "permissions": [ + { + "user": "rabbitmq", + "vhost": "/", + "configure": ".*", + "read": ".*", + "write": ".*" + } + ] +} diff --git a/integration-test/config/rabbitmq/enabled_plugins b/integration-test/config/rabbitmq/enabled_plugins new file mode 100644 index 00000000..90fdaa37 --- /dev/null +++ b/integration-test/config/rabbitmq/enabled_plugins @@ -0,0 +1 @@ +[rabbitmq_management]. \ No newline at end of file diff --git a/integration-test/config/rabbitmq/rabbitmq.conf b/integration-test/config/rabbitmq/rabbitmq.conf new file mode 100644 index 00000000..8836d53b --- /dev/null +++ b/integration-test/config/rabbitmq/rabbitmq.conf @@ -0,0 +1,2 @@ +load_definitions = /etc/rabbitmq/definitions.json +password_hashing_module = rabbit_password_hashing_sha256 \ No newline at end of file diff --git a/integration-test/docker-compose.yaml b/integration-test/docker-compose.yaml index cb78395a..49e5bb25 100644 --- a/integration-test/docker-compose.yaml +++ b/integration-test/docker-compose.yaml @@ -1,51 +1,193 @@ +# This docker compose file is used to deploy the "core"-services of a Crosslab instance. +# This includes all services to provide the crosslab API. Any additional software like frontend, +# virtual laboratory devices etc. must be deployed on top of this. +# +# All necessary confifguration Options are set via environment variables in the accompanying .env file. +# version: '3' +networks: + backend: + frontend: + +volumes: + db: + x-config: &common-config - AUTHORIZATION_SERVER: 'http://127.0.0.1:3010' - AUTHORIZATION_PSK: '${AUTHORIZATION_PSK:-TestPSK}' - LOGGING: '${LOGGING:-info}' - AUTH_SERVICE_URL: 'http://127.0.0.1:3000' - DEVICE_SERVICE_URL: 'http://127.0.0.1:3001' - EXPERIMENT_SERVICE_URL: 'http://127.0.0.1:3002' - FEDERATION_SERVICE_URL: 'http://127.0.0.1:3003' - BASE_URL: 'http://localhost' + AUTHORIZATION_SERVER: 'http://authorization:3010' + AUTHORIZATION_PSK: '${AUTHORIZATION_PSK:?}' + LOGGING: '${LOGGING_LEVEL:-warn}' + BASE_URL: ${API_BASE_URL} + DB_TYPE: mariadb + DB_HOST: db + DB_PORT: 3306 + AUTH_SERVICE_URL: 'http://authentication:3000' + DEVICE_SERVICE_URL: 'http://device:3001' + EXPERIMENT_SERVICE_URL: 'http://experiment:3002' + FEDERATION_SERVICE_URL: 'http://federation:3003' + BOOKING_FRONTEND_URL: 'http://booking-frontend:3004' + BOOKING_BACKEND_URL: 'http://booking-backend:3005' + SCHEDULE_SERVICE_URL: 'http://schedule-service:3006' + AUTH_SERVICE_DOMAIN: 'authentication:3000' + DEVICE_SERVICE_DOMAIN: 'device:3001' + EXPERIMENT_SERVICE_DOMAIN: 'experiment:3002' + FEDERATION_SERVICE_DOMAIN: 'federation:3003' + BOOKING_FRONTEND_DOMAIN: 'booking-frontend:3004' + BOOKING_BACKEND_DOMAIN: 'booking-backend:3005' + SCHEDULE_SERVICE_DOMAIN: 'schedule-service:3006' + AUTHORIZATION_SERVICE_DOMAIN: 'authorization:3010' services: - # Services + # Database + db: + image: mariadb:11.2.3 + networks: + backend: + volumes: + - './config/mariadb:/docker-entrypoint-initdb.d:ro' + environment: + MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:?} + healthcheck: + test: ['CMD', 'healthcheck.sh', '--su=mysql', '--connect', '--innodb_initialized'] + restart: on-failure + rabbitmq: + image: rabbitmq:3.13.4 + volumes: + - ./config/rabbitmq/definitions.json:/etc/rabbitmq/definitions.json:ro + - ./config/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro + - ./config/rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins:ro + healthcheck: + test: ['CMD', 'rabbitmqctl', 'status'] + networks: + backend: gateway: - image: '${GATEWAY_IMAGE}' + image: ${GATEWAY_IMAGE:?} + ports: + - '${API_PORT}:80' environment: <<: *common-config - SERVER_NAME: 'localhost' - AUTH_SERVICE_DOMAIN: '127.0.0.1:3000' - DEVICE_SERVICE_DOMAIN: '127.0.0.1:3001' - EXPERIMENT_SERVICE_DOMAIN: '127.0.0.1:3002' - FEDERATION_SERVICE_DOMAIN: '127.0.0.1:3003' - AUTHORIZATION_SERVICE_DOMAIN: '127.0.0.1:3010' - network_mode: 'host' + networks: + frontend: + backend: + depends_on: + db: + condition: service_healthy + restart: on-failure + # Services authentication: - image: '${AUTHENTICATION_IMAGE}' + image: ${AUTHENTICATION_IMAGE:?} environment: <<: *common-config - ADMIN_USERNAME: 'admin' - ADMIN_PASSWORD: 'admin' - JWT_SECRET: 'secret' - network_mode: 'host' + DB_USERNAME: authentication + DB_DATABASE: authentication + ADMIN_USERNAME: admin + ADMIN_PASSWORD: ${ADMIN_PASSWORD:?} + JWT_SECRET: ${JWT_SECRET:?} + networks: + backend: + depends_on: + db: + condition: service_healthy + restart: on-failure authorization: - image: '${AUTHORIZATION_IMAGE}' + image: ${AUTHORIZATION_IMAGE:?} environment: <<: *common-config - JWT_SECRET: 'secret' - network_mode: 'host' + DB_USERNAME: authorization + DB_DATABASE: authorization + JWT_SECRET: ${JWT_SECRET:?} + networks: + backend: + depends_on: + db: + condition: service_healthy + restart: on-failure + booking-frontend: + image: ${BOOKING_FRONTEND_IMAGE:?} + environment: + <<: *common-config + BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true + AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@rabbitmq:5672 + networks: + backend: + depends_on: + db: + condition: service_healthy + rabbitmq: + condition: service_healthy + restart: on-failure + booking-backend: + image: ${BOOKING_BACKEND_IMAGE:?} + environment: + <<: *common-config + BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true + AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@rabbitmq:5672 + networks: + backend: + depends_on: + db: + condition: service_healthy + rabbitmq: + condition: service_healthy + restart: on-failure + schedule-service: + image: ${SCHEDULE_SERVICE_IMAGE:?} + environment: + <<: *common-config + BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true + networks: + backend: + depends_on: + db: + condition: service_healthy + restart: on-failure + device-reservation: + image: ${DEVICE_RESERVATION_IMAGE:?} + environment: + <<: *common-config + BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true + AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@rabbitmq:5672 + networks: + backend: + depends_on: + db: + condition: service_healthy + rabbitmq: + condition: service_healthy + restart: on-failure device: - image: '${DEVICE_IMAGE}' - environment: *common-config - network_mode: 'host' + image: ${DEVICE_IMAGE:?} + environment: + <<: *common-config + DB_USERNAME: device + DB_DATABASE: device + networks: + backend: + depends_on: + db: + condition: service_healthy + restart: on-failure experiment: - image: '${EXPERIMENT_IMAGE}' - environment: *common-config - network_mode: 'host' + image: ${EXPERIMENT_IMAGE:?} + environment: + <<: *common-config + DB_USERNAME: experiment + DB_DATABASE: experiment + networks: + backend: + depends_on: + db: + condition: service_healthy + restart: on-failure federation: - image: '${FEDERATION_IMAGE}' - environment: *common-config - network_mode: 'host' + image: ${FEDERATION_IMAGE:?} + environment: + <<: *common-config + DB_USERNAME: federation + DB_DATABASE: federation + networks: + backend: + depends_on: + db: + condition: service_healthy + restart: on-failure diff --git a/integration-test/scripts/test.sh b/integration-test/scripts/test.sh index 34c5886a..da87ad7c 100755 --- a/integration-test/scripts/test.sh +++ b/integration-test/scripts/test.sh @@ -9,6 +9,10 @@ export AUTHORIZATION_IMAGE=$(docker load -i ../services/authorization/dist/docke export DEVICE_IMAGE=$(docker load -i ../services/device/dist/docker-image.tar | tail -1 | grep -Eo "[^ ]+$") export EXPERIMENT_IMAGE=$(docker load -i ../services/experiment/dist/docker-image.tar | tail -1 | grep -Eo "[^ ]+$") export FEDERATION_IMAGE=$(docker load -i ../services/federation/dist/docker-image.tar | tail -1 | grep -Eo "[^ ]+$") +export BOOKING_FRONTEND_IMAGE=$(docker load -i ../services/booking/src/booking-frontend/dist/docker-image.tar | tail -1 | grep -Eo "[^ ]+$") +export BOOKING_BACKEND_IMAGE=$(docker load -i ../services/booking/src/booking-backend/dist/docker-image.tar | tail -1 | grep -Eo "[^ ]+$") +export SCHEDULE_SERVICE_IMAGE=$(docker load -i ../services/booking/src/schedule-service/dist/docker-image.tar | tail -1 | grep -Eo "[^ ]+$") +export DEVICE_RESERVATION_IMAGE=$(docker load -i ../services/booking/src/device-reservation/dist/docker-image.tar | tail -1 | grep -Eo "[^ ]+$") COMPOSE_HTTP_TIMEOUT=600 docker-compose up --no-color > dist/server.log 2>&1 & end_time=$(($(date +%s) + 600)) # Set end time to 10 minutes from now diff --git a/services/authorization/policy/crosslab.rego b/services/authorization/policy/crosslab.rego index 6862c113..c8a7f4fc 100644 --- a/services/authorization/policy/crosslab.rego +++ b/services/authorization/policy/crosslab.rego @@ -37,7 +37,7 @@ enc := openfga.encode_object(subject) # override authorization for root allow if { - subject in ["user:root", "user:experiment-service", "user:device-service"] + subject in ["user:root", "user:experiment-service", "user:device-service", "user:booking-service"] } # Check Scopes diff --git a/services/booking/scripts/build-docker.sh b/services/booking/scripts/build-docker.sh new file mode 100755 index 00000000..ec0a1780 --- /dev/null +++ b/services/booking/scripts/build-docker.sh @@ -0,0 +1,20 @@ +#!/usr/bin/bash + +current=$(pwd) +result=0 + +cd "$current/src/device-reservation" +bash ./scripts/build-docker.sh +result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) +cd "$current/src/schedule-service" +bash ./scripts/build-docker.sh +result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) +cd "$current/src/booking-backend" +bash ./scripts/build-docker.sh +result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) +cd "$current/src/booking-frontend" +bash ./scripts/build-docker.sh +result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) + +cd $current +exit $result \ No newline at end of file diff --git a/services/booking/scripts/test.sh b/services/booking/scripts/test.sh index 30d3a2a7..0e906b27 100755 --- a/services/booking/scripts/test.sh +++ b/services/booking/scripts/test.sh @@ -9,25 +9,22 @@ sudo mysql -e "CREATE USER 'test'@localhost IDENTIFIED BY 'test';" sudo mysql -e "GRANT ALL PRIVILEGES ON unittest.* to 'test'@localhost;" sudo mysql -e "FLUSH PRIVILEGES;" -rm -rf venv -rm -rf db - npm ci current=$(pwd) result=0 cd "$current/src/schedule-service" -npm test +bash ./scripts/test.sh result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) cd "$current/src/booking-backend" -npm test +bash ./scripts/test.sh result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) cd "$current/src/booking-frontend" -npm test +bash ./scripts/test.sh result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) cd "$current/src/device-reservation" -npm test +bash ./scripts/test.sh result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) cd $current diff --git a/services/booking/src/booking-backend/.env-cmdrc b/services/booking/src/booking-backend/.env-cmdrc index 88810370..8cbe4ab6 100644 --- a/services/booking/src/booking-backend/.env-cmdrc +++ b/services/booking/src/booking-backend/.env-cmdrc @@ -1,9 +1,8 @@ { - "development": { - "SECURITY_ISSUER": "http://localhost", - "SECURITY_AUDIENCE": "http://localhost", - "BASE_URL": "http://localhost", - "PORT": "3000", - "API_TOKEN": "booking-service-dev-token" - } -} \ No newline at end of file + "development": { + "BASE_URL": "http://localhost:10801", + "DEVICE_SERVICE_URL": "http://localhost:10801", + "SCHEDULE_SERVICE_URL": "http://localhost:10801", + "PORT": "10801" + } +} diff --git a/services/booking/src/booking-backend/Dockerfile b/services/booking/src/booking-backend/Dockerfile new file mode 100644 index 00000000..e0b3bd46 --- /dev/null +++ b/services/booking/src/booking-backend/Dockerfile @@ -0,0 +1,17 @@ +# Build Image +FROM node:lts-alpine AS build +WORKDIR /tmp +COPY .packages /tmp/packages +RUN npm install --global /tmp/packages/* +RUN rm -rf /tmp/packages + +RUN apk add dumb-init +WORKDIR /app +RUN mkdir db +RUN chown node:node /app/* +USER node + +ENV NODE_ENV production +ENV PORT 3005 +EXPOSE 3005/tcp +CMD ["dumb-init", "crosslab-booking-backend"] \ No newline at end of file diff --git a/services/booking/src/booking-backend/package-lock.json b/services/booking/src/booking-backend/package-lock.json index b3151543..ca18a71a 100644 --- a/services/booking/src/booking-backend/package-lock.json +++ b/services/booking/src/booking-backend/package-lock.json @@ -12,9 +12,9 @@ "@cross-lab-project/api-client": "file:../../../../clients/api/js", "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", - "@cross-lab-project/service-common": "file:../../../common", "@crosslab/booking-service-common": "file:../common", "@crosslab/booking-service-test-common": "file:../test_common", + "@crosslab/service-common": "file:../../../common", "@crosslab/service-device-reservation": "file:../device-reservation", "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", @@ -28,11 +28,16 @@ "mysql2": "^3.6.0", "typescript": "^5.2.2" }, + "bin": { + "crosslab-booking-backend": "app/index.js" + }, "devDependencies": { + "@types/express": "^4.17.13", "@types/mocha": "^10.0.0", "c8": "^10.1.2", "env-cmd": "^10.1.0", "mocha": "^10.0.0", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3", "why-is-node-running": "^2.2.2" } @@ -154,10 +159,19 @@ "version": "0.0.1", "license": "Apache-2.0", "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0" + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/express": "^4.17.13", + "ajv-formats": "^3.0.1", + "express": "^4.18.1", + "node-fetch": "^3.3.2" }, "devDependencies": { + "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", + "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", + "@types/express": "^4.17.13", "@types/node": "^20.5.9", + "@types/node-fetch": "^2.6.4", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3", "typescript": "^5.2.2" } @@ -176,11 +190,15 @@ "mysql2": "^3.6.0", "typescript": "^5.2.2" }, + "bin": { + "crosslab-device-reservation": "app/index.js" + }, "devDependencies": { "@types/mocha": "^10.0.0", "c8": "^10.1.0", "mocha": "^10.0.0", "mocha-suppress-logs": "^0.5.1", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3" } }, @@ -191,9 +209,6 @@ "dependencies": { "@crosslab/booking-service-common": "file:../common", "@crosslab/service-device-reservation": "file:../device-reservation", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "@types/express": "^4.17.13", "amqplib": "^0.10.3", "dayjs": "^1.11.5", "express": "^4.18.1", @@ -201,6 +216,9 @@ "typescript": "^5.2.2" }, "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "@types/express": "^4.17.13", "node-mocks-http": "^1.14.1", "prettier": "^3.0.3" } @@ -484,10 +502,6 @@ "resolved": "../../../../helper/openapi-codegeneration", "link": true }, - "node_modules/@cross-lab-project/service-common": { - "resolved": "../../../common", - "link": true - }, "node_modules/@crosslab/booking-service-common": { "resolved": "../common", "link": true @@ -496,6 +510,10 @@ "resolved": "../test_common", "link": true }, + "node_modules/@crosslab/service-common": { + "resolved": "../../../common", + "link": true + }, "node_modules/@crosslab/service-device-reservation": { "resolved": "../device-reservation", "link": true @@ -635,9 +653,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -692,6 +710,7 @@ "version": "1.19.5", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dev": true, "dependencies": { "@types/connect": "*", "@types/node": "*" @@ -701,6 +720,7 @@ "version": "3.4.38", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, "dependencies": { "@types/node": "*" } @@ -709,6 +729,7 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dev": true, "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -717,9 +738,10 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.19.3", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz", - "integrity": "sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg==", + "version": "4.19.5", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz", + "integrity": "sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==", + "dev": true, "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -730,7 +752,8 @@ "node_modules/@types/http-errors": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", - "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", @@ -739,25 +762,26 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==" + "version": "4.17.6", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.6.tgz", + "integrity": "sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA==" }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", - "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", - "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", + "version": "10.0.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.7.tgz", + "integrity": "sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==", "dev": true }, "node_modules/@types/node": { - "version": "20.14.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", - "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "version": "20.14.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", + "integrity": "sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==", "dependencies": { "undici-types": "~5.26.4" } @@ -765,17 +789,20 @@ "node_modules/@types/qs": { "version": "6.9.15", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", - "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", + "dev": true }, "node_modules/@types/range-parser": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", - "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dev": true, "dependencies": { "@types/mime": "^1", "@types/node": "*" @@ -785,6 +812,7 @@ "version": "1.15.7", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dev": true, "dependencies": { "@types/http-errors": "*", "@types/node": "*", @@ -849,9 +877,9 @@ } }, "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "engines": { "node": ">=6" @@ -896,11 +924,64 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1072,16 +1153,10 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -1094,6 +1169,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -1134,6 +1212,12 @@ "node": ">= 6" } }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1210,6 +1294,57 @@ "node": ">= 8" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/dayjs": { "version": "1.11.11", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", @@ -1259,6 +1394,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/denque": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", @@ -1285,9 +1437,9 @@ } }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" @@ -1334,6 +1486,75 @@ "node": ">=8.0.0" } }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -1353,6 +1574,49 @@ "node": ">= 0.4" } }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -1528,10 +1792,19 @@ "flat": "cli.js" } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/foreground-child": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz", - "integrity": "sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", @@ -1588,6 +1861,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/generate-function": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", @@ -1623,6 +1923,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -1663,6 +1980,22 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -1674,6 +2007,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -1715,6 +2063,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -1735,6 +2098,12 @@ "he": "bin/he" } }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -1783,6 +2152,20 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -1791,16 +2174,123 @@ "node": ">= 0.10" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "dependencies": { - "binary-extensions": "^2.0.0" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-extglob": { @@ -1833,6 +2323,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -1842,6 +2344,21 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -1856,6 +2373,82 @@ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -1868,6 +2461,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -1937,16 +2542,13 @@ } }, "node_modules/jackspeak": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", - "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -1987,11 +2589,32 @@ "node": ">=4" } }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -2134,6 +2757,15 @@ "node": ">= 0.6" } }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -2178,9 +2810,9 @@ } }, "node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -2199,31 +2831,31 @@ } }, "node_modules/mocha": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", - "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", - "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "8.1.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.6.0.tgz", + "integrity": "sha512-hxjt4+EEB0SA0ZDygSS015t65lJw/I2yRCS3Ae+SJ5FrbzrXgfYwJr96f0OvIXdj7h4lv/vLCrH3rkiuizFSvw==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", @@ -2244,29 +2876,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/mocha/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -2328,9 +2937,9 @@ } }, "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "engines": { "node": ">=10" @@ -2342,9 +2951,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mysql2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.1.tgz", - "integrity": "sha512-6zo1T3GILsXMCex3YEu7hCz2OXLUarxFsxvFcUHWMpkPtmZLeTTWgRdc1gWyNJiYt6AxITmIf9bZDRy/jAfWew==", + "version": "3.10.2", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.2.tgz", + "integrity": "sha512-KCXPEvAkO0RcHPr362O5N8tFY2fXvbjfkPvRY/wGumh4EOemo9Hm5FjQZqv/pCmrnuxGu5OxnSENG0gTXqKMgQ==", "dependencies": { "denque": "^2.1.0", "generate-function": "^2.3.1", @@ -2397,6 +3006,33 @@ "node": ">= 0.6" } }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -2406,10 +3042,154 @@ "node": ">=0.10.0" } }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm-run-all/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm-run-all/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/npm-run-all/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm-run-all/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/npm-run-all/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2464,6 +3244,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -2490,6 +3289,12 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", @@ -2507,19 +3312,28 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, "engines": { - "node": "14 || >=16.14" + "node": ">=4" } }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" - }, "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", @@ -2537,6 +3351,36 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/prettier": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", @@ -2621,6 +3465,20 @@ "node": ">= 0.8" } }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/readable-stream": { "version": "1.1.14", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", @@ -2644,6 +3502,24 @@ "node": ">=8.10.0" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -2666,11 +3542,69 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -2735,9 +3669,9 @@ "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -2773,6 +3707,21 @@ "node": ">= 0.4" } }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -2799,6 +3748,15 @@ "node": ">=8" } }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", @@ -2842,6 +3800,38 @@ "node": ">=0.10.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true + }, "node_modules/sqlstring": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", @@ -2898,6 +3888,73 @@ "node": ">=8" } }, + "node_modules/string.prototype.padend": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz", + "integrity": "sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2923,6 +3980,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -2946,6 +4012,18 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/test-exclude": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", @@ -2961,31 +4039,29 @@ } }, "node_modules/test-exclude/node_modules/glob": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", - "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/test-exclude/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -3037,10 +4113,83 @@ "node": ">= 0.6" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3049,6 +4198,21 @@ "node": ">=14.17" } }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -3088,9 +4252,9 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -3101,6 +4265,16 @@ "node": ">=10.12.0" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -3124,10 +4298,45 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/why-is-node-running": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", - "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, "dependencies": { "siginfo": "^2.0.0", @@ -3141,9 +4350,9 @@ } }, "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "node_modules/wrap-ansi": { diff --git a/services/booking/src/booking-backend/package.json b/services/booking/src/booking-backend/package.json index 3bd039e2..a1539f7b 100644 --- a/services/booking/src/booking-backend/package.json +++ b/services/booking/src/booking-backend/package.json @@ -1,13 +1,22 @@ { + "type": "module", "name": "@crosslab/service-booking-backend", "version": "0.0.1", "description": "Part of booking service. Does most of the actual work and is horizontal scaleable.", "main": "app/index.js", + "dockerName": "booking-backend", + "bin": { + "crosslab-booking-backend": "./app/index.js" + }, + "files": [ + "app" + ], "scripts": { "test": "npm run build && env-cmd -e development c8 --include=\"app/messageDefinition.js\" --include=\"app/amqpHandle.js\" --include=\"app/internal.js\" --include=\"app/operations/index.js\" mocha app/*_test.js app/operations/*_test.js", "build:generate": "openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", "build:compile": "tsc && cp src/generated/basicValidation.cjs app/generated/basicValidation.cjs", - "build": "npm run build:generate && npm run build:compile", + "build:add-shebang": "bash scripts/add-shebang.sh", + "build": "npm-run-all build:*", "start": "npm run build && env-cmd -e development node app/index.js", "format": "prettier . --write", "lint": "eslint ." @@ -18,7 +27,7 @@ "@cross-lab-project/api-client": "file:../../../../clients/api/js", "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", - "@cross-lab-project/service-common": "file:../../../common", + "@crosslab/service-common": "file:../../../common", "@crosslab/booking-service-common": "file:../common", "@crosslab/booking-service-test-common": "file:../test_common", "@crosslab/service-device-reservation": "file:../device-reservation", @@ -36,10 +45,12 @@ }, "devDependencies": { "@types/mocha": "^10.0.0", + "@types/express": "^4.17.13", "c8": "^10.1.2", "env-cmd": "^10.1.0", "mocha": "^10.0.0", "prettier": "^3.0.3", - "why-is-node-running": "^2.2.2" + "why-is-node-running": "^2.2.2", + "npm-run-all": "^4.1.5" } } diff --git a/services/booking/src/booking-backend/scripts/add-shebang.sh b/services/booking/src/booking-backend/scripts/add-shebang.sh new file mode 120000 index 00000000..1a5fdd47 --- /dev/null +++ b/services/booking/src/booking-backend/scripts/add-shebang.sh @@ -0,0 +1 @@ +../../../../../common/node/scripts/add-shebang.sh \ No newline at end of file diff --git a/services/booking/src/booking-backend/scripts/build-docker.sh b/services/booking/src/booking-backend/scripts/build-docker.sh new file mode 120000 index 00000000..31019032 --- /dev/null +++ b/services/booking/src/booking-backend/scripts/build-docker.sh @@ -0,0 +1 @@ +../../../../../common/docker/scripts/build-node.sh \ No newline at end of file diff --git a/services/booking/src/booking-backend/scripts/test.sh b/services/booking/src/booking-backend/scripts/test.sh new file mode 100755 index 00000000..2e5b18b7 --- /dev/null +++ b/services/booking/src/booking-backend/scripts/test.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +npm ci +npm test \ No newline at end of file diff --git a/services/booking/src/booking-backend/src/amqpHandle.ts b/services/booking/src/booking-backend/src/amqpHandle.ts index fa513400..e4a0e801 100644 --- a/services/booking/src/booking-backend/src/amqpHandle.ts +++ b/services/booking/src/booking-backend/src/amqpHandle.ts @@ -1,13 +1,13 @@ import { sleep } from '@crosslab/booking-service-common'; import * as amqplib from 'amqplib'; -import { config } from './config'; -import { freeDevice, reservateDevice } from './internal'; -import { DeviceBookingRequest } from './messageDefinition'; +import { config } from './config.js'; +import { freeDevice, reservateDevice } from './internal.js'; +import { DeviceBookingRequest } from './messageDefinition.js'; export async function handleFreeDeviceRequest(): Promise { // freeDevice - console.log("handleFreeDeviceRequest started") + console.log('handleFreeDeviceRequest started'); while (true) { try { let connection = await amqplib.connect(config.AmqpUrl); @@ -53,6 +53,7 @@ export async function handleFreeDeviceRequest(): Promise { } catch (err) { console.log(err); console.log('Reconnecting...'); + await sleep(1000); } } } @@ -104,6 +105,7 @@ export async function handleDeviceReservationRequest(): Promise { } catch (err) { console.log(err); console.log('Reconnecting...'); + await sleep(1000); } } } diff --git a/services/booking/src/booking-backend/src/config.ts b/services/booking/src/booking-backend/src/config.ts index 136d62a7..a34eac9e 100644 --- a/services/booking/src/booking-backend/src/config.ts +++ b/services/booking/src/booking-backend/src/config.ts @@ -8,18 +8,10 @@ export const config = { PORT, BASE_URL: process.env.BASE_URL ?? DEFAULT_BASE_URL, JWKS_URL: process.env.JWKS_URL ?? 'http://localhost/.well-known/jwks.json', - SECURITY_ISSUER: - process.env.SECURITY_ISSUER ?? - die('the environment variable SECURITY_ISSUER is not defined!'), - SECURITY_AUDIENCE: - process.env.SECURITY_AUDIENCE ?? - die('the environment variable SECURITY_AUDIENCE is not defined!'), - API_TOKEN: - process.env.API_TOKEN ?? die('the environment variable API_TOKEN is not defined!'), BookingDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, ReservationDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, CallbackDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, OwnURL: process.env.BASE_URL ?? DEFAULT_BASE_URL, - InstitutePrefix:[process.env.BASE_URL ?? DEFAULT_BASE_URL], - AmqpUrl: process.env.AMQP_URL ?? baseConfig.AmqpUrl, + InstitutePrefix: [process.env.BASE_URL ?? DEFAULT_BASE_URL], + AmqpUrl: process.env.AMQP_URL ?? baseConfig.AmqpUrl, }; diff --git a/services/booking/src/booking-backend/src/index.ts b/services/booking/src/booking-backend/src/index.ts index b2c827f7..a5f03696 100644 --- a/services/booking/src/booking-backend/src/index.ts +++ b/services/booking/src/booking-backend/src/index.ts @@ -1,31 +1,31 @@ -import { authorization, error, logging } from '@cross-lab-project/service-common'; -import express from 'express'; +import { authorization, error, logging } from '@crosslab/service-common'; +import express, { Application, ErrorRequestHandler, RequestHandler } from 'express'; +import { handleDeviceReservationRequest, handleFreeDeviceRequest } from './amqpHandle.js'; +import { config } from './config.js'; +import { app } from './generated/index.js'; -import { handleDeviceReservationRequest, handleFreeDeviceRequest } from './amqpHandle'; -import { config } from './config'; -import { app } from './generated'; - -export * from './messageDefinition'; +export * from './messageDefinition.js'; if (require.main === module) { + logging.init(); app.initService({ preHandlers: [ - application => { + (application: Application) => { application.use(express.json()); application.use(express.urlencoded({ extended: false })); - application.use(logging.middleware()); - application.use(authorization.middleware()); + application.use(logging.middleware() as RequestHandler); + application.use(authorization.middleware() as RequestHandler); }, ], postHandlers: [ - application => { + (application: Application) => { application.get('/federation/status', (_req, res) => { res.send({ status: 'ok' }); }); }, ], - errorHandler: error.middleware, + errorHandler: error.middleware as ErrorRequestHandler, }); console.log('Starting booking-backend'); diff --git a/services/booking/src/booking-backend/src/integration_test.ts b/services/booking/src/booking-backend/src/integration_test.ts index 81edd70b..20210fc2 100644 --- a/services/booking/src/booking-backend/src/integration_test.ts +++ b/services/booking/src/booking-backend/src/integration_test.ts @@ -20,13 +20,27 @@ import * as http from 'http'; import * as mocha from 'mocha'; import * as mysql from 'mysql2/promise'; -import { MapToString, TestAMQPresults, ResetAMQPDeviceCount, StartAMQPTestFree, StopAMQPTestFree } from './integrationtest_helper_amqp' -import { DeleteBooking, callbackType, dispatchCallback, freeDevice, handleCallback, randomID, reservateDevice } from './internal'; -import { config } from './config' -import { DeviceBookingRequest } from './messageDefinition'; - -let connection: amqplib.Connection; -let channel: amqplib.Channel; +import { config } from './config.js'; +import { + MapToString, + ResetAMQPDeviceCount, + StartAMQPTestFree, + StopAMQPTestFree, + TestAMQPresults, +} from './integrationtest_helper_amqp.js'; +import { + DeleteBooking, + callbackType, + dispatchCallback, + freeDevice, + handleCallback, + randomID, + reservateDevice, +} from './internal.js'; +import { DeviceBookingRequest } from './messageDefinition.js'; + +let connection: amqplib.Connection | undefined; +let channel: amqplib.Channel | undefined; mocha.describe('internal.ts', function () { this.timeout(10000); @@ -71,7 +85,7 @@ mocha.describe('internal.ts', function () { }); // Drain queues - while (await channel.get('device-booking', { noAck: true })) { } + while (await channel.get('device-booking', { noAck: true })) {} //while (await channel.get('device-freeing', { noAck: true })) { } await startDeviceReservation(); }); @@ -79,12 +93,12 @@ mocha.describe('internal.ts', function () { mocha.afterEach(async function () { await tearDownDummySql(); - await channel.deleteQueue('device-booking'); - await channel.deleteQueue('device-freeing'); + await channel?.deleteQueue('device-booking'); + await channel?.deleteQueue('device-freeing'); - await channel.close(); + await channel?.close(); await sleep(250); - await connection.close(); + await connection?.close(); channel = undefined; connection = undefined; @@ -103,8 +117,8 @@ mocha.describe('internal.ts', function () { let [rows, fields] = await db.execute('SELECT `status` FROM booking WHERE id=?', [ BigInt(1), ]); - if (rows[0].status != 'booked') { - throw new Error('Booking should be booked, is ' + rows[0].status); + if ((rows as any[])[0].status != 'booked') { + throw new Error('Booking should be booked, is ' + (rows as any[])[0].status); } } catch (err) { throw err; @@ -127,8 +141,10 @@ mocha.describe('internal.ts', function () { let [rows, fields] = await db.execute('SELECT `status` FROM booking WHERE id=?', [ BigInt(1), ]); - if (rows[0].status == 'booked') { - throw new Error('Booking should not be booked, is ' + rows[0].status); + if ((rows as any[])[0].status == 'booked') { + throw new Error( + 'Booking should not be booked, is ' + (rows as any[])[0].status, + ); } } catch (err) { throw err; @@ -148,8 +164,8 @@ mocha.describe('internal.ts', function () { let [rows, fields] = await db.execute('SELECT `status` FROM booking WHERE id=?', [ BigInt(2), ]); - if (rows[0].status != 'booked') { - throw new Error('Booking should be booked, is ' + rows[0].status); + if ((rows as any[])[0].status != 'booked') { + throw new Error('Booking should be booked, is ' + (rows as any[])[0].status); } // device 2 @@ -158,8 +174,8 @@ mocha.describe('internal.ts', function () { [rows, fields] = await db.execute('SELECT `status` FROM booking WHERE id=?', [ BigInt(2), ]); - if (rows[0].status != 'booked') { - throw new Error('Booking should be booked, is ' + rows[0].status); + if ((rows as any[])[0].status != 'booked') { + throw new Error('Booking should be booked, is ' + (rows as any[])[0].status); } } catch (err) { throw err; @@ -182,8 +198,10 @@ mocha.describe('internal.ts', function () { let [rows, fields] = await db.execute('SELECT `status` FROM booking WHERE id=?', [ BigInt(2), ]); - if (rows[0].status == 'booked') { - throw new Error('Booking should not be booked, is ' + rows[0].status); + if ((rows as any[])[0].status == 'booked') { + throw new Error( + 'Booking should not be booked, is ' + (rows as any[])[0].status, + ); } } catch (err) { throw err; @@ -202,8 +220,8 @@ mocha.describe('internal.ts', function () { let [rows, fields] = await db.execute('SELECT `status` FROM booking WHERE id=?', [ BigInt(3), ]); - if (rows[0].status != 'booked') { - throw new Error('Booking should be booked, is ' + rows[0].status); + if ((rows as any[])[0].status != 'booked') { + throw new Error('Booking should be booked, is ' + (rows as any[])[0].status); } } catch (err) { throw err; @@ -222,8 +240,8 @@ mocha.describe('internal.ts', function () { let [rows, fields] = await db.execute('SELECT `status` FROM booking WHERE id=?', [ BigInt(3), ]); - if (rows[0].status == 'booked') { - throw new Error('Booking should not be booked, is ' + rows[0].status); + if ((rows as any[])[0].status == 'booked') { + throw new Error('Booking should not be booked, is ' + (rows as any[])[0].status); } } catch (err) { throw err; @@ -239,19 +257,21 @@ mocha.describe('internal.ts', function () { await sleep(100); let serverConfig = fakeServerConfig; // Workaround since TypeScript does not notice var changes in functions if (serverConfig.callback_test_local_single_was_called === false) { - throw new Error("http://localhost:10801/test_callbacks/test-local-single was not called"); + throw new Error( + 'http://localhost:10801/test_callbacks/test-local-single was not called', + ); } if (serverConfig.callback_test_local_two_first_was_called === true) { - throw new Error("wrong callback called"); + throw new Error('wrong callback called'); } if (serverConfig.callback_test_local_two_second_was_called === true) { - throw new Error("wrong callback called"); + throw new Error('wrong callback called'); } if (serverConfig.callback_test_local_group_was_called === true) { - throw new Error("wrong callback called"); + throw new Error('wrong callback called'); } if (serverConfig.callback_test_remote_single_was_called === true) { - throw new Error("wrong callback called"); + throw new Error('wrong callback called'); } resetFakeServerVars(); @@ -259,19 +279,23 @@ mocha.describe('internal.ts', function () { await sleep(100); serverConfig = fakeServerConfig; // Workaround since TypeScript does not notice var changes in functions if (serverConfig.callback_test_local_single_was_called === true) { - throw new Error("wrong callback called"); + throw new Error('wrong callback called'); } if (serverConfig.callback_test_local_two_first_was_called === false) { - throw new Error("http://localhost:10801/test_callbacks/test-local-single was not called"); + throw new Error( + 'http://localhost:10801/test_callbacks/test-local-single was not called', + ); } if (serverConfig.callback_test_local_two_second_was_called === false) { - throw new Error("http://localhost:10801/test_callbacks/test-local-single was not called"); + throw new Error( + 'http://localhost:10801/test_callbacks/test-local-single was not called', + ); } if (serverConfig.callback_test_local_group_was_called === true) { - throw new Error("wrong callback called"); + throw new Error('wrong callback called'); } if (serverConfig.callback_test_remote_single_was_called === true) { - throw new Error("wrong callback called"); + throw new Error('wrong callback called'); } resetFakeServerVars(); @@ -279,88 +303,119 @@ mocha.describe('internal.ts', function () { await sleep(100); serverConfig = fakeServerConfig; // Workaround since TypeScript does not notice var changes in functions if (serverConfig.callback_test_local_single_was_called === true) { - throw new Error("wrong callback called"); + throw new Error('wrong callback called'); } if (serverConfig.callback_test_local_two_first_was_called === true) { - throw new Error("wrong callback called"); + throw new Error('wrong callback called'); } if (serverConfig.callback_test_local_two_second_was_called === true) { - throw new Error("wrong callback called"); + throw new Error('wrong callback called'); } if (serverConfig.callback_test_local_group_was_called === false) { - throw new Error("http://localhost:10801/test_callbacks/test-local-group was not called"); + throw new Error( + 'http://localhost:10801/test_callbacks/test-local-group was not called', + ); } if (serverConfig.callback_test_remote_single_was_called === true) { - throw new Error("wrong callback called"); + throw new Error('wrong callback called'); } resetFakeServerVars(); }); mocha.it('reservateDevice() - local single device', async () => { - await reservateDevice(new DeviceBookingRequest(BigInt(5), new URL("http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"), 0, dayjs("1999-01-10T08:00:00Z"), dayjs("1999-01-10T09:00:00Z"))); + await reservateDevice( + new DeviceBookingRequest( + BigInt(5), + new URL('http://localhost:10801/devices/10000000-0000-0000-0000-000000000000'), + 0, + dayjs('1999-01-10T08:00:00Z'), + dayjs('1999-01-10T09:00:00Z'), + ), + ); await sleep(1000); let db = await mysql.createConnection(config.BookingDSN); await db.connect(); try { - // Test booking - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(5)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(5)], + ); if (rows.length === 0) { - throw new Error("booking not found"); + throw new Error('booking not found'); } - if (rows[0].status !== "booked") { - throw new Error("wrong status " + rows[0].status); + if ((rows as any[])[0].status !== 'booked') { + throw new Error('wrong status ' + (rows as any[])[0].status); } - // Test bookeddevice - [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [5, 0]); + [rows, fields] = await db.execute( + 'SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?', + [5, 0], + ); if (rows.length === 0) { - throw new Error("booked device not found"); + throw new Error('booked device not found'); } - if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong original device " + rows[0].originaldevice); + if ( + (rows as any[])[0].originaldevice !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong original device ' + (rows as any[])[0].originaldevice); } - if (rows[0].bookeddevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong booked device " + rows[0].bookeddevice); + if ( + (rows as any[])[0].bookeddevice !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong booked device ' + (rows as any[])[0].bookeddevice); } - if (rows[0].remotereference !== null) { - throw new Error("wrong remote reference " + rows[0].remotereference); + if ((rows as any[])[0].remotereference !== null) { + throw new Error('wrong remote reference ' + (rows as any[])[0].remotereference); } - if (rows[0].local != true) { // Unfortunate, type conversion - throw new Error("wrong local " + rows[0].local); + if ((rows as any[])[0].local != true) { + // Unfortunate, type conversion + throw new Error('wrong local ' + (rows as any[])[0].local); } - if (rows[0].reservation < 0 || rows[0].reservation === undefined || rows[0].reservation === null) { - throw new Error("bad reservation " + rows[0].reservation); + if ( + (rows as any[])[0].reservation < 0 || + (rows as any[])[0].reservation === undefined || + (rows as any[])[0].reservation === null + ) { + throw new Error('bad reservation ' + (rows as any[])[0].reservation); } - let bookingID = rows[0].reservation; + let bookingID = (rows as any[])[0].reservation; // Test reservation - [rows, fields] = await db.execute("SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?", [bookingID]); + [rows, fields] = await db.execute( + 'SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?', + [bookingID], + ); if (rows.length === 0) { - throw new Error("reservation not found"); + throw new Error('reservation not found'); } - if (rows[0].device !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong device " + rows[0].device); + if ( + (rows as any[])[0].device !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong device ' + (rows as any[])[0].device); } - if (!dayjs(rows[0].start).isSame(dayjs("1999-01-10T08:00:00Z"))) { - throw new Error("wrong start " + rows[0].start); + if (!dayjs((rows as any[])[0].start).isSame(dayjs('1999-01-10T08:00:00Z'))) { + throw new Error('wrong start ' + (rows as any[])[0].start); } - if (!dayjs(rows[0].end).isSame(dayjs("1999-01-10T09:00:00Z"))) { - throw new Error("wrong end " + rows[0].end); + if (!dayjs((rows as any[])[0].end).isSame(dayjs('1999-01-10T09:00:00Z'))) { + throw new Error('wrong end ' + (rows as any[])[0].end); } } finally { await db.end(); @@ -374,224 +429,330 @@ mocha.describe('internal.ts', function () { try { // Test booking 1st half - await reservateDevice(new DeviceBookingRequest(BigInt(6), new URL("http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"), 0, dayjs("1999-02-10T08:00:00Z"), dayjs("1999-02-10T09:00:00Z"))); + await reservateDevice( + new DeviceBookingRequest( + BigInt(6), + new URL('http://localhost:10801/devices/10000000-0000-0000-0000-000000000000'), + 0, + dayjs('1999-02-10T08:00:00Z'), + dayjs('1999-02-10T09:00:00Z'), + ), + ); await sleep(1000); - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(6)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(6)], + ); if (rows.length === 0) { - throw new Error("booking not found"); + throw new Error('booking not found'); } - if (rows[0].status !== "pending") { // not yet complete - throw new Error("wrong status " + rows[0].status); + if ((rows as any[])[0].status !== 'pending') { + // not yet complete + throw new Error('wrong status ' + (rows as any[])[0].status); } // Test other device - [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [6, 1]); + [rows, fields] = await db.execute( + 'SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?', + [6, 1], + ); if (rows.length === 0) { - throw new Error("booked device not found"); + throw new Error('booked device not found'); } - if (rows[0].originaldevice !== "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { - throw new Error("wrong original device " + rows[0].originaldevice); + if ( + (rows as any[])[0].originaldevice !== + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong original device ' + (rows as any[])[0].originaldevice); } - if (rows[0].bookeddevice !== null) { - throw new Error("wrong booked device " + rows[0].bookeddevice); + if ((rows as any[])[0].bookeddevice !== null) { + throw new Error('wrong booked device ' + (rows as any[])[0].bookeddevice); } // Test bookeddevice - [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [6, 0]); + [rows, fields] = await db.execute( + 'SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?', + [6, 0], + ); if (rows.length === 0) { - throw new Error("booked device not found"); + throw new Error('booked device not found'); } - if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong original device " + rows[0].originaldevice); + if ( + (rows as any[])[0].originaldevice !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong original device ' + (rows as any[])[0].originaldevice); } - if (rows[0].bookeddevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong booked device " + rows[0].bookeddevice); + if ( + (rows as any[])[0].bookeddevice !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong booked device ' + (rows as any[])[0].bookeddevice); } - if (rows[0].remotereference !== null) { - throw new Error("wrong remote reference " + rows[0].remotereference); + if ((rows as any[])[0].remotereference !== null) { + throw new Error('wrong remote reference ' + (rows as any[])[0].remotereference); } - if (rows[0].local != true) { // Unfortunate, type conversion - throw new Error("wrong local " + rows[0].local); + if ((rows as any[])[0].local != true) { + // Unfortunate, type conversion + throw new Error('wrong local ' + (rows as any[])[0].local); } - if (rows[0].reservation < 0 || rows[0].reservation === undefined || rows[0].reservation === null) { - throw new Error("bad reservation " + rows[0].reservation); + if ( + (rows as any[])[0].reservation < 0 || + (rows as any[])[0].reservation === undefined || + (rows as any[])[0].reservation === null + ) { + throw new Error('bad reservation ' + (rows as any[])[0].reservation); } - let bookingID = rows[0].reservation; + let bookingID = (rows as any[])[0].reservation; // Test reservation - [rows, fields] = await db.execute("SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?", [bookingID]); + [rows, fields] = await db.execute( + 'SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?', + [bookingID], + ); if (rows.length === 0) { - throw new Error("reservation not found"); + throw new Error('reservation not found'); } - if (rows[0].device !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong device " + rows[0].device); + if ( + (rows as any[])[0].device !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong device ' + (rows as any[])[0].device); } - if (!dayjs(rows[0].start).isSame(dayjs("1999-02-10T08:00:00Z"))) { - throw new Error("wrong start " + rows[0].start); + if (!dayjs((rows as any[])[0].start).isSame(dayjs('1999-02-10T08:00:00Z'))) { + throw new Error('wrong start ' + (rows as any[])[0].start); } - if (!dayjs(rows[0].end).isSame(dayjs("1999-02-10T09:00:00Z"))) { - throw new Error("wrong end " + rows[0].end); + if (!dayjs((rows as any[])[0].end).isSame(dayjs('1999-02-10T09:00:00Z'))) { + throw new Error('wrong end ' + (rows as any[])[0].end); } // Test booking 2nd half - await reservateDevice(new DeviceBookingRequest(BigInt(6), new URL("http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"), 1, dayjs("1999-02-10T08:00:00Z"), dayjs("1999-02-10T09:00:00Z"))); + await reservateDevice( + new DeviceBookingRequest( + BigInt(6), + new URL('http://localhost:10801/devices/20000000-0000-0000-0000-000000000000'), + 1, + dayjs('1999-02-10T08:00:00Z'), + dayjs('1999-02-10T09:00:00Z'), + ), + ); await sleep(1000); - [rows, fields] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(6)]); + [rows, fields] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(6), + ]); if (rows.length === 0) { - throw new Error("booking not found"); + throw new Error('booking not found'); } - if (rows[0].status !== "booked") { // complete - throw new Error("wrong status " + rows[0].status); + if ((rows as any[])[0].status !== 'booked') { + // complete + throw new Error('wrong status ' + (rows as any[])[0].status); } // Test other device - [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [6, 0]); + [rows, fields] = await db.execute( + 'SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?', + [6, 0], + ); if (rows.length === 0) { - throw new Error("booked device not found"); + throw new Error('booked device not found'); } - if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong original device " + rows[0].originaldevice); + if ( + (rows as any[])[0].originaldevice !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong original device ' + (rows as any[])[0].originaldevice); } - if (rows[0].bookeddevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong booked device " + rows[0].bookeddevice); + if ( + (rows as any[])[0].bookeddevice !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong booked device ' + (rows as any[])[0].bookeddevice); } // Test bookeddevice - [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [6, 1]); + [rows, fields] = await db.execute( + 'SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?', + [6, 1], + ); if (rows.length === 0) { - throw new Error("booked device not found"); + throw new Error('booked device not found'); } - if (rows[0].originaldevice !== "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { - throw new Error("wrong original device " + rows[0].originaldevice); + if ( + (rows as any[])[0].originaldevice !== + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong original device ' + (rows as any[])[0].originaldevice); } - if (rows[0].bookeddevice !== "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { - throw new Error("wrong booked device " + rows[0].bookeddevice); + if ( + (rows as any[])[0].bookeddevice !== + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong booked device ' + (rows as any[])[0].bookeddevice); } - if (rows[0].remotereference !== null) { - throw new Error("wrong remote reference " + rows[0].remotereference); + if ((rows as any[])[0].remotereference !== null) { + throw new Error('wrong remote reference ' + (rows as any[])[0].remotereference); } - if (rows[0].local != true) { // Unfortunate, type conversion - throw new Error("wrong local " + rows[0].local); + if ((rows as any[])[0].local != true) { + // Unfortunate, type conversion + throw new Error('wrong local ' + (rows as any[])[0].local); } - if (rows[0].reservation < 0 || rows[0].reservation === undefined || rows[0].reservation === null) { - throw new Error("bad reservation " + rows[0].reservation); + if ( + (rows as any[])[0].reservation < 0 || + (rows as any[])[0].reservation === undefined || + (rows as any[])[0].reservation === null + ) { + throw new Error('bad reservation ' + (rows as any[])[0].reservation); } - bookingID = rows[0].reservation; + bookingID = (rows as any[])[0].reservation; // Test reservation - [rows, fields] = await db.execute("SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?", [bookingID]); + [rows, fields] = await db.execute( + 'SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?', + [bookingID], + ); if (rows.length === 0) { - throw new Error("reservation not found"); + throw new Error('reservation not found'); } - if (rows[0].device !== "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { - throw new Error("wrong device " + rows[0].device); + if ( + (rows as any[])[0].device !== + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong device ' + (rows as any[])[0].device); } - if (!dayjs(rows[0].start).isSame(dayjs("1999-02-10T08:00:00Z"))) { - throw new Error("wrong start " + rows[0].start); + if (!dayjs((rows as any[])[0].start).isSame(dayjs('1999-02-10T08:00:00Z'))) { + throw new Error('wrong start ' + (rows as any[])[0].start); } - if (!dayjs(rows[0].end).isSame(dayjs("1999-02-10T09:00:00Z"))) { - throw new Error("wrong end " + rows[0].end); + if (!dayjs((rows as any[])[0].end).isSame(dayjs('1999-02-10T09:00:00Z'))) { + throw new Error('wrong end ' + (rows as any[])[0].end); } - } finally { await db.end(); } }); mocha.it('reservateDevice() - local group', async () => { - await reservateDevice(new DeviceBookingRequest(BigInt(7), new URL("http://localhost:10801/devices/00000000-0000-0000-0000-000000000010"), 0, dayjs("1999-03-10T08:00:00Z"), dayjs("1999-03-10T09:00:00Z"))); + await reservateDevice( + new DeviceBookingRequest( + BigInt(7), + new URL('http://localhost:10801/devices/00000000-0000-0000-0000-000000000010'), + 0, + dayjs('1999-03-10T08:00:00Z'), + dayjs('1999-03-10T09:00:00Z'), + ), + ); await sleep(1000); let db = await mysql.createConnection(config.BookingDSN); await db.connect(); try { - // Test booking - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(7)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(7)], + ); if (rows.length === 0) { - throw new Error("booking not found"); + throw new Error('booking not found'); } - if (rows[0].status !== "booked") { - throw new Error("wrong status " + rows[0].status); + if ((rows as any[])[0].status !== 'booked') { + throw new Error('wrong status ' + (rows as any[])[0].status); } - // Test bookeddevice - [rows, fields] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?", [7, 0]); + [rows, fields] = await db.execute( + 'SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `booking`=? AND `originalposition`=?', + [7, 0], + ); if (rows.length === 0) { - throw new Error("booked device not found"); + throw new Error('booked device not found'); } - if (rows[0].originaldevice !== "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") { - throw new Error("wrong original device " + rows[0].originaldevice); + if ( + (rows as any[])[0].originaldevice !== + 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000010' + ) { + throw new Error('wrong original device ' + (rows as any[])[0].originaldevice); } - if (rows[0].bookeddevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000" && rows[0].bookeddevice !== "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { // Group: one of those, selection is not deterministic - throw new Error("wrong booked device " + rows[0].bookeddevice); + if ( + (rows as any[])[0].bookeddevice !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' && + (rows as any[])[0].bookeddevice !== + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + // Group: one of those, selection is not deterministic + throw new Error('wrong booked device ' + (rows as any[])[0].bookeddevice); } - let selected = rows[0].bookeddevice + let selected = (rows as any[])[0].bookeddevice; - if (rows[0].remotereference !== null) { - throw new Error("wrong remote reference " + rows[0].remotereference); + if ((rows as any[])[0].remotereference !== null) { + throw new Error('wrong remote reference ' + (rows as any[])[0].remotereference); } - if (rows[0].local != true) { // Unfortunate, type conversion - throw new Error("wrong local " + rows[0].local); + if ((rows as any[])[0].local != true) { + // Unfortunate, type conversion + throw new Error('wrong local ' + (rows as any[])[0].local); } - if (rows[0].reservation < 0 || rows[0].reservation === undefined || rows[0].reservation === null) { - throw new Error("bad reservation " + rows[0].reservation); + if ( + (rows as any[])[0].reservation < 0 || + (rows as any[])[0].reservation === undefined || + (rows as any[])[0].reservation === null + ) { + throw new Error('bad reservation ' + (rows as any[])[0].reservation); } - let bookingID = rows[0].reservation; + let bookingID = (rows as any[])[0].reservation; // Test reservation - [rows, fields] = await db.execute("SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?", [bookingID]); + [rows, fields] = await db.execute( + 'SELECT `device`, `start`, `end` FROM reservation WHERE `id`=?', + [bookingID], + ); if (rows.length === 0) { - throw new Error("reservation not found"); + throw new Error('reservation not found'); } - if (rows[0].device !== selected) { - throw new Error("wrong device " + rows[0].device); + if ((rows as any[])[0].device !== selected) { + throw new Error('wrong device ' + (rows as any[])[0].device); } - if (!dayjs(rows[0].start).isSame(dayjs("1999-03-10T08:00:00Z"))) { - throw new Error("wrong start " + rows[0].start); + if (!dayjs((rows as any[])[0].start).isSame(dayjs('1999-03-10T08:00:00Z'))) { + throw new Error('wrong start ' + (rows as any[])[0].start); } - if (!dayjs(rows[0].end).isSame(dayjs("1999-03-10T09:00:00Z"))) { - throw new Error("wrong end " + rows[0].end); + if (!dayjs((rows as any[])[0].end).isSame(dayjs('1999-03-10T09:00:00Z'))) { + throw new Error('wrong end ' + (rows as any[])[0].end); } } finally { await db.end(); @@ -617,29 +778,40 @@ mocha.describe('internal.ts', function () { ); // Try booking - await reservateDevice(new DeviceBookingRequest(BigInt(5), new URL("http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"), 0, dayjs("1999-01-10T08:00:00Z"), dayjs("1999-01-10T09:00:00Z"))); + await reservateDevice( + new DeviceBookingRequest( + BigInt(5), + new URL('http://localhost:10801/devices/10000000-0000-0000-0000-000000000000'), + 0, + dayjs('1999-01-10T08:00:00Z'), + dayjs('1999-01-10T09:00:00Z'), + ), + ); await sleep(1000); // Test booking - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(5)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(5)], + ); if (rows.length === 0) { - throw new Error("booking not found"); + throw new Error('booking not found'); } - if (rows[0].status !== "rejected") { - throw new Error("wrong status " + rows[0].status); + if ((rows as any[])[0].status !== 'rejected') { + throw new Error('wrong status ' + (rows as any[])[0].status); } // Check request for freeing if (TestAMQPresults.size != 1) { - throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); + throw new Error('wrong number of free devices ' + MapToString(TestAMQPresults)); } if (!TestAMQPresults.has(6n)) { - throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong devices freed ' + MapToString(TestAMQPresults)); } } finally { - ResetAMQPDeviceCount() + ResetAMQPDeviceCount(); await StopAMQPTestFree(); await db.end(); } @@ -664,8 +836,14 @@ mocha.describe('internal.ts', function () { ], ); - await db.execute('UPDATE bookeddevices SET bookeddevice=?, reservation=? WHERE id=?', ['http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', BigInt(99), BigInt(7)]) - + await db.execute( + 'UPDATE bookeddevices SET bookeddevice=?, reservation=? WHERE id=?', + [ + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + BigInt(99), + BigInt(7), + ], + ); // Create fake reservation await db.execute( @@ -680,34 +858,44 @@ mocha.describe('internal.ts', function () { ); // Try booking - await reservateDevice(new DeviceBookingRequest(BigInt(6), new URL("http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"), 1, dayjs("1999-02-10T08:00:00Z"), dayjs("1999-02-10T09:00:00Z"))); + await reservateDevice( + new DeviceBookingRequest( + BigInt(6), + new URL('http://localhost:10801/devices/20000000-0000-0000-0000-000000000000'), + 1, + dayjs('1999-02-10T08:00:00Z'), + dayjs('1999-02-10T09:00:00Z'), + ), + ); await sleep(1000); // Test booking - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(6)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(6)], + ); if (rows.length === 0) { - throw new Error("booking not found"); + throw new Error('booking not found'); } - if (rows[0].status !== "rejected") { - throw new Error("wrong status " + rows[0].status); + if ((rows as any[])[0].status !== 'rejected') { + throw new Error('wrong status ' + (rows as any[])[0].status); } - // Check request for freeing if (TestAMQPresults.size != 2) { - throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); + throw new Error('wrong number of free devices ' + MapToString(TestAMQPresults)); } if (!TestAMQPresults.has(7n)) { - throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong devices freed ' + MapToString(TestAMQPresults)); } if (!TestAMQPresults.has(8n)) { - throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong devices freed ' + MapToString(TestAMQPresults)); } } finally { - ResetAMQPDeviceCount() + ResetAMQPDeviceCount(); await StopAMQPTestFree(); await db.end(); } @@ -743,29 +931,40 @@ mocha.describe('internal.ts', function () { ); // Try booking - await reservateDevice(new DeviceBookingRequest(BigInt(7), new URL("http://localhost:10801/devices/00000000-0000-0000-0000-000000000010"), 0, dayjs("1999-03-10T08:00:00Z"), dayjs("1999-03-10T09:00:00Z"))); + await reservateDevice( + new DeviceBookingRequest( + BigInt(7), + new URL('http://localhost:10801/devices/00000000-0000-0000-0000-000000000010'), + 0, + dayjs('1999-03-10T08:00:00Z'), + dayjs('1999-03-10T09:00:00Z'), + ), + ); await sleep(1000); // Test booking - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(7)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(7)], + ); if (rows.length === 0) { - throw new Error("booking not found"); + throw new Error('booking not found'); } - if (rows[0].status !== "rejected") { - throw new Error("wrong status " + rows[0].status); + if ((rows as any[])[0].status !== 'rejected') { + throw new Error('wrong status ' + (rows as any[])[0].status); } // Check request for freeing if (TestAMQPresults.size != 1) { - throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); + throw new Error('wrong number of free devices ' + MapToString(TestAMQPresults)); } if (!TestAMQPresults.has(9n)) { - throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong devices freed ' + MapToString(TestAMQPresults)); } } finally { - ResetAMQPDeviceCount() + ResetAMQPDeviceCount(); await StopAMQPTestFree(); await db.end(); } @@ -774,18 +973,28 @@ mocha.describe('internal.ts', function () { mocha.it('reservateDevice() - booking not existing', async () => { let errFound = false; try { - await reservateDevice(new DeviceBookingRequest(BigInt(5000), new URL("http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"), 0, dayjs("1999-01-10T08:00:00Z"), dayjs("1999-01-10T09:00:00Z"))); + await reservateDevice( + new DeviceBookingRequest( + BigInt(5000), + new URL('http://localhost:10801/devices/10000000-0000-0000-0000-000000000000'), + 0, + dayjs('1999-01-10T08:00:00Z'), + dayjs('1999-01-10T09:00:00Z'), + ), + ); await sleep(1000); } catch (err) { - if (err.toString() != new Error("Booking 5000 does not exist").toString()) { - console.log("Unknown err " + err); + if ( + (err as Error).toString() != new Error('Booking 5000 does not exist').toString() + ) { + console.log('Unknown err ' + err); throw err; } errFound = true; } if (!errFound) { - throw new Error("No error on unknown booking"); + throw new Error('No error on unknown booking'); } }); @@ -812,28 +1021,30 @@ mocha.describe('internal.ts', function () { sleep(1000); // Check booking - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length === 0) { - throw new Error("booking not found"); + throw new Error('booking not found'); } - if (rows[0].status !== "cancelled") { - throw new Error("wrong status " + rows[0].status); + if ((rows as any[])[0].status !== 'cancelled') { + throw new Error('wrong status ' + (rows as any[])[0].status); } // Check request for freeing if (TestAMQPresults.size != 1) { - throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); + throw new Error('wrong number of free devices ' + MapToString(TestAMQPresults)); } if (!TestAMQPresults.has(1n)) { - throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong devices freed ' + MapToString(TestAMQPresults)); } if (TestAMQPresults.get(1n) != 1) { - throw new Error("wrong number of devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong number of devices freed ' + MapToString(TestAMQPresults)); } - } finally { db.end(); await StopAMQPTestFree(); @@ -846,45 +1057,47 @@ mocha.describe('internal.ts', function () { let db = await mysql.createConnection(config.BookingDSN); await db.connect(); try { - await DeleteBooking(BigInt(2), "rejected", "test message"); + await DeleteBooking(BigInt(2), 'rejected', 'test message'); sleep(1000); // Check booking - let [rows, fields]: [any, any] = await db.execute("SELECT `status`, `message` FROM booking WHERE `id`=?", [BigInt(2)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status`, `message` FROM booking WHERE `id`=?', + [BigInt(2)], + ); if (rows.length === 0) { - throw new Error("booking not found"); + throw new Error('booking not found'); } - if (rows[0].status !== "rejected") { - throw new Error("wrong status " + rows[0].status); + if ((rows as any[])[0].status !== 'rejected') { + throw new Error('wrong status ' + (rows as any[])[0].status); } - if (rows[0].message !== "test message") { - throw new Error("wrong message " + rows[0].message); + if ((rows as any[])[0].message !== 'test message') { + throw new Error('wrong message ' + (rows as any[])[0].message); } // Check request for freeing if (TestAMQPresults.size != 2) { - throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); + throw new Error('wrong number of free devices ' + MapToString(TestAMQPresults)); } if (!TestAMQPresults.has(2n)) { - throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong devices freed ' + MapToString(TestAMQPresults)); } if (TestAMQPresults.get(2n) != 1) { - throw new Error("wrong number of devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong number of devices freed ' + MapToString(TestAMQPresults)); } if (!TestAMQPresults.has(3n)) { - throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong devices freed ' + MapToString(TestAMQPresults)); } if (TestAMQPresults.get(3n) != 1) { - throw new Error("wrong number of devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong number of devices freed ' + MapToString(TestAMQPresults)); } - } finally { db.end(); await StopAMQPTestFree(); @@ -892,7 +1105,6 @@ mocha.describe('internal.ts', function () { } }); - mocha.it('DeleteBooking() local group', async () => { await StartAMQPTestFree(); let db = await mysql.createConnection(config.BookingDSN); @@ -903,28 +1115,30 @@ mocha.describe('internal.ts', function () { sleep(1000); // Check booking - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(3)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(3)], + ); if (rows.length === 0) { - throw new Error("booking not found"); + throw new Error('booking not found'); } - if (rows[0].status !== "cancelled") { - throw new Error("wrong status " + rows[0].status); + if ((rows as any[])[0].status !== 'cancelled') { + throw new Error('wrong status ' + (rows as any[])[0].status); } // Check request for freeing if (TestAMQPresults.size != 1) { - throw new Error("wrong number of free devices " + MapToString(TestAMQPresults)); + throw new Error('wrong number of free devices ' + MapToString(TestAMQPresults)); } if (!TestAMQPresults.has(4n)) { - throw new Error("wrong devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong devices freed ' + MapToString(TestAMQPresults)); } if (TestAMQPresults.get(4n) != 1) { - throw new Error("wrong number of devices freed " + MapToString(TestAMQPresults)); + throw new Error('wrong number of devices freed ' + MapToString(TestAMQPresults)); } - } finally { db.end(); await StopAMQPTestFree(); @@ -935,21 +1149,20 @@ mocha.describe('internal.ts', function () { mocha.it('DeleteBooking() non-existing', async () => { await StartAMQPTestFree(); try { - let error_thrown = false + let error_thrown = false; try { await DeleteBooking(BigInt(1111)); } catch (err) { - if (err.message != "Booking 1111 does not exist") { - throw new Error("unknown error" + err); + if ((err as Error).message != 'Booking 1111 does not exist') { + throw new Error('unknown error' + err); } error_thrown = true; } sleep(100); if (!error_thrown) { - throw new Error("No error thrown"); + throw new Error('No error thrown'); } - } finally { await StopAMQPTestFree(); ResetAMQPDeviceCount(); @@ -963,9 +1176,12 @@ mocha.describe('internal.ts', function () { await freeDevice(BigInt(1)); await sleep(1000); - let [rows, fields]: [any, any] = await db.execute("SELECT * FROM reservation WHERE `id`=?", [BigInt(4)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT * FROM reservation WHERE `id`=?', + [BigInt(4)], + ); if (rows.length !== 0) { - throw new Error("reservation 4 still exists"); + throw new Error('reservation 4 still exists'); } } finally { db.end(); @@ -980,13 +1196,18 @@ mocha.describe('internal.ts', function () { freeDevice(BigInt(3)); await sleep(1000); - let [rows, fields]: [any, any] = await db.execute("SELECT * FROM reservation WHERE `id`=?", [BigInt(5)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT * FROM reservation WHERE `id`=?', + [BigInt(5)], + ); if (rows.length !== 0) { - throw new Error("reservation 5 still exists"); + throw new Error('reservation 5 still exists'); } - [rows, fields] = await db.execute("SELECT * FROM reservation WHERE `id`=?", [BigInt(6)]); + [rows, fields] = await db.execute('SELECT * FROM reservation WHERE `id`=?', [ + BigInt(6), + ]); if (rows.length !== 0) { - throw new Error("reservation 6 still exists"); + throw new Error('reservation 6 still exists'); } } finally { db.end(); @@ -1000,12 +1221,15 @@ mocha.describe('internal.ts', function () { await freeDevice(BigInt(4)); await sleep(1000); - let [rows, fields]: [any, any] = await db.execute("SELECT * FROM reservation WHERE `id`=?", [BigInt(7)]); + let [rows, fields]: [any, any] = await db.execute( + 'SELECT * FROM reservation WHERE `id`=?', + [BigInt(7)], + ); if (rows.length !== 0) { - throw new Error("reservation 7 still exists"); + throw new Error('reservation 7 still exists'); } } finally { db.end(); } }); -}); \ No newline at end of file +}); diff --git a/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts b/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts index 3305c136..539398af 100644 --- a/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts +++ b/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts @@ -1,100 +1,105 @@ -import * as amqplib from 'amqplib'; -import { config } from './config' import { sleep } from '@crosslab/booking-service-common'; +import * as amqplib from 'amqplib'; +import { config } from './config.js'; -let connection: amqplib.Connection; -let channel: amqplib.Channel; +let connection: amqplib.Connection | null; +let channel: amqplib.Channel | null; let amqpTestStarted = false; export let TestAMQPresults = new Map(); export function MapToString(map: Map): string { - return JSON.stringify(Object.fromEntries(map)); -} + return JSON.stringify(Object.fromEntries(map)); +} export function ResetAMQPDeviceCount(): void { - TestAMQPresults = new Map(); -}; + TestAMQPresults = new Map(); +} async function helperLoop(): Promise { - while (true) { - let msg = await channel.get('device-freeing', { noAck: false }); - - if (typeof msg === 'boolean') { - await sleep(20); - continue; - } - - if (msg === null) { - continue; - } - - // Parse data - let data: bigint; - try { - data = BigInt(msg.content.toString()); - } catch (error) { - console.log('Can not parse message:', error); - try { - channel.ack(msg); - } catch (error) { - console.log('Can not ack message:', error); - } - continue; - } - try { - if(data === -9999n){ - amqpTestStarted = false; - return; - } - if(TestAMQPresults.has(data)) { - TestAMQPresults.set(data, TestAMQPresults.get(data)+1); - } - TestAMQPresults.set(data, 1); - channel.ack(msg); - } catch (err) { - console.log("Error at helperLoop: " + err); - } - } -}; + while (true) { + if (!channel) continue; + let msg = await channel.get('device-freeing', { noAck: false }); -export async function StartAMQPTestFree(): Promise { - if (amqpTestStarted) { - throw new Error("amqp mockup alreay started"); + if (typeof msg === 'boolean') { + await sleep(20); + continue; } - connection = await amqplib.connect(config.AmqpUrl); - channel = await connection.createChannel(); + if (msg === null) { + continue; + } - await channel.assertQueue("device-freeing", { - durable: true - }); + // Parse data + let data: bigint; + try { + data = BigInt(msg.content.toString()); + } catch (error) { + console.log('Can not parse message:', error); + try { + channel.ack(msg); + } catch (error) { + console.log('Can not ack message:', error); + } + continue; + } + try { + if (data === -9999n) { + amqpTestStarted = false; + return; + } + if (TestAMQPresults.has(data)) { + TestAMQPresults.set(data, TestAMQPresults.get(data) + 1); + } + TestAMQPresults.set(data, 1); + channel.ack(msg); + } catch (err) { + console.log('Error at helperLoop: ' + err); + } + } +} - while (await channel.get('device-freeing', { noAck: true })) { } +export async function StartAMQPTestFree(): Promise { + if (amqpTestStarted) { + throw new Error('amqp mockup alreay started'); + } - helperLoop(); - amqpTestStarted = true; + connection = await amqplib.connect(config.AmqpUrl); + channel = await connection.createChannel(); - return; -}; + await channel.assertQueue('device-freeing', { + durable: true, + }); -export async function StopAMQPTestFree(): Promise { - if (!amqpTestStarted) { - throw new Error("amqp mockup alreay stopped"); - } + while (await channel.get('device-freeing', { noAck: true })) {} - if (!channel.sendToQueue("device-freeing", Buffer.from((-9999n).toString()), { persistent: true })) { - throw new Error("amqp queue full"); - } + helperLoop(); + amqpTestStarted = true; - await sleep(1000); - await channel.close(); - channel = null; - await sleep(250); - await connection.close(); - connection = null; + return; +} - return; -}; +export async function StopAMQPTestFree(): Promise { + if (!amqpTestStarted) { + throw new Error('amqp mockup alreay stopped'); + } + + if ( + !channel?.sendToQueue('device-freeing', Buffer.from((-9999n).toString()), { + persistent: true, + }) + ) { + throw new Error('amqp queue full'); + } + + await sleep(1000); + await channel.close(); + channel = null; + await sleep(250); + await connection?.close(); + connection = null; + + return; +} diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 54a829bc..9386504a 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -1,659 +1,837 @@ +import { BookingServiceSignatures } from '@cross-lab-project/api-client'; +import { BelongsToUs, clients, sleep } from '@crosslab/booking-service-common'; +import { + ReservationAnswer, + ReservationMessage, + ReservationRequest, +} from '@crosslab/service-device-reservation'; +import * as amqplib from 'amqplib'; import * as crypto from 'crypto'; -import { APIClient, BookingServiceSignatures } from "@cross-lab-project/api-client"; -import lodash from "lodash" -import * as amqplib from "amqplib" -import * as mysql from 'mysql2/promise'; import dayjs from 'dayjs'; -import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'; -import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'; +import isSameOrAfter from 'dayjs/plugin/isSameOrAfter.js'; +import isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js'; +import lodash from 'lodash'; +import * as mysql from 'mysql2/promise'; + +import { config } from './config.js'; +import { DeviceBookingRequest } from './messageDefinition.js'; dayjs.extend(isSameOrBefore); dayjs.extend(isSameOrAfter); -import { DeviceBookingRequest } from './messageDefinition'; -import { BelongsToUs, sleep } from '@crosslab/booking-service-common'; -import { ReservationAnswer, ReservationMessage, ReservationRequest } from '@crosslab/service-device-reservation'; -import { config } from './config'; - - - export enum callbackType { - DeviceUpdate, - BookingUpdate + DeviceUpdate, + BookingUpdate, } // Handle received callback -export async function handleCallback(type: callbackType, targetBooking: bigint, parameters: any) { - let api: APIClient = new APIClient(config.OwnURL, config.API_TOKEN); - - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - - try { - switch (type) { +export async function handleCallback( + type: callbackType, + targetBooking: bigint, + parameters: any, +) { + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + switch (type) { + // Both cases share a vast amount of code. So combine them here and differentiate later + case callbackType.DeviceUpdate: + case callbackType.BookingUpdate: + try { + await db.beginTransaction(); + // Lock booking + let [bookingRow, bookingFields]: [any, any] = await db.execute( + 'SELECT `start`,`end`,`type`,`status`,`user` FROM booking WHERE `id`=? FOR UPDATE', + [targetBooking], + ); + if (bookingRow.length == 0) { + throw Error('Booking (' + targetBooking + ') not known'); + } + let [start, end]: [dayjs.Dayjs, dayjs.Dayjs] = [ + dayjs(bookingRow[0].start), + dayjs(bookingRow[0].end), + ]; + + // Get device + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `id` FROM bookeddevices WHERE `booking`=? AND `originalposition`=? FOR UPDATE', + [targetBooking, parameters.Position], + ); + + if (rows.length == 0) { + throw Error( + 'Booking, Position (' + + targetBooking + + ',' + + parameters.Position + + ') not known', + ); + } + let bookedDeviceId: bigint = BigInt(rows[0].id); + let originalDevice: string = rows[0].originaldevice; + + // Check availability + // Here, we need to differentiate + let available: boolean = true; + + switch (type) { // Both cases share a vast amount of code. So combine them here and differentiate later case callbackType.DeviceUpdate: - case callbackType.BookingUpdate: - try { - await db.beginTransaction(); - // Lock booking - let [bookingRow, bookingFields]: [any, any] = await db.execute("SELECT `start`,`end`,`type`,`status`,`user` FROM booking WHERE `id`=? FOR UPDATE", [targetBooking]); - if (bookingRow.length == 0) { - throw Error("Booking (" + targetBooking + ") not known"); + if (!rows[0].local) { + throw Error('Booking must be local for device update'); + } + + let device = await clients.device.getDevice(rows[0].bookeddevice); + if (device.type == 'group') { + throw Error('Booked device ' + rows[0].bookeddevice + ' is group'); + } + // If not available: request new device + if (device.type == 'device') { + // Other devices are always available + available = !!device.connected; + + // Check availability if needed + if (available) { + available = false; + const announcedAvailability = device.announcedAvailability!; + for (let i = 0; i < announcedAvailability.length; i++) { + if ( + dayjs(announcedAvailability[i].start).isSameOrBefore(start) && + dayjs(announcedAvailability[i].end).isSameOrAfter(end) + ) { + available = true; + break; } - let [start, end]: [dayjs.Dayjs, dayjs.Dayjs] = [dayjs(bookingRow[0].start), dayjs(bookingRow[0].end)]; + } + } + } + break; - // Get device - let [rows, fields]: [any, any] = await db.execute("SELECT `bookeddevice`, `originaldevice`, `remotereference`, `local`, `id` FROM bookeddevices WHERE `booking`=? AND `originalposition`=? FOR UPDATE", [targetBooking, parameters.Position]); + case callbackType.BookingUpdate: + if (rows[0].local) { + throw Error('Booking must be remote for device update'); + } + + let getReturn = await clients.booking.frontend.getBooking( + rows[0].remotereference, + ); + if ( + getReturn.Booking.Status == 'cancelled' || + getReturn.Booking.Status == 'rejected' + ) { + available = false; + } + break; + default: + throw 'BUG: Impossible callback type ' + type + ' in inner switch'; + } - if (rows.length == 0) { - throw Error("Booking, Position (" + targetBooking + "," + parameters.Position + ") not known"); - } - let bookedDeviceId: bigint = BigInt(rows[0].id); - let originalDevice: string = rows[0].originaldevice; - - // Check availability - // Here, we need to differentiate - let available: boolean = true; - - switch (type) { - // Both cases share a vast amount of code. So combine them here and differentiate later - case callbackType.DeviceUpdate: - if (!rows[0].local) { - throw Error("Booking must be local for device update"); - } - - let device = await api.getDevice(rows[0].bookeddevice); - if (device.type == "group") { - throw Error("Booked device " + rows[0].bookeddevice + " is group"); - } - // If not available: request new device - if (device.type == "device") { // Other devices are always available - available = device.connected; - - // Check availability if needed - if (available) { - available = false; - for (let i = 0; i < device.announcedAvailability.length; i++) { - if (dayjs(device.announcedAvailability[i].start).isSameOrBefore(start) && dayjs(device.announcedAvailability[i].end).isSameOrAfter(end)) { - available = true; - break; - } - } - } - } - break; - - case callbackType.BookingUpdate: - if (rows[0].local) { - throw Error("Booking must be remote for device update"); - } - - let getReturn = await api.getBooking(rows[0].remotereference); - if (getReturn.Booking.Status == "cancelled" || getReturn.Booking.Status == "rejected") { - available = false; - } - break; - default: - throw ("BUG: Impossible callback type " + type + " in inner switch"); - } + // Act: Delete reservation and update booking + if (!available) { + await db.commit(); // Free rows for device freeing + await freeDevice(bookedDeviceId); - // Act: Delete reservation and update booking - if (!available) { - await db.commit(); // Free rows for device freeing - await freeDevice(bookedDeviceId); - - // Now ask for new device - let connection: amqplib.Connection - let channel: amqplib.Channel - try { - connection = await amqplib.connect(config.AmqpUrl); - channel = await connection.createChannel(); - - // Request new device - await channel.assertQueue("device-booking", { - durable: true - }); - let s = JSON.stringify(new DeviceBookingRequest(targetBooking, new URL(originalDevice), parameters.Position, start, end)); - if (!channel.sendToQueue("device-booking", Buffer.from(s), { persistent: true })) { - throw new Error("amqp queue full"); - } - } finally { - await channel.close(); - await sleep(250); - await connection.close(); - } - } + // Now ask for new device + let connection: amqplib.Connection | undefined; + let channel: amqplib.Channel | undefined; + try { + connection = await amqplib.connect(config.AmqpUrl); + channel = await connection.createChannel(); + + // Request new device + await channel.assertQueue('device-booking', { + durable: true, + }); + let s = JSON.stringify( + new DeviceBookingRequest( + targetBooking, + new URL(originalDevice), + parameters.Position, + start, + end, + ), + ); + if ( + !channel.sendToQueue('device-booking', Buffer.from(s), { + persistent: true, + }) + ) { + throw new Error('amqp queue full'); + } + } finally { + if (channel) await channel.close(); + await sleep(250); + if (connection) await connection.close(); + } + } - // In the end - commit - await db.commit(); - } catch (err) { - await db.rollback(); - throw err; - } + // In the end - commit + await db.commit(); + } catch (err) { + await db.rollback(); + throw err; + } - break; + break; - default: - // Something went wrong here... - throw Error("Unknown callback type: " + type) - } - } finally { - db.end(); + default: + // Something went wrong here... + throw Error('Unknown callback type: ' + type); } + } finally { + db.end(); + } } -async function addDeviceCallback(device: URL, targetbooking: bigint, parameters: object): Promise { - let id: string = randomID(); - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - - try { - let data: string = JSON.stringify(parameters); - await db.execute("INSERT INTO callback (`id`, `type`, `targetbooking`, `parameters`) VALUES (?,?,?,?)", [id, callbackType.DeviceUpdate, targetbooking, data]); - - let api: APIClient = new APIClient(config.OwnURL, config.API_TOKEN); - await api.updateDevice(device.toString(), undefined, { changedUrl: config.OwnURL + "/booking_callback/" + id }); - } catch (e) { - // For now, just throw the error - throw e; - } finally { - db.end(); - } - - return id; +async function addDeviceCallback( + device: URL, + targetbooking: bigint, + parameters: object, +): Promise { + let id: string = randomID(); + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + let data: string = JSON.stringify(parameters); + await db.execute( + 'INSERT INTO callback (`id`, `type`, `targetbooking`, `parameters`) VALUES (?,?,?,?)', + [id, callbackType.DeviceUpdate, targetbooking, data], + ); + + await clients.device.updateDevice(device.toString(), undefined, { + changedUrl: config.OwnURL + '/booking_callback/' + id, + }); + } catch (e) { + // For now, just throw the error + throw e; + } finally { + db.end(); + } + + return id; } -async function addBookingCallback(booking: URL, targetbooking: bigint, parameters: object): Promise { - let id: string = randomID(); - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - - try { - let data: string = JSON.stringify(parameters); - await db.execute("INSERT INTO callback (`id`, `type`, `targetbooking`, `parameters`) VALUES (?,?,?,?)", [id, callbackType.BookingUpdate, targetbooking, data]); - - let api: APIClient = new APIClient(config.OwnURL, config.API_TOKEN); - await api.updateBooking(booking.toString(), { Callback: config.OwnURL + "/booking_callback/" + id }); - } catch (e) { - // For now, just throw the error - throw e; - } finally { - db.end(); - } - - return id; +async function addBookingCallback( + booking: URL, + targetbooking: bigint, + parameters: object, +): Promise { + let id: string = randomID(); + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + + try { + let data: string = JSON.stringify(parameters); + await db.execute( + 'INSERT INTO callback (`id`, `type`, `targetbooking`, `parameters`) VALUES (?,?,?,?)', + [id, callbackType.BookingUpdate, targetbooking, data], + ); + + await clients.booking.frontend.updateBooking(booking.toString(), { + Callback: config.OwnURL + '/booking_callback/' + id, + }); + } catch (e) { + // For now, just throw the error + throw e; + } finally { + db.end(); + } + + return id; } // Send callback out export async function dispatchCallback(bookingID: bigint) { - if (bookingID < 0n) { - throw new Error("BookingID must not be negative"); - } - - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [bookingID]); - if (rows.length == 0) { - throw new Error("booking" + bookingID + " does not exist"); - } - let status: string = rows[0].status; - - try { - [rows, _] = await db.execute("SELECT `id`, `url` FROM bookingcallbacks WHERE booking=? FOR UPDATE", [bookingID]); - for (let i = 0; i < rows.length; i++) { - try { - let response = await fetch(rows[i].url, { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "status": status, "url": config.OwnURL + "/booking/" + bookingID.toString(), "id": bookingID.toString() }) }); - if (response.status == 404 || response.status == 410) { // Code depends on service - // Callback no longer needed - await db.execute("DELETE FROM bookingcallbacks WHERE id=?", [rows[i].id]); - } - } catch (err) { - // Something went wrong here - just continue for now - continue - } + if (bookingID < 0n) { + throw new Error('BookingID must not be negative'); + } + + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [bookingID], + ); + if (rows.length == 0) { + throw new Error('booking' + bookingID + ' does not exist'); + } + let status: string = rows[0].status; + + try { + [rows, _] = await db.execute( + 'SELECT `id`, `url` FROM bookingcallbacks WHERE booking=? FOR UPDATE', + [bookingID], + ); + for (let i = 0; i < rows.length; i++) { + try { + let response = await fetch(rows[i].url, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + status: status, + url: config.OwnURL + '/booking/' + bookingID.toString(), + id: bookingID.toString(), + }), + }); + if (response.status == 404 || response.status == 410) { + // Code depends on service + // Callback no longer needed + await db.execute('DELETE FROM bookingcallbacks WHERE id=?', [rows[i].id]); } - } finally { - await db.end(); + } catch (err) { + // Something went wrong here - just continue for now + continue; + } } + } finally { + await db.end(); + } } - async function reservationCheckStatus(bookingID: bigint) { - if (bookingID < 0n) { - throw new Error("BookingID must not be negative"); + if (bookingID < 0n) { + throw new Error('BookingID must not be negative'); + } + + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + await db.beginTransaction(); + try { + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE id=? FOR UPDATE', + [bookingID], + ); + if (rows.length == 0) { + throw new Error('Booking ' + bookingID + ' does not exist'); + } + let oldStatus: string = rows[0].status; + if (oldStatus != 'pending' && oldStatus != 'active-pending') { + // Nothing to do here - jump out + await db.commit(); + return; } - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - await db.beginTransaction(); - try { - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE id=? FOR UPDATE", [bookingID]); - if (rows.length == 0) { - throw new Error("Booking " + bookingID + " does not exist"); - } - let oldStatus: string = rows[0].status; - if (oldStatus != "pending" && oldStatus != "active-pending") { - // Nothing to do here - jump out - await db.commit(); - return; - } - - [rows, fields] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE booking=? AND bookeddevice IS NULL", [bookingID]); - - if (rows[0].n == 0) { - // Every device is booked - let taretStatus: string = "booked"; - if (oldStatus === "active-pending") { - taretStatus = "active"; - } - await db.execute("UPDATE booking SET `status`=? WHERE id=?", [taretStatus, bookingID]); - } - - await db.commit(); - dispatchCallback(bookingID); - } catch (err) { - await db.rollback(); - throw err; - } finally { - await db.end(); + [rows, fields] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE booking=? AND bookeddevice IS NULL', + [bookingID], + ); + + if (rows[0].n == 0) { + // Every device is booked + let taretStatus: string = 'booked'; + if (oldStatus === 'active-pending') { + taretStatus = 'active'; + } + await db.execute('UPDATE booking SET `status`=? WHERE id=?', [ + taretStatus, + bookingID, + ]); } + + await db.commit(); + dispatchCallback(bookingID); + } catch (err) { + await db.rollback(); + throw err; + } finally { + await db.end(); + } } // Reservate devices - will change status of booking itself if reservation is not successful export async function reservateDevice(r: DeviceBookingRequest) { - if (r.BookingID < 0n) { - throw new Error("BookingID must not be negative"); + if (r.BookingID < 0n) { + throw new Error('BookingID must not be negative'); + } + + if (r.Position < 0) { + throw new Error('Position must not be negative'); + } + + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + try { + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE id=?', + [r.BookingID], + ); + if (rows.length == 0) { + throw new Error('Booking ' + r.BookingID + ' does not exist'); } - if (r.Position < 0) { - throw new Error("Position must not be negative"); + if ( + rows[0].status === 'rejected' || + rows[0].status === 'cancelled' || + rows[0].status === 'active-rejected' + ) { + // Get early out - this booking will not success anyway + return; } - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - try { - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE id=?", [r.BookingID]); - if (rows.length == 0) { - throw new Error("Booking " + r.BookingID + " does not exist"); - } - - if (rows[0].status === "rejected" || rows[0].status === "cancelled" || rows[0].status === "active-rejected") { - // Get early out - this booking will not success anyway - return; - } - - let api: APIClient = new APIClient(config.OwnURL, config.API_TOKEN); - - let deviceListResponse = await api.getDevice(r.Device.toString(), { flat_group: true }); - let possibleDevices: string[] = []; + let deviceListResponse = await clients.device.getDevice(r.Device.toString(), { + flat_group: true, + }); + let possibleDevices: string[] = []; + + if ( + deviceListResponse.type === 'device' || + deviceListResponse.type === 'cloud instantiable' || + deviceListResponse.type === 'edge instantiable' + ) { + possibleDevices.push(deviceListResponse.url); + } else if (deviceListResponse.type === 'group') { + // group + for (let i = 0; i < deviceListResponse.devices.length; i++) { + possibleDevices.push(deviceListResponse.devices[i].url); + } + } else { + throw new Error('BUG: Unknown device type for' + r.Device.toString()); + } - if (deviceListResponse.type === "device" || deviceListResponse.type === "cloud instantiable" || deviceListResponse.type === "edge instantiable") { - possibleDevices.push(deviceListResponse.url) - } else if (deviceListResponse.type === "group") { - // group - for (let i = 0; i < deviceListResponse.devices.length; i++) { - possibleDevices.push(deviceListResponse.devices[i].url); - } + { + // Sort devices + // This has two goals + // * Randomise the order of devices, so not everyone wants to book the same device first + // * Prefer own devices over remote devices + let own: string[] = []; + let other: string[] = []; + + for (let i = 0; i < possibleDevices.length; i++) { + if (BelongsToUs(new URL(possibleDevices[i]))) { + own.push(possibleDevices[i]); } else { - throw new Error("BUG: Unknown device type for" + r.Device.toString()) + other.push(possibleDevices[i]); } + } - { - // Sort devices - // This has two goals - // * Randomise the order of devices, so not everyone wants to book the same device first - // * Prefer own devices over remote devices - let own: string[] = []; - let other: string[] = []; - - for (let i = 0; i < possibleDevices.length; i++) { - if (BelongsToUs(new URL(possibleDevices[i]))) { - own.push(possibleDevices[i]); - } else { - other.push(possibleDevices[i]); - } - } - - lodash.shuffle(own); - lodash.shuffle(other); - own.push(...other); - possibleDevices = own; - } + lodash.shuffle(own); + lodash.shuffle(other); + own.push(...other); + possibleDevices = own; + } - nextDevice: for (let i = 0; i < possibleDevices.length; i++) { - let schedule: BookingServiceSignatures.ScheduleSuccessResponse["body"]; - try { - schedule = await api.schedule({ Experiment: { Devices: [{ ID: possibleDevices[i] }] }, Time: { Start: r.Start.toISOString(), End: r.End.toISOString() }, Combined: false, onlyOwn: true }); - } catch (e) { - continue - } - if (schedule.length !== 1) { - // Should only be one device - continue + nextDevice: for (let i = 0; i < possibleDevices.length; i++) { + let schedule: BookingServiceSignatures.ScheduleSuccessResponse['body']; + try { + schedule = await clients.booking.schedule.schedule({ + Experiment: { Devices: [{ ID: possibleDevices[i] }] }, + Time: { Start: r.Start.toISOString(), End: r.End.toISOString() }, + Combined: false, + onlyOwn: true, + }); + } catch (e) { + continue; + } + if (schedule.length !== 1) { + // Should only be one device + continue; + } + if (schedule[0].Booked.length !== 0) { + // Device is booked + continue; + } + + // Book device + if (BelongsToUs(new URL(possibleDevices[i]))) { + let connection: amqplib.Connection | undefined; + let channel: amqplib.Channel | undefined; + let returnChannel = randomID(); + let queueCreated = false; + try { + connection = await amqplib.connect(config.AmqpUrl); + channel = await connection.createChannel(); + + await channel.assertQueue('device-reservation', { + durable: true, + }); + + await channel.assertQueue(returnChannel, { + durable: false, + }); + + queueCreated = true; + + let m = new ReservationMessage(ReservationRequest.New, returnChannel); + let url = config.OwnURL; + if (!url.endsWith('/')) { + url = url + '/'; + } + url = url + 'booking/' + r.BookingID; + m.BookingReference = new URL(url); + m.Start = r.Start; + m.End = r.End; + m.Device = new URL(possibleDevices[i]); + + channel.sendToQueue('device-reservation', Buffer.from(JSON.stringify(m))); + + let aUnknown: any; + let counter = 0; + while (true) { + aUnknown = await channel.get(returnChannel, { noAck: true }); + if (typeof aUnknown !== 'boolean' && aUnknown !== null) { + break; } - if (schedule[0].Booked.length !== 0) { - // Device is booked - continue - } - - // Book device - if (BelongsToUs(new URL(possibleDevices[i]))) { - let connection: amqplib.Connection - let channel: amqplib.Channel - let returnChannel = randomID(); - let queueCreated = false; - try { - connection = await amqplib.connect(config.AmqpUrl); - channel = await connection.createChannel(); - - await channel.assertQueue("device-reservation", { - durable: true - }); - - await channel.assertQueue(returnChannel, { - durable: false - }); - - queueCreated = true; - - let m = new ReservationMessage(ReservationRequest.New, returnChannel); - let url = config.OwnURL; - if (!url.endsWith("/")) { - url = url + "/"; - } - url = url + "booking/" + r.BookingID - m.BookingReference = new URL(url); - m.Start = r.Start; - m.End = r.End; - m.Device = new URL(possibleDevices[i]); - - channel.sendToQueue("device-reservation", Buffer.from(JSON.stringify(m))); - - let aUnknown: any; - let counter = 0; - while (true) { - aUnknown = await channel.get(returnChannel, { noAck: true }); - if (typeof (aUnknown) !== "boolean" && aUnknown !== null) { - break - } - counter++; - if (counter >= 50) { - continue nextDevice; - } - await sleep(100) - } - - let a: amqplib.GetMessage = aUnknown as amqplib.GetMessage; - let data = ReservationAnswer.fromString(a.content.toString()); - if (data.Type === ReservationRequest.New && data.Successful && data.Device.toString() === possibleDevices[i] && data.Start.isSame(r.Start) && data.End.isSame(r.End)) { - await db.execute("UPDATE bookeddevices SET `bookeddevice`=?, `reservation`=?, `local`=? WHERE `booking`=? AND `originalposition`=?", [data.Device.toString(), data.ReservationID.toString(), true, r.BookingID, r.Position]) - addDeviceCallback(data.Device, r.BookingID, { "Position": r.Position }); - await reservationCheckStatus(r.BookingID); - return; - } - continue; - } catch (err) { - console.log(err); - continue; - } finally { - if (channel !== undefined) { - await channel.close(); - await sleep(250); - } - if (connection !== undefined) { - await connection.close(); - } - } - } else { - let institution = new URL(possibleDevices[i]).origin; - let putReturn = await api.newBooking({ Devices: [{ ID: possibleDevices[i] }], Time: { Start: r.Start.toISOString(), End: r.End.toISOString() }, BookingReference: r.BookingID.toString() }, { url: institution + "/booking/manage" }); - - let ID = putReturn.ReservationID; - - let counter = -1; - while (true) { - counter++; - if (counter >= 50) { - continue nextDevice; - } - await sleep(1000); - - let getReturn = await api.getBooking(institution + "/booking/" + ID); - - switch (getReturn.Booking.Status) { - case "pending": - case "active-pending": - // Still waiting - continue; - break; - case "booked": - case "active": - // Success - await db.execute("UPDATE bookeddevices SET `bookeddevice`=?, `remotereference`=?, `local`=? WHERE `booking`=? AND `originalposition`=?", [possibleDevices[i], getReturn.Booking.ID, false, r.BookingID, r.Position]) - addBookingCallback(new URL(possibleDevices[i]), r.BookingID, { "Position": r.Position }); - await reservationCheckStatus(r.BookingID); - return; - break; - case "rejected": - case "cancelled": - case "active-rejected": - // Failure - continue nextDevice; - break; - case undefined: - counter += 10; - continue; - break; - default: - console.log("Unknown API response for getBookingManageByID:", getReturn.Booking.Status); - counter += 10; - continue; - break; - } - } + counter++; + if (counter >= 50) { + continue nextDevice; } + await sleep(100); + } + + let a: amqplib.GetMessage = aUnknown as amqplib.GetMessage; + let data = ReservationAnswer.fromString(a.content.toString()); + if ( + data.Type === ReservationRequest.New && + data.Successful && + data.Device?.toString() === possibleDevices[i] && + data.Start?.isSame(r.Start) && + data.End?.isSame(r.End) + ) { + await db.execute( + 'UPDATE bookeddevices SET `bookeddevice`=?, `reservation`=?, `local`=? WHERE `booking`=? AND `originalposition`=?', + [ + data.Device.toString(), + data.ReservationID.toString(), + true, + r.BookingID, + r.Position, + ], + ); + addDeviceCallback(data.Device, r.BookingID, { Position: r.Position }); + await reservationCheckStatus(r.BookingID); + return; + } + continue; + } catch (err) { + console.log(err); + continue; + } finally { + if (channel !== undefined) { + await channel.close(); + await sleep(250); + } + if (connection !== undefined) { + await connection.close(); + } } - // Ok, we were not able to book a device... - DeleteBooking(r.BookingID, "rejected", "Can not book " + r.Device.toString()); - } finally { - await db.end(); + } else { + let institution = new URL(possibleDevices[i]).origin; + let putReturn = await clients.booking.frontend.newBooking( + { + Devices: [{ ID: possibleDevices[i] }], + Time: { Start: r.Start.toISOString(), End: r.End.toISOString() }, + BookingReference: r.BookingID.toString(), + }, + { url: institution + '/booking/manage' }, + ); + + let ID = putReturn.ReservationID; + + let counter = -1; + while (true) { + counter++; + if (counter >= 50) { + continue nextDevice; + } + await sleep(1000); + + let getReturn = await clients.booking.frontend.getBooking( + institution + '/booking/' + ID, + ); + + switch (getReturn.Booking.Status) { + case 'pending': + case 'active-pending': + // Still waiting + continue; + break; + case 'booked': + case 'active': + // Success + await db.execute( + 'UPDATE bookeddevices SET `bookeddevice`=?, `remotereference`=?, `local`=? WHERE `booking`=? AND `originalposition`=?', + [ + possibleDevices[i], + getReturn.Booking.ID, + false, + r.BookingID, + r.Position, + ], + ); + addBookingCallback(new URL(possibleDevices[i]), r.BookingID, { + Position: r.Position, + }); + await reservationCheckStatus(r.BookingID); + return; + break; + case 'rejected': + case 'cancelled': + case 'active-rejected': + // Failure + continue nextDevice; + break; + case undefined: + counter += 10; + continue; + break; + default: + console.log( + 'Unknown API response for getBookingManageByID:', + getReturn.Booking.Status, + ); + counter += 10; + continue; + break; + } + } + } } + // Ok, we were not able to book a device... + DeleteBooking(r.BookingID, 'rejected', 'Can not book ' + r.Device.toString()); + } finally { + await db.end(); + } } export async function freeDevice(internalreference: bigint) { - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - await db.beginTransaction(); - try { - let [rows, fields]: [any, any] = await db.execute("SELECT `id`, `booking`, `originaldevice`, `originalposition`, `bookeddevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `id`=? FOR UPDATE", [internalreference]); - if (rows.length == 0) { - throw Error("Bookeddevice " + internalreference + " not found"); - } - - let [bookingRow, bookingFields]: [any, any] = await db.execute("SELECT * FROM booking WHERE `id`=? FOR UPDATE", [rows[0].booking]); // Lock booking - if (bookingRow.length == 0) { - throw Error("Booking " + rows[0].booking + " not found"); - } - - // Free now - if (rows[0].local) { - // This is a local device - let connection: amqplib.Connection - let channel: amqplib.Channel - let returnChannel = randomID(); - let queueCreated = false; - try { - connection = await amqplib.connect(config.AmqpUrl); - channel = await connection.createChannel(); - - await channel.assertQueue("device-reservation", { - durable: true - }); - - await channel.assertQueue(returnChannel, { - durable: false - }); - - queueCreated = true; - - let m = new ReservationMessage(ReservationRequest.Delete, returnChannel); - m.ReservationID = BigInt(rows[0].reservation); - - channel.sendToQueue("device-reservation", Buffer.from(JSON.stringify(m))); + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + await db.beginTransaction(); + try { + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `id`, `booking`, `originaldevice`, `originalposition`, `bookeddevice`, `remotereference`, `local`, `reservation` FROM bookeddevices WHERE `id`=? FOR UPDATE', + [internalreference], + ); + if (rows.length == 0) { + throw Error('Bookeddevice ' + internalreference + ' not found'); + } - let aUnknown: any; - let counter = 0; - while (true) { - aUnknown = await channel.get(returnChannel, { noAck: true }); - if (typeof (aUnknown) !== "boolean" && aUnknown !== null) { - break - } - counter++; - if (counter >= 50) { - throw Error("Did not receive Answer from device-reservation"); - } - await sleep(100) - } + let [bookingRow, bookingFields]: [any, any] = await db.execute( + 'SELECT * FROM booking WHERE `id`=? FOR UPDATE', + [rows[0].booking], + ); // Lock booking + if (bookingRow.length == 0) { + throw Error('Booking ' + rows[0].booking + ' not found'); + } - let a: amqplib.GetMessage = aUnknown as amqplib.GetMessage; - let data = ReservationAnswer.fromString(a.content.toString()); - if (data.Type !== ReservationRequest.Delete || !data.Successful) { - throw Error("Reservation deletion was not successful"); - } - } finally { - if (channel !== undefined) { - if (queueCreated) { - await channel.deleteQueue(returnChannel); - } - await channel.close(); - await sleep(250); - } - if (connection !== undefined) { - await connection.close(); - } - } - } else { - // This is a remote devices - let api: APIClient = new APIClient(config.OwnURL, config.API_TOKEN); - await api.deleteBooking(rows[0].remotereference); + // Free now + if (rows[0].local) { + // This is a local device + let connection: amqplib.Connection | undefined; + let channel: amqplib.Channel | undefined; + let returnChannel = randomID(); + let queueCreated = false; + try { + connection = await amqplib.connect(config.AmqpUrl); + channel = await connection.createChannel(); + + await channel.assertQueue('device-reservation', { + durable: true, + }); + + await channel.assertQueue(returnChannel, { + durable: false, + }); + + queueCreated = true; + + let m = new ReservationMessage(ReservationRequest.Delete, returnChannel); + m.ReservationID = BigInt(rows[0].reservation); + + channel.sendToQueue('device-reservation', Buffer.from(JSON.stringify(m))); + + let aUnknown: any; + let counter = 0; + while (true) { + aUnknown = await channel.get(returnChannel, { noAck: true }); + if (typeof aUnknown !== 'boolean' && aUnknown !== null) { + break; + } + counter++; + if (counter >= 50) { + throw Error('Did not receive Answer from device-reservation'); + } + await sleep(100); } - // Delete form DB - switch (bookingRow[0].status) { - case "active-rejected": - case "active": - await db.execute("UPDATE booking SET `status`='active-pending' WHERE `id`=?", [rows[0].booking]); - break; - case "active-pending": - case "pending": - // Do nothing since it is still pending - break; - case "booked": - await db.execute("UPDATE booking SET `status`='pending' WHERE `id`=?", [rows[0].booking]); - break; - case "rejected": - case "cancelled": - // Do nothing, this is the correct status - break; - default: - throw Error("BUG: Unknown booking status " + bookingRow[0].status); + let a: amqplib.GetMessage = aUnknown as amqplib.GetMessage; + let data = ReservationAnswer.fromString(a.content.toString()); + if (data.Type !== ReservationRequest.Delete || !data.Successful) { + throw Error('Reservation deletion was not successful'); } - // Delete from DB - await db.execute("UPDATE bookeddevices SET `bookeddevice`=?, `remotereference`=?, `local`=? WHERE `id`=?", [null, null, null, internalreference]); - - // Commit - await db.commit(); - } catch (err) { - await db.rollback(); - throw err; - } finally { - db.end(); + } finally { + if (channel !== undefined) { + if (queueCreated) { + await channel.deleteQueue(returnChannel); + } + await channel.close(); + await sleep(250); + } + if (connection !== undefined) { + await connection.close(); + } + } + } else { + // This is a remote devices + await clients.booking.frontend.deleteBooking(rows[0].remotereference); + } + + // Delete form DB + switch (bookingRow[0].status) { + case 'active-rejected': + case 'active': + await db.execute("UPDATE booking SET `status`='active-pending' WHERE `id`=?", [ + rows[0].booking, + ]); + break; + case 'active-pending': + case 'pending': + // Do nothing since it is still pending + break; + case 'booked': + await db.execute("UPDATE booking SET `status`='pending' WHERE `id`=?", [ + rows[0].booking, + ]); + break; + case 'rejected': + case 'cancelled': + // Do nothing, this is the correct status + break; + default: + throw Error('BUG: Unknown booking status ' + bookingRow[0].status); } + // Delete from DB + await db.execute( + 'UPDATE bookeddevices SET `bookeddevice`=?, `remotereference`=?, `local`=? WHERE `id`=?', + [null, null, null, internalreference], + ); + + // Commit + await db.commit(); + } catch (err) { + await db.rollback(); + throw err; + } finally { + db.end(); + } } // Helper export function randomID(): string { - var b = new Uint8Array(66); - crypto.getRandomValues(b); - return Buffer.from(b).toString("base64url"); + var b = new Uint8Array(66); + crypto.getRandomValues(b); + return Buffer.from(b).toString('base64url'); } -export async function DeleteBooking(bookingID: bigint, targetStatus = "cancelled", message = "") { - if (bookingID < 0n) { - throw new Error("BookingID must not be negative"); +export async function DeleteBooking( + bookingID: bigint, + targetStatus = 'cancelled', + message = '', +) { + if (bookingID < 0n) { + throw new Error('BookingID must not be negative'); + } + + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + await db.beginTransaction(); + try { + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE id=? FOR UPDATE', + [bookingID], + ); + if (rows.length == 0) { + throw new Error('Booking ' + bookingID + ' does not exist'); } + let status: string = rows[0].status; - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - await db.beginTransaction(); - try { - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE id=? FOR UPDATE", [bookingID]); - if (rows.length == 0) { - throw new Error("Booking " + bookingID + " does not exist"); - } - let status: string = rows[0].status - - switch (status) { - case "active-rejected": - case "active": - // In addition, change rejected to active-rejected - // Do this here to avoid strange errors - if (targetStatus === "rejected") { - targetStatus = "active-rejected" - } - - case "pending": - case "active-pending": - case "booked": - case "rejected": - // Success - await db.execute("UPDATE booking SET `status`=? WHERE id=?", [targetStatus, bookingID]); - [rows, fields] = await db.execute("SELECT `id` FROM bookeddevices WHERE booking=?", [bookingID]); - let connection = await amqplib.connect(config.AmqpUrl); - let channel = await connection.createChannel(); - try { - await channel.assertQueue("device-freeing", { - durable: true - }); - for (let i = 0; i < rows.length; i++) { - if (!channel.sendToQueue("device-freeing", Buffer.from(rows[i].id.toString()), { persistent: true })) { - throw new Error("amqp queue full"); - } - } - } catch (err) { - // Don't jump out here, since some devices might already be freed - console.log("Got error while cancelling booking, devices might not be freed: " + err.toString()); - } finally { - await channel.close(); - await sleep(250); - await connection.close(); - } - break; - case "cancelled": - // No need to do anything - break; - default: - throw Error("Unknown status code: " + status); - break; + switch (status) { + case 'active-rejected': + case 'active': + // In addition, change rejected to active-rejected + // Do this here to avoid strange errors + if (targetStatus === 'rejected') { + targetStatus = 'active-rejected'; } - if (message !== undefined && message !== "") { - let [rows, fields] = await db.execute("SELECT `message` FROM booking WHERE id=?", [bookingID]); - let targetMessage: string = ""; - if (rows[0].message === undefined || rows[0].message === null || rows[0].message == "") { - targetMessage = message; - } else { - targetMessage = rows[0].message + "\n" + message; + case 'pending': + case 'active-pending': + case 'booked': + case 'rejected': + // Success + await db.execute('UPDATE booking SET `status`=? WHERE id=?', [ + targetStatus, + bookingID, + ]); + [rows, fields] = await db.execute( + 'SELECT `id` FROM bookeddevices WHERE booking=?', + [bookingID], + ); + let connection = await amqplib.connect(config.AmqpUrl); + let channel = await connection.createChannel(); + try { + await channel.assertQueue('device-freeing', { + durable: true, + }); + for (let i = 0; i < rows.length; i++) { + if ( + !channel.sendToQueue('device-freeing', Buffer.from(rows[i].id.toString()), { + persistent: true, + }) + ) { + throw new Error('amqp queue full'); } - await db.execute("UPDATE booking SET `message`=? WHERE id=?", [targetMessage, bookingID]); + } + } catch (err) { + // Don't jump out here, since some devices might already be freed + console.log( + 'Got error while cancelling booking, devices might not be freed: ' + + (err as Error).toString(), + ); + } finally { + await channel.close(); + await sleep(250); + await connection.close(); } - await db.commit(); - dispatchCallback(bookingID); - } catch (err) { - await db.rollback(); - throw err; - } finally { - await db.end(); + break; + case 'cancelled': + // No need to do anything + break; + default: + throw Error('Unknown status code: ' + status); + break; + } + + if (message !== undefined && message !== '') { + let [rows, fields] = await db.execute('SELECT `message` FROM booking WHERE id=?', [ + bookingID, + ]); + let targetMessage: string = ''; + const firstRow = (Array.isArray(rows) ? rows[0] : undefined) as + | { message: string | null | undefined } + | undefined; + if ( + firstRow?.message === undefined || + firstRow?.message === null || + firstRow?.message == '' + ) { + targetMessage = message; + } else { + targetMessage = firstRow?.message + '\n' + message; + } + await db.execute('UPDATE booking SET `message`=? WHERE id=?', [ + targetMessage, + bookingID, + ]); } + await db.commit(); + dispatchCallback(bookingID); + } catch (err) { + await db.rollback(); + throw err; + } finally { + await db.end(); + } } diff --git a/services/booking/src/booking-backend/src/messageDefinition_test.ts b/services/booking/src/booking-backend/src/messageDefinition_test.ts index 9923c449..6a680b2b 100644 --- a/services/booking/src/booking-backend/src/messageDefinition_test.ts +++ b/services/booking/src/booking-backend/src/messageDefinition_test.ts @@ -1,7 +1,7 @@ import dayjs from 'dayjs'; import * as mocha from 'mocha'; -import { DeviceBookingRequest } from './messageDefinition'; +import { DeviceBookingRequest } from './messageDefinition.js'; (BigInt.prototype as any).toJSON = function () { return this.toString(); diff --git a/services/booking/src/booking-backend/src/operations/index.ts b/services/booking/src/booking-backend/src/operations/index.ts index eea53ee0..2ec13d00 100644 --- a/services/booking/src/booking-backend/src/operations/index.ts +++ b/services/booking/src/booking-backend/src/operations/index.ts @@ -1,15 +1,16 @@ import * as mysql from 'mysql2/promise'; -import { config } from '../config'; +import { config } from '../config.js'; import { deleteBookingByIDLockSignature, postBookingCallbackByIDSignature, putBookingByIDLock200ResponseType, putBookingByIDLockSignature, -} from '../generated/signatures'; -import { dispatchCallback, handleCallback } from '../internal'; +} from '../generated/signatures.js'; +import { dispatchCallback, handleCallback } from '../internal.js'; -export const putBookingByIDLock: putBookingByIDLockSignature = async (request, +export const putBookingByIDLock: putBookingByIDLockSignature = async ( + request, parameters, ) => { let bookingID: bigint = BigInt(parameters.ID); @@ -96,7 +97,8 @@ export const putBookingByIDLock: putBookingByIDLockSignature = async (request, } }; -export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async (request, +export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async ( + request, parameters, ) => { let bookingID: bigint = BigInt(parameters.ID); @@ -133,7 +135,6 @@ export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async (requ dispatchCallback(bookingID); break; - case 'pending': case 'rejected': case 'cancelled': @@ -162,12 +163,16 @@ export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async (requ } }; -export const postBookingCallbackByID: postBookingCallbackByIDSignature = async (request, +export const postBookingCallbackByID: postBookingCallbackByIDSignature = async ( + request, parameters, ) => { let parameterID: bigint = BigInt(parameters.ID); - await request.authorization.check_authorization_or_fail('edit', `booking:${parameterID}`); + await request.authorization.check_authorization_or_fail( + 'edit', + `booking:${parameterID}`, + ); let db = await mysql.createConnection(config.BookingDSN); await db.connect(); diff --git a/services/booking/src/booking-backend/src/operations/index_test.ts b/services/booking/src/booking-backend/src/operations/index_test.ts index 642e5a66..f90b3ab9 100644 --- a/services/booking/src/booking-backend/src/operations/index_test.ts +++ b/services/booking/src/booking-backend/src/operations/index_test.ts @@ -3,19 +3,23 @@ import { fakeServerConfig, getFakeInstitutePrefix, getFakeOwnURL, + getFakeRequest, getSQLDNS, resetFakeServerVars, setupDummySql, startFakeServer, stopFakeServer, tearDownDummySql, - getFakeRequest, } from '@crosslab/booking-service-test-common'; import * as mocha from 'mocha'; import * as mysql from 'mysql2/promise'; -import { postBookingCallbackByID, deleteBookingByIDLock, putBookingByIDLock } from './index'; -import { config } from '../config' +import { config } from '../config.js'; +import { + deleteBookingByIDLock, + postBookingCallbackByID, + putBookingByIDLock, +} from './index.js'; mocha.describe('operations.ts', function () { this.timeout(10000); @@ -58,29 +62,34 @@ mocha.describe('operations.ts', function () { try { let isError = false; try { - await putBookingByIDLock(getFakeRequest({ user: "badActor", isAuthorized: false }), { ID: "1" }); + await putBookingByIDLock( + getFakeRequest({ user: 'badActor', isAuthorized: false }), + { ID: '1' }, + ); await sleep(250); - } catch (err) { - if (err.message == "test authorization failed") { + if ((err as Error).message == 'test authorization failed') { isError = true; } else { - console.log(err.message); + console.log((err as Error).message); throw err; } } if (!isError) { - throw new Error("no access violation detected"); + throw new Error('no access violation detected'); } // Check if booking still unchanged - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length == 0) { - throw Error("booking not found") + throw Error('booking not found'); } - if (rows[0].status !== "booked") { - throw new Error("Wrong status " + rows[0].status); + if (rows[0].status !== 'booked') { + throw new Error('Wrong status ' + rows[0].status); } } finally { db.end(); @@ -92,35 +101,44 @@ mocha.describe('operations.ts', function () { await db.connect(); try { - let result = await putBookingByIDLock(getFakeRequest(), { ID: "1" }); + let result = await putBookingByIDLock(getFakeRequest(), { ID: '1' }); await sleep(250); if (result.status != 200) { - throw new Error("wrong status " + result.status); + throw new Error('wrong status ' + result.status); } - if(result.body.length != 1){ - throw new Error("number of devices wrong "+ result.body.length); - } + if (result.body.length != 1) { + throw new Error('number of devices wrong ' + result.body.length); + } - if(result.body[0].Requested != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ - throw new Error("wrong requested devive 0 " + result.body[0].Requested); + if ( + result.body[0].Requested != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong requested devive 0 ' + result.body[0].Requested); } - if(result.body[0].Selected != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ - throw new Error("wrong selected devive 0 " + result.body[0].Selected); - } + if ( + result.body[0].Selected != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong selected devive 0 ' + result.body[0].Selected); + } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length == 0) { - throw Error("booking not found") + throw Error('booking not found'); } - if (rows[0].status !== "active") { - throw new Error("Wrong status " + rows[0].status); + if (rows[0].status !== 'active') { + throw new Error('Wrong status ' + rows[0].status); } if (!fakeServerConfig.callback_test_local_single_was_called) { - throw new Error("callback not called"); + throw new Error('callback not called'); } } finally { db.end(); @@ -132,46 +150,61 @@ mocha.describe('operations.ts', function () { await db.connect(); try { - let result = await putBookingByIDLock(getFakeRequest(), { ID: "2" }); + let result = await putBookingByIDLock(getFakeRequest(), { ID: '2' }); await sleep(250); if (result.status != 200) { - throw new Error("wrong status " + result.status); + throw new Error('wrong status ' + result.status); } - if(result.body.length != 2){ - throw new Error("number of devices wrong "+ result.body.length); - } + if (result.body.length != 2) { + throw new Error('number of devices wrong ' + result.body.length); + } - if(result.body[0].Requested != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ - throw new Error("wrong requested devive 0 " + result.body[0].Requested); + if ( + result.body[0].Requested != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong requested devive 0 ' + result.body[0].Requested); } - if(result.body[0].Selected != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ - throw new Error("wrong selected devive 0 " + result.body[0].Selected); - } + if ( + result.body[0].Selected != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong selected devive 0 ' + result.body[0].Selected); + } - if(result.body[1].Requested != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"){ - throw new Error("wrong requested devive 0 " + result.body[1].Requested); + if ( + result.body[1].Requested != + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong requested devive 0 ' + result.body[1].Requested); } - if(result.body[1].Selected != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"){ - throw new Error("wrong selected devive 0 " + result.body[1].Selected); - } + if ( + result.body[1].Selected != + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong selected devive 0 ' + result.body[1].Selected); + } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(2)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(2)], + ); if (rows.length == 0) { - throw Error("booking not found") + throw Error('booking not found'); } - if (rows[0].status !== "active") { - throw new Error("Wrong status " + rows[0].status); + if (rows[0].status !== 'active') { + throw new Error('Wrong status ' + rows[0].status); } if (!fakeServerConfig.callback_test_local_two_first_was_called) { - throw new Error("callback not called"); + throw new Error('callback not called'); } if (!fakeServerConfig.callback_test_local_two_second_was_called) { - throw new Error("callback not called"); + throw new Error('callback not called'); } } finally { db.end(); @@ -183,35 +216,44 @@ mocha.describe('operations.ts', function () { await db.connect(); try { - let result = await putBookingByIDLock(getFakeRequest(), { ID: "3" }); + let result = await putBookingByIDLock(getFakeRequest(), { ID: '3' }); await sleep(250); if (result.status != 200) { - throw new Error("wrong status " + result.status); + throw new Error('wrong status ' + result.status); } - if(result.body.length != 1){ - throw new Error("number of devices wrong "+ result.body.length); - } + if (result.body.length != 1) { + throw new Error('number of devices wrong ' + result.body.length); + } - if(result.body[0].Requested != "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010"){ - throw new Error("wrong requested devive 0 " + result.body[0].Requested); + if ( + result.body[0].Requested != + 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000010' + ) { + throw new Error('wrong requested devive 0 ' + result.body[0].Requested); } - if(result.body[0].Selected != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"){ - throw new Error("wrong selected devive 0 " + result.body[0].Selected); - } + if ( + result.body[0].Selected != + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong selected devive 0 ' + result.body[0].Selected); + } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(3)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(3)], + ); if (rows.length == 0) { - throw Error("booking not found") + throw Error('booking not found'); } - if (rows[0].status !== "active") { - throw new Error("Wrong status " + rows[0].status); + if (rows[0].status !== 'active') { + throw new Error('Wrong status ' + rows[0].status); } if (!fakeServerConfig.callback_test_local_group_was_called) { - throw new Error("callback not called"); + throw new Error('callback not called'); } } finally { db.end(); @@ -223,32 +265,44 @@ mocha.describe('operations.ts', function () { await db.connect(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); - let result = await putBookingByIDLock(getFakeRequest(), { ID: "1" }); + await db.execute('UPDATE booking SET `status`=? WHERE `id`=?', [ + 'active', + BigInt(1), + ]); + let result = await putBookingByIDLock(getFakeRequest(), { ID: '1' }); await sleep(250); if (result.status != 200) { - throw new Error("wrong status " + result.status); + throw new Error('wrong status ' + result.status); } - if(result.body.length != 1){ - throw new Error("number of devices wrong "+ result.body.length); - } + if (result.body.length != 1) { + throw new Error('number of devices wrong ' + result.body.length); + } - if(result.body[0].Requested != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ - throw new Error("wrong requested devive 0 " + result.body[0].Requested); + if ( + result.body[0].Requested != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong requested devive 0 ' + result.body[0].Requested); } - if(result.body[0].Selected != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"){ - throw new Error("wrong selected devive 0 " + result.body[0].Selected); - } + if ( + result.body[0].Selected != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong selected devive 0 ' + result.body[0].Selected); + } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length == 0) { - throw Error("booking not found") + throw Error('booking not found'); } - if (rows[0].status !== "active") { - throw new Error("Wrong status " + rows[0].status); + if (rows[0].status !== 'active') { + throw new Error('Wrong status ' + rows[0].status); } } finally { db.end(); @@ -260,20 +314,26 @@ mocha.describe('operations.ts', function () { await db.connect(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["pending", BigInt(1)]); - let result = await putBookingByIDLock(getFakeRequest(), { ID: "1" }); + await db.execute('UPDATE booking SET `status`=? WHERE `id`=?', [ + 'pending', + BigInt(1), + ]); + let result = await putBookingByIDLock(getFakeRequest(), { ID: '1' }); await sleep(250); if (result.status != 412) { - throw new Error("wrong status " + result.status); + throw new Error('wrong status ' + result.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length == 0) { - throw Error("booking not found") + throw Error('booking not found'); } - if (rows[0].status !== "pending") { - throw new Error("Wrong status " + rows[0].status); + if (rows[0].status !== 'pending') { + throw new Error('Wrong status ' + rows[0].status); } } finally { db.end(); @@ -282,11 +342,14 @@ mocha.describe('operations.ts', function () { mocha.it('putBookingByIDLock no booking', async function () { try { - let res = await putBookingByIDLock(getFakeRequest({ user: "unittest.user", isAuthorized: true }), { ID: "999999999999999" }); - await sleep(250); - if(res.status != 404){ - throw new Error("wrong status " + res.status) - } + let res = await putBookingByIDLock( + getFakeRequest({ user: 'unittest.user', isAuthorized: true }), + { ID: '999999999999999' }, + ); + await sleep(250); + if (res.status != 404) { + throw new Error('wrong status ' + res.status); + } } finally { } }); @@ -294,19 +357,21 @@ mocha.describe('operations.ts', function () { mocha.it('deleteBookingByIDLock no authorization', async function () { let isError = false; try { - await deleteBookingByIDLock(getFakeRequest({ user: "badActor", isAuthorized: false }), { ID: "" }); + await deleteBookingByIDLock( + getFakeRequest({ user: 'badActor', isAuthorized: false }), + { ID: '' }, + ); await sleep(250); - } catch (err) { - if (err.message == "test authorization failed") { + if ((err as Error).message == 'test authorization failed') { isError = true; } else { - console.log(err.message); + console.log((err as Error).message); throw err; } } if (!isError) { - throw new Error("no access violation detected"); + throw new Error('no access violation detected'); } }); @@ -315,24 +380,30 @@ mocha.describe('operations.ts', function () { await db.connect(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); - let result = await deleteBookingByIDLock(getFakeRequest(), { ID: "1" }); + await db.execute('UPDATE booking SET `status`=? WHERE `id`=?', [ + 'active', + BigInt(1), + ]); + let result = await deleteBookingByIDLock(getFakeRequest(), { ID: '1' }); await sleep(250); if (result.status != 200) { - throw new Error("wrong status " + result.status); + throw new Error('wrong status ' + result.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length == 0) { - throw Error("booking not found") + throw Error('booking not found'); } - if (rows[0].status !== "booked") { - throw new Error("Wrong status " + rows[0].status); + if (rows[0].status !== 'booked') { + throw new Error('Wrong status ' + rows[0].status); } if (!fakeServerConfig.callback_test_local_single_was_called) { - throw new Error("callback not called"); + throw new Error('callback not called'); } } finally { db.end(); @@ -344,19 +415,22 @@ mocha.describe('operations.ts', function () { await db.connect(); try { - let result = await deleteBookingByIDLock(getFakeRequest(), { ID: "1" }); + let result = await deleteBookingByIDLock(getFakeRequest(), { ID: '1' }); await sleep(250); if (result.status != 200) { - throw new Error("wrong status " + result.status); + throw new Error('wrong status ' + result.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length == 0) { - throw Error("booking not found") + throw Error('booking not found'); } - if (rows[0].status !== "booked") { - throw new Error("Wrong status " + rows[0].status); + if (rows[0].status !== 'booked') { + throw new Error('Wrong status ' + rows[0].status); } } finally { db.end(); @@ -368,20 +442,26 @@ mocha.describe('operations.ts', function () { await db.connect(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["pending", BigInt(1)]); - let result = await deleteBookingByIDLock(getFakeRequest(), { ID: "1" }); + await db.execute('UPDATE booking SET `status`=? WHERE `id`=?', [ + 'pending', + BigInt(1), + ]); + let result = await deleteBookingByIDLock(getFakeRequest(), { ID: '1' }); await sleep(250); if (result.status != 412) { - throw new Error("wrong status " + result.status); + throw new Error('wrong status ' + result.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length == 0) { - throw Error("booking not found") + throw Error('booking not found'); } - if (rows[0].status !== "pending") { - throw new Error("Wrong status " + rows[0].status); + if (rows[0].status !== 'pending') { + throw new Error('Wrong status ' + rows[0].status); } } finally { db.end(); @@ -393,20 +473,26 @@ mocha.describe('operations.ts', function () { await db.connect(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active-pending", BigInt(1)]); - let result = await deleteBookingByIDLock(getFakeRequest(), { ID: "1" }); + await db.execute('UPDATE booking SET `status`=? WHERE `id`=?', [ + 'active-pending', + BigInt(1), + ]); + let result = await deleteBookingByIDLock(getFakeRequest(), { ID: '1' }); await sleep(250); if (result.status != 200) { - throw new Error("wrong status " + result.status); + throw new Error('wrong status ' + result.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length == 0) { - throw Error("booking not found") + throw Error('booking not found'); } - if (rows[0].status !== "pending") { - throw new Error("Wrong status " + rows[0].status); + if (rows[0].status !== 'pending') { + throw new Error('Wrong status ' + rows[0].status); } } finally { db.end(); @@ -415,11 +501,14 @@ mocha.describe('operations.ts', function () { mocha.it('deleteBookingByIDLock no booking', async function () { try { - let res = await deleteBookingByIDLock(getFakeRequest({ user: "unittest.user", isAuthorized: true }), { ID: "999999999999999" }); - await sleep(250); - if(res.status != 404){ - throw new Error("wrong status " + res.status) - } + let res = await deleteBookingByIDLock( + getFakeRequest({ user: 'unittest.user', isAuthorized: true }), + { ID: '999999999999999' }, + ); + await sleep(250); + if (res.status != 404) { + throw new Error('wrong status ' + res.status); + } } finally { } }); @@ -427,34 +516,39 @@ mocha.describe('operations.ts', function () { mocha.it('postBookingCallbackByID no authorization', async function () { let isError = false; try { - await postBookingCallbackByID(getFakeRequest({ user: "badActor", isAuthorized: false }), { ID: "" }); + await postBookingCallbackByID( + getFakeRequest({ user: 'badActor', isAuthorized: false }), + { ID: '' }, + ); await sleep(250); - } catch (err) { - if (err.message == "test authorization failed") { + if ((err as Error).message == 'test authorization failed') { isError = true; } else { - console.log(err.message); + console.log((err as Error).message); throw err; } } if (!isError) { - throw new Error("no access violation detected"); + throw new Error('no access violation detected'); } }); mocha.it('postBookingCallbackByID success', async function () { - await postBookingCallbackByID(getFakeRequest(), { ID: "1" }); - await sleep(250); + await postBookingCallbackByID(getFakeRequest(), { ID: '1' }); + await sleep(250); }); mocha.it('putBookingByIDLock no booking', async function () { try { - let res = await postBookingCallbackByID(getFakeRequest({ user: "unittest.user", isAuthorized: true }), { ID: "999999999999999" }); - await sleep(250); - if(res.status != 404){ - throw new Error("wrong status " + res.status) - } + let res = await postBookingCallbackByID( + getFakeRequest({ user: 'unittest.user', isAuthorized: true }), + { ID: '999999999999999' }, + ); + await sleep(250); + if (res.status != 404) { + throw new Error('wrong status ' + res.status); + } } finally { } }); diff --git a/services/booking/src/booking-backend/tsconfig.json b/services/booking/src/booking-backend/tsconfig.json index 61b5acc3..22df9194 100644 --- a/services/booking/src/booking-backend/tsconfig.json +++ b/services/booking/src/booking-backend/tsconfig.json @@ -1,13 +1,25 @@ { "compilerOptions": { - "module": "commonjs", - "moduleResolution": "Node", - "target": "ES2020", + "module": "Node16", + "moduleResolution": "Node16", + "allowSyntheticDefaultImports": true, + "target": "ES2022", + "lib": ["ES2022"], + "esModuleInterop": true, "outDir": "app", "rootDir": "src", - "declaration": true, - "declarationMap": true, + "strict": true, + "noImplicitAny": true, + // "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, "sourceMap": true, - "esModuleInterop": true - } + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "skipLibCheck": true, + "declaration": true, + "declarationMap": true + }, + "include": ["src"] } diff --git a/services/booking/src/booking-frontend/.env-cmdrc b/services/booking/src/booking-frontend/.env-cmdrc index 88810370..f26f6c9b 100644 --- a/services/booking/src/booking-frontend/.env-cmdrc +++ b/services/booking/src/booking-frontend/.env-cmdrc @@ -1,9 +1,6 @@ { - "development": { - "SECURITY_ISSUER": "http://localhost", - "SECURITY_AUDIENCE": "http://localhost", - "BASE_URL": "http://localhost", - "PORT": "3000", - "API_TOKEN": "booking-service-dev-token" - } -} \ No newline at end of file + "development": { + "BASE_URL": "http://localhost:10801", + "PORT": "10801" + } +} diff --git a/services/booking/src/booking-frontend/Dockerfile b/services/booking/src/booking-frontend/Dockerfile new file mode 100644 index 00000000..68f4f9c0 --- /dev/null +++ b/services/booking/src/booking-frontend/Dockerfile @@ -0,0 +1,17 @@ +# Build Image +FROM node:lts-alpine AS build +WORKDIR /tmp +COPY .packages /tmp/packages +RUN npm install --global /tmp/packages/* +RUN rm -rf /tmp/packages + +RUN apk add dumb-init +WORKDIR /app +RUN mkdir db +RUN chown node:node /app/* +USER node + +ENV NODE_ENV production +ENV PORT 3004 +EXPOSE 3004/tcp +CMD ["dumb-init", "crosslab-booking-frontend"] \ No newline at end of file diff --git a/services/booking/src/booking-frontend/api/component.yml b/services/booking/src/booking-frontend/api/component.yml index 1eb6a7cb..bdbbb3a9 100644 --- a/services/booking/src/booking-frontend/api/component.yml +++ b/services/booking/src/booking-frontend/api/component.yml @@ -10,6 +10,7 @@ summary: Books an experiment. x-optional-url: true requestBody: + required: true content: application/json: schema: diff --git a/services/booking/src/booking-frontend/package-lock.json b/services/booking/src/booking-frontend/package-lock.json index 07876700..ea5e80e1 100644 --- a/services/booking/src/booking-frontend/package-lock.json +++ b/services/booking/src/booking-frontend/package-lock.json @@ -11,10 +11,10 @@ "dependencies": { "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", - "@cross-lab-project/service-common": "file:../../../common", "@crosslab/booking-service-common": "file:../common", "@crosslab/booking-service-test-common": "file:../test_common", "@crosslab/service-booking-backend": "file:../booking-backend", + "@crosslab/service-common": "file:../../../common", "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "@types/express": "^4.17.13", @@ -25,16 +25,19 @@ "mysql2": "^3.6.0", "typescript": "^5.2.2" }, + "bin": { + "crosslab-booking-frontend": "app/index.js" + }, "devDependencies": { "@types/mocha": "^10.0.6", "c8": "^10.1.2", "env-cmd": "^10.1.0", "mocha": "^10.4.0", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3" } }, "../../../../helper/crosslab-typescript-addon": { - "name": "@cross-lab-project/codegen-typescript-addon", "license": "UNLICENSED", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", @@ -62,7 +65,6 @@ } }, "../../../../helper/openapi-codegeneration": { - "name": "@cross-lab-project/openapi-codegen", "license": "UNLICENSED", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", @@ -97,7 +99,6 @@ } }, "../../../common": { - "name": "@crosslab/service-common", "license": "UNLICENSED", "dependencies": { "express": "^4.18.1", @@ -126,21 +127,21 @@ } }, "../booking-backend": { - "name": "@crosslab/service-booking-backend", "version": "0.0.1", "license": "Apache-2.0", "dependencies": { "@cross-lab-project/api-client": "file:../../../../clients/api/js", "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", - "@cross-lab-project/service-common": "file:../../../common", "@crosslab/booking-service-common": "file:../common", "@crosslab/booking-service-test-common": "file:../test_common", + "@crosslab/service-common": "file:../../../common", "@crosslab/service-device-reservation": "file:../device-reservation", "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/amqplib": "^0.10.1", "@types/express": "^4.17.13", "@types/lodash": "^4.14.198", + "ajv-formats": "^3.0.1", "amqplib": "^0.10.2", "dayjs": "^1.11.5", "express": "^4.18.1", @@ -148,38 +149,47 @@ "mysql2": "^3.6.0", "typescript": "^5.2.2" }, + "bin": { + "crosslab-booking-backend": "app/index.js" + }, "devDependencies": { + "@types/express": "^4.17.13", "@types/mocha": "^10.0.0", "c8": "^10.1.2", "env-cmd": "^10.1.0", "mocha": "^10.0.0", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3", "why-is-node-running": "^2.2.2" } }, "../common": { - "name": "@crosslab/booking-service-common", "version": "0.0.1", "license": "Apache-2.0", "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0" + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/express": "^4.17.13", + "ajv-formats": "^3.0.1", + "express": "^4.18.1", + "node-fetch": "^3.3.2" }, "devDependencies": { + "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", + "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", + "@types/express": "^4.17.13", "@types/node": "^20.5.9", + "@types/node-fetch": "^2.6.4", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3", "typescript": "^5.2.2" } }, "../test_common": { - "name": "@crosslab/booking-service-test-common", "version": "0.0.1", "license": "Apache-2.0", "dependencies": { "@crosslab/booking-service-common": "file:../common", "@crosslab/service-device-reservation": "file:../device-reservation", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "@types/express": "^4.17.13", "amqplib": "^0.10.3", "dayjs": "^1.11.5", "express": "^4.18.1", @@ -187,6 +197,9 @@ "typescript": "^5.2.2" }, "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "@types/express": "^4.17.13", "node-mocks-http": "^1.14.1", "prettier": "^3.0.3" } @@ -241,11 +254,11 @@ } }, "node_modules/@babel/helper-environment-visitor/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.8.tgz", + "integrity": "sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -266,11 +279,11 @@ } }, "node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.8.tgz", + "integrity": "sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -290,11 +303,11 @@ } }, "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.8.tgz", + "integrity": "sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -314,11 +327,11 @@ } }, "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.8.tgz", + "integrity": "sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -327,9 +340,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", "engines": { "node": ">=6.9.0" } @@ -357,9 +370,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz", + "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==", "bin": { "parser": "bin/babel-parser.js" }, @@ -381,11 +394,11 @@ } }, "node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.8.tgz", + "integrity": "sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -414,11 +427,11 @@ } }, "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.8.tgz", + "integrity": "sha512-47DG+6F5SzOi0uEvK4wMShmn5yY0mVjVJoWTphdY2B4Rx9wHgjK7Yhtr0ru6nE+sn0v38mzrWOlah0p/YlHHOQ==", "dependencies": { - "@babel/types": "^7.24.7", + "@babel/types": "^7.24.8", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -428,11 +441,11 @@ } }, "node_modules/@babel/traverse/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.8.tgz", + "integrity": "sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -466,10 +479,6 @@ "resolved": "../../../../helper/openapi-codegeneration", "link": true }, - "node_modules/@cross-lab-project/service-common": { - "resolved": "../../../common", - "link": true - }, "node_modules/@crosslab/booking-service-common": { "resolved": "../common", "link": true @@ -482,6 +491,10 @@ "resolved": "../booking-backend", "link": true }, + "node_modules/@crosslab/service-common": { + "resolved": "../../../common", + "link": true + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -617,9 +630,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -699,9 +712,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.19.3", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz", - "integrity": "sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg==", + "version": "4.19.5", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz", + "integrity": "sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==", "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -726,15 +739,15 @@ "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/mocha": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", - "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", + "version": "10.0.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.7.tgz", + "integrity": "sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==", "dev": true }, "node_modules/@types/node": { - "version": "20.14.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", - "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "version": "20.14.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", + "integrity": "sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==", "dependencies": { "undici-types": "~5.26.4" } @@ -826,9 +839,9 @@ } }, "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "engines": { "node": ">=6" @@ -873,11 +886,64 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1049,16 +1115,10 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -1071,6 +1131,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -1111,6 +1174,12 @@ "node": ">= 6" } }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1187,6 +1256,57 @@ "node": ">= 8" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/dayjs": { "version": "1.11.11", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", @@ -1236,6 +1356,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/denque": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", @@ -1262,9 +1399,9 @@ } }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" @@ -1311,6 +1448,75 @@ "node": ">=8.0.0" } }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -1330,6 +1536,49 @@ "node": ">= 0.4" } }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -1505,10 +1754,19 @@ "flat": "cli.js" } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/foreground-child": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz", - "integrity": "sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", @@ -1565,6 +1823,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/generate-function": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", @@ -1600,6 +1885,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -1640,6 +1942,22 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -1651,6 +1969,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -1692,6 +2025,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -1712,6 +2060,12 @@ "he": "bin/he" } }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -1760,6 +2114,20 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -1768,16 +2136,123 @@ "node": ">= 0.10" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "dependencies": { - "binary-extensions": "^2.0.0" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-extglob": { @@ -1810,6 +2285,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -1819,6 +2306,21 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -1833,6 +2335,82 @@ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -1845,6 +2423,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -1914,16 +2504,13 @@ } }, "node_modules/jackspeak": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", - "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -1964,11 +2551,32 @@ "node": ">=4" } }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -2111,6 +2719,15 @@ "node": ">= 0.6" } }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -2155,9 +2772,9 @@ } }, "node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -2176,31 +2793,31 @@ } }, "node_modules/mocha": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", - "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", - "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "8.1.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.6.0.tgz", + "integrity": "sha512-hxjt4+EEB0SA0ZDygSS015t65lJw/I2yRCS3Ae+SJ5FrbzrXgfYwJr96f0OvIXdj7h4lv/vLCrH3rkiuizFSvw==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", @@ -2221,29 +2838,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/mocha/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -2305,9 +2899,9 @@ } }, "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "engines": { "node": ">=10" @@ -2319,9 +2913,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mysql2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.1.tgz", - "integrity": "sha512-6zo1T3GILsXMCex3YEu7hCz2OXLUarxFsxvFcUHWMpkPtmZLeTTWgRdc1gWyNJiYt6AxITmIf9bZDRy/jAfWew==", + "version": "3.10.2", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.2.tgz", + "integrity": "sha512-KCXPEvAkO0RcHPr362O5N8tFY2fXvbjfkPvRY/wGumh4EOemo9Hm5FjQZqv/pCmrnuxGu5OxnSENG0gTXqKMgQ==", "dependencies": { "denque": "^2.1.0", "generate-function": "^2.3.1", @@ -2374,6 +2968,33 @@ "node": ">= 0.6" } }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -2383,10 +3004,154 @@ "node": ">=0.10.0" } }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm-run-all/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm-run-all/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/npm-run-all/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm-run-all/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/npm-run-all/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2441,6 +3206,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -2467,6 +3251,12 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", @@ -2484,19 +3274,28 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, "engines": { - "node": "14 || >=16.14" + "node": ">=4" } }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" - }, "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", @@ -2514,6 +3313,36 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/prettier": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", @@ -2598,6 +3427,20 @@ "node": ">= 0.8" } }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/readable-stream": { "version": "1.1.14", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", @@ -2621,6 +3464,24 @@ "node": ">=8.10.0" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -2643,11 +3504,69 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -2712,9 +3631,9 @@ "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -2750,6 +3669,21 @@ "node": ">= 0.4" } }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -2776,6 +3710,15 @@ "node": ">=8" } }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", @@ -2813,6 +3756,38 @@ "node": ">=0.10.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true + }, "node_modules/sqlstring": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", @@ -2863,6 +3838,73 @@ "node": ">=8" } }, + "node_modules/string.prototype.padend": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz", + "integrity": "sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2888,6 +3930,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -2911,6 +3962,18 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/test-exclude": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", @@ -2926,31 +3989,29 @@ } }, "node_modules/test-exclude/node_modules/glob": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", - "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/test-exclude/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -3002,10 +4063,83 @@ "node": ">= 0.6" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3014,6 +4148,21 @@ "node": ">=14.17" } }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -3053,9 +4202,9 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -3066,6 +4215,16 @@ "node": ">=10.12.0" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -3089,10 +4248,45 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "node_modules/wrap-ansi": { diff --git a/services/booking/src/booking-frontend/package.json b/services/booking/src/booking-frontend/package.json index 50f9ceb6..28b0c440 100644 --- a/services/booking/src/booking-frontend/package.json +++ b/services/booking/src/booking-frontend/package.json @@ -1,13 +1,22 @@ { + "type": "module", "name": "@crosslab/service-booking-frontend", "version": "0.0.1", "description": "Part of booking service. Main service with which a user interacts.", "main": "app/index.js", + "dockerName": "booking-frontend", + "bin": { + "crosslab-booking-frontend": "./app/index.js" + }, + "files": [ + "app" + ], "scripts": { "test": "npm run build && env-cmd -e development c8 --include=\"app/operations/index.js\" mocha app/operations/*_test.js", "build:generate": "openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", "build:compile": "tsc && cp src/generated/basicValidation.cjs app/generated/basicValidation.cjs", - "build": "npm run build:generate && npm run build:compile", + "build:add-shebang": "bash scripts/add-shebang.sh", + "build": "npm-run-all build:*", "start": "npm run build && env-cmd -e development node app/index.js", "format": "prettier . --write", "lint": "eslint ." @@ -17,7 +26,7 @@ "dependencies": { "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", - "@cross-lab-project/service-common": "file:../../../common", + "@crosslab/service-common": "file:../../../common", "@crosslab/booking-service-common": "file:../common", "@crosslab/booking-service-test-common": "file:../test_common", "@crosslab/service-booking-backend": "file:../booking-backend", @@ -36,6 +45,7 @@ "c8": "^10.1.2", "env-cmd": "^10.1.0", "mocha": "^10.4.0", - "prettier": "^3.0.3" + "prettier": "^3.0.3", + "npm-run-all": "^4.1.5" } } diff --git a/services/booking/src/booking-frontend/scripts/add-shebang.sh b/services/booking/src/booking-frontend/scripts/add-shebang.sh new file mode 120000 index 00000000..1a5fdd47 --- /dev/null +++ b/services/booking/src/booking-frontend/scripts/add-shebang.sh @@ -0,0 +1 @@ +../../../../../common/node/scripts/add-shebang.sh \ No newline at end of file diff --git a/services/booking/src/booking-frontend/scripts/build-docker.sh b/services/booking/src/booking-frontend/scripts/build-docker.sh new file mode 120000 index 00000000..31019032 --- /dev/null +++ b/services/booking/src/booking-frontend/scripts/build-docker.sh @@ -0,0 +1 @@ +../../../../../common/docker/scripts/build-node.sh \ No newline at end of file diff --git a/services/booking/src/booking-frontend/scripts/test.sh b/services/booking/src/booking-frontend/scripts/test.sh new file mode 100755 index 00000000..2e5b18b7 --- /dev/null +++ b/services/booking/src/booking-frontend/scripts/test.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +npm ci +npm test \ No newline at end of file diff --git a/services/booking/src/booking-frontend/src/config.ts b/services/booking/src/booking-frontend/src/config.ts index f6fb4dab..f36dcde9 100644 --- a/services/booking/src/booking-frontend/src/config.ts +++ b/services/booking/src/booking-frontend/src/config.ts @@ -1,4 +1,4 @@ -import { baseConfig, die } from '@crosslab/booking-service-common'; +import { baseConfig } from '@crosslab/booking-service-common'; const PORT = parseInt(process.env.PORT ?? '3004'); const DEFAULT_BASE_URL = 'http://localhost:' + PORT; @@ -8,16 +8,10 @@ export const config = { PORT, BASE_URL: process.env.BASE_URL ?? DEFAULT_BASE_URL, JWKS_URL: process.env.JWKS_URL ?? 'http://localhost/.well-known/jwks.json', - SECURITY_ISSUER: - process.env.SECURITY_ISSUER ?? - die('the environment variable SECURITY_ISSUER is not defined!'), - SECURITY_AUDIENCE: - process.env.SECURITY_AUDIENCE ?? - die('the environment variable SECURITY_AUDIENCE is not defined!'), BookingDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, ReservationDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, CallbackDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, OwnURL: process.env.BASE_URL ?? DEFAULT_BASE_URL, - InstitutePrefix:[process.env.BASE_URL ?? DEFAULT_BASE_URL], - AmqpUrl: process.env.AMQP_URL ?? baseConfig.AmqpUrl, + InstitutePrefix: [process.env.BASE_URL ?? DEFAULT_BASE_URL], + AmqpUrl: process.env.AMQP_URL ?? baseConfig.AmqpUrl, }; diff --git a/services/booking/src/booking-frontend/src/index.ts b/services/booking/src/booking-frontend/src/index.ts index f37e0513..5427ec16 100644 --- a/services/booking/src/booking-frontend/src/index.ts +++ b/services/booking/src/booking-frontend/src/index.ts @@ -1,17 +1,18 @@ -import { authorization, error, logging } from '@cross-lab-project/service-common'; +import { authorization, error, logging } from '@crosslab/service-common'; import express from 'express'; -import { config } from './config'; -import { app } from './generated'; +import { config } from './config.js'; +import { app } from './generated/index.js'; if (require.main === module) { + logging.init(); app.initService({ preHandlers: [ application => { application.use(express.json()); application.use(express.urlencoded({ extended: false })); - application.use(logging.middleware()); - application.use(authorization.middleware()); + application.use(logging.middleware() as express.RequestHandler); + application.use(authorization.middleware() as express.RequestHandler); }, ], postHandlers: [ @@ -21,7 +22,7 @@ if (require.main === module) { }); }, ], - errorHandler: error.middleware, + errorHandler: error.middleware as express.ErrorRequestHandler, }); console.log('Starting booking-frontend'); diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index 2fa42988..738a3cda 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -1,399 +1,506 @@ -import { - Experiment, - Timeslot, - Booking, - Device -} from "../generated/types" -import { - postBookingSignature, - getBookingByIDSignature, - deleteBookingByIDSignature, - patchBookingByIDSignature, - deleteBookingByIDDestroySignature, - postBookingRequestBodyType, - getBookingByID200ResponseType -} from "../generated/signatures" - -import * as mysql from 'mysql2/promise'; +import { BelongsToUs, sleep } from '@crosslab/booking-service-common'; +import { DeviceBookingRequest } from '@crosslab/service-booking-backend'; import * as amqplib from 'amqplib'; -import dayjs from "dayjs"; +import dayjs from 'dayjs'; +import * as mysql from 'mysql2/promise'; -import { BelongsToUs, sleep } from "@crosslab/booking-service-common" -import { DeviceBookingRequest } from "@crosslab/service-booking-backend"; -import { config } from "../config" +import { config } from '../config.js'; +import { + deleteBookingByIDDestroySignature, + deleteBookingByIDSignature, + getBookingByID200ResponseType, + getBookingByIDSignature, + patchBookingByIDSignature, + postBookingSignature, +} from '../generated/signatures.js'; +import { Booking, Device, Experiment, Timeslot } from '../generated/types.js'; export const postBooking: postBookingSignature = async (request, body) => { - - await request.authorization.check_authorization_or_fail('create', `booking`); - - let connection = await amqplib.connect(config.AmqpUrl); - let channel = await connection.createChannel(); - - // Set default booking type if none was sent - if (body.Type === undefined) { - body.Type = "normal"; + await request.authorization.check_authorization_or_fail('create', `booking`); + + let connection = await amqplib.connect(config.AmqpUrl); + let channel = await connection.createChannel(); + + // Set default booking type if none was sent + if (body.Type === undefined) { + body.Type = 'normal'; + } + + await channel.assertQueue('device-booking', { + durable: true, + }); + + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + await db.beginTransaction(); + + try { + // Create booking + let [rows, fields]: [any, any] = await db.execute( + 'INSERT INTO booking (`start`, `end`, `type`, `status`, `user`) VALUES (?,?,?,?,?)', + [ + dayjs(body.Time.Start).toDate(), + dayjs(body.Time.End).toDate(), + body.Type, + 'pending', + request.authorization.user, + ], + ); + let bookingID: bigint = BigInt(rows.insertId); + + for (let i = 0; i < body.Devices.length; i++) { + await db.execute( + 'INSERT INTO bookeddevices (`booking`, `originaldevice`, `originalposition`) VALUES (?,?,?)', + [bookingID, body.Devices[i].ID, i], + ); + } + await db.commit(); + + await request.authorization.relate( + `user:${request.authorization.user}`, + 'owner', + `booking:${bookingID}`, + ); + + // Send devices to backend + for (let i = 0; i < body.Devices.length; i++) { + let s = JSON.stringify( + new DeviceBookingRequest( + bookingID, + new URL(body.Devices[i].ID), + i, + dayjs(body.Time.Start), + dayjs(body.Time.End), + ), + ); + if (!channel.sendToQueue('device-booking', Buffer.from(s), { persistent: true })) { + throw new Error('amqp queue full'); + } } - await channel.assertQueue("device-booking", { - durable: true - }); - - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - await db.beginTransaction(); - - try { - // Create booking - let [rows, fields]: [any, any] = await db.execute("INSERT INTO booking (`start`, `end`, `type`, `status`, `user`) VALUES (?,?,?,?,?)", [dayjs(body.Time.Start).toDate(), dayjs(body.Time.End).toDate(), body.Type, "pending", request.authorization.user]); - let bookingID: bigint = BigInt(rows.insertId); - - for (let i = 0; i < body.Devices.length; i++) { - await db.execute("INSERT INTO bookeddevices (`booking`, `originaldevice`, `originalposition`) VALUES (?,?,?)", [bookingID, body.Devices[i].ID, i]); - }; - await db.commit(); - - await request.authorization.relate(`user:${request.authorization.user}`, 'owner', `booking:${bookingID}`); - - // Send devices to backend - for (let i = 0; i < body.Devices.length; i++) { - let s = JSON.stringify(new DeviceBookingRequest(bookingID, new URL(body.Devices[i].ID), i, dayjs(body.Time.Start), dayjs(body.Time.End))); - if (!channel.sendToQueue("device-booking", Buffer.from(s), { persistent: true })) { - throw new Error("amqp queue full"); - } - } - - let r = new URL(config.OwnURL) - - return { - status: 200, - body: { - BookingID: r.origin + "/booking/" + bookingID.toString(), - } - } - } catch (err) { - await db.rollback(); + let r = new URL(config.OwnURL); - return { - status: 500, - body: err.toString(), - } - } finally { - await channel.close(); - await sleep(250); - await connection.close(); - db.end(); + return { + status: 200, + body: { + BookingID: r.origin + '/booking/' + bookingID.toString(), + }, }; + } catch (err) { + await db.rollback(); return { - status: 500, - body: "BUG: method reached end", - } -} + status: 500, + body: err.toString(), + }; + } finally { + await channel.close(); + await sleep(250); + await connection.close(); + db.end(); + } + + return { + status: 500, + body: 'BUG: method reached end', + }; +}; export const getBookingByID: getBookingByIDSignature = async (request, parameters) => { - let requestID: bigint = BigInt(parameters.ID) - - await request.authorization.check_authorization_or_fail('view', `booking:${requestID}`); - - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - await db.beginTransaction(); - - try { - let body: getBookingByID200ResponseType["body"] = { Booking: { ID: parameters.ID, Time: { Start: "", End: "" }, Devices: [], Type: "normal", You: false, External: false, Status: "pending", Message: "" }, Locked: false } - - // Read basic information - let [rows, fields]: [any, any] = await db.execute("SELECT `start`, `end`, `type`, `status`, `user`, `message` FROM booking WHERE id=?", [requestID]); - if (rows.length == 0) { - return { - status: 404, - }; - } - body.Booking.Time.Start = dayjs(rows[0].start).toISOString(); - body.Booking.Time.End = dayjs(rows[0].end).toISOString(); - body.Booking.Type = rows[0].type; - body.Booking.Status = rows[0].status; - body.Booking.You = rows[0].user == request.authorization.user; - body.Message = rows[0].message; - body.Locked = false; - if (body.Booking.Status === "active" || body.Booking.Status === "active-pending" || body.Booking.Status == "active-rejected") { - body.Locked = true; - } - - // Read devices - [rows, fields] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE booking=? ORDER BY `originalposition` ASC", [requestID]); - for (let i = 0; i < rows.length; i++) { - body.Booking.Devices.push(rows[i].originaldevice) - } - - return { - status: 200, - body: body - } - } catch (err) { - await db.rollback(); - db.end(); - - return { - status: 500, - body: err.toString(), - } - } finally { - await db.commit(); - db.end(); + let requestID: bigint = BigInt(parameters.ID); + + await request.authorization.check_authorization_or_fail('view', `booking:${requestID}`); + + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + await db.beginTransaction(); + + try { + let body: getBookingByID200ResponseType['body'] = { + Booking: { + ID: parameters.ID, + Time: { Start: '', End: '' }, + Devices: [], + Type: 'normal', + You: false, + External: false, + Status: 'pending', + Message: '', + }, + Locked: false, }; - return { - status: 500, - body: "BUG: method reached end", + // Read basic information + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `start`, `end`, `type`, `status`, `user`, `message` FROM booking WHERE id=?', + [requestID], + ); + if (rows.length == 0) { + return { + status: 404, + }; + } + body.Booking.Time.Start = dayjs(rows[0].start).toISOString(); + body.Booking.Time.End = dayjs(rows[0].end).toISOString(); + body.Booking.Type = rows[0].type; + body.Booking.Status = rows[0].status; + body.Booking.You = rows[0].user == request.authorization.user; + body.Message = rows[0].message; + body.Locked = false; + if ( + body.Booking.Status === 'active' || + body.Booking.Status === 'active-pending' || + body.Booking.Status == 'active-rejected' + ) { + body.Locked = true; } -} - -export const deleteBookingByID: deleteBookingByIDSignature = async (request, parameters) => { - let requestID: bigint = BigInt(parameters.ID); - - await request.authorization.check_authorization_or_fail('delete', `booking:${requestID}`); - - let [code, err] = await commonRemoveBooking(requestID); - // Typescript seems to have problems to infer body correctly with case 500. - // Therefore, the solution here is more complicated - if (code === 500) { - return { - status: code, - body: err ?? "No error", - } + // Read devices + [rows, fields] = await db.execute( + 'SELECT `originaldevice` FROM bookeddevices WHERE booking=? ORDER BY `originalposition` ASC', + [requestID], + ); + for (let i = 0; i < rows.length; i++) { + body.Booking.Devices.push(rows[i].originaldevice); } - // Since we keep the booking in the database, there is no need to unrelate the booking here. - // Students might check it later if someone else deleted it. + return { + status: 200, + body: body, + }; + } catch (err) { + await db.rollback(); + db.end(); return { - status: code, + status: 500, + body: err.toString(), + }; + } finally { + await db.commit(); + db.end(); + } + + return { + status: 500, + body: 'BUG: method reached end', + }; +}; + +export const deleteBookingByID: deleteBookingByIDSignature = async ( + request, + parameters, +) => { + let requestID: bigint = BigInt(parameters.ID); + + await request.authorization.check_authorization_or_fail( + 'delete', + `booking:${requestID}`, + ); + + let [code, err] = await commonRemoveBooking(requestID); + + // Typescript seems to have problems to infer body correctly with case 500. + // Therefore, the solution here is more complicated + if (code === 500) { + return { + status: code, + body: err ?? 'No error', + }; + } + + // Since we keep the booking in the database, there is no need to unrelate the booking here. + // Students might check it later if someone else deleted it. + + return { + status: code, + }; +}; + +export const patchBookingByID: patchBookingByIDSignature = async ( + request, + parameters, + body, +) => { + let requestID: bigint = BigInt(parameters.ID); + + await request.authorization.check_authorization_or_fail('edit', `booking:${requestID}`); + + let success: boolean = false; + + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + await db.beginTransaction(); + + try { + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status`, `user`,`start`,`end` FROM booking WHERE `id`=? FOR UPDATE', + [requestID], + ); + if (rows.length === 0) { + return { + status: 404, + }; } -} - -export const patchBookingByID: patchBookingByIDSignature = async (request, parameters, body) => { - let requestID: bigint = BigInt(parameters.ID); - - await request.authorization.check_authorization_or_fail('edit', `booking:${requestID}`); - - let success: boolean = false; - - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - await db.beginTransaction(); - try { - let [rows, fields]: [any, any] = await db.execute("SELECT `status`, `user`,`start`,`end` FROM booking WHERE `id`=? FOR UPDATE", [requestID]); - if (rows.length === 0) { + // if both are set, the request is invalid + if (typeof body.Callback === 'string' && typeof body.Devices !== 'undefined') { + return { + status: 400, + body: 'can not add callback and devices in one request', + }; + } else if (typeof body.Callback === 'string') { + // this is adding a callback + await db.execute('INSERT INTO bookingcallbacks (`booking`, `url`) VALUES (?,?)', [ + requestID, + body.Callback, + ]); + } else if (typeof body.Devices !== 'undefined') { + let Devices: Device[] = body.Devices as Device[]; + + // Set locked to default if not given + if (body.Locked == undefined) { + body.Locked = false; + } + + switch (body.Locked) { + case true: + if ( + rows[0].status !== 'active' && + rows[0].status !== 'active-rejected' && + rows[0].status !== 'active-pending' + ) { return { - status: 404, - } - } - - // if both are set, the request is invalid - if (typeof (body.Callback) === "string" && typeof (body.Devices) !== "undefined") { + status: 423, + }; + } + await db.execute('UPDATE booking SET `status`=? WHERE id=?', [ + 'active-pending', + requestID, + ]); + break; + case false: + if (rows[0].status !== 'booked' && rows[0].status !== 'pending') { return { - status: 400, - body: "can not add callback and devices in one request" - } - } else if (typeof (body.Callback) === "string") { - // this is adding a callback - await db.execute("INSERT INTO bookingcallbacks (`booking`, `url`) VALUES (?,?)", [requestID, body.Callback]); - } else if (typeof (body.Devices) !== "undefined") { - let Devices: Device[] = body.Devices as Device[]; - - // Set locked to default if not given - if(body.Locked == undefined){ - body.Locked = false; - } - - switch (body.Locked) { - case true: - if (rows[0].status !== "active" && rows[0].status !== "active-rejected" && rows[0].status !== "active-pending") { - return { - status: 423, - } - } - await db.execute("UPDATE booking SET `status`=? WHERE id=?", ["active-pending", requestID]); - break; - case false: - if (rows[0].status !== "booked" && rows[0].status !== "pending") { - return { - status: 423, - } - } - await db.execute("UPDATE booking SET `status`=? WHERE id=?", ["pending", requestID]); - break; - default: - throw Error("BUG: unknown status body.Locked: " + body.Locked); - break; - } - - let [deviceRows, deviceFields]: [any, any] = await db.execute("SELECT MAX(`originalposition`) as max FROM bookeddevices WHERE `booking`=?", [requestID]); - - let toadd: number = 0; - if (deviceRows.length != 0) { - toadd = deviceRows[0].max + 1; - } - - let start: string = rows[0].start; - let end: string = rows[0].end; - - let connection = await amqplib.connect(config.AmqpUrl); - let channel = await connection.createChannel(); - - await channel.assertQueue("device-booking", { - durable: true - }); - - try { - for (let i = 0; i < Devices.length; i++) { - await db.execute("INSERT INTO bookeddevices (`booking`, `originaldevice`, `originalposition`) VALUES (?,?,?)", [requestID, Devices[i].ID, i + toadd]); - }; - await db.commit(); - db.beginTransaction(); - - // Send devices to backend - for (let i = 0; i < Devices.length; i++) { - let s = JSON.stringify(new DeviceBookingRequest(requestID, new URL(Devices[i].ID), i + toadd, dayjs(start), dayjs(end))); - if (!channel.sendToQueue("device-booking", Buffer.from(s), { persistent: true })) { - throw new Error("amqp queue full"); - } - } - - } finally { - await channel.close(); - await await sleep(250); - await connection.close(); - } - } else { - throw Error("Unknown request type") + status: 423, + }; + } + await db.execute('UPDATE booking SET `status`=? WHERE id=?', [ + 'pending', + requestID, + ]); + break; + default: + throw Error('BUG: unknown status body.Locked: ' + body.Locked); + break; + } + + let [deviceRows, deviceFields]: [any, any] = await db.execute( + 'SELECT MAX(`originalposition`) as max FROM bookeddevices WHERE `booking`=?', + [requestID], + ); + + let toadd: number = 0; + if (deviceRows.length != 0) { + toadd = deviceRows[0].max + 1; + } + + let start: string = rows[0].start; + let end: string = rows[0].end; + + let connection = await amqplib.connect(config.AmqpUrl); + let channel = await connection.createChannel(); + + await channel.assertQueue('device-booking', { + durable: true, + }); + + try { + for (let i = 0; i < Devices.length; i++) { + await db.execute( + 'INSERT INTO bookeddevices (`booking`, `originaldevice`, `originalposition`) VALUES (?,?,?)', + [requestID, Devices[i].ID, i + toadd], + ); } + await db.commit(); + db.beginTransaction(); - - success = true; - } catch (err) { - return { - status: 500, - body: err.toString(), - } - } finally { - if (success) { - await db.commit(); - } else { - await db.rollback(); + // Send devices to backend + for (let i = 0; i < Devices.length; i++) { + let s = JSON.stringify( + new DeviceBookingRequest( + requestID, + new URL(Devices[i].ID), + i + toadd, + dayjs(start), + dayjs(end), + ), + ); + if ( + !channel.sendToQueue('device-booking', Buffer.from(s), { persistent: true }) + ) { + throw new Error('amqp queue full'); + } } - db.end(); - } - - let url = config.OwnURL; - if (!url.endsWith("/")) { - url = url + "/"; + } finally { + await channel.close(); + await await sleep(250); + await connection.close(); + } + } else { + throw Error('Unknown request type'); } - url = url + "booking/" + requestID; + success = true; + } catch (err) { return { - status: 200, - body: { - BookingID: url, - }, - } -} - -export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async (request, parameters) => { - let requestID: bigint = BigInt(parameters.ID); - - await request.authorization.check_authorization_or_fail('delete', `booking:${requestID}`); - - let [code, err] = await commonRemoveBooking(requestID) - // Typescript seems to have problems to infer body correctly with case 500. - // Therefore, the solution here is more complicated - if (code === 500) { - return { - status: code, - body: err ?? "No error", - } + status: 500, + body: err.toString(), + }; + } finally { + if (success) { + await db.commit(); + } else { + await db.rollback(); } - - // Since we keep the booking in the database, there is no need to unrelate the booking here. - // Students might check it later if someone else deleted it. - + db.end(); + } + + let url = config.OwnURL; + if (!url.endsWith('/')) { + url = url + '/'; + } + url = url + 'booking/' + requestID; + + return { + status: 200, + body: { + BookingID: url, + }, + }; +}; + +export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async ( + request, + parameters, +) => { + let requestID: bigint = BigInt(parameters.ID); + + await request.authorization.check_authorization_or_fail( + 'delete', + `booking:${requestID}`, + ); + + let [code, err] = await commonRemoveBooking(requestID); + // Typescript seems to have problems to infer body correctly with case 500. + // Therefore, the solution here is more complicated + if (code === 500) { return { - status: code, + status: code, + body: err ?? 'No error', + }; + } + + // Since we keep the booking in the database, there is no need to unrelate the booking here. + // Students might check it later if someone else deleted it. + + return { + status: code, + }; +}; + +export default { + postBooking, + getBookingByID, + deleteBookingByID, + patchBookingByID, + deleteBookingByIDDestroy, +}; + +async function commonRemoveBooking( + requestID: bigint, +): Promise<[404 | 200 | 423 | 500, string | null]> { + let success: boolean = false; + + let db = await mysql.createConnection(config.BookingDSN); + await db.connect(); + await db.beginTransaction(); + + try { + let [rows, fields]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=? FOR UPDATE', + [requestID], + ); + if (rows.length === 0) { + return [404, null]; } -} -export default { postBooking, getBookingByID, deleteBookingByID, patchBookingByID, deleteBookingByIDDestroy } - -async function commonRemoveBooking(requestID: bigint): Promise<[404 | 200 | 423 | 500, string | null]> { - let success: boolean = false; + switch (rows[0].status) { + case 'pending': + case 'booked': + // Everything ok + break; + case 'active-pending': + case 'active': + case 'active-rejected': + return [423, null]; + + case 'rejected': + case 'cancelled': + return [200, null]; + + default: + throw Error('BUG: unknown status ' + rows[0].status); + break; + } - let db = await mysql.createConnection(config.BookingDSN); - await db.connect(); - await db.beginTransaction(); + // delete booking + let connection = await amqplib.connect(config.AmqpUrl); + let channel = await connection.createChannel(); try { - let [rows, fields]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=? FOR UPDATE", [requestID]); - if (rows.length === 0) { - return [404, null]; + await channel.assertQueue('device-freeing', { + durable: true, + }); + + let [devicesRows, devicesFields]: [any, any] = await db.execute( + 'SELECT `id` FROM bookeddevices WHERE `booking`=? FOR UPDATE', + [requestID], + ); + for (let i = 0; i < devicesRows.length; i++) { + if ( + !channel.sendToQueue( + 'device-freeing', + Buffer.from(devicesRows[i].id.toString()), + { persistent: true }, + ) + ) { + throw new Error('amqp queue full'); } - - switch (rows[0].status) { - case "pending": - case "booked": - // Everything ok - break; - case "active-pending": - case "active": - case "active-rejected": - return [423, null]; - - case "rejected": - case "cancelled": - return [200, null]; - - default: - throw Error("BUG: unknown status " + rows[0].status); - break; - } - - // delete booking - let connection = await amqplib.connect(config.AmqpUrl); - let channel = await connection.createChannel(); - - try { - await channel.assertQueue("device-freeing", { - durable: true - }); - - let [devicesRows, devicesFields]: [any, any] = await db.execute("SELECT `id` FROM bookeddevices WHERE `booking`=? FOR UPDATE", [requestID]); - for (let i = 0; i < devicesRows.length; i++) { - if (!channel.sendToQueue("device-freeing", Buffer.from(devicesRows[i].id.toString()), { persistent: true })) { - throw new Error("amqp queue full"); - } - } - } finally { - await channel.close(); - await sleep(250); - await connection.close(); - } - - await db.execute("UPDATE booking SET `status`=?, `message`=? WHERE id=?", ["cancelled", "Cancelled by user", requestID]); - - success = true; - } catch (err) { - return [500, err.toString()]; + } } finally { - if (success) { - await db.commit(); - } else { - await db.rollback(); - } - db.end(); + await channel.close(); + await sleep(250); + await connection.close(); } + await db.execute('UPDATE booking SET `status`=?, `message`=? WHERE id=?', [ + 'cancelled', + 'Cancelled by user', + requestID, + ]); + + success = true; + } catch (err) { + return [500, err.toString()]; + } finally { + if (success) { + await db.commit(); + } else { + await db.rollback(); + } + db.end(); + } - return [200, null]; -} \ No newline at end of file + return [200, null]; +} diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index ed011c69..55c909cf 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -3,29 +3,44 @@ import { fakeServerConfig, getFakeInstitutePrefix, getFakeOwnURL, + getFakeRequest, getSQLDNS, resetFakeServerVars, setupDummySql, startFakeServer, stopFakeServer, tearDownDummySql, - getFakeRequest, } from '@crosslab/booking-service-test-common'; -import * as mocha from 'mocha'; +import * as amqplib from 'amqplib'; import dayjs, { Dayjs } from 'dayjs'; +import * as mocha from 'mocha'; import * as mysql from 'mysql2/promise'; -import * as amqplib from 'amqplib'; - -import { MapToString, ResetAMQPBookingDeviceCount, StartAMQPTestBooking, StopAMQPTestBooking, TestAMQPresultsBooking } from './indextest_helper_amqp_booking' -import { ResetAMQPDeviceCount, StartAMQPTestFree, StopAMQPTestFree, TestAMQPresults } from './indextest_helper_amqp_free' -import { postBooking, getBookingByID, deleteBookingByID, deleteBookingByIDDestroy, patchBookingByID } from './index'; -import { config } from '../config' +import { config } from '../config.js'; +import { + deleteBookingByID, + deleteBookingByIDDestroy, + getBookingByID, + patchBookingByID, + postBooking, +} from './index.js'; +import { + MapToString, + ResetAMQPBookingDeviceCount, + StartAMQPTestBooking, + StopAMQPTestBooking, + TestAMQPresultsBooking, +} from './indextest_helper_amqp_booking.js'; +import { + ResetAMQPDeviceCount, + StartAMQPTestFree, + StopAMQPTestFree, + TestAMQPresults, +} from './indextest_helper_amqp_free.js'; let connection: amqplib.Connection; let channel: amqplib.Channel; - mocha.describe('operations.ts', function () { this.timeout(10000); @@ -68,8 +83,8 @@ mocha.describe('operations.ts', function () { }); // Drain queues - while (await channel.get('device-booking', { noAck: true })) { } - while (await channel.get('device-freeing', { noAck: true })) { } + while (await channel.get('device-booking', { noAck: true })) {} + while (await channel.get('device-freeing', { noAck: true })) {} }); mocha.afterEach(async function () { @@ -92,21 +107,29 @@ mocha.describe('operations.ts', function () { await StartAMQPTestBooking(); try { // Count number of bookings - let [rows, _]: [any, any] = await db.execute("SELECT count(*) AS n FROM booking"); + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM booking'); if (rows.length !== 1) { - throw new Error("internal error: wrong number of rows" + rows.length); + throw new Error('internal error: wrong number of rows' + rows.length); } let before: number = rows[0].n; // Try booking - let isError: boolean = false + let isError: boolean = false; - let req = getFakeRequest({ user: "badactor", isAuthorized: false }); + let req = getFakeRequest({ user: 'badactor', isAuthorized: false }); try { - await postBooking(req, { Time: { Start: dayjs("2000-01-01T07:00Z").toISOString(), End: dayjs("2000-01-01T08:00Z").toISOString() }, Devices: [{ ID: "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000" }] }); + await postBooking(req, { + Time: { + Start: dayjs('2000-01-01T07:00Z').toISOString(), + End: dayjs('2000-01-01T08:00Z').toISOString(), + }, + Devices: [ + { ID: 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' }, + ], + }); } catch (err) { - if (err.message == "test authorization failed") { + if (err.message == 'test authorization failed') { isError = true; } else { console.log(err.message); @@ -116,22 +139,29 @@ mocha.describe('operations.ts', function () { await sleep(250); if (!isError) { - throw new Error("no access violation detected"); + throw new Error('no access violation detected'); } // Ensure number has not changed - [rows, _] = await db.execute("SELECT count(*) AS n FROM booking"); + [rows, _] = await db.execute('SELECT count(*) AS n FROM booking'); if (rows.length !== 1) { - throw new Error("internal error: wrong number of rows" + rows.length); + throw new Error('internal error: wrong number of rows' + rows.length); } if (Number(rows[0].n) != Number(before)) { - throw new Error("authorization failed but number of bookings was changed from " + before + " to " + rows[0].n); + throw new Error( + 'authorization failed but number of bookings was changed from ' + + before + + ' to ' + + rows[0].n, + ); } - if (req.related.length != 0) { - throw new Error("related not empty:" + req.related.toString()); + if ((req as any).related.length != 0) { + throw new Error('related not empty:' + (req as any).related.toString()); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("device reservation messages found " + MapToString(TestAMQPresultsBooking)); + throw new Error( + 'device reservation messages found ' + MapToString(TestAMQPresultsBooking), + ); } } finally { db.end(); @@ -146,103 +176,145 @@ mocha.describe('operations.ts', function () { await StartAMQPTestBooking(); try { // Count number of bookings - let [rows, _]: [any, any] = await db.execute("SELECT count(*) AS n FROM booking"); + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM booking'); if (rows.length !== 1) { - throw new Error("internal error: wrong number of rows" + rows.length); + throw new Error('internal error: wrong number of rows' + rows.length); } let before: number = rows[0].n; // Try booking - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); - let result = await postBooking(req, { Time: { Start: dayjs("2000-01-01T07:00Z").toISOString(), End: dayjs("2000-01-01T08:00Z").toISOString() }, Devices: [{ ID: "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000" }] }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); + let result = await postBooking(req, { + Time: { + Start: dayjs('2000-01-01T07:00Z').toISOString(), + End: dayjs('2000-01-01T08:00Z').toISOString(), + }, + Devices: [ + { ID: 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' }, + ], + }); await sleep(250); if (result.status != 200) { - throw new Error("Booking failed with status " + result.status + " " + result.body); + throw new Error( + 'Booking failed with status ' + result.status + ' ' + result.body, + ); } // Ensure number has increased by one - [rows, _] = await db.execute("SELECT count(*) AS n FROM booking"); + [rows, _] = await db.execute('SELECT count(*) AS n FROM booking'); if (rows.length !== 1) { - throw new Error("internal error: wrong number of rows" + rows.length); + throw new Error('internal error: wrong number of rows' + rows.length); } if (Number(rows[0].n) != Number(before) + 1) { - throw new Error("number of bookings was changed from " + before + " to " + rows[0].n); + throw new Error( + 'number of bookings was changed from ' + before + ' to ' + rows[0].n, + ); } - let split = result.body.BookingID.split("/"); + let split = result.body.BookingID.split('/'); let bookingID: bigint = BigInt(split[split.length - 1]); - [rows, _] = await db.execute("SELECT `start`,`end`,`type`,`user` FROM booking WHERE `id`=?", [bookingID]); + [rows, _] = await db.execute( + 'SELECT `start`,`end`,`type`,`user` FROM booking WHERE `id`=?', + [bookingID], + ); if (rows.length !== 1) { - throw new Error("wrong number of rows: " + rows.length); + throw new Error('wrong number of rows: ' + rows.length); } - if (!dayjs(rows[0].start).isSame(dayjs("2000-01-01T07:00Z"))) { - throw new Error("wrong start " + rows[0].start); + if (!dayjs(rows[0].start).isSame(dayjs('2000-01-01T07:00Z'))) { + throw new Error('wrong start ' + rows[0].start); } - if (!dayjs(rows[0].end).isSame(dayjs("2000-01-01T08:00Z"))) { - throw new Error("wrong end " + rows[0].end); + if (!dayjs(rows[0].end).isSame(dayjs('2000-01-01T08:00Z'))) { + throw new Error('wrong end ' + rows[0].end); } - if (rows[0].type != "normal") { - throw new Error("wrong type " + rows[0].type); + if (rows[0].type != 'normal') { + throw new Error('wrong type ' + rows[0].type); } - if (rows[0].user != "unittest.user") { - throw new Error("wrong user " + rows[0].user); + if (rows[0].user != 'unittest.user') { + throw new Error('wrong user ' + rows[0].user); } - if (req.related.length != 1) { - throw new Error("wrong number of related" + req.related); + if ((req as any).related.length != 1) { + throw new Error('wrong number of related' + (req as any).related); } - if (req.related[0][0] != "user:unittest.user") { - throw new Error("wrong related user " + req.related); + if ((req as any).related[0][0] != 'user:unittest.user') { + throw new Error('wrong related user ' + (req as any).related); } - if (req.related[0][1] != "owner") { - throw new Error("wrong related relationship " + req.related); + if ((req as any).related[0][1] != 'owner') { + throw new Error('wrong related relationship ' + (req as any).related); } - if (req.related[0][2] != `booking:${bookingID}`) { - throw new Error("wrong related user " + req.related); + if ((req as any).related[0][2] != `booking:${bookingID}`) { + throw new Error('wrong related user ' + (req as any).related); } - if (req.unrelated.length != 0) { - throw new Error("wrong number of related" + req.unrelated); + if ((req as any).unrelated.length != 0) { + throw new Error('wrong number of related' + (req as any).unrelated); } // bookeddevices - [rows, _] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE booking=?", [bookingID]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE booking=?', + [bookingID], + ); if (rows.length !== 1) { - throw new Error("internal error: wrong number of rows" + rows.length); + throw new Error('internal error: wrong number of rows' + rows.length); } if (Number(rows[0].n) != 1) { - throw new Error("number of booked devices is wrong: " + rows[0].n); + throw new Error('number of booked devices is wrong: ' + rows[0].n); } - [rows, _] = await db.execute("SELECT originaldevice FROM bookeddevices WHERE booking=? AND originalposition=?", [bookingID, 0]); + [rows, _] = await db.execute( + 'SELECT originaldevice FROM bookeddevices WHERE booking=? AND originalposition=?', + [bookingID, 0], + ); if (rows.length !== 1) { - throw new Error("found " + rows.length + " devices for position 0"); + throw new Error('found ' + rows.length + ' devices for position 0'); } - if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong original device " + rows[0].originaldevice); + if ( + rows[0].originaldevice !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong original device ' + rows[0].originaldevice); } // AMQP if (TestAMQPresultsBooking.size != 1) { - throw new Error("wrong number of device reservation messages found " + MapToString(TestAMQPresultsBooking)); - } - if (!TestAMQPresultsBooking.has(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000")) { - throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresultsBooking)); - } - if (TestAMQPresultsBooking.get(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") !== 1) { - throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresultsBooking)); + throw new Error( + 'wrong number of device reservation messages found ' + + MapToString(TestAMQPresultsBooking), + ); + } + if ( + !TestAMQPresultsBooking.has( + bookingID.toString() + + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + ) + ) { + throw new Error( + 'wrong device reservation messages found' + MapToString(TestAMQPresultsBooking), + ); + } + if ( + TestAMQPresultsBooking.get( + bookingID.toString() + + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + ) !== 1 + ) { + throw new Error( + 'wrong device reservation message number found' + + MapToString(TestAMQPresultsBooking), + ); } } finally { db.end(); @@ -257,118 +329,182 @@ mocha.describe('operations.ts', function () { await StartAMQPTestBooking(); try { // Count number of bookings - let [rows, _]: [any, any] = await db.execute("SELECT count(*) AS n FROM booking"); + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM booking'); if (rows.length !== 1) { - throw new Error("internal error: wrong number of rows" + rows.length); + throw new Error('internal error: wrong number of rows' + rows.length); } let before: number = rows[0].n; // Try booking - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); - let result = await postBooking(req, { Time: { Start: dayjs("2000-01-01T07:00Z").toISOString(), End: dayjs("2000-01-01T08:00Z").toISOString() }, Devices: [{ ID: "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000" }, { ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010" }] }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); + let result = await postBooking(req, { + Time: { + Start: dayjs('2000-01-01T07:00Z').toISOString(), + End: dayjs('2000-01-01T08:00Z').toISOString(), + }, + Devices: [ + { ID: 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' }, + { ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000010' }, + ], + }); await sleep(250); if (result.status != 200) { - throw new Error("Booking failed with status " + result.status + " " + result.body); + throw new Error( + 'Booking failed with status ' + result.status + ' ' + result.body, + ); } // Ensure number has increased by one - [rows, _] = await db.execute("SELECT count(*) AS n FROM booking"); + [rows, _] = await db.execute('SELECT count(*) AS n FROM booking'); if (rows.length !== 1) { - throw new Error("internal error: wrong number of rows" + rows.length); + throw new Error('internal error: wrong number of rows' + rows.length); } if (Number(rows[0].n) != Number(before) + 1) { - throw new Error("number of bookings was changed from " + before + " to " + rows[0].n); + throw new Error( + 'number of bookings was changed from ' + before + ' to ' + rows[0].n, + ); } - let split = result.body.BookingID.split("/"); + let split = result.body.BookingID.split('/'); let bookingID: bigint = BigInt(split[split.length - 1]); - [rows, _] = await db.execute("SELECT `start`,`end`,`type`,`user` FROM booking WHERE `id`=?", [bookingID]); + [rows, _] = await db.execute( + 'SELECT `start`,`end`,`type`,`user` FROM booking WHERE `id`=?', + [bookingID], + ); if (rows.length !== 1) { - throw new Error("wrong number of rows: " + rows.length); + throw new Error('wrong number of rows: ' + rows.length); } - if (!dayjs(rows[0].start).isSame(dayjs("2000-01-01T07:00Z"))) { - throw new Error("wrong start " + rows[0].start); + if (!dayjs(rows[0].start).isSame(dayjs('2000-01-01T07:00Z'))) { + throw new Error('wrong start ' + rows[0].start); } - if (!dayjs(rows[0].end).isSame(dayjs("2000-01-01T08:00Z"))) { - throw new Error("wrong end " + rows[0].end); + if (!dayjs(rows[0].end).isSame(dayjs('2000-01-01T08:00Z'))) { + throw new Error('wrong end ' + rows[0].end); } - if (rows[0].type != "normal") { - throw new Error("wrong type " + rows[0].type); + if (rows[0].type != 'normal') { + throw new Error('wrong type ' + rows[0].type); } - if (rows[0].user != "unittest.user") { - throw new Error("wrong user " + rows[0].user); + if (rows[0].user != 'unittest.user') { + throw new Error('wrong user ' + rows[0].user); } - if (req.related.length != 1) { - throw new Error("wrong number of related" + req.related); + if ((req as any).related.length != 1) { + throw new Error('wrong number of related' + (req as any).related); } - if (req.related[0][0] != "user:unittest.user") { - throw new Error("wrong related user " + req.related); + if ((req as any).related[0][0] != 'user:unittest.user') { + throw new Error('wrong related user ' + (req as any).related); } - if (req.related[0][1] != "owner") { - throw new Error("wrong related relationship " + req.related); + if ((req as any).related[0][1] != 'owner') { + throw new Error('wrong related relationship ' + (req as any).related); } - if (req.related[0][2] != `booking:${bookingID}`) { - throw new Error("wrong related user " + req.related); + if ((req as any).related[0][2] != `booking:${bookingID}`) { + throw new Error('wrong related user ' + (req as any).related); } - if (req.unrelated.length != 0) { - throw new Error("wrong number of related" + req.unrelated); + if ((req as any).unrelated.length != 0) { + throw new Error('wrong number of related' + (req as any).unrelated); } // bookeddevices - [rows, _] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE booking=?", [bookingID]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE booking=?', + [bookingID], + ); if (rows.length !== 1) { - throw new Error("internal error: wrong number of rows" + rows.length); + throw new Error('internal error: wrong number of rows' + rows.length); } if (Number(rows[0].n) != 2) { - throw new Error("number of booked devices is wrong: " + rows[0].n); + throw new Error('number of booked devices is wrong: ' + rows[0].n); } - [rows, _] = await db.execute("SELECT originaldevice FROM bookeddevices WHERE booking=? AND originalposition=?", [bookingID, 0]); + [rows, _] = await db.execute( + 'SELECT originaldevice FROM bookeddevices WHERE booking=? AND originalposition=?', + [bookingID, 0], + ); if (rows.length !== 1) { - throw new Error("found " + rows.length + " devices for position 0"); + throw new Error('found ' + rows.length + ' devices for position 0'); } - if (rows[0].originaldevice !== "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong original device " + rows[0].originaldevice); + if ( + rows[0].originaldevice !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong original device ' + rows[0].originaldevice); } - [rows, _] = await db.execute("SELECT originaldevice FROM bookeddevices WHERE booking=? AND originalposition=?", [bookingID, 1]); + [rows, _] = await db.execute( + 'SELECT originaldevice FROM bookeddevices WHERE booking=? AND originalposition=?', + [bookingID, 1], + ); if (rows.length !== 1) { - throw new Error("found " + rows.length + " devices for position 0"); + throw new Error('found ' + rows.length + ' devices for position 0'); } - if (rows[0].originaldevice !== "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") { - throw new Error("wrong original device " + rows[0].originaldevice); + if ( + rows[0].originaldevice !== + 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000010' + ) { + throw new Error('wrong original device ' + rows[0].originaldevice); } // AMQP if (TestAMQPresultsBooking.size != 2) { - throw new Error("wrong number of device reservation messages found " + MapToString(TestAMQPresultsBooking)); - } - if (!TestAMQPresultsBooking.has(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000")) { - throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresultsBooking)); - } - if (TestAMQPresultsBooking.get(bookingID.toString() + "-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") !== 1) { - throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresultsBooking)); - } - if (!TestAMQPresultsBooking.has(bookingID.toString() + "-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010")) { - throw new Error("wrong device reservation messages found" + MapToString(TestAMQPresultsBooking)); - } - if (TestAMQPresultsBooking.get(bookingID.toString() + "-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") !== 1) { - throw new Error("wrong device reservation message number found" + MapToString(TestAMQPresultsBooking)); + throw new Error( + 'wrong number of device reservation messages found ' + + MapToString(TestAMQPresultsBooking), + ); + } + if ( + !TestAMQPresultsBooking.has( + bookingID.toString() + + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + ) + ) { + throw new Error( + 'wrong device reservation messages found' + MapToString(TestAMQPresultsBooking), + ); + } + if ( + TestAMQPresultsBooking.get( + bookingID.toString() + + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + ) !== 1 + ) { + throw new Error( + 'wrong device reservation message number found' + + MapToString(TestAMQPresultsBooking), + ); + } + if ( + !TestAMQPresultsBooking.has( + bookingID.toString() + + '-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010', + ) + ) { + throw new Error( + 'wrong device reservation messages found' + MapToString(TestAMQPresultsBooking), + ); + } + if ( + TestAMQPresultsBooking.get( + bookingID.toString() + + '-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010', + ) !== 1 + ) { + throw new Error( + 'wrong device reservation message number found' + + MapToString(TestAMQPresultsBooking), + ); } } finally { db.end(); @@ -377,18 +513,16 @@ mocha.describe('operations.ts', function () { } }); - - mocha.it('getBookingByID authorization failed', async function () { try { - let isError: boolean = false + let isError: boolean = false; - let req = getFakeRequest({ user: "badactor", isAuthorized: false }); + let req = getFakeRequest({ user: 'badactor', isAuthorized: false }); try { - await getBookingByID(req, { ID: "1" }); + await getBookingByID(req, { ID: '1' }); } catch (err) { - if (err.message == "test authorization failed") { + if (err.message == 'test authorization failed') { isError = true; } else { console.log(err.message); @@ -398,7 +532,7 @@ mocha.describe('operations.ts', function () { await sleep(250); if (!isError) { - throw new Error("no access violation detected"); + throw new Error('no access violation detected'); } } finally { } @@ -406,55 +540,58 @@ mocha.describe('operations.ts', function () { mocha.it('getBookingByID success single (creator)', async function () { try { - let req = getFakeRequest({ user: "test", isAuthorized: true }); - let b = await getBookingByID(req, { ID: "1" }); + let req = getFakeRequest({ user: 'test', isAuthorized: true }); + let b = await getBookingByID(req, { ID: '1' }); if (b.status !== 200) { - throw new Error("bad status code" + b.status); + throw new Error('bad status code' + b.status); } if (b.body.Locked) { - throw new Error("booking is locked"); + throw new Error('booking is locked'); } - if (b.body.Booking.ID != "1") { - throw new Error("bad id" + b.body.Booking.ID); + if (b.body.Booking.ID != '1') { + throw new Error('bad id' + b.body.Booking.ID); } if (!b.body.Booking.You) { - throw new Error("you is not set") + throw new Error('you is not set'); } if (b.body.Booking.External) { - throw new Error("booking is external"); + throw new Error('booking is external'); } - if (b.body.Booking.Status != "booked") { - throw new Error("wrong status" + b.body.Booking.Status); + if (b.body.Booking.Status != 'booked') { + throw new Error('wrong status' + b.body.Booking.Status); } if (b.body.Booking.Devices.length != 1) { - throw new Error("wrong number of devices " + b.body.Booking.Devices.length); + throw new Error('wrong number of devices ' + b.body.Booking.Devices.length); } - if (b.body.Booking.Devices[0] != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); + if ( + b.body.Booking.Devices[0] != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong device 0 ' + b.body.Booking.Devices[0]); } if (!dayjs('1999-01-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))) { - throw new Error("wrong start " + b.body.Booking.Time.Start); + throw new Error('wrong start ' + b.body.Booking.Time.Start); } if (dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start) { - throw new Error("start is no iso " + b.body.Booking.Time.Start); + throw new Error('start is no iso ' + b.body.Booking.Time.Start); } if (!dayjs('1999-01-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))) { - throw new Error("wrong end " + b.body.Booking.Time.End); + throw new Error('wrong end ' + b.body.Booking.Time.End); } if (dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End) { - throw new Error("end is no iso " + b.body.Booking.Time.End); + throw new Error('end is no iso ' + b.body.Booking.Time.End); } } finally { } @@ -462,55 +599,58 @@ mocha.describe('operations.ts', function () { mocha.it('getBookingByID success single (not creator)', async function () { try { - let req = getFakeRequest({ user: "not_test", isAuthorized: true }); - let b = await getBookingByID(req, { ID: "1" }); + let req = getFakeRequest({ user: 'not_test', isAuthorized: true }); + let b = await getBookingByID(req, { ID: '1' }); if (b.status !== 200) { - throw new Error("bad status code" + b.status); + throw new Error('bad status code' + b.status); } if (b.body.Locked) { - throw new Error("booking is locked"); + throw new Error('booking is locked'); } - if (b.body.Booking.ID != "1") { - throw new Error("bad id" + b.body.Booking.ID); + if (b.body.Booking.ID != '1') { + throw new Error('bad id' + b.body.Booking.ID); } if (b.body.Booking.You) { - throw new Error("you is set") + throw new Error('you is set'); } if (b.body.Booking.External) { - throw new Error("booking is external"); + throw new Error('booking is external'); } - if (b.body.Booking.Status != "booked") { - throw new Error("wrong status" + b.body.Booking.Status); + if (b.body.Booking.Status != 'booked') { + throw new Error('wrong status' + b.body.Booking.Status); } if (b.body.Booking.Devices.length != 1) { - throw new Error("wrong number of devices " + b.body.Booking.Devices.length); + throw new Error('wrong number of devices ' + b.body.Booking.Devices.length); } - if (b.body.Booking.Devices[0] != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); + if ( + b.body.Booking.Devices[0] != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong device 0 ' + b.body.Booking.Devices[0]); } if (!dayjs('1999-01-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))) { - throw new Error("wrong start " + b.body.Booking.Time.Start); + throw new Error('wrong start ' + b.body.Booking.Time.Start); } if (dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start) { - throw new Error("start is no iso " + b.body.Booking.Time.Start); + throw new Error('start is no iso ' + b.body.Booking.Time.Start); } if (!dayjs('1999-01-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))) { - throw new Error("wrong end " + b.body.Booking.Time.End); + throw new Error('wrong end ' + b.body.Booking.Time.End); } if (dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End) { - throw new Error("end is no iso " + b.body.Booking.Time.End); + throw new Error('end is no iso ' + b.body.Booking.Time.End); } } finally { } @@ -518,59 +658,65 @@ mocha.describe('operations.ts', function () { mocha.it('getBookingByID success multiple (creator)', async function () { try { - let req = getFakeRequest({ user: "test", isAuthorized: true }); - let b = await getBookingByID(req, { ID: "2" }); + let req = getFakeRequest({ user: 'test', isAuthorized: true }); + let b = await getBookingByID(req, { ID: '2' }); if (b.status !== 200) { - throw new Error("bad status code" + b.status); + throw new Error('bad status code' + b.status); } if (b.body.Locked) { - throw new Error("booking is locked"); + throw new Error('booking is locked'); } - if (b.body.Booking.ID != "2") { - throw new Error("bad id" + b.body.Booking.ID); + if (b.body.Booking.ID != '2') { + throw new Error('bad id' + b.body.Booking.ID); } if (!b.body.Booking.You) { - throw new Error("you is not set") + throw new Error('you is not set'); } if (b.body.Booking.External) { - throw new Error("booking is external"); + throw new Error('booking is external'); } - if (b.body.Booking.Status != "booked") { - throw new Error("wrong status" + b.body.Booking.Status); + if (b.body.Booking.Status != 'booked') { + throw new Error('wrong status' + b.body.Booking.Status); } if (b.body.Booking.Devices.length != 2) { - throw new Error("wrong number of devices " + b.body.Booking.Devices.length); + throw new Error('wrong number of devices ' + b.body.Booking.Devices.length); } - if (b.body.Booking.Devices[0] != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); + if ( + b.body.Booking.Devices[0] != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong device 0 ' + b.body.Booking.Devices[0]); } - if (b.body.Booking.Devices[1] != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { - throw new Error("wrong device 1 " + b.body.Booking.Devices[1]); + if ( + b.body.Booking.Devices[1] != + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong device 1 ' + b.body.Booking.Devices[1]); } if (!dayjs('1999-02-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))) { - throw new Error("wrong start " + b.body.Booking.Time.Start); + throw new Error('wrong start ' + b.body.Booking.Time.Start); } if (dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start) { - throw new Error("start is no iso " + b.body.Booking.Time.Start); + throw new Error('start is no iso ' + b.body.Booking.Time.Start); } if (!dayjs('1999-02-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))) { - throw new Error("wrong end " + b.body.Booking.Time.End); + throw new Error('wrong end ' + b.body.Booking.Time.End); } if (dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End) { - throw new Error("end is no iso " + b.body.Booking.Time.End); + throw new Error('end is no iso ' + b.body.Booking.Time.End); } } finally { } @@ -578,55 +724,58 @@ mocha.describe('operations.ts', function () { mocha.it('getBookingByID success group (creator)', async function () { try { - let req = getFakeRequest({ user: "test", isAuthorized: true }); - let b = await getBookingByID(req, { ID: "3" }); + let req = getFakeRequest({ user: 'test', isAuthorized: true }); + let b = await getBookingByID(req, { ID: '3' }); if (b.status !== 200) { - throw new Error("bad status code" + b.status); + throw new Error('bad status code' + b.status); } if (b.body.Locked) { - throw new Error("booking is locked"); + throw new Error('booking is locked'); } - if (b.body.Booking.ID != "3") { - throw new Error("bad id" + b.body.Booking.ID); + if (b.body.Booking.ID != '3') { + throw new Error('bad id' + b.body.Booking.ID); } if (!b.body.Booking.You) { - throw new Error("you is not set") + throw new Error('you is not set'); } if (b.body.Booking.External) { - throw new Error("booking is external"); + throw new Error('booking is external'); } - if (b.body.Booking.Status != "booked") { - throw new Error("wrong status" + b.body.Booking.Status); + if (b.body.Booking.Status != 'booked') { + throw new Error('wrong status' + b.body.Booking.Status); } if (b.body.Booking.Devices.length != 1) { - throw new Error("wrong number of devices " + b.body.Booking.Devices.length); + throw new Error('wrong number of devices ' + b.body.Booking.Devices.length); } - if (b.body.Booking.Devices[0] != "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") { - throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); + if ( + b.body.Booking.Devices[0] != + 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000010' + ) { + throw new Error('wrong device 0 ' + b.body.Booking.Devices[0]); } if (!dayjs('1999-03-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))) { - throw new Error("wrong start " + b.body.Booking.Time.Start); + throw new Error('wrong start ' + b.body.Booking.Time.Start); } if (dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start) { - throw new Error("start is no iso " + b.body.Booking.Time.Start); + throw new Error('start is no iso ' + b.body.Booking.Time.Start); } if (!dayjs('1999-03-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))) { - throw new Error("wrong end " + b.body.Booking.Time.End); + throw new Error('wrong end ' + b.body.Booking.Time.End); } if (dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End) { - throw new Error("end is no iso " + b.body.Booking.Time.End); + throw new Error('end is no iso ' + b.body.Booking.Time.End); } } finally { } @@ -636,57 +785,63 @@ mocha.describe('operations.ts', function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); + await db.execute('UPDATE booking SET `status`=? WHERE `id`=?', [ + 'active', + BigInt(1), + ]); - let req = getFakeRequest({ user: "test", isAuthorized: true }); - let b = await getBookingByID(req, { ID: "1" }); + let req = getFakeRequest({ user: 'test', isAuthorized: true }); + let b = await getBookingByID(req, { ID: '1' }); if (b.status !== 200) { - throw new Error("bad status code" + b.status); + throw new Error('bad status code' + b.status); } if (!b.body.Locked) { - throw new Error("booking is not locked"); + throw new Error('booking is not locked'); } - if (b.body.Booking.ID != "1") { - throw new Error("bad id" + b.body.Booking.ID); + if (b.body.Booking.ID != '1') { + throw new Error('bad id' + b.body.Booking.ID); } if (!b.body.Booking.You) { - throw new Error("you is not set") + throw new Error('you is not set'); } if (b.body.Booking.External) { - throw new Error("booking is external"); + throw new Error('booking is external'); } - if (b.body.Booking.Status != "active") { - throw new Error("wrong status" + b.body.Booking.Status); + if (b.body.Booking.Status != 'active') { + throw new Error('wrong status' + b.body.Booking.Status); } if (b.body.Booking.Devices.length != 1) { - throw new Error("wrong number of devices " + b.body.Booking.Devices.length); + throw new Error('wrong number of devices ' + b.body.Booking.Devices.length); } - if (b.body.Booking.Devices[0] != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong device 0 " + b.body.Booking.Devices[0]); + if ( + b.body.Booking.Devices[0] != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong device 0 ' + b.body.Booking.Devices[0]); } if (!dayjs('1999-01-10T06:00:00Z').isSame(dayjs(b.body.Booking.Time.Start))) { - throw new Error("wrong start " + b.body.Booking.Time.Start); + throw new Error('wrong start ' + b.body.Booking.Time.Start); } if (dayjs(b.body.Booking.Time.Start).toISOString() != b.body.Booking.Time.Start) { - throw new Error("start is no iso " + b.body.Booking.Time.Start); + throw new Error('start is no iso ' + b.body.Booking.Time.Start); } if (!dayjs('1999-01-10T07:00:00Z').isSame(dayjs(b.body.Booking.Time.End))) { - throw new Error("wrong end " + b.body.Booking.Time.End); + throw new Error('wrong end ' + b.body.Booking.Time.End); } if (dayjs(b.body.Booking.Time.End).toISOString() != b.body.Booking.Time.End) { - throw new Error("end is no iso " + b.body.Booking.Time.End); + throw new Error('end is no iso ' + b.body.Booking.Time.End); } } finally { db.end(); @@ -694,29 +849,27 @@ mocha.describe('operations.ts', function () { }); mocha.it('getBookingByID booking not available', async function () { - let req = getFakeRequest({ user: "test", isAuthorized: true }); - let b = await getBookingByID(req, { ID: "99999999" }); + let req = getFakeRequest({ user: 'test', isAuthorized: true }); + let b = await getBookingByID(req, { ID: '99999999' }); if (b.status !== 404) { - throw new Error("bad status code" + b.status); + throw new Error('bad status code' + b.status); } }); - - mocha.it('deleteBookingByID authorization failed', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); await StartAMQPTestFree(); try { - let isError: boolean = false + let isError: boolean = false; - let req = getFakeRequest({ user: "badactor", isAuthorized: false }); + let req = getFakeRequest({ user: 'badactor', isAuthorized: false }); try { - await deleteBookingByID(req, { ID: "1" }); + await deleteBookingByID(req, { ID: '1' }); } catch (err) { - if (err.message == "test authorization failed") { + if (err.message == 'test authorization failed') { isError = true; } else { console.log(err.message); @@ -726,20 +879,23 @@ mocha.describe('operations.ts', function () { await sleep(250); if (!isError) { - throw new Error("no access violation detected"); + throw new Error('no access violation detected'); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "booked") { - throw new Error("booking was deleted (status=" + rows[0].status + ")"); + if (rows[0].status != 'booked') { + throw new Error('booking was deleted (status=' + rows[0].status + ')'); } if (TestAMQPresults.size != 0) { - throw new Error("freed devices found " + MapToString(TestAMQPresults)); + throw new Error('freed devices found ' + MapToString(TestAMQPresults)); } } finally { db.end(); @@ -753,39 +909,43 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestFree(); try { - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); - let res = await deleteBookingByID(req, { ID: "1" }); + let res = await deleteBookingByID(req, { ID: '1' }); await sleep(250); if (res.status != 200) { if (res.status == 500) { throw new Error(res.body); } - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "cancelled") { - throw new Error("booking was not deleted (status=" + rows[0].status + ")"); + if (rows[0].status != 'cancelled') { + throw new Error('booking was not deleted (status=' + rows[0].status + ')'); } if (TestAMQPresults.size != 1) { - throw new Error("wrong number of freed devices found " + MapToString(TestAMQPresults)); + throw new Error( + 'wrong number of freed devices found ' + MapToString(TestAMQPresults), + ); } if (!TestAMQPresults.has(BigInt(1))) { - throw new Error("device not freed " + MapToString(TestAMQPresults)) + throw new Error('device not freed ' + MapToString(TestAMQPresults)); } if (Number(TestAMQPresults.get(BigInt(1))) != 1) { - throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + throw new Error('wrong number of free messages ' + MapToString(TestAMQPresults)); } - } finally { db.end(); await StopAMQPTestFree(); @@ -798,45 +958,50 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestFree(); try { - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); - let res = await deleteBookingByID(req, { ID: "2" }); + let res = await deleteBookingByID(req, { ID: '2' }); await sleep(250); if (res.status != 200) { if (res.status == 500) { throw new Error(res.body); } - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(2)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(2)], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "cancelled") { - throw new Error("booking was not deleted (status=" + rows[0].status + ")"); + if (rows[0].status != 'cancelled') { + throw new Error('booking was not deleted (status=' + rows[0].status + ')'); } if (TestAMQPresults.size != 2) { - throw new Error("wrong number of freed devices found " + MapToString(TestAMQPresults)); + throw new Error( + 'wrong number of freed devices found ' + MapToString(TestAMQPresults), + ); } if (!TestAMQPresults.has(BigInt(2))) { - throw new Error("device not freed " + MapToString(TestAMQPresults)) + throw new Error('device not freed ' + MapToString(TestAMQPresults)); } if (Number(TestAMQPresults.get(BigInt(2))) != 1) { - throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + throw new Error('wrong number of free messages ' + MapToString(TestAMQPresults)); } if (!TestAMQPresults.has(BigInt(3))) { - throw new Error("device not freed " + MapToString(TestAMQPresults)) + throw new Error('device not freed ' + MapToString(TestAMQPresults)); } if (Number(TestAMQPresults.get(BigInt(3))) != 1) { - throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + throw new Error('wrong number of free messages ' + MapToString(TestAMQPresults)); } } finally { db.end(); @@ -846,41 +1011,46 @@ mocha.describe('operations.ts', function () { }); mocha.it('deleteBookingByID booking not available', async function () { - let req = getFakeRequest({ user: "test", isAuthorized: true }); - let b = await deleteBookingByID(req, { ID: "99999999" }); + let req = getFakeRequest({ user: 'test', isAuthorized: true }); + let b = await deleteBookingByID(req, { ID: '99999999' }); if (b.status !== 404) { - throw new Error("bad status code" + b.status); + throw new Error('bad status code' + b.status); } }); - mocha.it('deleteBookingByID wrong status', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); await StartAMQPTestFree(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); + await db.execute('UPDATE booking SET `status`=? WHERE `id`=?', [ + 'active', + BigInt(1), + ]); - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); - let res = await deleteBookingByID(req, { ID: "1" }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); + let res = await deleteBookingByID(req, { ID: '1' }); await sleep(250); if (res.status != 423) { - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "active") { - throw new Error("booking was deleted (status=" + rows[0].status + ")"); + if (rows[0].status != 'active') { + throw new Error('booking was deleted (status=' + rows[0].status + ')'); } if (TestAMQPresults.size != 0) { - throw new Error("freed devices found " + MapToString(TestAMQPresults)); + throw new Error('freed devices found ' + MapToString(TestAMQPresults)); } } finally { db.end(); @@ -889,22 +1059,23 @@ mocha.describe('operations.ts', function () { } }); - - - mocha.it('patchBookingByID authorization failed callback', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); await StartAMQPTestBooking(); try { - let isError: boolean = false + let isError: boolean = false; - let req = getFakeRequest({ user: "badactor", isAuthorized: false }); + let req = getFakeRequest({ user: 'badactor', isAuthorized: false }); try { - await patchBookingByID(req, { ID: "1" }, { Callback: "http://localhost:10801/test_callbacks/callback-test-new" }); + await patchBookingByID( + req, + { ID: '1' }, + { Callback: 'http://localhost:10801/test_callbacks/callback-test-new' }, + ); } catch (err) { - if (err.message == "test authorization failed") { + if (err.message == 'test authorization failed') { isError = true; } else { console.log(err.message); @@ -914,38 +1085,46 @@ mocha.describe('operations.ts', function () { await sleep(250); if (!isError) { - throw new Error("no access violation detected"); + throw new Error('no access violation detected'); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); } - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } if (rows[0].n != 1) { - throw new Error("found " + rows[0].status + " bookeddevices"); + throw new Error('found ' + rows[0].status + ' bookeddevices'); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "booked") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'booked') { + throw new Error('wrong status ' + rows[0].status); } } finally { db.end(); @@ -959,49 +1138,61 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestBooking(); try { - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); - let res = await patchBookingByID(req, { ID: "1" }, { Callback: "http://localhost:10801/test_callbacks/callback-test-new" }); + let res = await patchBookingByID( + req, + { ID: '1' }, + { Callback: 'http://localhost:10801/test_callbacks/callback-test-new' }, + ); await sleep(250); if (res.status != 200) { - throw new Error("bad status code " + res.status); + throw new Error('bad status code ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT `booking` FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `booking` FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length == 0) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows.length > 1) { - throw new Error("number of rows too many " + rows.length); + throw new Error('number of rows too many ' + rows.length); } if (rows[0].booking != 1n) { - throw new Error("wrong booking id " + rows[0].bookingcallbacks); + throw new Error('wrong booking id ' + rows[0].bookingcallbacks); } // Check devices haven't changed - [rows, _] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?", [BigInt(1)]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); if (rows.length == 0) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } if (rows[0].n > 1) { - throw new Error("number of bookeddevices wrong " + rows[0].n); + throw new Error('number of bookeddevices wrong ' + rows[0].n); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "booked") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'booked') { + throw new Error('wrong status ' + rows[0].status); } } finally { db.end(); @@ -1015,51 +1206,69 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestBooking(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); - - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Callback: "http://localhost:10801/test_callbacks/callback-test-new", Locked: true }); + await db.execute('UPDATE booking SET `status`=? WHERE `id`=?', [ + 'active', + BigInt(1), + ]); + + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Callback: 'http://localhost:10801/test_callbacks/callback-test-new', + Locked: true, + }, + ); await sleep(250); if (res.status != 200) { - throw new Error("bad status code " + res.status); + throw new Error('bad status code ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT `booking` FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `booking` FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length == 0) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows.length > 1) { - throw new Error("number of rows too many " + rows.length); + throw new Error('number of rows too many ' + rows.length); } if (rows[0].booking != 1n) { - throw new Error("wrong booking id " + rows[0].bookingcallbacks); + throw new Error('wrong booking id ' + rows[0].bookingcallbacks); } // Check devices haven't changed - [rows, _] = await db.execute("SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?", [BigInt(1)]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); if (rows.length == 0) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } if (rows[0].n > 1) { - throw new Error("number of bookeddevices wrong " + rows[0].n); + throw new Error('number of bookeddevices wrong ' + rows[0].n); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "active") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'active') { + throw new Error('wrong status ' + rows[0].status); } } finally { db.end(); @@ -1073,35 +1282,44 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestBooking(); try { - let req = getFakeRequest({ user: "user.unittest.", isAuthorized: true }); + let req = getFakeRequest({ user: 'user.unittest.', isAuthorized: true }); - let res = await patchBookingByID(req, { ID: "999999999999" }, { Callback: "http://localhost:10801/test_callbacks/callback-test-new" }); + let res = await patchBookingByID( + req, + { ID: '999999999999' }, + { Callback: 'http://localhost:10801/test_callbacks/callback-test-new' }, + ); await sleep(250); if (res.status != 404) { - throw new Error("bad status code " + res.status); + throw new Error('bad status code ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "booked") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'booked') { + throw new Error('wrong status ' + rows[0].status); } } finally { db.end(); @@ -1115,71 +1333,115 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestBooking(); try { - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }] }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' }, + ], + }, + ); await sleep(250); if (res.status != 200) { - throw new Error("bad status code " + res.status); + throw new Error('bad status code ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } if (rows[0].n != 2) { - throw new Error("found " + rows[0].status + " bookeddevices"); + throw new Error('found ' + rows[0].status + ' bookeddevices'); } - [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 0]); + [rows, _] = await db.execute( + 'SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?', + [BigInt(1), 0], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } - if (rows[0].originaldevice != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong originaldevice " + rows[0].originaldevice); + if ( + rows[0].originaldevice != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong originaldevice ' + rows[0].originaldevice); } - [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 1]); + [rows, _] = await db.execute( + 'SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?', + [BigInt(1), 1], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } - if (rows[0].originaldevice != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { - throw new Error("wrong originaldevice " + rows[0].originaldevice); + if ( + rows[0].originaldevice != + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong originaldevice ' + rows[0].originaldevice); } if (TestAMQPresultsBooking.size != 1) { - throw new Error("wrong number devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error( + 'wrong number devices were requested ' + MapToString(TestAMQPresultsBooking), + ); } - if (!TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) { - throw new Error("wrong devices were requested " + MapToString(TestAMQPresultsBooking)); + if ( + !TestAMQPresultsBooking.has( + '1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + ) + ) { + throw new Error( + 'wrong devices were requested ' + MapToString(TestAMQPresultsBooking), + ); } - if (Number(TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) != 1) { - throw new Error("wrong device number were requested " + MapToString(TestAMQPresultsBooking)); + if ( + Number( + TestAMQPresultsBooking.has( + '1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + ), + ) != 1 + ) { + throw new Error( + 'wrong device number were requested ' + MapToString(TestAMQPresultsBooking), + ); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "pending") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'pending') { + throw new Error('wrong status ' + rows[0].status); } // No new callbacks - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } } finally { db.end(); @@ -1193,87 +1455,152 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestBooking(); try { - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }, { ID: "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010" }] }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' }, + { ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000010' }, + ], + }, + ); await sleep(250); if (res.status != 200) { - throw new Error("bad status code " + res.status); + throw new Error('bad status code ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } if (rows[0].n != 3) { - throw new Error("found " + rows[0].status + " bookeddevices"); + throw new Error('found ' + rows[0].status + ' bookeddevices'); } - [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 0]); + [rows, _] = await db.execute( + 'SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?', + [BigInt(1), 0], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } - if (rows[0].originaldevice != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong originaldevice " + rows[0].originaldevice); + if ( + rows[0].originaldevice != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong originaldevice ' + rows[0].originaldevice); } - [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 1]); + [rows, _] = await db.execute( + 'SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?', + [BigInt(1), 1], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } - if (rows[0].originaldevice != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { - throw new Error("wrong originaldevice " + rows[0].originaldevice); + if ( + rows[0].originaldevice != + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong originaldevice ' + rows[0].originaldevice); } - [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 2]); + [rows, _] = await db.execute( + 'SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?', + [BigInt(1), 2], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } - if (rows[0].originaldevice != "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010") { - throw new Error("wrong originaldevice " + rows[0].originaldevice); + if ( + rows[0].originaldevice != + 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000010' + ) { + throw new Error('wrong originaldevice ' + rows[0].originaldevice); } if (TestAMQPresultsBooking.size != 2) { - throw new Error("wrong number devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error( + 'wrong number devices were requested ' + MapToString(TestAMQPresultsBooking), + ); } - if (!TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) { - throw new Error("wrong devices were requested " + MapToString(TestAMQPresultsBooking)); + if ( + !TestAMQPresultsBooking.has( + '1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + ) + ) { + throw new Error( + 'wrong devices were requested ' + MapToString(TestAMQPresultsBooking), + ); } - if (Number(TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) != 1) { - throw new Error("wrong device number were requested " + MapToString(TestAMQPresultsBooking)); + if ( + Number( + TestAMQPresultsBooking.has( + '1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + ), + ) != 1 + ) { + throw new Error( + 'wrong device number were requested ' + MapToString(TestAMQPresultsBooking), + ); } - if (!TestAMQPresultsBooking.has("1-2-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010")) { - throw new Error("wrong devices were requested " + MapToString(TestAMQPresultsBooking)); + if ( + !TestAMQPresultsBooking.has( + '1-2-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010', + ) + ) { + throw new Error( + 'wrong devices were requested ' + MapToString(TestAMQPresultsBooking), + ); } - if (Number(TestAMQPresultsBooking.has("1-2-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010")) != 1) { - throw new Error("wrong device number were requested " + MapToString(TestAMQPresultsBooking)); + if ( + Number( + TestAMQPresultsBooking.has( + '1-2-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010', + ), + ) != 1 + ) { + throw new Error( + 'wrong device number were requested ' + MapToString(TestAMQPresultsBooking), + ); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "pending") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'pending') { + throw new Error('wrong status ' + rows[0].status); } // No new callbacks - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } } finally { db.end(); @@ -1287,45 +1614,61 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestBooking(); try { - - let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], Locked: true }); + let req = getFakeRequest({ user: 'user.unittest', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' }, + ], + Locked: true, + }, + ); await sleep(250); if (res.status != 423) { - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } if (rows[0].n != 1) { - throw new Error("found " + rows[0].status + " bookeddevices"); + throw new Error('found ' + rows[0].status + ' bookeddevices'); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "booked") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'booked') { + throw new Error('wrong status ' + rows[0].status); } } finally { db.end(); @@ -1339,73 +1682,121 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestBooking(); try { - await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); - - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], Locked: true }); + await db.execute('UPDATE `booking` SET `status`=? WHERE `id`=?', [ + 'active', + BigInt(1), + ]); + + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' }, + ], + Locked: true, + }, + ); await sleep(250); if (res.status != 200) { - throw new Error("bad status code " + res.status); + throw new Error('bad status code ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } if (rows[0].n != 2) { - throw new Error("found " + rows[0].status + " bookeddevices"); + throw new Error('found ' + rows[0].status + ' bookeddevices'); } - [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 0]); + [rows, _] = await db.execute( + 'SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?', + [BigInt(1), 0], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } - if (rows[0].originaldevice != "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000") { - throw new Error("wrong originaldevice " + rows[0].originaldevice); + if ( + rows[0].originaldevice != + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong originaldevice ' + rows[0].originaldevice); } - [rows, _] = await db.execute("SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?", [BigInt(1), 1]); + [rows, _] = await db.execute( + 'SELECT `originaldevice` FROM bookeddevices WHERE `booking` = ? AND `originalposition`=?', + [BigInt(1), 1], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } - if (rows[0].originaldevice != "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000") { - throw new Error("wrong originaldevice " + rows[0].originaldevice); + if ( + rows[0].originaldevice != + 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong originaldevice ' + rows[0].originaldevice); } if (TestAMQPresultsBooking.size != 1) { - throw new Error("wrong number devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error( + 'wrong number devices were requested ' + MapToString(TestAMQPresultsBooking), + ); } - if (!TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) { - throw new Error("wrong devices were requested " + MapToString(TestAMQPresultsBooking)); + if ( + !TestAMQPresultsBooking.has( + '1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + ) + ) { + throw new Error( + 'wrong devices were requested ' + MapToString(TestAMQPresultsBooking), + ); } - if (Number(TestAMQPresultsBooking.has("1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000")) != 1) { - throw new Error("wrong device number were requested " + MapToString(TestAMQPresultsBooking)); + if ( + Number( + TestAMQPresultsBooking.has( + '1-1-http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + ), + ) != 1 + ) { + throw new Error( + 'wrong device number were requested ' + MapToString(TestAMQPresultsBooking), + ); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "active-pending") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'active-pending') { + throw new Error('wrong status ' + rows[0].status); } // No new callbacks - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } } finally { db.end(); @@ -1419,46 +1810,65 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestBooking(); try { - await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); - - let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], }); // no Locked here + await db.execute('UPDATE `booking` SET `status`=? WHERE `id`=?', [ + 'active', + BigInt(1), + ]); + + let req = getFakeRequest({ user: 'user.unittest', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' }, + ], + }, + ); // no Locked here await sleep(250); if (res.status != 423) { - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } if (rows[0].n != 1) { - throw new Error("found " + rows[0].status + " bookeddevices"); + throw new Error('found ' + rows[0].status + ' bookeddevices'); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "active") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'active') { + throw new Error('wrong status ' + rows[0].status); } } finally { db.end(); @@ -1472,35 +1882,48 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestBooking(); try { - let req = getFakeRequest({ user: "user.unittest.", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "999999999999" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }] }); + let req = getFakeRequest({ user: 'user.unittest.', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '999999999999' }, + { + Devices: [ + { ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' }, + ], + }, + ); await sleep(250); if (res.status != 404) { - throw new Error("bad status code " + res.status); + throw new Error('bad status code ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "booked") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'booked') { + throw new Error('wrong status ' + rows[0].status); } } finally { db.end(); @@ -1509,262 +1932,386 @@ mocha.describe('operations.ts', function () { } }); - mocha.it('patchBookingByID wrong status unlocked devices (cancelled)', async function () { - let db = await mysql.createConnection(getSQLDNS()); - await db.connect(); - await StartAMQPTestBooking(); - try { - await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["cancelled", BigInt(1)]); - - let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], }); - await sleep(250); - - if (res.status != 423) { - throw new Error("wrong status " + res.status); - } - - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); - if (rows.length !== 1) { - throw new Error("can not find booking"); - } - - if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); - } - - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); - if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); - } - - if (rows[0].n != 1) { - throw new Error("found " + rows[0].status + " bookeddevices"); - } - - if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); - } - - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); - if (rows.length !== 1) { - throw new Error("can not find booking"); - } - - if (rows[0].status != "cancelled") { - throw new Error("wrong status " + rows[0].status); - } - } finally { - db.end(); - await StopAMQPTestBooking(); - ResetAMQPBookingDeviceCount(); - } - }); - - mocha.it('patchBookingByID wrong status unlocked devices (rejected)', async function () { - let db = await mysql.createConnection(getSQLDNS()); - await db.connect(); - await StartAMQPTestBooking(); - try { - await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["rejected", BigInt(1)]); - - let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], }); - await sleep(250); - - if (res.status != 423) { - throw new Error("wrong status " + res.status); - } + mocha.it( + 'patchBookingByID wrong status unlocked devices (cancelled)', + async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute('UPDATE `booking` SET `status`=? WHERE `id`=?', [ + 'cancelled', + BigInt(1), + ]); + + let req = getFakeRequest({ user: 'user.unittest', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { + ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + }, + ], + }, + ); + await sleep(250); + + if (res.status != 423) { + throw new Error('wrong status ' + res.status); + } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); - if (rows.length !== 1) { - throw new Error("can not find booking"); - } + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); + if (rows.length !== 1) { + throw new Error('can not find booking'); + } - if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); - } + if (rows[0].n != 0) { + throw new Error('found ' + rows[0].status + ' new callbacks'); + } - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); - if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); - } + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); + if (rows.length !== 1) { + throw new Error('can not find bookeddevices'); + } - if (rows[0].n != 1) { - throw new Error("found " + rows[0].status + " bookeddevices"); - } + if (rows[0].n != 1) { + throw new Error('found ' + rows[0].status + ' bookeddevices'); + } - if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); - } + if (TestAMQPresultsBooking.size != 0) { + throw new Error( + 'devices were requested ' + MapToString(TestAMQPresultsBooking), + ); + } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); - if (rows.length !== 1) { - throw new Error("can not find booking"); - } + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); + if (rows.length !== 1) { + throw new Error('can not find booking'); + } - if (rows[0].status != "rejected") { - throw new Error("wrong status " + rows[0].status); - } - } finally { - db.end(); - await StopAMQPTestBooking(); - ResetAMQPBookingDeviceCount(); - } - }); + if (rows[0].status != 'cancelled') { + throw new Error('wrong status ' + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }, + ); + + mocha.it( + 'patchBookingByID wrong status unlocked devices (rejected)', + async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute('UPDATE `booking` SET `status`=? WHERE `id`=?', [ + 'rejected', + BigInt(1), + ]); + + let req = getFakeRequest({ user: 'user.unittest', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { + ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + }, + ], + }, + ); + await sleep(250); + + if (res.status != 423) { + throw new Error('wrong status ' + res.status); + } - mocha.it('patchBookingByID wrong status unlocked devices (active-pending)', async function () { - let db = await mysql.createConnection(getSQLDNS()); - await db.connect(); - await StartAMQPTestBooking(); - try { - await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["active-pending", BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); + if (rows.length !== 1) { + throw new Error('can not find booking'); + } - let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); + if (rows[0].n != 0) { + throw new Error('found ' + rows[0].status + ' new callbacks'); + } - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], }); - await sleep(250); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); + if (rows.length !== 1) { + throw new Error('can not find bookeddevices'); + } - if (res.status != 423) { - throw new Error("wrong status " + res.status); - } + if (rows[0].n != 1) { + throw new Error('found ' + rows[0].status + ' bookeddevices'); + } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); - if (rows.length !== 1) { - throw new Error("can not find booking"); - } + if (TestAMQPresultsBooking.size != 0) { + throw new Error( + 'devices were requested ' + MapToString(TestAMQPresultsBooking), + ); + } - if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); - } + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); + if (rows.length !== 1) { + throw new Error('can not find booking'); + } - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); - if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); - } + if (rows[0].status != 'rejected') { + throw new Error('wrong status ' + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }, + ); + + mocha.it( + 'patchBookingByID wrong status unlocked devices (active-pending)', + async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute('UPDATE `booking` SET `status`=? WHERE `id`=?', [ + 'active-pending', + BigInt(1), + ]); + + let req = getFakeRequest({ user: 'user.unittest', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { + ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + }, + ], + }, + ); + await sleep(250); + + if (res.status != 423) { + throw new Error('wrong status ' + res.status); + } - if (rows[0].n != 1) { - throw new Error("found " + rows[0].status + " bookeddevices"); - } + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); + if (rows.length !== 1) { + throw new Error('can not find booking'); + } - if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); - } + if (rows[0].n != 0) { + throw new Error('found ' + rows[0].status + ' new callbacks'); + } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); - if (rows.length !== 1) { - throw new Error("can not find booking"); - } + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); + if (rows.length !== 1) { + throw new Error('can not find bookeddevices'); + } - if (rows[0].status != "active-pending") { - throw new Error("wrong status " + rows[0].status); - } - } finally { - db.end(); - await StopAMQPTestBooking(); - ResetAMQPBookingDeviceCount(); - } - }); - mocha.it('patchBookingByID wrong status unlocked devices (active-rejected)', async function () { - let db = await mysql.createConnection(getSQLDNS()); - await db.connect(); - await StartAMQPTestBooking(); - try { - await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["active-rejected", BigInt(1)]); + if (rows[0].n != 1) { + throw new Error('found ' + rows[0].status + ' bookeddevices'); + } - let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); + if (TestAMQPresultsBooking.size != 0) { + throw new Error( + 'devices were requested ' + MapToString(TestAMQPresultsBooking), + ); + } - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], }); - await sleep(250); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); + if (rows.length !== 1) { + throw new Error('can not find booking'); + } - if (res.status != 423) { - throw new Error("wrong status " + res.status); - } + if (rows[0].status != 'active-pending') { + throw new Error('wrong status ' + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }, + ); + mocha.it( + 'patchBookingByID wrong status unlocked devices (active-rejected)', + async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute('UPDATE `booking` SET `status`=? WHERE `id`=?', [ + 'active-rejected', + BigInt(1), + ]); + + let req = getFakeRequest({ user: 'user.unittest', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { + ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000', + }, + ], + }, + ); + await sleep(250); + + if (res.status != 423) { + throw new Error('wrong status ' + res.status); + } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); - if (rows.length !== 1) { - throw new Error("can not find booking"); - } + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); + if (rows.length !== 1) { + throw new Error('can not find booking'); + } - if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); - } + if (rows[0].n != 0) { + throw new Error('found ' + rows[0].status + ' new callbacks'); + } - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); - if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); - } + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); + if (rows.length !== 1) { + throw new Error('can not find bookeddevices'); + } - if (rows[0].n != 1) { - throw new Error("found " + rows[0].status + " bookeddevices"); - } + if (rows[0].n != 1) { + throw new Error('found ' + rows[0].status + ' bookeddevices'); + } - if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); - } + if (TestAMQPresultsBooking.size != 0) { + throw new Error( + 'devices were requested ' + MapToString(TestAMQPresultsBooking), + ); + } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); - if (rows.length !== 1) { - throw new Error("can not find booking"); - } + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); + if (rows.length !== 1) { + throw new Error('can not find booking'); + } - if (rows[0].status != "active-rejected") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'active-rejected') { + throw new Error('wrong status ' + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); } - } finally { - db.end(); - await StopAMQPTestBooking(); - ResetAMQPBookingDeviceCount(); - } - }); + }, + ); mocha.it('patchBookingByID wrong status locked devices (cancelled)', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); await StartAMQPTestBooking(); try { - await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["cancelled", BigInt(1)]); - - let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], Locked: true }); + await db.execute('UPDATE `booking` SET `status`=? WHERE `id`=?', [ + 'cancelled', + BigInt(1), + ]); + + let req = getFakeRequest({ user: 'user.unittest', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' }, + ], + Locked: true, + }, + ); await sleep(250); if (res.status != 423) { - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } if (rows[0].n != 1) { - throw new Error("found " + rows[0].status + " bookeddevices"); + throw new Error('found ' + rows[0].status + ' bookeddevices'); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "cancelled") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'cancelled') { + throw new Error('wrong status ' + rows[0].status); } } finally { db.end(); @@ -1778,46 +2325,66 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestBooking(); try { - await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["rejected", BigInt(1)]); - - let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], Locked: true }); + await db.execute('UPDATE `booking` SET `status`=? WHERE `id`=?', [ + 'rejected', + BigInt(1), + ]); + + let req = getFakeRequest({ user: 'user.unittest', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' }, + ], + Locked: true, + }, + ); await sleep(250); if (res.status != 423) { - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } if (rows[0].n != 1) { - throw new Error("found " + rows[0].status + " bookeddevices"); + throw new Error('found ' + rows[0].status + ' bookeddevices'); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "rejected") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'rejected') { + throw new Error('wrong status ' + rows[0].status); } } finally { db.end(); @@ -1826,52 +2393,71 @@ mocha.describe('operations.ts', function () { } }); - mocha.it('patchBookingByID wrong status locked devices (pending)', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); await StartAMQPTestBooking(); try { - await db.execute("UPDATE `booking` SET `status`=? WHERE `id`=?", ["pending", BigInt(1)]); - - let req = getFakeRequest({ user: "user.unittest", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }], Locked: true }); + await db.execute('UPDATE `booking` SET `status`=? WHERE `id`=?', [ + 'pending', + BigInt(1), + ]); + + let req = getFakeRequest({ user: 'user.unittest', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [ + { ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' }, + ], + Locked: true, + }, + ); await sleep(250); if (res.status != 423) { - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } - [rows, _] = await db.execute('SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', [BigInt(1)]); + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE `booking`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find bookeddevices"); + throw new Error('can not find bookeddevices'); } if (rows[0].n != 1) { - throw new Error("found " + rows[0].status + " bookeddevices"); + throw new Error('found ' + rows[0].status + ' bookeddevices'); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "pending") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'pending') { + throw new Error('wrong status ' + rows[0].status); } } finally { db.end(); @@ -1885,35 +2471,49 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestBooking(); try { - let req = getFakeRequest({ user: "user.unittest.", isAuthorized: true }); - - let res = await patchBookingByID(req, { ID: "1" }, { Callback: "http://localhost:10801/test_callbacks/callback-test-new", Devices: [{ ID: "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000" }] }); + let req = getFakeRequest({ user: 'user.unittest.', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Callback: 'http://localhost:10801/test_callbacks/callback-test-new', + Devices: [ + { ID: 'http://localhost:10801/devices/20000000-0000-0000-0000-000000000000' }, + ], + }, + ); await sleep(250); if (res.status != 400) { - throw new Error("bad status code " + res.status); + throw new Error('bad status code ' + res.status); } - let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', ["http://localhost:10801/test_callbacks/callback-test-new"]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT count(*) AS n FROM bookingcallbacks WHERE `url`=?', + ['http://localhost:10801/test_callbacks/callback-test-new'], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } if (rows[0].n != 0) { - throw new Error("found " + rows[0].status + " new callbacks"); + throw new Error('found ' + rows[0].status + ' new callbacks'); } if (TestAMQPresultsBooking.size != 0) { - throw new Error("devices were requested " + MapToString(TestAMQPresultsBooking)); + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); } - [rows, _] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + [rows, _] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "booked") { - throw new Error("wrong status " + rows[0].status); + if (rows[0].status != 'booked') { + throw new Error('wrong status ' + rows[0].status); } } finally { db.end(); @@ -1922,21 +2522,19 @@ mocha.describe('operations.ts', function () { } }); - - mocha.it('deleteBookingByIDDestroy authorization failed', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); await StartAMQPTestFree(); try { - let isError: boolean = false + let isError: boolean = false; - let req = getFakeRequest({ user: "badactor", isAuthorized: false }); + let req = getFakeRequest({ user: 'badactor', isAuthorized: false }); try { - await deleteBookingByIDDestroy(req, { ID: "1" }); + await deleteBookingByIDDestroy(req, { ID: '1' }); } catch (err) { - if (err.message == "test authorization failed") { + if (err.message == 'test authorization failed') { isError = true; } else { console.log(err.message); @@ -1946,20 +2544,23 @@ mocha.describe('operations.ts', function () { await sleep(250); if (!isError) { - throw new Error("no access violation detected"); + throw new Error('no access violation detected'); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "booked") { - throw new Error("booking was deleted (status=" + rows[0].status + ")"); + if (rows[0].status != 'booked') { + throw new Error('booking was deleted (status=' + rows[0].status + ')'); } if (TestAMQPresults.size != 0) { - throw new Error("freed devices found " + MapToString(TestAMQPresults)); + throw new Error('freed devices found ' + MapToString(TestAMQPresults)); } } finally { db.end(); @@ -1973,39 +2574,43 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestFree(); try { - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); - let res = await deleteBookingByIDDestroy(req, { ID: "1" }); + let res = await deleteBookingByIDDestroy(req, { ID: '1' }); await sleep(250); if (res.status != 200) { if (res.status == 500) { throw new Error(res.body); } - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "cancelled") { - throw new Error("booking was not deleted (status=" + rows[0].status + ")"); + if (rows[0].status != 'cancelled') { + throw new Error('booking was not deleted (status=' + rows[0].status + ')'); } if (TestAMQPresults.size != 1) { - throw new Error("wrong number of freed devices found " + MapToString(TestAMQPresults)); + throw new Error( + 'wrong number of freed devices found ' + MapToString(TestAMQPresults), + ); } if (!TestAMQPresults.has(BigInt(1))) { - throw new Error("device not freed " + MapToString(TestAMQPresults)) + throw new Error('device not freed ' + MapToString(TestAMQPresults)); } if (Number(TestAMQPresults.get(BigInt(1))) != 1) { - throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + throw new Error('wrong number of free messages ' + MapToString(TestAMQPresults)); } - } finally { db.end(); await StopAMQPTestFree(); @@ -2018,45 +2623,50 @@ mocha.describe('operations.ts', function () { await db.connect(); await StartAMQPTestFree(); try { - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); - let res = await deleteBookingByIDDestroy(req, { ID: "2" }); + let res = await deleteBookingByIDDestroy(req, { ID: '2' }); await sleep(250); if (res.status != 200) { if (res.status == 500) { throw new Error(res.body); } - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(2)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(2)], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "cancelled") { - throw new Error("booking was not deleted (status=" + rows[0].status + ")"); + if (rows[0].status != 'cancelled') { + throw new Error('booking was not deleted (status=' + rows[0].status + ')'); } if (TestAMQPresults.size != 2) { - throw new Error("wrong number of freed devices found " + MapToString(TestAMQPresults)); + throw new Error( + 'wrong number of freed devices found ' + MapToString(TestAMQPresults), + ); } if (!TestAMQPresults.has(BigInt(2))) { - throw new Error("device not freed " + MapToString(TestAMQPresults)) + throw new Error('device not freed ' + MapToString(TestAMQPresults)); } if (Number(TestAMQPresults.get(BigInt(2))) != 1) { - throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + throw new Error('wrong number of free messages ' + MapToString(TestAMQPresults)); } if (!TestAMQPresults.has(BigInt(3))) { - throw new Error("device not freed " + MapToString(TestAMQPresults)) + throw new Error('device not freed ' + MapToString(TestAMQPresults)); } if (Number(TestAMQPresults.get(BigInt(3))) != 1) { - throw new Error("wrong number of free messages " + MapToString(TestAMQPresults)) + throw new Error('wrong number of free messages ' + MapToString(TestAMQPresults)); } } finally { db.end(); @@ -2066,41 +2676,46 @@ mocha.describe('operations.ts', function () { }); mocha.it('deleteBookingByIDDestroy booking not available', async function () { - let req = getFakeRequest({ user: "test", isAuthorized: true }); - let b = await deleteBookingByIDDestroy(req, { ID: "99999999" }); + let req = getFakeRequest({ user: 'test', isAuthorized: true }); + let b = await deleteBookingByIDDestroy(req, { ID: '99999999' }); if (b.status !== 404) { - throw new Error("bad status code" + b.status); + throw new Error('bad status code' + b.status); } }); - mocha.it('deleteBookingByIDDestroy wrong status', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); await StartAMQPTestFree(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["active", BigInt(1)]); + await db.execute('UPDATE booking SET `status`=? WHERE `id`=?', [ + 'active', + BigInt(1), + ]); - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); - let res = await deleteBookingByIDDestroy(req, { ID: "1" }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); + let res = await deleteBookingByIDDestroy(req, { ID: '1' }); await sleep(250); if (res.status != 423) { - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "active") { - throw new Error("booking was deleted (status=" + rows[0].status + ")"); + if (rows[0].status != 'active') { + throw new Error('booking was deleted (status=' + rows[0].status + ')'); } if (TestAMQPresults.size != 0) { - throw new Error("freed devices found " + MapToString(TestAMQPresults)); + throw new Error('freed devices found ' + MapToString(TestAMQPresults)); } } finally { db.end(); @@ -2113,23 +2728,29 @@ mocha.describe('operations.ts', function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); try { - await db.execute("UPDATE booking SET `status`=? WHERE `id`=?", ["cancelled", BigInt(1)]); + await db.execute('UPDATE booking SET `status`=? WHERE `id`=?', [ + 'cancelled', + BigInt(1), + ]); - let req = getFakeRequest({ user: "unittest.user", isAuthorized: true }); - let res = await deleteBookingByIDDestroy(req, { ID: "1" }); + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); + let res = await deleteBookingByIDDestroy(req, { ID: '1' }); await sleep(250); if (res.status != 200) { - throw new Error("wrong status " + res.status); + throw new Error('wrong status ' + res.status); } - let [rows, _]: [any, any] = await db.execute("SELECT `status` FROM booking WHERE `id`=?", [BigInt(1)]); + let [rows, _]: [any, any] = await db.execute( + 'SELECT `status` FROM booking WHERE `id`=?', + [BigInt(1)], + ); if (rows.length !== 1) { - throw new Error("can not find booking"); + throw new Error('can not find booking'); } - if (rows[0].status != "cancelled") { - throw new Error("booking status was deleted (status=" + rows[0].status + ")"); + if (rows[0].status != 'cancelled') { + throw new Error('booking status was deleted (status=' + rows[0].status + ')'); } } finally { db.end(); diff --git a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_booking.ts b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_booking.ts index 75789c97..3e6e0d41 100644 --- a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_booking.ts +++ b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_booking.ts @@ -1,8 +1,8 @@ -import * as amqplib from 'amqplib'; -import { config } from '../config' import { sleep } from '@crosslab/booking-service-common'; -import { DeviceBookingRequest } from "@crosslab/service-booking-backend"; +import { DeviceBookingRequest } from '@crosslab/service-booking-backend'; +import * as amqplib from 'amqplib'; +import { config } from '../config.js'; let connection: amqplib.Connection; let channel: amqplib.Channel; @@ -12,94 +12,98 @@ let amqpTestStarted = false; export let TestAMQPresultsBooking = new Map(); export function MapToString(map: Map): string { - return JSON.stringify(Object.fromEntries(map)); -} + return JSON.stringify(Object.fromEntries(map)); +} export function ResetAMQPBookingDeviceCount(): void { - TestAMQPresultsBooking = new Map(); -}; + TestAMQPresultsBooking = new Map(); +} async function helperLoop(): Promise { - while (true) { - let msg = await channel.get('device-booking', { noAck: false }); - - if (typeof msg === 'boolean') { - await sleep(20); - continue; - } - - if (msg === null) { - continue; - } - let data: string; - let message : DeviceBookingRequest; - // Parse data - try { - data = msg.content.toString(); - - if(data === "end amqp test"){ - amqpTestStarted = false; - return; - } - - message = DeviceBookingRequest.fromString(data); - } catch (error) { - console.log('Can not parse message:', error); - try { - channel.ack(msg); - } catch (error) { - console.log('Can not ack message:', error); - } - continue; - } - try { - let key = "" + message.BookingID + "-" + message.Position + "-" + message.Device; - if(TestAMQPresultsBooking.has(key)) { - TestAMQPresultsBooking.set(key, TestAMQPresultsBooking.get(key)+1); - } - TestAMQPresultsBooking.set(key, 1); - channel.ack(msg); - } catch (err) { - console.log("Error at helperLoop: " + err); - } - } -}; + while (true) { + let msg = await channel.get('device-booking', { noAck: false }); -export async function StartAMQPTestBooking(): Promise { - if (amqpTestStarted) { - throw new Error("amqp mockup alreay started"); + if (typeof msg === 'boolean') { + await sleep(20); + continue; } - connection = await amqplib.connect(config.AmqpUrl); - channel = await connection.createChannel(); - - await channel.assertQueue("device-booking", { - durable: true - }); + if (msg === null) { + continue; + } + let data: string; + let message: DeviceBookingRequest; + // Parse data + try { + data = msg.content.toString(); + + if (data === 'end amqp test') { + amqpTestStarted = false; + return; + } + + message = DeviceBookingRequest.fromString(data); + } catch (error) { + console.log('Can not parse message:', error); + try { + channel.ack(msg); + } catch (error) { + console.log('Can not ack message:', error); + } + continue; + } + try { + let key = '' + message.BookingID + '-' + message.Position + '-' + message.Device; + if (TestAMQPresultsBooking.has(key)) { + TestAMQPresultsBooking.set(key, TestAMQPresultsBooking.get(key) + 1); + } + TestAMQPresultsBooking.set(key, 1); + channel.ack(msg); + } catch (err) { + console.log('Error at helperLoop: ' + err); + } + } +} - while (await channel.get('device-booking', { noAck: true })) { } +export async function StartAMQPTestBooking(): Promise { + if (amqpTestStarted) { + throw new Error('amqp mockup alreay started'); + } - helperLoop(); - amqpTestStarted = true; + connection = await amqplib.connect(config.AmqpUrl); + channel = await connection.createChannel(); - return; -}; + await channel.assertQueue('device-booking', { + durable: true, + }); -export async function StopAMQPTestBooking(): Promise { - if (!amqpTestStarted) { - throw new Error("amqp mockup alreay stopped"); - } + while (await channel.get('device-booking', { noAck: true })) {} - if (!channel.sendToQueue("device-booking", Buffer.from("end amqp test"), { persistent: true })) { - throw new Error("amqp queue full"); - } + helperLoop(); + amqpTestStarted = true; - await sleep(1000); - await channel.close(); - channel = null; - await sleep(250); - await connection.close(); - connection = null; + return; +} - return; -}; +export async function StopAMQPTestBooking(): Promise { + if (!amqpTestStarted) { + throw new Error('amqp mockup alreay stopped'); + } + + if ( + !channel.sendToQueue('device-booking', Buffer.from('end amqp test'), { + persistent: true, + }) + ) { + throw new Error('amqp queue full'); + } + + await sleep(1000); + await channel.close(); + channel = null; + await sleep(250); + await connection.close(); + connection = null; + + return; +} diff --git a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts index 5110b617..8d72c296 100644 --- a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts +++ b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts @@ -1,7 +1,7 @@ -import * as amqplib from 'amqplib'; -import { config } from '../config' import { sleep } from '@crosslab/booking-service-common'; +import * as amqplib from 'amqplib'; +import { config } from '../config.js'; let connection: amqplib.Connection; let channel: amqplib.Channel; @@ -11,90 +11,94 @@ let amqpTestStarted = false; export let TestAMQPresults = new Map(); export function MapToString(map: Map): string { - return JSON.stringify(Object.fromEntries(map)); -} + return JSON.stringify(Object.fromEntries(map)); +} export function ResetAMQPDeviceCount(): void { - TestAMQPresults = new Map(); -}; + TestAMQPresults = new Map(); +} async function helperLoop(): Promise { - while (true) { - let msg = await channel.get('device-freeing', { noAck: false }); - - if (typeof msg === 'boolean') { - await sleep(20); - continue; - } - - if (msg === null) { - continue; - } - - // Parse data - let data: bigint; - try { - data = BigInt(msg.content.toString()); - } catch (error) { - console.log('Can not parse message:', error); - try { - channel.ack(msg); - } catch (error) { - console.log('Can not ack message:', error); - } - continue; - } - try { - if(data === -9999n){ - amqpTestStarted = false; - return; - } - if(TestAMQPresults.has(data)) { - TestAMQPresults.set(data, TestAMQPresults.get(data)+1); - } - TestAMQPresults.set(data, 1); - channel.ack(msg); - } catch (err) { - console.log("Error at helperLoop: " + err); - } - } -}; + while (true) { + let msg = await channel.get('device-freeing', { noAck: false }); -export async function StartAMQPTestFree(): Promise { - if (amqpTestStarted) { - throw new Error("amqp mockup alreay started"); + if (typeof msg === 'boolean') { + await sleep(20); + continue; } - connection = await amqplib.connect(config.AmqpUrl); - channel = await connection.createChannel(); + if (msg === null) { + continue; + } - await channel.assertQueue("device-freeing", { - durable: true - }); + // Parse data + let data: bigint; + try { + data = BigInt(msg.content.toString()); + } catch (error) { + console.log('Can not parse message:', error); + try { + channel.ack(msg); + } catch (error) { + console.log('Can not ack message:', error); + } + continue; + } + try { + if (data === -9999n) { + amqpTestStarted = false; + return; + } + if (TestAMQPresults.has(data)) { + TestAMQPresults.set(data, TestAMQPresults.get(data) + 1); + } + TestAMQPresults.set(data, 1); + channel.ack(msg); + } catch (err) { + console.log('Error at helperLoop: ' + err); + } + } +} - while (await channel.get('device-freeing', { noAck: true })) { } +export async function StartAMQPTestFree(): Promise { + if (amqpTestStarted) { + throw new Error('amqp mockup alreay started'); + } - helperLoop(); - amqpTestStarted = true; + connection = await amqplib.connect(config.AmqpUrl); + channel = await connection.createChannel(); - return; -}; + await channel.assertQueue('device-freeing', { + durable: true, + }); -export async function StopAMQPTestFree(): Promise { - if (!amqpTestStarted) { - throw new Error("amqp mockup alreay stopped"); - } + while (await channel.get('device-freeing', { noAck: true })) {} - if (!channel.sendToQueue("device-freeing", Buffer.from((-9999n).toString()), { persistent: true })) { - throw new Error("amqp queue full"); - } + helperLoop(); + amqpTestStarted = true; - await sleep(1000); - await channel.close(); - channel = null; - await sleep(250); - await connection.close(); - connection = null; + return; +} - return; -}; +export async function StopAMQPTestFree(): Promise { + if (!amqpTestStarted) { + throw new Error('amqp mockup alreay stopped'); + } + + if ( + !channel.sendToQueue('device-freeing', Buffer.from((-9999n).toString()), { + persistent: true, + }) + ) { + throw new Error('amqp queue full'); + } + + await sleep(1000); + await channel.close(); + channel = null; + await sleep(250); + await connection.close(); + connection = null; + + return; +} diff --git a/services/booking/src/booking-frontend/tsconfig.json b/services/booking/src/booking-frontend/tsconfig.json index 03bf091a..30425935 100644 --- a/services/booking/src/booking-frontend/tsconfig.json +++ b/services/booking/src/booking-frontend/tsconfig.json @@ -1,11 +1,23 @@ { "compilerOptions": { - "module": "commonjs", - "moduleResolution": "Node", - "target": "ES2020", + "module": "Node16", + "moduleResolution": "Node16", + "allowSyntheticDefaultImports": true, + "target": "ES2022", + "lib": ["ES2022"], + "esModuleInterop": true, "outDir": "app", "rootDir": "src", + // "strict": true, + "noImplicitAny": true, + // "noUnusedLocals": true, + "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, "sourceMap": true, - "esModuleInterop": true - } + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "skipLibCheck": true + }, + "include": ["src"] } diff --git a/services/booking/src/common/package-lock.json b/services/booking/src/common/package-lock.json index 74087416..edbf1c91 100644 --- a/services/booking/src/common/package-lock.json +++ b/services/booking/src/common/package-lock.json @@ -1,516 +1,2821 @@ { - "name": "@crosslab/booking-service-common", - "version": "0.0.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@crosslab/booking-service-common", - "version": "0.0.1", - "license": "Apache-2.0", - "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0" - }, - "devDependencies": { - "@types/node": "^20.5.9", - "prettier": "^3.0.3", - "typescript": "^5.2.2" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", - "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-environment-visitor/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", - "dependencies": { - "@babel/types": "^7.24.7", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", - "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.23.2", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true + "name": "@crosslab/booking-service-common", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@crosslab/booking-service-common", + "version": "0.0.1", + "license": "Apache-2.0", + "dependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/express": "^4.17.13", + "ajv-formats": "^3.0.1", + "express": "^4.18.1", + "node-fetch": "^3.3.2" + }, + "devDependencies": { + "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", + "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", + "@types/express": "^4.17.13", + "@types/node": "^20.5.9", + "@types/node-fetch": "^2.6.4", + "npm-run-all": "^4.1.5", + "prettier": "^3.0.3", + "typescript": "^5.2.2" + } + }, + "../../../../helper/crosslab-typescript-addon": { + "name": "@cross-lab-project/codegen-typescript-addon", + "dev": true, + "license": "UNLICENSED", + "dependencies": { + "@apidevtools/swagger-parser": "^10.1.0", + "nunjucks": "^3.2.3" + }, + "devDependencies": { + "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/node": "^20.5.9", + "@types/nunjucks": "^3.2.3", + "@types/seedrandom": "^3.0.5", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "copyfiles": "^2.4.1", + "eslint": "^8.48.0", + "openapi-types": "^12.1.3", + "prettier": "^3.0.3", + "tsc-watch": "^6.0.4", + "typescript": "^5.2.2" + }, + "peerDependencies": { + "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", + "ajv": "^8.11.0", + "ajv-formats": "^2.1.1" + } + }, + "../../../../helper/openapi-codegeneration": { + "name": "@cross-lab-project/openapi-codegen", + "dev": true, + "license": "UNLICENSED", + "dependencies": { + "@apidevtools/swagger-parser": "^10.1.0", + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", + "commander": "^11.0.0", + "deterministic-json-schema-faker": "^0.5.0-rcv.46", + "glob": "^10.3.4", + "json-schema-merge-allof": "^0.8.1", + "json-schema-to-typescript": "^13.1.1", + "nunjucks": "^3.2.4", + "quicktype-core": "^23.0.75", + "seedrandom": "^3.0.5", + "tiny-typed-emitter": "^2.1.0", + "yaml": "^2.3.2" + }, + "bin": { + "openapi-codegen": "lib/cjs/index.js" + }, + "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/node": "^20.5.9", + "@types/nunjucks": "^3.2.3", + "@types/seedrandom": "^3.0.5", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "eslint": "^8.48.0", + "openapi-types": "^12.1.3", + "prettier": "^3.0.3", + "tsc-watch": "^6.0.4", + "typescript": "^5.2.2" + } + }, + "../../helper/crosslab-typescript-addon": { + "extraneous": true + }, + "../../helper/openapi-codegeneration": { + "extraneous": true + }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "dependencies": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@cross-lab-project/codegen-typescript-addon": { + "resolved": "../../../../helper/crosslab-typescript-addon", + "link": true + }, + "node_modules/@cross-lab-project/openapi-codegen": { + "resolved": "../../../../helper/openapi-codegeneration", + "link": true + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", + "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", + "dependencies": { + "@babel/generator": "7.17.7", + "@babel/parser": "^7.20.5", + "@babel/traverse": "7.23.2", + "@babel/types": "7.17.0", + "javascript-natural-sort": "0.7.1", + "lodash": "^4.17.21" + }, + "peerDependencies": { + "@vue/compiler-sfc": "3.x", + "prettier": "2.x - 3.x" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.5", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz", + "integrity": "sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", + "dev": true, + "dependencies": { + "@types/node": "*", + "form-data": "^4.0.0" + } + }, + "node_modules/@types/qs": { + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dev": true, + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dev": true, + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ajv": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.6.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/javascript-natural-sort": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", + "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + }, + "node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/prettier": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string.prototype.padend": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz", + "integrity": "sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "engines": { + "node": ">=4" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } } - } - }, - "node_modules/@types/node": { - "version": "20.14.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", - "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - }, - "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "engines": { - "node": ">=4" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/javascript-natural-sort": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", - "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" - }, - "node_modules/prettier": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", - "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "engines": { - "node": ">=4" - } - }, - "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true } - } } diff --git a/services/booking/src/common/package.json b/services/booking/src/common/package.json index c499b0f6..6276f73b 100644 --- a/services/booking/src/common/package.json +++ b/services/booking/src/common/package.json @@ -1,22 +1,44 @@ { - "name": "@crosslab/booking-service-common", - "version": "0.0.1", - "description": "Common resources for booking-service sub-services.", - "main": "lib/index.js", - "scripts": { - "build": "tsc", - "test": "echo \"Error: no test specified\" && exit 1", - "format": "prettier . --write", - "lint": "eslint ." - }, - "author": "", - "license": "Apache-2.0", - "devDependencies": { - "@types/node": "^20.5.9", - "prettier": "^3.0.3", - "typescript": "^5.2.2" - }, - "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0" + "type": "module", + "name": "@crosslab/booking-service-common", + "version": "0.0.1", + "description": "Common resources for booking-service sub-services.", + "main": "lib/index.js", + "files": [ + "lib" + ], + "scripts": { + "copy:clients": "cp src/clients/device/basicValidation.cjs lib/clients/device/ && cp src/clients/booking-backend/basicValidation.cjs lib/clients/booking-backend/ && cp src/clients/booking-frontend/basicValidation.cjs lib/clients/booking-frontend/ && cp src/clients/schedule-service/basicValidation.cjs lib/clients/schedule-service/", + "build:generate": "npm-run-all build:generate:*", + "build:generate:device": "npx openapi-codegen -i ../../../device/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/device && prettier ./src/clients/device --write", + "build:generate:booking-backend": "npx openapi-codegen -i ../booking-backend/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/booking-backend && prettier ./src/clients/booking-backend --write", + "build:generate:booking-frontend": "npx openapi-codegen -i ../booking-frontend/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/booking-frontend && prettier ./src/clients/booking-frontend --write", + "build:generate:schedule-service": "npx openapi-codegen -i ../schedule-service/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/schedule-service && prettier ./src/clients/schedule-service --write", + "build:compile": "tsc", + "build:copy": "npm run copy:clients", + "build": "npm-run-all build:*", + "test": "echo \"Error: no test specified\" && exit 1", + "format": "prettier . --write", + "lint": "eslint ." + }, + "author": "", + "license": "Apache-2.0", + "devDependencies": { + "@types/node": "^20.5.9", + "@types/express": "^4.17.13", + "@types/node-fetch": "^2.6.4", + "prettier": "^3.0.3", + "typescript": "^5.2.2", + "npm-run-all": "^4.1.5", + "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", + "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration" + }, + "dependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/express": "^4.17.13", + "express": "^4.18.1", + "node-fetch": "^3.3.2", + "ajv-formats": "^3.0.1" + } } -} + \ No newline at end of file diff --git a/services/booking/src/common/src/auth.ts b/services/booking/src/common/src/auth.ts index 3c0b67ea..a0d3bf22 100644 --- a/services/booking/src/common/src/auth.ts +++ b/services/booking/src/common/src/auth.ts @@ -1,4 +1,4 @@ -import { baseConfig } from './config'; +import { baseConfig } from './config.js'; let institutePrefixURL: URL[]; diff --git a/services/booking/src/common/src/clients/booking-backend/basicValidation.cjs b/services/booking/src/common/src/clients/booking-backend/basicValidation.cjs new file mode 100644 index 00000000..83d82620 --- /dev/null +++ b/services/booking/src/common/src/clients/booking-backend/basicValidation.cjs @@ -0,0 +1,3937 @@ +/* eslint-disable */ +//@ts-nocheck +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +'use strict'; +exports.validateBooking = validate21; +const schema6 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'Booking', + 'x-location': '#/components/schemas/Booking', + 'x-schema-type': 'all', +}; +const formats0 = require('ajv-formats/dist/formats').fullFormats.uri; +const formats2 = require('ajv-formats/dist/formats').fullFormats['date-time']; +function validate21( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate21.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema6.required, + parentSchema: schema6, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.ID.type, + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema6.properties.Time.required, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.Start.type, + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.End.type, + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.properties.Time.type, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Devices.items.type, + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema6.properties.Devices.type, + parentSchema: schema6.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Type.type, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Type.enum, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Status.type, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Status.enum, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.You.type, + parentSchema: schema6.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.External.type, + parentSchema: schema6.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Message.type, + parentSchema: schema6.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate21.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.type, + parentSchema: schema6, + data, + }, + ]; + return false; + } + } + validate21.errors = vErrors; + return errors === 0; +} +exports.validateDevice = validate22; +const schema7 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'Device', + 'x-location': '#/components/schemas/Device', + 'x-schema-type': 'all', +}; +function validate22( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate22.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema7.required, + parentSchema: schema7, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema7.properties.ID.type, + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate22.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema7.type, + parentSchema: schema7, + data, + }, + ]; + return false; + } + } + validate22.errors = vErrors; + return errors === 0; +} +exports.validateExperiment = validate23; +const schema8 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'Experiment', + 'x-location': '#/components/schemas/Experiment', + 'x-schema-type': 'all', +}; +function validate23( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate23.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema8.required, + parentSchema: schema8, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema8.properties.Devices.items.required, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema8.properties.Devices.items.properties.ID.type, + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.properties.Devices.items.type, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema8.properties.Devices.type, + parentSchema: schema8.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate23.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema8.properties.Description.type, + parentSchema: schema8.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate23.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.type, + parentSchema: schema8, + data, + }, + ]; + return false; + } + } + validate23.errors = vErrors; + return errors === 0; +} +exports.validateTimeslot = validate24; +const schema9 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'Timeslot', + 'x-location': '#/components/schemas/Timeslot', + 'x-schema-type': 'all', +}; +function validate24( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate24.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema9.required, + parentSchema: schema9, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.Start.type, + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.End.type, + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate24.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema9.type, + parentSchema: schema9, + data, + }, + ]; + return false; + } + } + validate24.errors = vErrors; + return errors === 0; +} +exports.validateID = validate25; +const schema10 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'ID', + 'x-location': '#/components/parameters/ID/schema', + 'x-schema-type': 'all', +}; +function validate25( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate25.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema10.type, + parentSchema: schema10, + data, + }, + ]; + return false; + } + validate25.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse200 = validate26; +const schema11 = { + type: 'array', + description: + 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', + items: { + type: 'object', + required: ['Requested', 'Selected'], + properties: { + Requested: { type: 'string', format: 'uri' }, + Selected: { type: 'string', format: 'uri' }, + }, + }, + 'x-standalone': false, + 'x-name': 'lockBookingResponse200', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate26( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Requested === undefined && (missing0 = 'Requested')) || + (data0.Selected === undefined && (missing0 = 'Selected')) + ) { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema11.items.required, + parentSchema: schema11.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Requested !== undefined) { + let data1 = data0.Requested; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema11.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.items.properties.Requested.type, + parentSchema: schema11.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Selected !== undefined) { + let data2 = data0.Selected; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema11.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.items.properties.Selected.type, + parentSchema: schema11.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.items.type, + parentSchema: schema11.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate26.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema11.type, + parentSchema: schema11, + data, + }, + ]; + return false; + } + } + validate26.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse500 = validate27; +const schema12 = { + type: 'string', + description: 'Error string', + 'x-standalone': false, + 'x-name': 'lockBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate27( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate27.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema12.type, + parentSchema: schema12, + data, + }, + ]; + return false; + } + validate27.errors = vErrors; + return errors === 0; +} +exports.validateUnlockBookingResponse500 = validate28; +const schema13 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'unlockBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate28( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate28.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema13.type, + parentSchema: schema13, + data, + }, + ]; + return false; + } + validate28.errors = vErrors; + return errors === 0; +} +exports.validateBookingCallbackResponse500 = validate29; +const schema14 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'bookingCallbackResponse500', + 'x-location': + '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate29( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate29.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.type, + parentSchema: schema14, + data, + }, + ]; + return false; + } + validate29.errors = vErrors; + return errors === 0; +} +exports.validateBookingRequest = validate30; +const schema15 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingRequest', + 'x-location': '#/components/schemas/Booking_request', + 'x-schema-type': 'request', +}; +function validate30( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate30.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema15.required, + parentSchema: schema15, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate30.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema15.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.ID.type, + parentSchema: schema15.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate30.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema15.properties.Time.required, + parentSchema: schema15.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate30.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema15.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Time.properties.Start.type, + parentSchema: schema15.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate30.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema15.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Time.properties.End.type, + parentSchema: schema15.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema15.properties.Time.type, + parentSchema: schema15.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate30.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema15.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Devices.items.type, + parentSchema: schema15.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema15.properties.Devices.type, + parentSchema: schema15.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate30.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Type.type, + parentSchema: schema15.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate30.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema15.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema15.properties.Type.enum, + parentSchema: schema15.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate30.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Status.type, + parentSchema: schema15.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate30.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema15.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema15.properties.Status.enum, + parentSchema: schema15.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate30.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema15.properties.You.type, + parentSchema: schema15.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate30.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema15.properties.External.type, + parentSchema: schema15.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate30.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Message.type, + parentSchema: schema15.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate30.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema15.type, + parentSchema: schema15, + data, + }, + ]; + return false; + } + } + validate30.errors = vErrors; + return errors === 0; +} +exports.validateBookingResponse = validate31; +const schema16 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingResponse', + 'x-location': '#/components/schemas/Booking_response', + 'x-schema-type': 'response', +}; +function validate31( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate31.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema16.required, + parentSchema: schema16, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate31.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema16.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.ID.type, + parentSchema: schema16.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate31.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema16.properties.Time.required, + parentSchema: schema16.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate31.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema16.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Time.properties.Start.type, + parentSchema: schema16.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate31.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema16.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Time.properties.End.type, + parentSchema: schema16.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.properties.Time.type, + parentSchema: schema16.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema16.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Devices.items.type, + parentSchema: schema16.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema16.properties.Devices.type, + parentSchema: schema16.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Type.type, + parentSchema: schema16.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate31.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema16.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema16.properties.Type.enum, + parentSchema: schema16.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Status.type, + parentSchema: schema16.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate31.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema16.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema16.properties.Status.enum, + parentSchema: schema16.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate31.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema16.properties.You.type, + parentSchema: schema16.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate31.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema16.properties.External.type, + parentSchema: schema16.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Message.type, + parentSchema: schema16.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate31.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.type, + parentSchema: schema16, + data, + }, + ]; + return false; + } + } + validate31.errors = vErrors; + return errors === 0; +} +exports.validateDeviceRequest = validate32; +const schema17 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceRequest', + 'x-location': '#/components/schemas/Device_request', + 'x-schema-type': 'request', +}; +function validate32( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate32.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema17.required, + parentSchema: schema17, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate32.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema17.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.ID.type, + parentSchema: schema17.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate32.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.type, + parentSchema: schema17, + data, + }, + ]; + return false; + } + } + validate32.errors = vErrors; + return errors === 0; +} +exports.validateDeviceResponse = validate33; +const schema18 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceResponse', + 'x-location': '#/components/schemas/Device_response', + 'x-schema-type': 'response', +}; +function validate33( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate33.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema18.required, + parentSchema: schema18, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate33.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema18.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate33.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.properties.ID.type, + parentSchema: schema18.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate33.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.type, + parentSchema: schema18, + data, + }, + ]; + return false; + } + } + validate33.errors = vErrors; + return errors === 0; +} +exports.validateExperimentRequest = validate34; +const schema19 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentRequest', + 'x-location': '#/components/schemas/Experiment_request', + 'x-schema-type': 'request', +}; +function validate34( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate34.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema19.required, + parentSchema: schema19, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate34.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema19.properties.Devices.items.required, + parentSchema: schema19.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate34.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema19.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema19.properties.Devices.items.properties.ID.type, + parentSchema: + schema19.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.properties.Devices.items.type, + parentSchema: schema19.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema19.properties.Devices.type, + parentSchema: schema19.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate34.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema19.properties.Description.type, + parentSchema: schema19.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate34.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.type, + parentSchema: schema19, + data, + }, + ]; + return false; + } + } + validate34.errors = vErrors; + return errors === 0; +} +exports.validateExperimentResponse = validate35; +const schema20 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentResponse', + 'x-location': '#/components/schemas/Experiment_response', + 'x-schema-type': 'response', +}; +function validate35( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate35.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema20.required, + parentSchema: schema20, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema20.properties.Devices.items.required, + parentSchema: schema20.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema20.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema20.properties.Devices.items.properties.ID.type, + parentSchema: + schema20.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema20.properties.Devices.items.type, + parentSchema: schema20.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema20.properties.Devices.type, + parentSchema: schema20.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate35.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema20.properties.Description.type, + parentSchema: schema20.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate35.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema20.type, + parentSchema: schema20, + data, + }, + ]; + return false; + } + } + validate35.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotRequest = validate36; +const schema21 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotRequest', + 'x-location': '#/components/schemas/Timeslot_request', + 'x-schema-type': 'request', +}; +function validate36( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate36.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema21.required, + parentSchema: schema21, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate36.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema21.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate36.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.properties.Start.type, + parentSchema: schema21.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate36.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema21.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate36.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.properties.End.type, + parentSchema: schema21.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate36.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.type, + parentSchema: schema21, + data, + }, + ]; + return false; + } + } + validate36.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotResponse = validate37; +const schema22 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotResponse', + 'x-location': '#/components/schemas/Timeslot_response', + 'x-schema-type': 'response', +}; +function validate37( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate37.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema22.required, + parentSchema: schema22, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate37.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema22.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.Start.type, + parentSchema: schema22.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate37.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema22.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.End.type, + parentSchema: schema22.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate37.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema22.type, + parentSchema: schema22, + data, + }, + ]; + return false; + } + } + validate37.errors = vErrors; + return errors === 0; +} +exports.validateIDRequest = validate38; +const schema23 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDRequest', + 'x-location': '#/components/parameters/ID/schema_request', + 'x-schema-type': 'request', +}; +function validate38( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate38.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.type, + parentSchema: schema23, + data, + }, + ]; + return false; + } + validate38.errors = vErrors; + return errors === 0; +} +exports.validateIDResponse = validate39; +const schema24 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDResponse', + 'x-location': '#/components/parameters/ID/schema_response', + 'x-schema-type': 'response', +}; +function validate39( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate39.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema24.type, + parentSchema: schema24, + data, + }, + ]; + return false; + } + validate39.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse200Request = validate40; +const schema25 = { + type: 'array', + description: + 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', + items: { + type: 'object', + required: ['Requested', 'Selected'], + properties: { + Requested: { type: 'string', format: 'uri' }, + Selected: { type: 'string', format: 'uri' }, + }, + }, + 'x-standalone': false, + 'x-name': 'lockBookingResponse200Request', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate40( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Requested === undefined && (missing0 = 'Requested')) || + (data0.Selected === undefined && (missing0 = 'Selected')) + ) { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema25.items.required, + parentSchema: schema25.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Requested !== undefined) { + let data1 = data0.Requested; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema25.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.items.properties.Requested.type, + parentSchema: schema25.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Selected !== undefined) { + let data2 = data0.Selected; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema25.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.items.properties.Selected.type, + parentSchema: schema25.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema25.items.type, + parentSchema: schema25.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate40.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema25.type, + parentSchema: schema25, + data, + }, + ]; + return false; + } + } + validate40.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse200Response = validate41; +const schema26 = { + type: 'array', + description: + 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', + items: { + type: 'object', + required: ['Requested', 'Selected'], + properties: { + Requested: { type: 'string', format: 'uri' }, + Selected: { type: 'string', format: 'uri' }, + }, + }, + 'x-standalone': false, + 'x-name': 'lockBookingResponse200Response', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate41( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Requested === undefined && (missing0 = 'Requested')) || + (data0.Selected === undefined && (missing0 = 'Selected')) + ) { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema26.items.required, + parentSchema: schema26.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Requested !== undefined) { + let data1 = data0.Requested; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema26.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.items.properties.Requested.type, + parentSchema: schema26.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Selected !== undefined) { + let data2 = data0.Selected; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema26.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.items.properties.Selected.type, + parentSchema: schema26.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.items.type, + parentSchema: schema26.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate41.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema26.type, + parentSchema: schema26, + data, + }, + ]; + return false; + } + } + validate41.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse500Request = validate42; +const schema27 = { + type: 'string', + description: 'Error string', + 'x-standalone': false, + 'x-name': 'lockBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate42( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate42.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.type, + parentSchema: schema27, + data, + }, + ]; + return false; + } + validate42.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse500Response = validate43; +const schema28 = { + type: 'string', + description: 'Error string', + 'x-standalone': false, + 'x-name': 'lockBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate43( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate43.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema28.type, + parentSchema: schema28, + data, + }, + ]; + return false; + } + validate43.errors = vErrors; + return errors === 0; +} +exports.validateUnlockBookingResponse500Request = validate44; +const schema29 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'unlockBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate44( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate44.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema29.type, + parentSchema: schema29, + data, + }, + ]; + return false; + } + validate44.errors = vErrors; + return errors === 0; +} +exports.validateUnlockBookingResponse500Response = validate45; +const schema30 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'unlockBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate45( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate45.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema30.type, + parentSchema: schema30, + data, + }, + ]; + return false; + } + validate45.errors = vErrors; + return errors === 0; +} +exports.validateBookingCallbackResponse500Request = validate46; +const schema31 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'bookingCallbackResponse500Request', + 'x-location': + '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate46( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate46.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.type, + parentSchema: schema31, + data, + }, + ]; + return false; + } + validate46.errors = vErrors; + return errors === 0; +} +exports.validateBookingCallbackResponse500Response = validate47; +const schema32 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'bookingCallbackResponse500Response', + 'x-location': + '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate47( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate47.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.type, + parentSchema: schema32, + data, + }, + ]; + return false; + } + validate47.errors = vErrors; + return errors === 0; +} diff --git a/services/booking/src/common/src/clients/booking-backend/basicValidation.d.cts b/services/booking/src/common/src/clients/booking-backend/basicValidation.d.cts new file mode 100644 index 00000000..51a62d7e --- /dev/null +++ b/services/booking/src/common/src/clients/booking-backend/basicValidation.d.cts @@ -0,0 +1,107 @@ +export declare function validateBooking( + object: unknown, +): Booking; + +export declare function validateDevice( + object: unknown, +): Device; + +export declare function validateExperiment( + object: unknown, +): Experiment; + +export declare function validateTimeslot( + object: unknown, +): Timeslot; + +export declare function validateID( + object: unknown, +): ID; + +export declare function validateLockBookingResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse200; + +export declare function validateLockBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse500; + +export declare function validateUnlockBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): unlockBookingResponse500; + +export declare function validateBookingCallbackResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): bookingCallbackResponse500; + +export declare function validateBookingRequest( + object: unknown, +): BookingRequest; + +export declare function validateBookingResponse( + object: unknown, +): BookingResponse; + +export declare function validateDeviceRequest( + object: unknown, +): DeviceRequest; + +export declare function validateDeviceResponse( + object: unknown, +): DeviceResponse; + +export declare function validateExperimentRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentRequest; + +export declare function validateExperimentResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentResponse; + +export declare function validateTimeslotRequest( + object: unknown, +): TimeslotRequest; + +export declare function validateTimeslotResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): TimeslotResponse; + +export declare function validateIDRequest( + object: unknown, +): IDRequest; + +export declare function validateIDResponse( + object: unknown, +): IDResponse; + +export declare function validateLockBookingResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse200Request; + +export declare function validateLockBookingResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse200Response; + +export declare function validateLockBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse500Request; + +export declare function validateLockBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse500Response; + +export declare function validateUnlockBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): unlockBookingResponse500Request; + +export declare function validateUnlockBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): unlockBookingResponse500Response; + +export declare function validateBookingCallbackResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): bookingCallbackResponse500Request; + +export declare function validateBookingCallbackResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): bookingCallbackResponse500Response; diff --git a/services/booking/src/common/src/clients/booking-backend/client.ts b/services/booking/src/common/src/clients/booking-backend/client.ts new file mode 100644 index 00000000..2c864a69 --- /dev/null +++ b/services/booking/src/common/src/clients/booking-backend/client.ts @@ -0,0 +1,420 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; + +import * as RequestValidation from './requestValidation.js'; +import * as Signatures from './signatures.js'; +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * This error class should be used if an error occurs during validation of a request/response. + * @category Errors + */ +export class ValidationError extends Error { + public errors: unknown; + + constructor(message: string, errors: unknown) { + super(message); + this.name = 'ValidationError'; + this.errors = errors; + } +} + +/** + * This error class should be used if an error occurs while fetching a request. + * @category Errors + */ +export class FetchError extends Error { + constructor(message: string) { + super(message); + this.name = 'FetchError'; + } +} + +/** + * This error class should be used if the response of the server has a status + * greater than or equal to 400. This error should contain the validated response. + * @category Errors + */ +export class UnsuccessfulRequestError extends Error { + public response: Types.ResponseData; + + constructor(message: string, response: Types.ResponseData) { + super(message); + this.response = response; + this.name = 'UnsuccessfulRequestError'; + } +} + +/** + * This error class should be used if the validation of an url fails. + * @category Errors + */ +export class InvalidUrlError extends Error { + constructor(message: string) { + super(message); + this.name = 'InvalidUrlError'; + } +} + +/** + * This function attempts to parse a Response as ResponseData. + */ +async function parseResponse(response: Response): Promise { + let text = null; + try { + text = await response.text(); + const json = JSON.parse(text); + return { status: response.status, body: json }; + } catch { + return { status: response.status, body: text }; + } +} + +/** + * This function checks if a string is a valid http url. + * @param string The string to be checked. + * @returns True if the string is a valid http url. + */ +function isValidHttpUrl(string: string) { + let url; + + try { + url = new URL(string); + } catch (_) { + return false; + } + + return url.protocol === 'http:' || url.protocol === 'https:'; +} + +/** + * This function takes an url and a pattern for the requested endpoint and parses the contained path parameters. + * @param url The url to be parsed. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the provided url does not end with the provided endpoint. + * @returns An array containing all parsed path parameters in order of appearance. + * @example + * // returns ["username", "role_name"] + * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function parsePathParameters(url: string, endpoint: string): string[] { + const parameterRegex = '([a-zA-Z0-9-:]+)'; + const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); + const matches = url.match(regex); + + if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint'); + + return matches.slice(1); +} + +/** + * This function validates a given http url and parses its path parameters. + * @param url The url to be validated. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the validation of the provided url fails. + * @returns An array containing all parsed path parameters in order of appearance (see {@link parsePathParameters}). + * @example + * // returns ["username", "role_name"] + * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { + if (!isValidHttpUrl(url)) + throw new InvalidUrlError('Provided url is not a valid http url'); + if (!url.startsWith(baseUrl)) + throw new InvalidUrlError('Provided url does not start with the provided base url'); + const pathParameters = parsePathParameters(url, endpoint); + + let extendedBaseUrl = baseUrl + endpoint; + + pathParameters.forEach(pathParameter => { + extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); + }); + + if (url !== extendedBaseUrl) + throw new InvalidUrlError('Provided url does not match extended base url'); + + return pathParameters; +} + +/** + * This function appends a given endpoint to an url. + * @param url The url to append the endpoint to. + * @param endpoint The endpoint to be appended. + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id", "/token") + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id/", "/token") + * @returns The url with the appended endpoint. + */ +function appendToUrl(url: string, endpoint: string) { + return url.endsWith('/') ? `${url.slice(0, -1)}${endpoint}` : `${url}${endpoint}`; +} + +/** + * Client for the use of the Crosslab API + * @category Client + */ +export class Client { + public readonly baseUrl: string; + public readonly serviceUrl: string; + public accessToken: string; + private fixedHeaders: [string, string][]; + private fetch = async (url: RequestInfo | URL, init: RequestInit) => { + let raw_response; + try { + if ( + url.toString().startsWith(this.baseUrl) || + url.toString().startsWith(this.serviceUrl) + ) { + raw_response = await fetch(url, init); + } else { + raw_response = await fetch( + appendToUrl( + this.baseUrl, + '/proxy?' + new URLSearchParams([['URL', url.toString()]]).toString(), + ), + init, + ); + } + } catch (error) { + if (error instanceof Error) { + throw new FetchError(error.message); + } else if (typeof error === 'string') { + throw new FetchError(error); + } else { + throw new FetchError('Something went wrong while trying to fetch the request'); + } + } + return await parseResponse(raw_response); + }; + + /** + * @category Constructors + */ + constructor( + baseUrl: string, + options: { + serviceUrl?: string; + accessToken?: string; + fixedHeaders?: [string, string][]; + }, + ) { + this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; + this.serviceUrl = options.serviceUrl + ? options.serviceUrl.endsWith('/') + ? options.serviceUrl.slice(0, -1) + : options.serviceUrl + : this.baseUrl; + this.accessToken = options.accessToken ?? ''; + this.fixedHeaders = options.fixedHeaders ?? []; + } + + /** + * Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * All devices were booked by user. + */ + public async lockBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateLockBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateLockBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'PUT', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateLockBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateLockBookingOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Unlocks all devices belonging to a booking, status will be set to 'booked'. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * Unlocking was successful. + */ + public async unlockBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateUnlockBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateUnlockBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateUnlockBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateUnlockBookingOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Callback used for updating device info / booking info. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * Update was processed. + */ + public async bookingCallback( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking_callback/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking_callback/{}'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateBookingCallbackInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateBookingCallbackInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateBookingCallbackOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateBookingCallbackOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } +} diff --git a/services/booking/src/common/src/clients/booking-backend/requestValidation.ts b/services/booking/src/common/src/clients/booking-backend/requestValidation.ts new file mode 100644 index 00000000..b5921790 --- /dev/null +++ b/services/booking/src/common/src/clients/booking-backend/requestValidation.ts @@ -0,0 +1,208 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as BasicValidation from './basicValidation.cjs'; +import * as Signatures from './signatures.js'; +import { FunctionWithErrors, ResponseData } from './types.js'; + +/** + * This function validates the inputs to lockBooking() + */ +export function validateLockBookingInput(parameters: Signatures.LockBookingParameters) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateLockBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of lockBooking() + */ +export function validateLockBookingOutput( + response: ResponseData, +): response is Signatures.LockBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateLockBookingResponse200Response(response.body)) { + (validateLockBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateLockBookingResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 412) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateLockBookingResponse500Response(response.body)) { + (validateLockBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateLockBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + (validateLockBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to unlockBooking() + */ +export function validateUnlockBookingInput( + parameters: Signatures.UnlockBookingParameters, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateUnlockBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of unlockBooking() + */ +export function validateUnlockBookingOutput( + response: ResponseData, +): response is Signatures.UnlockBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 412) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateUnlockBookingResponse500Response(response.body)) { + (validateUnlockBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateUnlockBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + (validateUnlockBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to bookingCallback() + */ +export function validateBookingCallbackInput( + parameters: Signatures.BookingCallbackParameters, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateBookingCallbackInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of bookingCallback() + */ +export function validateBookingCallbackOutput( + response: ResponseData, +): response is Signatures.BookingCallbackResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateBookingCallbackResponse500Response(response.body)) { + (validateBookingCallbackOutput as FunctionWithErrors).errors = ( + BasicValidation.validateBookingCallbackResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + (validateBookingCallbackOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} diff --git a/services/booking/src/common/src/clients/booking-backend/signatures.ts b/services/booking/src/common/src/clients/booking-backend/signatures.ts new file mode 100644 index 00000000..3569d504 --- /dev/null +++ b/services/booking/src/common/src/clients/booking-backend/signatures.ts @@ -0,0 +1,329 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * Typing for the parameters of the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingResponse = LockBookingSuccessResponse | LockBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingSuccessResponse = LockBookingResponse200; + +/** + * Typing for all error responses to the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingErrorResponse = + | LockBookingResponse401 + | LockBookingResponse403 + | LockBookingResponse404 + | LockBookingResponse412 + | LockBookingResponse500 + | LockBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + Requested: string; + Selected: string; + [k: string]: unknown; + }[]; +} + +/** + * Typing for a response with status 401 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 412 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse412 extends Types.ErrorResponse { + status: 412; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingResponse = + | UnlockBookingSuccessResponse + | UnlockBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingSuccessResponse = UnlockBookingResponse200; + +/** + * Typing for all error responses to the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingErrorResponse = + | UnlockBookingResponse401 + | UnlockBookingResponse403 + | UnlockBookingResponse404 + | UnlockBookingResponse412 + | UnlockBookingResponse500 + | UnlockBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 412 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse412 extends Types.ErrorResponse { + status: 412; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackResponse = + | BookingCallbackSuccessResponse + | BookingCallbackErrorResponse; + +/** + * Typing for all successful responses to the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackSuccessResponse = BookingCallbackResponse200; + +/** + * Typing for all error responses to the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackErrorResponse = + | BookingCallbackResponse404 + | BookingCallbackResponse500 + | BookingCallbackResponse503; + +/** + * Typing for a response with status 200 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} diff --git a/services/booking/src/common/src/clients/booking-backend/types.ts b/services/booking/src/common/src/clients/booking-backend/types.ts new file mode 100644 index 00000000..8d0b0be8 --- /dev/null +++ b/services/booking/src/common/src/clients/booking-backend/types.ts @@ -0,0 +1,410 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as _BasicValidation from './basicValidation.cjs'; + +/** + * @internal + */ +export interface FunctionWithErrors { + (...args: unknown[]): unknown; + errors?: unknown; +} + +/** + * @internal + */ +export interface RequestInfo { + method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'OPTIONS' | 'PATCH' | 'HEAD'; + body?: string; + headers?: [string, string][]; +} + +/** + * @internal + */ +export type FetchFunction = ( + url: string, + info?: RequestInfo, +) => Promise | ResponseData; + +export interface ResponseData { + status: number; + headers?: { + [key: string]: string | undefined; + }; + body?: unknown; +} + +export interface SuccessResponse extends ResponseData { + success?: true; +} + +export interface ErrorResponse extends ResponseData { + success?: false; +} + +/** + * @internal + */ +export function isSuccessResponse(response: ResponseData): response is SuccessResponse { + return response.status < 400; +} + +/** + * @internal + */ +export function isErrorResponse(response: ResponseData): response is ErrorResponse { + return response.status >= 400; +} + +/** + * This type allows to pick the required properties of another type. + */ +export type Require = Partial & { + [Property in Key]-?: Type[Property]; +}; + +export type SizedTuple< + T, + MIN extends number | undefined = undefined, + MAX extends number | undefined = undefined, +> = MIN extends number + ? MAX extends number + ? _SizedTuple> + : TupleObject> & T[] + : MAX extends number + ? _SizedTuple, true> + : T[]; + +type _SizedTuple = ARR extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? Tuple | _SizedTuple + : never; + +type Tuple = _Tuple< + T, + NumericRangeTuple +>; + +type _Tuple = N extends [ + infer HEAD, + ...infer TAIL extends number[], +] + ? HEAD extends 0 + ? [] | _Tuple + : [T, ..._Tuple] + : []; + +type TupleObject = N extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? TAIL extends [] + ? Record + : { [P in HEAD]: T } & TupleObject + : Record; + +export type NumericRange< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number = never, +> = ARR['length'] extends END + ? ACC | START | END + : NumericRange< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : ACC | ARR['length'] + >; + +type NumericRangeTuple< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number[] = [], +> = ARR['length'] extends END + ? [START, ...ACC, END] + : NumericRangeTuple< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : [...ACC, ARR['length']] + >; + +/** + * A booking in the booking system. + */ +export type Booking = T extends 'all' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : never; + +/** + * A device might either be a physical/virtual device or a group of device. + */ +export type Device = T extends 'all' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : never; + +/** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ +export type Experiment = T extends 'all' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'request'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'response'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : never; + +/** + * A time slot represents a slice of time used for bookings. + */ +export type Timeslot = T extends 'all' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : never; diff --git a/services/experiment/src/clients/booking/basicValidation.cjs b/services/booking/src/common/src/clients/booking-frontend/basicValidation.cjs similarity index 56% rename from services/experiment/src/clients/booking/basicValidation.cjs rename to services/booking/src/common/src/clients/booking-frontend/basicValidation.cjs index b791fa74..25c648d5 100644 --- a/services/experiment/src/clients/booking/basicValidation.cjs +++ b/services/booking/src/common/src/clients/booking-frontend/basicValidation.cjs @@ -41,7 +41,7 @@ const schema6 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -661,7 +661,7 @@ const schema8 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, @@ -1035,42 +1035,28 @@ function validate25( validate25.errors = vErrors; return errors === 0; } -exports.validateScheduleBody = validate26; +exports.validateNewBookingBody = validate26; const schema11 = { type: 'object', - required: ['Experiment', 'Time'], + required: ['Devices', 'Time'], properties: { - Experiment: { - title: 'Experiment', - description: - 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', - type: 'object', - required: ['Devices'], - properties: { - Devices: { - type: 'array', - description: 'List of devices used in experiment.', - items: { - title: 'Device', + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', description: - 'A device might either be a physical/virtual device or a group of device.', - type: 'object', - required: ['ID'], - properties: { - ID: { - type: 'string', - description: - 'Unique ID of the device. Contains the institution (by having an end point at that institution)', - format: 'uri', - }, - }, + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', }, }, - Description: { - type: 'string', - description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', - }, }, }, Time: { @@ -1091,20 +1077,16 @@ const schema11 = { }, }, }, - Combined: { - type: 'boolean', - description: - 'If true, show only one timetable per device instead of one for all available physical devices.', - }, - onlyOwn: { - type: 'boolean', + Type: { description: - '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], }, }, 'x-standalone': false, - 'x-name': 'scheduleBody', - 'x-location': '#/paths//schedule/post/requestBody/content/application/json/schema', + 'x-name': 'newBookingBody', + 'x-location': '#/paths//booking/post/requestBody/content/application/json/schema', 'x-schema-type': 'all', }; function validate26( @@ -1117,7 +1099,7 @@ function validate26( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if ( - (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Devices === undefined && (missing0 = 'Devices')) || (data.Time === undefined && (missing0 = 'Time')) ) { validate26.errors = [ @@ -1134,205 +1116,110 @@ function validate26( ]; return false; } else { - if (data.Experiment !== undefined) { - let data0 = data.Experiment; + if (data.Devices !== undefined) { + let data0 = data.Devices; const _errs1 = errors; if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing1; - if (data0.Devices === undefined && (missing1 = 'Devices')) { - validate26.errors = [ - { - instancePath: instancePath + '/Experiment', - schemaPath: '#/properties/Experiment/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema11.properties.Experiment.required, - parentSchema: schema11.properties.Experiment, - data: data0, - }, - ]; - return false; - } else { - if (data0.Devices !== undefined) { - let data1 = data0.Devices; - const _errs3 = errors; - if (errors === _errs3) { - if (Array.isArray(data1)) { - var valid2 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate26.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema11.properties.Devices.items.required, + parentSchema: schema11.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; const _errs5 = errors; if (errors === _errs5) { - if ( - data2 && - typeof data2 == 'object' && - !Array.isArray(data2) - ) { - let missing2; - if (data2.ID === undefined && (missing2 = 'ID')) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate26.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema11.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { validate26.errors = [ { - instancePath: - instancePath + '/Experiment/Devices/' + i0, + instancePath: instancePath + '/Devices/' + i0 + '/ID', schemaPath: - '#/properties/Experiment/properties/Devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', schema: - schema11.properties.Experiment.properties.Devices - .items.required, + schema11.properties.Devices.items.properties.ID.type, parentSchema: - schema11.properties.Experiment.properties.Devices - .items, + schema11.properties.Devices.items.properties.ID, data: data2, }, ]; return false; - } else { - if (data2.ID !== undefined) { - let data3 = data2.ID; - const _errs7 = errors; - if (errors === _errs7) { - if (errors === _errs7) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate26.errors = [ - { - instancePath: - instancePath + - '/Experiment/Devices/' + - i0 + - '/ID', - schemaPath: - '#/properties/Experiment/properties/Devices/items/properties/ID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema11.properties.Experiment.properties - .Devices.items.properties.ID, - data: data3, - }, - ]; - return false; - } - } else { - validate26.errors = [ - { - instancePath: - instancePath + - '/Experiment/Devices/' + - i0 + - '/ID', - schemaPath: - '#/properties/Experiment/properties/Devices/items/properties/ID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema11.properties.Experiment.properties - .Devices.items.properties.ID.type, - parentSchema: - schema11.properties.Experiment.properties - .Devices.items.properties.ID, - data: data3, - }, - ]; - return false; - } - } - } - } } - } else { - validate26.errors = [ - { - instancePath: instancePath + '/Experiment/Devices/' + i0, - schemaPath: - '#/properties/Experiment/properties/Devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema11.properties.Experiment.properties.Devices.items - .type, - parentSchema: - schema11.properties.Experiment.properties.Devices.items, - data: data2, - }, - ]; - return false; } } - var valid2 = _errs5 === errors; - if (!valid2) { - break; - } } - } else { - validate26.errors = [ - { - instancePath: instancePath + '/Experiment/Devices', - schemaPath: '#/properties/Experiment/properties/Devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema11.properties.Experiment.properties.Devices.type, - parentSchema: schema11.properties.Experiment.properties.Devices, - data: data1, - }, - ]; - return false; - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Description !== undefined) { - let data4 = data0.Description; - const _errs9 = errors; - if (typeof data4 !== 'string') { - validate26.errors = [ - { - instancePath: instancePath + '/Experiment/Description', - schemaPath: - '#/properties/Experiment/properties/Description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema11.properties.Experiment.properties.Description.type, - parentSchema: - schema11.properties.Experiment.properties.Description, - data: data4, - }, - ]; - return false; } - var valid1 = _errs9 === errors; } else { - var valid1 = true; + validate26.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.properties.Devices.items.type, + parentSchema: schema11.properties.Devices.items, + data: data1, + }, + ]; + return false; } } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } } } else { validate26.errors = [ { - instancePath: instancePath + '/Experiment', - schemaPath: '#/properties/Experiment/type', + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema11.properties.Experiment.type, - parentSchema: schema11.properties.Experiment, + params: { type: 'array' }, + message: 'must be array', + schema: schema11.properties.Devices.type, + parentSchema: schema11.properties.Devices, data: data0, }, ]; @@ -1345,36 +1232,36 @@ function validate26( } if (valid0) { if (data.Time !== undefined) { - let data5 = data.Time; - const _errs11 = errors; - if (errors === _errs11) { - if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { - let missing3; + let data3 = data.Time; + const _errs7 = errors; + if (errors === _errs7) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing2; if ( - (data5.Start === undefined && (missing3 = 'Start')) || - (data5.End === undefined && (missing3 = 'End')) + (data3.Start === undefined && (missing2 = 'Start')) || + (data3.End === undefined && (missing2 = 'End')) ) { validate26.errors = [ { instancePath: instancePath + '/Time', schemaPath: '#/properties/Time/required', keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", schema: schema11.properties.Time.required, parentSchema: schema11.properties.Time, - data: data5, + data: data3, }, ]; return false; } else { - if (data5.Start !== undefined) { - let data6 = data5.Start; - const _errs13 = errors; - if (errors === _errs13) { - if (errors === _errs13) { - if (typeof data6 === 'string') { - if (!formats2.validate(data6)) { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { validate26.errors = [ { instancePath: instancePath + '/Time/Start', @@ -1384,7 +1271,7 @@ function validate26( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: schema11.properties.Time.properties.Start, - data: data6, + data: data4, }, ]; return false; @@ -1399,25 +1286,25 @@ function validate26( message: 'must be string', schema: schema11.properties.Time.properties.Start.type, parentSchema: schema11.properties.Time.properties.Start, - data: data6, + data: data4, }, ]; return false; } } } - var valid4 = _errs13 === errors; + var valid3 = _errs9 === errors; } else { - var valid4 = true; + var valid3 = true; } - if (valid4) { - if (data5.End !== undefined) { - let data7 = data5.End; - const _errs15 = errors; - if (errors === _errs15) { - if (errors === _errs15) { - if (typeof data7 === 'string') { - if (!formats2.validate(data7)) { + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { validate26.errors = [ { instancePath: instancePath + '/Time/End', @@ -1427,7 +1314,7 @@ function validate26( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: schema11.properties.Time.properties.End, - data: data7, + data: data5, }, ]; return false; @@ -1442,16 +1329,16 @@ function validate26( message: 'must be string', schema: schema11.properties.Time.properties.End.type, parentSchema: schema11.properties.Time.properties.End, - data: data7, + data: data5, }, ]; return false; } } } - var valid4 = _errs15 === errors; + var valid3 = _errs11 === errors; } else { - var valid4 = true; + var valid3 = true; } } } @@ -1465,63 +1352,54 @@ function validate26( message: 'must be object', schema: schema11.properties.Time.type, parentSchema: schema11.properties.Time, - data: data5, + data: data3, }, ]; return false; } } - var valid0 = _errs11 === errors; + var valid0 = _errs7 === errors; } else { var valid0 = true; } if (valid0) { - if (data.Combined !== undefined) { - let data8 = data.Combined; - const _errs17 = errors; - if (typeof data8 !== 'boolean') { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { validate26.errors = [ { - instancePath: instancePath + '/Combined', - schemaPath: '#/properties/Combined/type', + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema11.properties.Combined.type, - parentSchema: schema11.properties.Combined, - data: data8, + params: { type: 'string' }, + message: 'must be string', + schema: schema11.properties.Type.type, + parentSchema: schema11.properties.Type, + data: data6, }, ]; return false; } - var valid0 = _errs17 === errors; + if (!(data6 === 'normal')) { + validate26.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema11.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema11.properties.Type.enum, + parentSchema: schema11.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; } else { var valid0 = true; } - if (valid0) { - if (data.onlyOwn !== undefined) { - let data9 = data.onlyOwn; - const _errs19 = errors; - if (typeof data9 !== 'boolean') { - validate26.errors = [ - { - instancePath: instancePath + '/onlyOwn', - schemaPath: '#/properties/onlyOwn/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema11.properties.onlyOwn.type, - parentSchema: schema11.properties.onlyOwn, - data: data9, - }, - ]; - return false; - } - var valid0 = _errs19 === errors; - } else { - var valid0 = true; - } - } } } } @@ -1544,63 +1422,20 @@ function validate26( validate26.errors = vErrors; return errors === 0; } -exports.validateScheduleResponse200 = validate27; +exports.validateNewBookingResponse200 = validate27; const schema12 = { - type: 'array', - items: { - type: 'object', - required: ['Device', 'Booked', 'Free'], - properties: { - Device: { type: 'string', description: 'ID of the device (or * if combined).' }, - Booked: { - type: 'array', - description: 'Array of booked times.', - items: { - title: 'Timeslot', - description: 'A time slot represents a slice of time used for bookings.', - type: 'object', - required: ['Start', 'End'], - properties: { - Start: { - type: 'string', - description: 'Start time of the booking.', - format: 'date-time', - }, - End: { - type: 'string', - description: 'End time of the booking.', - format: 'date-time', - }, - }, - }, - }, - Free: { - type: 'array', - description: 'Array of free times.', - items: { - title: 'Timeslot', - description: 'A time slot represents a slice of time used for bookings.', - type: 'object', - required: ['Start', 'End'], - properties: { - Start: { - type: 'string', - description: 'Start time of the booking.', - format: 'date-time', - }, - End: { - type: 'string', - description: 'End time of the booking.', - format: 'date-time', - }, - }, - }, - }, + type: 'object', + required: ['BookingID'], + properties: { + BookingID: { + type: 'string', + format: 'uri', + description: 'ID at which the booking can be managed.', }, }, 'x-standalone': false, - 'x-name': 'scheduleResponse200', - 'x-location': '#/paths//schedule/post/responses/200/content/application/json/schema', + 'x-name': 'newBookingResponse200', + 'x-location': '#/paths//booking/post/responses/200/content/application/json/schema', 'x-schema-type': 'all', }; function validate27( @@ -1610,495 +1445,62 @@ function validate27( let vErrors = null; let errors = 0; if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if ( - (data0.Device === undefined && (missing0 = 'Device')) || - (data0.Booked === undefined && (missing0 = 'Booked')) || - (data0.Free === undefined && (missing0 = 'Free')) - ) { - validate27.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema12.items.required, - parentSchema: schema12.items, - data: data0, - }, - ]; - return false; - } else { - if (data0.Device !== undefined) { - let data1 = data0.Device; - const _errs3 = errors; - if (typeof data1 !== 'string') { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate27.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema12.required, + parentSchema: schema12, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { validate27.errors = [ { - instancePath: instancePath + '/' + i0 + '/Device', - schemaPath: '#/items/properties/Device/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema12.items.properties.Device.type, - parentSchema: schema12.items.properties.Device, - data: data1, + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema12.properties.BookingID, + data: data0, }, ]; return false; } - var valid1 = _errs3 === errors; } else { - var valid1 = true; - } - if (valid1) { - if (data0.Booked !== undefined) { - let data2 = data0.Booked; - const _errs5 = errors; - if (errors === _errs5) { - if (Array.isArray(data2)) { - var valid2 = true; - const len1 = data2.length; - for (let i1 = 0; i1 < len1; i1++) { - let data3 = data2[i1]; - const _errs7 = errors; - if (errors === _errs7) { - if ( - data3 && - typeof data3 == 'object' && - !Array.isArray(data3) - ) { - let missing1; - if ( - (data3.Start === undefined && (missing1 = 'Start')) || - (data3.End === undefined && (missing1 = 'End')) - ) { - validate27.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Booked/' + i1, - schemaPath: '#/items/properties/Booked/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: schema12.items.properties.Booked.items.required, - parentSchema: schema12.items.properties.Booked.items, - data: data3, - }, - ]; - return false; - } else { - if (data3.Start !== undefined) { - let data4 = data3.Start; - const _errs9 = errors; - if (errors === _errs9) { - if (errors === _errs9) { - if (typeof data4 === 'string') { - if (!formats2.validate(data4)) { - validate27.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/Start', - schemaPath: - '#/items/properties/Booked/items/properties/Start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema12.items.properties.Booked.items - .properties.Start, - data: data4, - }, - ]; - return false; - } - } else { - validate27.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/Start', - schemaPath: - '#/items/properties/Booked/items/properties/Start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema12.items.properties.Booked.items - .properties.Start.type, - parentSchema: - schema12.items.properties.Booked.items - .properties.Start, - data: data4, - }, - ]; - return false; - } - } - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.End !== undefined) { - let data5 = data3.End; - const _errs11 = errors; - if (errors === _errs11) { - if (errors === _errs11) { - if (typeof data5 === 'string') { - if (!formats2.validate(data5)) { - validate27.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/End', - schemaPath: - '#/items/properties/Booked/items/properties/End/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema12.items.properties.Booked.items - .properties.End, - data: data5, - }, - ]; - return false; - } - } else { - validate27.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/End', - schemaPath: - '#/items/properties/Booked/items/properties/End/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema12.items.properties.Booked.items - .properties.End.type, - parentSchema: - schema12.items.properties.Booked.items - .properties.End, - data: data5, - }, - ]; - return false; - } - } - } - var valid3 = _errs11 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate27.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Booked/' + i1, - schemaPath: '#/items/properties/Booked/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema12.items.properties.Booked.items.type, - parentSchema: schema12.items.properties.Booked.items, - data: data3, - }, - ]; - return false; - } - } - var valid2 = _errs7 === errors; - if (!valid2) { - break; - } - } - } else { - validate27.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Booked', - schemaPath: '#/items/properties/Booked/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema12.items.properties.Booked.type, - parentSchema: schema12.items.properties.Booked, - data: data2, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Free !== undefined) { - let data6 = data0.Free; - const _errs13 = errors; - if (errors === _errs13) { - if (Array.isArray(data6)) { - var valid4 = true; - const len2 = data6.length; - for (let i2 = 0; i2 < len2; i2++) { - let data7 = data6[i2]; - const _errs15 = errors; - if (errors === _errs15) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing2; - if ( - (data7.Start === undefined && (missing2 = 'Start')) || - (data7.End === undefined && (missing2 = 'End')) - ) { - validate27.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Free/' + i2, - schemaPath: '#/items/properties/Free/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: schema12.items.properties.Free.items.required, - parentSchema: schema12.items.properties.Free.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.Start !== undefined) { - let data8 = data7.Start; - const _errs17 = errors; - if (errors === _errs17) { - if (errors === _errs17) { - if (typeof data8 === 'string') { - if (!formats2.validate(data8)) { - validate27.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/Start', - schemaPath: - '#/items/properties/Free/items/properties/Start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema12.items.properties.Free.items - .properties.Start, - data: data8, - }, - ]; - return false; - } - } else { - validate27.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/Start', - schemaPath: - '#/items/properties/Free/items/properties/Start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema12.items.properties.Free.items - .properties.Start.type, - parentSchema: - schema12.items.properties.Free.items - .properties.Start, - data: data8, - }, - ]; - return false; - } - } - } - var valid5 = _errs17 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data7.End !== undefined) { - let data9 = data7.End; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data9 === 'string') { - if (!formats2.validate(data9)) { - validate27.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/End', - schemaPath: - '#/items/properties/Free/items/properties/End/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + - 'date-time' + - '"', - schema: 'date-time', - parentSchema: - schema12.items.properties.Free.items - .properties.End, - data: data9, - }, - ]; - return false; - } - } else { - validate27.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/End', - schemaPath: - '#/items/properties/Free/items/properties/End/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema12.items.properties.Free.items - .properties.End.type, - parentSchema: - schema12.items.properties.Free.items - .properties.End, - data: data9, - }, - ]; - return false; - } - } - } - var valid5 = _errs19 === errors; - } else { - var valid5 = true; - } - } - } - } else { - validate27.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Free/' + i2, - schemaPath: '#/items/properties/Free/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema12.items.properties.Free.items.type, - parentSchema: schema12.items.properties.Free.items, - data: data7, - }, - ]; - return false; - } - } - var valid4 = _errs15 === errors; - if (!valid4) { - break; - } - } - } else { - validate27.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Free', - schemaPath: '#/items/properties/Free/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema12.items.properties.Free.type, - parentSchema: schema12.items.properties.Free, - data: data6, - }, - ]; - return false; - } - } - var valid1 = _errs13 === errors; - } else { - var valid1 = true; - } - } + validate27.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema12.properties.BookingID.type, + parentSchema: schema12.properties.BookingID, + data: data0, + }, + ]; + return false; } } - } else { - validate27.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema12.items.type, - parentSchema: schema12.items, - data: data0, - }, - ]; - return false; } } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } } } else { validate27.errors = [ @@ -2106,8 +1508,8 @@ function validate27( instancePath, schemaPath: '#/type', keyword: 'type', - params: { type: 'array' }, - message: 'must be array', + params: { type: 'object' }, + message: 'must be object', schema: schema12.type, parentSchema: schema12, data, @@ -2119,13 +1521,13 @@ function validate27( validate27.errors = vErrors; return errors === 0; } -exports.validateScheduleResponse404 = validate28; +exports.validateNewBookingResponse500 = validate28; const schema13 = { + description: 'Error description', type: 'string', - description: 'First unknown device ID.', 'x-standalone': false, - 'x-name': 'scheduleResponse404', - 'x-location': '#/paths//schedule/post/responses/404/content/application/json/schema', + 'x-name': 'newBookingResponse500', + 'x-location': '#/paths//booking/post/responses/500/content/application/json/schema', 'x-schema-type': 'all', }; function validate28( @@ -2152,13 +1554,54 @@ function validate28( validate28.errors = vErrors; return errors === 0; } -exports.validateScheduleResponse422 = validate29; +exports.validateUpdateBookingBody = validate29; const schema14 = { - type: 'string', - description: 'First virtual device ID.', + anyOf: [ + { + type: 'object', + description: 'Use this request for adding devices.', + properties: { + Locked: { + type: 'boolean', + description: + 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', + }, + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + }, + }, + { + type: 'object', + description: 'Use this request for adding callbacks.', + properties: { + Callback: { + type: 'string', + format: 'uri', + description: 'Callback which should be called at changes.', + }, + }, + }, + ], 'x-standalone': false, - 'x-name': 'scheduleResponse422', - 'x-location': '#/paths//schedule/post/responses/422/content/application/json/schema', + 'x-name': 'updateBookingBody', + 'x-location': '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema', 'x-schema-type': 'all', }; function validate29( @@ -2167,461 +1610,306 @@ function validate29( ) { let vErrors = null; let errors = 0; - if (typeof data !== 'string') { - validate29.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema14.type, - parentSchema: schema14, - data, - }, - ]; - return false; - } - validate29.errors = vErrors; - return errors === 0; -} -exports.validateScheduleResponse500 = validate30; -const schema15 = { - type: 'string', - description: 'Error description.', - 'x-standalone': false, - 'x-name': 'scheduleResponse500', - 'x-location': '#/paths//schedule/post/responses/500/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate30( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate30.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema15.type, - parentSchema: schema15, - data, - }, - ]; - return false; - } - validate30.errors = vErrors; - return errors === 0; -} -exports.validateNewBookingBody = validate31; -const schema16 = { - type: 'object', - required: ['Devices', 'Time'], - properties: { - Devices: { - type: 'array', - description: 'List of devices which should be added.', - items: { - title: 'Device', - description: - 'A device might either be a physical/virtual device or a group of device.', - type: 'object', - required: ['ID'], - properties: { - ID: { - type: 'string', - description: - 'Unique ID of the device. Contains the institution (by having an end point at that institution)', - format: 'uri', - }, - }, - }, - }, - Time: { - title: 'Timeslot', - description: 'A time slot represents a slice of time used for bookings.', - type: 'object', - required: ['Start', 'End'], - properties: { - Start: { - type: 'string', - description: 'Start time of the booking.', - format: 'date-time', - }, - End: { - type: 'string', - description: 'End time of the booking.', - format: 'date-time', - }, - }, - }, - Type: { - description: - "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", - type: 'string', - enum: ['normal'], - }, - }, - 'x-standalone': false, - 'x-name': 'newBookingBody', - 'x-location': '#/paths//booking/post/requestBody/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate31( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + if (errors === _errs1) { if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.Devices === undefined && (missing0 = 'Devices')) || - (data.Time === undefined && (missing0 = 'Time')) - ) { - validate31.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema16.required, - parentSchema: schema16, - data, - }, - ]; - return false; + if (data.Locked !== undefined) { + let data0 = data.Locked; + const _errs3 = errors; + if (typeof data0 !== 'boolean') { + const err0 = { + instancePath: instancePath + '/Locked', + schemaPath: '#/anyOf/0/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema14.anyOf[0].properties.Locked.type, + parentSchema: schema14.anyOf[0].properties.Locked, + data: data0, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var valid1 = _errs3 === errors; } else { + var valid1 = true; + } + if (valid1) { if (data.Devices !== undefined) { - let data0 = data.Devices; - const _errs1 = errors; - if (errors === _errs1) { - if (Array.isArray(data0)) { - var valid1 = true; - const len0 = data0.length; + let data1 = data.Devices; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; for (let i0 = 0; i0 < len0; i0++) { - let data1 = data0[i0]; - const _errs3 = errors; - if (errors === _errs3) { - if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { - let missing1; - if (data1.ID === undefined && (missing1 = 'ID')) { - validate31.errors = [ - { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/properties/Devices/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema16.properties.Devices.items.required, - parentSchema: schema16.properties.Devices.items, - data: data1, - }, - ]; - return false; + let data2 = data1[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing0; + if (data2.ID === undefined && (missing0 = 'ID')) { + const err1 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema14.anyOf[0].properties.Devices.items.required, + parentSchema: schema14.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; } else { - if (data1.ID !== undefined) { - let data2 = data1.ID; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats0(data2)) { - validate31.errors = [ - { - instancePath: instancePath + '/Devices/' + i0 + '/ID', - schemaPath: - '#/properties/Devices/items/properties/ID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema16.properties.Devices.items.properties.ID, - data: data2, - }, - ]; - return false; - } - } else { - validate31.errors = [ - { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + const err2 = { instancePath: instancePath + '/Devices/' + i0 + '/ID', schemaPath: - '#/properties/Devices/items/properties/ID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema16.properties.Devices.items.properties.ID.type, + '#/anyOf/0/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', parentSchema: - schema16.properties.Devices.items.properties.ID, - data: data2, - }, - ]; - return false; + schema14.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } else { + const err3 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema14.anyOf[0].properties.Devices.items.properties.ID + .type, + parentSchema: + schema14.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; } } } } } } else { - validate31.errors = [ - { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/properties/Devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema16.properties.Devices.items.type, - parentSchema: schema16.properties.Devices.items, - data: data1, - }, - ]; - return false; - } - } - var valid1 = _errs3 === errors; - if (!valid1) { + const err4 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema14.anyOf[0].properties.Devices.items.type, + parentSchema: schema14.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { break; } } } else { - validate31.errors = [ - { - instancePath: instancePath + '/Devices', - schemaPath: '#/properties/Devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema16.properties.Devices.type, - parentSchema: schema16.properties.Devices, - data: data0, - }, - ]; - return false; + const err5 = { + instancePath: instancePath + '/Devices', + schemaPath: '#/anyOf/0/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema14.anyOf[0].properties.Devices.type, + parentSchema: schema14.anyOf[0].properties.Devices, + data: data1, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; } } - var valid0 = _errs1 === errors; + var valid1 = _errs5 === errors; } else { - var valid0 = true; + var valid1 = true; } - if (valid0) { - if (data.Time !== undefined) { - let data3 = data.Time; - const _errs7 = errors; - if (errors === _errs7) { - if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { - let missing2; - if ( - (data3.Start === undefined && (missing2 = 'Start')) || - (data3.End === undefined && (missing2 = 'End')) - ) { - validate31.errors = [ - { - instancePath: instancePath + '/Time', - schemaPath: '#/properties/Time/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema16.properties.Time.required, - parentSchema: schema16.properties.Time, - data: data3, - }, - ]; - return false; - } else { - if (data3.Start !== undefined) { - let data4 = data3.Start; - const _errs9 = errors; - if (errors === _errs9) { - if (errors === _errs9) { - if (typeof data4 === 'string') { - if (!formats2.validate(data4)) { - validate31.errors = [ - { - instancePath: instancePath + '/Time/Start', - schemaPath: '#/properties/Time/properties/Start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema16.properties.Time.properties.Start, - data: data4, - }, - ]; - return false; - } - } else { - validate31.errors = [ - { - instancePath: instancePath + '/Time/Start', - schemaPath: '#/properties/Time/properties/Start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema16.properties.Time.properties.Start.type, - parentSchema: schema16.properties.Time.properties.Start, - data: data4, - }, - ]; - return false; - } - } - } - var valid3 = _errs9 === errors; + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema14.anyOf[0].type, + parentSchema: schema14.anyOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Callback !== undefined) { + let data4 = data.Callback; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + const err7 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema14.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; } else { - var valid3 = true; - } - if (valid3) { - if (data3.End !== undefined) { - let data5 = data3.End; - const _errs11 = errors; - if (errors === _errs11) { - if (errors === _errs11) { - if (typeof data5 === 'string') { - if (!formats2.validate(data5)) { - validate31.errors = [ - { - instancePath: instancePath + '/Time/End', - schemaPath: '#/properties/Time/properties/End/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema16.properties.Time.properties.End, - data: data5, - }, - ]; - return false; - } - } else { - validate31.errors = [ - { - instancePath: instancePath + '/Time/End', - schemaPath: '#/properties/Time/properties/End/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema16.properties.Time.properties.End.type, - parentSchema: schema16.properties.Time.properties.End, - data: data5, - }, - ]; - return false; - } - } - } - var valid3 = _errs11 === errors; - } else { - var valid3 = true; - } + vErrors.push(err7); } + errors++; } } else { - validate31.errors = [ - { - instancePath: instancePath + '/Time', - schemaPath: '#/properties/Time/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema16.properties.Time.type, - parentSchema: schema16.properties.Time, - data: data3, - }, - ]; - return false; - } - } - var valid0 = _errs7 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.Type !== undefined) { - let data6 = data.Type; - const _errs13 = errors; - if (typeof data6 !== 'string') { - validate31.errors = [ - { - instancePath: instancePath + '/Type', - schemaPath: '#/properties/Type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema16.properties.Type.type, - parentSchema: schema16.properties.Type, - data: data6, - }, - ]; - return false; - } - if (!(data6 === 'normal')) { - validate31.errors = [ - { - instancePath: instancePath + '/Type', - schemaPath: '#/properties/Type/enum', - keyword: 'enum', - params: { allowedValues: schema16.properties.Type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema16.properties.Type.enum, - parentSchema: schema16.properties.Type, - data: data6, - }, - ]; - return false; + const err8 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.anyOf[1].properties.Callback.type, + parentSchema: schema14.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; } - var valid0 = _errs13 === errors; - } else { - var valid0 = true; } } } - } - } else { - validate31.errors = [ - { + } else { + const err9 = { instancePath, - schemaPath: '#/type', + schemaPath: '#/anyOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema16.type, - parentSchema: schema16, + schema: schema14.anyOf[1].type, + parentSchema: schema14.anyOf[1], data, - }, - ]; - return false; - } + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var _valid0 = _errs11 === errors; + valid0 = valid0 || _valid0; } - validate31.errors = vErrors; + if (!valid0) { + const err10 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema14.anyOf, + parentSchema: schema14, + data, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + validate29.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate29.errors = vErrors; return errors === 0; } -exports.validateNewBookingResponse200 = validate32; -const schema17 = { +exports.validateUpdateBookingResponse200 = validate30; +const schema15 = { type: 'object', required: ['BookingID'], - properties: { - BookingID: { - type: 'string', - format: 'uri', - description: 'ID at which the booking can be managed.', - }, - }, + properties: { BookingID: { type: 'string', format: 'uri' } }, 'x-standalone': false, - 'x-name': 'newBookingResponse200', - 'x-location': '#/paths//booking/post/responses/200/content/application/json/schema', + 'x-name': 'updateBookingResponse200', + 'x-location': + '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema', 'x-schema-type': 'all', }; -function validate32( +function validate30( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -2631,15 +1919,15 @@ function validate32( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.BookingID === undefined && (missing0 = 'BookingID')) { - validate32.errors = [ + validate30.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema17.required, - parentSchema: schema17, + schema: schema15.required, + parentSchema: schema15, data, }, ]; @@ -2652,7 +1940,7 @@ function validate32( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate32.errors = [ + validate30.errors = [ { instancePath: instancePath + '/BookingID', schemaPath: '#/properties/BookingID/format', @@ -2660,22 +1948,22 @@ function validate32( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema17.properties.BookingID, + parentSchema: schema15.properties.BookingID, data: data0, }, ]; return false; } } else { - validate32.errors = [ + validate30.errors = [ { instancePath: instancePath + '/BookingID', schemaPath: '#/properties/BookingID/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema17.properties.BookingID.type, - parentSchema: schema17.properties.BookingID, + schema: schema15.properties.BookingID.type, + parentSchema: schema15.properties.BookingID, data: data0, }, ]; @@ -2686,31 +1974,100 @@ function validate32( } } } else { - validate32.errors = [ + validate30.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema17.type, - parentSchema: schema17, + schema: schema15.type, + parentSchema: schema15, data, }, ]; return false; } } + validate30.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse400 = validate31; +const schema16 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse400', + 'x-location': + '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate31( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate31.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.type, + parentSchema: schema16, + data, + }, + ]; + return false; + } + validate31.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse500 = validate32; +const schema17 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate32( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate32.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.type, + parentSchema: schema17, + data, + }, + ]; + return false; + } validate32.errors = vErrors; return errors === 0; } -exports.validateNewBookingResponse500 = validate33; +exports.validateDeleteBookingResponse500 = validate33; const schema18 = { - description: 'Error description', type: 'string', + description: 'Error description', 'x-standalone': false, - 'x-name': 'newBookingResponse500', - 'x-location': '#/paths//booking/post/responses/500/content/application/json/schema', + 'x-name': 'deleteBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema', 'x-schema-type': 'all', }; function validate33( @@ -2737,54 +2094,77 @@ function validate33( validate33.errors = vErrors; return errors === 0; } -exports.validateUpdateBookingBody = validate34; +exports.validateGetBookingResponse200 = validate34; const schema19 = { - anyOf: [ - { + type: 'object', + required: ['Booking', 'Locked'], + properties: { + Booking: { + title: 'Booking', + description: 'A booking in the booking system.', type: 'object', - description: 'Use this request for adding devices.', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], properties: { - Locked: { - type: 'boolean', - description: - 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', - }, - Devices: { - type: 'array', - description: 'List of devices which should be added.', - items: { - title: 'Device', - description: - 'A device might either be a physical/virtual device or a group of device.', - type: 'object', - required: ['ID'], - properties: { - ID: { - type: 'string', - description: - 'Unique ID of the device. Contains the institution (by having an end point at that institution)', - format: 'uri', - }, + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', }, }, }, - }, - }, - { - type: 'object', - description: 'Use this request for adding callbacks.', - properties: { - Callback: { + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", type: 'string', - format: 'uri', - description: 'Callback which should be called at changes.', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', }, }, }, - ], + Locked: { + type: 'boolean', + description: 'Shows if the booking is in a locked status.', + }, + }, 'x-standalone': false, - 'x-name': 'updateBookingBody', - 'x-location': '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema', + 'x-name': 'getBookingResponse200', + 'x-location': '#/paths//booking/{ID}/get/responses/200/content/application/json/schema', 'x-schema-type': 'all', }; function validate34( @@ -2793,592 +2173,29 @@ function validate34( ) { let vErrors = null; let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.Locked !== undefined) { - let data0 = data.Locked; - const _errs3 = errors; - if (typeof data0 !== 'boolean') { - const err0 = { - instancePath: instancePath + '/Locked', - schemaPath: '#/anyOf/0/properties/Locked/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema19.anyOf[0].properties.Locked.type, - parentSchema: schema19.anyOf[0].properties.Locked, - data: data0, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.Devices !== undefined) { - let data1 = data.Devices; - const _errs5 = errors; - if (errors === _errs5) { - if (Array.isArray(data1)) { - var valid2 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; - const _errs7 = errors; - if (errors === _errs7) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - let missing0; - if (data2.ID === undefined && (missing0 = 'ID')) { - const err1 = { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/anyOf/0/properties/Devices/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema19.anyOf[0].properties.Devices.items.required, - parentSchema: schema19.anyOf[0].properties.Devices.items, - data: data2, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } else { - if (data2.ID !== undefined) { - let data3 = data2.ID; - const _errs9 = errors; - if (errors === _errs9) { - if (errors === _errs9) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - const err2 = { - instancePath: instancePath + '/Devices/' + i0 + '/ID', - schemaPath: - '#/anyOf/0/properties/Devices/items/properties/ID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema19.anyOf[0].properties.Devices.items.properties - .ID, - data: data3, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } else { - const err3 = { - instancePath: instancePath + '/Devices/' + i0 + '/ID', - schemaPath: - '#/anyOf/0/properties/Devices/items/properties/ID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema19.anyOf[0].properties.Devices.items.properties.ID - .type, - parentSchema: - schema19.anyOf[0].properties.Devices.items.properties - .ID, - data: data3, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - } - } - } - } - } else { - const err4 = { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/anyOf/0/properties/Devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema19.anyOf[0].properties.Devices.items.type, - parentSchema: schema19.anyOf[0].properties.Devices.items, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - } - var valid2 = _errs7 === errors; - if (!valid2) { - break; - } - } - } else { - const err5 = { - instancePath: instancePath + '/Devices', - schemaPath: '#/anyOf/0/properties/Devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema19.anyOf[0].properties.Devices.type, - parentSchema: schema19.anyOf[0].properties.Devices, - data: data1, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - const err6 = { - instancePath, - schemaPath: '#/anyOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema19.anyOf[0].type, - parentSchema: schema19.anyOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.Callback !== undefined) { - let data4 = data.Callback; - const _errs13 = errors; - if (errors === _errs13) { - if (errors === _errs13) { - if (typeof data4 === 'string') { - if (!formats0(data4)) { - const err7 = { - instancePath: instancePath + '/Callback', - schemaPath: '#/anyOf/1/properties/Callback/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema19.anyOf[1].properties.Callback, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: instancePath + '/Callback', - schemaPath: '#/anyOf/1/properties/Callback/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema19.anyOf[1].properties.Callback.type, - parentSchema: schema19.anyOf[1].properties.Callback, - data: data4, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } else { - const err9 = { - instancePath, - schemaPath: '#/anyOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema19.anyOf[1].type, - parentSchema: schema19.anyOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var _valid0 = _errs11 === errors; - valid0 = valid0 || _valid0; - } - if (!valid0) { - const err10 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema19.anyOf, - parentSchema: schema19, - data, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - validate34.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate34.errors = vErrors; - return errors === 0; -} -exports.validateUpdateBookingResponse200 = validate35; -const schema20 = { - type: 'object', - required: ['BookingID'], - properties: { BookingID: { type: 'string', format: 'uri' } }, - 'x-standalone': false, - 'x-name': 'updateBookingResponse200', - 'x-location': - '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate35( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { + if (errors === 0) { if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; - if (data.BookingID === undefined && (missing0 = 'BookingID')) { - validate35.errors = [ + if ( + (data.Booking === undefined && (missing0 = 'Booking')) || + (data.Locked === undefined && (missing0 = 'Locked')) + ) { + validate34.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema20.required, - parentSchema: schema20, + schema: schema19.required, + parentSchema: schema19, data, }, ]; return false; } else { - if (data.BookingID !== undefined) { - let data0 = data.BookingID; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate35.errors = [ - { - instancePath: instancePath + '/BookingID', - schemaPath: '#/properties/BookingID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema20.properties.BookingID, - data: data0, - }, - ]; - return false; - } - } else { - validate35.errors = [ - { - instancePath: instancePath + '/BookingID', - schemaPath: '#/properties/BookingID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema20.properties.BookingID.type, - parentSchema: schema20.properties.BookingID, - data: data0, - }, - ]; - return false; - } - } - } - } - } - } else { - validate35.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema20.type, - parentSchema: schema20, - data, - }, - ]; - return false; - } - } - validate35.errors = vErrors; - return errors === 0; -} -exports.validateUpdateBookingResponse400 = validate36; -const schema21 = { - type: 'string', - description: 'Error description', - 'x-standalone': false, - 'x-name': 'updateBookingResponse400', - 'x-location': - '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate36( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate36.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema21.type, - parentSchema: schema21, - data, - }, - ]; - return false; - } - validate36.errors = vErrors; - return errors === 0; -} -exports.validateUpdateBookingResponse500 = validate37; -const schema22 = { - type: 'string', - description: 'Error description', - 'x-standalone': false, - 'x-name': 'updateBookingResponse500', - 'x-location': - '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate37( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate37.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema22.type, - parentSchema: schema22, - data, - }, - ]; - return false; - } - validate37.errors = vErrors; - return errors === 0; -} -exports.validateDeleteBookingResponse500 = validate38; -const schema23 = { - type: 'string', - description: 'Error description', - 'x-standalone': false, - 'x-name': 'deleteBookingResponse500', - 'x-location': - '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate38( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate38.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema23.type, - parentSchema: schema23, - data, - }, - ]; - return false; - } - validate38.errors = vErrors; - return errors === 0; -} -exports.validateGetBookingResponse200 = validate39; -const schema24 = { - type: 'object', - required: ['Booking', 'Locked'], - properties: { - Booking: { - title: 'Booking', - description: 'A booking in the booking system.', - type: 'object', - required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], - properties: { - ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, - Time: { - title: 'Timeslot', - description: 'A time slot represents a slice of time used for bookings.', - type: 'object', - required: ['Start', 'End'], - properties: { - Start: { - type: 'string', - description: 'Start time of the booking.', - format: 'date-time', - }, - End: { - type: 'string', - description: 'End time of the booking.', - format: 'date-time', - }, - }, - }, - Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, - Type: { - description: - "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", - type: 'string', - enum: ['normal'], - }, - Status: { - description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", - type: 'string', - enum: [ - 'pending', - 'booked', - 'rejected', - 'cancelled', - 'active', - 'active-pending', - 'active-rejected', - ], - }, - You: { type: 'boolean', description: 'If true, this booking was done by you.' }, - External: { - type: 'boolean', - description: 'Shows whether the booking was done by an external institution.', - }, - Message: { - type: 'string', - description: - 'User readable notes about the status of the booking (e.g. if devices are unknown).', - }, - }, - }, - Locked: { - type: 'boolean', - description: 'Shows if the booking is in a locked status.', - }, - }, - 'x-standalone': false, - 'x-name': 'getBookingResponse200', - 'x-location': '#/paths//booking/{ID}/get/responses/200/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate39( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.Booking === undefined && (missing0 = 'Booking')) || - (data.Locked === undefined && (missing0 = 'Locked')) - ) { - validate39.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema24.required, - parentSchema: schema24, - data, - }, - ]; - return false; - } else { - if (data.Booking !== undefined) { - let data0 = data.Booking; + if (data.Booking !== undefined) { + let data0 = data.Booking; const _errs1 = errors; if (errors === _errs1) { if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { @@ -3391,15 +2208,15 @@ function validate39( (data0.You === undefined && (missing1 = 'You')) || (data0.External === undefined && (missing1 = 'External')) ) { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking', schemaPath: '#/properties/Booking/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema24.properties.Booking.required, - parentSchema: schema24.properties.Booking, + schema: schema19.properties.Booking.required, + parentSchema: schema19.properties.Booking, data: data0, }, ]; @@ -3412,7 +2229,7 @@ function validate39( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats0(data1)) { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/ID', schemaPath: '#/properties/Booking/properties/ID/format', @@ -3420,22 +2237,22 @@ function validate39( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema24.properties.Booking.properties.ID, + parentSchema: schema19.properties.Booking.properties.ID, data: data1, }, ]; return false; } } else { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/ID', schemaPath: '#/properties/Booking/properties/ID/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema24.properties.Booking.properties.ID.type, - parentSchema: schema24.properties.Booking.properties.ID, + schema: schema19.properties.Booking.properties.ID.type, + parentSchema: schema19.properties.Booking.properties.ID, data: data1, }, ]; @@ -3458,7 +2275,7 @@ function validate39( (data2.Start === undefined && (missing2 = 'Start')) || (data2.End === undefined && (missing2 = 'End')) ) { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Time', schemaPath: '#/properties/Booking/properties/Time/required', @@ -3466,8 +2283,8 @@ function validate39( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema24.properties.Booking.properties.Time.required, - parentSchema: schema24.properties.Booking.properties.Time, + schema19.properties.Booking.properties.Time.required, + parentSchema: schema19.properties.Booking.properties.Time, data: data2, }, ]; @@ -3480,7 +2297,7 @@ function validate39( if (errors === _errs7) { if (typeof data3 === 'string') { if (!formats2.validate(data3)) { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Time/Start', @@ -3492,7 +2309,7 @@ function validate39( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema24.properties.Booking.properties.Time + schema19.properties.Booking.properties.Time .properties.Start, data: data3, }, @@ -3500,7 +2317,7 @@ function validate39( return false; } } else { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Time/Start', schemaPath: @@ -3509,10 +2326,10 @@ function validate39( params: { type: 'string' }, message: 'must be string', schema: - schema24.properties.Booking.properties.Time + schema19.properties.Booking.properties.Time .properties.Start.type, parentSchema: - schema24.properties.Booking.properties.Time + schema19.properties.Booking.properties.Time .properties.Start, data: data3, }, @@ -3533,7 +2350,7 @@ function validate39( if (errors === _errs9) { if (typeof data4 === 'string') { if (!formats2.validate(data4)) { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Time/End', @@ -3545,7 +2362,7 @@ function validate39( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema24.properties.Booking.properties.Time + schema19.properties.Booking.properties.Time .properties.End, data: data4, }, @@ -3553,7 +2370,7 @@ function validate39( return false; } } else { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Time/End', schemaPath: @@ -3562,10 +2379,10 @@ function validate39( params: { type: 'string' }, message: 'must be string', schema: - schema24.properties.Booking.properties.Time + schema19.properties.Booking.properties.Time .properties.End.type, parentSchema: - schema24.properties.Booking.properties.Time + schema19.properties.Booking.properties.Time .properties.End, data: data4, }, @@ -3581,15 +2398,15 @@ function validate39( } } } else { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Time', schemaPath: '#/properties/Booking/properties/Time/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema24.properties.Booking.properties.Time.type, - parentSchema: schema24.properties.Booking.properties.Time, + schema: schema19.properties.Booking.properties.Time.type, + parentSchema: schema19.properties.Booking.properties.Time, data: data2, }, ]; @@ -3615,7 +2432,7 @@ function validate39( if (errors === _errs13) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Devices/' + i0, @@ -3626,7 +2443,7 @@ function validate39( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema24.properties.Booking.properties.Devices + schema19.properties.Booking.properties.Devices .items, data: data6, }, @@ -3634,7 +2451,7 @@ function validate39( return false; } } else { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Devices/' + i0, @@ -3644,10 +2461,10 @@ function validate39( params: { type: 'string' }, message: 'must be string', schema: - schema24.properties.Booking.properties.Devices + schema19.properties.Booking.properties.Devices .items.type, parentSchema: - schema24.properties.Booking.properties.Devices + schema19.properties.Booking.properties.Devices .items, data: data6, }, @@ -3662,16 +2479,16 @@ function validate39( } } } else { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Devices', schemaPath: '#/properties/Booking/properties/Devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema24.properties.Booking.properties.Devices.type, + schema: schema19.properties.Booking.properties.Devices.type, parentSchema: - schema24.properties.Booking.properties.Devices, + schema19.properties.Booking.properties.Devices, data: data5, }, ]; @@ -3687,33 +2504,33 @@ function validate39( let data7 = data0.Type; const _errs15 = errors; if (typeof data7 !== 'string') { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Type', schemaPath: '#/properties/Booking/properties/Type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema24.properties.Booking.properties.Type.type, - parentSchema: schema24.properties.Booking.properties.Type, + schema: schema19.properties.Booking.properties.Type.type, + parentSchema: schema19.properties.Booking.properties.Type, data: data7, }, ]; return false; } if (!(data7 === 'normal')) { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Type', schemaPath: '#/properties/Booking/properties/Type/enum', keyword: 'enum', params: { allowedValues: - schema24.properties.Booking.properties.Type.enum, + schema19.properties.Booking.properties.Type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema24.properties.Booking.properties.Type.enum, - parentSchema: schema24.properties.Booking.properties.Type, + schema: schema19.properties.Booking.properties.Type.enum, + parentSchema: schema19.properties.Booking.properties.Type, data: data7, }, ]; @@ -3728,7 +2545,7 @@ function validate39( let data8 = data0.Status; const _errs17 = errors; if (typeof data8 !== 'string') { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Status', schemaPath: '#/properties/Booking/properties/Status/type', @@ -3736,9 +2553,9 @@ function validate39( params: { type: 'string' }, message: 'must be string', schema: - schema24.properties.Booking.properties.Status.type, + schema19.properties.Booking.properties.Status.type, parentSchema: - schema24.properties.Booking.properties.Status, + schema19.properties.Booking.properties.Status, data: data8, }, ]; @@ -3755,20 +2572,20 @@ function validate39( data8 === 'active-rejected' ) ) { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Status', schemaPath: '#/properties/Booking/properties/Status/enum', keyword: 'enum', params: { allowedValues: - schema24.properties.Booking.properties.Status.enum, + schema19.properties.Booking.properties.Status.enum, }, message: 'must be equal to one of the allowed values', schema: - schema24.properties.Booking.properties.Status.enum, + schema19.properties.Booking.properties.Status.enum, parentSchema: - schema24.properties.Booking.properties.Status, + schema19.properties.Booking.properties.Status, data: data8, }, ]; @@ -3783,16 +2600,16 @@ function validate39( let data9 = data0.You; const _errs19 = errors; if (typeof data9 !== 'boolean') { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/You', schemaPath: '#/properties/Booking/properties/You/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema24.properties.Booking.properties.You.type, + schema: schema19.properties.Booking.properties.You.type, parentSchema: - schema24.properties.Booking.properties.You, + schema19.properties.Booking.properties.You, data: data9, }, ]; @@ -3807,7 +2624,7 @@ function validate39( let data10 = data0.External; const _errs21 = errors; if (typeof data10 !== 'boolean') { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/External', schemaPath: @@ -3816,10 +2633,10 @@ function validate39( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema24.properties.Booking.properties.External + schema19.properties.Booking.properties.External .type, parentSchema: - schema24.properties.Booking.properties.External, + schema19.properties.Booking.properties.External, data: data10, }, ]; @@ -3834,7 +2651,7 @@ function validate39( let data11 = data0.Message; const _errs23 = errors; if (typeof data11 !== 'string') { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking/Message', schemaPath: @@ -3843,10 +2660,10 @@ function validate39( params: { type: 'string' }, message: 'must be string', schema: - schema24.properties.Booking.properties.Message + schema19.properties.Booking.properties.Message .type, parentSchema: - schema24.properties.Booking.properties.Message, + schema19.properties.Booking.properties.Message, data: data11, }, ]; @@ -3865,15 +2682,15 @@ function validate39( } } } else { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Booking', schemaPath: '#/properties/Booking/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema24.properties.Booking.type, - parentSchema: schema24.properties.Booking, + schema: schema19.properties.Booking.type, + parentSchema: schema19.properties.Booking, data: data0, }, ]; @@ -3889,15 +2706,15 @@ function validate39( let data12 = data.Locked; const _errs25 = errors; if (typeof data12 !== 'boolean') { - validate39.errors = [ + validate34.errors = [ { instancePath: instancePath + '/Locked', schemaPath: '#/properties/Locked/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema24.properties.Locked.type, - parentSchema: schema24.properties.Locked, + schema: schema19.properties.Locked.type, + parentSchema: schema19.properties.Locked, data: data12, }, ]; @@ -3910,26 +2727,26 @@ function validate39( } } } else { - validate39.errors = [ + validate34.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema24.type, - parentSchema: schema24, + schema: schema19.type, + parentSchema: schema19, data, }, ]; return false; } } - validate39.errors = vErrors; + validate34.errors = vErrors; return errors === 0; } -exports.validateGetBookingResponse500 = validate40; -const schema25 = { +exports.validateGetBookingResponse500 = validate35; +const schema20 = { type: 'string', description: 'Error code', 'x-standalone': false, @@ -3937,32 +2754,32 @@ const schema25 = { 'x-location': '#/paths//booking/{ID}/get/responses/500/content/application/json/schema', 'x-schema-type': 'all', }; -function validate40( +function validate35( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate40.errors = [ + validate35.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema25.type, - parentSchema: schema25, + schema: schema20.type, + parentSchema: schema20, data, }, ]; return false; } - validate40.errors = vErrors; + validate35.errors = vErrors; return errors === 0; } -exports.validateDestroyBookingResponse500 = validate41; -const schema26 = { +exports.validateDestroyBookingResponse500 = validate36; +const schema21 = { type: 'string', description: 'Error description', 'x-standalone': false, @@ -3971,314 +2788,32 @@ const schema26 = { '#/paths//booking/{ID}/destroy/delete/responses/500/content/application/json/schema', 'x-schema-type': 'all', }; -function validate41( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate41.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema26.type, - parentSchema: schema26, - data, - }, - ]; - return false; - } - validate41.errors = vErrors; - return errors === 0; -} -exports.validateLockBookingResponse200 = validate42; -const schema27 = { - type: 'array', - description: - 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', - items: { - type: 'object', - required: ['Requested', 'Selected'], - properties: { - Requested: { type: 'string', format: 'uri' }, - Selected: { type: 'string', format: 'uri' }, - }, - }, - 'x-standalone': false, - 'x-name': 'lockBookingResponse200', - 'x-location': - '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate42( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if ( - (data0.Requested === undefined && (missing0 = 'Requested')) || - (data0.Selected === undefined && (missing0 = 'Selected')) - ) { - validate42.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema27.items.required, - parentSchema: schema27.items, - data: data0, - }, - ]; - return false; - } else { - if (data0.Requested !== undefined) { - let data1 = data0.Requested; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats0(data1)) { - validate42.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Requested', - schemaPath: '#/items/properties/Requested/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema27.items.properties.Requested, - data: data1, - }, - ]; - return false; - } - } else { - validate42.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Requested', - schemaPath: '#/items/properties/Requested/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.items.properties.Requested.type, - parentSchema: schema27.items.properties.Requested, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Selected !== undefined) { - let data2 = data0.Selected; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats0(data2)) { - validate42.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Selected', - schemaPath: '#/items/properties/Selected/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema27.items.properties.Selected, - data: data2, - }, - ]; - return false; - } - } else { - validate42.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Selected', - schemaPath: '#/items/properties/Selected/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.items.properties.Selected.type, - parentSchema: schema27.items.properties.Selected, - data: data2, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } - } else { - validate42.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema27.items.type, - parentSchema: schema27.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate42.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.type, - parentSchema: schema27, - data, - }, - ]; - return false; - } - } - validate42.errors = vErrors; - return errors === 0; -} -exports.validateLockBookingResponse500 = validate43; -const schema28 = { - type: 'string', - description: 'Error string', - 'x-standalone': false, - 'x-name': 'lockBookingResponse500', - 'x-location': - '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate43( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate43.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema28.type, - parentSchema: schema28, - data, - }, - ]; - return false; - } - validate43.errors = vErrors; - return errors === 0; -} -exports.validateUnlockBookingResponse500 = validate44; -const schema29 = { - type: 'string', - description: 'Error description.', - 'x-standalone': false, - 'x-name': 'unlockBookingResponse500', - 'x-location': - '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate44( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate44.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema29.type, - parentSchema: schema29, - data, - }, - ]; - return false; - } - validate44.errors = vErrors; - return errors === 0; -} -exports.validateBookingCallbackResponse500 = validate45; -const schema30 = { - type: 'string', - description: 'Error description.', - 'x-standalone': false, - 'x-name': 'bookingCallbackResponse500', - 'x-location': - '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate45( +function validate36( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate45.errors = [ + validate36.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema30.type, - parentSchema: schema30, + schema: schema21.type, + parentSchema: schema21, data, }, ]; return false; } - validate45.errors = vErrors; + validate36.errors = vErrors; return errors === 0; } -exports.validateBookingRequest = validate46; -const schema31 = { +exports.validateBookingRequest = validate37; +const schema22 = { title: 'Booking', description: 'A booking in the booking system.', type: 'object', @@ -4312,7 +2847,7 @@ const schema31 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -4340,7 +2875,7 @@ const schema31 = { 'x-location': '#/components/schemas/Booking_request', 'x-schema-type': 'request', }; -function validate46( +function validate37( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -4357,15 +2892,15 @@ function validate46( (data.You === undefined && (missing0 = 'You')) || (data.External === undefined && (missing0 = 'External')) ) { - validate46.errors = [ + validate37.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema31.required, - parentSchema: schema31, + schema: schema22.required, + parentSchema: schema22, data, }, ]; @@ -4378,7 +2913,7 @@ function validate46( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/ID', schemaPath: '#/properties/ID/format', @@ -4386,22 +2921,22 @@ function validate46( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema31.properties.ID, + parentSchema: schema22.properties.ID, data: data0, }, ]; return false; } } else { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/ID', schemaPath: '#/properties/ID/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema31.properties.ID.type, - parentSchema: schema31.properties.ID, + schema: schema22.properties.ID.type, + parentSchema: schema22.properties.ID, data: data0, }, ]; @@ -4424,15 +2959,15 @@ function validate46( (data1.Start === undefined && (missing1 = 'Start')) || (data1.End === undefined && (missing1 = 'End')) ) { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Time', schemaPath: '#/properties/Time/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema31.properties.Time.required, - parentSchema: schema31.properties.Time, + schema: schema22.properties.Time.required, + parentSchema: schema22.properties.Time, data: data1, }, ]; @@ -4445,7 +2980,7 @@ function validate46( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats2.validate(data2)) { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Time/Start', schemaPath: '#/properties/Time/properties/Start/format', @@ -4453,22 +2988,22 @@ function validate46( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema31.properties.Time.properties.Start, + parentSchema: schema22.properties.Time.properties.Start, data: data2, }, ]; return false; } } else { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Time/Start', schemaPath: '#/properties/Time/properties/Start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema31.properties.Time.properties.Start.type, - parentSchema: schema31.properties.Time.properties.Start, + schema: schema22.properties.Time.properties.Start.type, + parentSchema: schema22.properties.Time.properties.Start, data: data2, }, ]; @@ -4488,7 +3023,7 @@ function validate46( if (errors === _errs7) { if (typeof data3 === 'string') { if (!formats2.validate(data3)) { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Time/End', schemaPath: '#/properties/Time/properties/End/format', @@ -4496,22 +3031,22 @@ function validate46( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema31.properties.Time.properties.End, + parentSchema: schema22.properties.Time.properties.End, data: data3, }, ]; return false; } } else { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Time/End', schemaPath: '#/properties/Time/properties/End/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema31.properties.Time.properties.End.type, - parentSchema: schema31.properties.Time.properties.End, + schema: schema22.properties.Time.properties.End.type, + parentSchema: schema22.properties.Time.properties.End, data: data3, }, ]; @@ -4526,15 +3061,15 @@ function validate46( } } } else { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Time', schemaPath: '#/properties/Time/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema31.properties.Time.type, - parentSchema: schema31.properties.Time, + schema: schema22.properties.Time.type, + parentSchema: schema22.properties.Time, data: data1, }, ]; @@ -4560,7 +3095,7 @@ function validate46( if (errors === _errs11) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Devices/' + i0, schemaPath: '#/properties/Devices/items/format', @@ -4568,22 +3103,22 @@ function validate46( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema31.properties.Devices.items, + parentSchema: schema22.properties.Devices.items, data: data5, }, ]; return false; } } else { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Devices/' + i0, schemaPath: '#/properties/Devices/items/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema31.properties.Devices.items.type, - parentSchema: schema31.properties.Devices.items, + schema: schema22.properties.Devices.items.type, + parentSchema: schema22.properties.Devices.items, data: data5, }, ]; @@ -4597,15 +3132,15 @@ function validate46( } } } else { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Devices', schemaPath: '#/properties/Devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema31.properties.Devices.type, - parentSchema: schema31.properties.Devices, + schema: schema22.properties.Devices.type, + parentSchema: schema22.properties.Devices, data: data4, }, ]; @@ -4621,30 +3156,30 @@ function validate46( let data6 = data.Type; const _errs13 = errors; if (typeof data6 !== 'string') { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Type', schemaPath: '#/properties/Type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema31.properties.Type.type, - parentSchema: schema31.properties.Type, + schema: schema22.properties.Type.type, + parentSchema: schema22.properties.Type, data: data6, }, ]; return false; } if (!(data6 === 'normal')) { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Type', schemaPath: '#/properties/Type/enum', keyword: 'enum', - params: { allowedValues: schema31.properties.Type.enum }, + params: { allowedValues: schema22.properties.Type.enum }, message: 'must be equal to one of the allowed values', - schema: schema31.properties.Type.enum, - parentSchema: schema31.properties.Type, + schema: schema22.properties.Type.enum, + parentSchema: schema22.properties.Type, data: data6, }, ]; @@ -4659,15 +3194,15 @@ function validate46( let data7 = data.Status; const _errs15 = errors; if (typeof data7 !== 'string') { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Status', schemaPath: '#/properties/Status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema31.properties.Status.type, - parentSchema: schema31.properties.Status, + schema: schema22.properties.Status.type, + parentSchema: schema22.properties.Status, data: data7, }, ]; @@ -4684,15 +3219,15 @@ function validate46( data7 === 'active-rejected' ) ) { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Status', schemaPath: '#/properties/Status/enum', keyword: 'enum', - params: { allowedValues: schema31.properties.Status.enum }, + params: { allowedValues: schema22.properties.Status.enum }, message: 'must be equal to one of the allowed values', - schema: schema31.properties.Status.enum, - parentSchema: schema31.properties.Status, + schema: schema22.properties.Status.enum, + parentSchema: schema22.properties.Status, data: data7, }, ]; @@ -4707,15 +3242,15 @@ function validate46( let data8 = data.You; const _errs17 = errors; if (typeof data8 !== 'boolean') { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/You', schemaPath: '#/properties/You/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema31.properties.You.type, - parentSchema: schema31.properties.You, + schema: schema22.properties.You.type, + parentSchema: schema22.properties.You, data: data8, }, ]; @@ -4730,15 +3265,15 @@ function validate46( let data9 = data.External; const _errs19 = errors; if (typeof data9 !== 'boolean') { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/External', schemaPath: '#/properties/External/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema31.properties.External.type, - parentSchema: schema31.properties.External, + schema: schema22.properties.External.type, + parentSchema: schema22.properties.External, data: data9, }, ]; @@ -4753,15 +3288,15 @@ function validate46( let data10 = data.Message; const _errs21 = errors; if (typeof data10 !== 'string') { - validate46.errors = [ + validate37.errors = [ { instancePath: instancePath + '/Message', schemaPath: '#/properties/Message/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema31.properties.Message.type, - parentSchema: schema31.properties.Message, + schema: schema22.properties.Message.type, + parentSchema: schema22.properties.Message, data: data10, }, ]; @@ -4780,26 +3315,26 @@ function validate46( } } } else { - validate46.errors = [ + validate37.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema31.type, - parentSchema: schema31, + schema: schema22.type, + parentSchema: schema22, data, }, ]; return false; } } - validate46.errors = vErrors; + validate37.errors = vErrors; return errors === 0; } -exports.validateBookingResponse = validate47; -const schema32 = { +exports.validateBookingResponse = validate38; +const schema23 = { title: 'Booking', description: 'A booking in the booking system.', type: 'object', @@ -4833,7 +3368,7 @@ const schema32 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -4861,7 +3396,7 @@ const schema32 = { 'x-location': '#/components/schemas/Booking_response', 'x-schema-type': 'response', }; -function validate47( +function validate38( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -4878,15 +3413,15 @@ function validate47( (data.You === undefined && (missing0 = 'You')) || (data.External === undefined && (missing0 = 'External')) ) { - validate47.errors = [ + validate38.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema32.required, - parentSchema: schema32, + schema: schema23.required, + parentSchema: schema23, data, }, ]; @@ -4899,7 +3434,7 @@ function validate47( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/ID', schemaPath: '#/properties/ID/format', @@ -4907,22 +3442,22 @@ function validate47( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema32.properties.ID, + parentSchema: schema23.properties.ID, data: data0, }, ]; return false; } } else { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/ID', schemaPath: '#/properties/ID/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema32.properties.ID.type, - parentSchema: schema32.properties.ID, + schema: schema23.properties.ID.type, + parentSchema: schema23.properties.ID, data: data0, }, ]; @@ -4945,15 +3480,15 @@ function validate47( (data1.Start === undefined && (missing1 = 'Start')) || (data1.End === undefined && (missing1 = 'End')) ) { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Time', schemaPath: '#/properties/Time/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema32.properties.Time.required, - parentSchema: schema32.properties.Time, + schema: schema23.properties.Time.required, + parentSchema: schema23.properties.Time, data: data1, }, ]; @@ -4966,7 +3501,7 @@ function validate47( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats2.validate(data2)) { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Time/Start', schemaPath: '#/properties/Time/properties/Start/format', @@ -4974,22 +3509,22 @@ function validate47( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema32.properties.Time.properties.Start, + parentSchema: schema23.properties.Time.properties.Start, data: data2, }, ]; return false; } } else { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Time/Start', schemaPath: '#/properties/Time/properties/Start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema32.properties.Time.properties.Start.type, - parentSchema: schema32.properties.Time.properties.Start, + schema: schema23.properties.Time.properties.Start.type, + parentSchema: schema23.properties.Time.properties.Start, data: data2, }, ]; @@ -5009,7 +3544,7 @@ function validate47( if (errors === _errs7) { if (typeof data3 === 'string') { if (!formats2.validate(data3)) { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Time/End', schemaPath: '#/properties/Time/properties/End/format', @@ -5017,22 +3552,22 @@ function validate47( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema32.properties.Time.properties.End, + parentSchema: schema23.properties.Time.properties.End, data: data3, }, ]; return false; } } else { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Time/End', schemaPath: '#/properties/Time/properties/End/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema32.properties.Time.properties.End.type, - parentSchema: schema32.properties.Time.properties.End, + schema: schema23.properties.Time.properties.End.type, + parentSchema: schema23.properties.Time.properties.End, data: data3, }, ]; @@ -5047,15 +3582,15 @@ function validate47( } } } else { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Time', schemaPath: '#/properties/Time/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema32.properties.Time.type, - parentSchema: schema32.properties.Time, + schema: schema23.properties.Time.type, + parentSchema: schema23.properties.Time, data: data1, }, ]; @@ -5081,7 +3616,7 @@ function validate47( if (errors === _errs11) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Devices/' + i0, schemaPath: '#/properties/Devices/items/format', @@ -5089,22 +3624,22 @@ function validate47( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema32.properties.Devices.items, + parentSchema: schema23.properties.Devices.items, data: data5, }, ]; return false; } } else { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Devices/' + i0, schemaPath: '#/properties/Devices/items/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema32.properties.Devices.items.type, - parentSchema: schema32.properties.Devices.items, + schema: schema23.properties.Devices.items.type, + parentSchema: schema23.properties.Devices.items, data: data5, }, ]; @@ -5118,15 +3653,15 @@ function validate47( } } } else { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Devices', schemaPath: '#/properties/Devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema32.properties.Devices.type, - parentSchema: schema32.properties.Devices, + schema: schema23.properties.Devices.type, + parentSchema: schema23.properties.Devices, data: data4, }, ]; @@ -5142,30 +3677,30 @@ function validate47( let data6 = data.Type; const _errs13 = errors; if (typeof data6 !== 'string') { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Type', schemaPath: '#/properties/Type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema32.properties.Type.type, - parentSchema: schema32.properties.Type, + schema: schema23.properties.Type.type, + parentSchema: schema23.properties.Type, data: data6, }, ]; return false; } if (!(data6 === 'normal')) { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Type', schemaPath: '#/properties/Type/enum', keyword: 'enum', - params: { allowedValues: schema32.properties.Type.enum }, + params: { allowedValues: schema23.properties.Type.enum }, message: 'must be equal to one of the allowed values', - schema: schema32.properties.Type.enum, - parentSchema: schema32.properties.Type, + schema: schema23.properties.Type.enum, + parentSchema: schema23.properties.Type, data: data6, }, ]; @@ -5180,15 +3715,15 @@ function validate47( let data7 = data.Status; const _errs15 = errors; if (typeof data7 !== 'string') { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Status', schemaPath: '#/properties/Status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema32.properties.Status.type, - parentSchema: schema32.properties.Status, + schema: schema23.properties.Status.type, + parentSchema: schema23.properties.Status, data: data7, }, ]; @@ -5205,15 +3740,15 @@ function validate47( data7 === 'active-rejected' ) ) { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Status', schemaPath: '#/properties/Status/enum', keyword: 'enum', - params: { allowedValues: schema32.properties.Status.enum }, + params: { allowedValues: schema23.properties.Status.enum }, message: 'must be equal to one of the allowed values', - schema: schema32.properties.Status.enum, - parentSchema: schema32.properties.Status, + schema: schema23.properties.Status.enum, + parentSchema: schema23.properties.Status, data: data7, }, ]; @@ -5228,15 +3763,15 @@ function validate47( let data8 = data.You; const _errs17 = errors; if (typeof data8 !== 'boolean') { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/You', schemaPath: '#/properties/You/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema32.properties.You.type, - parentSchema: schema32.properties.You, + schema: schema23.properties.You.type, + parentSchema: schema23.properties.You, data: data8, }, ]; @@ -5251,15 +3786,15 @@ function validate47( let data9 = data.External; const _errs19 = errors; if (typeof data9 !== 'boolean') { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/External', schemaPath: '#/properties/External/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema32.properties.External.type, - parentSchema: schema32.properties.External, + schema: schema23.properties.External.type, + parentSchema: schema23.properties.External, data: data9, }, ]; @@ -5274,15 +3809,15 @@ function validate47( let data10 = data.Message; const _errs21 = errors; if (typeof data10 !== 'string') { - validate47.errors = [ + validate38.errors = [ { instancePath: instancePath + '/Message', schemaPath: '#/properties/Message/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema32.properties.Message.type, - parentSchema: schema32.properties.Message, + schema: schema23.properties.Message.type, + parentSchema: schema23.properties.Message, data: data10, }, ]; @@ -5301,26 +3836,26 @@ function validate47( } } } else { - validate47.errors = [ + validate38.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema32.type, - parentSchema: schema32, + schema: schema23.type, + parentSchema: schema23, data, }, ]; return false; } } - validate47.errors = vErrors; + validate38.errors = vErrors; return errors === 0; } -exports.validateDeviceRequest = validate48; -const schema33 = { +exports.validateDeviceRequest = validate39; +const schema24 = { title: 'Device', description: 'A device might either be a physical/virtual device or a group of device.', type: 'object', @@ -5338,7 +3873,7 @@ const schema33 = { 'x-location': '#/components/schemas/Device_request', 'x-schema-type': 'request', }; -function validate48( +function validate39( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -5348,15 +3883,15 @@ function validate48( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.ID === undefined && (missing0 = 'ID')) { - validate48.errors = [ + validate39.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema33.required, - parentSchema: schema33, + schema: schema24.required, + parentSchema: schema24, data, }, ]; @@ -5369,7 +3904,7 @@ function validate48( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate48.errors = [ + validate39.errors = [ { instancePath: instancePath + '/ID', schemaPath: '#/properties/ID/format', @@ -5377,22 +3912,22 @@ function validate48( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema33.properties.ID, + parentSchema: schema24.properties.ID, data: data0, }, ]; return false; } } else { - validate48.errors = [ + validate39.errors = [ { instancePath: instancePath + '/ID', schemaPath: '#/properties/ID/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema33.properties.ID.type, - parentSchema: schema33.properties.ID, + schema: schema24.properties.ID.type, + parentSchema: schema24.properties.ID, data: data0, }, ]; @@ -5403,26 +3938,26 @@ function validate48( } } } else { - validate48.errors = [ + validate39.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema33.type, - parentSchema: schema33, + schema: schema24.type, + parentSchema: schema24, data, }, ]; return false; } } - validate48.errors = vErrors; + validate39.errors = vErrors; return errors === 0; } -exports.validateDeviceResponse = validate49; -const schema34 = { +exports.validateDeviceResponse = validate40; +const schema25 = { title: 'Device', description: 'A device might either be a physical/virtual device or a group of device.', type: 'object', @@ -5440,7 +3975,7 @@ const schema34 = { 'x-location': '#/components/schemas/Device_response', 'x-schema-type': 'response', }; -function validate49( +function validate40( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -5450,15 +3985,15 @@ function validate49( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.ID === undefined && (missing0 = 'ID')) { - validate49.errors = [ + validate40.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema34.required, - parentSchema: schema34, + schema: schema25.required, + parentSchema: schema25, data, }, ]; @@ -5471,7 +4006,7 @@ function validate49( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate49.errors = [ + validate40.errors = [ { instancePath: instancePath + '/ID', schemaPath: '#/properties/ID/format', @@ -5479,22 +4014,22 @@ function validate49( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema34.properties.ID, + parentSchema: schema25.properties.ID, data: data0, }, ]; return false; } } else { - validate49.errors = [ + validate40.errors = [ { instancePath: instancePath + '/ID', schemaPath: '#/properties/ID/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema34.properties.ID.type, - parentSchema: schema34.properties.ID, + schema: schema25.properties.ID.type, + parentSchema: schema25.properties.ID, data: data0, }, ]; @@ -5505,26 +4040,26 @@ function validate49( } } } else { - validate49.errors = [ + validate40.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema34.type, - parentSchema: schema34, + schema: schema25.type, + parentSchema: schema25, data, }, ]; return false; } } - validate49.errors = vErrors; + validate40.errors = vErrors; return errors === 0; } -exports.validateExperimentRequest = validate50; -const schema35 = { +exports.validateExperimentRequest = validate41; +const schema26 = { title: 'Experiment', description: 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', @@ -5553,7 +4088,7 @@ const schema35 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, @@ -5561,7 +4096,7 @@ const schema35 = { 'x-location': '#/components/schemas/Experiment_request', 'x-schema-type': 'request', }; -function validate50( +function validate41( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -5571,15 +4106,15 @@ function validate50( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.Devices === undefined && (missing0 = 'Devices')) { - validate50.errors = [ + validate41.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema35.required, - parentSchema: schema35, + schema: schema26.required, + parentSchema: schema26, data, }, ]; @@ -5599,15 +4134,15 @@ function validate50( if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { let missing1; if (data1.ID === undefined && (missing1 = 'ID')) { - validate50.errors = [ + validate41.errors = [ { instancePath: instancePath + '/Devices/' + i0, schemaPath: '#/properties/Devices/items/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema35.properties.Devices.items.required, - parentSchema: schema35.properties.Devices.items, + schema: schema26.properties.Devices.items.required, + parentSchema: schema26.properties.Devices.items, data: data1, }, ]; @@ -5620,7 +4155,7 @@ function validate50( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats0(data2)) { - validate50.errors = [ + validate41.errors = [ { instancePath: instancePath + '/Devices/' + i0 + '/ID', schemaPath: @@ -5630,14 +4165,14 @@ function validate50( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema35.properties.Devices.items.properties.ID, + schema26.properties.Devices.items.properties.ID, data: data2, }, ]; return false; } } else { - validate50.errors = [ + validate41.errors = [ { instancePath: instancePath + '/Devices/' + i0 + '/ID', schemaPath: @@ -5646,9 +4181,9 @@ function validate50( params: { type: 'string' }, message: 'must be string', schema: - schema35.properties.Devices.items.properties.ID.type, + schema26.properties.Devices.items.properties.ID.type, parentSchema: - schema35.properties.Devices.items.properties.ID, + schema26.properties.Devices.items.properties.ID, data: data2, }, ]; @@ -5659,15 +4194,15 @@ function validate50( } } } else { - validate50.errors = [ + validate41.errors = [ { instancePath: instancePath + '/Devices/' + i0, schemaPath: '#/properties/Devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema35.properties.Devices.items.type, - parentSchema: schema35.properties.Devices.items, + schema: schema26.properties.Devices.items.type, + parentSchema: schema26.properties.Devices.items, data: data1, }, ]; @@ -5680,15 +4215,15 @@ function validate50( } } } else { - validate50.errors = [ + validate41.errors = [ { instancePath: instancePath + '/Devices', schemaPath: '#/properties/Devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema35.properties.Devices.type, - parentSchema: schema35.properties.Devices, + schema: schema26.properties.Devices.type, + parentSchema: schema26.properties.Devices, data: data0, }, ]; @@ -5704,15 +4239,15 @@ function validate50( let data3 = data.Description; const _errs7 = errors; if (typeof data3 !== 'string') { - validate50.errors = [ + validate41.errors = [ { instancePath: instancePath + '/Description', schemaPath: '#/properties/Description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema35.properties.Description.type, - parentSchema: schema35.properties.Description, + schema: schema26.properties.Description.type, + parentSchema: schema26.properties.Description, data: data3, }, ]; @@ -5725,26 +4260,26 @@ function validate50( } } } else { - validate50.errors = [ + validate41.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema35.type, - parentSchema: schema35, + schema: schema26.type, + parentSchema: schema26, data, }, ]; return false; } } - validate50.errors = vErrors; + validate41.errors = vErrors; return errors === 0; } -exports.validateExperimentResponse = validate51; -const schema36 = { +exports.validateExperimentResponse = validate42; +const schema27 = { title: 'Experiment', description: 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', @@ -5773,7 +4308,7 @@ const schema36 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, @@ -5781,7 +4316,7 @@ const schema36 = { 'x-location': '#/components/schemas/Experiment_response', 'x-schema-type': 'response', }; -function validate51( +function validate42( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -5791,15 +4326,15 @@ function validate51( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.Devices === undefined && (missing0 = 'Devices')) { - validate51.errors = [ + validate42.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema36.required, - parentSchema: schema36, + schema: schema27.required, + parentSchema: schema27, data, }, ]; @@ -5819,15 +4354,15 @@ function validate51( if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { let missing1; if (data1.ID === undefined && (missing1 = 'ID')) { - validate51.errors = [ + validate42.errors = [ { instancePath: instancePath + '/Devices/' + i0, schemaPath: '#/properties/Devices/items/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema36.properties.Devices.items.required, - parentSchema: schema36.properties.Devices.items, + schema: schema27.properties.Devices.items.required, + parentSchema: schema27.properties.Devices.items, data: data1, }, ]; @@ -5840,7 +4375,7 @@ function validate51( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats0(data2)) { - validate51.errors = [ + validate42.errors = [ { instancePath: instancePath + '/Devices/' + i0 + '/ID', schemaPath: @@ -5850,14 +4385,14 @@ function validate51( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema36.properties.Devices.items.properties.ID, + schema27.properties.Devices.items.properties.ID, data: data2, }, ]; return false; } } else { - validate51.errors = [ + validate42.errors = [ { instancePath: instancePath + '/Devices/' + i0 + '/ID', schemaPath: @@ -5866,9 +4401,9 @@ function validate51( params: { type: 'string' }, message: 'must be string', schema: - schema36.properties.Devices.items.properties.ID.type, + schema27.properties.Devices.items.properties.ID.type, parentSchema: - schema36.properties.Devices.items.properties.ID, + schema27.properties.Devices.items.properties.ID, data: data2, }, ]; @@ -5879,15 +4414,15 @@ function validate51( } } } else { - validate51.errors = [ + validate42.errors = [ { instancePath: instancePath + '/Devices/' + i0, schemaPath: '#/properties/Devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema36.properties.Devices.items.type, - parentSchema: schema36.properties.Devices.items, + schema: schema27.properties.Devices.items.type, + parentSchema: schema27.properties.Devices.items, data: data1, }, ]; @@ -5900,15 +4435,15 @@ function validate51( } } } else { - validate51.errors = [ + validate42.errors = [ { instancePath: instancePath + '/Devices', schemaPath: '#/properties/Devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema36.properties.Devices.type, - parentSchema: schema36.properties.Devices, + schema: schema27.properties.Devices.type, + parentSchema: schema27.properties.Devices, data: data0, }, ]; @@ -5924,15 +4459,15 @@ function validate51( let data3 = data.Description; const _errs7 = errors; if (typeof data3 !== 'string') { - validate51.errors = [ + validate42.errors = [ { instancePath: instancePath + '/Description', schemaPath: '#/properties/Description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema36.properties.Description.type, - parentSchema: schema36.properties.Description, + schema: schema27.properties.Description.type, + parentSchema: schema27.properties.Description, data: data3, }, ]; @@ -5945,26 +4480,26 @@ function validate51( } } } else { - validate51.errors = [ + validate42.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema36.type, - parentSchema: schema36, + schema: schema27.type, + parentSchema: schema27, data, }, ]; return false; } } - validate51.errors = vErrors; + validate42.errors = vErrors; return errors === 0; } -exports.validateTimeslotRequest = validate52; -const schema37 = { +exports.validateTimeslotRequest = validate43; +const schema28 = { title: 'Timeslot', description: 'A time slot represents a slice of time used for bookings.', type: 'object', @@ -5982,7 +4517,7 @@ const schema37 = { 'x-location': '#/components/schemas/Timeslot_request', 'x-schema-type': 'request', }; -function validate52( +function validate43( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -5995,15 +4530,15 @@ function validate52( (data.Start === undefined && (missing0 = 'Start')) || (data.End === undefined && (missing0 = 'End')) ) { - validate52.errors = [ + validate43.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema37.required, - parentSchema: schema37, + schema: schema28.required, + parentSchema: schema28, data, }, ]; @@ -6016,7 +4551,7 @@ function validate52( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats2.validate(data0)) { - validate52.errors = [ + validate43.errors = [ { instancePath: instancePath + '/Start', schemaPath: '#/properties/Start/format', @@ -6024,22 +4559,22 @@ function validate52( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema37.properties.Start, + parentSchema: schema28.properties.Start, data: data0, }, ]; return false; } } else { - validate52.errors = [ + validate43.errors = [ { instancePath: instancePath + '/Start', schemaPath: '#/properties/Start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema37.properties.Start.type, - parentSchema: schema37.properties.Start, + schema: schema28.properties.Start.type, + parentSchema: schema28.properties.Start, data: data0, }, ]; @@ -6059,7 +4594,7 @@ function validate52( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats2.validate(data1)) { - validate52.errors = [ + validate43.errors = [ { instancePath: instancePath + '/End', schemaPath: '#/properties/End/format', @@ -6067,22 +4602,22 @@ function validate52( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema37.properties.End, + parentSchema: schema28.properties.End, data: data1, }, ]; return false; } } else { - validate52.errors = [ + validate43.errors = [ { instancePath: instancePath + '/End', schemaPath: '#/properties/End/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema37.properties.End.type, - parentSchema: schema37.properties.End, + schema: schema28.properties.End.type, + parentSchema: schema28.properties.End, data: data1, }, ]; @@ -6097,26 +4632,26 @@ function validate52( } } } else { - validate52.errors = [ + validate43.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema37.type, - parentSchema: schema37, + schema: schema28.type, + parentSchema: schema28, data, }, ]; return false; } } - validate52.errors = vErrors; + validate43.errors = vErrors; return errors === 0; } -exports.validateTimeslotResponse = validate53; -const schema38 = { +exports.validateTimeslotResponse = validate44; +const schema29 = { title: 'Timeslot', description: 'A time slot represents a slice of time used for bookings.', type: 'object', @@ -6134,7 +4669,7 @@ const schema38 = { 'x-location': '#/components/schemas/Timeslot_response', 'x-schema-type': 'response', }; -function validate53( +function validate44( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -6147,15 +4682,15 @@ function validate53( (data.Start === undefined && (missing0 = 'Start')) || (data.End === undefined && (missing0 = 'End')) ) { - validate53.errors = [ + validate44.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema38.required, - parentSchema: schema38, + schema: schema29.required, + parentSchema: schema29, data, }, ]; @@ -6168,7 +4703,7 @@ function validate53( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats2.validate(data0)) { - validate53.errors = [ + validate44.errors = [ { instancePath: instancePath + '/Start', schemaPath: '#/properties/Start/format', @@ -6176,22 +4711,22 @@ function validate53( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema38.properties.Start, + parentSchema: schema29.properties.Start, data: data0, }, ]; return false; } } else { - validate53.errors = [ + validate44.errors = [ { instancePath: instancePath + '/Start', schemaPath: '#/properties/Start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema38.properties.Start.type, - parentSchema: schema38.properties.Start, + schema: schema29.properties.Start.type, + parentSchema: schema29.properties.Start, data: data0, }, ]; @@ -6211,7 +4746,7 @@ function validate53( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats2.validate(data1)) { - validate53.errors = [ + validate44.errors = [ { instancePath: instancePath + '/End', schemaPath: '#/properties/End/format', @@ -6219,22 +4754,22 @@ function validate53( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema38.properties.End, + parentSchema: schema29.properties.End, data: data1, }, ]; return false; } } else { - validate53.errors = [ + validate44.errors = [ { instancePath: instancePath + '/End', schemaPath: '#/properties/End/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema38.properties.End.type, - parentSchema: schema38.properties.End, + schema: schema29.properties.End.type, + parentSchema: schema29.properties.End, data: data1, }, ]; @@ -6249,124 +4784,110 @@ function validate53( } } } else { - validate53.errors = [ + validate44.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema38.type, - parentSchema: schema38, + schema: schema29.type, + parentSchema: schema29, data, }, ]; return false; } } - validate53.errors = vErrors; + validate44.errors = vErrors; return errors === 0; } -exports.validateIDRequest = validate54; -const schema39 = { +exports.validateIDRequest = validate45; +const schema30 = { type: 'string', 'x-standalone': false, 'x-name': 'IDRequest', 'x-location': '#/components/parameters/ID/schema_request', 'x-schema-type': 'request', }; -function validate54( +function validate45( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate54.errors = [ + validate45.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema39.type, - parentSchema: schema39, + schema: schema30.type, + parentSchema: schema30, data, }, ]; return false; } - validate54.errors = vErrors; + validate45.errors = vErrors; return errors === 0; } -exports.validateIDResponse = validate55; -const schema40 = { +exports.validateIDResponse = validate46; +const schema31 = { type: 'string', 'x-standalone': false, 'x-name': 'IDResponse', 'x-location': '#/components/parameters/ID/schema_response', 'x-schema-type': 'response', }; -function validate55( +function validate46( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate55.errors = [ + validate46.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema40.type, - parentSchema: schema40, + schema: schema31.type, + parentSchema: schema31, data, }, ]; return false; } - validate55.errors = vErrors; + validate46.errors = vErrors; return errors === 0; } -exports.validateScheduleBodyRequest = validate56; -const schema41 = { +exports.validateNewBookingBodyRequest = validate47; +const schema32 = { type: 'object', - required: ['Experiment', 'Time'], + required: ['Devices', 'Time'], properties: { - Experiment: { - title: 'Experiment', - description: - 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', - type: 'object', - required: ['Devices'], - properties: { - Devices: { - type: 'array', - description: 'List of devices used in experiment.', - items: { - title: 'Device', + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', description: - 'A device might either be a physical/virtual device or a group of device.', - type: 'object', - required: ['ID'], - properties: { - ID: { - type: 'string', - description: - 'Unique ID of the device. Contains the institution (by having an end point at that institution)', - format: 'uri', - }, - }, + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', }, }, - Description: { - type: 'string', - description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', - }, }, }, Time: { @@ -6387,24 +4908,20 @@ const schema41 = { }, }, }, - Combined: { - type: 'boolean', - description: - 'If true, show only one timetable per device instead of one for all available physical devices.', - }, - onlyOwn: { - type: 'boolean', + Type: { description: - '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], }, }, 'x-standalone': false, - 'x-name': 'scheduleBodyRequest', + 'x-name': 'newBookingBodyRequest', 'x-location': - '#/paths//schedule/post/requestBody/content/application/json/schema_request', + '#/paths//booking/post/requestBody/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate56( +function validate47( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -6414,222 +4931,127 @@ function validate56( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if ( - (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Devices === undefined && (missing0 = 'Devices')) || (data.Time === undefined && (missing0 = 'Time')) ) { - validate56.errors = [ + validate47.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema41.required, - parentSchema: schema41, + schema: schema32.required, + parentSchema: schema32, data, }, ]; return false; } else { - if (data.Experiment !== undefined) { - let data0 = data.Experiment; + if (data.Devices !== undefined) { + let data0 = data.Devices; const _errs1 = errors; if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing1; - if (data0.Devices === undefined && (missing1 = 'Devices')) { - validate56.errors = [ - { - instancePath: instancePath + '/Experiment', - schemaPath: '#/properties/Experiment/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema41.properties.Experiment.required, - parentSchema: schema41.properties.Experiment, - data: data0, - }, - ]; - return false; - } else { - if (data0.Devices !== undefined) { - let data1 = data0.Devices; - const _errs3 = errors; - if (errors === _errs3) { - if (Array.isArray(data1)) { - var valid2 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate47.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema32.properties.Devices.items.required, + parentSchema: schema32.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; const _errs5 = errors; if (errors === _errs5) { - if ( - data2 && - typeof data2 == 'object' && - !Array.isArray(data2) - ) { - let missing2; - if (data2.ID === undefined && (missing2 = 'ID')) { - validate56.errors = [ + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate47.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema32.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate47.errors = [ { - instancePath: - instancePath + '/Experiment/Devices/' + i0, + instancePath: instancePath + '/Devices/' + i0 + '/ID', schemaPath: - '#/properties/Experiment/properties/Devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', schema: - schema41.properties.Experiment.properties.Devices - .items.required, + schema32.properties.Devices.items.properties.ID.type, parentSchema: - schema41.properties.Experiment.properties.Devices - .items, + schema32.properties.Devices.items.properties.ID, data: data2, }, ]; return false; - } else { - if (data2.ID !== undefined) { - let data3 = data2.ID; - const _errs7 = errors; - if (errors === _errs7) { - if (errors === _errs7) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate56.errors = [ - { - instancePath: - instancePath + - '/Experiment/Devices/' + - i0 + - '/ID', - schemaPath: - '#/properties/Experiment/properties/Devices/items/properties/ID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema41.properties.Experiment.properties - .Devices.items.properties.ID, - data: data3, - }, - ]; - return false; - } - } else { - validate56.errors = [ - { - instancePath: - instancePath + - '/Experiment/Devices/' + - i0 + - '/ID', - schemaPath: - '#/properties/Experiment/properties/Devices/items/properties/ID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema41.properties.Experiment.properties - .Devices.items.properties.ID.type, - parentSchema: - schema41.properties.Experiment.properties - .Devices.items.properties.ID, - data: data3, - }, - ]; - return false; - } - } - } - } } - } else { - validate56.errors = [ - { - instancePath: instancePath + '/Experiment/Devices/' + i0, - schemaPath: - '#/properties/Experiment/properties/Devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema41.properties.Experiment.properties.Devices.items - .type, - parentSchema: - schema41.properties.Experiment.properties.Devices.items, - data: data2, - }, - ]; - return false; } } - var valid2 = _errs5 === errors; - if (!valid2) { - break; - } } - } else { - validate56.errors = [ - { - instancePath: instancePath + '/Experiment/Devices', - schemaPath: '#/properties/Experiment/properties/Devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema41.properties.Experiment.properties.Devices.type, - parentSchema: schema41.properties.Experiment.properties.Devices, - data: data1, - }, - ]; - return false; - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Description !== undefined) { - let data4 = data0.Description; - const _errs9 = errors; - if (typeof data4 !== 'string') { - validate56.errors = [ - { - instancePath: instancePath + '/Experiment/Description', - schemaPath: - '#/properties/Experiment/properties/Description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema41.properties.Experiment.properties.Description.type, - parentSchema: - schema41.properties.Experiment.properties.Description, - data: data4, - }, - ]; - return false; } - var valid1 = _errs9 === errors; } else { - var valid1 = true; + validate47.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema32.properties.Devices.items.type, + parentSchema: schema32.properties.Devices.items, + data: data1, + }, + ]; + return false; } } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } } } else { - validate56.errors = [ + validate47.errors = [ { - instancePath: instancePath + '/Experiment', - schemaPath: '#/properties/Experiment/type', + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema41.properties.Experiment.type, - parentSchema: schema41.properties.Experiment, + params: { type: 'array' }, + message: 'must be array', + schema: schema32.properties.Devices.type, + parentSchema: schema32.properties.Devices, data: data0, }, ]; @@ -6642,37 +5064,37 @@ function validate56( } if (valid0) { if (data.Time !== undefined) { - let data5 = data.Time; - const _errs11 = errors; - if (errors === _errs11) { - if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { - let missing3; + let data3 = data.Time; + const _errs7 = errors; + if (errors === _errs7) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing2; if ( - (data5.Start === undefined && (missing3 = 'Start')) || - (data5.End === undefined && (missing3 = 'End')) + (data3.Start === undefined && (missing2 = 'Start')) || + (data3.End === undefined && (missing2 = 'End')) ) { - validate56.errors = [ + validate47.errors = [ { instancePath: instancePath + '/Time', schemaPath: '#/properties/Time/required', keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema41.properties.Time.required, - parentSchema: schema41.properties.Time, - data: data5, + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema32.properties.Time.required, + parentSchema: schema32.properties.Time, + data: data3, }, ]; return false; } else { - if (data5.Start !== undefined) { - let data6 = data5.Start; - const _errs13 = errors; - if (errors === _errs13) { - if (errors === _errs13) { - if (typeof data6 === 'string') { - if (!formats2.validate(data6)) { - validate56.errors = [ + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate47.errors = [ { instancePath: instancePath + '/Time/Start', schemaPath: '#/properties/Time/properties/Start/format', @@ -6680,42 +5102,42 @@ function validate56( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema41.properties.Time.properties.Start, - data: data6, + parentSchema: schema32.properties.Time.properties.Start, + data: data4, }, ]; return false; } } else { - validate56.errors = [ + validate47.errors = [ { instancePath: instancePath + '/Time/Start', schemaPath: '#/properties/Time/properties/Start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema41.properties.Time.properties.Start.type, - parentSchema: schema41.properties.Time.properties.Start, - data: data6, + schema: schema32.properties.Time.properties.Start.type, + parentSchema: schema32.properties.Time.properties.Start, + data: data4, }, ]; return false; } } } - var valid4 = _errs13 === errors; + var valid3 = _errs9 === errors; } else { - var valid4 = true; + var valid3 = true; } - if (valid4) { - if (data5.End !== undefined) { - let data7 = data5.End; - const _errs15 = errors; - if (errors === _errs15) { - if (errors === _errs15) { - if (typeof data7 === 'string') { - if (!formats2.validate(data7)) { - validate56.errors = [ + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate47.errors = [ { instancePath: instancePath + '/Time/End', schemaPath: '#/properties/Time/properties/End/format', @@ -6723,160 +5145,137 @@ function validate56( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema41.properties.Time.properties.End, - data: data7, + parentSchema: schema32.properties.Time.properties.End, + data: data5, }, ]; return false; } } else { - validate56.errors = [ + validate47.errors = [ { instancePath: instancePath + '/Time/End', schemaPath: '#/properties/Time/properties/End/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema41.properties.Time.properties.End.type, - parentSchema: schema41.properties.Time.properties.End, - data: data7, + schema: schema32.properties.Time.properties.End.type, + parentSchema: schema32.properties.Time.properties.End, + data: data5, }, ]; return false; } } } - var valid4 = _errs15 === errors; + var valid3 = _errs11 === errors; } else { - var valid4 = true; + var valid3 = true; } } } } else { - validate56.errors = [ + validate47.errors = [ { instancePath: instancePath + '/Time', schemaPath: '#/properties/Time/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema41.properties.Time.type, - parentSchema: schema41.properties.Time, - data: data5, + schema: schema32.properties.Time.type, + parentSchema: schema32.properties.Time, + data: data3, }, ]; return false; } } - var valid0 = _errs11 === errors; + var valid0 = _errs7 === errors; } else { var valid0 = true; } if (valid0) { - if (data.Combined !== undefined) { - let data8 = data.Combined; - const _errs17 = errors; - if (typeof data8 !== 'boolean') { - validate56.errors = [ + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate47.errors = [ { - instancePath: instancePath + '/Combined', - schemaPath: '#/properties/Combined/type', + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema41.properties.Combined.type, - parentSchema: schema41.properties.Combined, - data: data8, + params: { type: 'string' }, + message: 'must be string', + schema: schema32.properties.Type.type, + parentSchema: schema32.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate47.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema32.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema32.properties.Type.enum, + parentSchema: schema32.properties.Type, + data: data6, }, ]; return false; } - var valid0 = _errs17 === errors; + var valid0 = _errs13 === errors; } else { var valid0 = true; } - if (valid0) { - if (data.onlyOwn !== undefined) { - let data9 = data.onlyOwn; - const _errs19 = errors; - if (typeof data9 !== 'boolean') { - validate56.errors = [ - { - instancePath: instancePath + '/onlyOwn', - schemaPath: '#/properties/onlyOwn/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema41.properties.onlyOwn.type, - parentSchema: schema41.properties.onlyOwn, - data: data9, - }, - ]; - return false; - } - var valid0 = _errs19 === errors; - } else { - var valid0 = true; - } - } } } } } else { - validate56.errors = [ + validate47.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema41.type, - parentSchema: schema41, + schema: schema32.type, + parentSchema: schema32, data, }, ]; return false; } } - validate56.errors = vErrors; + validate47.errors = vErrors; return errors === 0; } -exports.validateScheduleBodyResponse = validate57; -const schema42 = { +exports.validateNewBookingBodyResponse = validate48; +const schema33 = { type: 'object', - required: ['Experiment', 'Time'], + required: ['Devices', 'Time'], properties: { - Experiment: { - title: 'Experiment', - description: - 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', - type: 'object', - required: ['Devices'], - properties: { - Devices: { - type: 'array', - description: 'List of devices used in experiment.', - items: { - title: 'Device', + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', description: - 'A device might either be a physical/virtual device or a group of device.', - type: 'object', - required: ['ID'], - properties: { - ID: { - type: 'string', - description: - 'Unique ID of the device. Contains the institution (by having an end point at that institution)', - format: 'uri', - }, - }, + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', }, }, - Description: { - type: 'string', - description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', - }, }, }, Time: { @@ -6897,24 +5296,20 @@ const schema42 = { }, }, }, - Combined: { - type: 'boolean', - description: - 'If true, show only one timetable per device instead of one for all available physical devices.', - }, - onlyOwn: { - type: 'boolean', + Type: { description: - '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], }, }, 'x-standalone': false, - 'x-name': 'scheduleBodyResponse', + 'x-name': 'newBookingBodyResponse', 'x-location': - '#/paths//schedule/post/requestBody/content/application/json/schema_response', + '#/paths//booking/post/requestBody/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate57( +function validate48( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -6924,222 +5319,127 @@ function validate57( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if ( - (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Devices === undefined && (missing0 = 'Devices')) || (data.Time === undefined && (missing0 = 'Time')) ) { - validate57.errors = [ + validate48.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema42.required, - parentSchema: schema42, + schema: schema33.required, + parentSchema: schema33, data, }, ]; return false; } else { - if (data.Experiment !== undefined) { - let data0 = data.Experiment; + if (data.Devices !== undefined) { + let data0 = data.Devices; const _errs1 = errors; if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing1; - if (data0.Devices === undefined && (missing1 = 'Devices')) { - validate57.errors = [ - { - instancePath: instancePath + '/Experiment', - schemaPath: '#/properties/Experiment/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema42.properties.Experiment.required, - parentSchema: schema42.properties.Experiment, - data: data0, - }, - ]; - return false; - } else { - if (data0.Devices !== undefined) { - let data1 = data0.Devices; - const _errs3 = errors; - if (errors === _errs3) { - if (Array.isArray(data1)) { - var valid2 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate48.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema33.properties.Devices.items.required, + parentSchema: schema33.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; const _errs5 = errors; if (errors === _errs5) { - if ( - data2 && - typeof data2 == 'object' && - !Array.isArray(data2) - ) { - let missing2; - if (data2.ID === undefined && (missing2 = 'ID')) { - validate57.errors = [ + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate48.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema33.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate48.errors = [ { - instancePath: - instancePath + '/Experiment/Devices/' + i0, + instancePath: instancePath + '/Devices/' + i0 + '/ID', schemaPath: - '#/properties/Experiment/properties/Devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', schema: - schema42.properties.Experiment.properties.Devices - .items.required, + schema33.properties.Devices.items.properties.ID.type, parentSchema: - schema42.properties.Experiment.properties.Devices - .items, + schema33.properties.Devices.items.properties.ID, data: data2, }, ]; return false; - } else { - if (data2.ID !== undefined) { - let data3 = data2.ID; - const _errs7 = errors; - if (errors === _errs7) { - if (errors === _errs7) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate57.errors = [ - { - instancePath: - instancePath + - '/Experiment/Devices/' + - i0 + - '/ID', - schemaPath: - '#/properties/Experiment/properties/Devices/items/properties/ID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema42.properties.Experiment.properties - .Devices.items.properties.ID, - data: data3, - }, - ]; - return false; - } - } else { - validate57.errors = [ - { - instancePath: - instancePath + - '/Experiment/Devices/' + - i0 + - '/ID', - schemaPath: - '#/properties/Experiment/properties/Devices/items/properties/ID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema42.properties.Experiment.properties - .Devices.items.properties.ID.type, - parentSchema: - schema42.properties.Experiment.properties - .Devices.items.properties.ID, - data: data3, - }, - ]; - return false; - } - } - } - } } - } else { - validate57.errors = [ - { - instancePath: instancePath + '/Experiment/Devices/' + i0, - schemaPath: - '#/properties/Experiment/properties/Devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema42.properties.Experiment.properties.Devices.items - .type, - parentSchema: - schema42.properties.Experiment.properties.Devices.items, - data: data2, - }, - ]; - return false; } } - var valid2 = _errs5 === errors; - if (!valid2) { - break; - } } - } else { - validate57.errors = [ - { - instancePath: instancePath + '/Experiment/Devices', - schemaPath: '#/properties/Experiment/properties/Devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema42.properties.Experiment.properties.Devices.type, - parentSchema: schema42.properties.Experiment.properties.Devices, - data: data1, - }, - ]; - return false; } + } else { + validate48.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema33.properties.Devices.items.type, + parentSchema: schema33.properties.Devices.items, + data: data1, + }, + ]; + return false; } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; } - if (valid1) { - if (data0.Description !== undefined) { - let data4 = data0.Description; - const _errs9 = errors; - if (typeof data4 !== 'string') { - validate57.errors = [ - { - instancePath: instancePath + '/Experiment/Description', - schemaPath: - '#/properties/Experiment/properties/Description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema42.properties.Experiment.properties.Description.type, - parentSchema: - schema42.properties.Experiment.properties.Description, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs9 === errors; - } else { - var valid1 = true; - } + var valid1 = _errs3 === errors; + if (!valid1) { + break; } } } else { - validate57.errors = [ + validate48.errors = [ { - instancePath: instancePath + '/Experiment', - schemaPath: '#/properties/Experiment/type', + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema42.properties.Experiment.type, - parentSchema: schema42.properties.Experiment, + params: { type: 'array' }, + message: 'must be array', + schema: schema33.properties.Devices.type, + parentSchema: schema33.properties.Devices, data: data0, }, ]; @@ -7152,37 +5452,37 @@ function validate57( } if (valid0) { if (data.Time !== undefined) { - let data5 = data.Time; - const _errs11 = errors; - if (errors === _errs11) { - if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { - let missing3; + let data3 = data.Time; + const _errs7 = errors; + if (errors === _errs7) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing2; if ( - (data5.Start === undefined && (missing3 = 'Start')) || - (data5.End === undefined && (missing3 = 'End')) + (data3.Start === undefined && (missing2 = 'Start')) || + (data3.End === undefined && (missing2 = 'End')) ) { - validate57.errors = [ + validate48.errors = [ { instancePath: instancePath + '/Time', schemaPath: '#/properties/Time/required', keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema42.properties.Time.required, - parentSchema: schema42.properties.Time, - data: data5, + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema33.properties.Time.required, + parentSchema: schema33.properties.Time, + data: data3, }, ]; return false; } else { - if (data5.Start !== undefined) { - let data6 = data5.Start; - const _errs13 = errors; - if (errors === _errs13) { - if (errors === _errs13) { - if (typeof data6 === 'string') { - if (!formats2.validate(data6)) { - validate57.errors = [ + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate48.errors = [ { instancePath: instancePath + '/Time/Start', schemaPath: '#/properties/Time/properties/Start/format', @@ -7190,42 +5490,42 @@ function validate57( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema42.properties.Time.properties.Start, - data: data6, + parentSchema: schema33.properties.Time.properties.Start, + data: data4, }, ]; return false; } } else { - validate57.errors = [ + validate48.errors = [ { instancePath: instancePath + '/Time/Start', schemaPath: '#/properties/Time/properties/Start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema42.properties.Time.properties.Start.type, - parentSchema: schema42.properties.Time.properties.Start, - data: data6, + schema: schema33.properties.Time.properties.Start.type, + parentSchema: schema33.properties.Time.properties.Start, + data: data4, }, ]; return false; } } } - var valid4 = _errs13 === errors; + var valid3 = _errs9 === errors; } else { - var valid4 = true; + var valid3 = true; } - if (valid4) { - if (data5.End !== undefined) { - let data7 = data5.End; - const _errs15 = errors; - if (errors === _errs15) { - if (errors === _errs15) { - if (typeof data7 === 'string') { - if (!formats2.validate(data7)) { - validate57.errors = [ + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate48.errors = [ { instancePath: instancePath + '/Time/End', schemaPath: '#/properties/Time/properties/End/format', @@ -7233,2274 +5533,1085 @@ function validate57( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema42.properties.Time.properties.End, - data: data7, + parentSchema: schema33.properties.Time.properties.End, + data: data5, }, ]; return false; } } else { - validate57.errors = [ + validate48.errors = [ { instancePath: instancePath + '/Time/End', schemaPath: '#/properties/Time/properties/End/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema42.properties.Time.properties.End.type, - parentSchema: schema42.properties.Time.properties.End, - data: data7, + schema: schema33.properties.Time.properties.End.type, + parentSchema: schema33.properties.Time.properties.End, + data: data5, }, ]; return false; } } } - var valid4 = _errs15 === errors; + var valid3 = _errs11 === errors; } else { - var valid4 = true; + var valid3 = true; } } } } else { - validate57.errors = [ + validate48.errors = [ { instancePath: instancePath + '/Time', schemaPath: '#/properties/Time/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema42.properties.Time.type, - parentSchema: schema42.properties.Time, - data: data5, + schema: schema33.properties.Time.type, + parentSchema: schema33.properties.Time, + data: data3, }, ]; return false; } } - var valid0 = _errs11 === errors; + var valid0 = _errs7 === errors; } else { var valid0 = true; } if (valid0) { - if (data.Combined !== undefined) { - let data8 = data.Combined; - const _errs17 = errors; - if (typeof data8 !== 'boolean') { - validate57.errors = [ + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate48.errors = [ { - instancePath: instancePath + '/Combined', - schemaPath: '#/properties/Combined/type', + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema42.properties.Combined.type, - parentSchema: schema42.properties.Combined, - data: data8, + params: { type: 'string' }, + message: 'must be string', + schema: schema33.properties.Type.type, + parentSchema: schema33.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate48.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema33.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema33.properties.Type.enum, + parentSchema: schema33.properties.Type, + data: data6, }, ]; return false; } - var valid0 = _errs17 === errors; + var valid0 = _errs13 === errors; } else { var valid0 = true; } - if (valid0) { - if (data.onlyOwn !== undefined) { - let data9 = data.onlyOwn; - const _errs19 = errors; - if (typeof data9 !== 'boolean') { - validate57.errors = [ + } + } + } + } else { + validate48.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema33.type, + parentSchema: schema33, + data, + }, + ]; + return false; + } + } + validate48.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse200Request = validate49; +const schema34 = { + type: 'object', + required: ['BookingID'], + properties: { + BookingID: { + type: 'string', + format: 'uri', + description: 'ID at which the booking can be managed.', + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingResponse200Request', + 'x-location': + '#/paths//booking/post/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate49( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate49.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema34.required, + parentSchema: schema34, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate49.errors = [ { - instancePath: instancePath + '/onlyOwn', - schemaPath: '#/properties/onlyOwn/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema42.properties.onlyOwn.type, - parentSchema: schema42.properties.onlyOwn, - data: data9, + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema34.properties.BookingID, + data: data0, }, ]; return false; } - var valid0 = _errs19 === errors; } else { - var valid0 = true; + validate49.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema34.properties.BookingID.type, + parentSchema: schema34.properties.BookingID, + data: data0, + }, + ]; + return false; } } } } } } else { - validate57.errors = [ + validate49.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema42.type, - parentSchema: schema42, + schema: schema34.type, + parentSchema: schema34, data, }, ]; return false; } } - validate57.errors = vErrors; + validate49.errors = vErrors; return errors === 0; } -exports.validateScheduleResponse200Request = validate58; -const schema43 = { - type: 'array', - items: { - type: 'object', - required: ['Device', 'Booked', 'Free'], - properties: { - Device: { type: 'string', description: 'ID of the device (or * if combined).' }, - Booked: { - type: 'array', - description: 'Array of booked times.', - items: { - title: 'Timeslot', - description: 'A time slot represents a slice of time used for bookings.', - type: 'object', - required: ['Start', 'End'], - properties: { - Start: { - type: 'string', - description: 'Start time of the booking.', - format: 'date-time', - }, - End: { - type: 'string', - description: 'End time of the booking.', - format: 'date-time', - }, - }, - }, - }, - Free: { - type: 'array', - description: 'Array of free times.', - items: { - title: 'Timeslot', - description: 'A time slot represents a slice of time used for bookings.', - type: 'object', - required: ['Start', 'End'], - properties: { - Start: { - type: 'string', - description: 'Start time of the booking.', - format: 'date-time', - }, - End: { - type: 'string', - description: 'End time of the booking.', - format: 'date-time', - }, - }, - }, - }, +exports.validateNewBookingResponse200Response = validate50; +const schema35 = { + type: 'object', + required: ['BookingID'], + properties: { + BookingID: { + type: 'string', + format: 'uri', + description: 'ID at which the booking can be managed.', }, }, 'x-standalone': false, - 'x-name': 'scheduleResponse200Request', + 'x-name': 'newBookingResponse200Response', 'x-location': - '#/paths//schedule/post/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', + '#/paths//booking/post/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', }; -function validate58( +function validate50( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if ( - (data0.Device === undefined && (missing0 = 'Device')) || - (data0.Booked === undefined && (missing0 = 'Booked')) || - (data0.Free === undefined && (missing0 = 'Free')) - ) { - validate58.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema43.items.required, - parentSchema: schema43.items, - data: data0, - }, - ]; - return false; - } else { - if (data0.Device !== undefined) { - let data1 = data0.Device; - const _errs3 = errors; - if (typeof data1 !== 'string') { - validate58.errors = [ + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate50.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema35.required, + parentSchema: schema35, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate50.errors = [ { - instancePath: instancePath + '/' + i0 + '/Device', - schemaPath: '#/items/properties/Device/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema43.items.properties.Device.type, - parentSchema: schema43.items.properties.Device, - data: data1, + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema35.properties.BookingID, + data: data0, }, ]; return false; } - var valid1 = _errs3 === errors; } else { - var valid1 = true; - } - if (valid1) { - if (data0.Booked !== undefined) { - let data2 = data0.Booked; - const _errs5 = errors; - if (errors === _errs5) { - if (Array.isArray(data2)) { - var valid2 = true; - const len1 = data2.length; - for (let i1 = 0; i1 < len1; i1++) { - let data3 = data2[i1]; - const _errs7 = errors; - if (errors === _errs7) { - if ( - data3 && - typeof data3 == 'object' && - !Array.isArray(data3) - ) { - let missing1; - if ( - (data3.Start === undefined && (missing1 = 'Start')) || - (data3.End === undefined && (missing1 = 'End')) - ) { - validate58.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Booked/' + i1, - schemaPath: '#/items/properties/Booked/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: schema43.items.properties.Booked.items.required, - parentSchema: schema43.items.properties.Booked.items, - data: data3, - }, - ]; - return false; - } else { - if (data3.Start !== undefined) { - let data4 = data3.Start; - const _errs9 = errors; - if (errors === _errs9) { - if (errors === _errs9) { - if (typeof data4 === 'string') { - if (!formats2.validate(data4)) { - validate58.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/Start', - schemaPath: - '#/items/properties/Booked/items/properties/Start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema43.items.properties.Booked.items - .properties.Start, - data: data4, - }, - ]; - return false; - } - } else { - validate58.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/Start', - schemaPath: - '#/items/properties/Booked/items/properties/Start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema43.items.properties.Booked.items - .properties.Start.type, - parentSchema: - schema43.items.properties.Booked.items - .properties.Start, - data: data4, - }, - ]; - return false; - } - } - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.End !== undefined) { - let data5 = data3.End; - const _errs11 = errors; - if (errors === _errs11) { - if (errors === _errs11) { - if (typeof data5 === 'string') { - if (!formats2.validate(data5)) { - validate58.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/End', - schemaPath: - '#/items/properties/Booked/items/properties/End/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema43.items.properties.Booked.items - .properties.End, - data: data5, - }, - ]; - return false; - } - } else { - validate58.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/End', - schemaPath: - '#/items/properties/Booked/items/properties/End/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema43.items.properties.Booked.items - .properties.End.type, - parentSchema: - schema43.items.properties.Booked.items - .properties.End, - data: data5, - }, - ]; - return false; - } - } - } - var valid3 = _errs11 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate58.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Booked/' + i1, - schemaPath: '#/items/properties/Booked/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema43.items.properties.Booked.items.type, - parentSchema: schema43.items.properties.Booked.items, - data: data3, - }, - ]; - return false; - } - } - var valid2 = _errs7 === errors; - if (!valid2) { - break; - } - } - } else { - validate58.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Booked', - schemaPath: '#/items/properties/Booked/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema43.items.properties.Booked.type, - parentSchema: schema43.items.properties.Booked, - data: data2, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Free !== undefined) { - let data6 = data0.Free; - const _errs13 = errors; - if (errors === _errs13) { - if (Array.isArray(data6)) { - var valid4 = true; - const len2 = data6.length; - for (let i2 = 0; i2 < len2; i2++) { - let data7 = data6[i2]; - const _errs15 = errors; - if (errors === _errs15) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing2; - if ( - (data7.Start === undefined && (missing2 = 'Start')) || - (data7.End === undefined && (missing2 = 'End')) - ) { - validate58.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Free/' + i2, - schemaPath: '#/items/properties/Free/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: schema43.items.properties.Free.items.required, - parentSchema: schema43.items.properties.Free.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.Start !== undefined) { - let data8 = data7.Start; - const _errs17 = errors; - if (errors === _errs17) { - if (errors === _errs17) { - if (typeof data8 === 'string') { - if (!formats2.validate(data8)) { - validate58.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/Start', - schemaPath: - '#/items/properties/Free/items/properties/Start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema43.items.properties.Free.items - .properties.Start, - data: data8, - }, - ]; - return false; - } - } else { - validate58.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/Start', - schemaPath: - '#/items/properties/Free/items/properties/Start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema43.items.properties.Free.items - .properties.Start.type, - parentSchema: - schema43.items.properties.Free.items - .properties.Start, - data: data8, - }, - ]; - return false; - } - } - } - var valid5 = _errs17 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data7.End !== undefined) { - let data9 = data7.End; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data9 === 'string') { - if (!formats2.validate(data9)) { - validate58.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/End', - schemaPath: - '#/items/properties/Free/items/properties/End/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + - 'date-time' + - '"', - schema: 'date-time', - parentSchema: - schema43.items.properties.Free.items - .properties.End, - data: data9, - }, - ]; - return false; - } - } else { - validate58.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/End', - schemaPath: - '#/items/properties/Free/items/properties/End/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema43.items.properties.Free.items - .properties.End.type, - parentSchema: - schema43.items.properties.Free.items - .properties.End, - data: data9, - }, - ]; - return false; - } - } - } - var valid5 = _errs19 === errors; - } else { - var valid5 = true; - } - } - } - } else { - validate58.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Free/' + i2, - schemaPath: '#/items/properties/Free/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema43.items.properties.Free.items.type, - parentSchema: schema43.items.properties.Free.items, - data: data7, - }, - ]; - return false; - } - } - var valid4 = _errs15 === errors; - if (!valid4) { - break; - } - } - } else { - validate58.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Free', - schemaPath: '#/items/properties/Free/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema43.items.properties.Free.type, - parentSchema: schema43.items.properties.Free, - data: data6, - }, - ]; - return false; - } - } - var valid1 = _errs13 === errors; - } else { - var valid1 = true; - } - } + validate50.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema35.properties.BookingID.type, + parentSchema: schema35.properties.BookingID, + data: data0, + }, + ]; + return false; } } - } else { - validate58.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema43.items.type, - parentSchema: schema43.items, - data: data0, - }, - ]; - return false; } } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } } } else { - validate58.errors = [ + validate50.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema43.type, - parentSchema: schema43, + params: { type: 'object' }, + message: 'must be object', + schema: schema35.type, + parentSchema: schema35, data, }, ]; return false; } } - validate58.errors = vErrors; + validate50.errors = vErrors; return errors === 0; } -exports.validateScheduleResponse200Response = validate59; -const schema44 = { - type: 'array', - items: { - type: 'object', - required: ['Device', 'Booked', 'Free'], - properties: { - Device: { type: 'string', description: 'ID of the device (or * if combined).' }, - Booked: { - type: 'array', - description: 'Array of booked times.', - items: { - title: 'Timeslot', - description: 'A time slot represents a slice of time used for bookings.', - type: 'object', - required: ['Start', 'End'], - properties: { - Start: { - type: 'string', - description: 'Start time of the booking.', - format: 'date-time', - }, - End: { - type: 'string', - description: 'End time of the booking.', - format: 'date-time', - }, - }, - }, - }, - Free: { - type: 'array', - description: 'Array of free times.', - items: { - title: 'Timeslot', - description: 'A time slot represents a slice of time used for bookings.', - type: 'object', - required: ['Start', 'End'], - properties: { - Start: { - type: 'string', - description: 'Start time of the booking.', - format: 'date-time', - }, - End: { - type: 'string', - description: 'End time of the booking.', - format: 'date-time', - }, - }, - }, +exports.validateNewBookingResponse500Request = validate51; +const schema36 = { + description: 'Error description', + type: 'string', + 'x-standalone': false, + 'x-name': 'newBookingResponse500Request', + 'x-location': + '#/paths//booking/post/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate51( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate51.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema36.type, + parentSchema: schema36, + data, }, - }, - }, + ]; + return false; + } + validate51.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse500Response = validate52; +const schema37 = { + description: 'Error description', + type: 'string', 'x-standalone': false, - 'x-name': 'scheduleResponse200Response', + 'x-name': 'newBookingResponse500Response', 'x-location': - '#/paths//schedule/post/responses/200/content/application/json/schema_response', + '#/paths//booking/post/responses/500/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate59( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if ( - (data0.Device === undefined && (missing0 = 'Device')) || - (data0.Booked === undefined && (missing0 = 'Booked')) || - (data0.Free === undefined && (missing0 = 'Free')) - ) { - validate59.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema44.items.required, - parentSchema: schema44.items, - data: data0, - }, - ]; - return false; - } else { - if (data0.Device !== undefined) { - let data1 = data0.Device; - const _errs3 = errors; - if (typeof data1 !== 'string') { - validate59.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Device', - schemaPath: '#/items/properties/Device/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema44.items.properties.Device.type, - parentSchema: schema44.items.properties.Device, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Booked !== undefined) { - let data2 = data0.Booked; - const _errs5 = errors; - if (errors === _errs5) { - if (Array.isArray(data2)) { - var valid2 = true; - const len1 = data2.length; - for (let i1 = 0; i1 < len1; i1++) { - let data3 = data2[i1]; - const _errs7 = errors; - if (errors === _errs7) { - if ( - data3 && - typeof data3 == 'object' && - !Array.isArray(data3) - ) { - let missing1; - if ( - (data3.Start === undefined && (missing1 = 'Start')) || - (data3.End === undefined && (missing1 = 'End')) - ) { - validate59.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Booked/' + i1, - schemaPath: '#/items/properties/Booked/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: schema44.items.properties.Booked.items.required, - parentSchema: schema44.items.properties.Booked.items, - data: data3, - }, - ]; - return false; - } else { - if (data3.Start !== undefined) { - let data4 = data3.Start; - const _errs9 = errors; - if (errors === _errs9) { - if (errors === _errs9) { - if (typeof data4 === 'string') { - if (!formats2.validate(data4)) { - validate59.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/Start', - schemaPath: - '#/items/properties/Booked/items/properties/Start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema44.items.properties.Booked.items - .properties.Start, - data: data4, - }, - ]; - return false; - } - } else { - validate59.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/Start', - schemaPath: - '#/items/properties/Booked/items/properties/Start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema44.items.properties.Booked.items - .properties.Start.type, - parentSchema: - schema44.items.properties.Booked.items - .properties.Start, - data: data4, - }, - ]; - return false; - } - } - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.End !== undefined) { - let data5 = data3.End; - const _errs11 = errors; - if (errors === _errs11) { - if (errors === _errs11) { - if (typeof data5 === 'string') { - if (!formats2.validate(data5)) { - validate59.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/End', - schemaPath: - '#/items/properties/Booked/items/properties/End/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema44.items.properties.Booked.items - .properties.End, - data: data5, - }, - ]; - return false; - } - } else { - validate59.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Booked/' + - i1 + - '/End', - schemaPath: - '#/items/properties/Booked/items/properties/End/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema44.items.properties.Booked.items - .properties.End.type, - parentSchema: - schema44.items.properties.Booked.items - .properties.End, - data: data5, - }, - ]; - return false; - } - } - } - var valid3 = _errs11 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate59.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Booked/' + i1, - schemaPath: '#/items/properties/Booked/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema44.items.properties.Booked.items.type, - parentSchema: schema44.items.properties.Booked.items, - data: data3, - }, - ]; - return false; - } - } - var valid2 = _errs7 === errors; - if (!valid2) { - break; - } - } - } else { - validate59.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Booked', - schemaPath: '#/items/properties/Booked/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema44.items.properties.Booked.type, - parentSchema: schema44.items.properties.Booked, - data: data2, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Free !== undefined) { - let data6 = data0.Free; - const _errs13 = errors; - if (errors === _errs13) { - if (Array.isArray(data6)) { - var valid4 = true; - const len2 = data6.length; - for (let i2 = 0; i2 < len2; i2++) { - let data7 = data6[i2]; - const _errs15 = errors; - if (errors === _errs15) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing2; - if ( - (data7.Start === undefined && (missing2 = 'Start')) || - (data7.End === undefined && (missing2 = 'End')) - ) { - validate59.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Free/' + i2, - schemaPath: '#/items/properties/Free/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: schema44.items.properties.Free.items.required, - parentSchema: schema44.items.properties.Free.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.Start !== undefined) { - let data8 = data7.Start; - const _errs17 = errors; - if (errors === _errs17) { - if (errors === _errs17) { - if (typeof data8 === 'string') { - if (!formats2.validate(data8)) { - validate59.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/Start', - schemaPath: - '#/items/properties/Free/items/properties/Start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema44.items.properties.Free.items - .properties.Start, - data: data8, - }, - ]; - return false; - } - } else { - validate59.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/Start', - schemaPath: - '#/items/properties/Free/items/properties/Start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema44.items.properties.Free.items - .properties.Start.type, - parentSchema: - schema44.items.properties.Free.items - .properties.Start, - data: data8, - }, - ]; - return false; - } - } - } - var valid5 = _errs17 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data7.End !== undefined) { - let data9 = data7.End; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data9 === 'string') { - if (!formats2.validate(data9)) { - validate59.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/End', - schemaPath: - '#/items/properties/Free/items/properties/End/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + - 'date-time' + - '"', - schema: 'date-time', - parentSchema: - schema44.items.properties.Free.items - .properties.End, - data: data9, - }, - ]; - return false; - } - } else { - validate59.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/Free/' + - i2 + - '/End', - schemaPath: - '#/items/properties/Free/items/properties/End/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema44.items.properties.Free.items - .properties.End.type, - parentSchema: - schema44.items.properties.Free.items - .properties.End, - data: data9, - }, - ]; - return false; - } - } - } - var valid5 = _errs19 === errors; - } else { - var valid5 = true; - } - } - } - } else { - validate59.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Free/' + i2, - schemaPath: '#/items/properties/Free/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema44.items.properties.Free.items.type, - parentSchema: schema44.items.properties.Free.items, - data: data7, - }, - ]; - return false; - } - } - var valid4 = _errs15 === errors; - if (!valid4) { - break; - } - } - } else { - validate59.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Free', - schemaPath: '#/items/properties/Free/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema44.items.properties.Free.type, - parentSchema: schema44.items.properties.Free, - data: data6, - }, - ]; - return false; - } - } - var valid1 = _errs13 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate59.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema44.items.type, - parentSchema: schema44.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate59.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema44.type, - parentSchema: schema44, - data, - }, - ]; - return false; - } - } - validate59.errors = vErrors; - return errors === 0; -} -exports.validateScheduleResponse404Request = validate60; -const schema45 = { - type: 'string', - description: 'First unknown device ID.', - 'x-standalone': false, - 'x-name': 'scheduleResponse404Request', - 'x-location': - '#/paths//schedule/post/responses/404/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate60( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate60.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema45.type, - parentSchema: schema45, - data, - }, - ]; - return false; - } - validate60.errors = vErrors; - return errors === 0; -} -exports.validateScheduleResponse404Response = validate61; -const schema46 = { - type: 'string', - description: 'First unknown device ID.', - 'x-standalone': false, - 'x-name': 'scheduleResponse404Response', - 'x-location': - '#/paths//schedule/post/responses/404/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate61( +function validate52( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate61.errors = [ + validate52.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema46.type, - parentSchema: schema46, + schema: schema37.type, + parentSchema: schema37, data, }, ]; return false; } - validate61.errors = vErrors; + validate52.errors = vErrors; return errors === 0; } -exports.validateScheduleResponse422Request = validate62; -const schema47 = { - type: 'string', - description: 'First virtual device ID.', - 'x-standalone': false, - 'x-name': 'scheduleResponse422Request', - 'x-location': - '#/paths//schedule/post/responses/422/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate62( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate62.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema47.type, - parentSchema: schema47, - data, +exports.validateUpdateBookingBodyRequest = validate53; +const schema38 = { + anyOf: [ + { + type: 'object', + description: 'Use this request for adding devices.', + properties: { + Locked: { + type: 'boolean', + description: + 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', + }, + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, }, - ]; - return false; - } - validate62.errors = vErrors; - return errors === 0; -} -exports.validateScheduleResponse422Response = validate63; -const schema48 = { - type: 'string', - description: 'First virtual device ID.', - 'x-standalone': false, - 'x-name': 'scheduleResponse422Response', - 'x-location': - '#/paths//schedule/post/responses/422/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate63( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate63.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema48.type, - parentSchema: schema48, - data, + }, + { + type: 'object', + description: 'Use this request for adding callbacks.', + properties: { + Callback: { + type: 'string', + format: 'uri', + description: 'Callback which should be called at changes.', + }, }, - ]; - return false; - } - validate63.errors = vErrors; - return errors === 0; -} -exports.validateScheduleResponse500Request = validate64; -const schema49 = { - type: 'string', - description: 'Error description.', + }, + ], 'x-standalone': false, - 'x-name': 'scheduleResponse500Request', + 'x-name': 'updateBookingBodyRequest', 'x-location': - '#/paths//schedule/post/responses/500/content/application/json/schema_request', + '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate64( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate64.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema49.type, - parentSchema: schema49, - data, - }, - ]; - return false; - } - validate64.errors = vErrors; - return errors === 0; -} -exports.validateScheduleResponse500Response = validate65; -const schema50 = { - type: 'string', - description: 'Error description.', - 'x-standalone': false, - 'x-name': 'scheduleResponse500Response', - 'x-location': - '#/paths//schedule/post/responses/500/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate65( +function validate53( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; - if (typeof data !== 'string') { - validate65.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema50.type, - parentSchema: schema50, - data, - }, - ]; - return false; - } - validate65.errors = vErrors; - return errors === 0; -} -exports.validateNewBookingBodyRequest = validate66; -const schema51 = { - type: 'object', - required: ['Devices', 'Time'], - properties: { - Devices: { - type: 'array', - description: 'List of devices which should be added.', - items: { - title: 'Device', - description: - 'A device might either be a physical/virtual device or a group of device.', - type: 'object', - required: ['ID'], - properties: { - ID: { - type: 'string', - description: - 'Unique ID of the device. Contains the institution (by having an end point at that institution)', - format: 'uri', - }, - }, - }, - }, - Time: { - title: 'Timeslot', - description: 'A time slot represents a slice of time used for bookings.', - type: 'object', - required: ['Start', 'End'], - properties: { - Start: { - type: 'string', - description: 'Start time of the booking.', - format: 'date-time', - }, - End: { - type: 'string', - description: 'End time of the booking.', - format: 'date-time', - }, - }, - }, - Type: { - description: - "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", - type: 'string', - enum: ['normal'], - }, - }, - 'x-standalone': false, - 'x-name': 'newBookingBodyRequest', - 'x-location': - '#/paths//booking/post/requestBody/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate66( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + if (errors === _errs1) { if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.Devices === undefined && (missing0 = 'Devices')) || - (data.Time === undefined && (missing0 = 'Time')) - ) { - validate66.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema51.required, - parentSchema: schema51, - data, - }, - ]; - return false; + if (data.Locked !== undefined) { + let data0 = data.Locked; + const _errs3 = errors; + if (typeof data0 !== 'boolean') { + const err0 = { + instancePath: instancePath + '/Locked', + schemaPath: '#/anyOf/0/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema38.anyOf[0].properties.Locked.type, + parentSchema: schema38.anyOf[0].properties.Locked, + data: data0, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var valid1 = _errs3 === errors; } else { + var valid1 = true; + } + if (valid1) { if (data.Devices !== undefined) { - let data0 = data.Devices; - const _errs1 = errors; - if (errors === _errs1) { - if (Array.isArray(data0)) { - var valid1 = true; - const len0 = data0.length; + let data1 = data.Devices; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; for (let i0 = 0; i0 < len0; i0++) { - let data1 = data0[i0]; - const _errs3 = errors; - if (errors === _errs3) { - if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { - let missing1; - if (data1.ID === undefined && (missing1 = 'ID')) { - validate66.errors = [ - { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/properties/Devices/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema51.properties.Devices.items.required, - parentSchema: schema51.properties.Devices.items, - data: data1, - }, - ]; - return false; + let data2 = data1[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing0; + if (data2.ID === undefined && (missing0 = 'ID')) { + const err1 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema38.anyOf[0].properties.Devices.items.required, + parentSchema: schema38.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; } else { - if (data1.ID !== undefined) { - let data2 = data1.ID; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats0(data2)) { - validate66.errors = [ - { - instancePath: instancePath + '/Devices/' + i0 + '/ID', - schemaPath: - '#/properties/Devices/items/properties/ID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema51.properties.Devices.items.properties.ID, - data: data2, - }, - ]; - return false; - } - } else { - validate66.errors = [ - { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + const err2 = { instancePath: instancePath + '/Devices/' + i0 + '/ID', schemaPath: - '#/properties/Devices/items/properties/ID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema51.properties.Devices.items.properties.ID.type, + '#/anyOf/0/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', parentSchema: - schema51.properties.Devices.items.properties.ID, - data: data2, - }, - ]; - return false; + schema38.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } else { + const err3 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema38.anyOf[0].properties.Devices.items.properties.ID + .type, + parentSchema: + schema38.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; } } } } } } else { - validate66.errors = [ - { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/properties/Devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema51.properties.Devices.items.type, - parentSchema: schema51.properties.Devices.items, - data: data1, - }, - ]; - return false; - } - } - var valid1 = _errs3 === errors; - if (!valid1) { - break; - } - } - } else { - validate66.errors = [ - { - instancePath: instancePath + '/Devices', - schemaPath: '#/properties/Devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema51.properties.Devices.type, - parentSchema: schema51.properties.Devices, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.Time !== undefined) { - let data3 = data.Time; - const _errs7 = errors; - if (errors === _errs7) { - if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { - let missing2; - if ( - (data3.Start === undefined && (missing2 = 'Start')) || - (data3.End === undefined && (missing2 = 'End')) - ) { - validate66.errors = [ - { - instancePath: instancePath + '/Time', - schemaPath: '#/properties/Time/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema51.properties.Time.required, - parentSchema: schema51.properties.Time, - data: data3, - }, - ]; - return false; - } else { - if (data3.Start !== undefined) { - let data4 = data3.Start; - const _errs9 = errors; - if (errors === _errs9) { - if (errors === _errs9) { - if (typeof data4 === 'string') { - if (!formats2.validate(data4)) { - validate66.errors = [ - { - instancePath: instancePath + '/Time/Start', - schemaPath: '#/properties/Time/properties/Start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema51.properties.Time.properties.Start, - data: data4, - }, - ]; - return false; - } - } else { - validate66.errors = [ - { - instancePath: instancePath + '/Time/Start', - schemaPath: '#/properties/Time/properties/Start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema51.properties.Time.properties.Start.type, - parentSchema: schema51.properties.Time.properties.Start, - data: data4, - }, - ]; - return false; - } - } - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.End !== undefined) { - let data5 = data3.End; - const _errs11 = errors; - if (errors === _errs11) { - if (errors === _errs11) { - if (typeof data5 === 'string') { - if (!formats2.validate(data5)) { - validate66.errors = [ - { - instancePath: instancePath + '/Time/End', - schemaPath: '#/properties/Time/properties/End/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema51.properties.Time.properties.End, - data: data5, - }, - ]; - return false; - } - } else { - validate66.errors = [ - { - instancePath: instancePath + '/Time/End', - schemaPath: '#/properties/Time/properties/End/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema51.properties.Time.properties.End.type, - parentSchema: schema51.properties.Time.properties.End, - data: data5, - }, - ]; - return false; - } - } - } - var valid3 = _errs11 === errors; + const err4 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema38.anyOf[0].properties.Devices.items.type, + parentSchema: schema38.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; } else { - var valid3 = true; + vErrors.push(err4); } + errors++; } } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + const err5 = { + instancePath: instancePath + '/Devices', + schemaPath: '#/anyOf/0/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema38.anyOf[0].properties.Devices.type, + parentSchema: schema38.anyOf[0].properties.Devices, + data: data1, + }; + if (vErrors === null) { + vErrors = [err5]; } else { - validate66.errors = [ - { - instancePath: instancePath + '/Time', - schemaPath: '#/properties/Time/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema51.properties.Time.type, - parentSchema: schema51.properties.Time, - data: data3, - }, - ]; - return false; + vErrors.push(err5); } + errors++; } - var valid0 = _errs7 === errors; - } else { - var valid0 = true; } - if (valid0) { - if (data.Type !== undefined) { - let data6 = data.Type; - const _errs13 = errors; - if (typeof data6 !== 'string') { - validate66.errors = [ - { - instancePath: instancePath + '/Type', - schemaPath: '#/properties/Type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema51.properties.Type.type, - parentSchema: schema51.properties.Type, - data: data6, - }, - ]; - return false; - } - if (!(data6 === 'normal')) { - validate66.errors = [ - { - instancePath: instancePath + '/Type', - schemaPath: '#/properties/Type/enum', - keyword: 'enum', - params: { allowedValues: schema51.properties.Type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema51.properties.Type.enum, - parentSchema: schema51.properties.Type, - data: data6, - }, - ]; - return false; + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema38.anyOf[0].type, + parentSchema: schema38.anyOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Callback !== undefined) { + let data4 = data.Callback; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + const err7 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema38.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema38.anyOf[1].properties.Callback.type, + parentSchema: schema38.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; } - var valid0 = _errs13 === errors; - } else { - var valid0 = true; } } } - } - } else { - validate66.errors = [ - { + } else { + const err9 = { instancePath, - schemaPath: '#/type', + schemaPath: '#/anyOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema51.type, - parentSchema: schema51, + schema: schema38.anyOf[1].type, + parentSchema: schema38.anyOf[1], data, - }, - ]; - return false; + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } } + var _valid0 = _errs11 === errors; + valid0 = valid0 || _valid0; } - validate66.errors = vErrors; + if (!valid0) { + const err10 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema38.anyOf, + parentSchema: schema38, + data, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + validate53.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate53.errors = vErrors; return errors === 0; } -exports.validateNewBookingBodyResponse = validate67; -const schema52 = { - type: 'object', - required: ['Devices', 'Time'], - properties: { - Devices: { - type: 'array', - description: 'List of devices which should be added.', - items: { - title: 'Device', - description: - 'A device might either be a physical/virtual device or a group of device.', - type: 'object', - required: ['ID'], - properties: { - ID: { - type: 'string', +exports.validateUpdateBookingBodyResponse = validate54; +const schema39 = { + anyOf: [ + { + type: 'object', + description: 'Use this request for adding devices.', + properties: { + Locked: { + type: 'boolean', + description: + 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', + }, + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', description: - 'Unique ID of the device. Contains the institution (by having an end point at that institution)', - format: 'uri', + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, }, }, }, }, - Time: { - title: 'Timeslot', - description: 'A time slot represents a slice of time used for bookings.', + { type: 'object', - required: ['Start', 'End'], + description: 'Use this request for adding callbacks.', properties: { - Start: { - type: 'string', - description: 'Start time of the booking.', - format: 'date-time', - }, - End: { + Callback: { type: 'string', - description: 'End time of the booking.', - format: 'date-time', + format: 'uri', + description: 'Callback which should be called at changes.', }, }, }, - Type: { - description: - "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", - type: 'string', - enum: ['normal'], - }, - }, + ], 'x-standalone': false, - 'x-name': 'newBookingBodyResponse', + 'x-name': 'updateBookingBodyResponse', 'x-location': - '#/paths//booking/post/requestBody/content/application/json/schema_response', + '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate67( +function validate54( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; - if (errors === 0) { + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + if (errors === _errs1) { if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.Devices === undefined && (missing0 = 'Devices')) || - (data.Time === undefined && (missing0 = 'Time')) - ) { - validate67.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema52.required, - parentSchema: schema52, - data, - }, - ]; - return false; + if (data.Locked !== undefined) { + let data0 = data.Locked; + const _errs3 = errors; + if (typeof data0 !== 'boolean') { + const err0 = { + instancePath: instancePath + '/Locked', + schemaPath: '#/anyOf/0/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema39.anyOf[0].properties.Locked.type, + parentSchema: schema39.anyOf[0].properties.Locked, + data: data0, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var valid1 = _errs3 === errors; } else { + var valid1 = true; + } + if (valid1) { if (data.Devices !== undefined) { - let data0 = data.Devices; - const _errs1 = errors; - if (errors === _errs1) { - if (Array.isArray(data0)) { - var valid1 = true; - const len0 = data0.length; + let data1 = data.Devices; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; for (let i0 = 0; i0 < len0; i0++) { - let data1 = data0[i0]; - const _errs3 = errors; - if (errors === _errs3) { - if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { - let missing1; - if (data1.ID === undefined && (missing1 = 'ID')) { - validate67.errors = [ - { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/properties/Devices/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema52.properties.Devices.items.required, - parentSchema: schema52.properties.Devices.items, - data: data1, - }, - ]; - return false; + let data2 = data1[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing0; + if (data2.ID === undefined && (missing0 = 'ID')) { + const err1 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema39.anyOf[0].properties.Devices.items.required, + parentSchema: schema39.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; } else { - if (data1.ID !== undefined) { - let data2 = data1.ID; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats0(data2)) { - validate67.errors = [ - { - instancePath: instancePath + '/Devices/' + i0 + '/ID', - schemaPath: - '#/properties/Devices/items/properties/ID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema52.properties.Devices.items.properties.ID, - data: data2, - }, - ]; - return false; - } - } else { - validate67.errors = [ - { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + const err2 = { instancePath: instancePath + '/Devices/' + i0 + '/ID', schemaPath: - '#/properties/Devices/items/properties/ID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema52.properties.Devices.items.properties.ID.type, + '#/anyOf/0/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', parentSchema: - schema52.properties.Devices.items.properties.ID, - data: data2, - }, - ]; - return false; - } - } - } - } - } - } else { - validate67.errors = [ - { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/properties/Devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema52.properties.Devices.items.type, - parentSchema: schema52.properties.Devices.items, - data: data1, - }, - ]; - return false; - } - } - var valid1 = _errs3 === errors; - if (!valid1) { - break; - } - } - } else { - validate67.errors = [ - { - instancePath: instancePath + '/Devices', - schemaPath: '#/properties/Devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema52.properties.Devices.type, - parentSchema: schema52.properties.Devices, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.Time !== undefined) { - let data3 = data.Time; - const _errs7 = errors; - if (errors === _errs7) { - if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { - let missing2; - if ( - (data3.Start === undefined && (missing2 = 'Start')) || - (data3.End === undefined && (missing2 = 'End')) - ) { - validate67.errors = [ - { - instancePath: instancePath + '/Time', - schemaPath: '#/properties/Time/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema52.properties.Time.required, - parentSchema: schema52.properties.Time, - data: data3, - }, - ]; - return false; - } else { - if (data3.Start !== undefined) { - let data4 = data3.Start; - const _errs9 = errors; - if (errors === _errs9) { - if (errors === _errs9) { - if (typeof data4 === 'string') { - if (!formats2.validate(data4)) { - validate67.errors = [ - { - instancePath: instancePath + '/Time/Start', - schemaPath: '#/properties/Time/properties/Start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema52.properties.Time.properties.Start, - data: data4, - }, - ]; - return false; - } - } else { - validate67.errors = [ - { - instancePath: instancePath + '/Time/Start', - schemaPath: '#/properties/Time/properties/Start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema52.properties.Time.properties.Start.type, - parentSchema: schema52.properties.Time.properties.Start, - data: data4, - }, - ]; - return false; - } - } - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.End !== undefined) { - let data5 = data3.End; - const _errs11 = errors; - if (errors === _errs11) { - if (errors === _errs11) { - if (typeof data5 === 'string') { - if (!formats2.validate(data5)) { - validate67.errors = [ - { - instancePath: instancePath + '/Time/End', - schemaPath: '#/properties/Time/properties/End/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema52.properties.Time.properties.End, - data: data5, - }, - ]; - return false; - } - } else { - validate67.errors = [ - { - instancePath: instancePath + '/Time/End', - schemaPath: '#/properties/Time/properties/End/type', + schema39.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } else { + const err3 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema52.properties.Time.properties.End.type, - parentSchema: schema52.properties.Time.properties.End, - data: data5, - }, - ]; - return false; + schema: + schema39.anyOf[0].properties.Devices.items.properties.ID + .type, + parentSchema: + schema39.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } } } } - var valid3 = _errs11 === errors; + } + } else { + const err4 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema39.anyOf[0].properties.Devices.items.type, + parentSchema: schema39.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; } else { - var valid3 = true; + vErrors.push(err4); } + errors++; } } - } else { - validate67.errors = [ - { - instancePath: instancePath + '/Time', - schemaPath: '#/properties/Time/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema52.properties.Time.type, - parentSchema: schema52.properties.Time, - data: data3, - }, - ]; - return false; - } - } - var valid0 = _errs7 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.Type !== undefined) { - let data6 = data.Type; - const _errs13 = errors; - if (typeof data6 !== 'string') { - validate67.errors = [ - { - instancePath: instancePath + '/Type', - schemaPath: '#/properties/Type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema52.properties.Type.type, - parentSchema: schema52.properties.Type, - data: data6, - }, - ]; - return false; - } - if (!(data6 === 'normal')) { - validate67.errors = [ - { - instancePath: instancePath + '/Type', - schemaPath: '#/properties/Type/enum', - keyword: 'enum', - params: { allowedValues: schema52.properties.Type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema52.properties.Type.enum, - parentSchema: schema52.properties.Type, - data: data6, - }, - ]; - return false; + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } } - var valid0 = _errs13 === errors; } else { - var valid0 = true; + const err5 = { + instancePath: instancePath + '/Devices', + schemaPath: '#/anyOf/0/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema39.anyOf[0].properties.Devices.type, + parentSchema: schema39.anyOf[0].properties.Devices, + data: data1, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; } } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; } } } else { - validate67.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema52.type, - parentSchema: schema52, - data, - }, - ]; - return false; + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema39.anyOf[0].type, + parentSchema: schema39.anyOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; } } - validate67.errors = vErrors; + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Callback !== undefined) { + let data4 = data.Callback; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + const err7 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema39.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema39.anyOf[1].properties.Callback.type, + parentSchema: schema39.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } else { + const err9 = { + instancePath, + schemaPath: '#/anyOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema39.anyOf[1].type, + parentSchema: schema39.anyOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var _valid0 = _errs11 === errors; + valid0 = valid0 || _valid0; + } + if (!valid0) { + const err10 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema39.anyOf, + parentSchema: schema39, + data, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + validate54.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate54.errors = vErrors; return errors === 0; } -exports.validateNewBookingResponse200Request = validate68; -const schema53 = { +exports.validateUpdateBookingResponse200Request = validate55; +const schema40 = { type: 'object', required: ['BookingID'], - properties: { - BookingID: { - type: 'string', - format: 'uri', - description: 'ID at which the booking can be managed.', - }, - }, + properties: { BookingID: { type: 'string', format: 'uri' } }, 'x-standalone': false, - 'x-name': 'newBookingResponse200Request', + 'x-name': 'updateBookingResponse200Request', 'x-location': - '#/paths//booking/post/responses/200/content/application/json/schema_request', + '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate68( +function validate55( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -9510,15 +6621,15 @@ function validate68( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.BookingID === undefined && (missing0 = 'BookingID')) { - validate68.errors = [ + validate55.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema53.required, - parentSchema: schema53, + schema: schema40.required, + parentSchema: schema40, data, }, ]; @@ -9531,7 +6642,7 @@ function validate68( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate68.errors = [ + validate55.errors = [ { instancePath: instancePath + '/BookingID', schemaPath: '#/properties/BookingID/format', @@ -9539,22 +6650,22 @@ function validate68( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema53.properties.BookingID, + parentSchema: schema40.properties.BookingID, data: data0, }, ]; return false; } } else { - validate68.errors = [ + validate55.errors = [ { instancePath: instancePath + '/BookingID', schemaPath: '#/properties/BookingID/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema53.properties.BookingID.type, - parentSchema: schema53.properties.BookingID, + schema: schema40.properties.BookingID.type, + parentSchema: schema40.properties.BookingID, data: data0, }, ]; @@ -9565,42 +6676,36 @@ function validate68( } } } else { - validate68.errors = [ + validate55.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema53.type, - parentSchema: schema53, + schema: schema40.type, + parentSchema: schema40, data, }, ]; return false; } } - validate68.errors = vErrors; + validate55.errors = vErrors; return errors === 0; } -exports.validateNewBookingResponse200Response = validate69; -const schema54 = { +exports.validateUpdateBookingResponse200Response = validate56; +const schema41 = { type: 'object', required: ['BookingID'], - properties: { - BookingID: { - type: 'string', - format: 'uri', - description: 'ID at which the booking can be managed.', - }, - }, + properties: { BookingID: { type: 'string', format: 'uri' } }, 'x-standalone': false, - 'x-name': 'newBookingResponse200Response', + 'x-name': 'updateBookingResponse200Response', 'x-location': - '#/paths//booking/post/responses/200/content/application/json/schema_response', + '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate69( +function validate56( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -9610,15 +6715,15 @@ function validate69( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.BookingID === undefined && (missing0 = 'BookingID')) { - validate69.errors = [ + validate56.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema54.required, - parentSchema: schema54, + schema: schema41.required, + parentSchema: schema41, data, }, ]; @@ -9631,7 +6736,7 @@ function validate69( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate69.errors = [ + validate56.errors = [ { instancePath: instancePath + '/BookingID', schemaPath: '#/properties/BookingID/format', @@ -9639,22 +6744,22 @@ function validate69( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema54.properties.BookingID, + parentSchema: schema41.properties.BookingID, data: data0, }, ]; return false; } } else { - validate69.errors = [ + validate56.errors = [ { instancePath: instancePath + '/BookingID', schemaPath: '#/properties/BookingID/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.properties.BookingID.type, - parentSchema: schema54.properties.BookingID, + schema: schema41.properties.BookingID.type, + parentSchema: schema41.properties.BookingID, data: data0, }, ]; @@ -9665,1828 +6770,230 @@ function validate69( } } } else { - validate69.errors = [ + validate56.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema54.type, - parentSchema: schema54, + schema: schema41.type, + parentSchema: schema41, data, }, ]; return false; } } - validate69.errors = vErrors; + validate56.errors = vErrors; return errors === 0; } -exports.validateNewBookingResponse500Request = validate70; -const schema55 = { - description: 'Error description', +exports.validateUpdateBookingResponse400Request = validate57; +const schema42 = { type: 'string', + description: 'Error description', 'x-standalone': false, - 'x-name': 'newBookingResponse500Request', + 'x-name': 'updateBookingResponse400Request', 'x-location': - '#/paths//booking/post/responses/500/content/application/json/schema_request', + '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate70( +function validate57( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate70.errors = [ + validate57.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.type, - parentSchema: schema55, + schema: schema42.type, + parentSchema: schema42, data, }, ]; return false; } - validate70.errors = vErrors; + validate57.errors = vErrors; return errors === 0; } -exports.validateNewBookingResponse500Response = validate71; -const schema56 = { - description: 'Error description', +exports.validateUpdateBookingResponse400Response = validate58; +const schema43 = { type: 'string', + description: 'Error description', 'x-standalone': false, - 'x-name': 'newBookingResponse500Response', + 'x-name': 'updateBookingResponse400Response', 'x-location': - '#/paths//booking/post/responses/500/content/application/json/schema_response', + '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate71( +function validate58( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate71.errors = [ + validate58.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.type, - parentSchema: schema56, + schema: schema43.type, + parentSchema: schema43, data, }, ]; return false; } - validate71.errors = vErrors; + validate58.errors = vErrors; return errors === 0; } -exports.validateUpdateBookingBodyRequest = validate72; -const schema57 = { - anyOf: [ - { - type: 'object', - description: 'Use this request for adding devices.', - properties: { - Locked: { - type: 'boolean', - description: - 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', - }, - Devices: { - type: 'array', - description: 'List of devices which should be added.', - items: { - title: 'Device', - description: - 'A device might either be a physical/virtual device or a group of device.', - type: 'object', - required: ['ID'], - properties: { - ID: { - type: 'string', - description: - 'Unique ID of the device. Contains the institution (by having an end point at that institution)', - format: 'uri', - }, - }, - }, - }, - }, - }, - { - type: 'object', - description: 'Use this request for adding callbacks.', - properties: { - Callback: { - type: 'string', - format: 'uri', - description: 'Callback which should be called at changes.', - }, - }, - }, - ], +exports.validateUpdateBookingResponse500Request = validate59; +const schema44 = { + type: 'string', + description: 'Error description', 'x-standalone': false, - 'x-name': 'updateBookingBodyRequest', + 'x-name': 'updateBookingResponse500Request', 'x-location': - '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema_request', + '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate72( +function validate59( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.Locked !== undefined) { - let data0 = data.Locked; - const _errs3 = errors; - if (typeof data0 !== 'boolean') { - const err0 = { - instancePath: instancePath + '/Locked', - schemaPath: '#/anyOf/0/properties/Locked/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema57.anyOf[0].properties.Locked.type, - parentSchema: schema57.anyOf[0].properties.Locked, - data: data0, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.Devices !== undefined) { - let data1 = data.Devices; - const _errs5 = errors; - if (errors === _errs5) { - if (Array.isArray(data1)) { - var valid2 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; - const _errs7 = errors; - if (errors === _errs7) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - let missing0; - if (data2.ID === undefined && (missing0 = 'ID')) { - const err1 = { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/anyOf/0/properties/Devices/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema57.anyOf[0].properties.Devices.items.required, - parentSchema: schema57.anyOf[0].properties.Devices.items, - data: data2, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } else { - if (data2.ID !== undefined) { - let data3 = data2.ID; - const _errs9 = errors; - if (errors === _errs9) { - if (errors === _errs9) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - const err2 = { - instancePath: instancePath + '/Devices/' + i0 + '/ID', - schemaPath: - '#/anyOf/0/properties/Devices/items/properties/ID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[0].properties.Devices.items.properties - .ID, - data: data3, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } else { - const err3 = { - instancePath: instancePath + '/Devices/' + i0 + '/ID', - schemaPath: - '#/anyOf/0/properties/Devices/items/properties/ID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[0].properties.Devices.items.properties.ID - .type, - parentSchema: - schema57.anyOf[0].properties.Devices.items.properties - .ID, - data: data3, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - } - } - } - } - } else { - const err4 = { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/anyOf/0/properties/Devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema57.anyOf[0].properties.Devices.items.type, - parentSchema: schema57.anyOf[0].properties.Devices.items, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - } - var valid2 = _errs7 === errors; - if (!valid2) { - break; - } - } - } else { - const err5 = { - instancePath: instancePath + '/Devices', - schemaPath: '#/anyOf/0/properties/Devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[0].properties.Devices.type, - parentSchema: schema57.anyOf[0].properties.Devices, - data: data1, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - const err6 = { - instancePath, - schemaPath: '#/anyOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema57.anyOf[0].type, - parentSchema: schema57.anyOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.Callback !== undefined) { - let data4 = data.Callback; - const _errs13 = errors; - if (errors === _errs13) { - if (errors === _errs13) { - if (typeof data4 === 'string') { - if (!formats0(data4)) { - const err7 = { - instancePath: instancePath + '/Callback', - schemaPath: '#/anyOf/1/properties/Callback/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema57.anyOf[1].properties.Callback, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: instancePath + '/Callback', - schemaPath: '#/anyOf/1/properties/Callback/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[1].properties.Callback.type, - parentSchema: schema57.anyOf[1].properties.Callback, - data: data4, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } else { - const err9 = { - instancePath, - schemaPath: '#/anyOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema57.anyOf[1].type, - parentSchema: schema57.anyOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var _valid0 = _errs11 === errors; - valid0 = valid0 || _valid0; - } - if (!valid0) { - const err10 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema57.anyOf, - parentSchema: schema57, - data, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - validate72.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate72.errors = vErrors; - return errors === 0; -} -exports.validateUpdateBookingBodyResponse = validate73; -const schema58 = { - anyOf: [ - { - type: 'object', - description: 'Use this request for adding devices.', - properties: { - Locked: { - type: 'boolean', - description: - 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', - }, - Devices: { - type: 'array', - description: 'List of devices which should be added.', - items: { - title: 'Device', - description: - 'A device might either be a physical/virtual device or a group of device.', - type: 'object', - required: ['ID'], - properties: { - ID: { - type: 'string', - description: - 'Unique ID of the device. Contains the institution (by having an end point at that institution)', - format: 'uri', - }, - }, - }, - }, - }, - }, - { - type: 'object', - description: 'Use this request for adding callbacks.', - properties: { - Callback: { - type: 'string', - format: 'uri', - description: 'Callback which should be called at changes.', - }, - }, - }, - ], - 'x-standalone': false, - 'x-name': 'updateBookingBodyResponse', - 'x-location': - '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate73( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.Locked !== undefined) { - let data0 = data.Locked; - const _errs3 = errors; - if (typeof data0 !== 'boolean') { - const err0 = { - instancePath: instancePath + '/Locked', - schemaPath: '#/anyOf/0/properties/Locked/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema58.anyOf[0].properties.Locked.type, - parentSchema: schema58.anyOf[0].properties.Locked, - data: data0, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.Devices !== undefined) { - let data1 = data.Devices; - const _errs5 = errors; - if (errors === _errs5) { - if (Array.isArray(data1)) { - var valid2 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; - const _errs7 = errors; - if (errors === _errs7) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - let missing0; - if (data2.ID === undefined && (missing0 = 'ID')) { - const err1 = { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/anyOf/0/properties/Devices/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema58.anyOf[0].properties.Devices.items.required, - parentSchema: schema58.anyOf[0].properties.Devices.items, - data: data2, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } else { - if (data2.ID !== undefined) { - let data3 = data2.ID; - const _errs9 = errors; - if (errors === _errs9) { - if (errors === _errs9) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - const err2 = { - instancePath: instancePath + '/Devices/' + i0 + '/ID', - schemaPath: - '#/anyOf/0/properties/Devices/items/properties/ID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[0].properties.Devices.items.properties - .ID, - data: data3, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } else { - const err3 = { - instancePath: instancePath + '/Devices/' + i0 + '/ID', - schemaPath: - '#/anyOf/0/properties/Devices/items/properties/ID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[0].properties.Devices.items.properties.ID - .type, - parentSchema: - schema58.anyOf[0].properties.Devices.items.properties - .ID, - data: data3, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - } - } - } - } - } else { - const err4 = { - instancePath: instancePath + '/Devices/' + i0, - schemaPath: '#/anyOf/0/properties/Devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema58.anyOf[0].properties.Devices.items.type, - parentSchema: schema58.anyOf[0].properties.Devices.items, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - } - var valid2 = _errs7 === errors; - if (!valid2) { - break; - } - } - } else { - const err5 = { - instancePath: instancePath + '/Devices', - schemaPath: '#/anyOf/0/properties/Devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[0].properties.Devices.type, - parentSchema: schema58.anyOf[0].properties.Devices, - data: data1, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - const err6 = { - instancePath, - schemaPath: '#/anyOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema58.anyOf[0].type, - parentSchema: schema58.anyOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.Callback !== undefined) { - let data4 = data.Callback; - const _errs13 = errors; - if (errors === _errs13) { - if (errors === _errs13) { - if (typeof data4 === 'string') { - if (!formats0(data4)) { - const err7 = { - instancePath: instancePath + '/Callback', - schemaPath: '#/anyOf/1/properties/Callback/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema58.anyOf[1].properties.Callback, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: instancePath + '/Callback', - schemaPath: '#/anyOf/1/properties/Callback/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[1].properties.Callback.type, - parentSchema: schema58.anyOf[1].properties.Callback, - data: data4, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } else { - const err9 = { - instancePath, - schemaPath: '#/anyOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema58.anyOf[1].type, - parentSchema: schema58.anyOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var _valid0 = _errs11 === errors; - valid0 = valid0 || _valid0; - } - if (!valid0) { - const err10 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema58.anyOf, - parentSchema: schema58, - data, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - validate73.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate73.errors = vErrors; - return errors === 0; -} -exports.validateUpdateBookingResponse200Request = validate74; -const schema59 = { - type: 'object', - required: ['BookingID'], - properties: { BookingID: { type: 'string', format: 'uri' } }, - 'x-standalone': false, - 'x-name': 'updateBookingResponse200Request', - 'x-location': - '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate74( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.BookingID === undefined && (missing0 = 'BookingID')) { - validate74.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema59.required, - parentSchema: schema59, - data, - }, - ]; - return false; - } else { - if (data.BookingID !== undefined) { - let data0 = data.BookingID; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate74.errors = [ - { - instancePath: instancePath + '/BookingID', - schemaPath: '#/properties/BookingID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema59.properties.BookingID, - data: data0, - }, - ]; - return false; - } - } else { - validate74.errors = [ - { - instancePath: instancePath + '/BookingID', - schemaPath: '#/properties/BookingID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema59.properties.BookingID.type, - parentSchema: schema59.properties.BookingID, - data: data0, - }, - ]; - return false; - } - } - } - } - } - } else { - validate74.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema59.type, - parentSchema: schema59, - data, - }, - ]; - return false; - } - } - validate74.errors = vErrors; - return errors === 0; -} -exports.validateUpdateBookingResponse200Response = validate75; -const schema60 = { - type: 'object', - required: ['BookingID'], - properties: { BookingID: { type: 'string', format: 'uri' } }, - 'x-standalone': false, - 'x-name': 'updateBookingResponse200Response', - 'x-location': - '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate75( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.BookingID === undefined && (missing0 = 'BookingID')) { - validate75.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema60.required, - parentSchema: schema60, - data, - }, - ]; - return false; - } else { - if (data.BookingID !== undefined) { - let data0 = data.BookingID; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate75.errors = [ - { - instancePath: instancePath + '/BookingID', - schemaPath: '#/properties/BookingID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema60.properties.BookingID, - data: data0, - }, - ]; - return false; - } - } else { - validate75.errors = [ - { - instancePath: instancePath + '/BookingID', - schemaPath: '#/properties/BookingID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema60.properties.BookingID.type, - parentSchema: schema60.properties.BookingID, - data: data0, - }, - ]; - return false; - } - } - } - } - } - } else { - validate75.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema60.type, - parentSchema: schema60, - data, - }, - ]; - return false; - } - } - validate75.errors = vErrors; - return errors === 0; -} -exports.validateUpdateBookingResponse400Request = validate76; -const schema61 = { - type: 'string', - description: 'Error description', - 'x-standalone': false, - 'x-name': 'updateBookingResponse400Request', - 'x-location': - '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate76( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate76.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema61.type, - parentSchema: schema61, - data, - }, - ]; - return false; - } - validate76.errors = vErrors; - return errors === 0; -} -exports.validateUpdateBookingResponse400Response = validate77; -const schema62 = { - type: 'string', - description: 'Error description', - 'x-standalone': false, - 'x-name': 'updateBookingResponse400Response', - 'x-location': - '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate77( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate77.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema62.type, - parentSchema: schema62, - data, - }, - ]; - return false; - } - validate77.errors = vErrors; - return errors === 0; -} -exports.validateUpdateBookingResponse500Request = validate78; -const schema63 = { - type: 'string', - description: 'Error description', - 'x-standalone': false, - 'x-name': 'updateBookingResponse500Request', - 'x-location': - '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate78( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate78.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema63.type, - parentSchema: schema63, - data, - }, - ]; - return false; - } - validate78.errors = vErrors; - return errors === 0; -} -exports.validateUpdateBookingResponse500Response = validate79; -const schema64 = { - type: 'string', - description: 'Error description', - 'x-standalone': false, - 'x-name': 'updateBookingResponse500Response', - 'x-location': - '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate79( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate79.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.type, - parentSchema: schema64, - data, - }, - ]; - return false; - } - validate79.errors = vErrors; - return errors === 0; -} -exports.validateDeleteBookingResponse500Request = validate80; -const schema65 = { - type: 'string', - description: 'Error description', - 'x-standalone': false, - 'x-name': 'deleteBookingResponse500Request', - 'x-location': - '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate80( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate80.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema65.type, - parentSchema: schema65, - data, - }, - ]; - return false; - } - validate80.errors = vErrors; - return errors === 0; -} -exports.validateDeleteBookingResponse500Response = validate81; -const schema66 = { - type: 'string', - description: 'Error description', - 'x-standalone': false, - 'x-name': 'deleteBookingResponse500Response', - 'x-location': - '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate81( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate81.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema66.type, - parentSchema: schema66, - data, - }, - ]; - return false; - } - validate81.errors = vErrors; - return errors === 0; -} -exports.validateGetBookingResponse200Request = validate82; -const schema67 = { - type: 'object', - required: ['Booking', 'Locked'], - properties: { - Booking: { - title: 'Booking', - description: 'A booking in the booking system.', - type: 'object', - required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], - properties: { - ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, - Time: { - title: 'Timeslot', - description: 'A time slot represents a slice of time used for bookings.', - type: 'object', - required: ['Start', 'End'], - properties: { - Start: { - type: 'string', - description: 'Start time of the booking.', - format: 'date-time', - }, - End: { - type: 'string', - description: 'End time of the booking.', - format: 'date-time', - }, - }, - }, - Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, - Type: { - description: - "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", - type: 'string', - enum: ['normal'], - }, - Status: { - description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", - type: 'string', - enum: [ - 'pending', - 'booked', - 'rejected', - 'cancelled', - 'active', - 'active-pending', - 'active-rejected', - ], - }, - You: { type: 'boolean', description: 'If true, this booking was done by you.' }, - External: { - type: 'boolean', - description: 'Shows whether the booking was done by an external institution.', - }, - Message: { - type: 'string', - description: - 'User readable notes about the status of the booking (e.g. if devices are unknown).', - }, - }, - }, - Locked: { - type: 'boolean', - description: 'Shows if the booking is in a locked status.', - }, - }, - 'x-standalone': false, - 'x-name': 'getBookingResponse200Request', - 'x-location': - '#/paths//booking/{ID}/get/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate82( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.Booking === undefined && (missing0 = 'Booking')) || - (data.Locked === undefined && (missing0 = 'Locked')) - ) { - validate82.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema67.required, - parentSchema: schema67, - data, - }, - ]; - return false; - } else { - if (data.Booking !== undefined) { - let data0 = data.Booking; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing1; - if ( - (data0.ID === undefined && (missing1 = 'ID')) || - (data0.Time === undefined && (missing1 = 'Time')) || - (data0.Devices === undefined && (missing1 = 'Devices')) || - (data0.Status === undefined && (missing1 = 'Status')) || - (data0.You === undefined && (missing1 = 'You')) || - (data0.External === undefined && (missing1 = 'External')) - ) { - validate82.errors = [ - { - instancePath: instancePath + '/Booking', - schemaPath: '#/properties/Booking/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema67.properties.Booking.required, - parentSchema: schema67.properties.Booking, - data: data0, - }, - ]; - return false; - } else { - if (data0.ID !== undefined) { - let data1 = data0.ID; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats0(data1)) { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/ID', - schemaPath: '#/properties/Booking/properties/ID/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema67.properties.Booking.properties.ID, - data: data1, - }, - ]; - return false; - } - } else { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/ID', - schemaPath: '#/properties/Booking/properties/ID/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema67.properties.Booking.properties.ID.type, - parentSchema: schema67.properties.Booking.properties.ID, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Time !== undefined) { - let data2 = data0.Time; - const _errs5 = errors; - if (errors === _errs5) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - let missing2; - if ( - (data2.Start === undefined && (missing2 = 'Start')) || - (data2.End === undefined && (missing2 = 'End')) - ) { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/Time', - schemaPath: '#/properties/Booking/properties/Time/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema67.properties.Booking.properties.Time.required, - parentSchema: schema67.properties.Booking.properties.Time, - data: data2, - }, - ]; - return false; - } else { - if (data2.Start !== undefined) { - let data3 = data2.Start; - const _errs7 = errors; - if (errors === _errs7) { - if (errors === _errs7) { - if (typeof data3 === 'string') { - if (!formats2.validate(data3)) { - validate82.errors = [ - { - instancePath: - instancePath + '/Booking/Time/Start', - schemaPath: - '#/properties/Booking/properties/Time/properties/Start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema67.properties.Booking.properties.Time - .properties.Start, - data: data3, - }, - ]; - return false; - } - } else { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/Time/Start', - schemaPath: - '#/properties/Booking/properties/Time/properties/Start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema67.properties.Booking.properties.Time - .properties.Start.type, - parentSchema: - schema67.properties.Booking.properties.Time - .properties.Start, - data: data3, - }, - ]; - return false; - } - } - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data2.End !== undefined) { - let data4 = data2.End; - const _errs9 = errors; - if (errors === _errs9) { - if (errors === _errs9) { - if (typeof data4 === 'string') { - if (!formats2.validate(data4)) { - validate82.errors = [ - { - instancePath: - instancePath + '/Booking/Time/End', - schemaPath: - '#/properties/Booking/properties/Time/properties/End/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema67.properties.Booking.properties.Time - .properties.End, - data: data4, - }, - ]; - return false; - } - } else { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/Time/End', - schemaPath: - '#/properties/Booking/properties/Time/properties/End/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema67.properties.Booking.properties.Time - .properties.End.type, - parentSchema: - schema67.properties.Booking.properties.Time - .properties.End, - data: data4, - }, - ]; - return false; - } - } - } - var valid2 = _errs9 === errors; - } else { - var valid2 = true; - } - } - } - } else { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/Time', - schemaPath: '#/properties/Booking/properties/Time/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema67.properties.Booking.properties.Time.type, - parentSchema: schema67.properties.Booking.properties.Time, - data: data2, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Devices !== undefined) { - let data5 = data0.Devices; - const _errs11 = errors; - if (errors === _errs11) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs13 = errors; - if (errors === _errs13) { - if (errors === _errs13) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate82.errors = [ - { - instancePath: - instancePath + '/Booking/Devices/' + i0, - schemaPath: - '#/properties/Booking/properties/Devices/items/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema67.properties.Booking.properties.Devices - .items, - data: data6, - }, - ]; - return false; - } - } else { - validate82.errors = [ - { - instancePath: - instancePath + '/Booking/Devices/' + i0, - schemaPath: - '#/properties/Booking/properties/Devices/items/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema67.properties.Booking.properties.Devices - .items.type, - parentSchema: - schema67.properties.Booking.properties.Devices - .items, - data: data6, - }, - ]; - return false; - } - } - } - var valid3 = _errs13 === errors; - if (!valid3) { - break; - } - } - } else { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/Devices', - schemaPath: '#/properties/Booking/properties/Devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema67.properties.Booking.properties.Devices.type, - parentSchema: - schema67.properties.Booking.properties.Devices, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs11 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Type !== undefined) { - let data7 = data0.Type; - const _errs15 = errors; - if (typeof data7 !== 'string') { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/Type', - schemaPath: '#/properties/Booking/properties/Type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema67.properties.Booking.properties.Type.type, - parentSchema: schema67.properties.Booking.properties.Type, - data: data7, - }, - ]; - return false; - } - if (!(data7 === 'normal')) { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/Type', - schemaPath: '#/properties/Booking/properties/Type/enum', - keyword: 'enum', - params: { - allowedValues: - schema67.properties.Booking.properties.Type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema67.properties.Booking.properties.Type.enum, - parentSchema: schema67.properties.Booking.properties.Type, - data: data7, - }, - ]; - return false; - } - var valid1 = _errs15 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Status !== undefined) { - let data8 = data0.Status; - const _errs17 = errors; - if (typeof data8 !== 'string') { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/Status', - schemaPath: '#/properties/Booking/properties/Status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema67.properties.Booking.properties.Status.type, - parentSchema: - schema67.properties.Booking.properties.Status, - data: data8, - }, - ]; - return false; - } - if ( - !( - data8 === 'pending' || - data8 === 'booked' || - data8 === 'rejected' || - data8 === 'cancelled' || - data8 === 'active' || - data8 === 'active-pending' || - data8 === 'active-rejected' - ) - ) { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/Status', - schemaPath: '#/properties/Booking/properties/Status/enum', - keyword: 'enum', - params: { - allowedValues: - schema67.properties.Booking.properties.Status.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema67.properties.Booking.properties.Status.enum, - parentSchema: - schema67.properties.Booking.properties.Status, - data: data8, - }, - ]; - return false; - } - var valid1 = _errs17 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.You !== undefined) { - let data9 = data0.You; - const _errs19 = errors; - if (typeof data9 !== 'boolean') { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/You', - schemaPath: '#/properties/Booking/properties/You/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema67.properties.Booking.properties.You.type, - parentSchema: - schema67.properties.Booking.properties.You, - data: data9, - }, - ]; - return false; - } - var valid1 = _errs19 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.External !== undefined) { - let data10 = data0.External; - const _errs21 = errors; - if (typeof data10 !== 'boolean') { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/External', - schemaPath: - '#/properties/Booking/properties/External/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema67.properties.Booking.properties.External - .type, - parentSchema: - schema67.properties.Booking.properties.External, - data: data10, - }, - ]; - return false; - } - var valid1 = _errs21 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Message !== undefined) { - let data11 = data0.Message; - const _errs23 = errors; - if (typeof data11 !== 'string') { - validate82.errors = [ - { - instancePath: instancePath + '/Booking/Message', - schemaPath: - '#/properties/Booking/properties/Message/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema67.properties.Booking.properties.Message - .type, - parentSchema: - schema67.properties.Booking.properties.Message, - data: data11, - }, - ]; - return false; - } - var valid1 = _errs23 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } - } - } else { - validate82.errors = [ - { - instancePath: instancePath + '/Booking', - schemaPath: '#/properties/Booking/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema67.properties.Booking.type, - parentSchema: schema67.properties.Booking, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.Locked !== undefined) { - let data12 = data.Locked; - const _errs25 = errors; - if (typeof data12 !== 'boolean') { - validate82.errors = [ - { - instancePath: instancePath + '/Locked', - schemaPath: '#/properties/Locked/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema67.properties.Locked.type, - parentSchema: schema67.properties.Locked, - data: data12, - }, - ]; - return false; - } - var valid0 = _errs25 === errors; - } else { - var valid0 = true; - } - } - } - } else { - validate82.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema67.type, - parentSchema: schema67, - data, - }, - ]; - return false; - } + if (typeof data !== 'string') { + validate59.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema44.type, + parentSchema: schema44, + data, + }, + ]; + return false; + } + validate59.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse500Response = validate60; +const schema45 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate60( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate60.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema45.type, + parentSchema: schema45, + data, + }, + ]; + return false; + } + validate60.errors = vErrors; + return errors === 0; +} +exports.validateDeleteBookingResponse500Request = validate61; +const schema46 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'deleteBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate61( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate61.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema46.type, + parentSchema: schema46, + data, + }, + ]; + return false; + } + validate61.errors = vErrors; + return errors === 0; +} +exports.validateDeleteBookingResponse500Response = validate62; +const schema47 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'deleteBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate62( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate62.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema47.type, + parentSchema: schema47, + data, + }, + ]; + return false; } - validate82.errors = vErrors; + validate62.errors = vErrors; return errors === 0; } -exports.validateGetBookingResponse200Response = validate83; -const schema68 = { +exports.validateGetBookingResponse200Request = validate63; +const schema48 = { type: 'object', required: ['Booking', 'Locked'], properties: { @@ -11524,7 +7031,7 @@ const schema68 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -11554,12 +7061,12 @@ const schema68 = { }, }, 'x-standalone': false, - 'x-name': 'getBookingResponse200Response', + 'x-name': 'getBookingResponse200Request', 'x-location': - '#/paths//booking/{ID}/get/responses/200/content/application/json/schema_response', - 'x-schema-type': 'response', + '#/paths//booking/{ID}/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', }; -function validate83( +function validate63( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -11572,15 +7079,15 @@ function validate83( (data.Booking === undefined && (missing0 = 'Booking')) || (data.Locked === undefined && (missing0 = 'Locked')) ) { - validate83.errors = [ + validate63.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema68.required, - parentSchema: schema68, + schema: schema48.required, + parentSchema: schema48, data, }, ]; @@ -11600,15 +7107,15 @@ function validate83( (data0.You === undefined && (missing1 = 'You')) || (data0.External === undefined && (missing1 = 'External')) ) { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking', schemaPath: '#/properties/Booking/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema68.properties.Booking.required, - parentSchema: schema68.properties.Booking, + schema: schema48.properties.Booking.required, + parentSchema: schema48.properties.Booking, data: data0, }, ]; @@ -11621,7 +7128,7 @@ function validate83( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats0(data1)) { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/ID', schemaPath: '#/properties/Booking/properties/ID/format', @@ -11629,22 +7136,22 @@ function validate83( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema68.properties.Booking.properties.ID, + parentSchema: schema48.properties.Booking.properties.ID, data: data1, }, ]; return false; } } else { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/ID', schemaPath: '#/properties/Booking/properties/ID/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema68.properties.Booking.properties.ID.type, - parentSchema: schema68.properties.Booking.properties.ID, + schema: schema48.properties.Booking.properties.ID.type, + parentSchema: schema48.properties.Booking.properties.ID, data: data1, }, ]; @@ -11667,7 +7174,7 @@ function validate83( (data2.Start === undefined && (missing2 = 'Start')) || (data2.End === undefined && (missing2 = 'End')) ) { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Time', schemaPath: '#/properties/Booking/properties/Time/required', @@ -11675,8 +7182,8 @@ function validate83( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema68.properties.Booking.properties.Time.required, - parentSchema: schema68.properties.Booking.properties.Time, + schema48.properties.Booking.properties.Time.required, + parentSchema: schema48.properties.Booking.properties.Time, data: data2, }, ]; @@ -11689,7 +7196,7 @@ function validate83( if (errors === _errs7) { if (typeof data3 === 'string') { if (!formats2.validate(data3)) { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Time/Start', @@ -11701,7 +7208,7 @@ function validate83( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema68.properties.Booking.properties.Time + schema48.properties.Booking.properties.Time .properties.Start, data: data3, }, @@ -11709,7 +7216,7 @@ function validate83( return false; } } else { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Time/Start', schemaPath: @@ -11718,10 +7225,10 @@ function validate83( params: { type: 'string' }, message: 'must be string', schema: - schema68.properties.Booking.properties.Time + schema48.properties.Booking.properties.Time .properties.Start.type, parentSchema: - schema68.properties.Booking.properties.Time + schema48.properties.Booking.properties.Time .properties.Start, data: data3, }, @@ -11742,7 +7249,7 @@ function validate83( if (errors === _errs9) { if (typeof data4 === 'string') { if (!formats2.validate(data4)) { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Time/End', @@ -11754,7 +7261,7 @@ function validate83( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema68.properties.Booking.properties.Time + schema48.properties.Booking.properties.Time .properties.End, data: data4, }, @@ -11762,7 +7269,7 @@ function validate83( return false; } } else { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Time/End', schemaPath: @@ -11771,10 +7278,10 @@ function validate83( params: { type: 'string' }, message: 'must be string', schema: - schema68.properties.Booking.properties.Time + schema48.properties.Booking.properties.Time .properties.End.type, parentSchema: - schema68.properties.Booking.properties.Time + schema48.properties.Booking.properties.Time .properties.End, data: data4, }, @@ -11790,15 +7297,15 @@ function validate83( } } } else { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Time', schemaPath: '#/properties/Booking/properties/Time/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema68.properties.Booking.properties.Time.type, - parentSchema: schema68.properties.Booking.properties.Time, + schema: schema48.properties.Booking.properties.Time.type, + parentSchema: schema48.properties.Booking.properties.Time, data: data2, }, ]; @@ -11824,7 +7331,7 @@ function validate83( if (errors === _errs13) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Devices/' + i0, @@ -11835,7 +7342,7 @@ function validate83( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema68.properties.Booking.properties.Devices + schema48.properties.Booking.properties.Devices .items, data: data6, }, @@ -11843,7 +7350,7 @@ function validate83( return false; } } else { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Devices/' + i0, @@ -11853,10 +7360,10 @@ function validate83( params: { type: 'string' }, message: 'must be string', schema: - schema68.properties.Booking.properties.Devices + schema48.properties.Booking.properties.Devices .items.type, parentSchema: - schema68.properties.Booking.properties.Devices + schema48.properties.Booking.properties.Devices .items, data: data6, }, @@ -11871,16 +7378,16 @@ function validate83( } } } else { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Devices', schemaPath: '#/properties/Booking/properties/Devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema68.properties.Booking.properties.Devices.type, + schema: schema48.properties.Booking.properties.Devices.type, parentSchema: - schema68.properties.Booking.properties.Devices, + schema48.properties.Booking.properties.Devices, data: data5, }, ]; @@ -11896,33 +7403,33 @@ function validate83( let data7 = data0.Type; const _errs15 = errors; if (typeof data7 !== 'string') { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Type', schemaPath: '#/properties/Booking/properties/Type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema68.properties.Booking.properties.Type.type, - parentSchema: schema68.properties.Booking.properties.Type, + schema: schema48.properties.Booking.properties.Type.type, + parentSchema: schema48.properties.Booking.properties.Type, data: data7, }, ]; return false; } if (!(data7 === 'normal')) { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Type', schemaPath: '#/properties/Booking/properties/Type/enum', keyword: 'enum', params: { allowedValues: - schema68.properties.Booking.properties.Type.enum, + schema48.properties.Booking.properties.Type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema68.properties.Booking.properties.Type.enum, - parentSchema: schema68.properties.Booking.properties.Type, + schema: schema48.properties.Booking.properties.Type.enum, + parentSchema: schema48.properties.Booking.properties.Type, data: data7, }, ]; @@ -11937,7 +7444,7 @@ function validate83( let data8 = data0.Status; const _errs17 = errors; if (typeof data8 !== 'string') { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Status', schemaPath: '#/properties/Booking/properties/Status/type', @@ -11945,9 +7452,9 @@ function validate83( params: { type: 'string' }, message: 'must be string', schema: - schema68.properties.Booking.properties.Status.type, + schema48.properties.Booking.properties.Status.type, parentSchema: - schema68.properties.Booking.properties.Status, + schema48.properties.Booking.properties.Status, data: data8, }, ]; @@ -11964,20 +7471,20 @@ function validate83( data8 === 'active-rejected' ) ) { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Status', schemaPath: '#/properties/Booking/properties/Status/enum', keyword: 'enum', params: { allowedValues: - schema68.properties.Booking.properties.Status.enum, + schema48.properties.Booking.properties.Status.enum, }, message: 'must be equal to one of the allowed values', schema: - schema68.properties.Booking.properties.Status.enum, + schema48.properties.Booking.properties.Status.enum, parentSchema: - schema68.properties.Booking.properties.Status, + schema48.properties.Booking.properties.Status, data: data8, }, ]; @@ -11992,16 +7499,16 @@ function validate83( let data9 = data0.You; const _errs19 = errors; if (typeof data9 !== 'boolean') { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/You', schemaPath: '#/properties/Booking/properties/You/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema68.properties.Booking.properties.You.type, + schema: schema48.properties.Booking.properties.You.type, parentSchema: - schema68.properties.Booking.properties.You, + schema48.properties.Booking.properties.You, data: data9, }, ]; @@ -12016,7 +7523,7 @@ function validate83( let data10 = data0.External; const _errs21 = errors; if (typeof data10 !== 'boolean') { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/External', schemaPath: @@ -12025,10 +7532,10 @@ function validate83( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema68.properties.Booking.properties.External + schema48.properties.Booking.properties.External .type, parentSchema: - schema68.properties.Booking.properties.External, + schema48.properties.Booking.properties.External, data: data10, }, ]; @@ -12043,7 +7550,7 @@ function validate83( let data11 = data0.Message; const _errs23 = errors; if (typeof data11 !== 'string') { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking/Message', schemaPath: @@ -12052,10 +7559,10 @@ function validate83( params: { type: 'string' }, message: 'must be string', schema: - schema68.properties.Booking.properties.Message + schema48.properties.Booking.properties.Message .type, parentSchema: - schema68.properties.Booking.properties.Message, + schema48.properties.Booking.properties.Message, data: data11, }, ]; @@ -12074,15 +7581,15 @@ function validate83( } } } else { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Booking', schemaPath: '#/properties/Booking/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema68.properties.Booking.type, - parentSchema: schema68.properties.Booking, + schema: schema48.properties.Booking.type, + parentSchema: schema48.properties.Booking, data: data0, }, ]; @@ -12098,15 +7605,15 @@ function validate83( let data12 = data.Locked; const _errs25 = errors; if (typeof data12 !== 'boolean') { - validate83.errors = [ + validate63.errors = [ { instancePath: instancePath + '/Locked', schemaPath: '#/properties/Locked/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema68.properties.Locked.type, - parentSchema: schema68.properties.Locked, + schema: schema48.properties.Locked.type, + parentSchema: schema48.properties.Locked, data: data12, }, ]; @@ -12116,724 +7623,812 @@ function validate83( } else { var valid0 = true; } - } - } - } else { - validate83.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema68.type, - parentSchema: schema68, - data, - }, - ]; - return false; - } - } - validate83.errors = vErrors; - return errors === 0; -} -exports.validateGetBookingResponse500Request = validate84; -const schema69 = { - type: 'string', - description: 'Error code', - 'x-standalone': false, - 'x-name': 'getBookingResponse500Request', - 'x-location': - '#/paths//booking/{ID}/get/responses/500/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate84( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate84.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema69.type, - parentSchema: schema69, - data, - }, - ]; - return false; - } - validate84.errors = vErrors; - return errors === 0; -} -exports.validateGetBookingResponse500Response = validate85; -const schema70 = { - type: 'string', - description: 'Error code', - 'x-standalone': false, - 'x-name': 'getBookingResponse500Response', - 'x-location': - '#/paths//booking/{ID}/get/responses/500/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate85( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate85.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema70.type, - parentSchema: schema70, - data, - }, - ]; - return false; - } - validate85.errors = vErrors; - return errors === 0; -} -exports.validateDestroyBookingResponse500Request = validate86; -const schema71 = { - type: 'string', - description: 'Error description', - 'x-standalone': false, - 'x-name': 'destroyBookingResponse500Request', - 'x-location': - '#/paths//booking/{ID}/destroy/delete/responses/500/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate86( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate86.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema71.type, - parentSchema: schema71, - data, - }, - ]; - return false; + } + } + } else { + validate63.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema48.type, + parentSchema: schema48, + data, + }, + ]; + return false; + } } - validate86.errors = vErrors; + validate63.errors = vErrors; return errors === 0; } -exports.validateDestroyBookingResponse500Response = validate87; -const schema72 = { - type: 'string', - description: 'Error description', - 'x-standalone': false, - 'x-name': 'destroyBookingResponse500Response', - 'x-location': - '#/paths//booking/{ID}/destroy/delete/responses/500/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate87( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate87.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema72.type, - parentSchema: schema72, - data, +exports.validateGetBookingResponse200Response = validate64; +const schema49 = { + type: 'object', + required: ['Booking', 'Locked'], + properties: { + Booking: { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, }, - ]; - return false; - } - validate87.errors = vErrors; - return errors === 0; -} -exports.validateLockBookingResponse200Request = validate88; -const schema73 = { - type: 'array', - description: - 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', - items: { - type: 'object', - required: ['Requested', 'Selected'], - properties: { - Requested: { type: 'string', format: 'uri' }, - Selected: { type: 'string', format: 'uri' }, + }, + Locked: { + type: 'boolean', + description: 'Shows if the booking is in a locked status.', }, }, 'x-standalone': false, - 'x-name': 'lockBookingResponse200Request', + 'x-name': 'getBookingResponse200Response', 'x-location': - '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', + '#/paths//booking/{ID}/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', }; -function validate88( +function validate64( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if ( - (data0.Requested === undefined && (missing0 = 'Requested')) || - (data0.Selected === undefined && (missing0 = 'Selected')) - ) { - validate88.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema73.items.required, - parentSchema: schema73.items, - data: data0, - }, - ]; - return false; - } else { - if (data0.Requested !== undefined) { - let data1 = data0.Requested; - const _errs3 = errors; - if (errors === _errs3) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Booking === undefined && (missing0 = 'Booking')) || + (data.Locked === undefined && (missing0 = 'Locked')) + ) { + validate64.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema49.required, + parentSchema: schema49, + data, + }, + ]; + return false; + } else { + if (data.Booking !== undefined) { + let data0 = data.Booking; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.ID === undefined && (missing1 = 'ID')) || + (data0.Time === undefined && (missing1 = 'Time')) || + (data0.Devices === undefined && (missing1 = 'Devices')) || + (data0.Status === undefined && (missing1 = 'Status')) || + (data0.You === undefined && (missing1 = 'You')) || + (data0.External === undefined && (missing1 = 'External')) + ) { + validate64.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema49.properties.Booking.required, + parentSchema: schema49.properties.Booking, + data: data0, + }, + ]; + return false; + } else { + if (data0.ID !== undefined) { + let data1 = data0.ID; + const _errs3 = errors; if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats0(data1)) { - validate88.errors = [ + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema49.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } else { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema49.properties.Booking.properties.ID.type, + parentSchema: schema49.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Time !== undefined) { + let data2 = data0.Time; + const _errs5 = errors; + if (errors === _errs5) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if ( + (data2.Start === undefined && (missing2 = 'Start')) || + (data2.End === undefined && (missing2 = 'End')) + ) { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema49.properties.Booking.properties.Time.required, + parentSchema: schema49.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } else { + if (data2.Start !== undefined) { + let data3 = data2.Start; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate64.errors = [ + { + instancePath: + instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema49.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } else { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema49.properties.Booking.properties.Time + .properties.Start.type, + parentSchema: + schema49.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data2.End !== undefined) { + let data4 = data2.End; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate64.errors = [ + { + instancePath: + instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema49.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } else { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema49.properties.Booking.properties.Time + .properties.End.type, + parentSchema: + schema49.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate64.errors = [ { - instancePath: instancePath + '/' + i0 + '/Requested', - schemaPath: '#/items/properties/Requested/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema73.items.properties.Requested, - data: data1, + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema49.properties.Booking.properties.Time.type, + parentSchema: schema49.properties.Booking.properties.Time, + data: data2, }, ]; return false; } - } else { - validate88.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Requested', - schemaPath: '#/items/properties/Requested/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema73.items.properties.Requested.type, - parentSchema: schema73.items.properties.Requested, - data: data1, - }, - ]; - return false; } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Selected !== undefined) { - let data2 = data0.Selected; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats0(data2)) { - validate88.errors = [ + if (valid1) { + if (data0.Devices !== undefined) { + let data5 = data0.Devices; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate64.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema49.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } else { + validate64.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema49.properties.Booking.properties.Devices + .items.type, + parentSchema: + schema49.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } + } + var valid3 = _errs13 === errors; + if (!valid3) { + break; + } + } + } else { + validate64.errors = [ { - instancePath: instancePath + '/' + i0 + '/Selected', - schemaPath: '#/items/properties/Selected/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema73.items.properties.Selected, - data: data2, + instancePath: instancePath + '/Booking/Devices', + schemaPath: '#/properties/Booking/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema49.properties.Booking.properties.Devices.type, + parentSchema: + schema49.properties.Booking.properties.Devices, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Type !== undefined) { + let data7 = data0.Type; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema49.properties.Booking.properties.Type.type, + parentSchema: schema49.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + if (!(data7 === 'normal')) { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/enum', + keyword: 'enum', + params: { + allowedValues: + schema49.properties.Booking.properties.Type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema49.properties.Booking.properties.Type.enum, + parentSchema: schema49.properties.Booking.properties.Type, + data: data7, }, ]; return false; } - } else { - validate88.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Selected', - schemaPath: '#/items/properties/Selected/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema73.items.properties.Selected.type, - parentSchema: schema73.items.properties.Selected, - data: data2, - }, - ]; - return false; + var valid1 = _errs15 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Status !== undefined) { + let data8 = data0.Status; + const _errs17 = errors; + if (typeof data8 !== 'string') { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema49.properties.Booking.properties.Status.type, + parentSchema: + schema49.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + if ( + !( + data8 === 'pending' || + data8 === 'booked' || + data8 === 'rejected' || + data8 === 'cancelled' || + data8 === 'active' || + data8 === 'active-pending' || + data8 === 'active-rejected' + ) + ) { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/enum', + keyword: 'enum', + params: { + allowedValues: + schema49.properties.Booking.properties.Status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema49.properties.Booking.properties.Status.enum, + parentSchema: + schema49.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + var valid1 = _errs17 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.You !== undefined) { + let data9 = data0.You; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/You', + schemaPath: '#/properties/Booking/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema49.properties.Booking.properties.You.type, + parentSchema: + schema49.properties.Booking.properties.You, + data: data9, + }, + ]; + return false; + } + var valid1 = _errs19 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.External !== undefined) { + let data10 = data0.External; + const _errs21 = errors; + if (typeof data10 !== 'boolean') { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/External', + schemaPath: + '#/properties/Booking/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema49.properties.Booking.properties.External + .type, + parentSchema: + schema49.properties.Booking.properties.External, + data: data10, + }, + ]; + return false; + } + var valid1 = _errs21 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Message !== undefined) { + let data11 = data0.Message; + const _errs23 = errors; + if (typeof data11 !== 'string') { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Message', + schemaPath: + '#/properties/Booking/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema49.properties.Booking.properties.Message + .type, + parentSchema: + schema49.properties.Booking.properties.Message, + data: data11, + }, + ]; + return false; + } + var valid1 = _errs23 === errors; + } else { + var valid1 = true; + } + } + } + } } } } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; } } + } else { + validate64.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema49.properties.Booking.type, + parentSchema: schema49.properties.Booking, + data: data0, + }, + ]; + return false; } - } else { - validate88.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema73.items.type, - parentSchema: schema73.items, - data: data0, - }, - ]; - return false; } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate88.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema73.type, - parentSchema: schema73, - data, - }, - ]; - return false; - } - } - validate88.errors = vErrors; - return errors === 0; -} -exports.validateLockBookingResponse200Response = validate89; -const schema74 = { - type: 'array', - description: - 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', - items: { - type: 'object', - required: ['Requested', 'Selected'], - properties: { - Requested: { type: 'string', format: 'uri' }, - Selected: { type: 'string', format: 'uri' }, - }, - }, - 'x-standalone': false, - 'x-name': 'lockBookingResponse200Response', - 'x-location': - '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate89( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if ( - (data0.Requested === undefined && (missing0 = 'Requested')) || - (data0.Selected === undefined && (missing0 = 'Selected')) - ) { - validate89.errors = [ + if (valid0) { + if (data.Locked !== undefined) { + let data12 = data.Locked; + const _errs25 = errors; + if (typeof data12 !== 'boolean') { + validate64.errors = [ { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema74.items.required, - parentSchema: schema74.items, - data: data0, + instancePath: instancePath + '/Locked', + schemaPath: '#/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema49.properties.Locked.type, + parentSchema: schema49.properties.Locked, + data: data12, }, ]; return false; - } else { - if (data0.Requested !== undefined) { - let data1 = data0.Requested; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats0(data1)) { - validate89.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Requested', - schemaPath: '#/items/properties/Requested/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema74.items.properties.Requested, - data: data1, - }, - ]; - return false; - } - } else { - validate89.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Requested', - schemaPath: '#/items/properties/Requested/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema74.items.properties.Requested.type, - parentSchema: schema74.items.properties.Requested, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.Selected !== undefined) { - let data2 = data0.Selected; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats0(data2)) { - validate89.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Selected', - schemaPath: '#/items/properties/Selected/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema74.items.properties.Selected, - data: data2, - }, - ]; - return false; - } - } else { - validate89.errors = [ - { - instancePath: instancePath + '/' + i0 + '/Selected', - schemaPath: '#/items/properties/Selected/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema74.items.properties.Selected.type, - parentSchema: schema74.items.properties.Selected, - data: data2, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } } + var valid0 = _errs25 === errors; } else { - validate89.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema74.items.type, - parentSchema: schema74.items, - data: data0, - }, - ]; - return false; + var valid0 = true; } } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } } } else { - validate89.errors = [ + validate64.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema74.type, - parentSchema: schema74, + params: { type: 'object' }, + message: 'must be object', + schema: schema49.type, + parentSchema: schema49, data, }, ]; return false; } } - validate89.errors = vErrors; - return errors === 0; -} -exports.validateLockBookingResponse500Request = validate90; -const schema75 = { - type: 'string', - description: 'Error string', - 'x-standalone': false, - 'x-name': 'lockBookingResponse500Request', - 'x-location': - '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate90( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate90.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema75.type, - parentSchema: schema75, - data, - }, - ]; - return false; - } - validate90.errors = vErrors; - return errors === 0; -} -exports.validateLockBookingResponse500Response = validate91; -const schema76 = { - type: 'string', - description: 'Error string', - 'x-standalone': false, - 'x-name': 'lockBookingResponse500Response', - 'x-location': - '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate91( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate91.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema76.type, - parentSchema: schema76, - data, - }, - ]; - return false; - } - validate91.errors = vErrors; + validate64.errors = vErrors; return errors === 0; } -exports.validateUnlockBookingResponse500Request = validate92; -const schema77 = { +exports.validateGetBookingResponse500Request = validate65; +const schema50 = { type: 'string', - description: 'Error description.', + description: 'Error code', 'x-standalone': false, - 'x-name': 'unlockBookingResponse500Request', + 'x-name': 'getBookingResponse500Request', 'x-location': - '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema_request', + '#/paths//booking/{ID}/get/responses/500/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate92( +function validate65( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate92.errors = [ + validate65.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema77.type, - parentSchema: schema77, + schema: schema50.type, + parentSchema: schema50, data, }, ]; return false; } - validate92.errors = vErrors; + validate65.errors = vErrors; return errors === 0; } -exports.validateUnlockBookingResponse500Response = validate93; -const schema78 = { +exports.validateGetBookingResponse500Response = validate66; +const schema51 = { type: 'string', - description: 'Error description.', + description: 'Error code', 'x-standalone': false, - 'x-name': 'unlockBookingResponse500Response', + 'x-name': 'getBookingResponse500Response', 'x-location': - '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema_response', + '#/paths//booking/{ID}/get/responses/500/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate93( +function validate66( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate93.errors = [ + validate66.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema78.type, - parentSchema: schema78, + schema: schema51.type, + parentSchema: schema51, data, }, ]; return false; } - validate93.errors = vErrors; + validate66.errors = vErrors; return errors === 0; } -exports.validateBookingCallbackResponse500Request = validate94; -const schema79 = { +exports.validateDestroyBookingResponse500Request = validate67; +const schema52 = { type: 'string', - description: 'Error description.', + description: 'Error description', 'x-standalone': false, - 'x-name': 'bookingCallbackResponse500Request', + 'x-name': 'destroyBookingResponse500Request', 'x-location': - '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema_request', + '#/paths//booking/{ID}/destroy/delete/responses/500/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate94( +function validate67( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate94.errors = [ + validate67.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema79.type, - parentSchema: schema79, + schema: schema52.type, + parentSchema: schema52, data, }, ]; return false; } - validate94.errors = vErrors; + validate67.errors = vErrors; return errors === 0; } -exports.validateBookingCallbackResponse500Response = validate95; -const schema80 = { +exports.validateDestroyBookingResponse500Response = validate68; +const schema53 = { type: 'string', - description: 'Error description.', + description: 'Error description', 'x-standalone': false, - 'x-name': 'bookingCallbackResponse500Response', + 'x-name': 'destroyBookingResponse500Response', 'x-location': - '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema_response', + '#/paths//booking/{ID}/destroy/delete/responses/500/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate95( +function validate68( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate95.errors = [ + validate68.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema80.type, - parentSchema: schema80, + schema: schema53.type, + parentSchema: schema53, data, }, ]; return false; } - validate95.errors = vErrors; + validate68.errors = vErrors; return errors === 0; } diff --git a/services/experiment/src/clients/booking/basicValidation.d.cts b/services/booking/src/common/src/clients/booking-frontend/basicValidation.d.cts similarity index 62% rename from services/experiment/src/clients/booking/basicValidation.d.cts rename to services/booking/src/common/src/clients/booking-frontend/basicValidation.d.cts index ba22ef40..986e0dcc 100644 --- a/services/experiment/src/clients/booking/basicValidation.d.cts +++ b/services/booking/src/common/src/clients/booking-frontend/basicValidation.d.cts @@ -18,26 +18,6 @@ export declare function validateID( object: unknown, ): ID; -export declare function validateScheduleBody( - object: unknown, -): scheduleBody; - -export declare function validateScheduleResponse200< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse200; - -export declare function validateScheduleResponse404< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse404; - -export declare function validateScheduleResponse422< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse422; - -export declare function validateScheduleResponse500< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse500; - export declare function validateNewBookingBody( object: unknown, ): newBookingBody; @@ -82,22 +62,6 @@ export declare function validateDestroyBookingResponse500< T extends 'request' | 'response' | 'all', >(object: unknown): destroyBookingResponse500; -export declare function validateLockBookingResponse200< - T extends 'request' | 'response' | 'all', ->(object: unknown): lockBookingResponse200; - -export declare function validateLockBookingResponse500< - T extends 'request' | 'response' | 'all', ->(object: unknown): lockBookingResponse500; - -export declare function validateUnlockBookingResponse500< - T extends 'request' | 'response' | 'all', ->(object: unknown): unlockBookingResponse500; - -export declare function validateBookingCallbackResponse500< - T extends 'request' | 'response' | 'all', ->(object: unknown): bookingCallbackResponse500; - export declare function validateBookingRequest( object: unknown, ): BookingRequest; @@ -138,46 +102,6 @@ export declare function validateIDResponse; -export declare function validateScheduleBodyRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleBodyRequest; - -export declare function validateScheduleBodyResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleBodyResponse; - -export declare function validateScheduleResponse200Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse200Request; - -export declare function validateScheduleResponse200Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse200Response; - -export declare function validateScheduleResponse404Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse404Request; - -export declare function validateScheduleResponse404Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse404Response; - -export declare function validateScheduleResponse422Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse422Request; - -export declare function validateScheduleResponse422Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse422Response; - -export declare function validateScheduleResponse500Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse500Request; - -export declare function validateScheduleResponse500Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): scheduleResponse500Response; - export declare function validateNewBookingBodyRequest< T extends 'request' | 'response' | 'all', >(object: unknown): newBookingBodyRequest; @@ -265,35 +189,3 @@ export declare function validateDestroyBookingResponse500Request< export declare function validateDestroyBookingResponse500Response< T extends 'request' | 'response' | 'all', >(object: unknown): destroyBookingResponse500Response; - -export declare function validateLockBookingResponse200Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): lockBookingResponse200Request; - -export declare function validateLockBookingResponse200Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): lockBookingResponse200Response; - -export declare function validateLockBookingResponse500Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): lockBookingResponse500Request; - -export declare function validateLockBookingResponse500Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): lockBookingResponse500Response; - -export declare function validateUnlockBookingResponse500Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): unlockBookingResponse500Request; - -export declare function validateUnlockBookingResponse500Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): unlockBookingResponse500Response; - -export declare function validateBookingCallbackResponse500Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): bookingCallbackResponse500Request; - -export declare function validateBookingCallbackResponse500Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): bookingCallbackResponse500Response; diff --git a/services/booking/src/common/src/clients/booking-frontend/client.ts b/services/booking/src/common/src/clients/booking-frontend/client.ts new file mode 100644 index 00000000..c45ffc83 --- /dev/null +++ b/services/booking/src/common/src/clients/booking-frontend/client.ts @@ -0,0 +1,587 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; + +import * as RequestValidation from './requestValidation.js'; +import * as Signatures from './signatures.js'; +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * This error class should be used if an error occurs during validation of a request/response. + * @category Errors + */ +export class ValidationError extends Error { + public errors: unknown; + + constructor(message: string, errors: unknown) { + super(message); + this.name = 'ValidationError'; + this.errors = errors; + } +} + +/** + * This error class should be used if an error occurs while fetching a request. + * @category Errors + */ +export class FetchError extends Error { + constructor(message: string) { + super(message); + this.name = 'FetchError'; + } +} + +/** + * This error class should be used if the response of the server has a status + * greater than or equal to 400. This error should contain the validated response. + * @category Errors + */ +export class UnsuccessfulRequestError extends Error { + public response: Types.ResponseData; + + constructor(message: string, response: Types.ResponseData) { + super(message); + this.response = response; + this.name = 'UnsuccessfulRequestError'; + } +} + +/** + * This error class should be used if the validation of an url fails. + * @category Errors + */ +export class InvalidUrlError extends Error { + constructor(message: string) { + super(message); + this.name = 'InvalidUrlError'; + } +} + +/** + * This function attempts to parse a Response as ResponseData. + */ +async function parseResponse(response: Response): Promise { + let text = null; + try { + text = await response.text(); + const json = JSON.parse(text); + return { status: response.status, body: json }; + } catch { + return { status: response.status, body: text }; + } +} + +/** + * This function checks if a string is a valid http url. + * @param string The string to be checked. + * @returns True if the string is a valid http url. + */ +function isValidHttpUrl(string: string) { + let url; + + try { + url = new URL(string); + } catch (_) { + return false; + } + + return url.protocol === 'http:' || url.protocol === 'https:'; +} + +/** + * This function takes an url and a pattern for the requested endpoint and parses the contained path parameters. + * @param url The url to be parsed. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the provided url does not end with the provided endpoint. + * @returns An array containing all parsed path parameters in order of appearance. + * @example + * // returns ["username", "role_name"] + * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function parsePathParameters(url: string, endpoint: string): string[] { + const parameterRegex = '([a-zA-Z0-9-:]+)'; + const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); + const matches = url.match(regex); + + if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint'); + + return matches.slice(1); +} + +/** + * This function validates a given http url and parses its path parameters. + * @param url The url to be validated. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the validation of the provided url fails. + * @returns An array containing all parsed path parameters in order of appearance (see {@link parsePathParameters}). + * @example + * // returns ["username", "role_name"] + * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { + if (!isValidHttpUrl(url)) + throw new InvalidUrlError('Provided url is not a valid http url'); + if (!url.startsWith(baseUrl)) + throw new InvalidUrlError('Provided url does not start with the provided base url'); + const pathParameters = parsePathParameters(url, endpoint); + + let extendedBaseUrl = baseUrl + endpoint; + + pathParameters.forEach(pathParameter => { + extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); + }); + + if (url !== extendedBaseUrl) + throw new InvalidUrlError('Provided url does not match extended base url'); + + return pathParameters; +} + +/** + * This function appends a given endpoint to an url. + * @param url The url to append the endpoint to. + * @param endpoint The endpoint to be appended. + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id", "/token") + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id/", "/token") + * @returns The url with the appended endpoint. + */ +function appendToUrl(url: string, endpoint: string) { + return url.endsWith('/') ? `${url.slice(0, -1)}${endpoint}` : `${url}${endpoint}`; +} + +/** + * Client for the use of the Crosslab API + * @category Client + */ +export class Client { + public readonly baseUrl: string; + public readonly serviceUrl: string; + public accessToken: string; + private fixedHeaders: [string, string][]; + private fetch = async (url: RequestInfo | URL, init: RequestInit) => { + let raw_response; + try { + if ( + url.toString().startsWith(this.baseUrl) || + url.toString().startsWith(this.serviceUrl) + ) { + raw_response = await fetch(url, init); + } else { + raw_response = await fetch( + appendToUrl( + this.baseUrl, + '/proxy?' + new URLSearchParams([['URL', url.toString()]]).toString(), + ), + init, + ); + } + } catch (error) { + if (error instanceof Error) { + throw new FetchError(error.message); + } else if (typeof error === 'string') { + throw new FetchError(error); + } else { + throw new FetchError('Something went wrong while trying to fetch the request'); + } + } + return await parseResponse(raw_response); + }; + + /** + * @category Constructors + */ + constructor( + baseUrl: string, + options: { + serviceUrl?: string; + accessToken?: string; + fixedHeaders?: [string, string][]; + }, + ) { + this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; + this.serviceUrl = options.serviceUrl + ? options.serviceUrl.endsWith('/') + ? options.serviceUrl.slice(0, -1) + : options.serviceUrl + : this.baseUrl; + this.accessToken = options.accessToken ?? ''; + this.fixedHeaders = options.fixedHeaders ?? []; + } + + /** + * Books an experiment. + * + * @param body + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The booking was accepted. The booking status will display whether the booking of all devices was successful. + */ + public async newBooking( + body: + | { + /** + * List of devices which should be added. + */ + Devices: Types.Device<'request'>[]; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + [k: string]: unknown; + } + | undefined, + options?: { + headers?: [string, string][]; + url?: string; + }, + ): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/booking'); + + if (!RequestValidation.validateNewBookingInput(body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateNewBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }); + + if (!RequestValidation.validateNewBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateNewBookingOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. + + * + * @param url + * Url of the resource to be accessed. + * @param body + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The booking change was accepted. The booking status will display whether the booking of all devices was successful. + */ + public async updateBooking( + url: string, + body: + | { + /** + * Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set. + */ + Locked?: boolean; + /** + * List of devices which should be added. + */ + Devices?: Types.Device<'request'>[]; + [k: string]: unknown; + } + | { + /** + * Callback which should be called at changes. + */ + Callback?: string; + [k: string]: unknown; + }, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateUpdateBookingInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateUpdateBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'PATCH', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }); + + if (!RequestValidation.validateUpdateBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateUpdateBookingOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Cancels a booking, as long as the booking was originally done by you. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The booking was cancelled. All associated devices were released. + */ + public async deleteBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateDeleteBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateDeleteBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateDeleteBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateDeleteBookingOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Returns whether a list of devices is currently booked for a user. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * Returns the current booking. + */ + public async getBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateGetBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateGetBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateGetBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateGetBookingOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Allows selected persons (like lab manager) to remove a user booking. To avoid mistakes, this is a different path than normal delete. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The booking was cancelled. All associated devices were released. + */ + public async destroyBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}/destroy'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/destroy'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateDestroyBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateDestroyBookingInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateDestroyBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateDestroyBookingOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } +} diff --git a/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts b/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts new file mode 100644 index 00000000..eea88118 --- /dev/null +++ b/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts @@ -0,0 +1,377 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as BasicValidation from './basicValidation.cjs'; +import * as Signatures from './signatures.js'; +import { FunctionWithErrors, ResponseData } from './types.js'; + +/** + * This function validates the inputs to newBooking() + */ +export function validateNewBookingInput(body: Signatures.NewBookingBody) { + if (body === undefined) { + return true; + } + + if (!BasicValidation.validateNewBookingBodyRequest(body)) { + (validateNewBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateNewBookingBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of newBooking() + */ +export function validateNewBookingOutput( + response: ResponseData, +): response is Signatures.NewBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateNewBookingResponse200Response(response.body)) { + (validateNewBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateNewBookingResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateNewBookingResponse500Response(response.body)) { + (validateNewBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateNewBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + (validateNewBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to updateBooking() + */ +export function validateUpdateBookingInput( + parameters: Signatures.UpdateBookingParameters, + body: Signatures.UpdateBookingBody, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateUpdateBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + if (!BasicValidation.validateUpdateBookingBodyRequest(body)) { + (validateUpdateBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateBookingBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of updateBooking() + */ +export function validateUpdateBookingOutput( + response: ResponseData, +): response is Signatures.UpdateBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateUpdateBookingResponse200Response(response.body)) { + (validateUpdateBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateBookingResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + if (!BasicValidation.validateUpdateBookingResponse400Response(response.body)) { + (validateUpdateBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateBookingResponse400Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 423) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateUpdateBookingResponse500Response(response.body)) { + (validateUpdateBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + (validateUpdateBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to deleteBooking() + */ +export function validateDeleteBookingInput( + parameters: Signatures.DeleteBookingParameters, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateDeleteBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of deleteBooking() + */ +export function validateDeleteBookingOutput( + response: ResponseData, +): response is Signatures.DeleteBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 423) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateDeleteBookingResponse500Response(response.body)) { + (validateDeleteBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateDeleteBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + (validateDeleteBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to getBooking() + */ +export function validateGetBookingInput(parameters: Signatures.GetBookingParameters) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateGetBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of getBooking() + */ +export function validateGetBookingOutput( + response: ResponseData, +): response is Signatures.GetBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateGetBookingResponse200Response(response.body)) { + (validateGetBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateGetBookingResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateGetBookingResponse500Response(response.body)) { + (validateGetBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateGetBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + (validateGetBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to destroyBooking() + */ +export function validateDestroyBookingInput( + parameters: Signatures.DestroyBookingParameters, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateDestroyBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of destroyBooking() + */ +export function validateDestroyBookingOutput( + response: ResponseData, +): response is Signatures.DestroyBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 423) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateDestroyBookingResponse500Response(response.body)) { + (validateDestroyBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateDestroyBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + (validateDestroyBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} diff --git a/services/experiment/src/clients/booking/signatures.ts b/services/booking/src/common/src/clients/booking-frontend/signatures.ts similarity index 56% rename from services/experiment/src/clients/booking/signatures.ts rename to services/booking/src/common/src/clients/booking-frontend/signatures.ts index 015d1325..38b5600d 100644 --- a/services/experiment/src/clients/booking/signatures.ts +++ b/services/booking/src/common/src/clients/booking-frontend/signatures.ts @@ -11,167 +11,6 @@ import * as Types from './types.js'; // @ts-ignore import { type Require } from './types.js'; -/** - * Typing for the body of the request made by schedule() - * @category schedule() - */ -export type ScheduleBody = - | { - /** - * An experiment describes a set of devices and how they should be connected (potentially among other metadata). - */ - Experiment: Types.Experiment<'request'>; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: Types.Timeslot<'request'>; - /** - * If true, show only one timetable per device instead of one for all available physical devices. - */ - Combined?: boolean; - /** - * (private) Show only devices of this institution. Give an error if a device of an other institution is requested. - */ - onlyOwn?: boolean; - [k: string]: unknown; - } - | undefined; - -/** - * Typing for all possible responses to the request made by schedule() - * @category schedule() - */ -export type ScheduleResponse = ScheduleSuccessResponse | ScheduleErrorResponse; - -/** - * Typing for all successful responses to the request made by schedule() - * @category schedule() - */ -export type ScheduleSuccessResponse = ScheduleResponse200; - -/** - * Typing for all error responses to the request made by schedule() - * @category schedule() - */ -export type ScheduleErrorResponse = - | ScheduleResponse400 - | ScheduleResponse401 - | ScheduleResponse403 - | ScheduleResponse404 - | ScheduleResponse422 - | ScheduleResponse500 - | ScheduleResponse503; - -/** - * Typing for a response with status 200 to the request made by schedule() - * @category schedule() - */ -export interface ScheduleResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body: { - /** - * ID of the device (or * if combined). - */ - Device: string; - /** - * Array of booked times. - */ - Booked: Types.Timeslot<'response'>[]; - /** - * Array of free times. - */ - Free: Types.Timeslot<'response'>[]; - [k: string]: unknown; - }[]; -} - -/** - * Typing for a response with status 400 to the request made by schedule() - * @category schedule() - */ -export interface ScheduleResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 401 to the request made by schedule() - * @category schedule() - */ -export interface ScheduleResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 403 to the request made by schedule() - * @category schedule() - */ -export interface ScheduleResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 404 to the request made by schedule() - * @category schedule() - */ -export interface ScheduleResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body: string; -} - -/** - * Typing for a response with status 422 to the request made by schedule() - * @category schedule() - */ -export interface ScheduleResponse422 extends Types.ErrorResponse { - status: 422; - headers?: { - [k: string]: string | undefined; - }; - body: string; -} - -/** - * Typing for a response with status 500 to the request made by schedule() - * @category schedule() - */ -export interface ScheduleResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body: string; -} - -/** - * Typing for a response with status 503 to the request made by schedule() - * @category schedule() - */ -export interface ScheduleResponse503 extends Types.ErrorResponse { - status: 503; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - /** * Typing for the body of the request made by newBooking() * @category newBooking() @@ -788,320 +627,3 @@ export interface DestroyBookingResponse503 extends Types.ErrorResponse { }; body?: undefined; } - -/** - * Typing for the parameters of the request made by lockBooking() - * @category lockBooking() - */ -export type LockBookingParameters = { - ID: string; -}; - -/** - * Typing for all possible responses to the request made by lockBooking() - * @category lockBooking() - */ -export type LockBookingResponse = LockBookingSuccessResponse | LockBookingErrorResponse; - -/** - * Typing for all successful responses to the request made by lockBooking() - * @category lockBooking() - */ -export type LockBookingSuccessResponse = LockBookingResponse200; - -/** - * Typing for all error responses to the request made by lockBooking() - * @category lockBooking() - */ -export type LockBookingErrorResponse = - | LockBookingResponse401 - | LockBookingResponse403 - | LockBookingResponse404 - | LockBookingResponse412 - | LockBookingResponse500 - | LockBookingResponse503; - -/** - * Typing for a response with status 200 to the request made by lockBooking() - * @category lockBooking() - */ -export interface LockBookingResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body: { - Requested: string; - Selected: string; - [k: string]: unknown; - }[]; -} - -/** - * Typing for a response with status 401 to the request made by lockBooking() - * @category lockBooking() - */ -export interface LockBookingResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 403 to the request made by lockBooking() - * @category lockBooking() - */ -export interface LockBookingResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 404 to the request made by lockBooking() - * @category lockBooking() - */ -export interface LockBookingResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 412 to the request made by lockBooking() - * @category lockBooking() - */ -export interface LockBookingResponse412 extends Types.ErrorResponse { - status: 412; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 500 to the request made by lockBooking() - * @category lockBooking() - */ -export interface LockBookingResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body: string; -} - -/** - * Typing for a response with status 503 to the request made by lockBooking() - * @category lockBooking() - */ -export interface LockBookingResponse503 extends Types.ErrorResponse { - status: 503; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for the parameters of the request made by unlockBooking() - * @category unlockBooking() - */ -export type UnlockBookingParameters = { - ID: string; -}; - -/** - * Typing for all possible responses to the request made by unlockBooking() - * @category unlockBooking() - */ -export type UnlockBookingResponse = - | UnlockBookingSuccessResponse - | UnlockBookingErrorResponse; - -/** - * Typing for all successful responses to the request made by unlockBooking() - * @category unlockBooking() - */ -export type UnlockBookingSuccessResponse = UnlockBookingResponse200; - -/** - * Typing for all error responses to the request made by unlockBooking() - * @category unlockBooking() - */ -export type UnlockBookingErrorResponse = - | UnlockBookingResponse401 - | UnlockBookingResponse403 - | UnlockBookingResponse404 - | UnlockBookingResponse412 - | UnlockBookingResponse500 - | UnlockBookingResponse503; - -/** - * Typing for a response with status 200 to the request made by unlockBooking() - * @category unlockBooking() - */ -export interface UnlockBookingResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 401 to the request made by unlockBooking() - * @category unlockBooking() - */ -export interface UnlockBookingResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 403 to the request made by unlockBooking() - * @category unlockBooking() - */ -export interface UnlockBookingResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 404 to the request made by unlockBooking() - * @category unlockBooking() - */ -export interface UnlockBookingResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 412 to the request made by unlockBooking() - * @category unlockBooking() - */ -export interface UnlockBookingResponse412 extends Types.ErrorResponse { - status: 412; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 500 to the request made by unlockBooking() - * @category unlockBooking() - */ -export interface UnlockBookingResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body: string; -} - -/** - * Typing for a response with status 503 to the request made by unlockBooking() - * @category unlockBooking() - */ -export interface UnlockBookingResponse503 extends Types.ErrorResponse { - status: 503; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for the parameters of the request made by bookingCallback() - * @category bookingCallback() - */ -export type BookingCallbackParameters = { - ID: string; -}; - -/** - * Typing for all possible responses to the request made by bookingCallback() - * @category bookingCallback() - */ -export type BookingCallbackResponse = - | BookingCallbackSuccessResponse - | BookingCallbackErrorResponse; - -/** - * Typing for all successful responses to the request made by bookingCallback() - * @category bookingCallback() - */ -export type BookingCallbackSuccessResponse = BookingCallbackResponse200; - -/** - * Typing for all error responses to the request made by bookingCallback() - * @category bookingCallback() - */ -export type BookingCallbackErrorResponse = - | BookingCallbackResponse404 - | BookingCallbackResponse500 - | BookingCallbackResponse503; - -/** - * Typing for a response with status 200 to the request made by bookingCallback() - * @category bookingCallback() - */ -export interface BookingCallbackResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 404 to the request made by bookingCallback() - * @category bookingCallback() - */ -export interface BookingCallbackResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} - -/** - * Typing for a response with status 500 to the request made by bookingCallback() - * @category bookingCallback() - */ -export interface BookingCallbackResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body: string; -} - -/** - * Typing for a response with status 503 to the request made by bookingCallback() - * @category bookingCallback() - */ -export interface BookingCallbackResponse503 extends Types.ErrorResponse { - status: 503; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} diff --git a/services/booking/src/common/src/clients/booking-frontend/types.ts b/services/booking/src/common/src/clients/booking-frontend/types.ts new file mode 100644 index 00000000..8d0b0be8 --- /dev/null +++ b/services/booking/src/common/src/clients/booking-frontend/types.ts @@ -0,0 +1,410 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as _BasicValidation from './basicValidation.cjs'; + +/** + * @internal + */ +export interface FunctionWithErrors { + (...args: unknown[]): unknown; + errors?: unknown; +} + +/** + * @internal + */ +export interface RequestInfo { + method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'OPTIONS' | 'PATCH' | 'HEAD'; + body?: string; + headers?: [string, string][]; +} + +/** + * @internal + */ +export type FetchFunction = ( + url: string, + info?: RequestInfo, +) => Promise | ResponseData; + +export interface ResponseData { + status: number; + headers?: { + [key: string]: string | undefined; + }; + body?: unknown; +} + +export interface SuccessResponse extends ResponseData { + success?: true; +} + +export interface ErrorResponse extends ResponseData { + success?: false; +} + +/** + * @internal + */ +export function isSuccessResponse(response: ResponseData): response is SuccessResponse { + return response.status < 400; +} + +/** + * @internal + */ +export function isErrorResponse(response: ResponseData): response is ErrorResponse { + return response.status >= 400; +} + +/** + * This type allows to pick the required properties of another type. + */ +export type Require = Partial & { + [Property in Key]-?: Type[Property]; +}; + +export type SizedTuple< + T, + MIN extends number | undefined = undefined, + MAX extends number | undefined = undefined, +> = MIN extends number + ? MAX extends number + ? _SizedTuple> + : TupleObject> & T[] + : MAX extends number + ? _SizedTuple, true> + : T[]; + +type _SizedTuple = ARR extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? Tuple | _SizedTuple + : never; + +type Tuple = _Tuple< + T, + NumericRangeTuple +>; + +type _Tuple = N extends [ + infer HEAD, + ...infer TAIL extends number[], +] + ? HEAD extends 0 + ? [] | _Tuple + : [T, ..._Tuple] + : []; + +type TupleObject = N extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? TAIL extends [] + ? Record + : { [P in HEAD]: T } & TupleObject + : Record; + +export type NumericRange< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number = never, +> = ARR['length'] extends END + ? ACC | START | END + : NumericRange< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : ACC | ARR['length'] + >; + +type NumericRangeTuple< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number[] = [], +> = ARR['length'] extends END + ? [START, ...ACC, END] + : NumericRangeTuple< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : [...ACC, ARR['length']] + >; + +/** + * A booking in the booking system. + */ +export type Booking = T extends 'all' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : never; + +/** + * A device might either be a physical/virtual device or a group of device. + */ +export type Device = T extends 'all' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : never; + +/** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ +export type Experiment = T extends 'all' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'request'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'response'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : never; + +/** + * A time slot represents a slice of time used for bookings. + */ +export type Timeslot = T extends 'all' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : never; diff --git a/services/booking/src/common/src/clients/device/basicValidation.cjs b/services/booking/src/common/src/clients/device/basicValidation.cjs new file mode 100644 index 00000000..c1a37652 --- /dev/null +++ b/services/booking/src/common/src/clients/device/basicValidation.cjs @@ -0,0 +1,163692 @@ +/* eslint-disable */ +//@ts-nocheck +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +'use strict'; +exports.validateAuthenticationMessage = validate21; +const schema6 = { + title: 'Authentication Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'authenticate' }, + token: { type: 'string' }, + authenticated: { type: 'boolean' }, + }, + required: ['messageType'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'AuthenticationMessage', + 'x-location': '#/components/schemas/authentication_message', + 'x-schema-type': 'all', +}; +function validate21( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate21.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema6.allOf[0].required, + parentSchema: schema6.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.allOf[0].properties.messageType.type, + parentSchema: schema6.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate21.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.allOf[0].type, + parentSchema: schema6.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.messageType === undefined && (missing1 = 'messageType')) { + validate21.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema6.allOf[1].required, + parentSchema: schema6.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('authenticate' !== data1) { + validate21.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'authenticate' }, + message: 'must be equal to constant', + schema: 'authenticate', + parentSchema: schema6.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.token !== undefined) { + let data2 = data.token; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/token', + schemaPath: '#/allOf/1/properties/token/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.allOf[1].properties.token.type, + parentSchema: schema6.allOf[1].properties.token, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.authenticated !== undefined) { + let data3 = data.authenticated; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/authenticated', + schemaPath: '#/allOf/1/properties/authenticated/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.allOf[1].properties.authenticated.type, + parentSchema: schema6.allOf[1].properties.authenticated, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate21.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.allOf[1].type, + parentSchema: schema6.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate21.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStateChangedMessage = validate22; +const schema7 = { + title: 'Connection State Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'connection-state-changed' }, + connectionUrl: { type: 'string', format: 'uri' }, + status: { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['connectionUrl', 'status'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConnectionStateChangedMessage', + 'x-location': '#/components/schemas/connection_state_changed_message', + 'x-schema-type': 'all', +}; +const formats0 = require('ajv-formats/dist/formats').fullFormats.uri; +function validate22( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate22.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema7.allOf[0].required, + parentSchema: schema7.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate22.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema7.allOf[0].properties.messageType.type, + parentSchema: schema7.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate22.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema7.allOf[0].type, + parentSchema: schema7.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || + (data.status === undefined && (missing1 = 'status')) + ) { + validate22.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema7.allOf[1].required, + parentSchema: schema7.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('connection-state-changed' !== data1) { + validate22.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'connection-state-changed' }, + message: 'must be equal to constant', + schema: 'connection-state-changed', + parentSchema: schema7.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.connectionUrl !== undefined) { + let data2 = data.connectionUrl; + const _errs8 = errors; + if (errors === _errs8) { + if (errors === _errs8) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate22.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema7.allOf[1].properties.connectionUrl, + data: data2, + }, + ]; + return false; + } + } else { + validate22.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema7.allOf[1].properties.connectionUrl.type, + parentSchema: schema7.allOf[1].properties.connectionUrl, + data: data2, + }, + ]; + return false; + } + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.status !== undefined) { + let data3 = data.status; + const _errs10 = errors; + if (typeof data3 !== 'string') { + validate22.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema7.allOf[1].properties.status.type, + parentSchema: schema7.allOf[1].properties.status, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'new' || + data3 === 'connecting' || + data3 === 'connected' || + data3 === 'disconnected' || + data3 === 'failed' || + data3 === 'closed' + ) + ) { + validate22.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema7.allOf[1].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema7.allOf[1].properties.status.enum, + parentSchema: schema7.allOf[1].properties.status, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate22.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema7.allOf[1].type, + parentSchema: schema7.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate22.errors = vErrors; + return errors === 0; +} +exports.validateUserReference = validate23; +const schema8 = { + title: 'User Reference', + type: 'object', + properties: { url: { type: 'string', description: 'URL of the user', format: 'uri' } }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'UserReference', + 'x-location': '#/components/schemas/user_reference', + 'x-schema-type': 'all', +}; +function validate23( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate23.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema8.required, + parentSchema: schema8, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate23.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema8.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema8.properties.url.type, + parentSchema: schema8.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate23.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.type, + parentSchema: schema8, + data, + }, + ]; + return false; + } + } + validate23.errors = vErrors; + return errors === 0; +} +exports.validateDeviceOverview = validate24; +const schema9 = { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceOverview', + 'x-location': '#/components/schemas/device_overview', + 'x-schema-type': 'all', +}; +function validate24( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate24.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema9.required, + parentSchema: schema9, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate24.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema9.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.url.type, + parentSchema: schema9.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate24.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.name.type, + parentSchema: schema9.properties.name, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate24.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.description.type, + parentSchema: schema9.properties.description, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate24.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.type.type, + parentSchema: schema9.properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate24.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema9.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema9.properties.type.enum, + parentSchema: schema9.properties.type, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs9 = errors; + if (typeof data4 !== 'boolean') { + validate24.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema9.properties.isPublic.type, + parentSchema: schema9.properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid1 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs13 = errors; + if (errors === _errs13) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate24.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema9.properties.viewer.items.required, + parentSchema: schema9.properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate24.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema9.properties.viewer.items.properties + .url, + data: data7, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema9.properties.viewer.items.properties + .url.type, + parentSchema: + schema9.properties.viewer.items.properties + .url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema9.properties.viewer.items.type, + parentSchema: schema9.properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + if (!valid1) { + break; + } + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema9.properties.viewer.type, + parentSchema: schema9.properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs17 = errors; + if (errors === _errs17) { + if (Array.isArray(data8)) { + var valid3 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs19 = errors; + if (errors === _errs19) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate24.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema9.properties.owner.items.required, + parentSchema: schema9.properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs21 = errors; + if (errors === _errs21) { + if (errors === _errs21) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate24.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema9.properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema9.properties.owner.items.properties + .url.type, + parentSchema: + schema9.properties.owner.items.properties + .url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema9.properties.owner.items.type, + parentSchema: schema9.properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid3 = _errs19 === errors; + if (!valid3) { + break; + } + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema9.properties.owner.type, + parentSchema: schema9.properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } else { + validate24.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema9.type, + parentSchema: schema9, + data, + }, + ]; + return false; + } + } + validate24.errors = vErrors; + return errors === 0; +} +exports.validateServiceDescription = validate25; +const schema10 = { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { type: 'string', enum: ['consumer', 'producer', 'prosumer'] }, + }, + additionalProperties: true, + 'x-standalone': true, + 'x-name': 'ServiceDescription', + 'x-location': '#/components/schemas/service_description', + 'x-schema-type': 'all', +}; +function validate25( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.serviceType !== undefined) { + let data0 = data.serviceType; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate25.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema10.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } else { + validate25.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema10.properties.serviceType.type, + parentSchema: schema10.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceId !== undefined) { + let data1 = data.serviceId; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate25.errors = [ + { + instancePath: instancePath + '/serviceId', + schemaPath: '#/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema10.properties.serviceId.type, + parentSchema: schema10.properties.serviceId, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceDirection !== undefined) { + let data2 = data.serviceDirection; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate25.errors = [ + { + instancePath: instancePath + '/serviceDirection', + schemaPath: '#/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema10.properties.serviceDirection.type, + parentSchema: schema10.properties.serviceDirection, + data: data2, + }, + ]; + return false; + } + if (!(data2 === 'consumer' || data2 === 'producer' || data2 === 'prosumer')) { + validate25.errors = [ + { + instancePath: instancePath + '/serviceDirection', + schemaPath: '#/properties/serviceDirection/enum', + keyword: 'enum', + params: { allowedValues: schema10.properties.serviceDirection.enum }, + message: 'must be equal to one of the allowed values', + schema: schema10.properties.serviceDirection.enum, + parentSchema: schema10.properties.serviceDirection, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate25.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema10.type, + parentSchema: schema10, + data, + }, + ]; + return false; + } + } + validate25.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableCloudDevice = validate26; +const schema11 = { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'InstantiableCloudDevice', + 'x-location': '#/components/schemas/device_cloud_instantiable', + 'x-schema-type': 'all', +}; +function validate26( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate26.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema11.allOf[0].required, + parentSchema: schema11.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate26.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema11.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.allOf[0].properties.url.type, + parentSchema: schema11.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate26.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.allOf[0].properties.name.type, + parentSchema: schema11.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate26.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.allOf[0].properties.description.type, + parentSchema: schema11.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate26.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.allOf[0].properties.type.type, + parentSchema: schema11.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate26.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema11.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema11.allOf[0].properties.type.enum, + parentSchema: schema11.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate26.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema11.allOf[0].properties.isPublic.type, + parentSchema: schema11.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate26.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema11.allOf[0].properties.viewer.items.required, + parentSchema: + schema11.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate26.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema11.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema11.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.allOf[0].properties.viewer.items.type, + parentSchema: schema11.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema11.allOf[0].properties.viewer.type, + parentSchema: schema11.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate26.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema11.allOf[0].properties.owner.items.required, + parentSchema: + schema11.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate26.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema11.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema11.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.allOf[0].properties.owner.items.type, + parentSchema: + schema11.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema11.allOf[0].properties.owner.type, + parentSchema: schema11.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate26.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.allOf[0].type, + parentSchema: schema11.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data11) { + validate26.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema11.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + validate26.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema11.allOf[1].properties.instantiateUrl, + data: data12, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.allOf[1].properties.instantiateUrl.type, + parentSchema: schema11.allOf[1].properties.instantiateUrl, + data: data12, + }, + ]; + return false; + } + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data13)) { + var valid7 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + validate26.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema11.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema11.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate26.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema11.allOf[1].properties.services.items.properties + .serviceId, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs38 = errors; + if (typeof data17 !== 'string') { + validate26.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema11.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + validate26.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema11.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema11.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema11.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + var valid8 = _errs38 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.allOf[1].properties.services.items.type, + parentSchema: schema11.allOf[1].properties.services.items, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + if (!valid7) { + break; + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema11.allOf[1].properties.services.type, + parentSchema: schema11.allOf[1].properties.services, + data: data13, + }, + ]; + return false; + } + } + var valid6 = _errs29 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate26.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.allOf[1].type, + parentSchema: schema11.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate26.errors = vErrors; + return errors === 0; +} +exports.validateTimeSlot = validate27; +const schema12 = { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeSlot', + 'x-location': '#/components/schemas/time_slot', + 'x-schema-type': 'all', +}; +const formats22 = require('ajv-formats/dist/formats').fullFormats['date-time']; +function validate27( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.start !== undefined) { + let data0 = data.start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats22.validate(data0)) { + validate27.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema12.properties.start, + data: data0, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema12.properties.start.type, + parentSchema: schema12.properties.start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.end !== undefined) { + let data1 = data.end; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate27.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema12.properties.end, + data: data1, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema12.properties.end.type, + parentSchema: schema12.properties.end, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } else { + validate27.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema12.type, + parentSchema: schema12, + data, + }, + ]; + return false; + } + } + validate27.errors = vErrors; + return errors === 0; +} +exports.validateAvailability = validate28; +const schema13 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': true, + 'x-name': 'Availability', + 'x-location': '#/components/schemas/availability', + 'x-schema-type': 'all', +}; +function validate28( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate28.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema13.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate28.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema13.items.properties.start.type, + parentSchema: schema13.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate28.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema13.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate28.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema13.items.properties.end.type, + parentSchema: schema13.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate28.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema13.items.type, + parentSchema: schema13.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate28.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema13.type, + parentSchema: schema13, + data, + }, + ]; + return false; + } + } + validate28.errors = vErrors; + return errors === 0; +} +exports.validateConcreteDevice = validate29; +const schema14 = { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConcreteDevice', + 'x-location': '#/components/schemas/device_concrete', + 'x-schema-type': 'all', +}; +function validate29( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate29.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema14.allOf[0].required, + parentSchema: schema14.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate29.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema14.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate29.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.allOf[0].properties.url.type, + parentSchema: schema14.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate29.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.allOf[0].properties.name.type, + parentSchema: schema14.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate29.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.allOf[0].properties.description.type, + parentSchema: schema14.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate29.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.allOf[0].properties.type.type, + parentSchema: schema14.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate29.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema14.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema14.allOf[0].properties.type.enum, + parentSchema: schema14.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate29.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema14.allOf[0].properties.isPublic.type, + parentSchema: schema14.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate29.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema14.allOf[0].properties.viewer.items.required, + parentSchema: + schema14.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate29.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema14.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate29.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema14.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema14.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate29.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema14.allOf[0].properties.viewer.items.type, + parentSchema: schema14.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate29.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema14.allOf[0].properties.viewer.type, + parentSchema: schema14.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate29.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema14.allOf[0].properties.owner.items.required, + parentSchema: + schema14.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate29.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema14.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate29.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema14.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema14.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate29.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema14.allOf[0].properties.owner.items.type, + parentSchema: + schema14.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate29.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema14.allOf[0].properties.owner.type, + parentSchema: schema14.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate29.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema14.allOf[0].type, + parentSchema: schema14.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('device' !== data11) { + validate29.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema14.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.connected !== undefined) { + let data12 = data.connected; + const _errs27 = errors; + if (typeof data12 !== 'boolean') { + validate29.errors = [ + { + instancePath: instancePath + '/connected', + schemaPath: '#/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema14.allOf[1].properties.connected.type, + parentSchema: schema14.allOf[1].properties.connected, + data: data12, + }, + ]; + return false; + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.announcedAvailability !== undefined) { + let data13 = data.announcedAvailability; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data13)) { + var valid7 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.start !== undefined) { + let data15 = data14.start; + const _errs33 = errors; + if (errors === _errs33) { + if (errors === _errs33) { + if (typeof data15 === 'string') { + if (!formats22.validate(data15)) { + validate29.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema14.allOf[1].properties.announcedAvailability + .items.properties.start, + data: data15, + }, + ]; + return false; + } + } else { + validate29.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema14.allOf[1].properties.announcedAvailability + .items.properties.start.type, + parentSchema: + schema14.allOf[1].properties.announcedAvailability + .items.properties.start, + data: data15, + }, + ]; + return false; + } + } + } + var valid8 = _errs33 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.end !== undefined) { + let data16 = data14.end; + const _errs35 = errors; + if (errors === _errs35) { + if (errors === _errs35) { + if (typeof data16 === 'string') { + if (!formats22.validate(data16)) { + validate29.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema14.allOf[1].properties + .announcedAvailability.items.properties.end, + data: data16, + }, + ]; + return false; + } + } else { + validate29.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema14.allOf[1].properties.announcedAvailability + .items.properties.end.type, + parentSchema: + schema14.allOf[1].properties.announcedAvailability + .items.properties.end, + data: data16, + }, + ]; + return false; + } + } + } + var valid8 = _errs35 === errors; + } else { + var valid8 = true; + } + } + } else { + validate29.errors = [ + { + instancePath: instancePath + '/announcedAvailability/' + i2, + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema14.allOf[1].properties.announcedAvailability.items + .type, + parentSchema: + schema14.allOf[1].properties.announcedAvailability.items, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + if (!valid7) { + break; + } + } + } else { + validate29.errors = [ + { + instancePath: instancePath + '/announcedAvailability', + schemaPath: '#/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema14.allOf[1].properties.announcedAvailability.type, + parentSchema: schema14.allOf[1].properties.announcedAvailability, + data: data13, + }, + ]; + return false; + } + } + var valid6 = _errs29 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.experiment !== undefined) { + let data17 = data.experiment; + const _errs37 = errors; + if (errors === _errs37) { + if (errors === _errs37) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + validate29.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema14.allOf[1].properties.experiment, + data: data17, + }, + ]; + return false; + } + } else { + validate29.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.allOf[1].properties.experiment.type, + parentSchema: schema14.allOf[1].properties.experiment, + data: data17, + }, + ]; + return false; + } + } + } + var valid6 = _errs37 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data18 = data.services; + const _errs39 = errors; + if (errors === _errs39) { + if (Array.isArray(data18)) { + var valid9 = true; + const len3 = data18.length; + for (let i3 = 0; i3 < len3; i3++) { + let data19 = data18[i3]; + const _errs41 = errors; + if (errors === _errs41) { + if ( + data19 && + typeof data19 == 'object' && + !Array.isArray(data19) + ) { + if (data19.serviceType !== undefined) { + let data20 = data19.serviceType; + const _errs44 = errors; + if (errors === _errs44) { + if (errors === _errs44) { + if (typeof data20 === 'string') { + if (!formats0(data20)) { + validate29.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema14.allOf[1].properties.services.items + .properties.serviceType, + data: data20, + }, + ]; + return false; + } + } else { + validate29.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema14.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema14.allOf[1].properties.services.items + .properties.serviceType, + data: data20, + }, + ]; + return false; + } + } + } + var valid10 = _errs44 === errors; + } else { + var valid10 = true; + } + if (valid10) { + if (data19.serviceId !== undefined) { + let data21 = data19.serviceId; + const _errs46 = errors; + if (typeof data21 !== 'string') { + validate29.errors = [ + { + instancePath: + instancePath + '/services/' + i3 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema14.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema14.allOf[1].properties.services.items + .properties.serviceId, + data: data21, + }, + ]; + return false; + } + var valid10 = _errs46 === errors; + } else { + var valid10 = true; + } + if (valid10) { + if (data19.serviceDirection !== undefined) { + let data22 = data19.serviceDirection; + const _errs48 = errors; + if (typeof data22 !== 'string') { + validate29.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema14.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema14.allOf[1].properties.services.items + .properties.serviceDirection, + data: data22, + }, + ]; + return false; + } + if ( + !( + data22 === 'consumer' || + data22 === 'producer' || + data22 === 'prosumer' + ) + ) { + validate29.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema14.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema14.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema14.allOf[1].properties.services.items + .properties.serviceDirection, + data: data22, + }, + ]; + return false; + } + var valid10 = _errs48 === errors; + } else { + var valid10 = true; + } + } + } + } else { + validate29.errors = [ + { + instancePath: instancePath + '/services/' + i3, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema14.allOf[1].properties.services.items.type, + parentSchema: schema14.allOf[1].properties.services.items, + data: data19, + }, + ]; + return false; + } + } + var valid9 = _errs41 === errors; + if (!valid9) { + break; + } + } + } else { + validate29.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema14.allOf[1].properties.services.type, + parentSchema: schema14.allOf[1].properties.services, + data: data18, + }, + ]; + return false; + } + } + var valid6 = _errs39 === errors; + } else { + var valid6 = true; + } + } + } + } + } + } else { + validate29.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema14.allOf[1].type, + parentSchema: schema14.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate29.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableBrowserDevice = validate30; +const schema15 = { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'InstantiableBrowserDevice', + 'x-location': '#/components/schemas/device_edge_instantiable', + 'x-schema-type': 'all', +}; +function validate30( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate30.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema15.allOf[0].required, + parentSchema: schema15.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate30.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema15.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.allOf[0].properties.url.type, + parentSchema: schema15.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate30.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.allOf[0].properties.name.type, + parentSchema: schema15.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate30.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.allOf[0].properties.description.type, + parentSchema: schema15.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate30.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.allOf[0].properties.type.type, + parentSchema: schema15.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate30.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema15.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema15.allOf[0].properties.type.enum, + parentSchema: schema15.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate30.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema15.allOf[0].properties.isPublic.type, + parentSchema: schema15.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate30.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema15.allOf[0].properties.viewer.items.required, + parentSchema: + schema15.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate30.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema15.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema15.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema15.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema15.allOf[0].properties.viewer.items.type, + parentSchema: schema15.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema15.allOf[0].properties.viewer.type, + parentSchema: schema15.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate30.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema15.allOf[0].properties.owner.items.required, + parentSchema: + schema15.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate30.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema15.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema15.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema15.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema15.allOf[0].properties.owner.items.type, + parentSchema: + schema15.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema15.allOf[0].properties.owner.type, + parentSchema: schema15.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate30.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema15.allOf[0].type, + parentSchema: schema15.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('edge instantiable' !== data11) { + validate30.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema15.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.codeUrl !== undefined) { + let data12 = data.codeUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + validate30.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema15.allOf[1].properties.codeUrl, + data: data12, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.allOf[1].properties.codeUrl.type, + parentSchema: schema15.allOf[1].properties.codeUrl, + data: data12, + }, + ]; + return false; + } + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data13)) { + var valid7 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + validate30.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema15.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema15.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema15.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate30.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema15.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema15.allOf[1].properties.services.items.properties + .serviceId, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs38 = errors; + if (typeof data17 !== 'string') { + validate30.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema15.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema15.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + validate30.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema15.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema15.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema15.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + var valid8 = _errs38 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema15.allOf[1].properties.services.items.type, + parentSchema: schema15.allOf[1].properties.services.items, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + if (!valid7) { + break; + } + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema15.allOf[1].properties.services.type, + parentSchema: schema15.allOf[1].properties.services, + data: data13, + }, + ]; + return false; + } + } + var valid6 = _errs29 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate30.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema15.allOf[1].type, + parentSchema: schema15.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate30.errors = vErrors; + return errors === 0; +} +exports.validateDeviceReference = validate31; +const schema16 = { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'DeviceReference', + 'x-location': '#/components/schemas/device_reference', + 'x-schema-type': 'all', +}; +function validate31( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate31.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema16.required, + parentSchema: schema16, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate31.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema16.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.url.type, + parentSchema: schema16.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate31.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.type, + parentSchema: schema16, + data, + }, + ]; + return false; + } + } + validate31.errors = vErrors; + return errors === 0; +} +exports.validateDeviceGroup = validate32; +const schema17 = { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceGroup', + 'x-location': '#/components/schemas/device_group', + 'x-schema-type': 'all', +}; +function validate32( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate32.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema17.allOf[0].required, + parentSchema: schema17.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate32.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema17.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.allOf[0].properties.url.type, + parentSchema: schema17.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate32.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.allOf[0].properties.name.type, + parentSchema: schema17.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate32.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.allOf[0].properties.description.type, + parentSchema: schema17.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate32.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.allOf[0].properties.type.type, + parentSchema: schema17.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate32.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema17.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema17.allOf[0].properties.type.enum, + parentSchema: schema17.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate32.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema17.allOf[0].properties.isPublic.type, + parentSchema: schema17.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate32.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema17.allOf[0].properties.viewer.items.required, + parentSchema: + schema17.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate32.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema17.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema17.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema17.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.allOf[0].properties.viewer.items.type, + parentSchema: schema17.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema17.allOf[0].properties.viewer.type, + parentSchema: schema17.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate32.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema17.allOf[0].properties.owner.items.required, + parentSchema: + schema17.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate32.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema17.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema17.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema17.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.allOf[0].properties.owner.items.type, + parentSchema: + schema17.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema17.allOf[0].properties.owner.type, + parentSchema: schema17.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate32.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.allOf[0].type, + parentSchema: schema17.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.devices === undefined && (missing3 = 'devices')) { + validate32.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema17.allOf[1].required, + parentSchema: schema17.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('group' !== data11) { + validate32.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema17.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.devices !== undefined) { + let data12 = data.devices; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + let missing4; + if (data13.url === undefined && (missing4 = 'url')) { + validate32.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: schema17.allOf[1].properties.devices.items.required, + parentSchema: schema17.allOf[1].properties.devices.items, + data: data13, + }, + ]; + return false; + } else { + if (data13.url !== undefined) { + let data14 = data13.url; + const _errs31 = errors; + if (errors === _errs31) { + if (errors === _errs31) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate32.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema17.allOf[1].properties.devices.items + .properties.url, + data: data14, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema17.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema17.allOf[1].properties.devices.items + .properties.url, + data: data14, + }, + ]; + return false; + } + } + } + } + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.allOf[1].properties.devices.items.type, + parentSchema: schema17.allOf[1].properties.devices.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema17.allOf[1].properties.devices.type, + parentSchema: schema17.allOf[1].properties.devices, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate32.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.allOf[1].type, + parentSchema: schema17.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate32.errors = vErrors; + return errors === 0; +} +exports.validateDevice = validate33; +const schema18 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'Device', + 'x-location': '#/components/schemas/device', + 'x-schema-type': 'all', +}; +function validate33( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema18.anyOf[0].allOf[0].required, + parentSchema: schema18.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema18.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema18.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema18.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema18.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema18.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema18.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema18.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema18.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema18.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema18.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema18.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema18.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema18.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema18.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema18.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema18.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema18.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema18.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema18.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema18.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema18.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema18.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.anyOf[0].allOf[0].type, + parentSchema: schema18.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema18.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema18.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema18.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema18.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema18.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema18.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema18.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema18.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema18.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema18.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema18.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema18.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.anyOf[0].allOf[1].type, + parentSchema: schema18.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema18.anyOf[1].allOf[0].required, + parentSchema: schema18.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema18.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema18.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema18.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema18.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema18.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema18.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema18.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema18.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema18.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema18.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema18.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema18.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema18.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema18.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema18.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema18.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema18.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema18.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema18.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema18.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema18.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema18.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.anyOf[1].allOf[0].type, + parentSchema: schema18.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema18.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema18.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema18.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema18.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema18.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema18.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema18.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema18.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema18.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema18.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema18.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema18.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema18.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema18.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema18.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema18.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema18.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema18.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema18.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema18.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.anyOf[1].allOf[1].type, + parentSchema: schema18.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema18.anyOf[2].allOf[0].required, + parentSchema: schema18.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema18.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema18.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema18.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema18.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema18.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema18.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema18.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema18.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema18.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema18.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema18.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema18.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema18.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema18.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema18.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema18.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema18.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema18.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema18.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema18.anyOf[2].allOf[0].properties.owner.items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema18.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema18.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.anyOf[2].allOf[0].type, + parentSchema: schema18.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema18.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema18.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema18.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema18.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema18.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema18.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema18.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema18.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema18.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema18.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema18.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema18.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.anyOf[2].allOf[1].type, + parentSchema: schema18.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema18.anyOf[3].allOf[0].required, + parentSchema: schema18.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema18.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema18.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema18.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema18.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema18.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema18.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema18.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema18.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema18.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema18.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema18.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema18.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema18.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema18.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema18.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema18.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema18.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema18.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema18.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema18.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema18.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema18.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.anyOf[3].allOf[0].type, + parentSchema: schema18.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema18.anyOf[3].allOf[1].required, + parentSchema: schema18.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema18.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema18.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema18.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema18.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema18.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema18.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema18.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema18.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema18.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema18.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.anyOf[3].allOf[1].type, + parentSchema: schema18.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema18.anyOf, + parentSchema: schema18, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate33.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate33.errors = vErrors; + return errors === 0; +} +exports.validateCallback = validate34; +const schema19 = { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'Callback', + 'x-location': '#/components/schemas/callback', + 'x-schema-type': 'all', +}; +function validate34( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate34.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema19.required, + parentSchema: schema19, + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate34.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema19.properties.callbackType.type, + parentSchema: schema19.properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate34.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.type, + parentSchema: schema19, + data, + }, + ]; + return false; + } + } + validate34.errors = vErrors; + return errors === 0; +} +exports.validateEventCallback = validate35; +const schema20 = { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'EventCallback', + 'x-location': '#/components/schemas/event_callback', + 'x-schema-type': 'all', +}; +function validate35( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate35.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema20.allOf[0].required, + parentSchema: schema20.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate35.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema20.allOf[0].properties.callbackType.type, + parentSchema: schema20.allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate35.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema20.allOf[0].type, + parentSchema: schema20.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate35.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema20.allOf[1].required, + parentSchema: schema20.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs6 = errors; + if (typeof data1 !== 'string') { + validate35.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema20.allOf[1].properties.callbackType.type, + parentSchema: schema20.allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate35.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: schema20.allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema20.allOf[1].properties.callbackType.enum, + parentSchema: schema20.allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate35.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema20.allOf[1].properties.eventType.type, + parentSchema: schema20.allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate35.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema20.allOf[1].type, + parentSchema: schema20.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate35.errors = vErrors; + return errors === 0; +} +exports.validateDeviceChangedEventCallback = validate36; +const schema21 = { + title: 'Device Changed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['device-changed'] }, + device: { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'device'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceChangedEventCallback', + 'x-location': '#/components/schemas/device_changed', + 'x-schema-type': 'all', +}; +function validate36( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate36.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema21.allOf[0].allOf[0].required, + parentSchema: schema21.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate36.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema21.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate36.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.allOf[0].allOf[0].type, + parentSchema: schema21.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate36.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema21.allOf[0].allOf[1].required, + parentSchema: schema21.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate36.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema21.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate36.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema21.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema21.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema21.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate36.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema21.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate36.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.allOf[0].allOf[1].type, + parentSchema: schema21.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.device === undefined && (missing2 = 'device')) + ) { + validate36.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema21.allOf[1].required, + parentSchema: schema21.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate36.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.allOf[1].properties.eventType.type, + parentSchema: schema21.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'device-changed')) { + validate36.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema21.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema21.allOf[1].properties.eventType.enum, + parentSchema: schema21.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.device !== undefined) { + let data4 = data.device; + const _errs15 = errors; + const _errs16 = errors; + let valid5 = false; + const _errs17 = errors; + const _errs18 = errors; + if (errors === _errs18) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.url === undefined && (missing3 = 'url')) || + (data4.type === undefined && (missing3 = 'type')) || + (data4.name === undefined && (missing3 = 'name')) || + (data4.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err0 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0].required, + parentSchema: schema21.allOf[1].properties.device.anyOf[0].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + const err1 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.url, + data: data5, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.url.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.url, + data: data5, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid7 = _errs20 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.name !== undefined) { + let data6 = data4.name; + const _errs22 = errors; + if (typeof data6 !== 'string') { + const err3 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.name.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.name, + data: data6, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid7 = _errs22 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.description !== undefined) { + let data7 = data4.description; + const _errs24 = errors; + if (typeof data7 !== 'string') { + const err4 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.description.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.description, + data: data7, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid7 = _errs24 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.type !== undefined) { + let data8 = data4.type; + const _errs26 = errors; + if (typeof data8 !== 'string') { + const err5 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type, + data: data8, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data8 === 'device' || + data8 === 'group' || + data8 === 'edge instantiable' || + data8 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.enum, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type, + data: data8, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.isPublic !== undefined) { + let data9 = data4.isPublic; + const _errs28 = errors; + if (typeof data9 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.isPublic.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.isPublic, + data: data9, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.viewer !== undefined) { + let data10 = data4.viewer; + const _errs30 = errors; + if (errors === _errs30) { + if (Array.isArray(data10)) { + var valid8 = true; + const len0 = data10.length; + for (let i0 = 0; i0 < len0; i0++) { + let data11 = data10[i0]; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + let missing4; + if ( + data11.url === undefined && + (missing4 = 'url') + ) { + const err8 = { + instancePath: + instancePath + '/device/viewer/' + i0, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + + missing4 + + "'", + schema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer + .items.required, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer + .items, + data: data11, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data11.url !== undefined) { + let data12 = data11.url; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err9 = { + instancePath: + instancePath + + '/device/viewer/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.viewer.items + .properties.url, + data: data12, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + + '/device/viewer/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema21.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.viewer.items + .properties.url, + data: data12, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: + instancePath + '/device/viewer/' + i0, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer.items.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer.items, + data: data11, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid8 = _errs32 === errors; + if (!valid8) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer, + data: data10, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid7 = _errs30 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.owner !== undefined) { + let data13 = data4.owner; + const _errs36 = errors; + if (errors === _errs36) { + if (Array.isArray(data13)) { + var valid10 = true; + const len1 = data13.length; + for (let i1 = 0; i1 < len1; i1++) { + let data14 = data13[i1]; + const _errs38 = errors; + if (errors === _errs38) { + if ( + data14 && + typeof data14 == 'object' && + !Array.isArray(data14) + ) { + let missing5; + if ( + data14.url === undefined && + (missing5 = 'url') + ) { + const err13 = { + instancePath: + instancePath + '/device/owner/' + i1, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items.required, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data14.url !== undefined) { + let data15 = data14.url; + const _errs40 = errors; + if (errors === _errs40) { + if (errors === _errs40) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err14 = { + instancePath: + instancePath + + '/device/owner/' + + i1 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url, + data: data15, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + + '/device/owner/' + + i1 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema21.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url, + data: data15, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: + instancePath + '/device/owner/' + i1, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid10 = _errs38 === errors; + if (!valid10) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.owner.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.owner, + data: data13, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid7 = _errs36 === errors; + } else { + var valid7 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.allOf[1].properties.device.anyOf[0].allOf[0].type, + parentSchema: schema21.allOf[1].properties.device.anyOf[0].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid6 = _errs18 === errors; + if (valid6) { + const _errs42 = errors; + if (errors === _errs42) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data16 = data4.type; + const _errs44 = errors; + if ('cloud instantiable' !== data16) { + const err19 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: + schema21.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.type, + data: data16, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid12 = _errs44 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data4.instantiateUrl !== undefined) { + let data17 = data4.instantiateUrl; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + const err20 = { + instancePath: instancePath + '/device/instantiateUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/device/instantiateUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid12 = _errs45 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data4.services !== undefined) { + let data18 = data4.services; + const _errs47 = errors; + if (errors === _errs47) { + if (Array.isArray(data18)) { + var valid13 = true; + const len2 = data18.length; + for (let i2 = 0; i2 < len2; i2++) { + let data19 = data18[i2]; + const _errs49 = errors; + if (errors === _errs49) { + if ( + data19 && + typeof data19 == 'object' && + !Array.isArray(data19) + ) { + if (data19.serviceType !== undefined) { + let data20 = data19.serviceType; + const _errs52 = errors; + if (errors === _errs52) { + if (errors === _errs52) { + if (typeof data20 === 'string') { + if (!formats0(data20)) { + const err22 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid14 = _errs52 === errors; + } else { + var valid14 = true; + } + if (valid14) { + if (data19.serviceId !== undefined) { + let data21 = data19.serviceId; + const _errs54 = errors; + if (typeof data21 !== 'string') { + const err24 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items + .properties.serviceId, + data: data21, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid14 = _errs54 === errors; + } else { + var valid14 = true; + } + if (valid14) { + if (data19.serviceDirection !== undefined) { + let data22 = data19.serviceDirection; + const _errs56 = errors; + if (typeof data22 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection, + data: data22, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data22 === 'consumer' || + data22 === 'producer' || + data22 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema21.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection, + data: data22, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid14 = _errs56 === errors; + } else { + var valid14 = true; + } + } + } + } else { + const err27 = { + instancePath: + instancePath + '/device/services/' + i2, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items, + data: data19, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid13 = _errs49 === errors; + if (!valid13) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.services.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.services, + data: data18, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid12 = _errs47 === errors; + } else { + var valid12 = true; + } + } + } + } else { + const err29 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.allOf[1].properties.device.anyOf[0].allOf[1].type, + parentSchema: schema21.allOf[1].properties.device.anyOf[0].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid6 = _errs42 === errors; + } + var _valid0 = _errs17 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs58 = errors; + const _errs59 = errors; + if (errors === _errs59) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing6; + if ( + (data4.url === undefined && (missing6 = 'url')) || + (data4.type === undefined && (missing6 = 'type')) || + (data4.name === undefined && (missing6 = 'name')) || + (data4.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err30 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0].required, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data4.url !== undefined) { + let data23 = data4.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err31 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.url.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid16 = _errs61 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.name !== undefined) { + let data24 = data4.name; + const _errs63 = errors; + if (typeof data24 !== 'string') { + const err33 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.name.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.name, + data: data24, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid16 = _errs63 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.description !== undefined) { + let data25 = data4.description; + const _errs65 = errors; + if (typeof data25 !== 'string') { + const err34 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.description.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.description, + data: data25, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.type !== undefined) { + let data26 = data4.type; + const _errs67 = errors; + if (typeof data26 !== 'string') { + const err35 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type, + data: data26, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data26 === 'device' || + data26 === 'group' || + data26 === 'edge instantiable' || + data26 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.enum, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type, + data: data26, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid16 = _errs67 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.isPublic !== undefined) { + let data27 = data4.isPublic; + const _errs69 = errors; + if (typeof data27 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.isPublic.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.isPublic, + data: data27, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.viewer !== undefined) { + let data28 = data4.viewer; + const _errs71 = errors; + if (errors === _errs71) { + if (Array.isArray(data28)) { + var valid17 = true; + const len3 = data28.length; + for (let i3 = 0; i3 < len3; i3++) { + let data29 = data28[i3]; + const _errs73 = errors; + if (errors === _errs73) { + if ( + data29 && + typeof data29 == 'object' && + !Array.isArray(data29) + ) { + let missing7; + if ( + data29.url === undefined && + (missing7 = 'url') + ) { + const err38 = { + instancePath: + instancePath + '/device/viewer/' + i3, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + + missing7 + + "'", + schema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items.required, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items, + data: data29, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data29.url !== undefined) { + let data30 = data29.url; + const _errs75 = errors; + if (errors === _errs75) { + if (errors === _errs75) { + if (typeof data30 === 'string') { + if (!formats0(data30)) { + const err39 = { + instancePath: + instancePath + + '/device/viewer/' + + i3 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url, + data: data30, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + + '/device/viewer/' + + i3 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema21.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url, + data: data30, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: + instancePath + '/device/viewer/' + i3, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items, + data: data29, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid17 = _errs73 === errors; + if (!valid17) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.viewer.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.viewer, + data: data28, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid16 = _errs71 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.owner !== undefined) { + let data31 = data4.owner; + const _errs77 = errors; + if (errors === _errs77) { + if (Array.isArray(data31)) { + var valid19 = true; + const len4 = data31.length; + for (let i4 = 0; i4 < len4; i4++) { + let data32 = data31[i4]; + const _errs79 = errors; + if (errors === _errs79) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + let missing8; + if ( + data32.url === undefined && + (missing8 = 'url') + ) { + const err43 = { + instancePath: + instancePath + '/device/owner/' + i4, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items.required, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data32.url !== undefined) { + let data33 = data32.url; + const _errs81 = errors; + if (errors === _errs81) { + if (errors === _errs81) { + if (typeof data33 === 'string') { + if (!formats0(data33)) { + const err44 = { + instancePath: + instancePath + + '/device/owner/' + + i4 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url, + data: data33, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + + '/device/owner/' + + i4 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema21.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url, + data: data33, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: + instancePath + '/device/owner/' + i4, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid19 = _errs79 === errors; + if (!valid19) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.owner.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.owner, + data: data31, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid16 = _errs77 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.allOf[1].properties.device.anyOf[1].allOf[0].type, + parentSchema: schema21.allOf[1].properties.device.anyOf[1].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid15 = _errs59 === errors; + if (valid15) { + const _errs83 = errors; + if (errors === _errs83) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data34 = data4.type; + const _errs85 = errors; + if ('device' !== data34) { + const err49 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: + schema21.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.type, + data: data34, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid21 = _errs85 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.connected !== undefined) { + let data35 = data4.connected; + const _errs86 = errors; + if (typeof data35 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/device/connected', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema21.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.connected.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.connected, + data: data35, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid21 = _errs86 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.announcedAvailability !== undefined) { + let data36 = data4.announcedAvailability; + const _errs88 = errors; + if (errors === _errs88) { + if (Array.isArray(data36)) { + var valid22 = true; + const len5 = data36.length; + for (let i5 = 0; i5 < len5; i5++) { + let data37 = data36[i5]; + const _errs90 = errors; + if (errors === _errs90) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.start !== undefined) { + let data38 = data37.start; + const _errs92 = errors; + if (errors === _errs92) { + if (errors === _errs92) { + if (typeof data38 === 'string') { + if (!formats22.validate(data38)) { + const err51 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.start, + data: data38, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.start.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.start, + data: data38, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid23 = _errs92 === errors; + } else { + var valid23 = true; + } + if (valid23) { + if (data37.end !== undefined) { + let data39 = data37.end; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data39 === 'string') { + if (!formats22.validate(data39)) { + const err53 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.end, + data: data39, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.end.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.end, + data: data39, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid23 = _errs94 === errors; + } else { + var valid23 = true; + } + } + } else { + const err55 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.announcedAvailability + .items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid22 = _errs90 === errors; + if (!valid22) { + break; + } + } + } else { + const err56 = { + instancePath: + instancePath + '/device/announcedAvailability', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.announcedAvailability.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.announcedAvailability, + data: data36, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid21 = _errs88 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.experiment !== undefined) { + let data40 = data4.experiment; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err57 = { + instancePath: instancePath + '/device/experiment', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.experiment, + data: data40, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/device/experiment', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.experiment.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.experiment, + data: data40, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid21 = _errs96 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.services !== undefined) { + let data41 = data4.services; + const _errs98 = errors; + if (errors === _errs98) { + if (Array.isArray(data41)) { + var valid24 = true; + const len6 = data41.length; + for (let i6 = 0; i6 < len6; i6++) { + let data42 = data41[i6]; + const _errs100 = errors; + if (errors === _errs100) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + if (data42.serviceType !== undefined) { + let data43 = data42.serviceType; + const _errs103 = errors; + if (errors === _errs103) { + if (errors === _errs103) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err59 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties + .device.anyOf[1].allOf[1] + .properties.services.items + .properties.serviceType, + data: data43, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceType.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceType, + data: data43, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid25 = _errs103 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data42.serviceId !== undefined) { + let data44 = data42.serviceId; + const _errs105 = errors; + if (typeof data44 !== 'string') { + const err61 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties.serviceId + .type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceId, + data: data44, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data42.serviceDirection !== undefined) { + let data45 = data42.serviceDirection; + const _errs107 = errors; + if (typeof data45 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data45, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data45 === 'consumer' || + data45 === 'producer' || + data45 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema21.allOf[1].properties + .device.anyOf[1].allOf[1] + .properties.services.items + .properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data45, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err64 = { + instancePath: + instancePath + '/device/services/' + i6, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services.items.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid24 = _errs100 === errors; + if (!valid24) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services, + data: data41, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs98 === errors; + } else { + var valid21 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device.anyOf[1].allOf[1].type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[1].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid15 = _errs83 === errors; + } + var _valid0 = _errs58 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs109 = errors; + const _errs110 = errors; + if (errors === _errs110) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing9; + if ( + (data4.url === undefined && (missing9 = 'url')) || + (data4.type === undefined && (missing9 = 'type')) || + (data4.name === undefined && (missing9 = 'name')) || + (data4.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err67 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: + schema21.allOf[1].properties.device.anyOf[2].allOf[0] + .required, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data4.url !== undefined) { + let data46 = data4.url; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data46 === 'string') { + if (!formats0(data46)) { + const err68 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.url, + data: data46, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.url.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.url, + data: data46, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.name !== undefined) { + let data47 = data4.name; + const _errs114 = errors; + if (typeof data47 !== 'string') { + const err70 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.name.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.name, + data: data47, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.description !== undefined) { + let data48 = data4.description; + const _errs116 = errors; + if (typeof data48 !== 'string') { + const err71 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.description.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.description, + data: data48, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.type !== undefined) { + let data49 = data4.type; + const _errs118 = errors; + if (typeof data49 !== 'string') { + const err72 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type, + data: data49, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data49 === 'device' || + data49 === 'group' || + data49 === 'edge instantiable' || + data49 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type.enum, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type, + data: data49, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid27 = _errs118 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.isPublic !== undefined) { + let data50 = data4.isPublic; + const _errs120 = errors; + if (typeof data50 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.isPublic.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.isPublic, + data: data50, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.viewer !== undefined) { + let data51 = data4.viewer; + const _errs122 = errors; + if (errors === _errs122) { + if (Array.isArray(data51)) { + var valid28 = true; + const len7 = data51.length; + for (let i7 = 0; i7 < len7; i7++) { + let data52 = data51[i7]; + const _errs124 = errors; + if (errors === _errs124) { + if ( + data52 && + typeof data52 == 'object' && + !Array.isArray(data52) + ) { + let missing10; + if ( + data52.url === undefined && + (missing10 = 'url') + ) { + const err75 = { + instancePath: + instancePath + '/device/viewer/' + i7, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items, + data: data52, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data52.url !== undefined) { + let data53 = data52.url; + const _errs126 = errors; + if (errors === _errs126) { + if (errors === _errs126) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err76 = { + instancePath: + instancePath + + '/device/viewer/' + + i7 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url, + data: data53, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + + '/device/viewer/' + + i7 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema21.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url, + data: data53, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: + instancePath + '/device/viewer/' + i7, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items, + data: data52, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid28 = _errs124 === errors; + if (!valid28) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.viewer.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.viewer, + data: data51, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid27 = _errs122 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.owner !== undefined) { + let data54 = data4.owner; + const _errs128 = errors; + if (errors === _errs128) { + if (Array.isArray(data54)) { + var valid30 = true; + const len8 = data54.length; + for (let i8 = 0; i8 < len8; i8++) { + let data55 = data54[i8]; + const _errs130 = errors; + if (errors === _errs130) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + let missing11; + if ( + data55.url === undefined && + (missing11 = 'url') + ) { + const err80 = { + instancePath: + instancePath + + '/device/owner/' + + i8, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { + missingProperty: missing11, + }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[0].properties + .owner.items.required, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[0].properties + .owner.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data55.url !== undefined) { + let data56 = data55.url; + const _errs132 = errors; + if (errors === _errs132) { + if (errors === _errs132) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err81 = { + instancePath: + instancePath + + '/device/owner/' + + i8 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1] + .properties.device + .anyOf[2].allOf[0] + .properties.owner.items + .properties.url, + data: data56, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + + '/device/owner/' + + i8 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema21.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.owner.items + .properties.url, + data: data56, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: + instancePath + '/device/owner/' + i8, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid30 = _errs130 === errors; + if (!valid30) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.owner.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.owner, + data: data54, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid27 = _errs128 === errors; + } else { + var valid27 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device.anyOf[2].allOf[0].type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid26 = _errs110 === errors; + if (valid26) { + const _errs134 = errors; + if (errors === _errs134) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data57 = data4.type; + const _errs136 = errors; + if ('edge instantiable' !== data57) { + const err86 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: + schema21.allOf[1].properties.device.anyOf[2].allOf[1] + .properties.type, + data: data57, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid32 = _errs136 === errors; + } else { + var valid32 = true; + } + if (valid32) { + if (data4.codeUrl !== undefined) { + let data58 = data4.codeUrl; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data58 === 'string') { + if (!formats0(data58)) { + const err87 = { + instancePath: instancePath + '/device/codeUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl, + data: data58, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/device/codeUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl, + data: data58, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid32 = _errs137 === errors; + } else { + var valid32 = true; + } + if (valid32) { + if (data4.services !== undefined) { + let data59 = data4.services; + const _errs139 = errors; + if (errors === _errs139) { + if (Array.isArray(data59)) { + var valid33 = true; + const len9 = data59.length; + for (let i9 = 0; i9 < len9; i9++) { + let data60 = data59[i9]; + const _errs141 = errors; + if (errors === _errs141) { + if ( + data60 && + typeof data60 == 'object' && + !Array.isArray(data60) + ) { + if (data60.serviceType !== undefined) { + let data61 = data60.serviceType; + const _errs144 = errors; + if (errors === _errs144) { + if (errors === _errs144) { + if (typeof data61 === 'string') { + if (!formats0(data61)) { + const err89 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType, + data: data61, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType, + data: data61, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data60.serviceId !== undefined) { + let data62 = data60.serviceId; + const _errs146 = errors; + if (typeof data62 !== 'string') { + const err91 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data62, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid34 = _errs146 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data60.serviceDirection !== undefined) { + let data63 = data60.serviceDirection; + const _errs148 = errors; + if (typeof data63 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data63, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data63 === 'consumer' || + data63 === 'producer' || + data63 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema21.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data63, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid34 = _errs148 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err94 = { + instancePath: + instancePath + '/device/services/' + i9, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.items.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.items, + data: data60, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid33 = _errs141 === errors; + if (!valid33) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid32 = _errs139 === errors; + } else { + var valid32 = true; + } + } + } + } else { + const err96 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device.anyOf[2].allOf[1].type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[2].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid26 = _errs134 === errors; + } + var _valid0 = _errs109 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs150 = errors; + const _errs151 = errors; + if (errors === _errs151) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing12; + if ( + (data4.url === undefined && (missing12 = 'url')) || + (data4.type === undefined && (missing12 = 'type')) || + (data4.name === undefined && (missing12 = 'name')) || + (data4.isPublic === undefined && (missing12 = 'isPublic')) + ) { + const err97 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: + schema21.allOf[1].properties.device.anyOf[3].allOf[0] + .required, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data4.url !== undefined) { + let data64 = data4.url; + const _errs153 = errors; + if (errors === _errs153) { + if (errors === _errs153) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err98 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.url.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid36 = _errs153 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.name !== undefined) { + let data65 = data4.name; + const _errs155 = errors; + if (typeof data65 !== 'string') { + const err100 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.name.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.name, + data: data65, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid36 = _errs155 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.description !== undefined) { + let data66 = data4.description; + const _errs157 = errors; + if (typeof data66 !== 'string') { + const err101 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.description.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.description, + data: data66, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid36 = _errs157 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.type !== undefined) { + let data67 = data4.type; + const _errs159 = errors; + if (typeof data67 !== 'string') { + const err102 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type, + data: data67, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data67 === 'device' || + data67 === 'group' || + data67 === 'edge instantiable' || + data67 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.enum, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type, + data: data67, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid36 = _errs159 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.isPublic !== undefined) { + let data68 = data4.isPublic; + const _errs161 = errors; + if (typeof data68 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.isPublic.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.isPublic, + data: data68, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.viewer !== undefined) { + let data69 = data4.viewer; + const _errs163 = errors; + if (errors === _errs163) { + if (Array.isArray(data69)) { + var valid37 = true; + const len10 = data69.length; + for (let i10 = 0; i10 < len10; i10++) { + let data70 = data69[i10]; + const _errs165 = errors; + if (errors === _errs165) { + if ( + data70 && + typeof data70 == 'object' && + !Array.isArray(data70) + ) { + let missing13; + if ( + data70.url === undefined && + (missing13 = 'url') + ) { + const err105 = { + instancePath: + instancePath + + '/device/viewer/' + + i10, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { + missingProperty: missing13, + }, + message: + "must have required property '" + + missing13 + + "'", + schema: + schema21.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .viewer.items.required, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .viewer.items, + data: data70, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data70.url !== undefined) { + let data71 = data70.url; + const _errs167 = errors; + if (errors === _errs167) { + if (errors === _errs167) { + if (typeof data71 === 'string') { + if (!formats0(data71)) { + const err106 = { + instancePath: + instancePath + + '/device/viewer/' + + i10 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.viewer.items + .properties.url, + data: data71, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/device/viewer/' + + i10 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema21.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.viewer.items + .properties.url, + data: data71, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: + instancePath + + '/device/viewer/' + + i10, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items, + data: data70, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid37 = _errs165 === errors; + if (!valid37) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.viewer.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.viewer, + data: data69, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid36 = _errs163 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.owner !== undefined) { + let data72 = data4.owner; + const _errs169 = errors; + if (errors === _errs169) { + if (Array.isArray(data72)) { + var valid39 = true; + const len11 = data72.length; + for (let i11 = 0; i11 < len11; i11++) { + let data73 = data72[i11]; + const _errs171 = errors; + if (errors === _errs171) { + if ( + data73 && + typeof data73 == 'object' && + !Array.isArray(data73) + ) { + let missing14; + if ( + data73.url === undefined && + (missing14 = 'url') + ) { + const err110 = { + instancePath: + instancePath + + '/device/owner/' + + i11, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { + missingProperty: missing14, + }, + message: + "must have required property '" + + missing14 + + "'", + schema: + schema21.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.owner.items + .required, + parentSchema: + schema21.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.owner.items, + data: data73, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data73.url !== undefined) { + let data74 = data73.url; + const _errs173 = errors; + if (errors === _errs173) { + if (errors === _errs173) { + if ( + typeof data74 === 'string' + ) { + if (!formats0(data74)) { + const err111 = { + instancePath: + instancePath + + '/device/owner/' + + i11 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner + .items.properties.url, + data: data74, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/device/owner/' + + i11 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema21.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url, + data: data74, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: + instancePath + + '/device/owner/' + + i11, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .owner.items.type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .owner.items, + data: data73, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid39 = _errs171 === errors; + if (!valid39) { + break; + } + } + } else { + const err114 = { + instancePath: + instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner + .type, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner, + data: data72, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid36 = _errs169 === errors; + } else { + var valid36 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device.anyOf[3].allOf[0].type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid35 = _errs151 === errors; + if (valid35) { + const _errs175 = errors; + if (errors === _errs175) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing15; + if (data4.devices === undefined && (missing15 = 'devices')) { + const err116 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing15 }, + message: "must have required property '" + missing15 + "'", + schema: + schema21.allOf[1].properties.device.anyOf[3].allOf[1] + .required, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data4.type !== undefined) { + let data75 = data4.type; + const _errs177 = errors; + if ('group' !== data75) { + const err117 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: + schema21.allOf[1].properties.device.anyOf[3].allOf[1] + .properties.type, + data: data75, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid41 = _errs177 === errors; + } else { + var valid41 = true; + } + if (valid41) { + if (data4.devices !== undefined) { + let data76 = data4.devices; + const _errs178 = errors; + if (errors === _errs178) { + if (Array.isArray(data76)) { + var valid42 = true; + const len12 = data76.length; + for (let i12 = 0; i12 < len12; i12++) { + let data77 = data76[i12]; + const _errs180 = errors; + if (errors === _errs180) { + if ( + data77 && + typeof data77 == 'object' && + !Array.isArray(data77) + ) { + let missing16; + if ( + data77.url === undefined && + (missing16 = 'url') + ) { + const err118 = { + instancePath: + instancePath + '/device/devices/' + i12, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing16 }, + message: + "must have required property '" + + missing16 + + "'", + schema: + schema21.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items.required, + parentSchema: + schema21.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items, + data: data77, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data77.url !== undefined) { + let data78 = data77.url; + const _errs182 = errors; + if (errors === _errs182) { + if (errors === _errs182) { + if (typeof data78 === 'string') { + if (!formats0(data78)) { + const err119 = { + instancePath: + instancePath + + '/device/devices/' + + i12 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema21.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url, + data: data78, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + + '/device/devices/' + + i12 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema21.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url, + data: data78, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: + instancePath + '/device/devices/' + i12, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices.items.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices.items, + data: data77, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid42 = _errs180 === errors; + if (!valid42) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/device/devices', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices.type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices, + data: data76, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid41 = _errs178 === errors; + } else { + var valid41 = true; + } + } + } + } else { + const err123 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema21.allOf[1].properties.device.anyOf[3].allOf[1].type, + parentSchema: + schema21.allOf[1].properties.device.anyOf[3].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid35 = _errs175 === errors; + } + var _valid0 = _errs150 === errors; + valid5 = valid5 || _valid0; + } + } + } + if (!valid5) { + const err124 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema21.allOf[1].properties.device.anyOf, + parentSchema: schema21.allOf[1].properties.device, + data: data4, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate36.errors = vErrors; + return false; + } else { + errors = _errs16; + if (vErrors !== null) { + if (_errs16) { + vErrors.length = _errs16; + } else { + vErrors = null; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate36.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.allOf[1].type, + parentSchema: schema21.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate36.errors = vErrors; + return errors === 0; +} +exports.validateDeviceOverviewUpdate = validate37; +const schema22 = { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + 'x-standalone': true, + 'x-name': 'DeviceOverviewUpdate', + 'x-location': '#/components/schemas/device_overview_update', + 'x-schema-type': 'all', +}; +function validate37( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate37.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema22.required, + parentSchema: schema22, + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs1 = errors; + if (typeof data0 !== 'string') { + validate37.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.name.type, + parentSchema: schema22.properties.name, + data: data0, + }, + ]; + return false; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate37.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.description.type, + parentSchema: schema22.properties.description, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate37.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.type.type, + parentSchema: schema22.properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate37.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema22.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema22.properties.type.enum, + parentSchema: schema22.properties.type, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs7 = errors; + if (typeof data3 !== 'boolean') { + validate37.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema22.properties.isPublic.type, + parentSchema: schema22.properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid1 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate37.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema22.properties.viewer.items.required, + parentSchema: schema22.properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate37.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema22.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema22.properties.viewer.items.properties + .url.type, + parentSchema: + schema22.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema22.properties.viewer.items.type, + parentSchema: schema22.properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + if (!valid1) { + break; + } + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema22.properties.viewer.type, + parentSchema: schema22.properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs15 = errors; + if (errors === _errs15) { + if (Array.isArray(data7)) { + var valid3 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs17 = errors; + if (errors === _errs17) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate37.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema22.properties.owner.items.required, + parentSchema: schema22.properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate37.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema22.properties.owner.items.properties + .url, + data: data9, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema22.properties.owner.items.properties + .url.type, + parentSchema: + schema22.properties.owner.items.properties + .url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema22.properties.owner.items.type, + parentSchema: schema22.properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid3 = _errs17 === errors; + if (!valid3) { + break; + } + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema22.properties.owner.type, + parentSchema: schema22.properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } else { + validate37.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema22.type, + parentSchema: schema22, + data, + }, + ]; + return false; + } + } + validate37.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableCloudDeviceUpdate = validate38; +const schema23 = { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'InstantiableCloudDeviceUpdate', + 'x-location': '#/components/schemas/device_cloud_instantiable_update', + 'x-schema-type': 'all', +}; +function validate38( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate38.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema23.allOf[0].required, + parentSchema: schema23.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate38.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.allOf[0].properties.name.type, + parentSchema: schema23.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate38.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.allOf[0].properties.description.type, + parentSchema: schema23.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate38.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.allOf[0].properties.type.type, + parentSchema: schema23.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate38.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema23.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema23.allOf[0].properties.type.enum, + parentSchema: schema23.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate38.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema23.allOf[0].properties.isPublic.type, + parentSchema: schema23.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate38.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema23.allOf[0].properties.viewer.items.required, + parentSchema: schema23.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate38.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema23.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema23.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema23.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema23.allOf[0].properties.viewer.items.type, + parentSchema: schema23.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema23.allOf[0].properties.viewer.type, + parentSchema: schema23.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate38.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema23.allOf[0].properties.owner.items.required, + parentSchema: + schema23.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate38.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema23.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema23.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema23.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema23.allOf[0].properties.owner.items.type, + parentSchema: schema23.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema23.allOf[0].properties.owner.type, + parentSchema: schema23.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate38.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema23.allOf[0].type, + parentSchema: schema23.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('cloud instantiable' !== data10) { + validate38.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema23.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate38.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema23.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.allOf[1].properties.instantiateUrl.type, + parentSchema: schema23.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate38.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema23.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema23.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema23.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate38.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema23.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema23.allOf[1].properties.services.items.properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate38.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema23.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema23.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate38.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema23.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema23.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema23.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema23.allOf[1].properties.services.items.type, + parentSchema: schema23.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema23.allOf[1].properties.services.type, + parentSchema: schema23.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate38.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema23.allOf[1].type, + parentSchema: schema23.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate38.errors = vErrors; + return errors === 0; +} +exports.validateConcreteDeviceUpdate = validate39; +const schema24 = { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'ConcreteDeviceUpdate', + 'x-location': '#/components/schemas/device_concrete_update', + 'x-schema-type': 'all', +}; +function validate39( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate39.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema24.allOf[0].required, + parentSchema: schema24.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate39.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema24.allOf[0].properties.name.type, + parentSchema: schema24.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate39.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema24.allOf[0].properties.description.type, + parentSchema: schema24.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate39.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema24.allOf[0].properties.type.type, + parentSchema: schema24.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate39.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema24.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema24.allOf[0].properties.type.enum, + parentSchema: schema24.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate39.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema24.allOf[0].properties.isPublic.type, + parentSchema: schema24.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate39.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema24.allOf[0].properties.viewer.items.required, + parentSchema: schema24.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate39.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema24.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate39.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema24.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema24.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema24.allOf[0].properties.viewer.items.type, + parentSchema: schema24.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema24.allOf[0].properties.viewer.type, + parentSchema: schema24.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate39.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema24.allOf[0].properties.owner.items.required, + parentSchema: + schema24.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate39.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema24.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate39.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema24.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema24.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema24.allOf[0].properties.owner.items.type, + parentSchema: schema24.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema24.allOf[0].properties.owner.type, + parentSchema: schema24.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate39.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema24.allOf[0].type, + parentSchema: schema24.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('device' !== data10) { + validate39.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema24.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.experiment !== undefined) { + let data11 = data.experiment; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate39.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema24.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema24.allOf[1].properties.experiment.type, + parentSchema: schema24.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate39.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema24.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate39.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema24.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema24.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate39.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema24.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema24.allOf[1].properties.services.items.properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate39.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema24.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema24.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate39.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema24.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema24.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema24.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema24.allOf[1].properties.services.items.type, + parentSchema: schema24.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema24.allOf[1].properties.services.type, + parentSchema: schema24.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate39.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema24.allOf[1].type, + parentSchema: schema24.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate39.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableBrowserDeviceUpdate = validate40; +const schema25 = { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'InstantiableBrowserDeviceUpdate', + 'x-location': '#/components/schemas/device_edge_instantiable_update', + 'x-schema-type': 'all', +}; +function validate40( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate40.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema25.allOf[0].required, + parentSchema: schema25.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate40.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.allOf[0].properties.name.type, + parentSchema: schema25.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate40.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.allOf[0].properties.description.type, + parentSchema: schema25.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate40.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.allOf[0].properties.type.type, + parentSchema: schema25.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate40.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema25.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema25.allOf[0].properties.type.enum, + parentSchema: schema25.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate40.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema25.allOf[0].properties.isPublic.type, + parentSchema: schema25.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate40.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema25.allOf[0].properties.viewer.items.required, + parentSchema: schema25.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate40.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema25.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate40.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema25.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema25.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema25.allOf[0].properties.viewer.items.type, + parentSchema: schema25.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema25.allOf[0].properties.viewer.type, + parentSchema: schema25.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate40.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema25.allOf[0].properties.owner.items.required, + parentSchema: + schema25.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate40.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema25.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate40.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema25.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema25.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema25.allOf[0].properties.owner.items.type, + parentSchema: schema25.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema25.allOf[0].properties.owner.type, + parentSchema: schema25.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate40.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema25.allOf[0].type, + parentSchema: schema25.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('edge instantiable' !== data10) { + validate40.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema25.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.codeUrl !== undefined) { + let data11 = data.codeUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate40.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema25.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.allOf[1].properties.codeUrl.type, + parentSchema: schema25.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate40.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema25.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate40.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema25.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema25.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate40.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema25.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema25.allOf[1].properties.services.items.properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate40.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema25.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema25.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate40.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema25.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema25.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema25.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema25.allOf[1].properties.services.items.type, + parentSchema: schema25.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema25.allOf[1].properties.services.type, + parentSchema: schema25.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate40.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema25.allOf[1].type, + parentSchema: schema25.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate40.errors = vErrors; + return errors === 0; +} +exports.validateDeviceGroupUpdate = validate41; +const schema26 = { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'DeviceGroupUpdate', + 'x-location': '#/components/schemas/device_group_update', + 'x-schema-type': 'all', +}; +function validate41( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate41.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema26.allOf[0].required, + parentSchema: schema26.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate41.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.allOf[0].properties.name.type, + parentSchema: schema26.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate41.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.allOf[0].properties.description.type, + parentSchema: schema26.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate41.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.allOf[0].properties.type.type, + parentSchema: schema26.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate41.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema26.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema26.allOf[0].properties.type.enum, + parentSchema: schema26.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate41.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema26.allOf[0].properties.isPublic.type, + parentSchema: schema26.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate41.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema26.allOf[0].properties.viewer.items.required, + parentSchema: schema26.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate41.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema26.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema26.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema26.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.allOf[0].properties.viewer.items.type, + parentSchema: schema26.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema26.allOf[0].properties.viewer.type, + parentSchema: schema26.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate41.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema26.allOf[0].properties.owner.items.required, + parentSchema: + schema26.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate41.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema26.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema26.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema26.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.allOf[0].properties.owner.items.type, + parentSchema: schema26.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema26.allOf[0].properties.owner.type, + parentSchema: schema26.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate41.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.allOf[0].type, + parentSchema: schema26.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('group' !== data10) { + validate41.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema26.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.devices !== undefined) { + let data11 = data.devices; + const _errs25 = errors; + if (errors === _errs25) { + if (Array.isArray(data11)) { + var valid7 = true; + const len2 = data11.length; + for (let i2 = 0; i2 < len2; i2++) { + let data12 = data11[i2]; + const _errs27 = errors; + if (errors === _errs27) { + if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { + let missing3; + if (data12.url === undefined && (missing3 = 'url')) { + validate41.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema26.allOf[1].properties.devices.items.required, + parentSchema: schema26.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } else { + if (data12.url !== undefined) { + let data13 = data12.url; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data13 === 'string') { + if (!formats0(data13)) { + validate41.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema26.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema26.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema26.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.allOf[1].properties.devices.items.type, + parentSchema: schema26.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } + } + var valid7 = _errs27 === errors; + if (!valid7) { + break; + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema26.allOf[1].properties.devices.type, + parentSchema: schema26.allOf[1].properties.devices, + data: data11, + }, + ]; + return false; + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + } + } else { + validate41.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.allOf[1].type, + parentSchema: schema26.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate41.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUpdate = validate42; +const schema27 = { + title: 'Device Update', + anyOf: [ + { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + }, + ], + }, + ], + 'x-standalone': true, + 'x-name': 'DeviceUpdate', + 'x-location': '#/components/schemas/device_update', + 'x-schema-type': 'all', +}; +function validate42( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema27.anyOf[0].allOf[0].required, + parentSchema: schema27.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema27.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema27.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema27.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema27.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema27.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema27.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema27.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema27.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema27.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema27.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema27.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema27.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema27.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema27.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema27.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema27.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema27.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema27.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.anyOf[0].allOf[0].type, + parentSchema: schema27.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema27.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema27.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema27.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema27.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema27.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema27.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema27.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema27.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema27.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema27.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema27.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.anyOf[0].allOf[1].type, + parentSchema: schema27.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.type === undefined && (missing3 = 'type')) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema27.anyOf[1].allOf[0].required, + parentSchema: schema27.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema27.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema27.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema27.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema27.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema27.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema27.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema27.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema27.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema27.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema27.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema27.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[1].allOf[0].properties.viewer.items.type, + parentSchema: + schema27.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema27.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema27.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema27.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema27.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema27.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema27.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.anyOf[1].allOf[0].type, + parentSchema: schema27.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema27.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema27.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema27.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[1].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema27.anyOf[1].allOf[1].properties.services.items + .properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema27.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema27.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema27.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema27.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema27.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema27.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema27.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.anyOf[1].allOf[1].type, + parentSchema: schema27.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if (data.type === undefined && (missing6 = 'type')) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema27.anyOf[2].allOf[0].required, + parentSchema: schema27.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema27.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema27.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema27.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema27.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema27.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema27.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema27.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema27.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema27.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema27.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[2].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema27.anyOf[2].allOf[0].properties.viewer + .items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema27.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema27.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema27.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema27.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema27.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema27.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema27.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.anyOf[2].allOf[0].type, + parentSchema: schema27.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema27.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema27.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema27.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema27.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema27.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema27.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema27.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema27.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema27.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema27.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema27.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.anyOf[2].allOf[1].type, + parentSchema: schema27.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.type === undefined && (missing9 = 'type')) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema27.anyOf[3].allOf[0].required, + parentSchema: schema27.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema27.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema27.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema27.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema27.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema27.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema27.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema27.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema27.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema27.anyOf[3].allOf[0].properties.viewer.items + .required, + parentSchema: + schema27.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema27.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema27.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema27.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema27.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema27.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema27.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema27.anyOf[3].allOf[0].properties.owner.items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[3].allOf[0].properties.owner.type, + parentSchema: schema27.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.anyOf[3].allOf[0].type, + parentSchema: schema27.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err101 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema27.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing12; + if (data63.url === undefined && (missing12 = 'url')) { + const err102 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: + "must have required property '" + missing12 + "'", + schema: + schema27.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema27.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err103 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + } else { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema27.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } + } + } + } + } else { + const err105 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.anyOf[3].allOf[1].properties.devices.items.type, + parentSchema: + schema27.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema27.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } else { + const err107 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.anyOf[3].allOf[1].type, + parentSchema: schema27.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err108 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema27.anyOf, + parentSchema: schema27, + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + validate42.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate42.errors = vErrors; + return errors === 0; +} +exports.validateAvailabilityRule = validate43; +const schema28 = { + title: 'Availability Rule', + type: 'object', + allOf: [ + { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + { + type: 'object', + properties: { + available: { type: 'boolean' }, + repeat: { + description: + 'If specified the time slot is repeated in a fixed offset specified by the frequency', + type: 'object', + properties: { + frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, + until: { + description: 'Up to this date-time the time slot will be repeated.', + type: 'string', + format: 'date-time', + }, + count: { + description: 'How often the time slot will be repeated', + type: 'integer', + }, + }, + required: ['frequency'], + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'AvailabilityRule', + 'x-location': '#/components/schemas/availability_rule', + 'x-schema-type': 'all', +}; +function validate43( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (!(data && typeof data == 'object' && !Array.isArray(data))) { + validate43.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema28.type, + parentSchema: schema28, + data, + }, + ]; + return false; + } + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.start !== undefined) { + let data0 = data.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data0 === 'string') { + if (!formats22.validate(data0)) { + validate43.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/allOf/0/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema28.allOf[0].properties.start, + data: data0, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/allOf/0/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema28.allOf[0].properties.start.type, + parentSchema: schema28.allOf[0].properties.start, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.end !== undefined) { + let data1 = data.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate43.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/allOf/0/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema28.allOf[0].properties.end, + data: data1, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/allOf/0/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema28.allOf[0].properties.end.type, + parentSchema: schema28.allOf[0].properties.end, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate43.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema28.allOf[0].type, + parentSchema: schema28.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (valid0) { + const _errs7 = errors; + if (errors === _errs7) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.available !== undefined) { + let data2 = data.available; + const _errs9 = errors; + if (typeof data2 !== 'boolean') { + validate43.errors = [ + { + instancePath: instancePath + '/available', + schemaPath: '#/allOf/1/properties/available/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema28.allOf[1].properties.available.type, + parentSchema: schema28.allOf[1].properties.available, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.repeat !== undefined) { + let data3 = data.repeat; + const _errs11 = errors; + if (errors === _errs11) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing0; + if (data3.frequency === undefined && (missing0 = 'frequency')) { + validate43.errors = [ + { + instancePath: instancePath + '/repeat', + schemaPath: '#/allOf/1/properties/repeat/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema28.allOf[1].properties.repeat.required, + parentSchema: schema28.allOf[1].properties.repeat, + data: data3, + }, + ]; + return false; + } else { + if (data3.frequency !== undefined) { + let data4 = data3.frequency; + const _errs13 = errors; + if (typeof data4 !== 'string') { + validate43.errors = [ + { + instancePath: instancePath + '/repeat/frequency', + schemaPath: + '#/allOf/1/properties/repeat/properties/frequency/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema28.allOf[1].properties.repeat.properties.frequency.type, + parentSchema: + schema28.allOf[1].properties.repeat.properties.frequency, + data: data4, + }, + ]; + return false; + } + if ( + !(data4 === 'HOURLY' || data4 === 'DAILY' || data4 === 'WEEKLY') + ) { + validate43.errors = [ + { + instancePath: instancePath + '/repeat/frequency', + schemaPath: + '#/allOf/1/properties/repeat/properties/frequency/enum', + keyword: 'enum', + params: { + allowedValues: + schema28.allOf[1].properties.repeat.properties.frequency + .enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema28.allOf[1].properties.repeat.properties.frequency.enum, + parentSchema: + schema28.allOf[1].properties.repeat.properties.frequency, + data: data4, + }, + ]; + return false; + } + var valid3 = _errs13 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.until !== undefined) { + let data5 = data3.until; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data5 === 'string') { + if (!formats22.validate(data5)) { + validate43.errors = [ + { + instancePath: instancePath + '/repeat/until', + schemaPath: + '#/allOf/1/properties/repeat/properties/until/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema28.allOf[1].properties.repeat.properties.until, + data: data5, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/repeat/until', + schemaPath: + '#/allOf/1/properties/repeat/properties/until/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema28.allOf[1].properties.repeat.properties.until + .type, + parentSchema: + schema28.allOf[1].properties.repeat.properties.until, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs15 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.count !== undefined) { + let data6 = data3.count; + const _errs17 = errors; + if ( + !( + typeof data6 == 'number' && + !(data6 % 1) && + !isNaN(data6) && + isFinite(data6) + ) + ) { + validate43.errors = [ + { + instancePath: instancePath + '/repeat/count', + schemaPath: + '#/allOf/1/properties/repeat/properties/count/type', + keyword: 'type', + params: { type: 'integer' }, + message: 'must be integer', + schema: + schema28.allOf[1].properties.repeat.properties.count.type, + parentSchema: + schema28.allOf[1].properties.repeat.properties.count, + data: data6, + }, + ]; + return false; + } + var valid3 = _errs17 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/repeat', + schemaPath: '#/allOf/1/properties/repeat/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema28.allOf[1].properties.repeat.type, + parentSchema: schema28.allOf[1].properties.repeat, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs11 === errors; + } else { + var valid2 = true; + } + } + } else { + validate43.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema28.allOf[1].type, + parentSchema: schema28.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs7 === errors; + } + validate43.errors = vErrors; + return errors === 0; +} +exports.validateMessage = validate44; +const schema29 = { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'Message', + 'x-location': '#/components/schemas/message', + 'x-schema-type': 'all', +}; +function validate44( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate44.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema29.required, + parentSchema: schema29, + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate44.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema29.properties.messageType.type, + parentSchema: schema29.properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate44.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema29.type, + parentSchema: schema29, + data, + }, + ]; + return false; + } + } + validate44.errors = vErrors; + return errors === 0; +} +exports.validateCommandMessage = validate45; +const schema30 = { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CommandMessage', + 'x-location': '#/components/schemas/command_message', + 'x-schema-type': 'all', +}; +function validate45( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate45.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema30.allOf[0].required, + parentSchema: schema30.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate45.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema30.allOf[0].properties.messageType.type, + parentSchema: schema30.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate45.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema30.allOf[0].type, + parentSchema: schema30.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate45.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema30.allOf[1].required, + parentSchema: schema30.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('command' !== data1) { + validate45.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema30.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate45.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema30.allOf[1].properties.command.type, + parentSchema: schema30.allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate45.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema30.allOf[1].type, + parentSchema: schema30.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate45.errors = vErrors; + return errors === 0; +} +exports.validateServiceConfig = validate46; +const schema31 = { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + 'x-standalone': true, + 'x-name': 'ServiceConfig', + 'x-location': '#/components/schemas/service_config', + 'x-schema-type': 'all', +}; +function validate46( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.serviceType === undefined && (missing0 = 'serviceType')) || + (data.serviceId === undefined && (missing0 = 'serviceId')) || + (data.remoteServiceId === undefined && (missing0 = 'remoteServiceId')) + ) { + validate46.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema31.required, + parentSchema: schema31, + data, + }, + ]; + return false; + } else { + if (data.serviceType !== undefined) { + let data0 = data.serviceType; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate46.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema31.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } else { + validate46.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.properties.serviceType.type, + parentSchema: schema31.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceId !== undefined) { + let data1 = data.serviceId; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate46.errors = [ + { + instancePath: instancePath + '/serviceId', + schemaPath: '#/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.properties.serviceId.type, + parentSchema: schema31.properties.serviceId, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.remoteServiceId !== undefined) { + let data2 = data.remoteServiceId; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate46.errors = [ + { + instancePath: instancePath + '/remoteServiceId', + schemaPath: '#/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.properties.remoteServiceId.type, + parentSchema: schema31.properties.remoteServiceId, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate46.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema31.type, + parentSchema: schema31, + data, + }, + ]; + return false; + } + } + validate46.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionMessage = validate47; +const schema32 = { + title: 'Create Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'createPeerconnection' }, + connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, + connectionUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + type: 'object', + required: ['serviceType', 'serviceId', 'remoteServiceId'], + title: 'Service Config', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + additionalProperties: true, + }, + }, + tiebreaker: { type: 'boolean' }, + config: { type: 'object', additionalProperties: true }, + }, + required: ['command', 'connectionType', 'connectionUrl', 'services', 'tiebreaker'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CreatePeerconnectionMessage', + 'x-location': '#/components/schemas/create_peerconnection_message', + 'x-schema-type': 'all', +}; +function validate47( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate47.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema32.allOf[0].allOf[0].required, + parentSchema: schema32.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate47.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema32.allOf[0].allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate47.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema32.allOf[0].allOf[0].type, + parentSchema: schema32.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate47.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema32.allOf[0].allOf[1].required, + parentSchema: schema32.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs8 = errors; + if ('command' !== data1) { + validate47.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema32.allOf[0].allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs8 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate47.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.allOf[0].allOf[1].properties.command.type, + parentSchema: schema32.allOf[0].allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate47.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema32.allOf[0].allOf[1].type, + parentSchema: schema32.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionType === undefined && (missing2 = 'connectionType')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || + (data.services === undefined && (missing2 = 'services')) || + (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) + ) { + validate47.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema32.allOf[1].required, + parentSchema: schema32.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs13 = errors; + if ('createPeerconnection' !== data3) { + validate47.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'createPeerconnection' }, + message: 'must be equal to constant', + schema: 'createPeerconnection', + parentSchema: schema32.allOf[1].properties.command, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionType !== undefined) { + let data4 = data.connectionType; + const _errs14 = errors; + if (typeof data4 !== 'string') { + validate47.errors = [ + { + instancePath: instancePath + '/connectionType', + schemaPath: '#/allOf/1/properties/connectionType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.allOf[1].properties.connectionType.type, + parentSchema: schema32.allOf[1].properties.connectionType, + data: data4, + }, + ]; + return false; + } + if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { + validate47.errors = [ + { + instancePath: instancePath + '/connectionType', + schemaPath: '#/allOf/1/properties/connectionType/enum', + keyword: 'enum', + params: { + allowedValues: schema32.allOf[1].properties.connectionType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema32.allOf[1].properties.connectionType.enum, + parentSchema: schema32.allOf[1].properties.connectionType, + data: data4, + }, + ]; + return false; + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionUrl !== undefined) { + let data5 = data.connectionUrl; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate47.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema32.allOf[1].properties.connectionUrl, + data: data5, + }, + ]; + return false; + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.allOf[1].properties.connectionUrl.type, + parentSchema: schema32.allOf[1].properties.connectionUrl, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.services !== undefined) { + let data6 = data.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data6)) { + var valid5 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing3; + if ( + (data7.serviceType === undefined && + (missing3 = 'serviceType')) || + (data7.serviceId === undefined && + (missing3 = 'serviceId')) || + (data7.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate47.errors = [ + { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/allOf/1/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: + "must have required property '" + missing3 + "'", + schema: + schema32.allOf[1].properties.services.items.required, + parentSchema: + schema32.allOf[1].properties.services.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.serviceType !== undefined) { + let data8 = data7.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate47.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema32.allOf[1].properties.services.items + .properties.serviceType, + data: data8, + }, + ]; + return false; + } + } else { + validate47.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema32.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema32.allOf[1].properties.services.items + .properties.serviceType, + data: data8, + }, + ]; + return false; + } + } + } + var valid6 = _errs23 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data7.serviceId !== undefined) { + let data9 = data7.serviceId; + const _errs25 = errors; + if (typeof data9 !== 'string') { + validate47.errors = [ + { + instancePath: + instancePath + '/services/' + i0 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema32.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema32.allOf[1].properties.services.items + .properties.serviceId, + data: data9, + }, + ]; + return false; + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data7.remoteServiceId !== undefined) { + let data10 = data7.remoteServiceId; + const _errs27 = errors; + if (typeof data10 !== 'string') { + validate47.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema32.allOf[1].properties.services.items + .properties.remoteServiceId.type, + parentSchema: + schema32.allOf[1].properties.services.items + .properties.remoteServiceId, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/services/' + i0, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema32.allOf[1].properties.services.items.type, + parentSchema: schema32.allOf[1].properties.services.items, + data: data7, + }, + ]; + return false; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema32.allOf[1].properties.services.type, + parentSchema: schema32.allOf[1].properties.services, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.tiebreaker !== undefined) { + let data11 = data.tiebreaker; + const _errs29 = errors; + if (typeof data11 !== 'boolean') { + validate47.errors = [ + { + instancePath: instancePath + '/tiebreaker', + schemaPath: '#/allOf/1/properties/tiebreaker/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema32.allOf[1].properties.tiebreaker.type, + parentSchema: schema32.allOf[1].properties.tiebreaker, + data: data11, + }, + ]; + return false; + } + var valid4 = _errs29 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.config !== undefined) { + let data12 = data.config; + const _errs31 = errors; + if (errors === _errs31) { + if ( + data12 && + typeof data12 == 'object' && + !Array.isArray(data12) + ) { + } else { + validate47.errors = [ + { + instancePath: instancePath + '/config', + schemaPath: '#/allOf/1/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema32.allOf[1].properties.config.type, + parentSchema: schema32.allOf[1].properties.config, + data: data12, + }, + ]; + return false; + } + } + var valid4 = _errs31 === errors; + } else { + var valid4 = true; + } + } + } + } + } + } + } + } else { + validate47.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema32.allOf[1].type, + parentSchema: schema32.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate47.errors = vErrors; + return errors === 0; +} +exports.validateClosePeerconnectionMessage = validate48; +const schema33 = { + title: 'Close Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'closePeerconnection' }, + connectionUrl: { type: 'string', format: 'uri' }, + }, + required: ['command', 'connectionUrl'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ClosePeerconnectionMessage', + 'x-location': '#/components/schemas/close_peerconnection_message', + 'x-schema-type': 'all', +}; +function validate48( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate48.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema33.allOf[0].allOf[0].required, + parentSchema: schema33.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate48.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema33.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema33.allOf[0].allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate48.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema33.allOf[0].allOf[0].type, + parentSchema: schema33.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate48.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema33.allOf[0].allOf[1].required, + parentSchema: schema33.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs8 = errors; + if ('command' !== data1) { + validate48.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema33.allOf[0].allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs8 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate48.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema33.allOf[0].allOf[1].properties.command.type, + parentSchema: schema33.allOf[0].allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate48.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema33.allOf[0].allOf[1].type, + parentSchema: schema33.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) + ) { + validate48.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema33.allOf[1].required, + parentSchema: schema33.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs13 = errors; + if ('closePeerconnection' !== data3) { + validate48.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'closePeerconnection' }, + message: 'must be equal to constant', + schema: 'closePeerconnection', + parentSchema: schema33.allOf[1].properties.command, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionUrl !== undefined) { + let data4 = data.connectionUrl; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate48.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema33.allOf[1].properties.connectionUrl, + data: data4, + }, + ]; + return false; + } + } else { + validate48.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema33.allOf[1].properties.connectionUrl.type, + parentSchema: schema33.allOf[1].properties.connectionUrl, + data: data4, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate48.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema33.allOf[1].type, + parentSchema: schema33.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate48.errors = vErrors; + return errors === 0; +} +exports.validateSignalingMessage = validate49; +const schema34 = { + title: 'Signaling Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'signaling' }, + signalingType: { type: 'string' }, + connectionUrl: { type: 'string', format: 'uri' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'signalingType', 'connectionUrl', 'content'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'SignalingMessage', + 'x-location': '#/components/schemas/signaling_message', + 'x-schema-type': 'all', +}; +function validate49( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate49.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema34.allOf[0].required, + parentSchema: schema34.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate49.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema34.allOf[0].properties.messageType.type, + parentSchema: schema34.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate49.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema34.allOf[0].type, + parentSchema: schema34.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.signalingType === undefined && (missing1 = 'signalingType')) || + (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || + (data.content === undefined && (missing1 = 'content')) + ) { + validate49.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema34.allOf[1].required, + parentSchema: schema34.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('signaling' !== data1) { + validate49.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'signaling' }, + message: 'must be equal to constant', + schema: 'signaling', + parentSchema: schema34.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.signalingType !== undefined) { + let data2 = data.signalingType; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate49.errors = [ + { + instancePath: instancePath + '/signalingType', + schemaPath: '#/allOf/1/properties/signalingType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema34.allOf[1].properties.signalingType.type, + parentSchema: schema34.allOf[1].properties.signalingType, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.connectionUrl !== undefined) { + let data3 = data.connectionUrl; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate49.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema34.allOf[1].properties.connectionUrl, + data: data3, + }, + ]; + return false; + } + } else { + validate49.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema34.allOf[1].properties.connectionUrl.type, + parentSchema: schema34.allOf[1].properties.connectionUrl, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.content !== undefined) { + let data4 = data.content; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + } else { + validate49.errors = [ + { + instancePath: instancePath + '/content', + schemaPath: '#/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema34.allOf[1].properties.content.type, + parentSchema: schema34.allOf[1].properties.content, + data: data4, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } else { + validate49.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema34.allOf[1].type, + parentSchema: schema34.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate49.errors = vErrors; + return errors === 0; +} +exports.validateConfigurationMessage = validate50; +const schema35 = { + title: 'Configuration Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'configuration' }, + configuration: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'configuration'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConfigurationMessage', + 'x-location': '#/components/schemas/configuration_message', + 'x-schema-type': 'all', +}; +function validate50( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate50.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema35.allOf[0].required, + parentSchema: schema35.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate50.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema35.allOf[0].properties.messageType.type, + parentSchema: schema35.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate50.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema35.allOf[0].type, + parentSchema: schema35.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.configuration === undefined && (missing1 = 'configuration')) + ) { + validate50.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema35.allOf[1].required, + parentSchema: schema35.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('configuration' !== data1) { + validate50.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'configuration' }, + message: 'must be equal to constant', + schema: 'configuration', + parentSchema: schema35.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.configuration !== undefined) { + let data2 = data.configuration; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + } else { + validate50.errors = [ + { + instancePath: instancePath + '/configuration', + schemaPath: '#/allOf/1/properties/configuration/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema35.allOf[1].properties.configuration.type, + parentSchema: schema35.allOf[1].properties.configuration, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate50.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema35.allOf[1].type, + parentSchema: schema35.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate50.errors = vErrors; + return errors === 0; +} +exports.validateExperimentStatusChangedMessage = validate51; +const schema36 = { + title: 'Experiment Status Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'experiment-status-changed' }, + status: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['messageType', 'status'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ExperimentStatusChangedMessage', + 'x-location': '#/components/schemas/experiment_status_changed_message', + 'x-schema-type': 'all', +}; +function validate51( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate51.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema36.allOf[0].required, + parentSchema: schema36.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate51.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema36.allOf[0].properties.messageType.type, + parentSchema: schema36.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate51.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema36.allOf[0].type, + parentSchema: schema36.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.status === undefined && (missing1 = 'status')) + ) { + validate51.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema36.allOf[1].required, + parentSchema: schema36.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('experiment-status-changed' !== data1) { + validate51.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'experiment-status-changed' }, + message: 'must be equal to constant', + schema: 'experiment-status-changed', + parentSchema: schema36.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate51.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema36.allOf[1].properties.status.type, + parentSchema: schema36.allOf[1].properties.status, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.message !== undefined) { + let data3 = data.message; + const _errs10 = errors; + if (typeof data3 !== 'string') { + validate51.errors = [ + { + instancePath: instancePath + '/message', + schemaPath: '#/allOf/1/properties/message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema36.allOf[1].properties.message.type, + parentSchema: schema36.allOf[1].properties.message, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate51.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema36.allOf[1].type, + parentSchema: schema36.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate51.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStatus = validate52; +const schema37 = { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + 'x-standalone': true, + 'x-name': 'ConnectionStatus', + 'x-location': '#/components/schemas/peerconnection_status', + 'x-schema-type': 'all', +}; +function validate52( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate52.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema37.type, + parentSchema: schema37, + data, + }, + ]; + return false; + } + if ( + !( + data === 'new' || + data === 'connecting' || + data === 'connected' || + data === 'disconnected' || + data === 'failed' || + data === 'closed' + ) + ) { + validate52.errors = [ + { + instancePath, + schemaPath: '#/enum', + keyword: 'enum', + params: { allowedValues: schema37.enum }, + message: 'must be equal to one of the allowed values', + schema: schema37.enum, + parentSchema: schema37, + data, + }, + ]; + return false; + } + validate52.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionCommon = validate53; +const schema38 = { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + 'x-standalone': true, + 'x-name': 'PeerconnectionCommon', + 'x-location': '#/components/schemas/peerconnection_common', + 'x-schema-type': 'all', +}; +function validate53( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate53.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema38.required, + parentSchema: schema38, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate53.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema38.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate53.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema38.properties.url.type, + parentSchema: schema38.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate53.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema38.properties.type.type, + parentSchema: schema38.properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate53.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema38.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema38.properties.type.enum, + parentSchema: schema38.properties.type, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate53.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema38.properties.status.type, + parentSchema: schema38.properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate53.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema38.properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema38.properties.status.enum, + parentSchema: schema38.properties.status, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate53.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema38.type, + parentSchema: schema38, + data, + }, + ]; + return false; + } + } + validate53.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionOverview = validate54; +const schema39 = { + title: 'Peerconnection Overview', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-standalone': true, + 'x-name': 'PeerconnectionOverview', + 'x-location': '#/components/schemas/peerconnection_overview', + 'x-schema-type': 'all', +}; +function validate54( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate54.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema39.allOf[0].required, + parentSchema: schema39.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate54.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema39.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate54.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema39.allOf[0].properties.url.type, + parentSchema: schema39.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate54.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema39.allOf[0].properties.type.type, + parentSchema: schema39.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate54.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema39.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema39.allOf[0].properties.type.enum, + parentSchema: schema39.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate54.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema39.allOf[0].properties.status.type, + parentSchema: schema39.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate54.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema39.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema39.allOf[0].properties.status.enum, + parentSchema: schema39.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate54.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema39.allOf[0].type, + parentSchema: schema39.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate54.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema39.allOf[1].required, + parentSchema: schema39.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate54.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema39.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate54.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema39.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate54.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema39.allOf[1].properties.devices.items.required, + parentSchema: schema39.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate54.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema39.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate54.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema39.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema39.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + } + } + } else { + validate54.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema39.allOf[1].properties.devices.items.type, + parentSchema: schema39.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate54.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema39.allOf[1].properties.devices.type, + parentSchema: schema39.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate54.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema39.allOf[1].type, + parentSchema: schema39.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate54.errors = vErrors; + return errors === 0; +} +exports.validateConfiguredDeviceReference = validate55; +const schema40 = { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'ConfiguredDeviceReference', + 'x-location': '#/components/schemas/configured_device_reference', + 'x-schema-type': 'all', +}; +function validate55( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate55.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema40.required, + parentSchema: schema40, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate55.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema40.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate55.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema40.properties.url.type, + parentSchema: schema40.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.config !== undefined) { + let data1 = data.config; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + if (data1.services !== undefined) { + let data2 = data1.services; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len0 = data2.length; + for (let i0 = 0; i0 < len0; i0++) { + let data3 = data2[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.serviceType === undefined && + (missing1 = 'serviceType')) || + (data3.serviceId === undefined && + (missing1 = 'serviceId')) || + (data3.remoteServiceId === undefined && + (missing1 = 'remoteServiceId')) + ) { + validate55.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema40.properties.config.properties.services.items + .required, + parentSchema: + schema40.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.serviceType !== undefined) { + let data4 = data3.serviceType; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate55.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema40.properties.config.properties + .services.items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } else { + validate55.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema40.properties.config.properties.services + .items.properties.serviceType.type, + parentSchema: + schema40.properties.config.properties.services + .items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs10 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.serviceId !== undefined) { + let data5 = data3.serviceId; + const _errs12 = errors; + if (typeof data5 !== 'string') { + validate55.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceId', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema40.properties.config.properties.services + .items.properties.serviceId.type, + parentSchema: + schema40.properties.config.properties.services + .items.properties.serviceId, + data: data5, + }, + ]; + return false; + } + var valid3 = _errs12 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.remoteServiceId !== undefined) { + let data6 = data3.remoteServiceId; + const _errs14 = errors; + if (typeof data6 !== 'string') { + validate55.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema40.properties.config.properties.services + .items.properties.remoteServiceId.type, + parentSchema: + schema40.properties.config.properties.services + .items.properties.remoteServiceId, + data: data6, + }, + ]; + return false; + } + var valid3 = _errs14 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + validate55.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema40.properties.config.properties.services.items + .type, + parentSchema: + schema40.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate55.errors = [ + { + instancePath: instancePath + '/config/services', + schemaPath: '#/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema40.properties.config.properties.services.type, + parentSchema: schema40.properties.config.properties.services, + data: data2, + }, + ]; + return false; + } + } + } + } else { + validate55.errors = [ + { + instancePath: instancePath + '/config', + schemaPath: '#/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema40.properties.config.type, + parentSchema: schema40.properties.config, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate55.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema40.type, + parentSchema: schema40, + data, + }, + ]; + return false; + } + } + validate55.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnection = validate56; +const schema41 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'Peerconnection', + 'x-location': '#/components/schemas/peerconnection', + 'x-schema-type': 'all', +}; +function validate56( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate56.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema41.allOf[0].required, + parentSchema: schema41.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate56.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema41.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema41.allOf[0].properties.url.type, + parentSchema: schema41.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate56.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema41.allOf[0].properties.type.type, + parentSchema: schema41.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate56.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema41.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema41.allOf[0].properties.type.enum, + parentSchema: schema41.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate56.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema41.allOf[0].properties.status.type, + parentSchema: schema41.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate56.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema41.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema41.allOf[0].properties.status.enum, + parentSchema: schema41.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate56.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema41.allOf[0].type, + parentSchema: schema41.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate56.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema41.allOf[1].required, + parentSchema: schema41.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate56.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema41.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate56.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema41.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate56.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema41.allOf[1].properties.devices.items.required, + parentSchema: schema41.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate56.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema41.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate56.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema41.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema41.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema41.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema41.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema41.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema41.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema41.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema41.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId.type, + parentSchema: + schema41.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema41.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema41.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema41.allOf[1].properties.devices + .items.properties.config + .properties.services.items.type, + parentSchema: + schema41.allOf[1].properties.devices + .items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema41.allOf[1].properties.devices.items + .properties.config.properties.services + .type, + parentSchema: + schema41.allOf[1].properties.devices.items + .properties.config.properties.services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate56.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema41.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema41.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema41.allOf[1].properties.devices.items.type, + parentSchema: schema41.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema41.allOf[1].properties.devices.type, + parentSchema: schema41.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate56.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema41.allOf[1].type, + parentSchema: schema41.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate56.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionClosedEventCallback = validate57; +const schema42 = { + title: 'Peerconnection Closed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-closed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: [ + 'new', + 'connecting', + 'connected', + 'disconnected', + 'failed', + 'closed', + ], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionClosedEventCallback', + 'x-location': '#/components/schemas/peerconnection_closed', + 'x-schema-type': 'all', +}; +function validate57( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema42.allOf[0].allOf[0].required, + parentSchema: schema42.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema42.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema42.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.allOf[0].allOf[0].type, + parentSchema: schema42.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema42.allOf[0].allOf[1].required, + parentSchema: schema42.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema42.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema42.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate57.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema42.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema42.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema42.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema42.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema42.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.allOf[0].allOf[1].type, + parentSchema: schema42.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema42.allOf[1].required, + parentSchema: schema42.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema42.allOf[1].properties.eventType.type, + parentSchema: schema42.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-closed')) { + validate57.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema42.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema42.allOf[1].properties.eventType.enum, + parentSchema: schema42.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.url === undefined && (missing3 = 'url')) || + (data4.type === undefined && (missing3 = 'type')) || + (data4.status === undefined && (missing3 = 'status')) + ) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema42.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.url.type, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid6 = _errs18 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.type !== undefined) { + let data6 = data4.type; + const _errs20 = errors; + if (typeof data6 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'local' || data6 === 'webrtc')) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + var valid6 = _errs20 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.status !== undefined) { + let data7 = data4.status; + const _errs22 = errors; + if (typeof data7 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.status.type, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'new' || + data7 === 'connecting' || + data7 === 'connected' || + data7 === 'disconnected' || + data7 === 'failed' || + data7 === 'closed' + ) + ) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + var valid6 = _errs22 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema42.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs24 = errors; + if (errors === _errs24) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema42.allOf[1].properties.peerconnection.allOf[1].required, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data8 = data4.devices; + const _errs26 = errors; + if (errors === _errs26) { + if (Array.isArray(data8)) { + if (data8.length > 2) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + if (data8.length < 2) { + validate57.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data8.length; + for (let i0 = 0; i0 < len0; i0++) { + let data9 = data8[i0]; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing5; + if (data9.url === undefined && (missing5 = 'url')) { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema42.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema42.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs30 = errors; + if (errors === _errs30) { + if (errors === _errs30) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + var valid9 = _errs30 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data9.config !== undefined) { + let data11 = data9.config; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + if (data11.services !== undefined) { + let data12 = data11.services; + const _errs34 = errors; + if (errors === _errs34) { + if (Array.isArray(data12)) { + var valid11 = true; + const len1 = data12.length; + for (let i1 = 0; i1 < len1; i1++) { + let data13 = data12[i1]; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == 'object' && + !Array.isArray(data13) + ) { + let missing6; + if ( + (data13.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data13.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data13.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema42.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema42.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } else { + if ( + data13.serviceType !== + undefined + ) { + let data14 = + data13.serviceType; + const _errs39 = errors; + if (errors === _errs39) { + if ( + errors === _errs39 + ) { + if ( + typeof data14 === + 'string' + ) { + if ( + !formats0(data14) + ) { + validate57.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate57.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.serviceId !== + undefined + ) { + let data15 = + data13.serviceId; + const _errs41 = errors; + if ( + typeof data15 !== + 'string' + ) { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid12 = + _errs41 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.remoteServiceId !== + undefined + ) { + let data16 = + data13.remoteServiceId; + const _errs43 = + errors; + if ( + typeof data16 !== + 'string' + ) { + validate57.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data16, + }, + ]; + return false; + } + var valid12 = + _errs43 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema42.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema42.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } + } + var valid11 = _errs36 === errors; + if (!valid11) { + break; + } + } + } else { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data12, + }, + ]; + return false; + } + } + } + } else { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data11, + }, + ]; + return false; + } + } + var valid9 = _errs32 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema42.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema42.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } + } + var valid8 = _errs28 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema42.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } + } + } + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs24 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.allOf[1].type, + parentSchema: schema42.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate57.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionStatusChangedEventCallback = validate58; +const schema43 = { + title: 'Peerconnection Status Changed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-status-changed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: [ + 'new', + 'connecting', + 'connected', + 'disconnected', + 'failed', + 'closed', + ], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionStatusChangedEventCallback', + 'x-location': '#/components/schemas/peerconnection_status_changed', + 'x-schema-type': 'all', +}; +function validate58( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema43.allOf[0].allOf[0].required, + parentSchema: schema43.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema43.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema43.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.allOf[0].allOf[0].type, + parentSchema: schema43.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema43.allOf[0].allOf[1].required, + parentSchema: schema43.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema43.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema43.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate58.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema43.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema43.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema43.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema43.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema43.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.allOf[0].allOf[1].type, + parentSchema: schema43.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema43.allOf[1].required, + parentSchema: schema43.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema43.allOf[1].properties.eventType.type, + parentSchema: schema43.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-status-changed')) { + validate58.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema43.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema43.allOf[1].properties.eventType.enum, + parentSchema: schema43.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.url === undefined && (missing3 = 'url')) || + (data4.type === undefined && (missing3 = 'type')) || + (data4.status === undefined && (missing3 = 'status')) + ) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema43.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.url.type, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid6 = _errs18 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.type !== undefined) { + let data6 = data4.type; + const _errs20 = errors; + if (typeof data6 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'local' || data6 === 'webrtc')) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + var valid6 = _errs20 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.status !== undefined) { + let data7 = data4.status; + const _errs22 = errors; + if (typeof data7 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.status.type, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'new' || + data7 === 'connecting' || + data7 === 'connected' || + data7 === 'disconnected' || + data7 === 'failed' || + data7 === 'closed' + ) + ) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + var valid6 = _errs22 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema43.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs24 = errors; + if (errors === _errs24) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema43.allOf[1].properties.peerconnection.allOf[1].required, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data8 = data4.devices; + const _errs26 = errors; + if (errors === _errs26) { + if (Array.isArray(data8)) { + if (data8.length > 2) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + if (data8.length < 2) { + validate58.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data8.length; + for (let i0 = 0; i0 < len0; i0++) { + let data9 = data8[i0]; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing5; + if (data9.url === undefined && (missing5 = 'url')) { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema43.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema43.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs30 = errors; + if (errors === _errs30) { + if (errors === _errs30) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + var valid9 = _errs30 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data9.config !== undefined) { + let data11 = data9.config; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + if (data11.services !== undefined) { + let data12 = data11.services; + const _errs34 = errors; + if (errors === _errs34) { + if (Array.isArray(data12)) { + var valid11 = true; + const len1 = data12.length; + for (let i1 = 0; i1 < len1; i1++) { + let data13 = data12[i1]; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == 'object' && + !Array.isArray(data13) + ) { + let missing6; + if ( + (data13.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data13.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data13.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema43.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema43.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } else { + if ( + data13.serviceType !== + undefined + ) { + let data14 = + data13.serviceType; + const _errs39 = errors; + if (errors === _errs39) { + if ( + errors === _errs39 + ) { + if ( + typeof data14 === + 'string' + ) { + if ( + !formats0(data14) + ) { + validate58.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate58.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.serviceId !== + undefined + ) { + let data15 = + data13.serviceId; + const _errs41 = errors; + if ( + typeof data15 !== + 'string' + ) { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid12 = + _errs41 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.remoteServiceId !== + undefined + ) { + let data16 = + data13.remoteServiceId; + const _errs43 = + errors; + if ( + typeof data16 !== + 'string' + ) { + validate58.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data16, + }, + ]; + return false; + } + var valid12 = + _errs43 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema43.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema43.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } + } + var valid11 = _errs36 === errors; + if (!valid11) { + break; + } + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data12, + }, + ]; + return false; + } + } + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data11, + }, + ]; + return false; + } + } + var valid9 = _errs32 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema43.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema43.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } + } + var valid8 = _errs28 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema43.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } + } + } + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs24 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.allOf[1].type, + parentSchema: schema43.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate58.errors = vErrors; + return errors === 0; +} +exports.validateChangedUrl = validate59; +const schema44 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ChangedUrl', + 'x-location': '#/components/parameters/device_changed_url/schema', + 'x-schema-type': 'all', +}; +function validate59( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate59.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema44, + data, + }, + ]; + return false; + } + } else { + validate59.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema44.type, + parentSchema: schema44, + data, + }, + ]; + return false; + } + } + } + validate59.errors = vErrors; + return errors === 0; +} +exports.validateDeviceId = validate60; +const schema45 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'DeviceId', + 'x-location': '#/components/parameters/device_id/schema', + 'x-schema-type': 'all', +}; +const formats258 = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +function validate60( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate60.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema45, + data, + }, + ]; + return false; + } + } else { + validate60.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema45.type, + parentSchema: schema45, + data, + }, + ]; + return false; + } + } + } + validate60.errors = vErrors; + return errors === 0; +} +exports.validateFlatGroup = validate61; +const schema46 = { + type: 'boolean', + default: false, + 'x-standalone': false, + 'x-name': 'FlatGroup', + 'x-location': '#/components/parameters/flat_group/schema', + 'x-schema-type': 'all', +}; +function validate61( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'boolean') { + validate61.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema46.type, + parentSchema: schema46, + data, + }, + ]; + return false; + } + validate61.errors = vErrors; + return errors === 0; +} +exports.validateStartTime = validate62; +const schema47 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'StartTime', + 'x-location': '#/components/parameters/start_time/schema', + 'x-schema-type': 'all', +}; +function validate62( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate62.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema47, + data, + }, + ]; + return false; + } + } else { + validate62.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema47.type, + parentSchema: schema47, + data, + }, + ]; + return false; + } + } + } + validate62.errors = vErrors; + return errors === 0; +} +exports.validateEndTime = validate63; +const schema48 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'EndTime', + 'x-location': '#/components/parameters/end_time/schema', + 'x-schema-type': 'all', +}; +function validate63( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate63.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema48, + data, + }, + ]; + return false; + } + } else { + validate63.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema48.type, + parentSchema: schema48, + data, + }, + ]; + return false; + } + } + } + validate63.errors = vErrors; + return errors === 0; +} +exports.validateClosedUrl = validate64; +const schema49 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ClosedUrl', + 'x-location': '#/components/parameters/closed_url/schema', + 'x-schema-type': 'all', +}; +function validate64( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate64.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema49, + data, + }, + ]; + return false; + } + } else { + validate64.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema49.type, + parentSchema: schema49, + data, + }, + ]; + return false; + } + } + } + validate64.errors = vErrors; + return errors === 0; +} +exports.validateStatusChangedUrl = validate65; +const schema50 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'StatusChangedUrl', + 'x-location': '#/components/parameters/status_changed_url/schema', + 'x-schema-type': 'all', +}; +function validate65( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate65.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema50, + data, + }, + ]; + return false; + } + } else { + validate65.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema50.type, + parentSchema: schema50, + data, + }, + ]; + return false; + } + } + } + validate65.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionId = validate66; +const schema51 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'PeerconnectionId', + 'x-location': '#/components/parameters/peerconnection_id/schema', + 'x-schema-type': 'all', +}; +function validate66( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate66.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema51, + data, + }, + ]; + return false; + } + } else { + validate66.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema51.type, + parentSchema: schema51, + data, + }, + ]; + return false; + } + } + } + validate66.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUrl = validate67; +const schema52 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'DeviceUrl', + 'x-location': '#/components/parameters/device_url/schema', + 'x-schema-type': 'all', +}; +function validate67( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate67.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema52, + data, + }, + ]; + return false; + } + } else { + validate67.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema52.type, + parentSchema: schema52, + data, + }, + ]; + return false; + } + } + } + validate67.errors = vErrors; + return errors === 0; +} +exports.validateListDevicesResponse200 = validate68; +const schema53 = { + type: 'array', + items: { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + 'x-standalone': false, + 'x-name': 'listDevicesResponse200', + 'x-location': '#/paths//devices/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate68( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.url === undefined && (missing0 = 'url')) || + (data0.type === undefined && (missing0 = 'type')) || + (data0.name === undefined && (missing0 = 'name')) || + (data0.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema53.items.required, + parentSchema: schema53.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema53.items.properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema53.items.properties.url.type, + parentSchema: schema53.items.properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.name !== undefined) { + let data2 = data0.name; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/name', + schemaPath: '#/items/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema53.items.properties.name.type, + parentSchema: schema53.items.properties.name, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.description !== undefined) { + let data3 = data0.description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/description', + schemaPath: '#/items/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema53.items.properties.description.type, + parentSchema: schema53.items.properties.description, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.type !== undefined) { + let data4 = data0.type; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema53.items.properties.type.type, + parentSchema: schema53.items.properties.type, + data: data4, + }, + ]; + return false; + } + if ( + !( + data4 === 'device' || + data4 === 'group' || + data4 === 'edge instantiable' || + data4 === 'cloud instantiable' + ) + ) { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema53.items.properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema53.items.properties.type.enum, + parentSchema: schema53.items.properties.type, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.isPublic !== undefined) { + let data5 = data0.isPublic; + const _errs11 = errors; + if (typeof data5 !== 'boolean') { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/isPublic', + schemaPath: '#/items/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema53.items.properties.isPublic.type, + parentSchema: schema53.items.properties.isPublic, + data: data5, + }, + ]; + return false; + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.viewer !== undefined) { + let data6 = data0.viewer; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid2 = true; + const len1 = data6.length; + for (let i1 = 0; i1 < len1; i1++) { + let data7 = data6[i1]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing1; + if (data7.url === undefined && (missing1 = 'url')) { + validate68.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: + '#/items/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + + missing1 + + "'", + schema: + schema53.items.properties.viewer.items + .required, + parentSchema: + schema53.items.properties.viewer.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate68.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema53.items.properties.viewer + .items.properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate68.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema53.items.properties.viewer.items + .properties.url.type, + parentSchema: + schema53.items.properties.viewer.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } + } + } + } + } else { + validate68.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: + '#/items/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema53.items.properties.viewer.items.type, + parentSchema: + schema53.items.properties.viewer.items, + data: data7, + }, + ]; + return false; + } + } + var valid2 = _errs15 === errors; + if (!valid2) { + break; + } + } + } else { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/viewer', + schemaPath: '#/items/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema53.items.properties.viewer.type, + parentSchema: schema53.items.properties.viewer, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.owner !== undefined) { + let data9 = data0.owner; + const _errs19 = errors; + if (errors === _errs19) { + if (Array.isArray(data9)) { + var valid4 = true; + const len2 = data9.length; + for (let i2 = 0; i2 < len2; i2++) { + let data10 = data9[i2]; + const _errs21 = errors; + if (errors === _errs21) { + if ( + data10 && + typeof data10 == 'object' && + !Array.isArray(data10) + ) { + let missing2; + if ( + data10.url === undefined && + (missing2 = 'url') + ) { + validate68.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: + '#/items/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema53.items.properties.owner.items + .required, + parentSchema: + schema53.items.properties.owner.items, + data: data10, + }, + ]; + return false; + } else { + if (data10.url !== undefined) { + let data11 = data10.url; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate68.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema53.items.properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } else { + validate68.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema53.items.properties.owner + .items.properties.url.type, + parentSchema: + schema53.items.properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } + } + } + } + } else { + validate68.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: + '#/items/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema53.items.properties.owner.items.type, + parentSchema: + schema53.items.properties.owner.items, + data: data10, + }, + ]; + return false; + } + } + var valid4 = _errs21 === errors; + if (!valid4) { + break; + } + } + } else { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/owner', + schemaPath: '#/items/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema53.items.properties.owner.type, + parentSchema: schema53.items.properties.owner, + data: data9, + }, + ]; + return false; + } + } + var valid1 = _errs19 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema53.items.type, + parentSchema: schema53.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate68.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema53.type, + parentSchema: schema53, + data, + }, + ]; + return false; + } + } + validate68.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceBody = validate69; +const schema54 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceBody', + 'x-location': '#/paths//devices/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate69( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema54.anyOf[0].allOf[0].required, + parentSchema: schema54.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema54.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema54.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema54.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema54.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema54.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema54.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema54.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema54.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema54.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema54.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema54.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema54.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[0].allOf[0].type, + parentSchema: schema54.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema54.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema54.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema54.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[0].allOf[1].type, + parentSchema: schema54.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema54.anyOf[1].allOf[0].required, + parentSchema: schema54.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema54.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema54.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema54.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema54.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema54.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema54.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema54.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema54.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema54.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema54.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema54.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema54.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[1].allOf[0].type, + parentSchema: schema54.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema54.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema54.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema54.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema54.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema54.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema54.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[1].allOf[1].type, + parentSchema: schema54.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema54.anyOf[2].allOf[0].required, + parentSchema: schema54.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema54.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema54.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema54.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema54.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema54.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema54.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema54.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema54.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema54.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema54.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema54.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema54.anyOf[2].allOf[0].properties.owner.items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[2].allOf[0].type, + parentSchema: schema54.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema54.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema54.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema54.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema54.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema54.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[2].allOf[1].type, + parentSchema: schema54.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema54.anyOf[3].allOf[0].required, + parentSchema: schema54.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema54.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema54.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema54.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema54.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema54.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema54.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema54.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema54.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema54.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema54.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema54.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema54.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema54.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema54.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema54.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema54.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema54.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema54.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema54.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema54.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[3].allOf[0].type, + parentSchema: schema54.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema54.anyOf[3].allOf[1].required, + parentSchema: schema54.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema54.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema54.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema54.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema54.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema54.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema54.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[3].allOf[1].type, + parentSchema: schema54.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema54.anyOf, + parentSchema: schema54, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate69.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate69.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceResponse201 = validate70; +const schema55 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceResponse201', + 'x-location': '#/paths//devices/post/responses/201/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate70( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema55.anyOf[0].allOf[0].required, + parentSchema: schema55.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema55.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema55.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema55.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema55.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema55.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema55.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema55.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema55.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema55.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema55.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema55.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[0].allOf[0].type, + parentSchema: schema55.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema55.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema55.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema55.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[0].allOf[1].type, + parentSchema: schema55.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema55.anyOf[1].allOf[0].required, + parentSchema: schema55.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema55.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema55.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema55.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema55.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema55.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema55.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema55.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema55.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema55.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema55.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema55.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[1].allOf[0].type, + parentSchema: schema55.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema55.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema55.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema55.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema55.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema55.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema55.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[1].allOf[1].type, + parentSchema: schema55.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema55.anyOf[2].allOf[0].required, + parentSchema: schema55.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema55.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema55.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema55.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema55.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema55.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema55.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema55.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema55.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema55.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema55.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema55.anyOf[2].allOf[0].properties.owner.items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[2].allOf[0].type, + parentSchema: schema55.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema55.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema55.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema55.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema55.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema55.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[2].allOf[1].type, + parentSchema: schema55.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema55.anyOf[3].allOf[0].required, + parentSchema: schema55.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema55.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema55.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema55.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema55.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema55.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema55.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema55.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema55.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema55.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema55.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema55.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema55.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema55.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema55.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[3].allOf[0].type, + parentSchema: schema55.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema55.anyOf[3].allOf[1].required, + parentSchema: schema55.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema55.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema55.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema55.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema55.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema55.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema55.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[3].allOf[1].type, + parentSchema: schema55.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema55.anyOf, + parentSchema: schema55, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate70.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate70.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceResponse200 = validate71; +const schema56 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getDeviceResponse200', + 'x-location': + '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate71( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema56.anyOf[0].allOf[0].required, + parentSchema: schema56.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema56.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema56.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema56.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema56.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema56.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema56.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema56.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema56.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema56.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema56.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema56.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[0].allOf[0].type, + parentSchema: schema56.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema56.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema56.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema56.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[0].allOf[1].type, + parentSchema: schema56.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema56.anyOf[1].allOf[0].required, + parentSchema: schema56.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema56.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema56.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema56.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema56.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema56.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema56.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema56.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema56.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema56.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema56.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema56.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[1].allOf[0].type, + parentSchema: schema56.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema56.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema56.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema56.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema56.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema56.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema56.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[1].allOf[1].type, + parentSchema: schema56.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema56.anyOf[2].allOf[0].required, + parentSchema: schema56.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema56.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema56.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema56.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema56.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema56.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema56.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema56.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema56.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema56.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema56.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema56.anyOf[2].allOf[0].properties.owner.items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[2].allOf[0].type, + parentSchema: schema56.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema56.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema56.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema56.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema56.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema56.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[2].allOf[1].type, + parentSchema: schema56.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema56.anyOf[3].allOf[0].required, + parentSchema: schema56.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema56.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema56.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema56.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema56.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema56.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema56.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema56.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema56.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema56.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema56.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema56.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema56.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema56.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema56.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[3].allOf[0].type, + parentSchema: schema56.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema56.anyOf[3].allOf[1].required, + parentSchema: schema56.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema56.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema56.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema56.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema56.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema56.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema56.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[3].allOf[1].type, + parentSchema: schema56.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema56.anyOf, + parentSchema: schema56, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate71.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate71.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceBody = validate72; +const schema57 = { + title: 'Device Update', + anyOf: [ + { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + }, + ], + }, + ], + 'x-standalone': false, + 'x-name': 'updateDeviceBody', + 'x-location': + '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate72( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema57.anyOf[0].allOf[0].required, + parentSchema: schema57.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema57.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema57.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema57.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema57.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema57.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema57.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema57.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema57.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema57.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema57.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema57.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[0].allOf[0].type, + parentSchema: schema57.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema57.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema57.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema57.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema57.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[0].allOf[1].type, + parentSchema: schema57.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.type === undefined && (missing3 = 'type')) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema57.anyOf[1].allOf[0].required, + parentSchema: schema57.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema57.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema57.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema57.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema57.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema57.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema57.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[1].allOf[0].properties.viewer.items.type, + parentSchema: + schema57.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema57.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema57.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema57.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema57.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[1].allOf[0].type, + parentSchema: schema57.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema57.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema57.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema57.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema57.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema57.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema57.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[1].allOf[1].type, + parentSchema: schema57.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if (data.type === undefined && (missing6 = 'type')) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema57.anyOf[2].allOf[0].required, + parentSchema: schema57.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema57.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema57.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema57.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema57.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema57.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[2].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema57.anyOf[2].allOf[0].properties.viewer + .items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema57.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema57.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema57.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema57.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema57.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[2].allOf[0].type, + parentSchema: schema57.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema57.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema57.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema57.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema57.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema57.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema57.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[2].allOf[1].type, + parentSchema: schema57.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.type === undefined && (missing9 = 'type')) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema57.anyOf[3].allOf[0].required, + parentSchema: schema57.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema57.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema57.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema57.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema57.anyOf[3].allOf[0].properties.viewer.items + .required, + parentSchema: + schema57.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema57.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema57.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema57.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema57.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema57.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema57.anyOf[3].allOf[0].properties.owner.items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[3].allOf[0].properties.owner.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[3].allOf[0].type, + parentSchema: schema57.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err101 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema57.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing12; + if (data63.url === undefined && (missing12 = 'url')) { + const err102 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: + "must have required property '" + missing12 + "'", + schema: + schema57.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema57.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err103 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + } else { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema57.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } + } + } + } + } else { + const err105 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[3].allOf[1].properties.devices.items.type, + parentSchema: + schema57.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema57.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } else { + const err107 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[3].allOf[1].type, + parentSchema: schema57.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err108 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema57.anyOf, + parentSchema: schema57, + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + validate72.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate72.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceResponse200 = validate73; +const schema58 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'updateDeviceResponse200', + 'x-location': + '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate73( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema58.anyOf[0].allOf[0].required, + parentSchema: schema58.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema58.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema58.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema58.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema58.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema58.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema58.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema58.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema58.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema58.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema58.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema58.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[0].allOf[0].type, + parentSchema: schema58.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema58.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema58.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema58.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[0].allOf[1].type, + parentSchema: schema58.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema58.anyOf[1].allOf[0].required, + parentSchema: schema58.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema58.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema58.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema58.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema58.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema58.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema58.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema58.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema58.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema58.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema58.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema58.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[1].allOf[0].type, + parentSchema: schema58.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema58.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema58.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema58.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema58.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema58.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema58.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[1].allOf[1].type, + parentSchema: schema58.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema58.anyOf[2].allOf[0].required, + parentSchema: schema58.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema58.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema58.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema58.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema58.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema58.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema58.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema58.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema58.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema58.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema58.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema58.anyOf[2].allOf[0].properties.owner.items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[2].allOf[0].type, + parentSchema: schema58.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema58.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema58.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema58.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema58.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema58.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[2].allOf[1].type, + parentSchema: schema58.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema58.anyOf[3].allOf[0].required, + parentSchema: schema58.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema58.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema58.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema58.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema58.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema58.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema58.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema58.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema58.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema58.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema58.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema58.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema58.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema58.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema58.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[3].allOf[0].type, + parentSchema: schema58.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema58.anyOf[3].allOf[1].required, + parentSchema: schema58.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema58.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema58.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema58.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema58.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema58.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema58.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[3].allOf[1].type, + parentSchema: schema58.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema58.anyOf, + parentSchema: schema58, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate73.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate73.errors = vErrors; + return errors === 0; +} +exports.validateInstantiateDeviceResponse201 = validate74; +const schema59 = { + type: 'object', + properties: { + instance: { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + deviceToken: { type: 'string' }, + }, + required: ['instance', 'deviceToken'], + 'x-standalone': false, + 'x-name': 'instantiateDeviceResponse201', + 'x-location': + '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate74( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.instance === undefined && (missing0 = 'instance')) || + (data.deviceToken === undefined && (missing0 = 'deviceToken')) + ) { + validate74.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema59.required, + parentSchema: schema59, + data, + }, + ]; + return false; + } else { + if (data.instance !== undefined) { + let data0 = data.instance; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.url === undefined && (missing1 = 'url')) || + (data0.type === undefined && (missing1 = 'type')) || + (data0.name === undefined && (missing1 = 'name')) || + (data0.isPublic === undefined && (missing1 = 'isPublic')) + ) { + validate74.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema59.properties.instance.allOf[0].required, + parentSchema: schema59.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate74.errors = [ + { + instancePath: instancePath + '/instance/url', + schemaPath: + '#/properties/instance/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema59.properties.instance.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance/url', + schemaPath: + '#/properties/instance/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[0].properties.url.type, + parentSchema: + schema59.properties.instance.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.name !== undefined) { + let data2 = data0.name; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate74.errors = [ + { + instancePath: instancePath + '/instance/name', + schemaPath: + '#/properties/instance/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[0].properties.name.type, + parentSchema: + schema59.properties.instance.allOf[0].properties.name, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.description !== undefined) { + let data3 = data0.description; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate74.errors = [ + { + instancePath: instancePath + '/instance/description', + schemaPath: + '#/properties/instance/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[0].properties.description + .type, + parentSchema: + schema59.properties.instance.allOf[0].properties + .description, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.type !== undefined) { + let data4 = data0.type; + const _errs10 = errors; + if (typeof data4 !== 'string') { + validate74.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[0].properties.type + .type, + parentSchema: + schema59.properties.instance.allOf[0].properties.type, + data: data4, + }, + ]; + return false; + } + if ( + !( + data4 === 'device' || + data4 === 'group' || + data4 === 'edge instantiable' || + data4 === 'cloud instantiable' + ) + ) { + validate74.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema59.properties.instance.allOf[0].properties.type + .enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema59.properties.instance.allOf[0].properties.type + .enum, + parentSchema: + schema59.properties.instance.allOf[0].properties.type, + data: data4, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.isPublic !== undefined) { + let data5 = data0.isPublic; + const _errs12 = errors; + if (typeof data5 !== 'boolean') { + validate74.errors = [ + { + instancePath: instancePath + '/instance/isPublic', + schemaPath: + '#/properties/instance/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema59.properties.instance.allOf[0].properties + .isPublic.type, + parentSchema: + schema59.properties.instance.allOf[0].properties + .isPublic, + data: data5, + }, + ]; + return false; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.viewer !== undefined) { + let data6 = data0.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data6)) { + var valid3 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if (data7.url === undefined && (missing2 = 'url')) { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema59.properties.instance.allOf[0] + .properties.viewer.items.required, + parentSchema: + schema59.properties.instance.allOf[0] + .properties.viewer.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema59.properties.instance + .allOf[0].properties.viewer + .items.properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance + .allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema59.properties.instance + .allOf[0].properties.viewer.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } + } + } + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema59.properties.instance.allOf[0] + .properties.viewer.items.type, + parentSchema: + schema59.properties.instance.allOf[0] + .properties.viewer.items, + data: data7, + }, + ]; + return false; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance/viewer', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema59.properties.instance.allOf[0].properties + .viewer.type, + parentSchema: + schema59.properties.instance.allOf[0].properties + .viewer, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.owner !== undefined) { + let data9 = data0.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data9)) { + var valid5 = true; + const len1 = data9.length; + for (let i1 = 0; i1 < len1; i1++) { + let data10 = data9[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data10 && + typeof data10 == 'object' && + !Array.isArray(data10) + ) { + let missing3; + if ( + data10.url === undefined && + (missing3 = 'url') + ) { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema59.properties.instance.allOf[0] + .properties.owner.items.required, + parentSchema: + schema59.properties.instance.allOf[0] + .properties.owner.items, + data: data10, + }, + ]; + return false; + } else { + if (data10.url !== undefined) { + let data11 = data10.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema59.properties.instance + .allOf[0].properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance + .allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema59.properties.instance + .allOf[0].properties.owner.items + .properties.url, + data: data11, + }, + ]; + return false; + } + } + } + } + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema59.properties.instance.allOf[0] + .properties.owner.items.type, + parentSchema: + schema59.properties.instance.allOf[0] + .properties.owner.items, + data: data10, + }, + ]; + return false; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance/owner', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema59.properties.instance.allOf[0].properties + .owner.type, + parentSchema: + schema59.properties.instance.allOf[0].properties + .owner, + data: data9, + }, + ]; + return false; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema59.properties.instance.allOf[0].type, + parentSchema: schema59.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.type !== undefined) { + let data12 = data0.type; + const _errs28 = errors; + if ('device' !== data12) { + validate74.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: '#/properties/instance/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: + schema59.properties.instance.allOf[1].properties.type, + data: data12, + }, + ]; + return false; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.connected !== undefined) { + let data13 = data0.connected; + const _errs29 = errors; + if (typeof data13 !== 'boolean') { + validate74.errors = [ + { + instancePath: instancePath + '/instance/connected', + schemaPath: + '#/properties/instance/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema59.properties.instance.allOf[1].properties.connected + .type, + parentSchema: + schema59.properties.instance.allOf[1].properties.connected, + data: data13, + }, + ]; + return false; + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.announcedAvailability !== undefined) { + let data14 = data0.announcedAvailability; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data14)) { + var valid8 = true; + const len2 = data14.length; + for (let i2 = 0; i2 < len2; i2++) { + let data15 = data14[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if ( + data15 && + typeof data15 == 'object' && + !Array.isArray(data15) + ) { + if (data15.start !== undefined) { + let data16 = data15.start; + const _errs35 = errors; + if (errors === _errs35) { + if (errors === _errs35) { + if (typeof data16 === 'string') { + if (!formats22.validate(data16)) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start, + data: data16, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start.type, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start, + data: data16, + }, + ]; + return false; + } + } + } + var valid9 = _errs35 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data15.end !== undefined) { + let data17 = data15.end; + const _errs37 = errors; + if (errors === _errs37) { + if (errors === _errs37) { + if (typeof data17 === 'string') { + if (!formats22.validate(data17)) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability + .items.properties.end, + data: data17, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.end.type, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.end, + data: data17, + }, + ]; + return false; + } + } + } + var valid9 = _errs37 === errors; + } else { + var valid9 = true; + } + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2, + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema59.properties.instance.allOf[1].properties + .announcedAvailability.items.type, + parentSchema: + schema59.properties.instance.allOf[1].properties + .announcedAvailability.items, + data: data15, + }, + ]; + return false; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/announcedAvailability', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema59.properties.instance.allOf[1].properties + .announcedAvailability.type, + parentSchema: + schema59.properties.instance.allOf[1].properties + .announcedAvailability, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.experiment !== undefined) { + let data18 = data0.experiment; + const _errs39 = errors; + if (errors === _errs39) { + if (errors === _errs39) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + validate74.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema59.properties.instance.allOf[1].properties + .experiment, + data: data18, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1].properties + .experiment.type, + parentSchema: + schema59.properties.instance.allOf[1].properties + .experiment, + data: data18, + }, + ]; + return false; + } + } + } + var valid7 = _errs39 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.services !== undefined) { + let data19 = data0.services; + const _errs41 = errors; + if (errors === _errs41) { + if (Array.isArray(data19)) { + var valid10 = true; + const len3 = data19.length; + for (let i3 = 0; i3 < len3; i3++) { + let data20 = data19[i3]; + const _errs43 = errors; + if (errors === _errs43) { + if ( + data20 && + typeof data20 == 'object' && + !Array.isArray(data20) + ) { + if (data20.serviceType !== undefined) { + let data21 = data20.serviceType; + const _errs46 = errors; + if (errors === _errs46) { + if (errors === _errs46) { + if (typeof data21 === 'string') { + if (!formats0(data21)) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema59.properties.instance.allOf[1] + .properties.services.items + .properties.serviceType, + data: data21, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType.type, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType, + data: data21, + }, + ]; + return false; + } + } + } + var valid11 = _errs46 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data20.serviceId !== undefined) { + let data22 = data20.serviceId; + const _errs48 = errors; + if (typeof data22 !== 'string') { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceId', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId.type, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId, + data: data22, + }, + ]; + return false; + } + var valid11 = _errs48 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data20.serviceDirection !== undefined) { + let data23 = data20.serviceDirection; + const _errs50 = errors; + if (typeof data23 !== 'string') { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.type, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data23, + }, + ]; + return false; + } + if ( + !( + data23 === 'consumer' || + data23 === 'producer' || + data23 === 'prosumer' + ) + ) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema59.properties.instance.allOf[1] + .properties.services.items + .properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.enum, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data23, + }, + ]; + return false; + } + var valid11 = _errs50 === errors; + } else { + var valid11 = true; + } + } + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/services/' + i3, + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema59.properties.instance.allOf[1].properties + .services.items.type, + parentSchema: + schema59.properties.instance.allOf[1].properties + .services.items, + data: data20, + }, + ]; + return false; + } + } + var valid10 = _errs43 === errors; + if (!valid10) { + break; + } + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance/services', + schemaPath: + '#/properties/instance/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema59.properties.instance.allOf[1].properties + .services.type, + parentSchema: + schema59.properties.instance.allOf[1].properties + .services, + data: data19, + }, + ]; + return false; + } + } + var valid7 = _errs41 === errors; + } else { + var valid7 = true; + } + } + } + } + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema59.properties.instance.allOf[1].type, + parentSchema: schema59.properties.instance.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs26 === errors; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.deviceToken !== undefined) { + let data24 = data.deviceToken; + const _errs52 = errors; + if (typeof data24 !== 'string') { + validate74.errors = [ + { + instancePath: instancePath + '/deviceToken', + schemaPath: '#/properties/deviceToken/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema59.properties.deviceToken.type, + parentSchema: schema59.properties.deviceToken, + data: data24, + }, + ]; + return false; + } + var valid0 = _errs52 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate74.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema59.type, + parentSchema: schema59, + data, + }, + ]; + return false; + } + } + validate74.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceAvailabilityResponse200 = validate75; +const schema60 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'getDeviceAvailabilityResponse200', + 'x-location': + '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate75( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate75.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema60.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate75.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema60.items.properties.start.type, + parentSchema: schema60.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate75.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema60.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate75.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema60.items.properties.end.type, + parentSchema: schema60.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate75.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema60.items.type, + parentSchema: schema60.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate75.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema60.type, + parentSchema: schema60, + data, + }, + ]; + return false; + } + } + validate75.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesBody = validate76; +const schema61 = { + title: 'Availability Rules', + description: 'The availability rule to be applied.', + type: 'array', + items: { + title: 'Availability Rule', + type: 'object', + allOf: [ + { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + { + type: 'object', + properties: { + available: { type: 'boolean' }, + repeat: { + description: + 'If specified the time slot is repeated in a fixed offset specified by the frequency', + type: 'object', + properties: { + frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, + until: { + description: 'Up to this date-time the time slot will be repeated.', + type: 'string', + format: 'date-time', + }, + count: { + description: 'How often the time slot will be repeated', + type: 'integer', + }, + }, + required: ['frequency'], + }, + }, + }, + ], + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesBody', + 'x-location': + '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate76( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema61.items.type, + parentSchema: schema61.items, + data: data0, + }, + ]; + return false; + } + const _errs3 = errors; + if (errors === _errs3) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema61.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema61.items.allOf[0].properties.start.type, + parentSchema: schema61.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs5 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema61.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema61.items.allOf[0].properties.end.type, + parentSchema: schema61.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + } + } else { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema61.items.allOf[0].type, + parentSchema: schema61.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (valid1) { + const _errs9 = errors; + if (errors === _errs9) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.available !== undefined) { + let data3 = data0.available; + const _errs11 = errors; + if (typeof data3 !== 'boolean') { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/available', + schemaPath: '#/items/allOf/1/properties/available/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema61.items.allOf[1].properties.available.type, + parentSchema: schema61.items.allOf[1].properties.available, + data: data3, + }, + ]; + return false; + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data0.repeat !== undefined) { + let data4 = data0.repeat; + const _errs13 = errors; + if (errors === _errs13) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing0; + if (data4.frequency === undefined && (missing0 = 'frequency')) { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema61.items.allOf[1].properties.repeat.required, + parentSchema: schema61.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } else { + if (data4.frequency !== undefined) { + let data5 = data4.frequency; + const _errs15 = errors; + if (typeof data5 !== 'string') { + validate76.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema61.items.allOf[1].properties.repeat.properties + .frequency.type, + parentSchema: + schema61.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + if ( + !( + data5 === 'HOURLY' || + data5 === 'DAILY' || + data5 === 'WEEKLY' + ) + ) { + validate76.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/enum', + keyword: 'enum', + params: { + allowedValues: + schema61.items.allOf[1].properties.repeat.properties + .frequency.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema61.items.allOf[1].properties.repeat.properties + .frequency.enum, + parentSchema: + schema61.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.until !== undefined) { + let data6 = data4.until; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data6 === 'string') { + if (!formats22.validate(data6)) { + validate76.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema61.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } else { + validate76.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema61.items.allOf[1].properties.repeat + .properties.until.type, + parentSchema: + schema61.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs17 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.count !== undefined) { + let data7 = data4.count; + const _errs19 = errors; + if ( + !( + typeof data7 == 'number' && + !(data7 % 1) && + !isNaN(data7) && + isFinite(data7) + ) + ) { + validate76.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/count', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/count/type', + keyword: 'type', + params: { type: 'integer' }, + message: 'must be integer', + schema: + schema61.items.allOf[1].properties.repeat.properties + .count.type, + parentSchema: + schema61.items.allOf[1].properties.repeat.properties + .count, + data: data7, + }, + ]; + return false; + } + var valid4 = _errs19 === errors; + } else { + var valid4 = true; + } + } + } + } + } else { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema61.items.allOf[1].properties.repeat.type, + parentSchema: schema61.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs13 === errors; + } else { + var valid3 = true; + } + } + } else { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema61.items.allOf[1].type, + parentSchema: schema61.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs9 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate76.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema61.type, + parentSchema: schema61, + data, + }, + ]; + return false; + } + } + validate76.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesResponse200 = validate77; +const schema62 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesResponse200', + 'x-location': + '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate77( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate77.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema62.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate77.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema62.items.properties.start.type, + parentSchema: schema62.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate77.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema62.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate77.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema62.items.properties.end.type, + parentSchema: schema62.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate77.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema62.items.type, + parentSchema: schema62.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate77.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema62.type, + parentSchema: schema62, + data, + }, + ]; + return false; + } + } + validate77.errors = vErrors; + return errors === 0; +} +exports.validateCreateWebsocketTokenResponse200 = validate78; +const schema63 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'createWebsocketTokenResponse200', + 'x-location': + '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate78( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate78.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema63.type, + parentSchema: schema63, + data, + }, + ]; + return false; + } + validate78.errors = vErrors; + return errors === 0; +} +exports.validateSendSignalingMessageBody = validate79; +const schema64 = { + title: 'Sig Message', + anyOf: [ + { + title: 'Create Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'createPeerconnection' }, + connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, + connectionUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + type: 'object', + required: ['serviceType', 'serviceId', 'remoteServiceId'], + title: 'Service Config', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + additionalProperties: true, + }, + }, + tiebreaker: { type: 'boolean' }, + config: { type: 'object', additionalProperties: true }, + }, + required: [ + 'command', + 'connectionType', + 'connectionUrl', + 'services', + 'tiebreaker', + ], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Close Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'closePeerconnection' }, + connectionUrl: { type: 'string', format: 'uri' }, + }, + required: ['command', 'connectionUrl'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Signaling Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'signaling' }, + signalingType: { type: 'string' }, + connectionUrl: { type: 'string', format: 'uri' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'signalingType', 'connectionUrl', 'content'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Configuration Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'configuration' }, + configuration: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'configuration'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Experiment Status Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'experiment-status-changed' }, + status: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['messageType', 'status'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-standalone': false, + 'x-name': 'sendSignalingMessageBody', + 'x-location': + '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate79( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + const _errs3 = errors; + if (errors === _errs3) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema64.anyOf[0].allOf[0].allOf[0].required, + parentSchema: schema64.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[0].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema64.anyOf[0].allOf[0].allOf[0].properties.messageType, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } + } else { + const err2 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[0].allOf[0].allOf[0].type, + parentSchema: schema64.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var valid2 = _errs3 === errors; + if (valid2) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + const err3 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema64.anyOf[0].allOf[0].allOf[1].required, + parentSchema: schema64.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs10 = errors; + if ('command' !== data1) { + const err4 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema64.anyOf[0].allOf[0].allOf[1].properties.messageType, + data: data1, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs11 = errors; + if (typeof data2 !== 'string') { + const err5 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[0].allOf[0].allOf[1].properties.command.type, + parentSchema: schema64.anyOf[0].allOf[0].allOf[1].properties.command, + data: data2, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid4 = _errs11 === errors; + } else { + var valid4 = true; + } + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[0].allOf[0].allOf[1].type, + parentSchema: schema64.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var valid2 = _errs8 === errors; + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs13 = errors; + if (errors === _errs13) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionType === undefined && (missing2 = 'connectionType')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || + (data.services === undefined && (missing2 = 'services')) || + (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) + ) { + const err7 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema64.anyOf[0].allOf[1].required, + parentSchema: schema64.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs15 = errors; + if ('createPeerconnection' !== data3) { + const err8 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'createPeerconnection' }, + message: 'must be equal to constant', + schema: 'createPeerconnection', + parentSchema: schema64.anyOf[0].allOf[1].properties.command, + data: data3, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + var valid5 = _errs15 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionType !== undefined) { + let data4 = data.connectionType; + const _errs16 = errors; + if (typeof data4 !== 'string') { + const err9 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[0].allOf[1].properties.connectionType.type, + parentSchema: schema64.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { + const err10 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/enum', + keyword: 'enum', + params: { + allowedValues: + schema64.anyOf[0].allOf[1].properties.connectionType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema64.anyOf[0].allOf[1].properties.connectionType.enum, + parentSchema: schema64.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + var valid5 = _errs16 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionUrl !== undefined) { + let data5 = data.connectionUrl; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + const err11 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema64.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } else { + const err12 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[0].allOf[1].properties.connectionUrl.type, + parentSchema: schema64.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + } + var valid5 = _errs18 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.services !== undefined) { + let data6 = data.services; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data6)) { + var valid6 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing3; + if ( + (data7.serviceType === undefined && + (missing3 = 'serviceType')) || + (data7.serviceId === undefined && + (missing3 = 'serviceId')) || + (data7.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + const err13 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema64.anyOf[0].allOf[1].properties.services.items + .required, + parentSchema: + schema64.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data7.serviceType !== undefined) { + let data8 = data7.serviceType; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + const err14 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.serviceId !== undefined) { + let data9 = data7.serviceId; + const _errs27 = errors; + if (typeof data9 !== 'string') { + const err16 = { + instancePath: + instancePath + '/services/' + i0 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.serviceId, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.remoteServiceId !== undefined) { + let data10 = data7.remoteServiceId; + const _errs29 = errors; + if (typeof data10 !== 'string') { + const err17 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId.type, + parentSchema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + const err18 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema64.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema64.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid6 = _errs22 === errors; + if (!valid6) { + break; + } + } + } else { + const err19 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema64.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema64.anyOf[0].allOf[1].properties.services, + data: data6, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + var valid5 = _errs20 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.tiebreaker !== undefined) { + let data11 = data.tiebreaker; + const _errs31 = errors; + if (typeof data11 !== 'boolean') { + const err20 = { + instancePath: instancePath + '/tiebreaker', + schemaPath: '#/anyOf/0/allOf/1/properties/tiebreaker/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema64.anyOf[0].allOf[1].properties.tiebreaker.type, + parentSchema: schema64.anyOf[0].allOf[1].properties.tiebreaker, + data: data11, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + var valid5 = _errs31 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.config !== undefined) { + let data12 = data.config; + const _errs33 = errors; + if (errors === _errs33) { + if ( + data12 && + typeof data12 == 'object' && + !Array.isArray(data12) + ) { + } else { + const err21 = { + instancePath: instancePath + '/config', + schemaPath: '#/anyOf/0/allOf/1/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[0].allOf[1].properties.config.type, + parentSchema: schema64.anyOf[0].allOf[1].properties.config, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + var valid5 = _errs33 === errors; + } else { + var valid5 = true; + } + } + } + } + } + } + } + } else { + const err22 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[0].allOf[1].type, + parentSchema: schema64.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } + var valid1 = _errs13 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs36 = errors; + const _errs37 = errors; + const _errs38 = errors; + if (errors === _errs38) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing4; + if (data.messageType === undefined && (missing4 = 'messageType')) { + const err23 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: schema64.anyOf[1].allOf[0].allOf[0].required, + parentSchema: schema64.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data13 = data.messageType; + if (typeof data13 !== 'string') { + const err24 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[1].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema64.anyOf[1].allOf[0].allOf[0].properties.messageType, + data: data13, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + } + } + } else { + const err25 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[1].allOf[0].allOf[0].type, + parentSchema: schema64.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid9 = _errs38 === errors; + if (valid9) { + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing5; + if ( + (data.messageType === undefined && (missing5 = 'messageType')) || + (data.command === undefined && (missing5 = 'command')) + ) { + const err26 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: "must have required property '" + missing5 + "'", + schema: schema64.anyOf[1].allOf[0].allOf[1].required, + parentSchema: schema64.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data14 = data.messageType; + const _errs45 = errors; + if ('command' !== data14) { + const err27 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: + schema64.anyOf[1].allOf[0].allOf[1].properties.messageType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.command !== undefined) { + let data15 = data.command; + const _errs46 = errors; + if (typeof data15 !== 'string') { + const err28 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[1].allOf[0].allOf[1].properties.command.type, + parentSchema: schema64.anyOf[1].allOf[0].allOf[1].properties.command, + data: data15, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + var valid11 = _errs46 === errors; + } else { + var valid11 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[1].allOf[0].allOf[1].type, + parentSchema: schema64.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid9 = _errs43 === errors; + } + var valid8 = _errs37 === errors; + if (valid8) { + const _errs48 = errors; + if (errors === _errs48) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.command === undefined && (missing6 = 'command')) || + (data.connectionUrl === undefined && (missing6 = 'connectionUrl')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema64.anyOf[1].allOf[1].required, + parentSchema: schema64.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.command !== undefined) { + let data16 = data.command; + const _errs50 = errors; + if ('closePeerconnection' !== data16) { + const err31 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'closePeerconnection' }, + message: 'must be equal to constant', + schema: 'closePeerconnection', + parentSchema: schema64.anyOf[1].allOf[1].properties.command, + data: data16, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + var valid12 = _errs50 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data.connectionUrl !== undefined) { + let data17 = data.connectionUrl; + const _errs51 = errors; + if (errors === _errs51) { + if (errors === _errs51) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + const err32 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema64.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } else { + const err33 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[1].allOf[1].properties.connectionUrl.type, + parentSchema: schema64.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + } + } + var valid12 = _errs51 === errors; + } else { + var valid12 = true; + } + } + } + } else { + const err34 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[1].allOf[1].type, + parentSchema: schema64.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + } + var valid8 = _errs48 === errors; + } + var _valid0 = _errs36 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs53 = errors; + const _errs54 = errors; + if (errors === _errs54) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing7; + if (data.messageType === undefined && (missing7 = 'messageType')) { + const err35 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: "must have required property '" + missing7 + "'", + schema: schema64.anyOf[2].allOf[0].required, + parentSchema: schema64.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data18 = data.messageType; + if (typeof data18 !== 'string') { + const err36 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[2].allOf[0].properties.messageType.type, + parentSchema: schema64.anyOf[2].allOf[0].properties.messageType, + data: data18, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } else { + const err37 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[2].allOf[0].type, + parentSchema: schema64.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid13 = _errs54 === errors; + if (valid13) { + const _errs59 = errors; + if (errors === _errs59) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing8; + if ( + (data.messageType === undefined && (missing8 = 'messageType')) || + (data.signalingType === undefined && (missing8 = 'signalingType')) || + (data.connectionUrl === undefined && (missing8 = 'connectionUrl')) || + (data.content === undefined && (missing8 = 'content')) + ) { + const err38 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: "must have required property '" + missing8 + "'", + schema: schema64.anyOf[2].allOf[1].required, + parentSchema: schema64.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data19 = data.messageType; + const _errs61 = errors; + if ('signaling' !== data19) { + const err39 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'signaling' }, + message: 'must be equal to constant', + schema: 'signaling', + parentSchema: schema64.anyOf[2].allOf[1].properties.messageType, + data: data19, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + var valid15 = _errs61 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.signalingType !== undefined) { + let data20 = data.signalingType; + const _errs62 = errors; + if (typeof data20 !== 'string') { + const err40 = { + instancePath: instancePath + '/signalingType', + schemaPath: '#/anyOf/2/allOf/1/properties/signalingType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[2].allOf[1].properties.signalingType.type, + parentSchema: schema64.anyOf[2].allOf[1].properties.signalingType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + var valid15 = _errs62 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.connectionUrl !== undefined) { + let data21 = data.connectionUrl; + const _errs64 = errors; + if (errors === _errs64) { + if (errors === _errs64) { + if (typeof data21 === 'string') { + if (!formats0(data21)) { + const err41 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: + '#/anyOf/2/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema64.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } else { + const err42 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema64.anyOf[2].allOf[1].properties.connectionUrl.type, + parentSchema: + schema64.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + } + var valid15 = _errs64 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.content !== undefined) { + let data22 = data.content; + const _errs66 = errors; + if (errors === _errs66) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + } else { + const err43 = { + instancePath: instancePath + '/content', + schemaPath: '#/anyOf/2/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[2].allOf[1].properties.content.type, + parentSchema: schema64.anyOf[2].allOf[1].properties.content, + data: data22, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid15 = _errs66 === errors; + } else { + var valid15 = true; + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[2].allOf[1].type, + parentSchema: schema64.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid13 = _errs59 === errors; + } + var _valid0 = _errs53 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs69 = errors; + const _errs70 = errors; + if (errors === _errs70) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.messageType === undefined && (missing9 = 'messageType')) { + const err45 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema64.anyOf[3].allOf[0].required, + parentSchema: schema64.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data23 = data.messageType; + if (typeof data23 !== 'string') { + const err46 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[3].allOf[0].properties.messageType.type, + parentSchema: schema64.anyOf[3].allOf[0].properties.messageType, + data: data23, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + } + } else { + const err47 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[3].allOf[0].type, + parentSchema: schema64.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid16 = _errs70 === errors; + if (valid16) { + const _errs75 = errors; + if (errors === _errs75) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing10; + if ( + (data.messageType === undefined && (missing10 = 'messageType')) || + (data.configuration === undefined && (missing10 = 'configuration')) + ) { + const err48 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: "must have required property '" + missing10 + "'", + schema: schema64.anyOf[3].allOf[1].required, + parentSchema: schema64.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data24 = data.messageType; + const _errs77 = errors; + if ('configuration' !== data24) { + const err49 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'configuration' }, + message: 'must be equal to constant', + schema: 'configuration', + parentSchema: schema64.anyOf[3].allOf[1].properties.messageType, + data: data24, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data.configuration !== undefined) { + let data25 = data.configuration; + const _errs78 = errors; + if (errors === _errs78) { + if (data25 && typeof data25 == 'object' && !Array.isArray(data25)) { + } else { + const err50 = { + instancePath: instancePath + '/configuration', + schemaPath: '#/anyOf/3/allOf/1/properties/configuration/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema64.anyOf[3].allOf[1].properties.configuration.type, + parentSchema: + schema64.anyOf[3].allOf[1].properties.configuration, + data: data25, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err51 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[3].allOf[1].type, + parentSchema: schema64.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } + var valid16 = _errs75 === errors; + } + var _valid0 = _errs69 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs81 = errors; + const _errs82 = errors; + if (errors === _errs82) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing11; + if (data.messageType === undefined && (missing11 = 'messageType')) { + const err52 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: "must have required property '" + missing11 + "'", + schema: schema64.anyOf[4].allOf[0].required, + parentSchema: schema64.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data26 = data.messageType; + if (typeof data26 !== 'string') { + const err53 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[4].allOf[0].properties.messageType.type, + parentSchema: schema64.anyOf[4].allOf[0].properties.messageType, + data: data26, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + } + } else { + const err54 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[4].allOf[0].type, + parentSchema: schema64.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid19 = _errs82 === errors; + if (valid19) { + const _errs87 = errors; + if (errors === _errs87) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if ( + (data.messageType === undefined && (missing12 = 'messageType')) || + (data.status === undefined && (missing12 = 'status')) + ) { + const err55 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema64.anyOf[4].allOf[1].required, + parentSchema: schema64.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data27 = data.messageType; + const _errs89 = errors; + if ('experiment-status-changed' !== data27) { + const err56 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'experiment-status-changed' }, + message: 'must be equal to constant', + schema: 'experiment-status-changed', + parentSchema: schema64.anyOf[4].allOf[1].properties.messageType, + data: data27, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + var valid21 = _errs89 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.status !== undefined) { + let data28 = data.status; + const _errs90 = errors; + if (typeof data28 !== 'string') { + const err57 = { + instancePath: instancePath + '/status', + schemaPath: '#/anyOf/4/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[4].allOf[1].properties.status.type, + parentSchema: schema64.anyOf[4].allOf[1].properties.status, + data: data28, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid21 = _errs90 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.message !== undefined) { + let data29 = data.message; + const _errs92 = errors; + if (typeof data29 !== 'string') { + const err58 = { + instancePath: instancePath + '/message', + schemaPath: '#/anyOf/4/allOf/1/properties/message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[4].allOf[1].properties.message.type, + parentSchema: schema64.anyOf[4].allOf[1].properties.message, + data: data29, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid21 = _errs92 === errors; + } else { + var valid21 = true; + } + } + } + } + } else { + const err59 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[4].allOf[1].type, + parentSchema: schema64.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } + var valid19 = _errs87 === errors; + } + var _valid0 = _errs81 === errors; + valid0 = valid0 || _valid0; + } + } + } + } + if (!valid0) { + const err60 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema64.anyOf, + parentSchema: schema64, + data, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + validate79.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate79.errors = vErrors; + return errors === 0; +} +exports.validateListPeerconnectionsResponse200 = validate80; +const schema65 = { + type: 'array', + items: { + title: 'Peerconnection Overview', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + }, + 'x-standalone': false, + 'x-name': 'listPeerconnectionsResponse200', + 'x-location': + '#/paths//peerconnections/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate80( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.url === undefined && (missing0 = 'url')) || + (data0.type === undefined && (missing0 = 'type')) || + (data0.status === undefined && (missing0 = 'status')) + ) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema65.items.allOf[0].required, + parentSchema: schema65.items.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema65.items.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema65.items.allOf[0].properties.url.type, + parentSchema: schema65.items.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.type !== undefined) { + let data2 = data0.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema65.items.allOf[0].properties.type.type, + parentSchema: schema65.items.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if (!(data2 === 'local' || data2 === 'webrtc')) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema65.items.allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema65.items.allOf[0].properties.type.enum, + parentSchema: schema65.items.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.status !== undefined) { + let data3 = data0.status; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/status', + schemaPath: '#/items/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema65.items.allOf[0].properties.status.type, + parentSchema: schema65.items.allOf[0].properties.status, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'new' || + data3 === 'connecting' || + data3 === 'connected' || + data3 === 'disconnected' || + data3 === 'failed' || + data3 === 'closed' + ) + ) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/status', + schemaPath: '#/items/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: schema65.items.allOf[0].properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema65.items.allOf[0].properties.status.enum, + parentSchema: schema65.items.allOf[0].properties.status, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema65.items.allOf[0].type, + parentSchema: schema65.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs10 = errors; + if (errors === _errs10) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.devices === undefined && (missing1 = 'devices')) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema65.items.allOf[1].required, + parentSchema: schema65.items.allOf[1], + data: data0, + }, + ]; + return false; + } else { + if (data0.devices !== undefined) { + let data4 = data0.devices; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + if (data4.length > 2) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema65.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } else { + if (data4.length < 2) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema65.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } else { + var valid4 = true; + const len1 = data4.length; + for (let i1 = 0; i1 < len1; i1++) { + let data5 = data4[i1]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing2; + if (data5.url === undefined && (missing2 = 'url')) { + validate80.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema65.items.allOf[1].properties.devices.items + .required, + parentSchema: + schema65.items.allOf[1].properties.devices.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate80.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema65.items.allOf[1].properties + .devices.items.properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate80.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema65.items.allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema65.items.allOf[1].properties.devices + .items.properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate80.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema65.items.allOf[1].properties.devices.items + .type, + parentSchema: + schema65.items.allOf[1].properties.devices.items, + data: data5, + }, + ]; + return false; + } + } + var valid4 = _errs14 === errors; + if (!valid4) { + break; + } + } + } + } + } else { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema65.items.allOf[1].properties.devices.type, + parentSchema: schema65.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } + } + } + } + } else { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema65.items.allOf[1].type, + parentSchema: schema65.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate80.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema65.type, + parentSchema: schema65, + data, + }, + ]; + return false; + } + } + validate80.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionBody = validate81; +const schema66 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionBody', + 'x-location': + '#/paths//peerconnections/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate81( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate81.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema66.allOf[0].required, + parentSchema: schema66.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate81.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema66.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate81.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema66.allOf[0].properties.url.type, + parentSchema: schema66.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate81.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema66.allOf[0].properties.type.type, + parentSchema: schema66.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate81.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema66.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema66.allOf[0].properties.type.enum, + parentSchema: schema66.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate81.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema66.allOf[0].properties.status.type, + parentSchema: schema66.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate81.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema66.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema66.allOf[0].properties.status.enum, + parentSchema: schema66.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate81.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema66.allOf[0].type, + parentSchema: schema66.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate81.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema66.allOf[1].required, + parentSchema: schema66.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate81.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema66.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate81.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema66.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate81.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema66.allOf[1].properties.devices.items.required, + parentSchema: schema66.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate81.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema66.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate81.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema66.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema66.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema66.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema66.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema66.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema66.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema66.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema66.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId.type, + parentSchema: + schema66.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema66.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema66.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema66.allOf[1].properties.devices + .items.properties.config + .properties.services.items.type, + parentSchema: + schema66.allOf[1].properties.devices + .items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema66.allOf[1].properties.devices.items + .properties.config.properties.services + .type, + parentSchema: + schema66.allOf[1].properties.devices.items + .properties.config.properties.services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate81.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema66.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema66.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate81.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema66.allOf[1].properties.devices.items.type, + parentSchema: schema66.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate81.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema66.allOf[1].properties.devices.type, + parentSchema: schema66.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate81.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema66.allOf[1].type, + parentSchema: schema66.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate81.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse201 = validate82; +const schema67 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse201', + 'x-location': + '#/paths//peerconnections/post/responses/201/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate82( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate82.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema67.allOf[0].required, + parentSchema: schema67.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate82.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema67.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema67.allOf[0].properties.url.type, + parentSchema: schema67.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate82.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema67.allOf[0].properties.type.type, + parentSchema: schema67.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate82.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema67.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema67.allOf[0].properties.type.enum, + parentSchema: schema67.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate82.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema67.allOf[0].properties.status.type, + parentSchema: schema67.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate82.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema67.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema67.allOf[0].properties.status.enum, + parentSchema: schema67.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate82.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema67.allOf[0].type, + parentSchema: schema67.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate82.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema67.allOf[1].required, + parentSchema: schema67.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate82.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema67.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate82.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema67.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate82.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema67.allOf[1].properties.devices.items.required, + parentSchema: schema67.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate82.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema67.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate82.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema67.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema67.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema67.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema67.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema67.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId.type, + parentSchema: + schema67.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema67.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema67.allOf[1].properties.devices + .items.properties.config + .properties.services.items.type, + parentSchema: + schema67.allOf[1].properties.devices + .items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema67.allOf[1].properties.devices.items + .properties.config.properties.services + .type, + parentSchema: + schema67.allOf[1].properties.devices.items + .properties.config.properties.services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate82.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema67.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema67.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema67.allOf[1].properties.devices.items.type, + parentSchema: schema67.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema67.allOf[1].properties.devices.type, + parentSchema: schema67.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate82.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema67.allOf[1].type, + parentSchema: schema67.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate82.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse202 = validate83; +const schema68 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse202', + 'x-location': + '#/paths//peerconnections/post/responses/202/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate83( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate83.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema68.allOf[0].required, + parentSchema: schema68.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate83.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema68.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema68.allOf[0].properties.url.type, + parentSchema: schema68.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate83.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema68.allOf[0].properties.type.type, + parentSchema: schema68.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate83.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema68.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema68.allOf[0].properties.type.enum, + parentSchema: schema68.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate83.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema68.allOf[0].properties.status.type, + parentSchema: schema68.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate83.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema68.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema68.allOf[0].properties.status.enum, + parentSchema: schema68.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate83.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema68.allOf[0].type, + parentSchema: schema68.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate83.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema68.allOf[1].required, + parentSchema: schema68.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate83.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema68.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate83.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema68.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate83.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema68.allOf[1].properties.devices.items.required, + parentSchema: schema68.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate83.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema68.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate83.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema68.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema68.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema68.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema68.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema68.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId.type, + parentSchema: + schema68.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema68.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema68.allOf[1].properties.devices + .items.properties.config + .properties.services.items.type, + parentSchema: + schema68.allOf[1].properties.devices + .items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema68.allOf[1].properties.devices.items + .properties.config.properties.services + .type, + parentSchema: + schema68.allOf[1].properties.devices.items + .properties.config.properties.services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate83.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema68.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema68.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema68.allOf[1].properties.devices.items.type, + parentSchema: schema68.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema68.allOf[1].properties.devices.type, + parentSchema: schema68.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate83.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema68.allOf[1].type, + parentSchema: schema68.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate83.errors = vErrors; + return errors === 0; +} +exports.validateGetPeerconnectionResponse200 = validate84; +const schema69 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getPeerconnectionResponse200', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate84( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate84.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema69.allOf[0].required, + parentSchema: schema69.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate84.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema69.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate84.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema69.allOf[0].properties.url.type, + parentSchema: schema69.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate84.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema69.allOf[0].properties.type.type, + parentSchema: schema69.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate84.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema69.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema69.allOf[0].properties.type.enum, + parentSchema: schema69.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate84.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema69.allOf[0].properties.status.type, + parentSchema: schema69.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate84.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema69.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema69.allOf[0].properties.status.enum, + parentSchema: schema69.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate84.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema69.allOf[0].type, + parentSchema: schema69.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate84.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema69.allOf[1].required, + parentSchema: schema69.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate84.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema69.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate84.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema69.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate84.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema69.allOf[1].properties.devices.items.required, + parentSchema: schema69.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate84.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema69.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate84.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema69.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema69.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema69.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema69.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema69.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema69.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema69.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema69.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId.type, + parentSchema: + schema69.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema69.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema69.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema69.allOf[1].properties.devices + .items.properties.config + .properties.services.items.type, + parentSchema: + schema69.allOf[1].properties.devices + .items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema69.allOf[1].properties.devices.items + .properties.config.properties.services + .type, + parentSchema: + schema69.allOf[1].properties.devices.items + .properties.config.properties.services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate84.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema69.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema69.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate84.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema69.allOf[1].properties.devices.items.type, + parentSchema: schema69.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate84.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema69.allOf[1].properties.devices.type, + parentSchema: schema69.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate84.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema69.allOf[1].type, + parentSchema: schema69.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate84.errors = vErrors; + return errors === 0; +} +exports.validatePatchPeerconnectionDeviceStatusBody = validate85; +const schema70 = { + type: 'object', + properties: { + status: { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['status'], + 'x-standalone': false, + 'x-name': 'patchPeerconnectionDeviceStatusBody', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate85( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.status === undefined && (missing0 = 'status')) { + validate85.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema70.required, + parentSchema: schema70, + data, + }, + ]; + return false; + } else { + if (data.status !== undefined) { + let data0 = data.status; + if (typeof data0 !== 'string') { + validate85.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema70.properties.status.type, + parentSchema: schema70.properties.status, + data: data0, + }, + ]; + return false; + } + if ( + !( + data0 === 'new' || + data0 === 'connecting' || + data0 === 'connected' || + data0 === 'disconnected' || + data0 === 'failed' || + data0 === 'closed' + ) + ) { + validate85.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema70.properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema70.properties.status.enum, + parentSchema: schema70.properties.status, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate85.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema70.type, + parentSchema: schema70, + data, + }, + ]; + return false; + } + } + validate85.errors = vErrors; + return errors === 0; +} +exports.validateAuthenticationMessageRequest = validate86; +const schema71 = { + title: 'Authentication Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'authenticate' }, + token: { type: 'string' }, + authenticated: { type: 'boolean' }, + }, + required: ['messageType'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'AuthenticationMessageRequest', + 'x-location': '#/components/schemas/authentication_message_request', + 'x-schema-type': 'request', +}; +function validate86( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate86.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema71.allOf[0].required, + parentSchema: schema71.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate86.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema71.allOf[0].properties.messageType.type, + parentSchema: schema71.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate86.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema71.allOf[0].type, + parentSchema: schema71.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.messageType === undefined && (missing1 = 'messageType')) { + validate86.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema71.allOf[1].required, + parentSchema: schema71.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('authenticate' !== data1) { + validate86.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'authenticate' }, + message: 'must be equal to constant', + schema: 'authenticate', + parentSchema: schema71.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.token !== undefined) { + let data2 = data.token; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate86.errors = [ + { + instancePath: instancePath + '/token', + schemaPath: '#/allOf/1/properties/token/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema71.allOf[1].properties.token.type, + parentSchema: schema71.allOf[1].properties.token, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.authenticated !== undefined) { + let data3 = data.authenticated; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + validate86.errors = [ + { + instancePath: instancePath + '/authenticated', + schemaPath: '#/allOf/1/properties/authenticated/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema71.allOf[1].properties.authenticated.type, + parentSchema: schema71.allOf[1].properties.authenticated, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate86.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema71.allOf[1].type, + parentSchema: schema71.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate86.errors = vErrors; + return errors === 0; +} +exports.validateAuthenticationMessageResponse = validate87; +const schema72 = { + title: 'Authentication Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'authenticate' }, + token: { type: 'string' }, + authenticated: { type: 'boolean' }, + }, + required: ['messageType'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'AuthenticationMessageResponse', + 'x-location': '#/components/schemas/authentication_message_response', + 'x-schema-type': 'response', +}; +function validate87( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate87.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema72.allOf[0].required, + parentSchema: schema72.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate87.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema72.allOf[0].properties.messageType.type, + parentSchema: schema72.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate87.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema72.allOf[0].type, + parentSchema: schema72.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.messageType === undefined && (missing1 = 'messageType')) { + validate87.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema72.allOf[1].required, + parentSchema: schema72.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('authenticate' !== data1) { + validate87.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'authenticate' }, + message: 'must be equal to constant', + schema: 'authenticate', + parentSchema: schema72.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.token !== undefined) { + let data2 = data.token; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate87.errors = [ + { + instancePath: instancePath + '/token', + schemaPath: '#/allOf/1/properties/token/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema72.allOf[1].properties.token.type, + parentSchema: schema72.allOf[1].properties.token, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.authenticated !== undefined) { + let data3 = data.authenticated; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + validate87.errors = [ + { + instancePath: instancePath + '/authenticated', + schemaPath: '#/allOf/1/properties/authenticated/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema72.allOf[1].properties.authenticated.type, + parentSchema: schema72.allOf[1].properties.authenticated, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate87.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema72.allOf[1].type, + parentSchema: schema72.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate87.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStateChangedMessageRequest = validate88; +const schema73 = { + title: 'Connection State Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'connection-state-changed' }, + connectionUrl: { type: 'string', format: 'uri' }, + status: { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['connectionUrl', 'status'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConnectionStateChangedMessageRequest', + 'x-location': '#/components/schemas/connection_state_changed_message_request', + 'x-schema-type': 'request', +}; +function validate88( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema73.allOf[0].required, + parentSchema: schema73.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate88.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema73.allOf[0].properties.messageType.type, + parentSchema: schema73.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema73.allOf[0].type, + parentSchema: schema73.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || + (data.status === undefined && (missing1 = 'status')) + ) { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema73.allOf[1].required, + parentSchema: schema73.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('connection-state-changed' !== data1) { + validate88.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'connection-state-changed' }, + message: 'must be equal to constant', + schema: 'connection-state-changed', + parentSchema: schema73.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.connectionUrl !== undefined) { + let data2 = data.connectionUrl; + const _errs8 = errors; + if (errors === _errs8) { + if (errors === _errs8) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate88.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema73.allOf[1].properties.connectionUrl, + data: data2, + }, + ]; + return false; + } + } else { + validate88.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema73.allOf[1].properties.connectionUrl.type, + parentSchema: schema73.allOf[1].properties.connectionUrl, + data: data2, + }, + ]; + return false; + } + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.status !== undefined) { + let data3 = data.status; + const _errs10 = errors; + if (typeof data3 !== 'string') { + validate88.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema73.allOf[1].properties.status.type, + parentSchema: schema73.allOf[1].properties.status, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'new' || + data3 === 'connecting' || + data3 === 'connected' || + data3 === 'disconnected' || + data3 === 'failed' || + data3 === 'closed' + ) + ) { + validate88.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema73.allOf[1].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema73.allOf[1].properties.status.enum, + parentSchema: schema73.allOf[1].properties.status, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema73.allOf[1].type, + parentSchema: schema73.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate88.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStateChangedMessageResponse = validate89; +const schema74 = { + title: 'Connection State Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'connection-state-changed' }, + connectionUrl: { type: 'string', format: 'uri' }, + status: { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['connectionUrl', 'status'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConnectionStateChangedMessageResponse', + 'x-location': '#/components/schemas/connection_state_changed_message_response', + 'x-schema-type': 'response', +}; +function validate89( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate89.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema74.allOf[0].required, + parentSchema: schema74.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate89.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema74.allOf[0].properties.messageType.type, + parentSchema: schema74.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate89.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema74.allOf[0].type, + parentSchema: schema74.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || + (data.status === undefined && (missing1 = 'status')) + ) { + validate89.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema74.allOf[1].required, + parentSchema: schema74.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('connection-state-changed' !== data1) { + validate89.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'connection-state-changed' }, + message: 'must be equal to constant', + schema: 'connection-state-changed', + parentSchema: schema74.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.connectionUrl !== undefined) { + let data2 = data.connectionUrl; + const _errs8 = errors; + if (errors === _errs8) { + if (errors === _errs8) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate89.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema74.allOf[1].properties.connectionUrl, + data: data2, + }, + ]; + return false; + } + } else { + validate89.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema74.allOf[1].properties.connectionUrl.type, + parentSchema: schema74.allOf[1].properties.connectionUrl, + data: data2, + }, + ]; + return false; + } + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.status !== undefined) { + let data3 = data.status; + const _errs10 = errors; + if (typeof data3 !== 'string') { + validate89.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema74.allOf[1].properties.status.type, + parentSchema: schema74.allOf[1].properties.status, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'new' || + data3 === 'connecting' || + data3 === 'connected' || + data3 === 'disconnected' || + data3 === 'failed' || + data3 === 'closed' + ) + ) { + validate89.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema74.allOf[1].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema74.allOf[1].properties.status.enum, + parentSchema: schema74.allOf[1].properties.status, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate89.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema74.allOf[1].type, + parentSchema: schema74.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate89.errors = vErrors; + return errors === 0; +} +exports.validateUserReferenceRequest = validate90; +const schema75 = { + title: 'User Reference', + type: 'object', + properties: { url: { type: 'string', description: 'URL of the user', format: 'uri' } }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'UserReferenceRequest', + 'x-location': '#/components/schemas/user_reference_request', + 'x-schema-type': 'request', +}; +function validate90( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate90.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema75.required, + parentSchema: schema75, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate90.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema75.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate90.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema75.properties.url.type, + parentSchema: schema75.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate90.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema75.type, + parentSchema: schema75, + data, + }, + ]; + return false; + } + } + validate90.errors = vErrors; + return errors === 0; +} +exports.validateUserReferenceResponse = validate91; +const schema76 = { + title: 'User Reference', + type: 'object', + properties: { url: { type: 'string', description: 'URL of the user', format: 'uri' } }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'UserReferenceResponse', + 'x-location': '#/components/schemas/user_reference_response', + 'x-schema-type': 'response', +}; +function validate91( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate91.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema76.required, + parentSchema: schema76, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate91.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema76.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate91.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema76.properties.url.type, + parentSchema: schema76.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate91.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema76.type, + parentSchema: schema76, + data, + }, + ]; + return false; + } + } + validate91.errors = vErrors; + return errors === 0; +} +exports.validateDeviceOverviewRequest = validate92; +const schema77 = { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceOverviewRequest', + 'x-location': '#/components/schemas/device_overview_request', + 'x-schema-type': 'request', +}; +function validate92( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate92.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema77.required, + parentSchema: schema77, + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs1 = errors; + if (typeof data0 !== 'string') { + validate92.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema77.properties.name.type, + parentSchema: schema77.properties.name, + data: data0, + }, + ]; + return false; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate92.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema77.properties.description.type, + parentSchema: schema77.properties.description, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate92.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema77.properties.type.type, + parentSchema: schema77.properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate92.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema77.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema77.properties.type.enum, + parentSchema: schema77.properties.type, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs7 = errors; + if (typeof data3 !== 'boolean') { + validate92.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema77.properties.isPublic.type, + parentSchema: schema77.properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid1 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate92.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema77.properties.viewer.items.required, + parentSchema: schema77.properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate92.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema77.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } else { + validate92.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema77.properties.viewer.items.properties + .url.type, + parentSchema: + schema77.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate92.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema77.properties.viewer.items.type, + parentSchema: schema77.properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + if (!valid1) { + break; + } + } + } else { + validate92.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema77.properties.viewer.type, + parentSchema: schema77.properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs15 = errors; + if (errors === _errs15) { + if (Array.isArray(data7)) { + var valid3 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs17 = errors; + if (errors === _errs17) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate92.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema77.properties.owner.items.required, + parentSchema: schema77.properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate92.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema77.properties.owner.items.properties + .url, + data: data9, + }, + ]; + return false; + } + } else { + validate92.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema77.properties.owner.items.properties + .url.type, + parentSchema: + schema77.properties.owner.items.properties + .url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate92.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema77.properties.owner.items.type, + parentSchema: schema77.properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid3 = _errs17 === errors; + if (!valid3) { + break; + } + } + } else { + validate92.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema77.properties.owner.type, + parentSchema: schema77.properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } else { + validate92.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema77.type, + parentSchema: schema77, + data, + }, + ]; + return false; + } + } + validate92.errors = vErrors; + return errors === 0; +} +exports.validateDeviceOverviewResponse = validate93; +const schema78 = { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceOverviewResponse', + 'x-location': '#/components/schemas/device_overview_response', + 'x-schema-type': 'response', +}; +function validate93( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate93.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema78.required, + parentSchema: schema78, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate93.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema78.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate93.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema78.properties.url.type, + parentSchema: schema78.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate93.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema78.properties.name.type, + parentSchema: schema78.properties.name, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate93.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema78.properties.description.type, + parentSchema: schema78.properties.description, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate93.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema78.properties.type.type, + parentSchema: schema78.properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate93.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema78.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema78.properties.type.enum, + parentSchema: schema78.properties.type, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs9 = errors; + if (typeof data4 !== 'boolean') { + validate93.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema78.properties.isPublic.type, + parentSchema: schema78.properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid1 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs13 = errors; + if (errors === _errs13) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate93.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema78.properties.viewer.items.required, + parentSchema: schema78.properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate93.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema78.properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate93.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema78.properties.viewer.items.properties + .url.type, + parentSchema: + schema78.properties.viewer.items.properties + .url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate93.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema78.properties.viewer.items.type, + parentSchema: schema78.properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + if (!valid1) { + break; + } + } + } else { + validate93.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema78.properties.viewer.type, + parentSchema: schema78.properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs17 = errors; + if (errors === _errs17) { + if (Array.isArray(data8)) { + var valid3 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs19 = errors; + if (errors === _errs19) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate93.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema78.properties.owner.items.required, + parentSchema: schema78.properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs21 = errors; + if (errors === _errs21) { + if (errors === _errs21) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate93.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema78.properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate93.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema78.properties.owner.items.properties + .url.type, + parentSchema: + schema78.properties.owner.items.properties + .url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate93.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema78.properties.owner.items.type, + parentSchema: schema78.properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid3 = _errs19 === errors; + if (!valid3) { + break; + } + } + } else { + validate93.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema78.properties.owner.type, + parentSchema: schema78.properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } else { + validate93.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema78.type, + parentSchema: schema78, + data, + }, + ]; + return false; + } + } + validate93.errors = vErrors; + return errors === 0; +} +exports.validateServiceDescriptionRequest = validate94; +const schema79 = { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { type: 'string', enum: ['consumer', 'producer', 'prosumer'] }, + }, + additionalProperties: true, + 'x-standalone': true, + 'x-name': 'ServiceDescriptionRequest', + 'x-location': '#/components/schemas/service_description_request', + 'x-schema-type': 'request', +}; +function validate94( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.serviceType !== undefined) { + let data0 = data.serviceType; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate94.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema79.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } else { + validate94.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema79.properties.serviceType.type, + parentSchema: schema79.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceId !== undefined) { + let data1 = data.serviceId; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate94.errors = [ + { + instancePath: instancePath + '/serviceId', + schemaPath: '#/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema79.properties.serviceId.type, + parentSchema: schema79.properties.serviceId, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceDirection !== undefined) { + let data2 = data.serviceDirection; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate94.errors = [ + { + instancePath: instancePath + '/serviceDirection', + schemaPath: '#/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema79.properties.serviceDirection.type, + parentSchema: schema79.properties.serviceDirection, + data: data2, + }, + ]; + return false; + } + if (!(data2 === 'consumer' || data2 === 'producer' || data2 === 'prosumer')) { + validate94.errors = [ + { + instancePath: instancePath + '/serviceDirection', + schemaPath: '#/properties/serviceDirection/enum', + keyword: 'enum', + params: { allowedValues: schema79.properties.serviceDirection.enum }, + message: 'must be equal to one of the allowed values', + schema: schema79.properties.serviceDirection.enum, + parentSchema: schema79.properties.serviceDirection, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate94.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema79.type, + parentSchema: schema79, + data, + }, + ]; + return false; + } + } + validate94.errors = vErrors; + return errors === 0; +} +exports.validateServiceDescriptionResponse = validate95; +const schema80 = { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { type: 'string', enum: ['consumer', 'producer', 'prosumer'] }, + }, + additionalProperties: true, + 'x-standalone': true, + 'x-name': 'ServiceDescriptionResponse', + 'x-location': '#/components/schemas/service_description_response', + 'x-schema-type': 'response', +}; +function validate95( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.serviceType !== undefined) { + let data0 = data.serviceType; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate95.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema80.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } else { + validate95.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema80.properties.serviceType.type, + parentSchema: schema80.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceId !== undefined) { + let data1 = data.serviceId; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate95.errors = [ + { + instancePath: instancePath + '/serviceId', + schemaPath: '#/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema80.properties.serviceId.type, + parentSchema: schema80.properties.serviceId, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceDirection !== undefined) { + let data2 = data.serviceDirection; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate95.errors = [ + { + instancePath: instancePath + '/serviceDirection', + schemaPath: '#/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema80.properties.serviceDirection.type, + parentSchema: schema80.properties.serviceDirection, + data: data2, + }, + ]; + return false; + } + if (!(data2 === 'consumer' || data2 === 'producer' || data2 === 'prosumer')) { + validate95.errors = [ + { + instancePath: instancePath + '/serviceDirection', + schemaPath: '#/properties/serviceDirection/enum', + keyword: 'enum', + params: { allowedValues: schema80.properties.serviceDirection.enum }, + message: 'must be equal to one of the allowed values', + schema: schema80.properties.serviceDirection.enum, + parentSchema: schema80.properties.serviceDirection, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate95.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema80.type, + parentSchema: schema80, + data, + }, + ]; + return false; + } + } + validate95.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableCloudDeviceRequest = validate96; +const schema81 = { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'InstantiableCloudDeviceRequest', + 'x-location': '#/components/schemas/device_cloud_instantiable_request', + 'x-schema-type': 'request', +}; +function validate96( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate96.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema81.allOf[0].required, + parentSchema: schema81.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate96.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema81.allOf[0].properties.name.type, + parentSchema: schema81.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate96.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema81.allOf[0].properties.description.type, + parentSchema: schema81.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate96.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema81.allOf[0].properties.type.type, + parentSchema: schema81.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate96.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema81.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema81.allOf[0].properties.type.enum, + parentSchema: schema81.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate96.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema81.allOf[0].properties.isPublic.type, + parentSchema: schema81.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate96.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema81.allOf[0].properties.viewer.items.required, + parentSchema: schema81.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate96.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema81.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate96.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema81.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema81.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema81.allOf[0].properties.viewer.items.type, + parentSchema: schema81.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema81.allOf[0].properties.viewer.type, + parentSchema: schema81.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate96.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema81.allOf[0].properties.owner.items.required, + parentSchema: + schema81.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate96.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema81.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate96.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema81.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema81.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema81.allOf[0].properties.owner.items.type, + parentSchema: schema81.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema81.allOf[0].properties.owner.type, + parentSchema: schema81.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate96.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema81.allOf[0].type, + parentSchema: schema81.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('cloud instantiable' !== data10) { + validate96.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema81.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate96.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema81.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema81.allOf[1].properties.instantiateUrl.type, + parentSchema: schema81.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate96.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema81.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate96.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema81.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema81.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate96.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema81.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema81.allOf[1].properties.services.items.properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate96.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema81.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema81.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate96.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema81.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema81.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema81.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema81.allOf[1].properties.services.items.type, + parentSchema: schema81.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema81.allOf[1].properties.services.type, + parentSchema: schema81.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate96.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema81.allOf[1].type, + parentSchema: schema81.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate96.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableCloudDeviceResponse = validate97; +const schema82 = { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'InstantiableCloudDeviceResponse', + 'x-location': '#/components/schemas/device_cloud_instantiable_response', + 'x-schema-type': 'response', +}; +function validate97( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate97.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema82.allOf[0].required, + parentSchema: schema82.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate97.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema82.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema82.allOf[0].properties.url.type, + parentSchema: schema82.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate97.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema82.allOf[0].properties.name.type, + parentSchema: schema82.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate97.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema82.allOf[0].properties.description.type, + parentSchema: schema82.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate97.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema82.allOf[0].properties.type.type, + parentSchema: schema82.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate97.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema82.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema82.allOf[0].properties.type.enum, + parentSchema: schema82.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate97.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema82.allOf[0].properties.isPublic.type, + parentSchema: schema82.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate97.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema82.allOf[0].properties.viewer.items.required, + parentSchema: + schema82.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate97.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema82.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate97.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema82.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema82.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema82.allOf[0].properties.viewer.items.type, + parentSchema: schema82.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema82.allOf[0].properties.viewer.type, + parentSchema: schema82.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate97.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema82.allOf[0].properties.owner.items.required, + parentSchema: + schema82.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate97.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema82.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate97.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema82.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema82.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema82.allOf[0].properties.owner.items.type, + parentSchema: + schema82.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema82.allOf[0].properties.owner.type, + parentSchema: schema82.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate97.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema82.allOf[0].type, + parentSchema: schema82.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data11) { + validate97.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema82.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + validate97.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema82.allOf[1].properties.instantiateUrl, + data: data12, + }, + ]; + return false; + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema82.allOf[1].properties.instantiateUrl.type, + parentSchema: schema82.allOf[1].properties.instantiateUrl, + data: data12, + }, + ]; + return false; + } + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data13)) { + var valid7 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + validate97.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema82.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } else { + validate97.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema82.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema82.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate97.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema82.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema82.allOf[1].properties.services.items.properties + .serviceId, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs38 = errors; + if (typeof data17 !== 'string') { + validate97.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema82.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema82.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + validate97.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema82.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema82.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema82.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + var valid8 = _errs38 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema82.allOf[1].properties.services.items.type, + parentSchema: schema82.allOf[1].properties.services.items, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + if (!valid7) { + break; + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema82.allOf[1].properties.services.type, + parentSchema: schema82.allOf[1].properties.services, + data: data13, + }, + ]; + return false; + } + } + var valid6 = _errs29 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate97.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema82.allOf[1].type, + parentSchema: schema82.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate97.errors = vErrors; + return errors === 0; +} +exports.validateTimeSlotRequest = validate98; +const schema83 = { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeSlotRequest', + 'x-location': '#/components/schemas/time_slot_request', + 'x-schema-type': 'request', +}; +function validate98( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.start !== undefined) { + let data0 = data.start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats22.validate(data0)) { + validate98.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema83.properties.start, + data: data0, + }, + ]; + return false; + } + } else { + validate98.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema83.properties.start.type, + parentSchema: schema83.properties.start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.end !== undefined) { + let data1 = data.end; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate98.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema83.properties.end, + data: data1, + }, + ]; + return false; + } + } else { + validate98.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema83.properties.end.type, + parentSchema: schema83.properties.end, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } else { + validate98.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema83.type, + parentSchema: schema83, + data, + }, + ]; + return false; + } + } + validate98.errors = vErrors; + return errors === 0; +} +exports.validateTimeSlotResponse = validate99; +const schema84 = { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeSlotResponse', + 'x-location': '#/components/schemas/time_slot_response', + 'x-schema-type': 'response', +}; +function validate99( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.start !== undefined) { + let data0 = data.start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats22.validate(data0)) { + validate99.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema84.properties.start, + data: data0, + }, + ]; + return false; + } + } else { + validate99.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema84.properties.start.type, + parentSchema: schema84.properties.start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.end !== undefined) { + let data1 = data.end; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate99.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema84.properties.end, + data: data1, + }, + ]; + return false; + } + } else { + validate99.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema84.properties.end.type, + parentSchema: schema84.properties.end, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } else { + validate99.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema84.type, + parentSchema: schema84, + data, + }, + ]; + return false; + } + } + validate99.errors = vErrors; + return errors === 0; +} +exports.validateAvailabilityRequest = validate100; +const schema85 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': true, + 'x-name': 'AvailabilityRequest', + 'x-location': '#/components/schemas/availability_request', + 'x-schema-type': 'request', +}; +function validate100( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate100.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema85.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate100.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema85.items.properties.start.type, + parentSchema: schema85.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate100.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema85.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate100.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema85.items.properties.end.type, + parentSchema: schema85.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate100.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema85.items.type, + parentSchema: schema85.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate100.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema85.type, + parentSchema: schema85, + data, + }, + ]; + return false; + } + } + validate100.errors = vErrors; + return errors === 0; +} +exports.validateAvailabilityResponse = validate101; +const schema86 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': true, + 'x-name': 'AvailabilityResponse', + 'x-location': '#/components/schemas/availability_response', + 'x-schema-type': 'response', +}; +function validate101( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate101.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema86.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate101.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema86.items.properties.start.type, + parentSchema: schema86.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate101.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema86.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate101.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema86.items.properties.end.type, + parentSchema: schema86.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate101.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema86.items.type, + parentSchema: schema86.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate101.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema86.type, + parentSchema: schema86, + data, + }, + ]; + return false; + } + } + validate101.errors = vErrors; + return errors === 0; +} +exports.validateConcreteDeviceRequest = validate102; +const schema87 = { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConcreteDeviceRequest', + 'x-location': '#/components/schemas/device_concrete_request', + 'x-schema-type': 'request', +}; +function validate102( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate102.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema87.allOf[0].required, + parentSchema: schema87.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate102.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema87.allOf[0].properties.name.type, + parentSchema: schema87.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate102.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema87.allOf[0].properties.description.type, + parentSchema: schema87.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate102.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema87.allOf[0].properties.type.type, + parentSchema: schema87.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate102.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema87.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema87.allOf[0].properties.type.enum, + parentSchema: schema87.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate102.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema87.allOf[0].properties.isPublic.type, + parentSchema: schema87.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate102.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema87.allOf[0].properties.viewer.items.required, + parentSchema: schema87.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate102.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema87.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate102.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema87.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema87.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema87.allOf[0].properties.viewer.items.type, + parentSchema: schema87.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema87.allOf[0].properties.viewer.type, + parentSchema: schema87.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate102.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema87.allOf[0].properties.owner.items.required, + parentSchema: + schema87.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate102.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema87.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate102.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema87.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema87.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema87.allOf[0].properties.owner.items.type, + parentSchema: schema87.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema87.allOf[0].properties.owner.type, + parentSchema: schema87.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate102.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema87.allOf[0].type, + parentSchema: schema87.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('device' !== data10) { + validate102.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema87.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.experiment !== undefined) { + let data11 = data.experiment; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate102.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema87.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema87.allOf[1].properties.experiment.type, + parentSchema: schema87.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate102.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema87.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate102.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema87.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema87.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate102.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema87.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema87.allOf[1].properties.services.items.properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate102.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema87.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema87.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate102.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema87.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema87.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema87.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema87.allOf[1].properties.services.items.type, + parentSchema: schema87.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema87.allOf[1].properties.services.type, + parentSchema: schema87.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate102.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema87.allOf[1].type, + parentSchema: schema87.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate102.errors = vErrors; + return errors === 0; +} +exports.validateConcreteDeviceResponse = validate103; +const schema88 = { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConcreteDeviceResponse', + 'x-location': '#/components/schemas/device_concrete_response', + 'x-schema-type': 'response', +}; +function validate103( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate103.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema88.allOf[0].required, + parentSchema: schema88.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate103.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema88.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema88.allOf[0].properties.url.type, + parentSchema: schema88.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate103.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema88.allOf[0].properties.name.type, + parentSchema: schema88.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate103.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema88.allOf[0].properties.description.type, + parentSchema: schema88.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate103.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema88.allOf[0].properties.type.type, + parentSchema: schema88.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate103.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema88.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema88.allOf[0].properties.type.enum, + parentSchema: schema88.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate103.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema88.allOf[0].properties.isPublic.type, + parentSchema: schema88.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate103.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema88.allOf[0].properties.viewer.items.required, + parentSchema: + schema88.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate103.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema88.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema88.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema88.allOf[0].properties.viewer.items.type, + parentSchema: schema88.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema88.allOf[0].properties.viewer.type, + parentSchema: schema88.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate103.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema88.allOf[0].properties.owner.items.required, + parentSchema: + schema88.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate103.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema88.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema88.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema88.allOf[0].properties.owner.items.type, + parentSchema: + schema88.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema88.allOf[0].properties.owner.type, + parentSchema: schema88.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate103.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema88.allOf[0].type, + parentSchema: schema88.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('device' !== data11) { + validate103.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema88.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.connected !== undefined) { + let data12 = data.connected; + const _errs27 = errors; + if (typeof data12 !== 'boolean') { + validate103.errors = [ + { + instancePath: instancePath + '/connected', + schemaPath: '#/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema88.allOf[1].properties.connected.type, + parentSchema: schema88.allOf[1].properties.connected, + data: data12, + }, + ]; + return false; + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.announcedAvailability !== undefined) { + let data13 = data.announcedAvailability; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data13)) { + var valid7 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.start !== undefined) { + let data15 = data14.start; + const _errs33 = errors; + if (errors === _errs33) { + if (errors === _errs33) { + if (typeof data15 === 'string') { + if (!formats22.validate(data15)) { + validate103.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema88.allOf[1].properties.announcedAvailability + .items.properties.start, + data: data15, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[1].properties.announcedAvailability + .items.properties.start.type, + parentSchema: + schema88.allOf[1].properties.announcedAvailability + .items.properties.start, + data: data15, + }, + ]; + return false; + } + } + } + var valid8 = _errs33 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.end !== undefined) { + let data16 = data14.end; + const _errs35 = errors; + if (errors === _errs35) { + if (errors === _errs35) { + if (typeof data16 === 'string') { + if (!formats22.validate(data16)) { + validate103.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema88.allOf[1].properties + .announcedAvailability.items.properties.end, + data: data16, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[1].properties.announcedAvailability + .items.properties.end.type, + parentSchema: + schema88.allOf[1].properties.announcedAvailability + .items.properties.end, + data: data16, + }, + ]; + return false; + } + } + } + var valid8 = _errs35 === errors; + } else { + var valid8 = true; + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/announcedAvailability/' + i2, + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema88.allOf[1].properties.announcedAvailability.items + .type, + parentSchema: + schema88.allOf[1].properties.announcedAvailability.items, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + if (!valid7) { + break; + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/announcedAvailability', + schemaPath: '#/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema88.allOf[1].properties.announcedAvailability.type, + parentSchema: schema88.allOf[1].properties.announcedAvailability, + data: data13, + }, + ]; + return false; + } + } + var valid6 = _errs29 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.experiment !== undefined) { + let data17 = data.experiment; + const _errs37 = errors; + if (errors === _errs37) { + if (errors === _errs37) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + validate103.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema88.allOf[1].properties.experiment, + data: data17, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema88.allOf[1].properties.experiment.type, + parentSchema: schema88.allOf[1].properties.experiment, + data: data17, + }, + ]; + return false; + } + } + } + var valid6 = _errs37 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data18 = data.services; + const _errs39 = errors; + if (errors === _errs39) { + if (Array.isArray(data18)) { + var valid9 = true; + const len3 = data18.length; + for (let i3 = 0; i3 < len3; i3++) { + let data19 = data18[i3]; + const _errs41 = errors; + if (errors === _errs41) { + if ( + data19 && + typeof data19 == 'object' && + !Array.isArray(data19) + ) { + if (data19.serviceType !== undefined) { + let data20 = data19.serviceType; + const _errs44 = errors; + if (errors === _errs44) { + if (errors === _errs44) { + if (typeof data20 === 'string') { + if (!formats0(data20)) { + validate103.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema88.allOf[1].properties.services.items + .properties.serviceType, + data: data20, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema88.allOf[1].properties.services.items + .properties.serviceType, + data: data20, + }, + ]; + return false; + } + } + } + var valid10 = _errs44 === errors; + } else { + var valid10 = true; + } + if (valid10) { + if (data19.serviceId !== undefined) { + let data21 = data19.serviceId; + const _errs46 = errors; + if (typeof data21 !== 'string') { + validate103.errors = [ + { + instancePath: + instancePath + '/services/' + i3 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema88.allOf[1].properties.services.items + .properties.serviceId, + data: data21, + }, + ]; + return false; + } + var valid10 = _errs46 === errors; + } else { + var valid10 = true; + } + if (valid10) { + if (data19.serviceDirection !== undefined) { + let data22 = data19.serviceDirection; + const _errs48 = errors; + if (typeof data22 !== 'string') { + validate103.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema88.allOf[1].properties.services.items + .properties.serviceDirection, + data: data22, + }, + ]; + return false; + } + if ( + !( + data22 === 'consumer' || + data22 === 'producer' || + data22 === 'prosumer' + ) + ) { + validate103.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema88.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema88.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema88.allOf[1].properties.services.items + .properties.serviceDirection, + data: data22, + }, + ]; + return false; + } + var valid10 = _errs48 === errors; + } else { + var valid10 = true; + } + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/services/' + i3, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema88.allOf[1].properties.services.items.type, + parentSchema: schema88.allOf[1].properties.services.items, + data: data19, + }, + ]; + return false; + } + } + var valid9 = _errs41 === errors; + if (!valid9) { + break; + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema88.allOf[1].properties.services.type, + parentSchema: schema88.allOf[1].properties.services, + data: data18, + }, + ]; + return false; + } + } + var valid6 = _errs39 === errors; + } else { + var valid6 = true; + } + } + } + } + } + } else { + validate103.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema88.allOf[1].type, + parentSchema: schema88.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate103.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableBrowserDeviceRequest = validate104; +const schema89 = { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'InstantiableBrowserDeviceRequest', + 'x-location': '#/components/schemas/device_edge_instantiable_request', + 'x-schema-type': 'request', +}; +function validate104( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate104.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema89.allOf[0].required, + parentSchema: schema89.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate104.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema89.allOf[0].properties.name.type, + parentSchema: schema89.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate104.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema89.allOf[0].properties.description.type, + parentSchema: schema89.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate104.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema89.allOf[0].properties.type.type, + parentSchema: schema89.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate104.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema89.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema89.allOf[0].properties.type.enum, + parentSchema: schema89.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate104.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema89.allOf[0].properties.isPublic.type, + parentSchema: schema89.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate104.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema89.allOf[0].properties.viewer.items.required, + parentSchema: schema89.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate104.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema89.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate104.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema89.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema89.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema89.allOf[0].properties.viewer.items.type, + parentSchema: schema89.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema89.allOf[0].properties.viewer.type, + parentSchema: schema89.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate104.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema89.allOf[0].properties.owner.items.required, + parentSchema: + schema89.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate104.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema89.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate104.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema89.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema89.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema89.allOf[0].properties.owner.items.type, + parentSchema: schema89.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema89.allOf[0].properties.owner.type, + parentSchema: schema89.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate104.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema89.allOf[0].type, + parentSchema: schema89.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('edge instantiable' !== data10) { + validate104.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema89.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.codeUrl !== undefined) { + let data11 = data.codeUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate104.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema89.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema89.allOf[1].properties.codeUrl.type, + parentSchema: schema89.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate104.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema89.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate104.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema89.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema89.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate104.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema89.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema89.allOf[1].properties.services.items.properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate104.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema89.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema89.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate104.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema89.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema89.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema89.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema89.allOf[1].properties.services.items.type, + parentSchema: schema89.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema89.allOf[1].properties.services.type, + parentSchema: schema89.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate104.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema89.allOf[1].type, + parentSchema: schema89.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate104.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableBrowserDeviceResponse = validate105; +const schema90 = { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'InstantiableBrowserDeviceResponse', + 'x-location': '#/components/schemas/device_edge_instantiable_response', + 'x-schema-type': 'response', +}; +function validate105( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate105.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema90.allOf[0].required, + parentSchema: schema90.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate105.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema90.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema90.allOf[0].properties.url.type, + parentSchema: schema90.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate105.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema90.allOf[0].properties.name.type, + parentSchema: schema90.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate105.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema90.allOf[0].properties.description.type, + parentSchema: schema90.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate105.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema90.allOf[0].properties.type.type, + parentSchema: schema90.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate105.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema90.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema90.allOf[0].properties.type.enum, + parentSchema: schema90.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate105.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema90.allOf[0].properties.isPublic.type, + parentSchema: schema90.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate105.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema90.allOf[0].properties.viewer.items.required, + parentSchema: + schema90.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate105.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema90.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate105.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema90.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema90.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema90.allOf[0].properties.viewer.items.type, + parentSchema: schema90.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema90.allOf[0].properties.viewer.type, + parentSchema: schema90.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate105.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema90.allOf[0].properties.owner.items.required, + parentSchema: + schema90.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate105.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema90.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate105.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema90.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema90.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema90.allOf[0].properties.owner.items.type, + parentSchema: + schema90.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema90.allOf[0].properties.owner.type, + parentSchema: schema90.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate105.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema90.allOf[0].type, + parentSchema: schema90.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('edge instantiable' !== data11) { + validate105.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema90.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.codeUrl !== undefined) { + let data12 = data.codeUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + validate105.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema90.allOf[1].properties.codeUrl, + data: data12, + }, + ]; + return false; + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema90.allOf[1].properties.codeUrl.type, + parentSchema: schema90.allOf[1].properties.codeUrl, + data: data12, + }, + ]; + return false; + } + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data13)) { + var valid7 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + validate105.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema90.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } else { + validate105.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema90.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema90.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate105.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema90.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema90.allOf[1].properties.services.items.properties + .serviceId, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs38 = errors; + if (typeof data17 !== 'string') { + validate105.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema90.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema90.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + validate105.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema90.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema90.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema90.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + var valid8 = _errs38 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema90.allOf[1].properties.services.items.type, + parentSchema: schema90.allOf[1].properties.services.items, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + if (!valid7) { + break; + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema90.allOf[1].properties.services.type, + parentSchema: schema90.allOf[1].properties.services, + data: data13, + }, + ]; + return false; + } + } + var valid6 = _errs29 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate105.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema90.allOf[1].type, + parentSchema: schema90.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate105.errors = vErrors; + return errors === 0; +} +exports.validateDeviceReferenceRequest = validate106; +const schema91 = { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'DeviceReferenceRequest', + 'x-location': '#/components/schemas/device_reference_request', + 'x-schema-type': 'request', +}; +function validate106( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate106.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema91.required, + parentSchema: schema91, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate106.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema91.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate106.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema91.properties.url.type, + parentSchema: schema91.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate106.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema91.type, + parentSchema: schema91, + data, + }, + ]; + return false; + } + } + validate106.errors = vErrors; + return errors === 0; +} +exports.validateDeviceReferenceResponse = validate107; +const schema92 = { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'DeviceReferenceResponse', + 'x-location': '#/components/schemas/device_reference_response', + 'x-schema-type': 'response', +}; +function validate107( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate107.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema92.required, + parentSchema: schema92, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate107.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema92.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate107.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema92.properties.url.type, + parentSchema: schema92.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate107.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema92.type, + parentSchema: schema92, + data, + }, + ]; + return false; + } + } + validate107.errors = vErrors; + return errors === 0; +} +exports.validateDeviceGroupRequest = validate108; +const schema93 = { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceGroupRequest', + 'x-location': '#/components/schemas/device_group_request', + 'x-schema-type': 'request', +}; +function validate108( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate108.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema93.allOf[0].required, + parentSchema: schema93.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate108.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema93.allOf[0].properties.name.type, + parentSchema: schema93.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate108.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema93.allOf[0].properties.description.type, + parentSchema: schema93.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate108.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema93.allOf[0].properties.type.type, + parentSchema: schema93.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate108.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema93.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema93.allOf[0].properties.type.enum, + parentSchema: schema93.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate108.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema93.allOf[0].properties.isPublic.type, + parentSchema: schema93.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate108.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema93.allOf[0].properties.viewer.items.required, + parentSchema: schema93.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate108.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema93.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate108.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema93.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema93.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema93.allOf[0].properties.viewer.items.type, + parentSchema: schema93.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema93.allOf[0].properties.viewer.type, + parentSchema: schema93.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate108.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema93.allOf[0].properties.owner.items.required, + parentSchema: + schema93.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate108.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema93.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate108.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema93.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema93.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema93.allOf[0].properties.owner.items.type, + parentSchema: schema93.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema93.allOf[0].properties.owner.type, + parentSchema: schema93.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate108.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema93.allOf[0].type, + parentSchema: schema93.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.devices === undefined && (missing3 = 'devices')) { + validate108.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema93.allOf[1].required, + parentSchema: schema93.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('group' !== data10) { + validate108.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema93.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.devices !== undefined) { + let data11 = data.devices; + const _errs25 = errors; + if (errors === _errs25) { + if (Array.isArray(data11)) { + var valid7 = true; + const len2 = data11.length; + for (let i2 = 0; i2 < len2; i2++) { + let data12 = data11[i2]; + const _errs27 = errors; + if (errors === _errs27) { + if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { + let missing4; + if (data12.url === undefined && (missing4 = 'url')) { + validate108.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: schema93.allOf[1].properties.devices.items.required, + parentSchema: schema93.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } else { + if (data12.url !== undefined) { + let data13 = data12.url; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data13 === 'string') { + if (!formats0(data13)) { + validate108.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema93.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } else { + validate108.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema93.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema93.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } + } + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema93.allOf[1].properties.devices.items.type, + parentSchema: schema93.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } + } + var valid7 = _errs27 === errors; + if (!valid7) { + break; + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema93.allOf[1].properties.devices.type, + parentSchema: schema93.allOf[1].properties.devices, + data: data11, + }, + ]; + return false; + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate108.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema93.allOf[1].type, + parentSchema: schema93.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate108.errors = vErrors; + return errors === 0; +} +exports.validateDeviceGroupResponse = validate109; +const schema94 = { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceGroupResponse', + 'x-location': '#/components/schemas/device_group_response', + 'x-schema-type': 'response', +}; +function validate109( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate109.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema94.allOf[0].required, + parentSchema: schema94.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate109.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema94.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema94.allOf[0].properties.url.type, + parentSchema: schema94.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate109.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema94.allOf[0].properties.name.type, + parentSchema: schema94.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate109.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema94.allOf[0].properties.description.type, + parentSchema: schema94.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate109.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema94.allOf[0].properties.type.type, + parentSchema: schema94.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate109.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema94.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema94.allOf[0].properties.type.enum, + parentSchema: schema94.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate109.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema94.allOf[0].properties.isPublic.type, + parentSchema: schema94.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate109.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema94.allOf[0].properties.viewer.items.required, + parentSchema: + schema94.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate109.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema94.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate109.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema94.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema94.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema94.allOf[0].properties.viewer.items.type, + parentSchema: schema94.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema94.allOf[0].properties.viewer.type, + parentSchema: schema94.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate109.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema94.allOf[0].properties.owner.items.required, + parentSchema: + schema94.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate109.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema94.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate109.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema94.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema94.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema94.allOf[0].properties.owner.items.type, + parentSchema: + schema94.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema94.allOf[0].properties.owner.type, + parentSchema: schema94.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate109.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema94.allOf[0].type, + parentSchema: schema94.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.devices === undefined && (missing3 = 'devices')) { + validate109.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema94.allOf[1].required, + parentSchema: schema94.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('group' !== data11) { + validate109.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema94.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.devices !== undefined) { + let data12 = data.devices; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + let missing4; + if (data13.url === undefined && (missing4 = 'url')) { + validate109.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: schema94.allOf[1].properties.devices.items.required, + parentSchema: schema94.allOf[1].properties.devices.items, + data: data13, + }, + ]; + return false; + } else { + if (data13.url !== undefined) { + let data14 = data13.url; + const _errs31 = errors; + if (errors === _errs31) { + if (errors === _errs31) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate109.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema94.allOf[1].properties.devices.items + .properties.url, + data: data14, + }, + ]; + return false; + } + } else { + validate109.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema94.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema94.allOf[1].properties.devices.items + .properties.url, + data: data14, + }, + ]; + return false; + } + } + } + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema94.allOf[1].properties.devices.items.type, + parentSchema: schema94.allOf[1].properties.devices.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema94.allOf[1].properties.devices.type, + parentSchema: schema94.allOf[1].properties.devices, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate109.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema94.allOf[1].type, + parentSchema: schema94.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate109.errors = vErrors; + return errors === 0; +} +exports.validateDeviceRequest = validate110; +const schema95 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceRequest', + 'x-location': '#/components/schemas/device_request', + 'x-schema-type': 'request', +}; +function validate110( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema95.anyOf[0].allOf[0].required, + parentSchema: schema95.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema95.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema95.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema95.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema95.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema95.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema95.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema95.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema95.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema95.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema95.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema95.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema95.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[0].allOf[0].type, + parentSchema: schema95.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema95.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema95.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema95.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema95.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[0].allOf[1].type, + parentSchema: schema95.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema95.anyOf[1].allOf[0].required, + parentSchema: schema95.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema95.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema95.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema95.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema95.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema95.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema95.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema95.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[1].allOf[0].properties.viewer.items.type, + parentSchema: + schema95.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema95.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema95.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema95.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema95.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[1].allOf[0].type, + parentSchema: schema95.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema95.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema95.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema95.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema95.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema95.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema95.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[1].allOf[1].type, + parentSchema: schema95.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema95.anyOf[2].allOf[0].required, + parentSchema: schema95.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema95.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema95.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema95.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema95.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema95.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema95.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[2].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema95.anyOf[2].allOf[0].properties.viewer + .items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema95.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema95.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema95.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema95.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema95.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[2].allOf[0].type, + parentSchema: schema95.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema95.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema95.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema95.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema95.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema95.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema95.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[2].allOf[1].type, + parentSchema: schema95.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema95.anyOf[3].allOf[0].required, + parentSchema: schema95.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema95.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema95.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema95.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema95.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema95.anyOf[3].allOf[0].properties.viewer.items + .required, + parentSchema: + schema95.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema95.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema95.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema95.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema95.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema95.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema95.anyOf[3].allOf[0].properties.owner.items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[3].allOf[0].properties.owner.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[3].allOf[0].type, + parentSchema: schema95.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err101 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema95.anyOf[3].allOf[1].required, + parentSchema: schema95.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema95.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing13; + if (data63.url === undefined && (missing13 = 'url')) { + const err103 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema95.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema95.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema95.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema95.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema95.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err108 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[3].allOf[1].type, + parentSchema: schema95.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err109 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema95.anyOf, + parentSchema: schema95, + data, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate110.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate110.errors = vErrors; + return errors === 0; +} +exports.validateDeviceResponse = validate111; +const schema96 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceResponse', + 'x-location': '#/components/schemas/device_response', + 'x-schema-type': 'response', +}; +function validate111( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema96.anyOf[0].allOf[0].required, + parentSchema: schema96.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema96.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema96.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema96.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema96.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema96.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema96.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema96.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema96.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema96.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema96.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema96.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[0].allOf[0].type, + parentSchema: schema96.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema96.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema96.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema96.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[0].allOf[1].type, + parentSchema: schema96.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema96.anyOf[1].allOf[0].required, + parentSchema: schema96.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema96.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema96.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema96.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema96.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema96.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema96.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema96.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema96.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema96.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema96.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema96.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[1].allOf[0].type, + parentSchema: schema96.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema96.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema96.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema96.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema96.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema96.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema96.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[1].allOf[1].type, + parentSchema: schema96.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema96.anyOf[2].allOf[0].required, + parentSchema: schema96.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema96.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema96.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema96.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema96.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema96.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema96.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema96.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema96.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema96.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema96.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema96.anyOf[2].allOf[0].properties.owner.items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[2].allOf[0].type, + parentSchema: schema96.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema96.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema96.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema96.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema96.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema96.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[2].allOf[1].type, + parentSchema: schema96.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema96.anyOf[3].allOf[0].required, + parentSchema: schema96.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema96.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema96.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema96.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema96.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema96.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema96.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema96.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema96.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema96.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema96.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema96.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema96.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema96.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema96.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[3].allOf[0].type, + parentSchema: schema96.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema96.anyOf[3].allOf[1].required, + parentSchema: schema96.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema96.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema96.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema96.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema96.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema96.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema96.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[3].allOf[1].type, + parentSchema: schema96.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema96.anyOf, + parentSchema: schema96, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate111.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate111.errors = vErrors; + return errors === 0; +} +exports.validateCallbackRequest = validate112; +const schema97 = { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CallbackRequest', + 'x-location': '#/components/schemas/callback_request', + 'x-schema-type': 'request', +}; +function validate112( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate112.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema97.required, + parentSchema: schema97, + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate112.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema97.properties.callbackType.type, + parentSchema: schema97.properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate112.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema97.type, + parentSchema: schema97, + data, + }, + ]; + return false; + } + } + validate112.errors = vErrors; + return errors === 0; +} +exports.validateCallbackResponse = validate113; +const schema98 = { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CallbackResponse', + 'x-location': '#/components/schemas/callback_response', + 'x-schema-type': 'response', +}; +function validate113( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate113.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema98.required, + parentSchema: schema98, + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate113.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema98.properties.callbackType.type, + parentSchema: schema98.properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate113.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema98.type, + parentSchema: schema98, + data, + }, + ]; + return false; + } + } + validate113.errors = vErrors; + return errors === 0; +} +exports.validateEventCallbackRequest = validate114; +const schema99 = { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'EventCallbackRequest', + 'x-location': '#/components/schemas/event_callback_request', + 'x-schema-type': 'request', +}; +function validate114( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate114.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema99.allOf[0].required, + parentSchema: schema99.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate114.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema99.allOf[0].properties.callbackType.type, + parentSchema: schema99.allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate114.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema99.allOf[0].type, + parentSchema: schema99.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate114.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema99.allOf[1].required, + parentSchema: schema99.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs6 = errors; + if (typeof data1 !== 'string') { + validate114.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema99.allOf[1].properties.callbackType.type, + parentSchema: schema99.allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate114.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: schema99.allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema99.allOf[1].properties.callbackType.enum, + parentSchema: schema99.allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate114.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema99.allOf[1].properties.eventType.type, + parentSchema: schema99.allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate114.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema99.allOf[1].type, + parentSchema: schema99.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate114.errors = vErrors; + return errors === 0; +} +exports.validateEventCallbackResponse = validate115; +const schema100 = { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'EventCallbackResponse', + 'x-location': '#/components/schemas/event_callback_response', + 'x-schema-type': 'response', +}; +function validate115( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate115.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema100.allOf[0].required, + parentSchema: schema100.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate115.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema100.allOf[0].properties.callbackType.type, + parentSchema: schema100.allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate115.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema100.allOf[0].type, + parentSchema: schema100.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate115.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema100.allOf[1].required, + parentSchema: schema100.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs6 = errors; + if (typeof data1 !== 'string') { + validate115.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema100.allOf[1].properties.callbackType.type, + parentSchema: schema100.allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate115.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: schema100.allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema100.allOf[1].properties.callbackType.enum, + parentSchema: schema100.allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate115.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema100.allOf[1].properties.eventType.type, + parentSchema: schema100.allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate115.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema100.allOf[1].type, + parentSchema: schema100.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate115.errors = vErrors; + return errors === 0; +} +exports.validateDeviceChangedEventCallbackRequest = validate116; +const schema101 = { + title: 'Device Changed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['device-changed'] }, + device: { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'device'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceChangedEventCallbackRequest', + 'x-location': '#/components/schemas/device_changed_request', + 'x-schema-type': 'request', +}; +function validate116( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema101.allOf[0].allOf[0].required, + parentSchema: schema101.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate116.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema101.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema101.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[0].allOf[0].type, + parentSchema: schema101.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema101.allOf[0].allOf[1].required, + parentSchema: schema101.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate116.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema101.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema101.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate116.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema101.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema101.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate116.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema101.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema101.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[0].allOf[1].type, + parentSchema: schema101.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.device === undefined && (missing2 = 'device')) + ) { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema101.allOf[1].required, + parentSchema: schema101.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate116.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema101.allOf[1].properties.eventType.type, + parentSchema: schema101.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'device-changed')) { + validate116.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema101.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema101.allOf[1].properties.eventType.enum, + parentSchema: schema101.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.device !== undefined) { + let data4 = data.device; + const _errs15 = errors; + const _errs16 = errors; + let valid5 = false; + const _errs17 = errors; + const _errs18 = errors; + if (errors === _errs18) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.type === undefined && (missing3 = 'type')) || + (data4.name === undefined && (missing3 = 'name')) || + (data4.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err0 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0].required, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data4.name !== undefined) { + let data5 = data4.name; + const _errs20 = errors; + if (typeof data5 !== 'string') { + const err1 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.name.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.name, + data: data5, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid7 = _errs20 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.description !== undefined) { + let data6 = data4.description; + const _errs22 = errors; + if (typeof data6 !== 'string') { + const err2 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.description.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.description, + data: data6, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid7 = _errs22 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.type !== undefined) { + let data7 = data4.type; + const _errs24 = errors; + if (typeof data7 !== 'string') { + const err3 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type, + data: data7, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data7 === 'device' || + data7 === 'group' || + data7 === 'edge instantiable' || + data7 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.enum, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type, + data: data7, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid7 = _errs24 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.isPublic !== undefined) { + let data8 = data4.isPublic; + const _errs26 = errors; + if (typeof data8 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.isPublic.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.isPublic, + data: data8, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.viewer !== undefined) { + let data9 = data4.viewer; + const _errs28 = errors; + if (errors === _errs28) { + if (Array.isArray(data9)) { + var valid8 = true; + const len0 = data9.length; + for (let i0 = 0; i0 < len0; i0++) { + let data10 = data9[i0]; + const _errs30 = errors; + if (errors === _errs30) { + if ( + data10 && + typeof data10 == 'object' && + !Array.isArray(data10) + ) { + let missing4; + if ( + data10.url === undefined && + (missing4 = 'url') + ) { + const err6 = { + instancePath: + instancePath + '/device/viewer/' + i0, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + + missing4 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer + .items, + data: data10, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data10.url !== undefined) { + let data11 = data10.url; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err7 = { + instancePath: + instancePath + + '/device/viewer/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.viewer.items + .properties.url, + data: data11, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + + '/device/viewer/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties + .viewer.items.properties.url, + data: data11, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: + instancePath + '/device/viewer/' + i0, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer.items.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer.items, + data: data10, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid8 = _errs30 === errors; + if (!valid8) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer, + data: data9, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.owner !== undefined) { + let data12 = data4.owner; + const _errs34 = errors; + if (errors === _errs34) { + if (Array.isArray(data12)) { + var valid10 = true; + const len1 = data12.length; + for (let i1 = 0; i1 < len1; i1++) { + let data13 = data12[i1]; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == 'object' && + !Array.isArray(data13) + ) { + let missing5; + if ( + data13.url === undefined && + (missing5 = 'url') + ) { + const err11 = { + instancePath: + instancePath + '/device/owner/' + i1, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data13.url !== undefined) { + let data14 = data13.url; + const _errs38 = errors; + if (errors === _errs38) { + if (errors === _errs38) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err12 = { + instancePath: + instancePath + + '/device/owner/' + + i1 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url, + data: data14, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + + '/device/owner/' + + i1 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url, + data: data14, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: + instancePath + '/device/owner/' + i1, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid10 = _errs36 === errors; + if (!valid10) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.owner.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.owner, + data: data12, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid7 = _errs34 === errors; + } else { + var valid7 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[1].properties.device.anyOf[0].allOf[0].type, + parentSchema: schema101.allOf[1].properties.device.anyOf[0].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid6 = _errs18 === errors; + if (valid6) { + const _errs40 = errors; + if (errors === _errs40) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data15 = data4.type; + const _errs42 = errors; + if ('cloud instantiable' !== data15) { + const err17 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.type, + data: data15, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid12 = _errs42 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data4.instantiateUrl !== undefined) { + let data16 = data4.instantiateUrl; + const _errs43 = errors; + if (errors === _errs43) { + if (errors === _errs43) { + if (typeof data16 === 'string') { + if (!formats0(data16)) { + const err18 = { + instancePath: instancePath + '/device/instantiateUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl, + data: data16, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/device/instantiateUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl, + data: data16, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid12 = _errs43 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data4.services !== undefined) { + let data17 = data4.services; + const _errs45 = errors; + if (errors === _errs45) { + if (Array.isArray(data17)) { + var valid13 = true; + const len2 = data17.length; + for (let i2 = 0; i2 < len2; i2++) { + let data18 = data17[i2]; + const _errs47 = errors; + if (errors === _errs47) { + if ( + data18 && + typeof data18 == 'object' && + !Array.isArray(data18) + ) { + if (data18.serviceType !== undefined) { + let data19 = data18.serviceType; + const _errs50 = errors; + if (errors === _errs50) { + if (errors === _errs50) { + if (typeof data19 === 'string') { + if (!formats0(data19)) { + const err20 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data19, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data19, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid14 = _errs50 === errors; + } else { + var valid14 = true; + } + if (valid14) { + if (data18.serviceId !== undefined) { + let data20 = data18.serviceId; + const _errs52 = errors; + if (typeof data20 !== 'string') { + const err22 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceId, + data: data20, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid14 = _errs52 === errors; + } else { + var valid14 = true; + } + if (valid14) { + if (data18.serviceDirection !== undefined) { + let data21 = data18.serviceDirection; + const _errs54 = errors; + if (typeof data21 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection, + data: data21, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data21 === 'consumer' || + data21 === 'producer' || + data21 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection, + data: data21, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid14 = _errs54 === errors; + } else { + var valid14 = true; + } + } + } + } else { + const err25 = { + instancePath: + instancePath + '/device/services/' + i2, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items, + data: data18, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid13 = _errs47 === errors; + if (!valid13) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.services.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.services, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid12 = _errs45 === errors; + } else { + var valid12 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[1].properties.device.anyOf[0].allOf[1].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid6 = _errs40 === errors; + } + var _valid0 = _errs17 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs56 = errors; + const _errs57 = errors; + if (errors === _errs57) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing6; + if ( + (data4.type === undefined && (missing6 = 'type')) || + (data4.name === undefined && (missing6 = 'name')) || + (data4.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err28 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0].required, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data4.name !== undefined) { + let data22 = data4.name; + const _errs59 = errors; + if (typeof data22 !== 'string') { + const err29 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.name.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.name, + data: data22, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid16 = _errs59 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.description !== undefined) { + let data23 = data4.description; + const _errs61 = errors; + if (typeof data23 !== 'string') { + const err30 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.description.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.description, + data: data23, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid16 = _errs61 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.type !== undefined) { + let data24 = data4.type; + const _errs63 = errors; + if (typeof data24 !== 'string') { + const err31 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type, + data: data24, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data24 === 'device' || + data24 === 'group' || + data24 === 'edge instantiable' || + data24 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.enum, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type, + data: data24, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid16 = _errs63 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.isPublic !== undefined) { + let data25 = data4.isPublic; + const _errs65 = errors; + if (typeof data25 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.isPublic.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.isPublic, + data: data25, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.viewer !== undefined) { + let data26 = data4.viewer; + const _errs67 = errors; + if (errors === _errs67) { + if (Array.isArray(data26)) { + var valid17 = true; + const len3 = data26.length; + for (let i3 = 0; i3 < len3; i3++) { + let data27 = data26[i3]; + const _errs69 = errors; + if (errors === _errs69) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing7; + if ( + data27.url === undefined && + (missing7 = 'url') + ) { + const err34 = { + instancePath: + instancePath + '/device/viewer/' + i3, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + + missing7 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs71 = errors; + if (errors === _errs71) { + if (errors === _errs71) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err35 = { + instancePath: + instancePath + + '/device/viewer/' + + i3 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + + '/device/viewer/' + + i3 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: + instancePath + '/device/viewer/' + i3, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid17 = _errs69 === errors; + if (!valid17) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.viewer.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.viewer, + data: data26, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid16 = _errs67 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.owner !== undefined) { + let data29 = data4.owner; + const _errs73 = errors; + if (errors === _errs73) { + if (Array.isArray(data29)) { + var valid19 = true; + const len4 = data29.length; + for (let i4 = 0; i4 < len4; i4++) { + let data30 = data29[i4]; + const _errs75 = errors; + if (errors === _errs75) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + let missing8; + if ( + data30.url === undefined && + (missing8 = 'url') + ) { + const err39 = { + instancePath: + instancePath + '/device/owner/' + i4, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data30.url !== undefined) { + let data31 = data30.url; + const _errs77 = errors; + if (errors === _errs77) { + if (errors === _errs77) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err40 = { + instancePath: + instancePath + + '/device/owner/' + + i4 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url, + data: data31, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + + '/device/owner/' + + i4 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url, + data: data31, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: + instancePath + '/device/owner/' + i4, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid19 = _errs75 === errors; + if (!valid19) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.owner.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.owner, + data: data29, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid16 = _errs73 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[1].properties.device.anyOf[1].allOf[0].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid15 = _errs57 === errors; + if (valid15) { + const _errs79 = errors; + if (errors === _errs79) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data32 = data4.type; + const _errs81 = errors; + if ('device' !== data32) { + const err45 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.type, + data: data32, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid21 = _errs81 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.experiment !== undefined) { + let data33 = data4.experiment; + const _errs82 = errors; + if (errors === _errs82) { + if (errors === _errs82) { + if (typeof data33 === 'string') { + if (!formats0(data33)) { + const err46 = { + instancePath: instancePath + '/device/experiment', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.experiment, + data: data33, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/device/experiment', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.experiment.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.experiment, + data: data33, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid21 = _errs82 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.services !== undefined) { + let data34 = data4.services; + const _errs84 = errors; + if (errors === _errs84) { + if (Array.isArray(data34)) { + var valid22 = true; + const len5 = data34.length; + for (let i5 = 0; i5 < len5; i5++) { + let data35 = data34[i5]; + const _errs86 = errors; + if (errors === _errs86) { + if ( + data35 && + typeof data35 == 'object' && + !Array.isArray(data35) + ) { + if (data35.serviceType !== undefined) { + let data36 = data35.serviceType; + const _errs89 = errors; + if (errors === _errs89) { + if (errors === _errs89) { + if (typeof data36 === 'string') { + if (!formats0(data36)) { + const err48 = { + instancePath: + instancePath + + '/device/services/' + + i5 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceType, + data: data36, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + + '/device/services/' + + i5 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data36, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid23 = _errs89 === errors; + } else { + var valid23 = true; + } + if (valid23) { + if (data35.serviceId !== undefined) { + let data37 = data35.serviceId; + const _errs91 = errors; + if (typeof data37 !== 'string') { + const err50 = { + instancePath: + instancePath + + '/device/services/' + + i5 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data37, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid23 = _errs91 === errors; + } else { + var valid23 = true; + } + if (valid23) { + if (data35.serviceDirection !== undefined) { + let data38 = data35.serviceDirection; + const _errs93 = errors; + if (typeof data38 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/device/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection + .type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data38, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data38 === 'consumer' || + data38 === 'producer' || + data38 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/device/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection + .enum, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data38, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid23 = _errs93 === errors; + } else { + var valid23 = true; + } + } + } + } else { + const err53 = { + instancePath: + instancePath + '/device/services/' + i5, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services.items.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services.items, + data: data35, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid22 = _errs86 === errors; + if (!valid22) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.services.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.services, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid21 = _errs84 === errors; + } else { + var valid21 = true; + } + } + } + } else { + const err55 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid15 = _errs79 === errors; + } + var _valid0 = _errs56 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs95 = errors; + const _errs96 = errors; + if (errors === _errs96) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing9; + if ( + (data4.type === undefined && (missing9 = 'type')) || + (data4.name === undefined && (missing9 = 'name')) || + (data4.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err56 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .required, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data4.name !== undefined) { + let data39 = data4.name; + const _errs98 = errors; + if (typeof data39 !== 'string') { + const err57 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.name.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.name, + data: data39, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid25 = _errs98 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data4.description !== undefined) { + let data40 = data4.description; + const _errs100 = errors; + if (typeof data40 !== 'string') { + const err58 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.description.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.description, + data: data40, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid25 = _errs100 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data4.type !== undefined) { + let data41 = data4.type; + const _errs102 = errors; + if (typeof data41 !== 'string') { + const err59 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.type.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.type, + data: data41, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data41 === 'device' || + data41 === 'group' || + data41 === 'edge instantiable' || + data41 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.type.enum, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.type, + data: data41, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid25 = _errs102 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data4.isPublic !== undefined) { + let data42 = data4.isPublic; + const _errs104 = errors; + if (typeof data42 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.isPublic.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.isPublic, + data: data42, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data4.viewer !== undefined) { + let data43 = data4.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data43)) { + var valid26 = true; + const len6 = data43.length; + for (let i6 = 0; i6 < len6; i6++) { + let data44 = data43[i6]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data44 && + typeof data44 == 'object' && + !Array.isArray(data44) + ) { + let missing10; + if ( + data44.url === undefined && + (missing10 = 'url') + ) { + const err62 = { + instancePath: + instancePath + '/device/viewer/' + i6, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items, + data: data44, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data44.url !== undefined) { + let data45 = data44.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err63 = { + instancePath: + instancePath + + '/device/viewer/' + + i6 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url, + data: data45, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + + '/device/viewer/' + + i6 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url, + data: data45, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: + instancePath + '/device/viewer/' + i6, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items, + data: data44, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid26 = _errs108 === errors; + if (!valid26) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.viewer.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.viewer, + data: data43, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid25 = _errs106 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data4.owner !== undefined) { + let data46 = data4.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data46)) { + var valid28 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing11; + if ( + data47.url === undefined && + (missing11 = 'url') + ) { + const err67 = { + instancePath: + instancePath + '/device/owner/' + i7, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err68 = { + instancePath: + instancePath + + '/device/owner/' + + i7 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1] + .properties.device + .anyOf[2].allOf[0] + .properties.owner.items + .properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + + '/device/owner/' + + i7 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.owner.items + .properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: + instancePath + '/device/owner/' + i7, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid28 = _errs114 === errors; + if (!valid28) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.owner.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.owner, + data: data46, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid25 = _errs112 === errors; + } else { + var valid25 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid24 = _errs96 === errors; + if (valid24) { + const _errs118 = errors; + if (errors === _errs118) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data49 = data4.type; + const _errs120 = errors; + if ('edge instantiable' !== data49) { + const err73 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[1] + .properties.type, + data: data49, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid30 = _errs120 === errors; + } else { + var valid30 = true; + } + if (valid30) { + if (data4.codeUrl !== undefined) { + let data50 = data4.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data50 === 'string') { + if (!formats0(data50)) { + const err74 = { + instancePath: instancePath + '/device/codeUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl, + data: data50, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/device/codeUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl, + data: data50, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid30 = _errs121 === errors; + } else { + var valid30 = true; + } + if (valid30) { + if (data4.services !== undefined) { + let data51 = data4.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data51)) { + var valid31 = true; + const len8 = data51.length; + for (let i8 = 0; i8 < len8; i8++) { + let data52 = data51[i8]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data52 && + typeof data52 == 'object' && + !Array.isArray(data52) + ) { + if (data52.serviceType !== undefined) { + let data53 = data52.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err76 = { + instancePath: + instancePath + + '/device/services/' + + i8 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType, + data: data53, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + + '/device/services/' + + i8 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType, + data: data53, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid32 = _errs128 === errors; + } else { + var valid32 = true; + } + if (valid32) { + if (data52.serviceId !== undefined) { + let data54 = data52.serviceId; + const _errs130 = errors; + if (typeof data54 !== 'string') { + const err78 = { + instancePath: + instancePath + + '/device/services/' + + i8 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data54, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid32 = _errs130 === errors; + } else { + var valid32 = true; + } + if (valid32) { + if (data52.serviceDirection !== undefined) { + let data55 = data52.serviceDirection; + const _errs132 = errors; + if (typeof data55 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/device/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data55, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data55 === 'consumer' || + data55 === 'producer' || + data55 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/device/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data55, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid32 = _errs132 === errors; + } else { + var valid32 = true; + } + } + } + } else { + const err81 = { + instancePath: + instancePath + '/device/services/' + i8, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.items.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.items, + data: data52, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid31 = _errs125 === errors; + if (!valid31) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid30 = _errs123 === errors; + } else { + var valid30 = true; + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[1].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid24 = _errs118 === errors; + } + var _valid0 = _errs95 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing12; + if ( + (data4.type === undefined && (missing12 = 'type')) || + (data4.name === undefined && (missing12 = 'name')) || + (data4.isPublic === undefined && (missing12 = 'isPublic')) + ) { + const err84 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0] + .required, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data4.name !== undefined) { + let data56 = data4.name; + const _errs137 = errors; + if (typeof data56 !== 'string') { + const err85 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.name.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.name, + data: data56, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid34 = _errs137 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data4.description !== undefined) { + let data57 = data4.description; + const _errs139 = errors; + if (typeof data57 !== 'string') { + const err86 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.description.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.description, + data: data57, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid34 = _errs139 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data4.type !== undefined) { + let data58 = data4.type; + const _errs141 = errors; + if (typeof data58 !== 'string') { + const err87 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type, + data: data58, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data58 === 'device' || + data58 === 'group' || + data58 === 'edge instantiable' || + data58 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.enum, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type, + data: data58, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid34 = _errs141 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data4.isPublic !== undefined) { + let data59 = data4.isPublic; + const _errs143 = errors; + if (typeof data59 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.isPublic.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.isPublic, + data: data59, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data4.viewer !== undefined) { + let data60 = data4.viewer; + const _errs145 = errors; + if (errors === _errs145) { + if (Array.isArray(data60)) { + var valid35 = true; + const len9 = data60.length; + for (let i9 = 0; i9 < len9; i9++) { + let data61 = data60[i9]; + const _errs147 = errors; + if (errors === _errs147) { + if ( + data61 && + typeof data61 == 'object' && + !Array.isArray(data61) + ) { + let missing13; + if ( + data61.url === undefined && + (missing13 = 'url') + ) { + const err90 = { + instancePath: + instancePath + '/device/viewer/' + i9, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + + missing13 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items, + data: data61, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data61.url !== undefined) { + let data62 = data61.url; + const _errs149 = errors; + if (errors === _errs149) { + if (errors === _errs149) { + if (typeof data62 === 'string') { + if (!formats0(data62)) { + const err91 = { + instancePath: + instancePath + + '/device/viewer/' + + i9 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.viewer.items + .properties.url, + data: data62, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + + '/device/viewer/' + + i9 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.viewer.items + .properties.url, + data: data62, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: + instancePath + '/device/viewer/' + i9, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items, + data: data61, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid35 = _errs147 === errors; + if (!valid35) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.viewer.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.viewer, + data: data60, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid34 = _errs145 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data4.owner !== undefined) { + let data63 = data4.owner; + const _errs151 = errors; + if (errors === _errs151) { + if (Array.isArray(data63)) { + var valid37 = true; + const len10 = data63.length; + for (let i10 = 0; i10 < len10; i10++) { + let data64 = data63[i10]; + const _errs153 = errors; + if (errors === _errs153) { + if ( + data64 && + typeof data64 == 'object' && + !Array.isArray(data64) + ) { + let missing14; + if ( + data64.url === undefined && + (missing14 = 'url') + ) { + const err95 = { + instancePath: + instancePath + + '/device/owner/' + + i10, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { + missingProperty: missing14, + }, + message: + "must have required property '" + + missing14 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .owner.items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .owner.items, + data: data64, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data64.url !== undefined) { + let data65 = data64.url; + const _errs155 = errors; + if (errors === _errs155) { + if (errors === _errs155) { + if (typeof data65 === 'string') { + if (!formats0(data65)) { + const err96 = { + instancePath: + instancePath + + '/device/owner/' + + i10 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url, + data: data65, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + + '/device/owner/' + + i10 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema101.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url, + data: data65, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: + instancePath + '/device/owner/' + i10, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner + .items, + data: data64, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid37 = _errs153 === errors; + if (!valid37) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner, + data: data63, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid34 = _errs151 === errors; + } else { + var valid34 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid33 = _errs135 === errors; + if (valid33) { + const _errs157 = errors; + if (errors === _errs157) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing15; + if (data4.devices === undefined && (missing15 = 'devices')) { + const err101 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing15 }, + message: "must have required property '" + missing15 + "'", + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[1] + .required, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data4.type !== undefined) { + let data66 = data4.type; + const _errs159 = errors; + if ('group' !== data66) { + const err102 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[1] + .properties.type, + data: data66, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid39 = _errs159 === errors; + } else { + var valid39 = true; + } + if (valid39) { + if (data4.devices !== undefined) { + let data67 = data4.devices; + const _errs160 = errors; + if (errors === _errs160) { + if (Array.isArray(data67)) { + var valid40 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs162 = errors; + if (errors === _errs162) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing16; + if ( + data68.url === undefined && + (missing16 = 'url') + ) { + const err103 = { + instancePath: + instancePath + '/device/devices/' + i11, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing16 }, + message: + "must have required property '" + + missing16 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs164 = errors; + if (errors === _errs164) { + if (errors === _errs164) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err104 = { + instancePath: + instancePath + + '/device/devices/' + + i11 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + + '/device/devices/' + + i11 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: + instancePath + '/device/devices/' + i11, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid40 = _errs162 === errors; + if (!valid40) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/device/devices', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices, + data: data67, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid39 = _errs160 === errors; + } else { + var valid39 = true; + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[1].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid33 = _errs157 === errors; + } + var _valid0 = _errs134 === errors; + valid5 = valid5 || _valid0; + } + } + } + if (!valid5) { + const err109 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema101.allOf[1].properties.device.anyOf, + parentSchema: schema101.allOf[1].properties.device, + data: data4, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate116.errors = vErrors; + return false; + } else { + errors = _errs16; + if (vErrors !== null) { + if (_errs16) { + vErrors.length = _errs16; + } else { + vErrors = null; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[1].type, + parentSchema: schema101.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate116.errors = vErrors; + return errors === 0; +} +exports.validateDeviceChangedEventCallbackResponse = validate117; +const schema102 = { + title: 'Device Changed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['device-changed'] }, + device: { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'device'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceChangedEventCallbackResponse', + 'x-location': '#/components/schemas/device_changed_response', + 'x-schema-type': 'response', +}; +function validate117( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema102.allOf[0].allOf[0].required, + parentSchema: schema102.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate117.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema102.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema102.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[0].allOf[0].type, + parentSchema: schema102.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema102.allOf[0].allOf[1].required, + parentSchema: schema102.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate117.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema102.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema102.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate117.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema102.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema102.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate117.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema102.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema102.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[0].allOf[1].type, + parentSchema: schema102.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.device === undefined && (missing2 = 'device')) + ) { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema102.allOf[1].required, + parentSchema: schema102.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate117.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema102.allOf[1].properties.eventType.type, + parentSchema: schema102.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'device-changed')) { + validate117.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema102.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema102.allOf[1].properties.eventType.enum, + parentSchema: schema102.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.device !== undefined) { + let data4 = data.device; + const _errs15 = errors; + const _errs16 = errors; + let valid5 = false; + const _errs17 = errors; + const _errs18 = errors; + if (errors === _errs18) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.url === undefined && (missing3 = 'url')) || + (data4.type === undefined && (missing3 = 'type')) || + (data4.name === undefined && (missing3 = 'name')) || + (data4.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err0 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0].required, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + const err1 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.url, + data: data5, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.url.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.url, + data: data5, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid7 = _errs20 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.name !== undefined) { + let data6 = data4.name; + const _errs22 = errors; + if (typeof data6 !== 'string') { + const err3 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.name.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.name, + data: data6, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid7 = _errs22 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.description !== undefined) { + let data7 = data4.description; + const _errs24 = errors; + if (typeof data7 !== 'string') { + const err4 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.description.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.description, + data: data7, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid7 = _errs24 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.type !== undefined) { + let data8 = data4.type; + const _errs26 = errors; + if (typeof data8 !== 'string') { + const err5 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type, + data: data8, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data8 === 'device' || + data8 === 'group' || + data8 === 'edge instantiable' || + data8 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.enum, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type, + data: data8, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.isPublic !== undefined) { + let data9 = data4.isPublic; + const _errs28 = errors; + if (typeof data9 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.isPublic.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.isPublic, + data: data9, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.viewer !== undefined) { + let data10 = data4.viewer; + const _errs30 = errors; + if (errors === _errs30) { + if (Array.isArray(data10)) { + var valid8 = true; + const len0 = data10.length; + for (let i0 = 0; i0 < len0; i0++) { + let data11 = data10[i0]; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + let missing4; + if ( + data11.url === undefined && + (missing4 = 'url') + ) { + const err8 = { + instancePath: + instancePath + '/device/viewer/' + i0, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + + missing4 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer + .items, + data: data11, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data11.url !== undefined) { + let data12 = data11.url; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err9 = { + instancePath: + instancePath + + '/device/viewer/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.viewer.items + .properties.url, + data: data12, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + + '/device/viewer/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.viewer.items + .properties.url, + data: data12, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: + instancePath + '/device/viewer/' + i0, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer.items + .type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer + .items, + data: data11, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid8 = _errs32 === errors; + if (!valid8) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer, + data: data10, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid7 = _errs30 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.owner !== undefined) { + let data13 = data4.owner; + const _errs36 = errors; + if (errors === _errs36) { + if (Array.isArray(data13)) { + var valid10 = true; + const len1 = data13.length; + for (let i1 = 0; i1 < len1; i1++) { + let data14 = data13[i1]; + const _errs38 = errors; + if (errors === _errs38) { + if ( + data14 && + typeof data14 == 'object' && + !Array.isArray(data14) + ) { + let missing5; + if ( + data14.url === undefined && + (missing5 = 'url') + ) { + const err13 = { + instancePath: + instancePath + '/device/owner/' + i1, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data14.url !== undefined) { + let data15 = data14.url; + const _errs40 = errors; + if (errors === _errs40) { + if (errors === _errs40) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err14 = { + instancePath: + instancePath + + '/device/owner/' + + i1 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url, + data: data15, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + + '/device/owner/' + + i1 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url, + data: data15, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: + instancePath + '/device/owner/' + i1, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid10 = _errs38 === errors; + if (!valid10) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.owner.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.owner, + data: data13, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid7 = _errs36 === errors; + } else { + var valid7 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[1].properties.device.anyOf[0].allOf[0].type, + parentSchema: schema102.allOf[1].properties.device.anyOf[0].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid6 = _errs18 === errors; + if (valid6) { + const _errs42 = errors; + if (errors === _errs42) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data16 = data4.type; + const _errs44 = errors; + if ('cloud instantiable' !== data16) { + const err19 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.type, + data: data16, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid12 = _errs44 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data4.instantiateUrl !== undefined) { + let data17 = data4.instantiateUrl; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + const err20 = { + instancePath: instancePath + '/device/instantiateUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/device/instantiateUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid12 = _errs45 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data4.services !== undefined) { + let data18 = data4.services; + const _errs47 = errors; + if (errors === _errs47) { + if (Array.isArray(data18)) { + var valid13 = true; + const len2 = data18.length; + for (let i2 = 0; i2 < len2; i2++) { + let data19 = data18[i2]; + const _errs49 = errors; + if (errors === _errs49) { + if ( + data19 && + typeof data19 == 'object' && + !Array.isArray(data19) + ) { + if (data19.serviceType !== undefined) { + let data20 = data19.serviceType; + const _errs52 = errors; + if (errors === _errs52) { + if (errors === _errs52) { + if (typeof data20 === 'string') { + if (!formats0(data20)) { + const err22 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid14 = _errs52 === errors; + } else { + var valid14 = true; + } + if (valid14) { + if (data19.serviceId !== undefined) { + let data21 = data19.serviceId; + const _errs54 = errors; + if (typeof data21 !== 'string') { + const err24 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceId, + data: data21, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid14 = _errs54 === errors; + } else { + var valid14 = true; + } + if (valid14) { + if (data19.serviceDirection !== undefined) { + let data22 = data19.serviceDirection; + const _errs56 = errors; + if (typeof data22 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection, + data: data22, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data22 === 'consumer' || + data22 === 'producer' || + data22 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection, + data: data22, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid14 = _errs56 === errors; + } else { + var valid14 = true; + } + } + } + } else { + const err27 = { + instancePath: + instancePath + '/device/services/' + i2, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items, + data: data19, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid13 = _errs49 === errors; + if (!valid13) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.services.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.services, + data: data18, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid12 = _errs47 === errors; + } else { + var valid12 = true; + } + } + } + } else { + const err29 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[1].properties.device.anyOf[0].allOf[1].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid6 = _errs42 === errors; + } + var _valid0 = _errs17 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs58 = errors; + const _errs59 = errors; + if (errors === _errs59) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing6; + if ( + (data4.url === undefined && (missing6 = 'url')) || + (data4.type === undefined && (missing6 = 'type')) || + (data4.name === undefined && (missing6 = 'name')) || + (data4.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err30 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0].required, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data4.url !== undefined) { + let data23 = data4.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err31 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.url.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid16 = _errs61 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.name !== undefined) { + let data24 = data4.name; + const _errs63 = errors; + if (typeof data24 !== 'string') { + const err33 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.name.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.name, + data: data24, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid16 = _errs63 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.description !== undefined) { + let data25 = data4.description; + const _errs65 = errors; + if (typeof data25 !== 'string') { + const err34 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.description.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.description, + data: data25, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.type !== undefined) { + let data26 = data4.type; + const _errs67 = errors; + if (typeof data26 !== 'string') { + const err35 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type, + data: data26, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data26 === 'device' || + data26 === 'group' || + data26 === 'edge instantiable' || + data26 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.enum, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type, + data: data26, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid16 = _errs67 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.isPublic !== undefined) { + let data27 = data4.isPublic; + const _errs69 = errors; + if (typeof data27 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.isPublic.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.isPublic, + data: data27, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.viewer !== undefined) { + let data28 = data4.viewer; + const _errs71 = errors; + if (errors === _errs71) { + if (Array.isArray(data28)) { + var valid17 = true; + const len3 = data28.length; + for (let i3 = 0; i3 < len3; i3++) { + let data29 = data28[i3]; + const _errs73 = errors; + if (errors === _errs73) { + if ( + data29 && + typeof data29 == 'object' && + !Array.isArray(data29) + ) { + let missing7; + if ( + data29.url === undefined && + (missing7 = 'url') + ) { + const err38 = { + instancePath: + instancePath + '/device/viewer/' + i3, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + + missing7 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items, + data: data29, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data29.url !== undefined) { + let data30 = data29.url; + const _errs75 = errors; + if (errors === _errs75) { + if (errors === _errs75) { + if (typeof data30 === 'string') { + if (!formats0(data30)) { + const err39 = { + instancePath: + instancePath + + '/device/viewer/' + + i3 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url, + data: data30, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + + '/device/viewer/' + + i3 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url, + data: data30, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: + instancePath + '/device/viewer/' + i3, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items, + data: data29, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid17 = _errs73 === errors; + if (!valid17) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.viewer.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.viewer, + data: data28, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid16 = _errs71 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.owner !== undefined) { + let data31 = data4.owner; + const _errs77 = errors; + if (errors === _errs77) { + if (Array.isArray(data31)) { + var valid19 = true; + const len4 = data31.length; + for (let i4 = 0; i4 < len4; i4++) { + let data32 = data31[i4]; + const _errs79 = errors; + if (errors === _errs79) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + let missing8; + if ( + data32.url === undefined && + (missing8 = 'url') + ) { + const err43 = { + instancePath: + instancePath + '/device/owner/' + i4, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data32.url !== undefined) { + let data33 = data32.url; + const _errs81 = errors; + if (errors === _errs81) { + if (errors === _errs81) { + if (typeof data33 === 'string') { + if (!formats0(data33)) { + const err44 = { + instancePath: + instancePath + + '/device/owner/' + + i4 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[1].allOf[0] + .properties.owner.items + .properties.url, + data: data33, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + + '/device/owner/' + + i4 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url, + data: data33, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: + instancePath + '/device/owner/' + i4, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid19 = _errs79 === errors; + if (!valid19) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.owner.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.owner, + data: data31, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid16 = _errs77 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[1].properties.device.anyOf[1].allOf[0].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid15 = _errs59 === errors; + if (valid15) { + const _errs83 = errors; + if (errors === _errs83) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data34 = data4.type; + const _errs85 = errors; + if ('device' !== data34) { + const err49 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.type, + data: data34, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid21 = _errs85 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.connected !== undefined) { + let data35 = data4.connected; + const _errs86 = errors; + if (typeof data35 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/device/connected', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.connected.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.connected, + data: data35, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid21 = _errs86 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.announcedAvailability !== undefined) { + let data36 = data4.announcedAvailability; + const _errs88 = errors; + if (errors === _errs88) { + if (Array.isArray(data36)) { + var valid22 = true; + const len5 = data36.length; + for (let i5 = 0; i5 < len5; i5++) { + let data37 = data36[i5]; + const _errs90 = errors; + if (errors === _errs90) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.start !== undefined) { + let data38 = data37.start; + const _errs92 = errors; + if (errors === _errs92) { + if (errors === _errs92) { + if (typeof data38 === 'string') { + if (!formats22.validate(data38)) { + const err51 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.start, + data: data38, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.start.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.start, + data: data38, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid23 = _errs92 === errors; + } else { + var valid23 = true; + } + if (valid23) { + if (data37.end !== undefined) { + let data39 = data37.end; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data39 === 'string') { + if (!formats22.validate(data39)) { + const err53 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.end, + data: data39, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.end.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.end, + data: data39, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid23 = _errs94 === errors; + } else { + var valid23 = true; + } + } + } else { + const err55 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.announcedAvailability + .items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid22 = _errs90 === errors; + if (!valid22) { + break; + } + } + } else { + const err56 = { + instancePath: + instancePath + '/device/announcedAvailability', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.announcedAvailability.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.announcedAvailability, + data: data36, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid21 = _errs88 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.experiment !== undefined) { + let data40 = data4.experiment; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err57 = { + instancePath: instancePath + '/device/experiment', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.experiment, + data: data40, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/device/experiment', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.experiment.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.experiment, + data: data40, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid21 = _errs96 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.services !== undefined) { + let data41 = data4.services; + const _errs98 = errors; + if (errors === _errs98) { + if (Array.isArray(data41)) { + var valid24 = true; + const len6 = data41.length; + for (let i6 = 0; i6 < len6; i6++) { + let data42 = data41[i6]; + const _errs100 = errors; + if (errors === _errs100) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + if (data42.serviceType !== undefined) { + let data43 = data42.serviceType; + const _errs103 = errors; + if (errors === _errs103) { + if (errors === _errs103) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err59 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[1] + .properties.services.items + .properties.serviceType, + data: data43, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceType.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceType, + data: data43, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid25 = _errs103 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data42.serviceId !== undefined) { + let data44 = data42.serviceId; + const _errs105 = errors; + if (typeof data44 !== 'string') { + const err61 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties.serviceId + .type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceId, + data: data44, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data42.serviceDirection !== undefined) { + let data45 = data42.serviceDirection; + const _errs107 = errors; + if (typeof data45 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data45, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data45 === 'consumer' || + data45 === 'producer' || + data45 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties + .device.anyOf[1].allOf[1] + .properties.services.items + .properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data45, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err64 = { + instancePath: + instancePath + '/device/services/' + i6, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid24 = _errs100 === errors; + if (!valid24) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services, + data: data41, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs98 === errors; + } else { + var valid21 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid15 = _errs83 === errors; + } + var _valid0 = _errs58 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs109 = errors; + const _errs110 = errors; + if (errors === _errs110) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing9; + if ( + (data4.url === undefined && (missing9 = 'url')) || + (data4.type === undefined && (missing9 = 'type')) || + (data4.name === undefined && (missing9 = 'name')) || + (data4.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err67 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .required, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data4.url !== undefined) { + let data46 = data4.url; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data46 === 'string') { + if (!formats0(data46)) { + const err68 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.url, + data: data46, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.url.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.url, + data: data46, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.name !== undefined) { + let data47 = data4.name; + const _errs114 = errors; + if (typeof data47 !== 'string') { + const err70 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.name.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.name, + data: data47, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.description !== undefined) { + let data48 = data4.description; + const _errs116 = errors; + if (typeof data48 !== 'string') { + const err71 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.description.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.description, + data: data48, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.type !== undefined) { + let data49 = data4.type; + const _errs118 = errors; + if (typeof data49 !== 'string') { + const err72 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type, + data: data49, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data49 === 'device' || + data49 === 'group' || + data49 === 'edge instantiable' || + data49 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type.enum, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type, + data: data49, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid27 = _errs118 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.isPublic !== undefined) { + let data50 = data4.isPublic; + const _errs120 = errors; + if (typeof data50 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.isPublic.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.isPublic, + data: data50, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.viewer !== undefined) { + let data51 = data4.viewer; + const _errs122 = errors; + if (errors === _errs122) { + if (Array.isArray(data51)) { + var valid28 = true; + const len7 = data51.length; + for (let i7 = 0; i7 < len7; i7++) { + let data52 = data51[i7]; + const _errs124 = errors; + if (errors === _errs124) { + if ( + data52 && + typeof data52 == 'object' && + !Array.isArray(data52) + ) { + let missing10; + if ( + data52.url === undefined && + (missing10 = 'url') + ) { + const err75 = { + instancePath: + instancePath + '/device/viewer/' + i7, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items, + data: data52, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data52.url !== undefined) { + let data53 = data52.url; + const _errs126 = errors; + if (errors === _errs126) { + if (errors === _errs126) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err76 = { + instancePath: + instancePath + + '/device/viewer/' + + i7 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[2].allOf[0] + .properties.viewer.items + .properties.url, + data: data53, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + + '/device/viewer/' + + i7 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url, + data: data53, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: + instancePath + '/device/viewer/' + i7, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items, + data: data52, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid28 = _errs124 === errors; + if (!valid28) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.viewer.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.viewer, + data: data51, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid27 = _errs122 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.owner !== undefined) { + let data54 = data4.owner; + const _errs128 = errors; + if (errors === _errs128) { + if (Array.isArray(data54)) { + var valid30 = true; + const len8 = data54.length; + for (let i8 = 0; i8 < len8; i8++) { + let data55 = data54[i8]; + const _errs130 = errors; + if (errors === _errs130) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + let missing11; + if ( + data55.url === undefined && + (missing11 = 'url') + ) { + const err80 = { + instancePath: + instancePath + + '/device/owner/' + + i8, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { + missingProperty: missing11, + }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties + .owner.items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties + .owner.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data55.url !== undefined) { + let data56 = data55.url; + const _errs132 = errors; + if (errors === _errs132) { + if (errors === _errs132) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err81 = { + instancePath: + instancePath + + '/device/owner/' + + i8 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[2].allOf[0] + .properties.owner.items + .properties.url, + data: data56, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + + '/device/owner/' + + i8 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1] + .properties.device + .anyOf[2].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[2].allOf[0] + .properties.owner.items + .properties.url, + data: data56, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: + instancePath + '/device/owner/' + i8, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid30 = _errs130 === errors; + if (!valid30) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner, + data: data54, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid27 = _errs128 === errors; + } else { + var valid27 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid26 = _errs110 === errors; + if (valid26) { + const _errs134 = errors; + if (errors === _errs134) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data57 = data4.type; + const _errs136 = errors; + if ('edge instantiable' !== data57) { + const err86 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[1] + .properties.type, + data: data57, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid32 = _errs136 === errors; + } else { + var valid32 = true; + } + if (valid32) { + if (data4.codeUrl !== undefined) { + let data58 = data4.codeUrl; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data58 === 'string') { + if (!formats0(data58)) { + const err87 = { + instancePath: instancePath + '/device/codeUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl, + data: data58, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/device/codeUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl, + data: data58, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid32 = _errs137 === errors; + } else { + var valid32 = true; + } + if (valid32) { + if (data4.services !== undefined) { + let data59 = data4.services; + const _errs139 = errors; + if (errors === _errs139) { + if (Array.isArray(data59)) { + var valid33 = true; + const len9 = data59.length; + for (let i9 = 0; i9 < len9; i9++) { + let data60 = data59[i9]; + const _errs141 = errors; + if (errors === _errs141) { + if ( + data60 && + typeof data60 == 'object' && + !Array.isArray(data60) + ) { + if (data60.serviceType !== undefined) { + let data61 = data60.serviceType; + const _errs144 = errors; + if (errors === _errs144) { + if (errors === _errs144) { + if (typeof data61 === 'string') { + if (!formats0(data61)) { + const err89 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType, + data: data61, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType, + data: data61, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data60.serviceId !== undefined) { + let data62 = data60.serviceId; + const _errs146 = errors; + if (typeof data62 !== 'string') { + const err91 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data62, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid34 = _errs146 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data60.serviceDirection !== undefined) { + let data63 = data60.serviceDirection; + const _errs148 = errors; + if (typeof data63 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data63, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data63 === 'consumer' || + data63 === 'producer' || + data63 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data63, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid34 = _errs148 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err94 = { + instancePath: + instancePath + '/device/services/' + i9, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.items.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.items, + data: data60, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid33 = _errs141 === errors; + if (!valid33) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid32 = _errs139 === errors; + } else { + var valid32 = true; + } + } + } + } else { + const err96 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[1].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid26 = _errs134 === errors; + } + var _valid0 = _errs109 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs150 = errors; + const _errs151 = errors; + if (errors === _errs151) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing12; + if ( + (data4.url === undefined && (missing12 = 'url')) || + (data4.type === undefined && (missing12 = 'type')) || + (data4.name === undefined && (missing12 = 'name')) || + (data4.isPublic === undefined && (missing12 = 'isPublic')) + ) { + const err97 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0] + .required, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data4.url !== undefined) { + let data64 = data4.url; + const _errs153 = errors; + if (errors === _errs153) { + if (errors === _errs153) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err98 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.url.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid36 = _errs153 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.name !== undefined) { + let data65 = data4.name; + const _errs155 = errors; + if (typeof data65 !== 'string') { + const err100 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.name.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.name, + data: data65, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid36 = _errs155 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.description !== undefined) { + let data66 = data4.description; + const _errs157 = errors; + if (typeof data66 !== 'string') { + const err101 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.description.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.description, + data: data66, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid36 = _errs157 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.type !== undefined) { + let data67 = data4.type; + const _errs159 = errors; + if (typeof data67 !== 'string') { + const err102 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type, + data: data67, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data67 === 'device' || + data67 === 'group' || + data67 === 'edge instantiable' || + data67 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.enum, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type, + data: data67, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid36 = _errs159 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.isPublic !== undefined) { + let data68 = data4.isPublic; + const _errs161 = errors; + if (typeof data68 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.isPublic.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.isPublic, + data: data68, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.viewer !== undefined) { + let data69 = data4.viewer; + const _errs163 = errors; + if (errors === _errs163) { + if (Array.isArray(data69)) { + var valid37 = true; + const len10 = data69.length; + for (let i10 = 0; i10 < len10; i10++) { + let data70 = data69[i10]; + const _errs165 = errors; + if (errors === _errs165) { + if ( + data70 && + typeof data70 == 'object' && + !Array.isArray(data70) + ) { + let missing13; + if ( + data70.url === undefined && + (missing13 = 'url') + ) { + const err105 = { + instancePath: + instancePath + + '/device/viewer/' + + i10, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { + missingProperty: missing13, + }, + message: + "must have required property '" + + missing13 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .viewer.items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .viewer.items, + data: data70, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data70.url !== undefined) { + let data71 = data70.url; + const _errs167 = errors; + if (errors === _errs167) { + if (errors === _errs167) { + if (typeof data71 === 'string') { + if (!formats0(data71)) { + const err106 = { + instancePath: + instancePath + + '/device/viewer/' + + i10 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.viewer.items + .properties.url, + data: data71, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/device/viewer/' + + i10 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.viewer.items + .properties.url, + data: data71, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: + instancePath + + '/device/viewer/' + + i10, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items, + data: data70, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid37 = _errs165 === errors; + if (!valid37) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer, + data: data69, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid36 = _errs163 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.owner !== undefined) { + let data72 = data4.owner; + const _errs169 = errors; + if (errors === _errs169) { + if (Array.isArray(data72)) { + var valid39 = true; + const len11 = data72.length; + for (let i11 = 0; i11 < len11; i11++) { + let data73 = data72[i11]; + const _errs171 = errors; + if (errors === _errs171) { + if ( + data73 && + typeof data73 == 'object' && + !Array.isArray(data73) + ) { + let missing14; + if ( + data73.url === undefined && + (missing14 = 'url') + ) { + const err110 = { + instancePath: + instancePath + + '/device/owner/' + + i11, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { + missingProperty: missing14, + }, + message: + "must have required property '" + + missing14 + + "'", + schema: + schema102.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.owner.items + .required, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.owner.items, + data: data73, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data73.url !== undefined) { + let data74 = data73.url; + const _errs173 = errors; + if (errors === _errs173) { + if (errors === _errs173) { + if ( + typeof data74 === 'string' + ) { + if (!formats0(data74)) { + const err111 = { + instancePath: + instancePath + + '/device/owner/' + + i11 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner + .items.properties.url, + data: data74, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/device/owner/' + + i11 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url, + data: data74, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: + instancePath + + '/device/owner/' + + i11, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .owner.items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .owner.items, + data: data73, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid39 = _errs171 === errors; + if (!valid39) { + break; + } + } + } else { + const err114 = { + instancePath: + instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner + .type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner, + data: data72, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid36 = _errs169 === errors; + } else { + var valid36 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid35 = _errs151 === errors; + if (valid35) { + const _errs175 = errors; + if (errors === _errs175) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing15; + if (data4.devices === undefined && (missing15 = 'devices')) { + const err116 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing15 }, + message: "must have required property '" + missing15 + "'", + schema: + schema102.allOf[1].properties.device.anyOf[3].allOf[1] + .required, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data4.type !== undefined) { + let data75 = data4.type; + const _errs177 = errors; + if ('group' !== data75) { + const err117 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[1] + .properties.type, + data: data75, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid41 = _errs177 === errors; + } else { + var valid41 = true; + } + if (valid41) { + if (data4.devices !== undefined) { + let data76 = data4.devices; + const _errs178 = errors; + if (errors === _errs178) { + if (Array.isArray(data76)) { + var valid42 = true; + const len12 = data76.length; + for (let i12 = 0; i12 < len12; i12++) { + let data77 = data76[i12]; + const _errs180 = errors; + if (errors === _errs180) { + if ( + data77 && + typeof data77 == 'object' && + !Array.isArray(data77) + ) { + let missing16; + if ( + data77.url === undefined && + (missing16 = 'url') + ) { + const err118 = { + instancePath: + instancePath + '/device/devices/' + i12, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing16 }, + message: + "must have required property '" + + missing16 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items, + data: data77, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data77.url !== undefined) { + let data78 = data77.url; + const _errs182 = errors; + if (errors === _errs182) { + if (errors === _errs182) { + if (typeof data78 === 'string') { + if (!formats0(data78)) { + const err119 = { + instancePath: + instancePath + + '/device/devices/' + + i12 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url, + data: data78, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + + '/device/devices/' + + i12 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url, + data: data78, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: + instancePath + '/device/devices/' + i12, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items, + data: data77, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid42 = _errs180 === errors; + if (!valid42) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/device/devices', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices, + data: data76, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid41 = _errs178 === errors; + } else { + var valid41 = true; + } + } + } + } else { + const err123 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[3].allOf[1].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid35 = _errs175 === errors; + } + var _valid0 = _errs150 === errors; + valid5 = valid5 || _valid0; + } + } + } + if (!valid5) { + const err124 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema102.allOf[1].properties.device.anyOf, + parentSchema: schema102.allOf[1].properties.device, + data: data4, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate117.errors = vErrors; + return false; + } else { + errors = _errs16; + if (vErrors !== null) { + if (_errs16) { + vErrors.length = _errs16; + } else { + vErrors = null; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[1].type, + parentSchema: schema102.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate117.errors = vErrors; + return errors === 0; +} +exports.validateDeviceOverviewUpdateRequest = validate118; +const schema103 = { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + 'x-standalone': true, + 'x-name': 'DeviceOverviewUpdateRequest', + 'x-location': '#/components/schemas/device_overview_update_request', + 'x-schema-type': 'request', +}; +function validate118( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate118.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema103.required, + parentSchema: schema103, + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs1 = errors; + if (typeof data0 !== 'string') { + validate118.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema103.properties.name.type, + parentSchema: schema103.properties.name, + data: data0, + }, + ]; + return false; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate118.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema103.properties.description.type, + parentSchema: schema103.properties.description, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate118.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema103.properties.type.type, + parentSchema: schema103.properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate118.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema103.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema103.properties.type.enum, + parentSchema: schema103.properties.type, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs7 = errors; + if (typeof data3 !== 'boolean') { + validate118.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema103.properties.isPublic.type, + parentSchema: schema103.properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid1 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate118.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema103.properties.viewer.items.required, + parentSchema: schema103.properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate118.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema103.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } else { + validate118.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema103.properties.viewer.items.properties + .url.type, + parentSchema: + schema103.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate118.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema103.properties.viewer.items.type, + parentSchema: schema103.properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + if (!valid1) { + break; + } + } + } else { + validate118.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema103.properties.viewer.type, + parentSchema: schema103.properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs15 = errors; + if (errors === _errs15) { + if (Array.isArray(data7)) { + var valid3 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs17 = errors; + if (errors === _errs17) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate118.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema103.properties.owner.items.required, + parentSchema: schema103.properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate118.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema103.properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate118.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema103.properties.owner.items.properties + .url.type, + parentSchema: + schema103.properties.owner.items.properties + .url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate118.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema103.properties.owner.items.type, + parentSchema: schema103.properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid3 = _errs17 === errors; + if (!valid3) { + break; + } + } + } else { + validate118.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema103.properties.owner.type, + parentSchema: schema103.properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } else { + validate118.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema103.type, + parentSchema: schema103, + data, + }, + ]; + return false; + } + } + validate118.errors = vErrors; + return errors === 0; +} +exports.validateDeviceOverviewUpdateResponse = validate119; +const schema104 = { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + 'x-standalone': true, + 'x-name': 'DeviceOverviewUpdateResponse', + 'x-location': '#/components/schemas/device_overview_update_response', + 'x-schema-type': 'response', +}; +function validate119( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate119.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema104.required, + parentSchema: schema104, + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs1 = errors; + if (typeof data0 !== 'string') { + validate119.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema104.properties.name.type, + parentSchema: schema104.properties.name, + data: data0, + }, + ]; + return false; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate119.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema104.properties.description.type, + parentSchema: schema104.properties.description, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate119.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema104.properties.type.type, + parentSchema: schema104.properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate119.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema104.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema104.properties.type.enum, + parentSchema: schema104.properties.type, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs7 = errors; + if (typeof data3 !== 'boolean') { + validate119.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema104.properties.isPublic.type, + parentSchema: schema104.properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid1 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate119.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema104.properties.viewer.items.required, + parentSchema: schema104.properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate119.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema104.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } else { + validate119.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema104.properties.viewer.items.properties + .url.type, + parentSchema: + schema104.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate119.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema104.properties.viewer.items.type, + parentSchema: schema104.properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + if (!valid1) { + break; + } + } + } else { + validate119.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema104.properties.viewer.type, + parentSchema: schema104.properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs15 = errors; + if (errors === _errs15) { + if (Array.isArray(data7)) { + var valid3 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs17 = errors; + if (errors === _errs17) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate119.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema104.properties.owner.items.required, + parentSchema: schema104.properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate119.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema104.properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate119.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema104.properties.owner.items.properties + .url.type, + parentSchema: + schema104.properties.owner.items.properties + .url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate119.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema104.properties.owner.items.type, + parentSchema: schema104.properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid3 = _errs17 === errors; + if (!valid3) { + break; + } + } + } else { + validate119.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema104.properties.owner.type, + parentSchema: schema104.properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } else { + validate119.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema104.type, + parentSchema: schema104, + data, + }, + ]; + return false; + } + } + validate119.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableCloudDeviceUpdateRequest = validate120; +const schema105 = { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'InstantiableCloudDeviceUpdateRequest', + 'x-location': '#/components/schemas/device_cloud_instantiable_update_request', + 'x-schema-type': 'request', +}; +function validate120( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate120.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema105.allOf[0].required, + parentSchema: schema105.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate120.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema105.allOf[0].properties.name.type, + parentSchema: schema105.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate120.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema105.allOf[0].properties.description.type, + parentSchema: schema105.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate120.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema105.allOf[0].properties.type.type, + parentSchema: schema105.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate120.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema105.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema105.allOf[0].properties.type.enum, + parentSchema: schema105.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate120.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema105.allOf[0].properties.isPublic.type, + parentSchema: schema105.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate120.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema105.allOf[0].properties.viewer.items.required, + parentSchema: + schema105.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate120.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema105.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate120.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema105.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema105.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema105.allOf[0].properties.viewer.items.type, + parentSchema: schema105.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema105.allOf[0].properties.viewer.type, + parentSchema: schema105.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate120.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema105.allOf[0].properties.owner.items.required, + parentSchema: + schema105.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate120.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema105.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate120.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema105.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema105.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema105.allOf[0].properties.owner.items.type, + parentSchema: schema105.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema105.allOf[0].properties.owner.type, + parentSchema: schema105.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate120.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema105.allOf[0].type, + parentSchema: schema105.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('cloud instantiable' !== data10) { + validate120.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema105.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate120.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema105.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema105.allOf[1].properties.instantiateUrl.type, + parentSchema: schema105.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate120.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema105.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate120.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema105.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema105.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate120.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema105.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema105.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate120.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema105.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema105.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate120.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema105.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema105.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema105.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema105.allOf[1].properties.services.items.type, + parentSchema: schema105.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema105.allOf[1].properties.services.type, + parentSchema: schema105.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate120.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema105.allOf[1].type, + parentSchema: schema105.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate120.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableCloudDeviceUpdateResponse = validate121; +const schema106 = { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'InstantiableCloudDeviceUpdateResponse', + 'x-location': '#/components/schemas/device_cloud_instantiable_update_response', + 'x-schema-type': 'response', +}; +function validate121( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate121.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema106.allOf[0].required, + parentSchema: schema106.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate121.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema106.allOf[0].properties.name.type, + parentSchema: schema106.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate121.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema106.allOf[0].properties.description.type, + parentSchema: schema106.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate121.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema106.allOf[0].properties.type.type, + parentSchema: schema106.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate121.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema106.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema106.allOf[0].properties.type.enum, + parentSchema: schema106.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate121.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema106.allOf[0].properties.isPublic.type, + parentSchema: schema106.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate121.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema106.allOf[0].properties.viewer.items.required, + parentSchema: + schema106.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate121.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema106.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate121.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema106.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema106.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema106.allOf[0].properties.viewer.items.type, + parentSchema: schema106.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema106.allOf[0].properties.viewer.type, + parentSchema: schema106.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate121.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema106.allOf[0].properties.owner.items.required, + parentSchema: + schema106.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate121.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema106.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate121.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema106.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema106.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema106.allOf[0].properties.owner.items.type, + parentSchema: schema106.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema106.allOf[0].properties.owner.type, + parentSchema: schema106.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate121.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema106.allOf[0].type, + parentSchema: schema106.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('cloud instantiable' !== data10) { + validate121.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema106.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate121.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema106.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema106.allOf[1].properties.instantiateUrl.type, + parentSchema: schema106.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate121.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema106.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate121.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema106.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema106.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate121.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema106.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema106.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate121.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema106.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema106.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate121.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema106.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema106.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema106.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema106.allOf[1].properties.services.items.type, + parentSchema: schema106.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema106.allOf[1].properties.services.type, + parentSchema: schema106.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate121.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema106.allOf[1].type, + parentSchema: schema106.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate121.errors = vErrors; + return errors === 0; +} +exports.validateConcreteDeviceUpdateRequest = validate122; +const schema107 = { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'ConcreteDeviceUpdateRequest', + 'x-location': '#/components/schemas/device_concrete_update_request', + 'x-schema-type': 'request', +}; +function validate122( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate122.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema107.allOf[0].required, + parentSchema: schema107.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate122.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema107.allOf[0].properties.name.type, + parentSchema: schema107.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate122.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema107.allOf[0].properties.description.type, + parentSchema: schema107.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate122.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema107.allOf[0].properties.type.type, + parentSchema: schema107.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate122.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema107.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema107.allOf[0].properties.type.enum, + parentSchema: schema107.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate122.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema107.allOf[0].properties.isPublic.type, + parentSchema: schema107.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate122.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema107.allOf[0].properties.viewer.items.required, + parentSchema: + schema107.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate122.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema107.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate122.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema107.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema107.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema107.allOf[0].properties.viewer.items.type, + parentSchema: schema107.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema107.allOf[0].properties.viewer.type, + parentSchema: schema107.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate122.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema107.allOf[0].properties.owner.items.required, + parentSchema: + schema107.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate122.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema107.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate122.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema107.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema107.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema107.allOf[0].properties.owner.items.type, + parentSchema: schema107.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema107.allOf[0].properties.owner.type, + parentSchema: schema107.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate122.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema107.allOf[0].type, + parentSchema: schema107.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('device' !== data10) { + validate122.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema107.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.experiment !== undefined) { + let data11 = data.experiment; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate122.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema107.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema107.allOf[1].properties.experiment.type, + parentSchema: schema107.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate122.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema107.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate122.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema107.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema107.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate122.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema107.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema107.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate122.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema107.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema107.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate122.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema107.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema107.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema107.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema107.allOf[1].properties.services.items.type, + parentSchema: schema107.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema107.allOf[1].properties.services.type, + parentSchema: schema107.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate122.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema107.allOf[1].type, + parentSchema: schema107.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate122.errors = vErrors; + return errors === 0; +} +exports.validateConcreteDeviceUpdateResponse = validate123; +const schema108 = { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'ConcreteDeviceUpdateResponse', + 'x-location': '#/components/schemas/device_concrete_update_response', + 'x-schema-type': 'response', +}; +function validate123( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate123.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema108.allOf[0].required, + parentSchema: schema108.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate123.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema108.allOf[0].properties.name.type, + parentSchema: schema108.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate123.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema108.allOf[0].properties.description.type, + parentSchema: schema108.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate123.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema108.allOf[0].properties.type.type, + parentSchema: schema108.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate123.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema108.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema108.allOf[0].properties.type.enum, + parentSchema: schema108.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate123.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema108.allOf[0].properties.isPublic.type, + parentSchema: schema108.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate123.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema108.allOf[0].properties.viewer.items.required, + parentSchema: + schema108.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate123.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema108.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate123.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema108.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema108.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema108.allOf[0].properties.viewer.items.type, + parentSchema: schema108.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema108.allOf[0].properties.viewer.type, + parentSchema: schema108.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate123.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema108.allOf[0].properties.owner.items.required, + parentSchema: + schema108.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate123.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema108.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate123.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema108.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema108.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema108.allOf[0].properties.owner.items.type, + parentSchema: schema108.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema108.allOf[0].properties.owner.type, + parentSchema: schema108.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate123.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema108.allOf[0].type, + parentSchema: schema108.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('device' !== data10) { + validate123.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema108.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.experiment !== undefined) { + let data11 = data.experiment; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate123.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema108.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema108.allOf[1].properties.experiment.type, + parentSchema: schema108.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate123.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema108.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate123.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema108.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema108.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate123.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema108.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema108.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate123.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema108.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema108.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate123.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema108.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema108.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema108.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema108.allOf[1].properties.services.items.type, + parentSchema: schema108.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema108.allOf[1].properties.services.type, + parentSchema: schema108.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate123.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema108.allOf[1].type, + parentSchema: schema108.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate123.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableBrowserDeviceUpdateRequest = validate124; +const schema109 = { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'InstantiableBrowserDeviceUpdateRequest', + 'x-location': '#/components/schemas/device_edge_instantiable_update_request', + 'x-schema-type': 'request', +}; +function validate124( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate124.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema109.allOf[0].required, + parentSchema: schema109.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate124.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema109.allOf[0].properties.name.type, + parentSchema: schema109.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate124.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema109.allOf[0].properties.description.type, + parentSchema: schema109.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate124.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema109.allOf[0].properties.type.type, + parentSchema: schema109.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate124.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema109.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema109.allOf[0].properties.type.enum, + parentSchema: schema109.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate124.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema109.allOf[0].properties.isPublic.type, + parentSchema: schema109.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate124.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema109.allOf[0].properties.viewer.items.required, + parentSchema: + schema109.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate124.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema109.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate124.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema109.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema109.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema109.allOf[0].properties.viewer.items.type, + parentSchema: schema109.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema109.allOf[0].properties.viewer.type, + parentSchema: schema109.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate124.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema109.allOf[0].properties.owner.items.required, + parentSchema: + schema109.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate124.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema109.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate124.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema109.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema109.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema109.allOf[0].properties.owner.items.type, + parentSchema: schema109.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema109.allOf[0].properties.owner.type, + parentSchema: schema109.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate124.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema109.allOf[0].type, + parentSchema: schema109.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('edge instantiable' !== data10) { + validate124.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema109.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.codeUrl !== undefined) { + let data11 = data.codeUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate124.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema109.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema109.allOf[1].properties.codeUrl.type, + parentSchema: schema109.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate124.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema109.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate124.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema109.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema109.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate124.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema109.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema109.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate124.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema109.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema109.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate124.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema109.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema109.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema109.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema109.allOf[1].properties.services.items.type, + parentSchema: schema109.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema109.allOf[1].properties.services.type, + parentSchema: schema109.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate124.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema109.allOf[1].type, + parentSchema: schema109.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate124.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableBrowserDeviceUpdateResponse = validate125; +const schema110 = { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'InstantiableBrowserDeviceUpdateResponse', + 'x-location': '#/components/schemas/device_edge_instantiable_update_response', + 'x-schema-type': 'response', +}; +function validate125( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate125.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema110.allOf[0].required, + parentSchema: schema110.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate125.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema110.allOf[0].properties.name.type, + parentSchema: schema110.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate125.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema110.allOf[0].properties.description.type, + parentSchema: schema110.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate125.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema110.allOf[0].properties.type.type, + parentSchema: schema110.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate125.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema110.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema110.allOf[0].properties.type.enum, + parentSchema: schema110.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate125.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema110.allOf[0].properties.isPublic.type, + parentSchema: schema110.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate125.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema110.allOf[0].properties.viewer.items.required, + parentSchema: + schema110.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate125.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema110.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate125.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema110.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema110.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema110.allOf[0].properties.viewer.items.type, + parentSchema: schema110.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema110.allOf[0].properties.viewer.type, + parentSchema: schema110.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate125.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema110.allOf[0].properties.owner.items.required, + parentSchema: + schema110.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate125.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema110.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate125.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema110.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema110.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema110.allOf[0].properties.owner.items.type, + parentSchema: schema110.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema110.allOf[0].properties.owner.type, + parentSchema: schema110.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate125.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema110.allOf[0].type, + parentSchema: schema110.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('edge instantiable' !== data10) { + validate125.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema110.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.codeUrl !== undefined) { + let data11 = data.codeUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate125.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema110.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema110.allOf[1].properties.codeUrl.type, + parentSchema: schema110.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate125.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema110.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate125.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema110.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema110.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate125.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema110.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema110.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate125.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema110.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema110.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate125.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema110.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema110.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema110.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema110.allOf[1].properties.services.items.type, + parentSchema: schema110.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema110.allOf[1].properties.services.type, + parentSchema: schema110.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate125.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema110.allOf[1].type, + parentSchema: schema110.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate125.errors = vErrors; + return errors === 0; +} +exports.validateDeviceGroupUpdateRequest = validate126; +const schema111 = { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'DeviceGroupUpdateRequest', + 'x-location': '#/components/schemas/device_group_update_request', + 'x-schema-type': 'request', +}; +function validate126( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate126.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema111.allOf[0].required, + parentSchema: schema111.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate126.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema111.allOf[0].properties.name.type, + parentSchema: schema111.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate126.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema111.allOf[0].properties.description.type, + parentSchema: schema111.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate126.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema111.allOf[0].properties.type.type, + parentSchema: schema111.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate126.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema111.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema111.allOf[0].properties.type.enum, + parentSchema: schema111.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate126.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema111.allOf[0].properties.isPublic.type, + parentSchema: schema111.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate126.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema111.allOf[0].properties.viewer.items.required, + parentSchema: + schema111.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate126.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema111.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate126.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema111.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema111.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema111.allOf[0].properties.viewer.items.type, + parentSchema: schema111.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema111.allOf[0].properties.viewer.type, + parentSchema: schema111.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate126.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema111.allOf[0].properties.owner.items.required, + parentSchema: + schema111.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate126.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema111.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate126.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema111.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema111.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema111.allOf[0].properties.owner.items.type, + parentSchema: schema111.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema111.allOf[0].properties.owner.type, + parentSchema: schema111.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate126.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema111.allOf[0].type, + parentSchema: schema111.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('group' !== data10) { + validate126.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema111.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.devices !== undefined) { + let data11 = data.devices; + const _errs25 = errors; + if (errors === _errs25) { + if (Array.isArray(data11)) { + var valid7 = true; + const len2 = data11.length; + for (let i2 = 0; i2 < len2; i2++) { + let data12 = data11[i2]; + const _errs27 = errors; + if (errors === _errs27) { + if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { + let missing3; + if (data12.url === undefined && (missing3 = 'url')) { + validate126.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema111.allOf[1].properties.devices.items.required, + parentSchema: schema111.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } else { + if (data12.url !== undefined) { + let data13 = data12.url; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data13 === 'string') { + if (!formats0(data13)) { + validate126.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema111.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } else { + validate126.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema111.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema111.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } + } + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema111.allOf[1].properties.devices.items.type, + parentSchema: schema111.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } + } + var valid7 = _errs27 === errors; + if (!valid7) { + break; + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema111.allOf[1].properties.devices.type, + parentSchema: schema111.allOf[1].properties.devices, + data: data11, + }, + ]; + return false; + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + } + } else { + validate126.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema111.allOf[1].type, + parentSchema: schema111.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate126.errors = vErrors; + return errors === 0; +} +exports.validateDeviceGroupUpdateResponse = validate127; +const schema112 = { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'DeviceGroupUpdateResponse', + 'x-location': '#/components/schemas/device_group_update_response', + 'x-schema-type': 'response', +}; +function validate127( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate127.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema112.allOf[0].required, + parentSchema: schema112.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate127.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema112.allOf[0].properties.name.type, + parentSchema: schema112.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate127.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema112.allOf[0].properties.description.type, + parentSchema: schema112.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate127.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema112.allOf[0].properties.type.type, + parentSchema: schema112.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate127.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema112.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema112.allOf[0].properties.type.enum, + parentSchema: schema112.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate127.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema112.allOf[0].properties.isPublic.type, + parentSchema: schema112.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate127.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema112.allOf[0].properties.viewer.items.required, + parentSchema: + schema112.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate127.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema112.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate127.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema112.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema112.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema112.allOf[0].properties.viewer.items.type, + parentSchema: schema112.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema112.allOf[0].properties.viewer.type, + parentSchema: schema112.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate127.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema112.allOf[0].properties.owner.items.required, + parentSchema: + schema112.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate127.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema112.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate127.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema112.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema112.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema112.allOf[0].properties.owner.items.type, + parentSchema: schema112.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema112.allOf[0].properties.owner.type, + parentSchema: schema112.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate127.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema112.allOf[0].type, + parentSchema: schema112.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('group' !== data10) { + validate127.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema112.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.devices !== undefined) { + let data11 = data.devices; + const _errs25 = errors; + if (errors === _errs25) { + if (Array.isArray(data11)) { + var valid7 = true; + const len2 = data11.length; + for (let i2 = 0; i2 < len2; i2++) { + let data12 = data11[i2]; + const _errs27 = errors; + if (errors === _errs27) { + if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { + let missing3; + if (data12.url === undefined && (missing3 = 'url')) { + validate127.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema112.allOf[1].properties.devices.items.required, + parentSchema: schema112.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } else { + if (data12.url !== undefined) { + let data13 = data12.url; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data13 === 'string') { + if (!formats0(data13)) { + validate127.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema112.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } else { + validate127.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema112.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema112.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } + } + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema112.allOf[1].properties.devices.items.type, + parentSchema: schema112.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } + } + var valid7 = _errs27 === errors; + if (!valid7) { + break; + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema112.allOf[1].properties.devices.type, + parentSchema: schema112.allOf[1].properties.devices, + data: data11, + }, + ]; + return false; + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + } + } else { + validate127.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema112.allOf[1].type, + parentSchema: schema112.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate127.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUpdateRequest = validate128; +const schema113 = { + title: 'Device Update', + anyOf: [ + { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + }, + ], + }, + ], + 'x-standalone': true, + 'x-name': 'DeviceUpdateRequest', + 'x-location': '#/components/schemas/device_update_request', + 'x-schema-type': 'request', +}; +function validate128( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema113.anyOf[0].allOf[0].required, + parentSchema: schema113.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema113.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema113.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema113.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema113.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema113.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema113.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema113.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema113.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema113.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema113.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema113.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema113.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[0].allOf[0].type, + parentSchema: schema113.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema113.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema113.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema113.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema113.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema113.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema113.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[0].allOf[1].type, + parentSchema: schema113.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.type === undefined && (missing3 = 'type')) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema113.anyOf[1].allOf[0].required, + parentSchema: schema113.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema113.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema113.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema113.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema113.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema113.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema113.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema113.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema113.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema113.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema113.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema113.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema113.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[1].allOf[0].type, + parentSchema: schema113.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema113.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema113.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema113.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema113.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema113.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema113.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[1].allOf[1].type, + parentSchema: schema113.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if (data.type === undefined && (missing6 = 'type')) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema113.anyOf[2].allOf[0].required, + parentSchema: schema113.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema113.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema113.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema113.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema113.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema113.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema113.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema113.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema113.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema113.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema113.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema113.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema113.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[2].allOf[0].type, + parentSchema: schema113.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema113.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema113.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema113.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema113.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema113.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[2].allOf[1].type, + parentSchema: schema113.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.type === undefined && (missing9 = 'type')) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema113.anyOf[3].allOf[0].required, + parentSchema: schema113.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema113.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema113.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema113.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema113.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema113.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema113.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema113.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema113.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema113.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema113.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema113.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema113.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema113.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema113.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema113.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema113.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema113.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema113.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[3].allOf[0].type, + parentSchema: schema113.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err101 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema113.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing12; + if (data63.url === undefined && (missing12 = 'url')) { + const err102 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: + "must have required property '" + missing12 + "'", + schema: + schema113.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema113.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err103 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + } else { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema113.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } + } + } + } + } else { + const err105 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[3].allOf[1].properties.devices.items.type, + parentSchema: + schema113.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema113.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } else { + const err107 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[3].allOf[1].type, + parentSchema: schema113.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err108 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema113.anyOf, + parentSchema: schema113, + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + validate128.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate128.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUpdateResponse = validate129; +const schema114 = { + title: 'Device Update', + anyOf: [ + { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + }, + ], + }, + ], + 'x-standalone': true, + 'x-name': 'DeviceUpdateResponse', + 'x-location': '#/components/schemas/device_update_response', + 'x-schema-type': 'response', +}; +function validate129( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema114.anyOf[0].allOf[0].required, + parentSchema: schema114.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema114.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema114.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema114.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema114.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema114.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema114.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema114.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema114.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema114.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema114.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema114.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[0].allOf[0].type, + parentSchema: schema114.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema114.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema114.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema114.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema114.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema114.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema114.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[0].allOf[1].type, + parentSchema: schema114.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.type === undefined && (missing3 = 'type')) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema114.anyOf[1].allOf[0].required, + parentSchema: schema114.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema114.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema114.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema114.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema114.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema114.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema114.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema114.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema114.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema114.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema114.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema114.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[1].allOf[0].type, + parentSchema: schema114.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema114.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema114.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema114.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema114.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema114.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema114.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[1].allOf[1].type, + parentSchema: schema114.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if (data.type === undefined && (missing6 = 'type')) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema114.anyOf[2].allOf[0].required, + parentSchema: schema114.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema114.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema114.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema114.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema114.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema114.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema114.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema114.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema114.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema114.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema114.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema114.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[2].allOf[0].type, + parentSchema: schema114.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema114.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema114.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema114.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema114.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema114.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[2].allOf[1].type, + parentSchema: schema114.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.type === undefined && (missing9 = 'type')) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema114.anyOf[3].allOf[0].required, + parentSchema: schema114.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema114.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema114.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema114.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema114.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema114.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema114.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema114.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema114.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema114.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema114.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema114.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema114.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[3].allOf[0].type, + parentSchema: schema114.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err101 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema114.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing12; + if (data63.url === undefined && (missing12 = 'url')) { + const err102 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: + "must have required property '" + missing12 + "'", + schema: + schema114.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema114.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err103 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + } else { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema114.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } + } + } + } + } else { + const err105 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[3].allOf[1].properties.devices.items.type, + parentSchema: + schema114.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema114.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } else { + const err107 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[3].allOf[1].type, + parentSchema: schema114.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err108 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema114.anyOf, + parentSchema: schema114, + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + validate129.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate129.errors = vErrors; + return errors === 0; +} +exports.validateAvailabilityRuleRequest = validate130; +const schema115 = { + title: 'Availability Rule', + type: 'object', + allOf: [ + { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + { + type: 'object', + properties: { + available: { type: 'boolean' }, + repeat: { + description: + 'If specified the time slot is repeated in a fixed offset specified by the frequency', + type: 'object', + properties: { + frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, + until: { + description: 'Up to this date-time the time slot will be repeated.', + type: 'string', + format: 'date-time', + }, + count: { + description: 'How often the time slot will be repeated', + type: 'integer', + }, + }, + required: ['frequency'], + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'AvailabilityRuleRequest', + 'x-location': '#/components/schemas/availability_rule_request', + 'x-schema-type': 'request', +}; +function validate130( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (!(data && typeof data == 'object' && !Array.isArray(data))) { + validate130.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema115.type, + parentSchema: schema115, + data, + }, + ]; + return false; + } + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.start !== undefined) { + let data0 = data.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data0 === 'string') { + if (!formats22.validate(data0)) { + validate130.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/allOf/0/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema115.allOf[0].properties.start, + data: data0, + }, + ]; + return false; + } + } else { + validate130.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/allOf/0/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema115.allOf[0].properties.start.type, + parentSchema: schema115.allOf[0].properties.start, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.end !== undefined) { + let data1 = data.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate130.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/allOf/0/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema115.allOf[0].properties.end, + data: data1, + }, + ]; + return false; + } + } else { + validate130.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/allOf/0/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema115.allOf[0].properties.end.type, + parentSchema: schema115.allOf[0].properties.end, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate130.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema115.allOf[0].type, + parentSchema: schema115.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (valid0) { + const _errs7 = errors; + if (errors === _errs7) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.available !== undefined) { + let data2 = data.available; + const _errs9 = errors; + if (typeof data2 !== 'boolean') { + validate130.errors = [ + { + instancePath: instancePath + '/available', + schemaPath: '#/allOf/1/properties/available/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema115.allOf[1].properties.available.type, + parentSchema: schema115.allOf[1].properties.available, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.repeat !== undefined) { + let data3 = data.repeat; + const _errs11 = errors; + if (errors === _errs11) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing0; + if (data3.frequency === undefined && (missing0 = 'frequency')) { + validate130.errors = [ + { + instancePath: instancePath + '/repeat', + schemaPath: '#/allOf/1/properties/repeat/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema115.allOf[1].properties.repeat.required, + parentSchema: schema115.allOf[1].properties.repeat, + data: data3, + }, + ]; + return false; + } else { + if (data3.frequency !== undefined) { + let data4 = data3.frequency; + const _errs13 = errors; + if (typeof data4 !== 'string') { + validate130.errors = [ + { + instancePath: instancePath + '/repeat/frequency', + schemaPath: + '#/allOf/1/properties/repeat/properties/frequency/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema115.allOf[1].properties.repeat.properties.frequency + .type, + parentSchema: + schema115.allOf[1].properties.repeat.properties.frequency, + data: data4, + }, + ]; + return false; + } + if ( + !(data4 === 'HOURLY' || data4 === 'DAILY' || data4 === 'WEEKLY') + ) { + validate130.errors = [ + { + instancePath: instancePath + '/repeat/frequency', + schemaPath: + '#/allOf/1/properties/repeat/properties/frequency/enum', + keyword: 'enum', + params: { + allowedValues: + schema115.allOf[1].properties.repeat.properties.frequency + .enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema115.allOf[1].properties.repeat.properties.frequency + .enum, + parentSchema: + schema115.allOf[1].properties.repeat.properties.frequency, + data: data4, + }, + ]; + return false; + } + var valid3 = _errs13 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.until !== undefined) { + let data5 = data3.until; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data5 === 'string') { + if (!formats22.validate(data5)) { + validate130.errors = [ + { + instancePath: instancePath + '/repeat/until', + schemaPath: + '#/allOf/1/properties/repeat/properties/until/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema115.allOf[1].properties.repeat.properties.until, + data: data5, + }, + ]; + return false; + } + } else { + validate130.errors = [ + { + instancePath: instancePath + '/repeat/until', + schemaPath: + '#/allOf/1/properties/repeat/properties/until/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema115.allOf[1].properties.repeat.properties.until + .type, + parentSchema: + schema115.allOf[1].properties.repeat.properties.until, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs15 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.count !== undefined) { + let data6 = data3.count; + const _errs17 = errors; + if ( + !( + typeof data6 == 'number' && + !(data6 % 1) && + !isNaN(data6) && + isFinite(data6) + ) + ) { + validate130.errors = [ + { + instancePath: instancePath + '/repeat/count', + schemaPath: + '#/allOf/1/properties/repeat/properties/count/type', + keyword: 'type', + params: { type: 'integer' }, + message: 'must be integer', + schema: + schema115.allOf[1].properties.repeat.properties.count + .type, + parentSchema: + schema115.allOf[1].properties.repeat.properties.count, + data: data6, + }, + ]; + return false; + } + var valid3 = _errs17 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + validate130.errors = [ + { + instancePath: instancePath + '/repeat', + schemaPath: '#/allOf/1/properties/repeat/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema115.allOf[1].properties.repeat.type, + parentSchema: schema115.allOf[1].properties.repeat, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs11 === errors; + } else { + var valid2 = true; + } + } + } else { + validate130.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema115.allOf[1].type, + parentSchema: schema115.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs7 === errors; + } + validate130.errors = vErrors; + return errors === 0; +} +exports.validateAvailabilityRuleResponse = validate131; +const schema116 = { + title: 'Availability Rule', + type: 'object', + allOf: [ + { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + { + type: 'object', + properties: { + available: { type: 'boolean' }, + repeat: { + description: + 'If specified the time slot is repeated in a fixed offset specified by the frequency', + type: 'object', + properties: { + frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, + until: { + description: 'Up to this date-time the time slot will be repeated.', + type: 'string', + format: 'date-time', + }, + count: { + description: 'How often the time slot will be repeated', + type: 'integer', + }, + }, + required: ['frequency'], + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'AvailabilityRuleResponse', + 'x-location': '#/components/schemas/availability_rule_response', + 'x-schema-type': 'response', +}; +function validate131( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (!(data && typeof data == 'object' && !Array.isArray(data))) { + validate131.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema116.type, + parentSchema: schema116, + data, + }, + ]; + return false; + } + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.start !== undefined) { + let data0 = data.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data0 === 'string') { + if (!formats22.validate(data0)) { + validate131.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/allOf/0/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema116.allOf[0].properties.start, + data: data0, + }, + ]; + return false; + } + } else { + validate131.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/allOf/0/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema116.allOf[0].properties.start.type, + parentSchema: schema116.allOf[0].properties.start, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.end !== undefined) { + let data1 = data.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate131.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/allOf/0/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema116.allOf[0].properties.end, + data: data1, + }, + ]; + return false; + } + } else { + validate131.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/allOf/0/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema116.allOf[0].properties.end.type, + parentSchema: schema116.allOf[0].properties.end, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate131.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema116.allOf[0].type, + parentSchema: schema116.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (valid0) { + const _errs7 = errors; + if (errors === _errs7) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.available !== undefined) { + let data2 = data.available; + const _errs9 = errors; + if (typeof data2 !== 'boolean') { + validate131.errors = [ + { + instancePath: instancePath + '/available', + schemaPath: '#/allOf/1/properties/available/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema116.allOf[1].properties.available.type, + parentSchema: schema116.allOf[1].properties.available, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.repeat !== undefined) { + let data3 = data.repeat; + const _errs11 = errors; + if (errors === _errs11) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing0; + if (data3.frequency === undefined && (missing0 = 'frequency')) { + validate131.errors = [ + { + instancePath: instancePath + '/repeat', + schemaPath: '#/allOf/1/properties/repeat/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema116.allOf[1].properties.repeat.required, + parentSchema: schema116.allOf[1].properties.repeat, + data: data3, + }, + ]; + return false; + } else { + if (data3.frequency !== undefined) { + let data4 = data3.frequency; + const _errs13 = errors; + if (typeof data4 !== 'string') { + validate131.errors = [ + { + instancePath: instancePath + '/repeat/frequency', + schemaPath: + '#/allOf/1/properties/repeat/properties/frequency/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema116.allOf[1].properties.repeat.properties.frequency + .type, + parentSchema: + schema116.allOf[1].properties.repeat.properties.frequency, + data: data4, + }, + ]; + return false; + } + if ( + !(data4 === 'HOURLY' || data4 === 'DAILY' || data4 === 'WEEKLY') + ) { + validate131.errors = [ + { + instancePath: instancePath + '/repeat/frequency', + schemaPath: + '#/allOf/1/properties/repeat/properties/frequency/enum', + keyword: 'enum', + params: { + allowedValues: + schema116.allOf[1].properties.repeat.properties.frequency + .enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema116.allOf[1].properties.repeat.properties.frequency + .enum, + parentSchema: + schema116.allOf[1].properties.repeat.properties.frequency, + data: data4, + }, + ]; + return false; + } + var valid3 = _errs13 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.until !== undefined) { + let data5 = data3.until; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data5 === 'string') { + if (!formats22.validate(data5)) { + validate131.errors = [ + { + instancePath: instancePath + '/repeat/until', + schemaPath: + '#/allOf/1/properties/repeat/properties/until/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema116.allOf[1].properties.repeat.properties.until, + data: data5, + }, + ]; + return false; + } + } else { + validate131.errors = [ + { + instancePath: instancePath + '/repeat/until', + schemaPath: + '#/allOf/1/properties/repeat/properties/until/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema116.allOf[1].properties.repeat.properties.until + .type, + parentSchema: + schema116.allOf[1].properties.repeat.properties.until, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs15 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.count !== undefined) { + let data6 = data3.count; + const _errs17 = errors; + if ( + !( + typeof data6 == 'number' && + !(data6 % 1) && + !isNaN(data6) && + isFinite(data6) + ) + ) { + validate131.errors = [ + { + instancePath: instancePath + '/repeat/count', + schemaPath: + '#/allOf/1/properties/repeat/properties/count/type', + keyword: 'type', + params: { type: 'integer' }, + message: 'must be integer', + schema: + schema116.allOf[1].properties.repeat.properties.count + .type, + parentSchema: + schema116.allOf[1].properties.repeat.properties.count, + data: data6, + }, + ]; + return false; + } + var valid3 = _errs17 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + validate131.errors = [ + { + instancePath: instancePath + '/repeat', + schemaPath: '#/allOf/1/properties/repeat/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema116.allOf[1].properties.repeat.type, + parentSchema: schema116.allOf[1].properties.repeat, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs11 === errors; + } else { + var valid2 = true; + } + } + } else { + validate131.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema116.allOf[1].type, + parentSchema: schema116.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs7 === errors; + } + validate131.errors = vErrors; + return errors === 0; +} +exports.validateMessageRequest = validate132; +const schema117 = { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'MessageRequest', + 'x-location': '#/components/schemas/message_request', + 'x-schema-type': 'request', +}; +function validate132( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate132.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema117.required, + parentSchema: schema117, + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate132.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema117.properties.messageType.type, + parentSchema: schema117.properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate132.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema117.type, + parentSchema: schema117, + data, + }, + ]; + return false; + } + } + validate132.errors = vErrors; + return errors === 0; +} +exports.validateMessageResponse = validate133; +const schema118 = { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'MessageResponse', + 'x-location': '#/components/schemas/message_response', + 'x-schema-type': 'response', +}; +function validate133( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate133.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema118.required, + parentSchema: schema118, + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate133.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema118.properties.messageType.type, + parentSchema: schema118.properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate133.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema118.type, + parentSchema: schema118, + data, + }, + ]; + return false; + } + } + validate133.errors = vErrors; + return errors === 0; +} +exports.validateCommandMessageRequest = validate134; +const schema119 = { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CommandMessageRequest', + 'x-location': '#/components/schemas/command_message_request', + 'x-schema-type': 'request', +}; +function validate134( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate134.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema119.allOf[0].required, + parentSchema: schema119.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate134.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema119.allOf[0].properties.messageType.type, + parentSchema: schema119.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate134.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema119.allOf[0].type, + parentSchema: schema119.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate134.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema119.allOf[1].required, + parentSchema: schema119.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('command' !== data1) { + validate134.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema119.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate134.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema119.allOf[1].properties.command.type, + parentSchema: schema119.allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate134.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema119.allOf[1].type, + parentSchema: schema119.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate134.errors = vErrors; + return errors === 0; +} +exports.validateCommandMessageResponse = validate135; +const schema120 = { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CommandMessageResponse', + 'x-location': '#/components/schemas/command_message_response', + 'x-schema-type': 'response', +}; +function validate135( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate135.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema120.allOf[0].required, + parentSchema: schema120.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate135.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema120.allOf[0].properties.messageType.type, + parentSchema: schema120.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate135.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema120.allOf[0].type, + parentSchema: schema120.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate135.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema120.allOf[1].required, + parentSchema: schema120.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('command' !== data1) { + validate135.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema120.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate135.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema120.allOf[1].properties.command.type, + parentSchema: schema120.allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate135.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema120.allOf[1].type, + parentSchema: schema120.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate135.errors = vErrors; + return errors === 0; +} +exports.validateServiceConfigRequest = validate136; +const schema121 = { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + 'x-standalone': true, + 'x-name': 'ServiceConfigRequest', + 'x-location': '#/components/schemas/service_config_request', + 'x-schema-type': 'request', +}; +function validate136( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.serviceType === undefined && (missing0 = 'serviceType')) || + (data.serviceId === undefined && (missing0 = 'serviceId')) || + (data.remoteServiceId === undefined && (missing0 = 'remoteServiceId')) + ) { + validate136.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema121.required, + parentSchema: schema121, + data, + }, + ]; + return false; + } else { + if (data.serviceType !== undefined) { + let data0 = data.serviceType; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate136.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema121.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } else { + validate136.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema121.properties.serviceType.type, + parentSchema: schema121.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceId !== undefined) { + let data1 = data.serviceId; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate136.errors = [ + { + instancePath: instancePath + '/serviceId', + schemaPath: '#/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema121.properties.serviceId.type, + parentSchema: schema121.properties.serviceId, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.remoteServiceId !== undefined) { + let data2 = data.remoteServiceId; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate136.errors = [ + { + instancePath: instancePath + '/remoteServiceId', + schemaPath: '#/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema121.properties.remoteServiceId.type, + parentSchema: schema121.properties.remoteServiceId, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate136.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema121.type, + parentSchema: schema121, + data, + }, + ]; + return false; + } + } + validate136.errors = vErrors; + return errors === 0; +} +exports.validateServiceConfigResponse = validate137; +const schema122 = { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + 'x-standalone': true, + 'x-name': 'ServiceConfigResponse', + 'x-location': '#/components/schemas/service_config_response', + 'x-schema-type': 'response', +}; +function validate137( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.serviceType === undefined && (missing0 = 'serviceType')) || + (data.serviceId === undefined && (missing0 = 'serviceId')) || + (data.remoteServiceId === undefined && (missing0 = 'remoteServiceId')) + ) { + validate137.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema122.required, + parentSchema: schema122, + data, + }, + ]; + return false; + } else { + if (data.serviceType !== undefined) { + let data0 = data.serviceType; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate137.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema122.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } else { + validate137.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema122.properties.serviceType.type, + parentSchema: schema122.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceId !== undefined) { + let data1 = data.serviceId; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate137.errors = [ + { + instancePath: instancePath + '/serviceId', + schemaPath: '#/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema122.properties.serviceId.type, + parentSchema: schema122.properties.serviceId, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.remoteServiceId !== undefined) { + let data2 = data.remoteServiceId; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate137.errors = [ + { + instancePath: instancePath + '/remoteServiceId', + schemaPath: '#/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema122.properties.remoteServiceId.type, + parentSchema: schema122.properties.remoteServiceId, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate137.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema122.type, + parentSchema: schema122, + data, + }, + ]; + return false; + } + } + validate137.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionMessageRequest = validate138; +const schema123 = { + title: 'Create Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'createPeerconnection' }, + connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, + connectionUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + type: 'object', + required: ['serviceType', 'serviceId', 'remoteServiceId'], + title: 'Service Config', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + additionalProperties: true, + }, + }, + tiebreaker: { type: 'boolean' }, + config: { type: 'object', additionalProperties: true }, + }, + required: ['command', 'connectionType', 'connectionUrl', 'services', 'tiebreaker'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CreatePeerconnectionMessageRequest', + 'x-location': '#/components/schemas/create_peerconnection_message_request', + 'x-schema-type': 'request', +}; +function validate138( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema123.allOf[0].allOf[0].required, + parentSchema: schema123.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate138.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema123.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema123.allOf[0].allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema123.allOf[0].allOf[0].type, + parentSchema: schema123.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema123.allOf[0].allOf[1].required, + parentSchema: schema123.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs8 = errors; + if ('command' !== data1) { + validate138.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema123.allOf[0].allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs8 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate138.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema123.allOf[0].allOf[1].properties.command.type, + parentSchema: schema123.allOf[0].allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema123.allOf[0].allOf[1].type, + parentSchema: schema123.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionType === undefined && (missing2 = 'connectionType')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || + (data.services === undefined && (missing2 = 'services')) || + (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) + ) { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema123.allOf[1].required, + parentSchema: schema123.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs13 = errors; + if ('createPeerconnection' !== data3) { + validate138.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'createPeerconnection' }, + message: 'must be equal to constant', + schema: 'createPeerconnection', + parentSchema: schema123.allOf[1].properties.command, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionType !== undefined) { + let data4 = data.connectionType; + const _errs14 = errors; + if (typeof data4 !== 'string') { + validate138.errors = [ + { + instancePath: instancePath + '/connectionType', + schemaPath: '#/allOf/1/properties/connectionType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema123.allOf[1].properties.connectionType.type, + parentSchema: schema123.allOf[1].properties.connectionType, + data: data4, + }, + ]; + return false; + } + if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { + validate138.errors = [ + { + instancePath: instancePath + '/connectionType', + schemaPath: '#/allOf/1/properties/connectionType/enum', + keyword: 'enum', + params: { + allowedValues: schema123.allOf[1].properties.connectionType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema123.allOf[1].properties.connectionType.enum, + parentSchema: schema123.allOf[1].properties.connectionType, + data: data4, + }, + ]; + return false; + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionUrl !== undefined) { + let data5 = data.connectionUrl; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate138.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema123.allOf[1].properties.connectionUrl, + data: data5, + }, + ]; + return false; + } + } else { + validate138.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema123.allOf[1].properties.connectionUrl.type, + parentSchema: schema123.allOf[1].properties.connectionUrl, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.services !== undefined) { + let data6 = data.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data6)) { + var valid5 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing3; + if ( + (data7.serviceType === undefined && + (missing3 = 'serviceType')) || + (data7.serviceId === undefined && + (missing3 = 'serviceId')) || + (data7.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate138.errors = [ + { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/allOf/1/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: + "must have required property '" + missing3 + "'", + schema: + schema123.allOf[1].properties.services.items.required, + parentSchema: + schema123.allOf[1].properties.services.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.serviceType !== undefined) { + let data8 = data7.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate138.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema123.allOf[1].properties.services.items + .properties.serviceType, + data: data8, + }, + ]; + return false; + } + } else { + validate138.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema123.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema123.allOf[1].properties.services.items + .properties.serviceType, + data: data8, + }, + ]; + return false; + } + } + } + var valid6 = _errs23 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data7.serviceId !== undefined) { + let data9 = data7.serviceId; + const _errs25 = errors; + if (typeof data9 !== 'string') { + validate138.errors = [ + { + instancePath: + instancePath + '/services/' + i0 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema123.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema123.allOf[1].properties.services.items + .properties.serviceId, + data: data9, + }, + ]; + return false; + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data7.remoteServiceId !== undefined) { + let data10 = data7.remoteServiceId; + const _errs27 = errors; + if (typeof data10 !== 'string') { + validate138.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema123.allOf[1].properties.services.items + .properties.remoteServiceId.type, + parentSchema: + schema123.allOf[1].properties.services.items + .properties.remoteServiceId, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate138.errors = [ + { + instancePath: instancePath + '/services/' + i0, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema123.allOf[1].properties.services.items.type, + parentSchema: + schema123.allOf[1].properties.services.items, + data: data7, + }, + ]; + return false; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + validate138.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema123.allOf[1].properties.services.type, + parentSchema: schema123.allOf[1].properties.services, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.tiebreaker !== undefined) { + let data11 = data.tiebreaker; + const _errs29 = errors; + if (typeof data11 !== 'boolean') { + validate138.errors = [ + { + instancePath: instancePath + '/tiebreaker', + schemaPath: '#/allOf/1/properties/tiebreaker/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema123.allOf[1].properties.tiebreaker.type, + parentSchema: schema123.allOf[1].properties.tiebreaker, + data: data11, + }, + ]; + return false; + } + var valid4 = _errs29 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.config !== undefined) { + let data12 = data.config; + const _errs31 = errors; + if (errors === _errs31) { + if ( + data12 && + typeof data12 == 'object' && + !Array.isArray(data12) + ) { + } else { + validate138.errors = [ + { + instancePath: instancePath + '/config', + schemaPath: '#/allOf/1/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema123.allOf[1].properties.config.type, + parentSchema: schema123.allOf[1].properties.config, + data: data12, + }, + ]; + return false; + } + } + var valid4 = _errs31 === errors; + } else { + var valid4 = true; + } + } + } + } + } + } + } + } else { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema123.allOf[1].type, + parentSchema: schema123.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate138.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionMessageResponse = validate139; +const schema124 = { + title: 'Create Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'createPeerconnection' }, + connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, + connectionUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + type: 'object', + required: ['serviceType', 'serviceId', 'remoteServiceId'], + title: 'Service Config', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + additionalProperties: true, + }, + }, + tiebreaker: { type: 'boolean' }, + config: { type: 'object', additionalProperties: true }, + }, + required: ['command', 'connectionType', 'connectionUrl', 'services', 'tiebreaker'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CreatePeerconnectionMessageResponse', + 'x-location': '#/components/schemas/create_peerconnection_message_response', + 'x-schema-type': 'response', +}; +function validate139( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema124.allOf[0].allOf[0].required, + parentSchema: schema124.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate139.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema124.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema124.allOf[0].allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema124.allOf[0].allOf[0].type, + parentSchema: schema124.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema124.allOf[0].allOf[1].required, + parentSchema: schema124.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs8 = errors; + if ('command' !== data1) { + validate139.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema124.allOf[0].allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs8 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate139.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema124.allOf[0].allOf[1].properties.command.type, + parentSchema: schema124.allOf[0].allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema124.allOf[0].allOf[1].type, + parentSchema: schema124.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionType === undefined && (missing2 = 'connectionType')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || + (data.services === undefined && (missing2 = 'services')) || + (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) + ) { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema124.allOf[1].required, + parentSchema: schema124.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs13 = errors; + if ('createPeerconnection' !== data3) { + validate139.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'createPeerconnection' }, + message: 'must be equal to constant', + schema: 'createPeerconnection', + parentSchema: schema124.allOf[1].properties.command, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionType !== undefined) { + let data4 = data.connectionType; + const _errs14 = errors; + if (typeof data4 !== 'string') { + validate139.errors = [ + { + instancePath: instancePath + '/connectionType', + schemaPath: '#/allOf/1/properties/connectionType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema124.allOf[1].properties.connectionType.type, + parentSchema: schema124.allOf[1].properties.connectionType, + data: data4, + }, + ]; + return false; + } + if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { + validate139.errors = [ + { + instancePath: instancePath + '/connectionType', + schemaPath: '#/allOf/1/properties/connectionType/enum', + keyword: 'enum', + params: { + allowedValues: schema124.allOf[1].properties.connectionType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema124.allOf[1].properties.connectionType.enum, + parentSchema: schema124.allOf[1].properties.connectionType, + data: data4, + }, + ]; + return false; + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionUrl !== undefined) { + let data5 = data.connectionUrl; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate139.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema124.allOf[1].properties.connectionUrl, + data: data5, + }, + ]; + return false; + } + } else { + validate139.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema124.allOf[1].properties.connectionUrl.type, + parentSchema: schema124.allOf[1].properties.connectionUrl, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.services !== undefined) { + let data6 = data.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data6)) { + var valid5 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing3; + if ( + (data7.serviceType === undefined && + (missing3 = 'serviceType')) || + (data7.serviceId === undefined && + (missing3 = 'serviceId')) || + (data7.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate139.errors = [ + { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/allOf/1/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: + "must have required property '" + missing3 + "'", + schema: + schema124.allOf[1].properties.services.items.required, + parentSchema: + schema124.allOf[1].properties.services.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.serviceType !== undefined) { + let data8 = data7.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate139.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema124.allOf[1].properties.services.items + .properties.serviceType, + data: data8, + }, + ]; + return false; + } + } else { + validate139.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema124.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema124.allOf[1].properties.services.items + .properties.serviceType, + data: data8, + }, + ]; + return false; + } + } + } + var valid6 = _errs23 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data7.serviceId !== undefined) { + let data9 = data7.serviceId; + const _errs25 = errors; + if (typeof data9 !== 'string') { + validate139.errors = [ + { + instancePath: + instancePath + '/services/' + i0 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema124.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema124.allOf[1].properties.services.items + .properties.serviceId, + data: data9, + }, + ]; + return false; + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data7.remoteServiceId !== undefined) { + let data10 = data7.remoteServiceId; + const _errs27 = errors; + if (typeof data10 !== 'string') { + validate139.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema124.allOf[1].properties.services.items + .properties.remoteServiceId.type, + parentSchema: + schema124.allOf[1].properties.services.items + .properties.remoteServiceId, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate139.errors = [ + { + instancePath: instancePath + '/services/' + i0, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema124.allOf[1].properties.services.items.type, + parentSchema: + schema124.allOf[1].properties.services.items, + data: data7, + }, + ]; + return false; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + validate139.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema124.allOf[1].properties.services.type, + parentSchema: schema124.allOf[1].properties.services, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.tiebreaker !== undefined) { + let data11 = data.tiebreaker; + const _errs29 = errors; + if (typeof data11 !== 'boolean') { + validate139.errors = [ + { + instancePath: instancePath + '/tiebreaker', + schemaPath: '#/allOf/1/properties/tiebreaker/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema124.allOf[1].properties.tiebreaker.type, + parentSchema: schema124.allOf[1].properties.tiebreaker, + data: data11, + }, + ]; + return false; + } + var valid4 = _errs29 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.config !== undefined) { + let data12 = data.config; + const _errs31 = errors; + if (errors === _errs31) { + if ( + data12 && + typeof data12 == 'object' && + !Array.isArray(data12) + ) { + } else { + validate139.errors = [ + { + instancePath: instancePath + '/config', + schemaPath: '#/allOf/1/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema124.allOf[1].properties.config.type, + parentSchema: schema124.allOf[1].properties.config, + data: data12, + }, + ]; + return false; + } + } + var valid4 = _errs31 === errors; + } else { + var valid4 = true; + } + } + } + } + } + } + } + } else { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema124.allOf[1].type, + parentSchema: schema124.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate139.errors = vErrors; + return errors === 0; +} +exports.validateClosePeerconnectionMessageRequest = validate140; +const schema125 = { + title: 'Close Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'closePeerconnection' }, + connectionUrl: { type: 'string', format: 'uri' }, + }, + required: ['command', 'connectionUrl'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ClosePeerconnectionMessageRequest', + 'x-location': '#/components/schemas/close_peerconnection_message_request', + 'x-schema-type': 'request', +}; +function validate140( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema125.allOf[0].allOf[0].required, + parentSchema: schema125.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate140.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema125.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema125.allOf[0].allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema125.allOf[0].allOf[0].type, + parentSchema: schema125.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema125.allOf[0].allOf[1].required, + parentSchema: schema125.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs8 = errors; + if ('command' !== data1) { + validate140.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema125.allOf[0].allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs8 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate140.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema125.allOf[0].allOf[1].properties.command.type, + parentSchema: schema125.allOf[0].allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema125.allOf[0].allOf[1].type, + parentSchema: schema125.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) + ) { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema125.allOf[1].required, + parentSchema: schema125.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs13 = errors; + if ('closePeerconnection' !== data3) { + validate140.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'closePeerconnection' }, + message: 'must be equal to constant', + schema: 'closePeerconnection', + parentSchema: schema125.allOf[1].properties.command, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionUrl !== undefined) { + let data4 = data.connectionUrl; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate140.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema125.allOf[1].properties.connectionUrl, + data: data4, + }, + ]; + return false; + } + } else { + validate140.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema125.allOf[1].properties.connectionUrl.type, + parentSchema: schema125.allOf[1].properties.connectionUrl, + data: data4, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema125.allOf[1].type, + parentSchema: schema125.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate140.errors = vErrors; + return errors === 0; +} +exports.validateClosePeerconnectionMessageResponse = validate141; +const schema126 = { + title: 'Close Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'closePeerconnection' }, + connectionUrl: { type: 'string', format: 'uri' }, + }, + required: ['command', 'connectionUrl'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ClosePeerconnectionMessageResponse', + 'x-location': '#/components/schemas/close_peerconnection_message_response', + 'x-schema-type': 'response', +}; +function validate141( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema126.allOf[0].allOf[0].required, + parentSchema: schema126.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate141.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema126.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema126.allOf[0].allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema126.allOf[0].allOf[0].type, + parentSchema: schema126.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema126.allOf[0].allOf[1].required, + parentSchema: schema126.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs8 = errors; + if ('command' !== data1) { + validate141.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema126.allOf[0].allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs8 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate141.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema126.allOf[0].allOf[1].properties.command.type, + parentSchema: schema126.allOf[0].allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema126.allOf[0].allOf[1].type, + parentSchema: schema126.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) + ) { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema126.allOf[1].required, + parentSchema: schema126.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs13 = errors; + if ('closePeerconnection' !== data3) { + validate141.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'closePeerconnection' }, + message: 'must be equal to constant', + schema: 'closePeerconnection', + parentSchema: schema126.allOf[1].properties.command, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionUrl !== undefined) { + let data4 = data.connectionUrl; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate141.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema126.allOf[1].properties.connectionUrl, + data: data4, + }, + ]; + return false; + } + } else { + validate141.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema126.allOf[1].properties.connectionUrl.type, + parentSchema: schema126.allOf[1].properties.connectionUrl, + data: data4, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema126.allOf[1].type, + parentSchema: schema126.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate141.errors = vErrors; + return errors === 0; +} +exports.validateSignalingMessageRequest = validate142; +const schema127 = { + title: 'Signaling Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'signaling' }, + signalingType: { type: 'string' }, + connectionUrl: { type: 'string', format: 'uri' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'signalingType', 'connectionUrl', 'content'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'SignalingMessageRequest', + 'x-location': '#/components/schemas/signaling_message_request', + 'x-schema-type': 'request', +}; +function validate142( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate142.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema127.allOf[0].required, + parentSchema: schema127.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate142.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema127.allOf[0].properties.messageType.type, + parentSchema: schema127.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate142.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema127.allOf[0].type, + parentSchema: schema127.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.signalingType === undefined && (missing1 = 'signalingType')) || + (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || + (data.content === undefined && (missing1 = 'content')) + ) { + validate142.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema127.allOf[1].required, + parentSchema: schema127.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('signaling' !== data1) { + validate142.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'signaling' }, + message: 'must be equal to constant', + schema: 'signaling', + parentSchema: schema127.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.signalingType !== undefined) { + let data2 = data.signalingType; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate142.errors = [ + { + instancePath: instancePath + '/signalingType', + schemaPath: '#/allOf/1/properties/signalingType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema127.allOf[1].properties.signalingType.type, + parentSchema: schema127.allOf[1].properties.signalingType, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.connectionUrl !== undefined) { + let data3 = data.connectionUrl; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate142.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema127.allOf[1].properties.connectionUrl, + data: data3, + }, + ]; + return false; + } + } else { + validate142.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema127.allOf[1].properties.connectionUrl.type, + parentSchema: schema127.allOf[1].properties.connectionUrl, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.content !== undefined) { + let data4 = data.content; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + } else { + validate142.errors = [ + { + instancePath: instancePath + '/content', + schemaPath: '#/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema127.allOf[1].properties.content.type, + parentSchema: schema127.allOf[1].properties.content, + data: data4, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } else { + validate142.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema127.allOf[1].type, + parentSchema: schema127.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate142.errors = vErrors; + return errors === 0; +} +exports.validateSignalingMessageResponse = validate143; +const schema128 = { + title: 'Signaling Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'signaling' }, + signalingType: { type: 'string' }, + connectionUrl: { type: 'string', format: 'uri' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'signalingType', 'connectionUrl', 'content'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'SignalingMessageResponse', + 'x-location': '#/components/schemas/signaling_message_response', + 'x-schema-type': 'response', +}; +function validate143( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate143.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema128.allOf[0].required, + parentSchema: schema128.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate143.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema128.allOf[0].properties.messageType.type, + parentSchema: schema128.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate143.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema128.allOf[0].type, + parentSchema: schema128.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.signalingType === undefined && (missing1 = 'signalingType')) || + (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || + (data.content === undefined && (missing1 = 'content')) + ) { + validate143.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema128.allOf[1].required, + parentSchema: schema128.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('signaling' !== data1) { + validate143.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'signaling' }, + message: 'must be equal to constant', + schema: 'signaling', + parentSchema: schema128.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.signalingType !== undefined) { + let data2 = data.signalingType; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate143.errors = [ + { + instancePath: instancePath + '/signalingType', + schemaPath: '#/allOf/1/properties/signalingType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema128.allOf[1].properties.signalingType.type, + parentSchema: schema128.allOf[1].properties.signalingType, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.connectionUrl !== undefined) { + let data3 = data.connectionUrl; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate143.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema128.allOf[1].properties.connectionUrl, + data: data3, + }, + ]; + return false; + } + } else { + validate143.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema128.allOf[1].properties.connectionUrl.type, + parentSchema: schema128.allOf[1].properties.connectionUrl, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.content !== undefined) { + let data4 = data.content; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + } else { + validate143.errors = [ + { + instancePath: instancePath + '/content', + schemaPath: '#/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema128.allOf[1].properties.content.type, + parentSchema: schema128.allOf[1].properties.content, + data: data4, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } else { + validate143.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema128.allOf[1].type, + parentSchema: schema128.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate143.errors = vErrors; + return errors === 0; +} +exports.validateConfigurationMessageRequest = validate144; +const schema129 = { + title: 'Configuration Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'configuration' }, + configuration: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'configuration'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConfigurationMessageRequest', + 'x-location': '#/components/schemas/configuration_message_request', + 'x-schema-type': 'request', +}; +function validate144( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate144.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema129.allOf[0].required, + parentSchema: schema129.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate144.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema129.allOf[0].properties.messageType.type, + parentSchema: schema129.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate144.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema129.allOf[0].type, + parentSchema: schema129.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.configuration === undefined && (missing1 = 'configuration')) + ) { + validate144.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema129.allOf[1].required, + parentSchema: schema129.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('configuration' !== data1) { + validate144.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'configuration' }, + message: 'must be equal to constant', + schema: 'configuration', + parentSchema: schema129.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.configuration !== undefined) { + let data2 = data.configuration; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + } else { + validate144.errors = [ + { + instancePath: instancePath + '/configuration', + schemaPath: '#/allOf/1/properties/configuration/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema129.allOf[1].properties.configuration.type, + parentSchema: schema129.allOf[1].properties.configuration, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate144.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema129.allOf[1].type, + parentSchema: schema129.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate144.errors = vErrors; + return errors === 0; +} +exports.validateConfigurationMessageResponse = validate145; +const schema130 = { + title: 'Configuration Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'configuration' }, + configuration: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'configuration'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConfigurationMessageResponse', + 'x-location': '#/components/schemas/configuration_message_response', + 'x-schema-type': 'response', +}; +function validate145( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate145.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema130.allOf[0].required, + parentSchema: schema130.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate145.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema130.allOf[0].properties.messageType.type, + parentSchema: schema130.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate145.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema130.allOf[0].type, + parentSchema: schema130.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.configuration === undefined && (missing1 = 'configuration')) + ) { + validate145.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema130.allOf[1].required, + parentSchema: schema130.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('configuration' !== data1) { + validate145.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'configuration' }, + message: 'must be equal to constant', + schema: 'configuration', + parentSchema: schema130.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.configuration !== undefined) { + let data2 = data.configuration; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + } else { + validate145.errors = [ + { + instancePath: instancePath + '/configuration', + schemaPath: '#/allOf/1/properties/configuration/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema130.allOf[1].properties.configuration.type, + parentSchema: schema130.allOf[1].properties.configuration, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate145.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema130.allOf[1].type, + parentSchema: schema130.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate145.errors = vErrors; + return errors === 0; +} +exports.validateExperimentStatusChangedMessageRequest = validate146; +const schema131 = { + title: 'Experiment Status Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'experiment-status-changed' }, + status: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['messageType', 'status'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ExperimentStatusChangedMessageRequest', + 'x-location': '#/components/schemas/experiment_status_changed_message_request', + 'x-schema-type': 'request', +}; +function validate146( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate146.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema131.allOf[0].required, + parentSchema: schema131.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate146.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema131.allOf[0].properties.messageType.type, + parentSchema: schema131.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate146.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema131.allOf[0].type, + parentSchema: schema131.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.status === undefined && (missing1 = 'status')) + ) { + validate146.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema131.allOf[1].required, + parentSchema: schema131.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('experiment-status-changed' !== data1) { + validate146.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'experiment-status-changed' }, + message: 'must be equal to constant', + schema: 'experiment-status-changed', + parentSchema: schema131.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate146.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema131.allOf[1].properties.status.type, + parentSchema: schema131.allOf[1].properties.status, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.message !== undefined) { + let data3 = data.message; + const _errs10 = errors; + if (typeof data3 !== 'string') { + validate146.errors = [ + { + instancePath: instancePath + '/message', + schemaPath: '#/allOf/1/properties/message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema131.allOf[1].properties.message.type, + parentSchema: schema131.allOf[1].properties.message, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate146.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema131.allOf[1].type, + parentSchema: schema131.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate146.errors = vErrors; + return errors === 0; +} +exports.validateExperimentStatusChangedMessageResponse = validate147; +const schema132 = { + title: 'Experiment Status Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'experiment-status-changed' }, + status: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['messageType', 'status'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ExperimentStatusChangedMessageResponse', + 'x-location': '#/components/schemas/experiment_status_changed_message_response', + 'x-schema-type': 'response', +}; +function validate147( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate147.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema132.allOf[0].required, + parentSchema: schema132.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate147.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema132.allOf[0].properties.messageType.type, + parentSchema: schema132.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate147.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema132.allOf[0].type, + parentSchema: schema132.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.status === undefined && (missing1 = 'status')) + ) { + validate147.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema132.allOf[1].required, + parentSchema: schema132.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('experiment-status-changed' !== data1) { + validate147.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'experiment-status-changed' }, + message: 'must be equal to constant', + schema: 'experiment-status-changed', + parentSchema: schema132.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate147.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema132.allOf[1].properties.status.type, + parentSchema: schema132.allOf[1].properties.status, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.message !== undefined) { + let data3 = data.message; + const _errs10 = errors; + if (typeof data3 !== 'string') { + validate147.errors = [ + { + instancePath: instancePath + '/message', + schemaPath: '#/allOf/1/properties/message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema132.allOf[1].properties.message.type, + parentSchema: schema132.allOf[1].properties.message, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate147.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema132.allOf[1].type, + parentSchema: schema132.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate147.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStatusRequest = validate148; +const schema133 = { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + 'x-standalone': true, + 'x-name': 'ConnectionStatusRequest', + 'x-location': '#/components/schemas/peerconnection_status_request', + 'x-schema-type': 'request', +}; +function validate148( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate148.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema133.type, + parentSchema: schema133, + data, + }, + ]; + return false; + } + if ( + !( + data === 'new' || + data === 'connecting' || + data === 'connected' || + data === 'disconnected' || + data === 'failed' || + data === 'closed' + ) + ) { + validate148.errors = [ + { + instancePath, + schemaPath: '#/enum', + keyword: 'enum', + params: { allowedValues: schema133.enum }, + message: 'must be equal to one of the allowed values', + schema: schema133.enum, + parentSchema: schema133, + data, + }, + ]; + return false; + } + validate148.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStatusResponse = validate149; +const schema134 = { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + 'x-standalone': true, + 'x-name': 'ConnectionStatusResponse', + 'x-location': '#/components/schemas/peerconnection_status_response', + 'x-schema-type': 'response', +}; +function validate149( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate149.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema134.type, + parentSchema: schema134, + data, + }, + ]; + return false; + } + if ( + !( + data === 'new' || + data === 'connecting' || + data === 'connected' || + data === 'disconnected' || + data === 'failed' || + data === 'closed' + ) + ) { + validate149.errors = [ + { + instancePath, + schemaPath: '#/enum', + keyword: 'enum', + params: { allowedValues: schema134.enum }, + message: 'must be equal to one of the allowed values', + schema: schema134.enum, + parentSchema: schema134, + data, + }, + ]; + return false; + } + validate149.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionCommonRequest = validate150; +const schema135 = { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + 'x-standalone': true, + 'x-name': 'PeerconnectionCommonRequest', + 'x-location': '#/components/schemas/peerconnection_common_request', + 'x-schema-type': 'request', +}; +function validate150( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate150.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema135.required, + parentSchema: schema135, + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate150.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema135.properties.type.type, + parentSchema: schema135.properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate150.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema135.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema135.properties.type.enum, + parentSchema: schema135.properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate150.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema135.type, + parentSchema: schema135, + data, + }, + ]; + return false; + } + } + validate150.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionCommonResponse = validate151; +const schema136 = { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + 'x-standalone': true, + 'x-name': 'PeerconnectionCommonResponse', + 'x-location': '#/components/schemas/peerconnection_common_response', + 'x-schema-type': 'response', +}; +function validate151( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate151.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema136.required, + parentSchema: schema136, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate151.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema136.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate151.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema136.properties.url.type, + parentSchema: schema136.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate151.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema136.properties.type.type, + parentSchema: schema136.properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate151.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema136.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema136.properties.type.enum, + parentSchema: schema136.properties.type, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate151.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema136.properties.status.type, + parentSchema: schema136.properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate151.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema136.properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema136.properties.status.enum, + parentSchema: schema136.properties.status, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate151.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema136.type, + parentSchema: schema136, + data, + }, + ]; + return false; + } + } + validate151.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionOverviewRequest = validate152; +const schema137 = { + title: 'Peerconnection Overview', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-standalone': true, + 'x-name': 'PeerconnectionOverviewRequest', + 'x-location': '#/components/schemas/peerconnection_overview_request', + 'x-schema-type': 'request', +}; +function validate152( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate152.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema137.allOf[0].required, + parentSchema: schema137.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate152.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema137.allOf[0].properties.type.type, + parentSchema: schema137.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate152.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema137.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema137.allOf[0].properties.type.enum, + parentSchema: schema137.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate152.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema137.allOf[0].type, + parentSchema: schema137.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate152.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema137.allOf[1].required, + parentSchema: schema137.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate152.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema137.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate152.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema137.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate152.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema137.allOf[1].properties.devices.items.required, + parentSchema: schema137.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate152.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema137.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate152.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema137.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema137.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + } + } + } else { + validate152.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema137.allOf[1].properties.devices.items.type, + parentSchema: schema137.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate152.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema137.allOf[1].properties.devices.type, + parentSchema: schema137.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate152.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema137.allOf[1].type, + parentSchema: schema137.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate152.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionOverviewResponse = validate153; +const schema138 = { + title: 'Peerconnection Overview', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-standalone': true, + 'x-name': 'PeerconnectionOverviewResponse', + 'x-location': '#/components/schemas/peerconnection_overview_response', + 'x-schema-type': 'response', +}; +function validate153( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate153.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema138.allOf[0].required, + parentSchema: schema138.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate153.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema138.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate153.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema138.allOf[0].properties.url.type, + parentSchema: schema138.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate153.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema138.allOf[0].properties.type.type, + parentSchema: schema138.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate153.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema138.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema138.allOf[0].properties.type.enum, + parentSchema: schema138.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate153.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema138.allOf[0].properties.status.type, + parentSchema: schema138.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate153.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema138.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema138.allOf[0].properties.status.enum, + parentSchema: schema138.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate153.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema138.allOf[0].type, + parentSchema: schema138.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate153.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema138.allOf[1].required, + parentSchema: schema138.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate153.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema138.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate153.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema138.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate153.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema138.allOf[1].properties.devices.items.required, + parentSchema: schema138.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate153.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema138.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate153.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema138.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema138.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + } + } + } else { + validate153.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema138.allOf[1].properties.devices.items.type, + parentSchema: schema138.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate153.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema138.allOf[1].properties.devices.type, + parentSchema: schema138.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate153.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema138.allOf[1].type, + parentSchema: schema138.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate153.errors = vErrors; + return errors === 0; +} +exports.validateConfiguredDeviceReferenceRequest = validate154; +const schema139 = { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'ConfiguredDeviceReferenceRequest', + 'x-location': '#/components/schemas/configured_device_reference_request', + 'x-schema-type': 'request', +}; +function validate154( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate154.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema139.required, + parentSchema: schema139, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate154.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema139.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate154.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema139.properties.url.type, + parentSchema: schema139.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.config !== undefined) { + let data1 = data.config; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + if (data1.services !== undefined) { + let data2 = data1.services; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len0 = data2.length; + for (let i0 = 0; i0 < len0; i0++) { + let data3 = data2[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.serviceType === undefined && + (missing1 = 'serviceType')) || + (data3.serviceId === undefined && + (missing1 = 'serviceId')) || + (data3.remoteServiceId === undefined && + (missing1 = 'remoteServiceId')) + ) { + validate154.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema139.properties.config.properties.services.items + .required, + parentSchema: + schema139.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.serviceType !== undefined) { + let data4 = data3.serviceType; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate154.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema139.properties.config.properties + .services.items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } else { + validate154.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema139.properties.config.properties + .services.items.properties.serviceType.type, + parentSchema: + schema139.properties.config.properties + .services.items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs10 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.serviceId !== undefined) { + let data5 = data3.serviceId; + const _errs12 = errors; + if (typeof data5 !== 'string') { + validate154.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceId', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema139.properties.config.properties.services + .items.properties.serviceId.type, + parentSchema: + schema139.properties.config.properties.services + .items.properties.serviceId, + data: data5, + }, + ]; + return false; + } + var valid3 = _errs12 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.remoteServiceId !== undefined) { + let data6 = data3.remoteServiceId; + const _errs14 = errors; + if (typeof data6 !== 'string') { + validate154.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema139.properties.config.properties + .services.items.properties.remoteServiceId + .type, + parentSchema: + schema139.properties.config.properties + .services.items.properties.remoteServiceId, + data: data6, + }, + ]; + return false; + } + var valid3 = _errs14 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + validate154.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema139.properties.config.properties.services.items + .type, + parentSchema: + schema139.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate154.errors = [ + { + instancePath: instancePath + '/config/services', + schemaPath: '#/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema139.properties.config.properties.services.type, + parentSchema: schema139.properties.config.properties.services, + data: data2, + }, + ]; + return false; + } + } + } + } else { + validate154.errors = [ + { + instancePath: instancePath + '/config', + schemaPath: '#/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema139.properties.config.type, + parentSchema: schema139.properties.config, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate154.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema139.type, + parentSchema: schema139, + data, + }, + ]; + return false; + } + } + validate154.errors = vErrors; + return errors === 0; +} +exports.validateConfiguredDeviceReferenceResponse = validate155; +const schema140 = { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'ConfiguredDeviceReferenceResponse', + 'x-location': '#/components/schemas/configured_device_reference_response', + 'x-schema-type': 'response', +}; +function validate155( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate155.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema140.required, + parentSchema: schema140, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate155.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema140.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate155.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema140.properties.url.type, + parentSchema: schema140.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.config !== undefined) { + let data1 = data.config; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + if (data1.services !== undefined) { + let data2 = data1.services; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len0 = data2.length; + for (let i0 = 0; i0 < len0; i0++) { + let data3 = data2[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.serviceType === undefined && + (missing1 = 'serviceType')) || + (data3.serviceId === undefined && + (missing1 = 'serviceId')) || + (data3.remoteServiceId === undefined && + (missing1 = 'remoteServiceId')) + ) { + validate155.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema140.properties.config.properties.services.items + .required, + parentSchema: + schema140.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.serviceType !== undefined) { + let data4 = data3.serviceType; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate155.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema140.properties.config.properties + .services.items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } else { + validate155.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema140.properties.config.properties + .services.items.properties.serviceType.type, + parentSchema: + schema140.properties.config.properties + .services.items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs10 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.serviceId !== undefined) { + let data5 = data3.serviceId; + const _errs12 = errors; + if (typeof data5 !== 'string') { + validate155.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceId', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema140.properties.config.properties.services + .items.properties.serviceId.type, + parentSchema: + schema140.properties.config.properties.services + .items.properties.serviceId, + data: data5, + }, + ]; + return false; + } + var valid3 = _errs12 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.remoteServiceId !== undefined) { + let data6 = data3.remoteServiceId; + const _errs14 = errors; + if (typeof data6 !== 'string') { + validate155.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema140.properties.config.properties + .services.items.properties.remoteServiceId + .type, + parentSchema: + schema140.properties.config.properties + .services.items.properties.remoteServiceId, + data: data6, + }, + ]; + return false; + } + var valid3 = _errs14 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + validate155.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema140.properties.config.properties.services.items + .type, + parentSchema: + schema140.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate155.errors = [ + { + instancePath: instancePath + '/config/services', + schemaPath: '#/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema140.properties.config.properties.services.type, + parentSchema: schema140.properties.config.properties.services, + data: data2, + }, + ]; + return false; + } + } + } + } else { + validate155.errors = [ + { + instancePath: instancePath + '/config', + schemaPath: '#/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema140.properties.config.type, + parentSchema: schema140.properties.config, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate155.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema140.type, + parentSchema: schema140, + data, + }, + ]; + return false; + } + } + validate155.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionRequest = validate156; +const schema141 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionRequest', + 'x-location': '#/components/schemas/peerconnection_request', + 'x-schema-type': 'request', +}; +function validate156( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate156.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema141.allOf[0].required, + parentSchema: schema141.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate156.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema141.allOf[0].properties.type.type, + parentSchema: schema141.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate156.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema141.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema141.allOf[0].properties.type.enum, + parentSchema: schema141.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate156.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema141.allOf[0].type, + parentSchema: schema141.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate156.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema141.allOf[1].required, + parentSchema: schema141.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate156.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema141.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate156.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema141.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate156.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema141.allOf[1].properties.devices.items.required, + parentSchema: schema141.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate156.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema141.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate156.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema141.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema141.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data2.config !== undefined) { + let data4 = data2.config; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data4 && + typeof data4 == 'object' && + !Array.isArray(data4) + ) { + if (data4.services !== undefined) { + let data5 = data4.services; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid6 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing3; + if ( + (data6.serviceType === undefined && + (missing3 = 'serviceType')) || + (data6.serviceId === undefined && + (missing3 = 'serviceId')) || + (data6.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema141.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema141.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.serviceType !== undefined) { + let data7 = data6.serviceType; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema141.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } else { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema141.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema141.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } + } + var valid7 = _errs19 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data6.serviceId !== undefined) { + let data8 = data6.serviceId; + const _errs21 = errors; + if (typeof data8 !== 'string') { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema141.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema141.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data8, + }, + ]; + return false; + } + var valid7 = _errs21 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data6.remoteServiceId !== + undefined + ) { + let data9 = data6.remoteServiceId; + const _errs23 = errors; + if (typeof data9 !== 'string') { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema141.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema141.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data9, + }, + ]; + return false; + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema141.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema141.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } + } + var valid6 = _errs16 === errors; + if (!valid6) { + break; + } + } + } else { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema141.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema141.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate156.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema141.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema141.allOf[1].properties.devices.items + .properties.config, + data: data4, + }, + ]; + return false; + } + } + var valid4 = _errs12 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate156.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema141.allOf[1].properties.devices.items.type, + parentSchema: schema141.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate156.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema141.allOf[1].properties.devices.type, + parentSchema: schema141.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate156.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema141.allOf[1].type, + parentSchema: schema141.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate156.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionResponse = validate157; +const schema142 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionResponse', + 'x-location': '#/components/schemas/peerconnection_response', + 'x-schema-type': 'response', +}; +function validate157( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate157.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema142.allOf[0].required, + parentSchema: schema142.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate157.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema142.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate157.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema142.allOf[0].properties.url.type, + parentSchema: schema142.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate157.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema142.allOf[0].properties.type.type, + parentSchema: schema142.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate157.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema142.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema142.allOf[0].properties.type.enum, + parentSchema: schema142.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate157.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema142.allOf[0].properties.status.type, + parentSchema: schema142.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate157.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema142.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema142.allOf[0].properties.status.enum, + parentSchema: schema142.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate157.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema142.allOf[0].type, + parentSchema: schema142.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate157.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema142.allOf[1].required, + parentSchema: schema142.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate157.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema142.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate157.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema142.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate157.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema142.allOf[1].properties.devices.items.required, + parentSchema: schema142.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate157.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema142.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate157.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema142.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema142.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema142.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema142.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema142.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema142.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema142.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema142.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema142.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema142.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema142.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema142.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema142.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema142.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema142.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate157.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema142.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema142.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate157.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema142.allOf[1].properties.devices.items.type, + parentSchema: schema142.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate157.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema142.allOf[1].properties.devices.type, + parentSchema: schema142.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate157.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema142.allOf[1].type, + parentSchema: schema142.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate157.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionClosedEventCallbackRequest = validate158; +const schema143 = { + title: 'Peerconnection Closed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-closed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionClosedEventCallbackRequest', + 'x-location': '#/components/schemas/peerconnection_closed_request', + 'x-schema-type': 'request', +}; +function validate158( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema143.allOf[0].allOf[0].required, + parentSchema: schema143.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate158.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema143.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema143.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema143.allOf[0].allOf[0].type, + parentSchema: schema143.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema143.allOf[0].allOf[1].required, + parentSchema: schema143.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate158.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema143.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema143.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate158.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema143.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema143.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema143.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate158.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema143.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema143.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema143.allOf[0].allOf[1].type, + parentSchema: schema143.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema143.allOf[1].required, + parentSchema: schema143.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate158.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema143.allOf[1].properties.eventType.type, + parentSchema: schema143.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-closed')) { + validate158.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema143.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema143.allOf[1].properties.eventType.enum, + parentSchema: schema143.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if (data4.type === undefined && (missing3 = 'type')) { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema143.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.type !== undefined) { + let data5 = data4.type; + if (typeof data5 !== 'string') { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema143.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data5, + }, + ]; + return false; + } + if (!(data5 === 'local' || data5 === 'webrtc')) { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema143.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema143.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema143.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema143.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs20 = errors; + if (errors === _errs20) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema143.allOf[1].properties.peerconnection.allOf[1] + .required, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data6 = data4.devices; + const _errs22 = errors; + if (errors === _errs22) { + if (Array.isArray(data6)) { + if (data6.length > 2) { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data6, + }, + ]; + return false; + } else { + if (data6.length < 2) { + validate158.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema143.allOf[1].properties.peerconnection + .allOf[1].properties.devices, + data: data6, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs24 = errors; + if (errors === _errs24) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing5; + if (data7.url === undefined && (missing5 = 'url')) { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema143.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema143.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs26 = errors; + if (errors === _errs26) { + if (errors === _errs26) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } + } + var valid9 = _errs26 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data7.config !== undefined) { + let data9 = data7.config; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + if (data9.services !== undefined) { + let data10 = data9.services; + const _errs30 = errors; + if (errors === _errs30) { + if (Array.isArray(data10)) { + var valid11 = true; + const len1 = data10.length; + for (let i1 = 0; i1 < len1; i1++) { + let data11 = data10[i1]; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + let missing6; + if ( + (data11.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data11.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data11.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema143.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema143.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data11, + }, + ]; + return false; + } else { + if ( + data11.serviceType !== + undefined + ) { + let data12 = + data11.serviceType; + const _errs35 = errors; + if (errors === _errs35) { + if ( + errors === _errs35 + ) { + if ( + typeof data12 === + 'string' + ) { + if ( + !formats0(data12) + ) { + validate158.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data12, + }, + ]; + return false; + } + } else { + validate158.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data12, + }, + ]; + return false; + } + } + } + var valid12 = + _errs35 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data11.serviceId !== + undefined + ) { + let data13 = + data11.serviceId; + const _errs37 = errors; + if ( + typeof data13 !== + 'string' + ) { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data13, + }, + ]; + return false; + } + var valid12 = + _errs37 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data11.remoteServiceId !== + undefined + ) { + let data14 = + data11.remoteServiceId; + const _errs39 = + errors; + if ( + typeof data14 !== + 'string' + ) { + validate158.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data14, + }, + ]; + return false; + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema143.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema143.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data11, + }, + ]; + return false; + } + } + var valid11 = _errs32 === errors; + if (!valid11) { + break; + } + } + } else { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data10, + }, + ]; + return false; + } + } + } + } else { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data9, + }, + ]; + return false; + } + } + var valid9 = _errs28 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema143.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema143.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data7, + }, + ]; + return false; + } + } + var valid8 = _errs24 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema143.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data6, + }, + ]; + return false; + } + } + } + } + } else { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema143.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs20 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema143.allOf[1].type, + parentSchema: schema143.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate158.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionClosedEventCallbackResponse = validate159; +const schema144 = { + title: 'Peerconnection Closed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-closed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: [ + 'new', + 'connecting', + 'connected', + 'disconnected', + 'failed', + 'closed', + ], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionClosedEventCallbackResponse', + 'x-location': '#/components/schemas/peerconnection_closed_response', + 'x-schema-type': 'response', +}; +function validate159( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema144.allOf[0].allOf[0].required, + parentSchema: schema144.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema144.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema144.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema144.allOf[0].allOf[0].type, + parentSchema: schema144.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema144.allOf[0].allOf[1].required, + parentSchema: schema144.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema144.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema144.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate159.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema144.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema144.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema144.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema144.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema144.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema144.allOf[0].allOf[1].type, + parentSchema: schema144.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema144.allOf[1].required, + parentSchema: schema144.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema144.allOf[1].properties.eventType.type, + parentSchema: schema144.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-closed')) { + validate159.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema144.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema144.allOf[1].properties.eventType.enum, + parentSchema: schema144.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.url === undefined && (missing3 = 'url')) || + (data4.type === undefined && (missing3 = 'type')) || + (data4.status === undefined && (missing3 = 'status')) + ) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema144.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.url.type, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid6 = _errs18 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.type !== undefined) { + let data6 = data4.type; + const _errs20 = errors; + if (typeof data6 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'local' || data6 === 'webrtc')) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + var valid6 = _errs20 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.status !== undefined) { + let data7 = data4.status; + const _errs22 = errors; + if (typeof data7 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.status.type, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'new' || + data7 === 'connecting' || + data7 === 'connected' || + data7 === 'disconnected' || + data7 === 'failed' || + data7 === 'closed' + ) + ) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + var valid6 = _errs22 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema144.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema144.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs24 = errors; + if (errors === _errs24) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema144.allOf[1].properties.peerconnection.allOf[1] + .required, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data8 = data4.devices; + const _errs26 = errors; + if (errors === _errs26) { + if (Array.isArray(data8)) { + if (data8.length > 2) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + if (data8.length < 2) { + validate159.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema144.allOf[1].properties.peerconnection + .allOf[1].properties.devices, + data: data8, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data8.length; + for (let i0 = 0; i0 < len0; i0++) { + let data9 = data8[i0]; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing5; + if (data9.url === undefined && (missing5 = 'url')) { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema144.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema144.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs30 = errors; + if (errors === _errs30) { + if (errors === _errs30) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + var valid9 = _errs30 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data9.config !== undefined) { + let data11 = data9.config; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + if (data11.services !== undefined) { + let data12 = data11.services; + const _errs34 = errors; + if (errors === _errs34) { + if (Array.isArray(data12)) { + var valid11 = true; + const len1 = data12.length; + for (let i1 = 0; i1 < len1; i1++) { + let data13 = data12[i1]; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == 'object' && + !Array.isArray(data13) + ) { + let missing6; + if ( + (data13.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data13.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data13.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema144.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema144.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } else { + if ( + data13.serviceType !== + undefined + ) { + let data14 = + data13.serviceType; + const _errs39 = errors; + if (errors === _errs39) { + if ( + errors === _errs39 + ) { + if ( + typeof data14 === + 'string' + ) { + if ( + !formats0(data14) + ) { + validate159.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate159.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.serviceId !== + undefined + ) { + let data15 = + data13.serviceId; + const _errs41 = errors; + if ( + typeof data15 !== + 'string' + ) { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid12 = + _errs41 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.remoteServiceId !== + undefined + ) { + let data16 = + data13.remoteServiceId; + const _errs43 = + errors; + if ( + typeof data16 !== + 'string' + ) { + validate159.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data16, + }, + ]; + return false; + } + var valid12 = + _errs43 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema144.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema144.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } + } + var valid11 = _errs36 === errors; + if (!valid11) { + break; + } + } + } else { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data12, + }, + ]; + return false; + } + } + } + } else { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data11, + }, + ]; + return false; + } + } + var valid9 = _errs32 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema144.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema144.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } + } + var valid8 = _errs28 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema144.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } + } + } + } + } else { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema144.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs24 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema144.allOf[1].type, + parentSchema: schema144.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate159.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionStatusChangedEventCallbackRequest = validate160; +const schema145 = { + title: 'Peerconnection Status Changed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-status-changed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionStatusChangedEventCallbackRequest', + 'x-location': '#/components/schemas/peerconnection_status_changed_request', + 'x-schema-type': 'request', +}; +function validate160( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema145.allOf[0].allOf[0].required, + parentSchema: schema145.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate160.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema145.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema145.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema145.allOf[0].allOf[0].type, + parentSchema: schema145.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema145.allOf[0].allOf[1].required, + parentSchema: schema145.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate160.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema145.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema145.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate160.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema145.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema145.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema145.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate160.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema145.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema145.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema145.allOf[0].allOf[1].type, + parentSchema: schema145.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema145.allOf[1].required, + parentSchema: schema145.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate160.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema145.allOf[1].properties.eventType.type, + parentSchema: schema145.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-status-changed')) { + validate160.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema145.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema145.allOf[1].properties.eventType.enum, + parentSchema: schema145.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if (data4.type === undefined && (missing3 = 'type')) { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema145.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.type !== undefined) { + let data5 = data4.type; + if (typeof data5 !== 'string') { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema145.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data5, + }, + ]; + return false; + } + if (!(data5 === 'local' || data5 === 'webrtc')) { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema145.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema145.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema145.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema145.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs20 = errors; + if (errors === _errs20) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema145.allOf[1].properties.peerconnection.allOf[1] + .required, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data6 = data4.devices; + const _errs22 = errors; + if (errors === _errs22) { + if (Array.isArray(data6)) { + if (data6.length > 2) { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data6, + }, + ]; + return false; + } else { + if (data6.length < 2) { + validate160.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema145.allOf[1].properties.peerconnection + .allOf[1].properties.devices, + data: data6, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs24 = errors; + if (errors === _errs24) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing5; + if (data7.url === undefined && (missing5 = 'url')) { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema145.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema145.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs26 = errors; + if (errors === _errs26) { + if (errors === _errs26) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } + } + var valid9 = _errs26 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data7.config !== undefined) { + let data9 = data7.config; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + if (data9.services !== undefined) { + let data10 = data9.services; + const _errs30 = errors; + if (errors === _errs30) { + if (Array.isArray(data10)) { + var valid11 = true; + const len1 = data10.length; + for (let i1 = 0; i1 < len1; i1++) { + let data11 = data10[i1]; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + let missing6; + if ( + (data11.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data11.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data11.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema145.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema145.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data11, + }, + ]; + return false; + } else { + if ( + data11.serviceType !== + undefined + ) { + let data12 = + data11.serviceType; + const _errs35 = errors; + if (errors === _errs35) { + if ( + errors === _errs35 + ) { + if ( + typeof data12 === + 'string' + ) { + if ( + !formats0(data12) + ) { + validate160.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data12, + }, + ]; + return false; + } + } else { + validate160.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data12, + }, + ]; + return false; + } + } + } + var valid12 = + _errs35 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data11.serviceId !== + undefined + ) { + let data13 = + data11.serviceId; + const _errs37 = errors; + if ( + typeof data13 !== + 'string' + ) { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data13, + }, + ]; + return false; + } + var valid12 = + _errs37 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data11.remoteServiceId !== + undefined + ) { + let data14 = + data11.remoteServiceId; + const _errs39 = + errors; + if ( + typeof data14 !== + 'string' + ) { + validate160.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data14, + }, + ]; + return false; + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema145.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema145.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data11, + }, + ]; + return false; + } + } + var valid11 = _errs32 === errors; + if (!valid11) { + break; + } + } + } else { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data10, + }, + ]; + return false; + } + } + } + } else { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data9, + }, + ]; + return false; + } + } + var valid9 = _errs28 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema145.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema145.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data7, + }, + ]; + return false; + } + } + var valid8 = _errs24 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema145.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data6, + }, + ]; + return false; + } + } + } + } + } else { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema145.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs20 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema145.allOf[1].type, + parentSchema: schema145.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate160.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionStatusChangedEventCallbackResponse = validate161; +const schema146 = { + title: 'Peerconnection Status Changed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-status-changed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: [ + 'new', + 'connecting', + 'connected', + 'disconnected', + 'failed', + 'closed', + ], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionStatusChangedEventCallbackResponse', + 'x-location': '#/components/schemas/peerconnection_status_changed_response', + 'x-schema-type': 'response', +}; +function validate161( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema146.allOf[0].allOf[0].required, + parentSchema: schema146.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema146.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema146.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema146.allOf[0].allOf[0].type, + parentSchema: schema146.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema146.allOf[0].allOf[1].required, + parentSchema: schema146.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema146.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema146.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate161.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema146.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema146.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema146.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema146.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema146.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema146.allOf[0].allOf[1].type, + parentSchema: schema146.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema146.allOf[1].required, + parentSchema: schema146.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema146.allOf[1].properties.eventType.type, + parentSchema: schema146.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-status-changed')) { + validate161.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema146.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema146.allOf[1].properties.eventType.enum, + parentSchema: schema146.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.url === undefined && (missing3 = 'url')) || + (data4.type === undefined && (missing3 = 'type')) || + (data4.status === undefined && (missing3 = 'status')) + ) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema146.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.url.type, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid6 = _errs18 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.type !== undefined) { + let data6 = data4.type; + const _errs20 = errors; + if (typeof data6 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'local' || data6 === 'webrtc')) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + var valid6 = _errs20 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.status !== undefined) { + let data7 = data4.status; + const _errs22 = errors; + if (typeof data7 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.status.type, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'new' || + data7 === 'connecting' || + data7 === 'connected' || + data7 === 'disconnected' || + data7 === 'failed' || + data7 === 'closed' + ) + ) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + var valid6 = _errs22 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema146.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema146.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs24 = errors; + if (errors === _errs24) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema146.allOf[1].properties.peerconnection.allOf[1] + .required, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data8 = data4.devices; + const _errs26 = errors; + if (errors === _errs26) { + if (Array.isArray(data8)) { + if (data8.length > 2) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + if (data8.length < 2) { + validate161.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema146.allOf[1].properties.peerconnection + .allOf[1].properties.devices, + data: data8, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data8.length; + for (let i0 = 0; i0 < len0; i0++) { + let data9 = data8[i0]; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing5; + if (data9.url === undefined && (missing5 = 'url')) { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema146.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema146.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs30 = errors; + if (errors === _errs30) { + if (errors === _errs30) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + var valid9 = _errs30 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data9.config !== undefined) { + let data11 = data9.config; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + if (data11.services !== undefined) { + let data12 = data11.services; + const _errs34 = errors; + if (errors === _errs34) { + if (Array.isArray(data12)) { + var valid11 = true; + const len1 = data12.length; + for (let i1 = 0; i1 < len1; i1++) { + let data13 = data12[i1]; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == 'object' && + !Array.isArray(data13) + ) { + let missing6; + if ( + (data13.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data13.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data13.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema146.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema146.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } else { + if ( + data13.serviceType !== + undefined + ) { + let data14 = + data13.serviceType; + const _errs39 = errors; + if (errors === _errs39) { + if ( + errors === _errs39 + ) { + if ( + typeof data14 === + 'string' + ) { + if ( + !formats0(data14) + ) { + validate161.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate161.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.serviceId !== + undefined + ) { + let data15 = + data13.serviceId; + const _errs41 = errors; + if ( + typeof data15 !== + 'string' + ) { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid12 = + _errs41 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.remoteServiceId !== + undefined + ) { + let data16 = + data13.remoteServiceId; + const _errs43 = + errors; + if ( + typeof data16 !== + 'string' + ) { + validate161.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data16, + }, + ]; + return false; + } + var valid12 = + _errs43 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema146.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema146.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } + } + var valid11 = _errs36 === errors; + if (!valid11) { + break; + } + } + } else { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data12, + }, + ]; + return false; + } + } + } + } else { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data11, + }, + ]; + return false; + } + } + var valid9 = _errs32 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema146.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema146.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } + } + var valid8 = _errs28 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema146.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } + } + } + } + } else { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema146.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs24 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema146.allOf[1].type, + parentSchema: schema146.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate161.errors = vErrors; + return errors === 0; +} +exports.validateChangedUrlRequest = validate162; +const schema147 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ChangedUrlRequest', + 'x-location': '#/components/parameters/device_changed_url/schema_request', + 'x-schema-type': 'request', +}; +function validate162( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate162.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema147, + data, + }, + ]; + return false; + } + } else { + validate162.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema147.type, + parentSchema: schema147, + data, + }, + ]; + return false; + } + } + } + validate162.errors = vErrors; + return errors === 0; +} +exports.validateChangedUrlResponse = validate163; +const schema148 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ChangedUrlResponse', + 'x-location': '#/components/parameters/device_changed_url/schema_response', + 'x-schema-type': 'response', +}; +function validate163( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate163.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema148, + data, + }, + ]; + return false; + } + } else { + validate163.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema148.type, + parentSchema: schema148, + data, + }, + ]; + return false; + } + } + } + validate163.errors = vErrors; + return errors === 0; +} +exports.validateDeviceIdRequest = validate164; +const schema149 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'DeviceIdRequest', + 'x-location': '#/components/parameters/device_id/schema_request', + 'x-schema-type': 'request', +}; +function validate164( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate164.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema149, + data, + }, + ]; + return false; + } + } else { + validate164.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema149.type, + parentSchema: schema149, + data, + }, + ]; + return false; + } + } + } + validate164.errors = vErrors; + return errors === 0; +} +exports.validateDeviceIdResponse = validate165; +const schema150 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'DeviceIdResponse', + 'x-location': '#/components/parameters/device_id/schema_response', + 'x-schema-type': 'response', +}; +function validate165( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate165.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema150, + data, + }, + ]; + return false; + } + } else { + validate165.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema150.type, + parentSchema: schema150, + data, + }, + ]; + return false; + } + } + } + validate165.errors = vErrors; + return errors === 0; +} +exports.validateFlatGroupRequest = validate166; +const schema151 = { + type: 'boolean', + default: false, + 'x-standalone': false, + 'x-name': 'FlatGroupRequest', + 'x-location': '#/components/parameters/flat_group/schema_request', + 'x-schema-type': 'request', +}; +function validate166( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'boolean') { + validate166.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema151.type, + parentSchema: schema151, + data, + }, + ]; + return false; + } + validate166.errors = vErrors; + return errors === 0; +} +exports.validateFlatGroupResponse = validate167; +const schema152 = { + type: 'boolean', + default: false, + 'x-standalone': false, + 'x-name': 'FlatGroupResponse', + 'x-location': '#/components/parameters/flat_group/schema_response', + 'x-schema-type': 'response', +}; +function validate167( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'boolean') { + validate167.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema152.type, + parentSchema: schema152, + data, + }, + ]; + return false; + } + validate167.errors = vErrors; + return errors === 0; +} +exports.validateStartTimeRequest = validate168; +const schema153 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'StartTimeRequest', + 'x-location': '#/components/parameters/start_time/schema_request', + 'x-schema-type': 'request', +}; +function validate168( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate168.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema153, + data, + }, + ]; + return false; + } + } else { + validate168.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema153.type, + parentSchema: schema153, + data, + }, + ]; + return false; + } + } + } + validate168.errors = vErrors; + return errors === 0; +} +exports.validateStartTimeResponse = validate169; +const schema154 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'StartTimeResponse', + 'x-location': '#/components/parameters/start_time/schema_response', + 'x-schema-type': 'response', +}; +function validate169( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate169.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema154, + data, + }, + ]; + return false; + } + } else { + validate169.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema154.type, + parentSchema: schema154, + data, + }, + ]; + return false; + } + } + } + validate169.errors = vErrors; + return errors === 0; +} +exports.validateEndTimeRequest = validate170; +const schema155 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'EndTimeRequest', + 'x-location': '#/components/parameters/end_time/schema_request', + 'x-schema-type': 'request', +}; +function validate170( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate170.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema155, + data, + }, + ]; + return false; + } + } else { + validate170.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema155.type, + parentSchema: schema155, + data, + }, + ]; + return false; + } + } + } + validate170.errors = vErrors; + return errors === 0; +} +exports.validateEndTimeResponse = validate171; +const schema156 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'EndTimeResponse', + 'x-location': '#/components/parameters/end_time/schema_response', + 'x-schema-type': 'response', +}; +function validate171( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate171.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema156, + data, + }, + ]; + return false; + } + } else { + validate171.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema156.type, + parentSchema: schema156, + data, + }, + ]; + return false; + } + } + } + validate171.errors = vErrors; + return errors === 0; +} +exports.validateClosedUrlRequest = validate172; +const schema157 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ClosedUrlRequest', + 'x-location': '#/components/parameters/closed_url/schema_request', + 'x-schema-type': 'request', +}; +function validate172( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate172.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema157, + data, + }, + ]; + return false; + } + } else { + validate172.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema157.type, + parentSchema: schema157, + data, + }, + ]; + return false; + } + } + } + validate172.errors = vErrors; + return errors === 0; +} +exports.validateClosedUrlResponse = validate173; +const schema158 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ClosedUrlResponse', + 'x-location': '#/components/parameters/closed_url/schema_response', + 'x-schema-type': 'response', +}; +function validate173( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate173.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema158, + data, + }, + ]; + return false; + } + } else { + validate173.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema158.type, + parentSchema: schema158, + data, + }, + ]; + return false; + } + } + } + validate173.errors = vErrors; + return errors === 0; +} +exports.validateStatusChangedUrlRequest = validate174; +const schema159 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'StatusChangedUrlRequest', + 'x-location': '#/components/parameters/status_changed_url/schema_request', + 'x-schema-type': 'request', +}; +function validate174( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate174.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema159, + data, + }, + ]; + return false; + } + } else { + validate174.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema159.type, + parentSchema: schema159, + data, + }, + ]; + return false; + } + } + } + validate174.errors = vErrors; + return errors === 0; +} +exports.validateStatusChangedUrlResponse = validate175; +const schema160 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'StatusChangedUrlResponse', + 'x-location': '#/components/parameters/status_changed_url/schema_response', + 'x-schema-type': 'response', +}; +function validate175( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate175.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema160, + data, + }, + ]; + return false; + } + } else { + validate175.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema160.type, + parentSchema: schema160, + data, + }, + ]; + return false; + } + } + } + validate175.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionIdRequest = validate176; +const schema161 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'PeerconnectionIdRequest', + 'x-location': '#/components/parameters/peerconnection_id/schema_request', + 'x-schema-type': 'request', +}; +function validate176( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate176.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema161, + data, + }, + ]; + return false; + } + } else { + validate176.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema161.type, + parentSchema: schema161, + data, + }, + ]; + return false; + } + } + } + validate176.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionIdResponse = validate177; +const schema162 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'PeerconnectionIdResponse', + 'x-location': '#/components/parameters/peerconnection_id/schema_response', + 'x-schema-type': 'response', +}; +function validate177( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate177.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema162, + data, + }, + ]; + return false; + } + } else { + validate177.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema162.type, + parentSchema: schema162, + data, + }, + ]; + return false; + } + } + } + validate177.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUrlRequest = validate178; +const schema163 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'DeviceUrlRequest', + 'x-location': '#/components/parameters/device_url/schema_request', + 'x-schema-type': 'request', +}; +function validate178( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate178.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema163, + data, + }, + ]; + return false; + } + } else { + validate178.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema163.type, + parentSchema: schema163, + data, + }, + ]; + return false; + } + } + } + validate178.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUrlResponse = validate179; +const schema164 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'DeviceUrlResponse', + 'x-location': '#/components/parameters/device_url/schema_response', + 'x-schema-type': 'response', +}; +function validate179( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate179.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema164, + data, + }, + ]; + return false; + } + } else { + validate179.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema164.type, + parentSchema: schema164, + data, + }, + ]; + return false; + } + } + } + validate179.errors = vErrors; + return errors === 0; +} +exports.validateListDevicesResponse200Request = validate180; +const schema165 = { + type: 'array', + items: { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + 'x-standalone': false, + 'x-name': 'listDevicesResponse200Request', + 'x-location': + '#/paths//devices/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate180( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.type === undefined && (missing0 = 'type')) || + (data0.name === undefined && (missing0 = 'name')) || + (data0.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema165.items.required, + parentSchema: schema165.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.name !== undefined) { + let data1 = data0.name; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/name', + schemaPath: '#/items/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema165.items.properties.name.type, + parentSchema: schema165.items.properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.description !== undefined) { + let data2 = data0.description; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/description', + schemaPath: '#/items/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema165.items.properties.description.type, + parentSchema: schema165.items.properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.type !== undefined) { + let data3 = data0.type; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema165.items.properties.type.type, + parentSchema: schema165.items.properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema165.items.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema165.items.properties.type.enum, + parentSchema: schema165.items.properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.isPublic !== undefined) { + let data4 = data0.isPublic; + const _errs9 = errors; + if (typeof data4 !== 'boolean') { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/isPublic', + schemaPath: '#/items/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema165.items.properties.isPublic.type, + parentSchema: schema165.items.properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.viewer !== undefined) { + let data5 = data0.viewer; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid2 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs13 = errors; + if (errors === _errs13) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate180.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: + '#/items/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + + missing1 + + "'", + schema: + schema165.items.properties.viewer.items + .required, + parentSchema: + schema165.items.properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate180.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema165.items.properties.viewer + .items.properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate180.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema165.items.properties.viewer.items + .properties.url.type, + parentSchema: + schema165.items.properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate180.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: '#/items/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema165.items.properties.viewer.items.type, + parentSchema: + schema165.items.properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs13 === errors; + if (!valid2) { + break; + } + } + } else { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/viewer', + schemaPath: '#/items/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema165.items.properties.viewer.type, + parentSchema: schema165.items.properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.owner !== undefined) { + let data8 = data0.owner; + const _errs17 = errors; + if (errors === _errs17) { + if (Array.isArray(data8)) { + var valid4 = true; + const len2 = data8.length; + for (let i2 = 0; i2 < len2; i2++) { + let data9 = data8[i2]; + const _errs19 = errors; + if (errors === _errs19) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate180.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: + '#/items/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema165.items.properties.owner.items + .required, + parentSchema: + schema165.items.properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs21 = errors; + if (errors === _errs21) { + if (errors === _errs21) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate180.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema165.items.properties.owner + .items.properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate180.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema165.items.properties.owner.items + .properties.url.type, + parentSchema: + schema165.items.properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate180.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: '#/items/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema165.items.properties.owner.items.type, + parentSchema: + schema165.items.properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs19 === errors; + if (!valid4) { + break; + } + } + } else { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/owner', + schemaPath: '#/items/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema165.items.properties.owner.type, + parentSchema: schema165.items.properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs17 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema165.items.type, + parentSchema: schema165.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate180.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema165.type, + parentSchema: schema165, + data, + }, + ]; + return false; + } + } + validate180.errors = vErrors; + return errors === 0; +} +exports.validateListDevicesResponse200Response = validate181; +const schema166 = { + type: 'array', + items: { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + 'x-standalone': false, + 'x-name': 'listDevicesResponse200Response', + 'x-location': + '#/paths//devices/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate181( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.url === undefined && (missing0 = 'url')) || + (data0.type === undefined && (missing0 = 'type')) || + (data0.name === undefined && (missing0 = 'name')) || + (data0.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema166.items.required, + parentSchema: schema166.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema166.items.properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema166.items.properties.url.type, + parentSchema: schema166.items.properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.name !== undefined) { + let data2 = data0.name; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/name', + schemaPath: '#/items/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema166.items.properties.name.type, + parentSchema: schema166.items.properties.name, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.description !== undefined) { + let data3 = data0.description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/description', + schemaPath: '#/items/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema166.items.properties.description.type, + parentSchema: schema166.items.properties.description, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.type !== undefined) { + let data4 = data0.type; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema166.items.properties.type.type, + parentSchema: schema166.items.properties.type, + data: data4, + }, + ]; + return false; + } + if ( + !( + data4 === 'device' || + data4 === 'group' || + data4 === 'edge instantiable' || + data4 === 'cloud instantiable' + ) + ) { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema166.items.properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema166.items.properties.type.enum, + parentSchema: schema166.items.properties.type, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.isPublic !== undefined) { + let data5 = data0.isPublic; + const _errs11 = errors; + if (typeof data5 !== 'boolean') { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/isPublic', + schemaPath: '#/items/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema166.items.properties.isPublic.type, + parentSchema: schema166.items.properties.isPublic, + data: data5, + }, + ]; + return false; + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.viewer !== undefined) { + let data6 = data0.viewer; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid2 = true; + const len1 = data6.length; + for (let i1 = 0; i1 < len1; i1++) { + let data7 = data6[i1]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing1; + if (data7.url === undefined && (missing1 = 'url')) { + validate181.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: + '#/items/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + + missing1 + + "'", + schema: + schema166.items.properties.viewer.items + .required, + parentSchema: + schema166.items.properties.viewer.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate181.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema166.items.properties.viewer + .items.properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate181.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema166.items.properties.viewer + .items.properties.url.type, + parentSchema: + schema166.items.properties.viewer + .items.properties.url, + data: data8, + }, + ]; + return false; + } + } + } + } + } + } else { + validate181.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: + '#/items/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema166.items.properties.viewer.items.type, + parentSchema: + schema166.items.properties.viewer.items, + data: data7, + }, + ]; + return false; + } + } + var valid2 = _errs15 === errors; + if (!valid2) { + break; + } + } + } else { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/viewer', + schemaPath: '#/items/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema166.items.properties.viewer.type, + parentSchema: schema166.items.properties.viewer, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.owner !== undefined) { + let data9 = data0.owner; + const _errs19 = errors; + if (errors === _errs19) { + if (Array.isArray(data9)) { + var valid4 = true; + const len2 = data9.length; + for (let i2 = 0; i2 < len2; i2++) { + let data10 = data9[i2]; + const _errs21 = errors; + if (errors === _errs21) { + if ( + data10 && + typeof data10 == 'object' && + !Array.isArray(data10) + ) { + let missing2; + if ( + data10.url === undefined && + (missing2 = 'url') + ) { + validate181.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: + '#/items/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema166.items.properties.owner.items + .required, + parentSchema: + schema166.items.properties.owner.items, + data: data10, + }, + ]; + return false; + } else { + if (data10.url !== undefined) { + let data11 = data10.url; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate181.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema166.items.properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } else { + validate181.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema166.items.properties.owner + .items.properties.url.type, + parentSchema: + schema166.items.properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } + } + } + } + } else { + validate181.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: + '#/items/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema166.items.properties.owner.items.type, + parentSchema: + schema166.items.properties.owner.items, + data: data10, + }, + ]; + return false; + } + } + var valid4 = _errs21 === errors; + if (!valid4) { + break; + } + } + } else { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/owner', + schemaPath: '#/items/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema166.items.properties.owner.type, + parentSchema: schema166.items.properties.owner, + data: data9, + }, + ]; + return false; + } + } + var valid1 = _errs19 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema166.items.type, + parentSchema: schema166.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate181.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema166.type, + parentSchema: schema166, + data, + }, + ]; + return false; + } + } + validate181.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceBodyRequest = validate182; +const schema167 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceBodyRequest', + 'x-location': + '#/paths//devices/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate182( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema167.anyOf[0].allOf[0].required, + parentSchema: schema167.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema167.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema167.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema167.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema167.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema167.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema167.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema167.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema167.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema167.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema167.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema167.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema167.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[0].allOf[0].type, + parentSchema: schema167.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema167.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema167.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema167.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema167.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema167.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema167.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[0].allOf[1].type, + parentSchema: schema167.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema167.anyOf[1].allOf[0].required, + parentSchema: schema167.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema167.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema167.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema167.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema167.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema167.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema167.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema167.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema167.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema167.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema167.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema167.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema167.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[1].allOf[0].type, + parentSchema: schema167.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema167.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema167.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema167.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema167.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema167.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema167.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[1].allOf[1].type, + parentSchema: schema167.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema167.anyOf[2].allOf[0].required, + parentSchema: schema167.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema167.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema167.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema167.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema167.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema167.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema167.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema167.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema167.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema167.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema167.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema167.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema167.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[2].allOf[0].type, + parentSchema: schema167.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema167.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema167.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema167.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema167.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema167.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[2].allOf[1].type, + parentSchema: schema167.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema167.anyOf[3].allOf[0].required, + parentSchema: schema167.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema167.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema167.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema167.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema167.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema167.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema167.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema167.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema167.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema167.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema167.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema167.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema167.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema167.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema167.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema167.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema167.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema167.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema167.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[3].allOf[0].type, + parentSchema: schema167.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err101 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema167.anyOf[3].allOf[1].required, + parentSchema: schema167.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema167.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing13; + if (data63.url === undefined && (missing13 = 'url')) { + const err103 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema167.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema167.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema167.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema167.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema167.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err108 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[3].allOf[1].type, + parentSchema: schema167.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err109 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema167.anyOf, + parentSchema: schema167, + data, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate182.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate182.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceBodyResponse = validate183; +const schema168 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceBodyResponse', + 'x-location': + '#/paths//devices/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate183( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema168.anyOf[0].allOf[0].required, + parentSchema: schema168.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema168.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema168.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema168.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema168.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema168.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema168.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[0].allOf[0].properties + .viewer.items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema168.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[0].allOf[0].properties.viewer.items + .type, + parentSchema: + schema168.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema168.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema168.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema168.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema168.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[0].allOf[0].type, + parentSchema: schema168.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema168.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema168.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema168.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema168.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema168.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[0].allOf[1].type, + parentSchema: schema168.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema168.anyOf[1].allOf[0].required, + parentSchema: schema168.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema168.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema168.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema168.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema168.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema168.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema168.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema168.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema168.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema168.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema168.anyOf[1].allOf[0].properties.owner + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema168.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema168.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[1].allOf[0].type, + parentSchema: schema168.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema168.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema168.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema168.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema168.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema168.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[1].allOf[1].properties + .services.items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema168.anyOf[1].allOf[1].properties + .services.items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema168.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[1].allOf[1].type, + parentSchema: schema168.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema168.anyOf[2].allOf[0].required, + parentSchema: schema168.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema168.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema168.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema168.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema168.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema168.anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema168.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema168.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema168.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema168.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema168.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema168.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema168.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[2].allOf[0].properties.owner.type, + parentSchema: + schema168.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[2].allOf[0].type, + parentSchema: schema168.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema168.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema168.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema168.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema168.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[2].allOf[1].type, + parentSchema: schema168.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema168.anyOf[3].allOf[0].required, + parentSchema: schema168.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema168.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema168.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema168.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema168.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema168.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema168.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema168.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema168.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema168.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema168.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema168.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema168.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema168.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema168.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema168.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[3].allOf[0].type, + parentSchema: schema168.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema168.anyOf[3].allOf[1].required, + parentSchema: schema168.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema168.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema168.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema168.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema168.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema168.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema168.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[3].allOf[1].type, + parentSchema: schema168.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema168.anyOf, + parentSchema: schema168, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate183.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate183.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceResponse201Request = validate184; +const schema169 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceResponse201Request', + 'x-location': + '#/paths//devices/post/responses/201/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate184( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema169.anyOf[0].allOf[0].required, + parentSchema: schema169.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema169.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema169.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema169.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema169.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema169.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema169.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema169.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema169.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema169.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema169.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema169.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema169.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[0].allOf[0].type, + parentSchema: schema169.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema169.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema169.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema169.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema169.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema169.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema169.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[0].allOf[1].type, + parentSchema: schema169.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema169.anyOf[1].allOf[0].required, + parentSchema: schema169.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema169.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema169.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema169.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema169.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema169.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema169.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema169.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema169.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema169.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema169.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema169.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema169.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[1].allOf[0].type, + parentSchema: schema169.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema169.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema169.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema169.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema169.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema169.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema169.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[1].allOf[1].type, + parentSchema: schema169.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema169.anyOf[2].allOf[0].required, + parentSchema: schema169.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema169.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema169.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema169.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema169.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema169.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema169.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema169.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema169.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema169.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema169.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema169.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema169.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[2].allOf[0].type, + parentSchema: schema169.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema169.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema169.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema169.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema169.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema169.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[2].allOf[1].type, + parentSchema: schema169.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema169.anyOf[3].allOf[0].required, + parentSchema: schema169.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema169.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema169.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema169.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema169.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema169.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema169.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema169.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema169.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema169.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema169.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema169.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema169.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema169.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema169.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema169.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema169.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema169.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema169.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[3].allOf[0].type, + parentSchema: schema169.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err101 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema169.anyOf[3].allOf[1].required, + parentSchema: schema169.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema169.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing13; + if (data63.url === undefined && (missing13 = 'url')) { + const err103 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema169.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema169.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema169.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema169.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema169.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err108 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[3].allOf[1].type, + parentSchema: schema169.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err109 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema169.anyOf, + parentSchema: schema169, + data, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate184.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate184.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceResponse201Response = validate185; +const schema170 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceResponse201Response', + 'x-location': + '#/paths//devices/post/responses/201/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate185( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema170.anyOf[0].allOf[0].required, + parentSchema: schema170.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema170.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema170.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema170.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema170.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema170.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[0].allOf[0].properties + .viewer.items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema170.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[0].allOf[0].properties.viewer.items + .type, + parentSchema: + schema170.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema170.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema170.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema170.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema170.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[0].allOf[0].type, + parentSchema: schema170.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema170.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema170.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema170.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema170.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema170.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[0].allOf[1].type, + parentSchema: schema170.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema170.anyOf[1].allOf[0].required, + parentSchema: schema170.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema170.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema170.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema170.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema170.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema170.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema170.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema170.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema170.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema170.anyOf[1].allOf[0].properties.owner + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema170.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema170.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[1].allOf[0].type, + parentSchema: schema170.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema170.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema170.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema170.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema170.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema170.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[1].allOf[1].properties + .services.items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema170.anyOf[1].allOf[1].properties + .services.items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema170.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[1].allOf[1].type, + parentSchema: schema170.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema170.anyOf[2].allOf[0].required, + parentSchema: schema170.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema170.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema170.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema170.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema170.anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema170.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema170.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema170.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema170.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema170.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema170.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema170.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[2].allOf[0].properties.owner.type, + parentSchema: + schema170.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[2].allOf[0].type, + parentSchema: schema170.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema170.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema170.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema170.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema170.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[2].allOf[1].type, + parentSchema: schema170.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema170.anyOf[3].allOf[0].required, + parentSchema: schema170.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema170.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema170.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema170.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema170.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema170.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema170.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema170.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema170.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema170.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[3].allOf[0].type, + parentSchema: schema170.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema170.anyOf[3].allOf[1].required, + parentSchema: schema170.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema170.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema170.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema170.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema170.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema170.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema170.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[3].allOf[1].type, + parentSchema: schema170.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema170.anyOf, + parentSchema: schema170, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate185.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate185.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceResponse200Request = validate186; +const schema171 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getDeviceResponse200Request', + 'x-location': + '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate186( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema171.anyOf[0].allOf[0].required, + parentSchema: schema171.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema171.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema171.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema171.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema171.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema171.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema171.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema171.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema171.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema171.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema171.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema171.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[0].allOf[0].type, + parentSchema: schema171.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema171.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema171.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema171.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema171.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema171.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema171.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[0].allOf[1].type, + parentSchema: schema171.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema171.anyOf[1].allOf[0].required, + parentSchema: schema171.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema171.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema171.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema171.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema171.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema171.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema171.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema171.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema171.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema171.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema171.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema171.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[1].allOf[0].type, + parentSchema: schema171.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema171.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema171.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema171.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema171.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema171.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema171.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[1].allOf[1].type, + parentSchema: schema171.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema171.anyOf[2].allOf[0].required, + parentSchema: schema171.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema171.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema171.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema171.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema171.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema171.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema171.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema171.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema171.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema171.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema171.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema171.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[2].allOf[0].type, + parentSchema: schema171.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema171.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema171.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema171.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema171.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema171.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[2].allOf[1].type, + parentSchema: schema171.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema171.anyOf[3].allOf[0].required, + parentSchema: schema171.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema171.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema171.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema171.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema171.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema171.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema171.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema171.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema171.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema171.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema171.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema171.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema171.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[3].allOf[0].type, + parentSchema: schema171.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err101 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema171.anyOf[3].allOf[1].required, + parentSchema: schema171.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema171.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing13; + if (data63.url === undefined && (missing13 = 'url')) { + const err103 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema171.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema171.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema171.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema171.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema171.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err108 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[3].allOf[1].type, + parentSchema: schema171.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err109 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema171.anyOf, + parentSchema: schema171, + data, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate186.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate186.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceResponse200Response = validate187; +const schema172 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getDeviceResponse200Response', + 'x-location': + '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate187( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema172.anyOf[0].allOf[0].required, + parentSchema: schema172.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema172.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema172.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema172.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema172.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema172.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[0].allOf[0].properties + .viewer.items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema172.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[0].allOf[0].properties.viewer.items + .type, + parentSchema: + schema172.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema172.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema172.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema172.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema172.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[0].allOf[0].type, + parentSchema: schema172.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema172.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema172.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema172.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema172.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema172.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[0].allOf[1].type, + parentSchema: schema172.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema172.anyOf[1].allOf[0].required, + parentSchema: schema172.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema172.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema172.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema172.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema172.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema172.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema172.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema172.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema172.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema172.anyOf[1].allOf[0].properties.owner + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema172.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema172.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[1].allOf[0].type, + parentSchema: schema172.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema172.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema172.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema172.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema172.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema172.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[1].allOf[1].properties + .services.items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema172.anyOf[1].allOf[1].properties + .services.items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema172.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[1].allOf[1].type, + parentSchema: schema172.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema172.anyOf[2].allOf[0].required, + parentSchema: schema172.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema172.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema172.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema172.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema172.anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema172.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema172.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema172.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema172.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema172.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema172.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema172.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[2].allOf[0].properties.owner.type, + parentSchema: + schema172.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[2].allOf[0].type, + parentSchema: schema172.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema172.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema172.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema172.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema172.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[2].allOf[1].type, + parentSchema: schema172.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema172.anyOf[3].allOf[0].required, + parentSchema: schema172.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema172.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema172.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema172.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema172.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema172.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema172.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema172.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema172.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema172.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[3].allOf[0].type, + parentSchema: schema172.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema172.anyOf[3].allOf[1].required, + parentSchema: schema172.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema172.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema172.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema172.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema172.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema172.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema172.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[3].allOf[1].type, + parentSchema: schema172.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema172.anyOf, + parentSchema: schema172, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate187.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate187.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceBodyRequest = validate188; +const schema173 = { + title: 'Device Update', + anyOf: [ + { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + }, + ], + }, + ], + 'x-standalone': false, + 'x-name': 'updateDeviceBodyRequest', + 'x-location': + '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate188( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema173.anyOf[0].allOf[0].required, + parentSchema: schema173.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema173.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema173.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema173.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema173.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema173.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema173.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema173.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema173.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema173.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema173.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema173.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[0].allOf[0].type, + parentSchema: schema173.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema173.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema173.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema173.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema173.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema173.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema173.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[0].allOf[1].type, + parentSchema: schema173.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.type === undefined && (missing3 = 'type')) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema173.anyOf[1].allOf[0].required, + parentSchema: schema173.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema173.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema173.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema173.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema173.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema173.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema173.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema173.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema173.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema173.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema173.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema173.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[1].allOf[0].type, + parentSchema: schema173.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema173.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema173.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema173.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema173.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema173.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema173.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[1].allOf[1].type, + parentSchema: schema173.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if (data.type === undefined && (missing6 = 'type')) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema173.anyOf[2].allOf[0].required, + parentSchema: schema173.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema173.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema173.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema173.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema173.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema173.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema173.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema173.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema173.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema173.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema173.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema173.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[2].allOf[0].type, + parentSchema: schema173.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema173.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema173.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema173.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema173.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema173.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[2].allOf[1].type, + parentSchema: schema173.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.type === undefined && (missing9 = 'type')) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema173.anyOf[3].allOf[0].required, + parentSchema: schema173.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema173.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema173.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema173.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema173.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema173.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema173.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema173.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema173.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema173.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema173.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema173.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema173.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[3].allOf[0].type, + parentSchema: schema173.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err101 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema173.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing12; + if (data63.url === undefined && (missing12 = 'url')) { + const err102 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: + "must have required property '" + missing12 + "'", + schema: + schema173.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema173.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err103 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + } else { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema173.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } + } + } + } + } else { + const err105 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[3].allOf[1].properties.devices.items.type, + parentSchema: + schema173.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema173.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } else { + const err107 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[3].allOf[1].type, + parentSchema: schema173.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err108 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema173.anyOf, + parentSchema: schema173, + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + validate188.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate188.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceBodyResponse = validate189; +const schema174 = { + title: 'Device Update', + anyOf: [ + { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + }, + ], + }, + ], + 'x-standalone': false, + 'x-name': 'updateDeviceBodyResponse', + 'x-location': + '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate189( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema174.anyOf[0].allOf[0].required, + parentSchema: schema174.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema174.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema174.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema174.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema174.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema174.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema174.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema174.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema174.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema174.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema174.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema174.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[0].allOf[0].type, + parentSchema: schema174.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema174.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema174.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema174.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema174.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema174.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema174.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[0].allOf[1].type, + parentSchema: schema174.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.type === undefined && (missing3 = 'type')) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema174.anyOf[1].allOf[0].required, + parentSchema: schema174.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema174.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema174.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema174.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema174.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema174.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema174.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema174.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema174.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema174.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema174.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema174.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[1].allOf[0].type, + parentSchema: schema174.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema174.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema174.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema174.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema174.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema174.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema174.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[1].allOf[1].type, + parentSchema: schema174.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if (data.type === undefined && (missing6 = 'type')) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema174.anyOf[2].allOf[0].required, + parentSchema: schema174.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema174.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema174.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema174.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema174.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema174.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema174.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema174.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema174.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema174.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema174.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema174.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[2].allOf[0].type, + parentSchema: schema174.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema174.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema174.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema174.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema174.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema174.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[2].allOf[1].type, + parentSchema: schema174.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.type === undefined && (missing9 = 'type')) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema174.anyOf[3].allOf[0].required, + parentSchema: schema174.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema174.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema174.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema174.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema174.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema174.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema174.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema174.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema174.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema174.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema174.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema174.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema174.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[3].allOf[0].type, + parentSchema: schema174.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err101 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema174.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing12; + if (data63.url === undefined && (missing12 = 'url')) { + const err102 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: + "must have required property '" + missing12 + "'", + schema: + schema174.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema174.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err103 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + } else { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema174.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } + } + } + } + } else { + const err105 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[3].allOf[1].properties.devices.items.type, + parentSchema: + schema174.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema174.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } else { + const err107 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[3].allOf[1].type, + parentSchema: schema174.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err108 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema174.anyOf, + parentSchema: schema174, + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + validate189.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate189.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceResponse200Request = validate190; +const schema175 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'updateDeviceResponse200Request', + 'x-location': + '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate190( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema175.anyOf[0].allOf[0].required, + parentSchema: schema175.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema175.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema175.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema175.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema175.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema175.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema175.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema175.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema175.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema175.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema175.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema175.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[0].allOf[0].type, + parentSchema: schema175.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema175.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema175.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema175.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema175.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema175.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema175.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[0].allOf[1].type, + parentSchema: schema175.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema175.anyOf[1].allOf[0].required, + parentSchema: schema175.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema175.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema175.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema175.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema175.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema175.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema175.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema175.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema175.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema175.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema175.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema175.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[1].allOf[0].type, + parentSchema: schema175.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema175.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema175.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema175.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema175.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema175.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema175.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[1].allOf[1].type, + parentSchema: schema175.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema175.anyOf[2].allOf[0].required, + parentSchema: schema175.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema175.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema175.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema175.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema175.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema175.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema175.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema175.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema175.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema175.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema175.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema175.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[2].allOf[0].type, + parentSchema: schema175.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema175.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema175.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema175.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema175.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema175.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[2].allOf[1].type, + parentSchema: schema175.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema175.anyOf[3].allOf[0].required, + parentSchema: schema175.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema175.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema175.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema175.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema175.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema175.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema175.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema175.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema175.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema175.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema175.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema175.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema175.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[3].allOf[0].type, + parentSchema: schema175.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err101 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema175.anyOf[3].allOf[1].required, + parentSchema: schema175.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema175.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing13; + if (data63.url === undefined && (missing13 = 'url')) { + const err103 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema175.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema175.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema175.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema175.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema175.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err108 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[3].allOf[1].type, + parentSchema: schema175.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err109 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema175.anyOf, + parentSchema: schema175, + data, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate190.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate190.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceResponse200Response = validate191; +const schema176 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'updateDeviceResponse200Response', + 'x-location': + '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate191( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema176.anyOf[0].allOf[0].required, + parentSchema: schema176.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema176.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema176.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema176.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema176.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema176.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[0].allOf[0].properties + .viewer.items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema176.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[0].allOf[0].properties.viewer.items + .type, + parentSchema: + schema176.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema176.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema176.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema176.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema176.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[0].allOf[0].type, + parentSchema: schema176.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema176.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema176.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema176.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema176.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema176.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[0].allOf[1].type, + parentSchema: schema176.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema176.anyOf[1].allOf[0].required, + parentSchema: schema176.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema176.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema176.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema176.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema176.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema176.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema176.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema176.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema176.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema176.anyOf[1].allOf[0].properties.owner + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema176.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema176.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[1].allOf[0].type, + parentSchema: schema176.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema176.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema176.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema176.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema176.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema176.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[1].allOf[1].properties + .services.items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema176.anyOf[1].allOf[1].properties + .services.items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema176.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[1].allOf[1].type, + parentSchema: schema176.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema176.anyOf[2].allOf[0].required, + parentSchema: schema176.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema176.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema176.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema176.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema176.anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema176.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema176.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema176.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema176.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema176.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema176.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema176.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[2].allOf[0].properties.owner.type, + parentSchema: + schema176.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[2].allOf[0].type, + parentSchema: schema176.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema176.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema176.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema176.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema176.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[2].allOf[1].type, + parentSchema: schema176.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema176.anyOf[3].allOf[0].required, + parentSchema: schema176.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema176.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema176.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema176.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema176.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema176.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema176.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema176.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema176.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema176.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[3].allOf[0].type, + parentSchema: schema176.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema176.anyOf[3].allOf[1].required, + parentSchema: schema176.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema176.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema176.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema176.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema176.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema176.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema176.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[3].allOf[1].type, + parentSchema: schema176.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema176.anyOf, + parentSchema: schema176, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate191.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate191.errors = vErrors; + return errors === 0; +} +exports.validateInstantiateDeviceResponse201Request = validate192; +const schema177 = { + type: 'object', + properties: { + instance: { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + deviceToken: { type: 'string' }, + }, + required: ['instance', 'deviceToken'], + 'x-standalone': false, + 'x-name': 'instantiateDeviceResponse201Request', + 'x-location': + '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate192( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.instance === undefined && (missing0 = 'instance')) || + (data.deviceToken === undefined && (missing0 = 'deviceToken')) + ) { + validate192.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema177.required, + parentSchema: schema177, + data, + }, + ]; + return false; + } else { + if (data.instance !== undefined) { + let data0 = data.instance; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.type === undefined && (missing1 = 'type')) || + (data0.name === undefined && (missing1 = 'name')) || + (data0.isPublic === undefined && (missing1 = 'isPublic')) + ) { + validate192.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema177.properties.instance.allOf[0].required, + parentSchema: schema177.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.name !== undefined) { + let data1 = data0.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate192.errors = [ + { + instancePath: instancePath + '/instance/name', + schemaPath: '#/properties/instance/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[0].properties.name.type, + parentSchema: + schema177.properties.instance.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.description !== undefined) { + let data2 = data0.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate192.errors = [ + { + instancePath: instancePath + '/instance/description', + schemaPath: + '#/properties/instance/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[0].properties.description + .type, + parentSchema: + schema177.properties.instance.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.type !== undefined) { + let data3 = data0.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate192.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[0].properties.type.type, + parentSchema: + schema177.properties.instance.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate192.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema177.properties.instance.allOf[0].properties.type + .enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema177.properties.instance.allOf[0].properties.type.enum, + parentSchema: + schema177.properties.instance.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.isPublic !== undefined) { + let data4 = data0.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate192.errors = [ + { + instancePath: instancePath + '/instance/isPublic', + schemaPath: + '#/properties/instance/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema177.properties.instance.allOf[0].properties.isPublic + .type, + parentSchema: + schema177.properties.instance.allOf[0].properties + .isPublic, + data: data4, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.viewer !== undefined) { + let data5 = data0.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing2; + if (data6.url === undefined && (missing2 = 'url')) { + validate192.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema177.properties.instance.allOf[0] + .properties.viewer.items.required, + parentSchema: + schema177.properties.instance.allOf[0] + .properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema177.properties.instance + .allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[0] + .properties.viewer.items.properties + .url.type, + parentSchema: + schema177.properties.instance.allOf[0] + .properties.viewer.items.properties + .url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema177.properties.instance.allOf[0] + .properties.viewer.items.type, + parentSchema: + schema177.properties.instance.allOf[0] + .properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance/viewer', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema177.properties.instance.allOf[0].properties + .viewer.type, + parentSchema: + schema177.properties.instance.allOf[0].properties + .viewer, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.owner !== undefined) { + let data8 = data0.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing3; + if (data9.url === undefined && (missing3 = 'url')) { + validate192.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema177.properties.instance.allOf[0] + .properties.owner.items.required, + parentSchema: + schema177.properties.instance.allOf[0] + .properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema177.properties.instance + .allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance + .allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema177.properties.instance + .allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema177.properties.instance.allOf[0] + .properties.owner.items.type, + parentSchema: + schema177.properties.instance.allOf[0] + .properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance/owner', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema177.properties.instance.allOf[0].properties + .owner.type, + parentSchema: + schema177.properties.instance.allOf[0].properties + .owner, + data: data8, + }, + ]; + return false; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema177.properties.instance.allOf[0].type, + parentSchema: schema177.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.type !== undefined) { + let data11 = data0.type; + const _errs26 = errors; + if ('device' !== data11) { + validate192.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: '#/properties/instance/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: + schema177.properties.instance.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.experiment !== undefined) { + let data12 = data0.experiment; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + validate192.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema177.properties.instance.allOf[1].properties + .experiment, + data: data12, + }, + ]; + return false; + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[1].properties + .experiment.type, + parentSchema: + schema177.properties.instance.allOf[1].properties + .experiment, + data: data12, + }, + ]; + return false; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.services !== undefined) { + let data13 = data0.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if ( + data14 && + typeof data14 == 'object' && + !Array.isArray(data14) + ) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i2 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType, + data: data15, + }, + ]; + return false; + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i2 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType.type, + parentSchema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType, + data: data15, + }, + ]; + return false; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i2 + + '/serviceId', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId.type, + parentSchema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId, + data: data16, + }, + ]; + return false; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs38 = errors; + if (typeof data17 !== 'string') { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.type, + parentSchema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data17, + }, + ]; + return false; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.enum, + parentSchema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data17, + }, + ]; + return false; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + '/instance/services/' + i2, + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema177.properties.instance.allOf[1].properties + .services.items.type, + parentSchema: + schema177.properties.instance.allOf[1].properties + .services.items, + data: data14, + }, + ]; + return false; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance/services', + schemaPath: + '#/properties/instance/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema177.properties.instance.allOf[1].properties.services + .type, + parentSchema: + schema177.properties.instance.allOf[1].properties + .services, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema177.properties.instance.allOf[1].type, + parentSchema: schema177.properties.instance.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs24 === errors; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.deviceToken !== undefined) { + let data18 = data.deviceToken; + const _errs40 = errors; + if (typeof data18 !== 'string') { + validate192.errors = [ + { + instancePath: instancePath + '/deviceToken', + schemaPath: '#/properties/deviceToken/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema177.properties.deviceToken.type, + parentSchema: schema177.properties.deviceToken, + data: data18, + }, + ]; + return false; + } + var valid0 = _errs40 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate192.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema177.type, + parentSchema: schema177, + data, + }, + ]; + return false; + } + } + validate192.errors = vErrors; + return errors === 0; +} +exports.validateInstantiateDeviceResponse201Response = validate193; +const schema178 = { + type: 'object', + properties: { + instance: { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + deviceToken: { type: 'string' }, + }, + required: ['instance', 'deviceToken'], + 'x-standalone': false, + 'x-name': 'instantiateDeviceResponse201Response', + 'x-location': + '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate193( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.instance === undefined && (missing0 = 'instance')) || + (data.deviceToken === undefined && (missing0 = 'deviceToken')) + ) { + validate193.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema178.required, + parentSchema: schema178, + data, + }, + ]; + return false; + } else { + if (data.instance !== undefined) { + let data0 = data.instance; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.url === undefined && (missing1 = 'url')) || + (data0.type === undefined && (missing1 = 'type')) || + (data0.name === undefined && (missing1 = 'name')) || + (data0.isPublic === undefined && (missing1 = 'isPublic')) + ) { + validate193.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema178.properties.instance.allOf[0].required, + parentSchema: schema178.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate193.errors = [ + { + instancePath: instancePath + '/instance/url', + schemaPath: + '#/properties/instance/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema178.properties.instance.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance/url', + schemaPath: + '#/properties/instance/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[0].properties.url.type, + parentSchema: + schema178.properties.instance.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.name !== undefined) { + let data2 = data0.name; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate193.errors = [ + { + instancePath: instancePath + '/instance/name', + schemaPath: + '#/properties/instance/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[0].properties.name.type, + parentSchema: + schema178.properties.instance.allOf[0].properties.name, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.description !== undefined) { + let data3 = data0.description; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate193.errors = [ + { + instancePath: instancePath + '/instance/description', + schemaPath: + '#/properties/instance/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[0].properties + .description.type, + parentSchema: + schema178.properties.instance.allOf[0].properties + .description, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.type !== undefined) { + let data4 = data0.type; + const _errs10 = errors; + if (typeof data4 !== 'string') { + validate193.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[0].properties.type + .type, + parentSchema: + schema178.properties.instance.allOf[0].properties.type, + data: data4, + }, + ]; + return false; + } + if ( + !( + data4 === 'device' || + data4 === 'group' || + data4 === 'edge instantiable' || + data4 === 'cloud instantiable' + ) + ) { + validate193.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema178.properties.instance.allOf[0].properties.type + .enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema178.properties.instance.allOf[0].properties.type + .enum, + parentSchema: + schema178.properties.instance.allOf[0].properties.type, + data: data4, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.isPublic !== undefined) { + let data5 = data0.isPublic; + const _errs12 = errors; + if (typeof data5 !== 'boolean') { + validate193.errors = [ + { + instancePath: instancePath + '/instance/isPublic', + schemaPath: + '#/properties/instance/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema178.properties.instance.allOf[0].properties + .isPublic.type, + parentSchema: + schema178.properties.instance.allOf[0].properties + .isPublic, + data: data5, + }, + ]; + return false; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.viewer !== undefined) { + let data6 = data0.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data6)) { + var valid3 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if (data7.url === undefined && (missing2 = 'url')) { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema178.properties.instance.allOf[0] + .properties.viewer.items.required, + parentSchema: + schema178.properties.instance.allOf[0] + .properties.viewer.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema178.properties.instance + .allOf[0].properties.viewer + .items.properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance + .allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema178.properties.instance + .allOf[0].properties.viewer.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } + } + } + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema178.properties.instance.allOf[0] + .properties.viewer.items.type, + parentSchema: + schema178.properties.instance.allOf[0] + .properties.viewer.items, + data: data7, + }, + ]; + return false; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance/viewer', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema178.properties.instance.allOf[0].properties + .viewer.type, + parentSchema: + schema178.properties.instance.allOf[0].properties + .viewer, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.owner !== undefined) { + let data9 = data0.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data9)) { + var valid5 = true; + const len1 = data9.length; + for (let i1 = 0; i1 < len1; i1++) { + let data10 = data9[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data10 && + typeof data10 == 'object' && + !Array.isArray(data10) + ) { + let missing3; + if ( + data10.url === undefined && + (missing3 = 'url') + ) { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema178.properties.instance.allOf[0] + .properties.owner.items.required, + parentSchema: + schema178.properties.instance.allOf[0] + .properties.owner.items, + data: data10, + }, + ]; + return false; + } else { + if (data10.url !== undefined) { + let data11 = data10.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema178.properties.instance + .allOf[0].properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance + .allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema178.properties.instance + .allOf[0].properties.owner.items + .properties.url, + data: data11, + }, + ]; + return false; + } + } + } + } + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema178.properties.instance.allOf[0] + .properties.owner.items.type, + parentSchema: + schema178.properties.instance.allOf[0] + .properties.owner.items, + data: data10, + }, + ]; + return false; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance/owner', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema178.properties.instance.allOf[0].properties + .owner.type, + parentSchema: + schema178.properties.instance.allOf[0].properties + .owner, + data: data9, + }, + ]; + return false; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema178.properties.instance.allOf[0].type, + parentSchema: schema178.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.type !== undefined) { + let data12 = data0.type; + const _errs28 = errors; + if ('device' !== data12) { + validate193.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: '#/properties/instance/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: + schema178.properties.instance.allOf[1].properties.type, + data: data12, + }, + ]; + return false; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.connected !== undefined) { + let data13 = data0.connected; + const _errs29 = errors; + if (typeof data13 !== 'boolean') { + validate193.errors = [ + { + instancePath: instancePath + '/instance/connected', + schemaPath: + '#/properties/instance/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema178.properties.instance.allOf[1].properties.connected + .type, + parentSchema: + schema178.properties.instance.allOf[1].properties.connected, + data: data13, + }, + ]; + return false; + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.announcedAvailability !== undefined) { + let data14 = data0.announcedAvailability; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data14)) { + var valid8 = true; + const len2 = data14.length; + for (let i2 = 0; i2 < len2; i2++) { + let data15 = data14[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if ( + data15 && + typeof data15 == 'object' && + !Array.isArray(data15) + ) { + if (data15.start !== undefined) { + let data16 = data15.start; + const _errs35 = errors; + if (errors === _errs35) { + if (errors === _errs35) { + if (typeof data16 === 'string') { + if (!formats22.validate(data16)) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start, + data: data16, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start, + data: data16, + }, + ]; + return false; + } + } + } + var valid9 = _errs35 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data15.end !== undefined) { + let data17 = data15.end; + const _errs37 = errors; + if (errors === _errs37) { + if (errors === _errs37) { + if (typeof data17 === 'string') { + if (!formats22.validate(data17)) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability + .items.properties.end, + data: data17, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.end.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.end, + data: data17, + }, + ]; + return false; + } + } + } + var valid9 = _errs37 === errors; + } else { + var valid9 = true; + } + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2, + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema178.properties.instance.allOf[1].properties + .announcedAvailability.items.type, + parentSchema: + schema178.properties.instance.allOf[1].properties + .announcedAvailability.items, + data: data15, + }, + ]; + return false; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/announcedAvailability', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema178.properties.instance.allOf[1].properties + .announcedAvailability.type, + parentSchema: + schema178.properties.instance.allOf[1].properties + .announcedAvailability, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.experiment !== undefined) { + let data18 = data0.experiment; + const _errs39 = errors; + if (errors === _errs39) { + if (errors === _errs39) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + validate193.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema178.properties.instance.allOf[1].properties + .experiment, + data: data18, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1].properties + .experiment.type, + parentSchema: + schema178.properties.instance.allOf[1].properties + .experiment, + data: data18, + }, + ]; + return false; + } + } + } + var valid7 = _errs39 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.services !== undefined) { + let data19 = data0.services; + const _errs41 = errors; + if (errors === _errs41) { + if (Array.isArray(data19)) { + var valid10 = true; + const len3 = data19.length; + for (let i3 = 0; i3 < len3; i3++) { + let data20 = data19[i3]; + const _errs43 = errors; + if (errors === _errs43) { + if ( + data20 && + typeof data20 == 'object' && + !Array.isArray(data20) + ) { + if (data20.serviceType !== undefined) { + let data21 = data20.serviceType; + const _errs46 = errors; + if (errors === _errs46) { + if (errors === _errs46) { + if (typeof data21 === 'string') { + if (!formats0(data21)) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items + .properties.serviceType, + data: data21, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType, + data: data21, + }, + ]; + return false; + } + } + } + var valid11 = _errs46 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data20.serviceId !== undefined) { + let data22 = data20.serviceId; + const _errs48 = errors; + if (typeof data22 !== 'string') { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceId', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId, + data: data22, + }, + ]; + return false; + } + var valid11 = _errs48 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data20.serviceDirection !== undefined) { + let data23 = data20.serviceDirection; + const _errs50 = errors; + if (typeof data23 !== 'string') { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data23, + }, + ]; + return false; + } + if ( + !( + data23 === 'consumer' || + data23 === 'producer' || + data23 === 'prosumer' + ) + ) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema178.properties.instance.allOf[1] + .properties.services.items + .properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.enum, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data23, + }, + ]; + return false; + } + var valid11 = _errs50 === errors; + } else { + var valid11 = true; + } + } + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/services/' + i3, + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema178.properties.instance.allOf[1] + .properties.services.items.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items, + data: data20, + }, + ]; + return false; + } + } + var valid10 = _errs43 === errors; + if (!valid10) { + break; + } + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance/services', + schemaPath: + '#/properties/instance/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema178.properties.instance.allOf[1].properties + .services.type, + parentSchema: + schema178.properties.instance.allOf[1].properties + .services, + data: data19, + }, + ]; + return false; + } + } + var valid7 = _errs41 === errors; + } else { + var valid7 = true; + } + } + } + } + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema178.properties.instance.allOf[1].type, + parentSchema: schema178.properties.instance.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs26 === errors; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.deviceToken !== undefined) { + let data24 = data.deviceToken; + const _errs52 = errors; + if (typeof data24 !== 'string') { + validate193.errors = [ + { + instancePath: instancePath + '/deviceToken', + schemaPath: '#/properties/deviceToken/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema178.properties.deviceToken.type, + parentSchema: schema178.properties.deviceToken, + data: data24, + }, + ]; + return false; + } + var valid0 = _errs52 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate193.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema178.type, + parentSchema: schema178, + data, + }, + ]; + return false; + } + } + validate193.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceAvailabilityResponse200Request = validate194; +const schema179 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'getDeviceAvailabilityResponse200Request', + 'x-location': + '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate194( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate194.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema179.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate194.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema179.items.properties.start.type, + parentSchema: schema179.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate194.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema179.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate194.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema179.items.properties.end.type, + parentSchema: schema179.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate194.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema179.items.type, + parentSchema: schema179.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate194.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema179.type, + parentSchema: schema179, + data, + }, + ]; + return false; + } + } + validate194.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceAvailabilityResponse200Response = validate195; +const schema180 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'getDeviceAvailabilityResponse200Response', + 'x-location': + '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate195( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate195.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema180.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate195.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema180.items.properties.start.type, + parentSchema: schema180.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate195.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema180.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate195.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema180.items.properties.end.type, + parentSchema: schema180.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate195.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema180.items.type, + parentSchema: schema180.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate195.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema180.type, + parentSchema: schema180, + data, + }, + ]; + return false; + } + } + validate195.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesBodyRequest = validate196; +const schema181 = { + title: 'Availability Rules', + description: 'The availability rule to be applied.', + type: 'array', + items: { + title: 'Availability Rule', + type: 'object', + allOf: [ + { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + { + type: 'object', + properties: { + available: { type: 'boolean' }, + repeat: { + description: + 'If specified the time slot is repeated in a fixed offset specified by the frequency', + type: 'object', + properties: { + frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, + until: { + description: 'Up to this date-time the time slot will be repeated.', + type: 'string', + format: 'date-time', + }, + count: { + description: 'How often the time slot will be repeated', + type: 'integer', + }, + }, + required: ['frequency'], + }, + }, + }, + ], + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesBodyRequest', + 'x-location': + '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate196( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema181.items.type, + parentSchema: schema181.items, + data: data0, + }, + ]; + return false; + } + const _errs3 = errors; + if (errors === _errs3) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema181.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema181.items.allOf[0].properties.start.type, + parentSchema: schema181.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs5 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema181.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema181.items.allOf[0].properties.end.type, + parentSchema: schema181.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + } + } else { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema181.items.allOf[0].type, + parentSchema: schema181.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (valid1) { + const _errs9 = errors; + if (errors === _errs9) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.available !== undefined) { + let data3 = data0.available; + const _errs11 = errors; + if (typeof data3 !== 'boolean') { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/available', + schemaPath: '#/items/allOf/1/properties/available/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema181.items.allOf[1].properties.available.type, + parentSchema: schema181.items.allOf[1].properties.available, + data: data3, + }, + ]; + return false; + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data0.repeat !== undefined) { + let data4 = data0.repeat; + const _errs13 = errors; + if (errors === _errs13) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing0; + if (data4.frequency === undefined && (missing0 = 'frequency')) { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema181.items.allOf[1].properties.repeat.required, + parentSchema: schema181.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } else { + if (data4.frequency !== undefined) { + let data5 = data4.frequency; + const _errs15 = errors; + if (typeof data5 !== 'string') { + validate196.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema181.items.allOf[1].properties.repeat.properties + .frequency.type, + parentSchema: + schema181.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + if ( + !( + data5 === 'HOURLY' || + data5 === 'DAILY' || + data5 === 'WEEKLY' + ) + ) { + validate196.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/enum', + keyword: 'enum', + params: { + allowedValues: + schema181.items.allOf[1].properties.repeat.properties + .frequency.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema181.items.allOf[1].properties.repeat.properties + .frequency.enum, + parentSchema: + schema181.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.until !== undefined) { + let data6 = data4.until; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data6 === 'string') { + if (!formats22.validate(data6)) { + validate196.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema181.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } else { + validate196.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema181.items.allOf[1].properties.repeat + .properties.until.type, + parentSchema: + schema181.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs17 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.count !== undefined) { + let data7 = data4.count; + const _errs19 = errors; + if ( + !( + typeof data7 == 'number' && + !(data7 % 1) && + !isNaN(data7) && + isFinite(data7) + ) + ) { + validate196.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/count', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/count/type', + keyword: 'type', + params: { type: 'integer' }, + message: 'must be integer', + schema: + schema181.items.allOf[1].properties.repeat + .properties.count.type, + parentSchema: + schema181.items.allOf[1].properties.repeat + .properties.count, + data: data7, + }, + ]; + return false; + } + var valid4 = _errs19 === errors; + } else { + var valid4 = true; + } + } + } + } + } else { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema181.items.allOf[1].properties.repeat.type, + parentSchema: schema181.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs13 === errors; + } else { + var valid3 = true; + } + } + } else { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema181.items.allOf[1].type, + parentSchema: schema181.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs9 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate196.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema181.type, + parentSchema: schema181, + data, + }, + ]; + return false; + } + } + validate196.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesBodyResponse = validate197; +const schema182 = { + title: 'Availability Rules', + description: 'The availability rule to be applied.', + type: 'array', + items: { + title: 'Availability Rule', + type: 'object', + allOf: [ + { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + { + type: 'object', + properties: { + available: { type: 'boolean' }, + repeat: { + description: + 'If specified the time slot is repeated in a fixed offset specified by the frequency', + type: 'object', + properties: { + frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, + until: { + description: 'Up to this date-time the time slot will be repeated.', + type: 'string', + format: 'date-time', + }, + count: { + description: 'How often the time slot will be repeated', + type: 'integer', + }, + }, + required: ['frequency'], + }, + }, + }, + ], + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesBodyResponse', + 'x-location': + '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate197( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema182.items.type, + parentSchema: schema182.items, + data: data0, + }, + ]; + return false; + } + const _errs3 = errors; + if (errors === _errs3) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema182.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema182.items.allOf[0].properties.start.type, + parentSchema: schema182.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs5 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema182.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema182.items.allOf[0].properties.end.type, + parentSchema: schema182.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + } + } else { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema182.items.allOf[0].type, + parentSchema: schema182.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (valid1) { + const _errs9 = errors; + if (errors === _errs9) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.available !== undefined) { + let data3 = data0.available; + const _errs11 = errors; + if (typeof data3 !== 'boolean') { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/available', + schemaPath: '#/items/allOf/1/properties/available/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema182.items.allOf[1].properties.available.type, + parentSchema: schema182.items.allOf[1].properties.available, + data: data3, + }, + ]; + return false; + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data0.repeat !== undefined) { + let data4 = data0.repeat; + const _errs13 = errors; + if (errors === _errs13) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing0; + if (data4.frequency === undefined && (missing0 = 'frequency')) { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema182.items.allOf[1].properties.repeat.required, + parentSchema: schema182.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } else { + if (data4.frequency !== undefined) { + let data5 = data4.frequency; + const _errs15 = errors; + if (typeof data5 !== 'string') { + validate197.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema182.items.allOf[1].properties.repeat.properties + .frequency.type, + parentSchema: + schema182.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + if ( + !( + data5 === 'HOURLY' || + data5 === 'DAILY' || + data5 === 'WEEKLY' + ) + ) { + validate197.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/enum', + keyword: 'enum', + params: { + allowedValues: + schema182.items.allOf[1].properties.repeat.properties + .frequency.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema182.items.allOf[1].properties.repeat.properties + .frequency.enum, + parentSchema: + schema182.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.until !== undefined) { + let data6 = data4.until; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data6 === 'string') { + if (!formats22.validate(data6)) { + validate197.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema182.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } else { + validate197.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema182.items.allOf[1].properties.repeat + .properties.until.type, + parentSchema: + schema182.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs17 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.count !== undefined) { + let data7 = data4.count; + const _errs19 = errors; + if ( + !( + typeof data7 == 'number' && + !(data7 % 1) && + !isNaN(data7) && + isFinite(data7) + ) + ) { + validate197.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/count', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/count/type', + keyword: 'type', + params: { type: 'integer' }, + message: 'must be integer', + schema: + schema182.items.allOf[1].properties.repeat + .properties.count.type, + parentSchema: + schema182.items.allOf[1].properties.repeat + .properties.count, + data: data7, + }, + ]; + return false; + } + var valid4 = _errs19 === errors; + } else { + var valid4 = true; + } + } + } + } + } else { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema182.items.allOf[1].properties.repeat.type, + parentSchema: schema182.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs13 === errors; + } else { + var valid3 = true; + } + } + } else { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema182.items.allOf[1].type, + parentSchema: schema182.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs9 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate197.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema182.type, + parentSchema: schema182, + data, + }, + ]; + return false; + } + } + validate197.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesResponse200Request = validate198; +const schema183 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesResponse200Request', + 'x-location': + '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate198( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate198.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema183.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate198.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema183.items.properties.start.type, + parentSchema: schema183.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate198.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema183.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate198.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema183.items.properties.end.type, + parentSchema: schema183.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate198.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema183.items.type, + parentSchema: schema183.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate198.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema183.type, + parentSchema: schema183, + data, + }, + ]; + return false; + } + } + validate198.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesResponse200Response = validate199; +const schema184 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesResponse200Response', + 'x-location': + '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate199( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate199.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema184.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate199.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema184.items.properties.start.type, + parentSchema: schema184.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate199.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema184.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate199.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema184.items.properties.end.type, + parentSchema: schema184.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate199.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema184.items.type, + parentSchema: schema184.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate199.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema184.type, + parentSchema: schema184, + data, + }, + ]; + return false; + } + } + validate199.errors = vErrors; + return errors === 0; +} +exports.validateCreateWebsocketTokenResponse200Request = validate200; +const schema185 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'createWebsocketTokenResponse200Request', + 'x-location': + '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate200( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate200.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema185.type, + parentSchema: schema185, + data, + }, + ]; + return false; + } + validate200.errors = vErrors; + return errors === 0; +} +exports.validateCreateWebsocketTokenResponse200Response = validate201; +const schema186 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'createWebsocketTokenResponse200Response', + 'x-location': + '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate201( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate201.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema186.type, + parentSchema: schema186, + data, + }, + ]; + return false; + } + validate201.errors = vErrors; + return errors === 0; +} +exports.validateSendSignalingMessageBodyRequest = validate202; +const schema187 = { + title: 'Sig Message', + anyOf: [ + { + title: 'Create Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'createPeerconnection' }, + connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, + connectionUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + type: 'object', + required: ['serviceType', 'serviceId', 'remoteServiceId'], + title: 'Service Config', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + additionalProperties: true, + }, + }, + tiebreaker: { type: 'boolean' }, + config: { type: 'object', additionalProperties: true }, + }, + required: [ + 'command', + 'connectionType', + 'connectionUrl', + 'services', + 'tiebreaker', + ], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Close Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'closePeerconnection' }, + connectionUrl: { type: 'string', format: 'uri' }, + }, + required: ['command', 'connectionUrl'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Signaling Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'signaling' }, + signalingType: { type: 'string' }, + connectionUrl: { type: 'string', format: 'uri' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'signalingType', 'connectionUrl', 'content'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Configuration Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'configuration' }, + configuration: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'configuration'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Experiment Status Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'experiment-status-changed' }, + status: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['messageType', 'status'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-standalone': false, + 'x-name': 'sendSignalingMessageBodyRequest', + 'x-location': + '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate202( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + const _errs3 = errors; + if (errors === _errs3) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema187.anyOf[0].allOf[0].allOf[0].required, + parentSchema: schema187.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[0].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema187.anyOf[0].allOf[0].allOf[0].properties.messageType, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } + } else { + const err2 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[0].allOf[0].allOf[0].type, + parentSchema: schema187.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var valid2 = _errs3 === errors; + if (valid2) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + const err3 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema187.anyOf[0].allOf[0].allOf[1].required, + parentSchema: schema187.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs10 = errors; + if ('command' !== data1) { + const err4 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema187.anyOf[0].allOf[0].allOf[1].properties.messageType, + data: data1, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs11 = errors; + if (typeof data2 !== 'string') { + const err5 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[0].allOf[0].allOf[1].properties.command.type, + parentSchema: schema187.anyOf[0].allOf[0].allOf[1].properties.command, + data: data2, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid4 = _errs11 === errors; + } else { + var valid4 = true; + } + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[0].allOf[0].allOf[1].type, + parentSchema: schema187.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var valid2 = _errs8 === errors; + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs13 = errors; + if (errors === _errs13) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionType === undefined && (missing2 = 'connectionType')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || + (data.services === undefined && (missing2 = 'services')) || + (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) + ) { + const err7 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema187.anyOf[0].allOf[1].required, + parentSchema: schema187.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs15 = errors; + if ('createPeerconnection' !== data3) { + const err8 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'createPeerconnection' }, + message: 'must be equal to constant', + schema: 'createPeerconnection', + parentSchema: schema187.anyOf[0].allOf[1].properties.command, + data: data3, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + var valid5 = _errs15 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionType !== undefined) { + let data4 = data.connectionType; + const _errs16 = errors; + if (typeof data4 !== 'string') { + const err9 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[0].allOf[1].properties.connectionType.type, + parentSchema: schema187.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { + const err10 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/enum', + keyword: 'enum', + params: { + allowedValues: + schema187.anyOf[0].allOf[1].properties.connectionType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema187.anyOf[0].allOf[1].properties.connectionType.enum, + parentSchema: schema187.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + var valid5 = _errs16 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionUrl !== undefined) { + let data5 = data.connectionUrl; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + const err11 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema187.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } else { + const err12 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[0].allOf[1].properties.connectionUrl.type, + parentSchema: + schema187.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + } + var valid5 = _errs18 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.services !== undefined) { + let data6 = data.services; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data6)) { + var valid6 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing3; + if ( + (data7.serviceType === undefined && + (missing3 = 'serviceType')) || + (data7.serviceId === undefined && + (missing3 = 'serviceId')) || + (data7.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + const err13 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema187.anyOf[0].allOf[1].properties.services.items + .required, + parentSchema: + schema187.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data7.serviceType !== undefined) { + let data8 = data7.serviceType; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + const err14 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema187.anyOf[0].allOf[1].properties + .services.items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.serviceId !== undefined) { + let data9 = data7.serviceId; + const _errs27 = errors; + if (typeof data9 !== 'string') { + const err16 = { + instancePath: + instancePath + '/services/' + i0 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.serviceId, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.remoteServiceId !== undefined) { + let data10 = data7.remoteServiceId; + const _errs29 = errors; + if (typeof data10 !== 'string') { + const err17 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId.type, + parentSchema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + const err18 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema187.anyOf[0].allOf[1].properties.services.items + .type, + parentSchema: + schema187.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid6 = _errs22 === errors; + if (!valid6) { + break; + } + } + } else { + const err19 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema187.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema187.anyOf[0].allOf[1].properties.services, + data: data6, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + var valid5 = _errs20 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.tiebreaker !== undefined) { + let data11 = data.tiebreaker; + const _errs31 = errors; + if (typeof data11 !== 'boolean') { + const err20 = { + instancePath: instancePath + '/tiebreaker', + schemaPath: '#/anyOf/0/allOf/1/properties/tiebreaker/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema187.anyOf[0].allOf[1].properties.tiebreaker.type, + parentSchema: schema187.anyOf[0].allOf[1].properties.tiebreaker, + data: data11, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + var valid5 = _errs31 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.config !== undefined) { + let data12 = data.config; + const _errs33 = errors; + if (errors === _errs33) { + if ( + data12 && + typeof data12 == 'object' && + !Array.isArray(data12) + ) { + } else { + const err21 = { + instancePath: instancePath + '/config', + schemaPath: '#/anyOf/0/allOf/1/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[0].allOf[1].properties.config.type, + parentSchema: schema187.anyOf[0].allOf[1].properties.config, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + var valid5 = _errs33 === errors; + } else { + var valid5 = true; + } + } + } + } + } + } + } + } else { + const err22 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[0].allOf[1].type, + parentSchema: schema187.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } + var valid1 = _errs13 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs36 = errors; + const _errs37 = errors; + const _errs38 = errors; + if (errors === _errs38) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing4; + if (data.messageType === undefined && (missing4 = 'messageType')) { + const err23 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: schema187.anyOf[1].allOf[0].allOf[0].required, + parentSchema: schema187.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data13 = data.messageType; + if (typeof data13 !== 'string') { + const err24 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[1].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema187.anyOf[1].allOf[0].allOf[0].properties.messageType, + data: data13, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + } + } + } else { + const err25 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[1].allOf[0].allOf[0].type, + parentSchema: schema187.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid9 = _errs38 === errors; + if (valid9) { + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing5; + if ( + (data.messageType === undefined && (missing5 = 'messageType')) || + (data.command === undefined && (missing5 = 'command')) + ) { + const err26 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: "must have required property '" + missing5 + "'", + schema: schema187.anyOf[1].allOf[0].allOf[1].required, + parentSchema: schema187.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data14 = data.messageType; + const _errs45 = errors; + if ('command' !== data14) { + const err27 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: + schema187.anyOf[1].allOf[0].allOf[1].properties.messageType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.command !== undefined) { + let data15 = data.command; + const _errs46 = errors; + if (typeof data15 !== 'string') { + const err28 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[1].allOf[0].allOf[1].properties.command.type, + parentSchema: schema187.anyOf[1].allOf[0].allOf[1].properties.command, + data: data15, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + var valid11 = _errs46 === errors; + } else { + var valid11 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[1].allOf[0].allOf[1].type, + parentSchema: schema187.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid9 = _errs43 === errors; + } + var valid8 = _errs37 === errors; + if (valid8) { + const _errs48 = errors; + if (errors === _errs48) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.command === undefined && (missing6 = 'command')) || + (data.connectionUrl === undefined && (missing6 = 'connectionUrl')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema187.anyOf[1].allOf[1].required, + parentSchema: schema187.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.command !== undefined) { + let data16 = data.command; + const _errs50 = errors; + if ('closePeerconnection' !== data16) { + const err31 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'closePeerconnection' }, + message: 'must be equal to constant', + schema: 'closePeerconnection', + parentSchema: schema187.anyOf[1].allOf[1].properties.command, + data: data16, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + var valid12 = _errs50 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data.connectionUrl !== undefined) { + let data17 = data.connectionUrl; + const _errs51 = errors; + if (errors === _errs51) { + if (errors === _errs51) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + const err32 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema187.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } else { + const err33 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[1].allOf[1].properties.connectionUrl.type, + parentSchema: + schema187.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + } + } + var valid12 = _errs51 === errors; + } else { + var valid12 = true; + } + } + } + } else { + const err34 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[1].allOf[1].type, + parentSchema: schema187.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + } + var valid8 = _errs48 === errors; + } + var _valid0 = _errs36 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs53 = errors; + const _errs54 = errors; + if (errors === _errs54) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing7; + if (data.messageType === undefined && (missing7 = 'messageType')) { + const err35 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: "must have required property '" + missing7 + "'", + schema: schema187.anyOf[2].allOf[0].required, + parentSchema: schema187.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data18 = data.messageType; + if (typeof data18 !== 'string') { + const err36 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[2].allOf[0].properties.messageType.type, + parentSchema: schema187.anyOf[2].allOf[0].properties.messageType, + data: data18, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } else { + const err37 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[2].allOf[0].type, + parentSchema: schema187.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid13 = _errs54 === errors; + if (valid13) { + const _errs59 = errors; + if (errors === _errs59) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing8; + if ( + (data.messageType === undefined && (missing8 = 'messageType')) || + (data.signalingType === undefined && (missing8 = 'signalingType')) || + (data.connectionUrl === undefined && (missing8 = 'connectionUrl')) || + (data.content === undefined && (missing8 = 'content')) + ) { + const err38 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: "must have required property '" + missing8 + "'", + schema: schema187.anyOf[2].allOf[1].required, + parentSchema: schema187.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data19 = data.messageType; + const _errs61 = errors; + if ('signaling' !== data19) { + const err39 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'signaling' }, + message: 'must be equal to constant', + schema: 'signaling', + parentSchema: schema187.anyOf[2].allOf[1].properties.messageType, + data: data19, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + var valid15 = _errs61 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.signalingType !== undefined) { + let data20 = data.signalingType; + const _errs62 = errors; + if (typeof data20 !== 'string') { + const err40 = { + instancePath: instancePath + '/signalingType', + schemaPath: '#/anyOf/2/allOf/1/properties/signalingType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[2].allOf[1].properties.signalingType.type, + parentSchema: schema187.anyOf[2].allOf[1].properties.signalingType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + var valid15 = _errs62 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.connectionUrl !== undefined) { + let data21 = data.connectionUrl; + const _errs64 = errors; + if (errors === _errs64) { + if (errors === _errs64) { + if (typeof data21 === 'string') { + if (!formats0(data21)) { + const err41 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: + '#/anyOf/2/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema187.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } else { + const err42 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema187.anyOf[2].allOf[1].properties.connectionUrl.type, + parentSchema: + schema187.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + } + var valid15 = _errs64 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.content !== undefined) { + let data22 = data.content; + const _errs66 = errors; + if (errors === _errs66) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + } else { + const err43 = { + instancePath: instancePath + '/content', + schemaPath: '#/anyOf/2/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[2].allOf[1].properties.content.type, + parentSchema: schema187.anyOf[2].allOf[1].properties.content, + data: data22, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid15 = _errs66 === errors; + } else { + var valid15 = true; + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[2].allOf[1].type, + parentSchema: schema187.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid13 = _errs59 === errors; + } + var _valid0 = _errs53 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs69 = errors; + const _errs70 = errors; + if (errors === _errs70) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.messageType === undefined && (missing9 = 'messageType')) { + const err45 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema187.anyOf[3].allOf[0].required, + parentSchema: schema187.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data23 = data.messageType; + if (typeof data23 !== 'string') { + const err46 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[3].allOf[0].properties.messageType.type, + parentSchema: schema187.anyOf[3].allOf[0].properties.messageType, + data: data23, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + } + } else { + const err47 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[3].allOf[0].type, + parentSchema: schema187.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid16 = _errs70 === errors; + if (valid16) { + const _errs75 = errors; + if (errors === _errs75) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing10; + if ( + (data.messageType === undefined && (missing10 = 'messageType')) || + (data.configuration === undefined && (missing10 = 'configuration')) + ) { + const err48 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: "must have required property '" + missing10 + "'", + schema: schema187.anyOf[3].allOf[1].required, + parentSchema: schema187.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data24 = data.messageType; + const _errs77 = errors; + if ('configuration' !== data24) { + const err49 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'configuration' }, + message: 'must be equal to constant', + schema: 'configuration', + parentSchema: schema187.anyOf[3].allOf[1].properties.messageType, + data: data24, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data.configuration !== undefined) { + let data25 = data.configuration; + const _errs78 = errors; + if (errors === _errs78) { + if (data25 && typeof data25 == 'object' && !Array.isArray(data25)) { + } else { + const err50 = { + instancePath: instancePath + '/configuration', + schemaPath: '#/anyOf/3/allOf/1/properties/configuration/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema187.anyOf[3].allOf[1].properties.configuration.type, + parentSchema: + schema187.anyOf[3].allOf[1].properties.configuration, + data: data25, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err51 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[3].allOf[1].type, + parentSchema: schema187.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } + var valid16 = _errs75 === errors; + } + var _valid0 = _errs69 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs81 = errors; + const _errs82 = errors; + if (errors === _errs82) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing11; + if (data.messageType === undefined && (missing11 = 'messageType')) { + const err52 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: "must have required property '" + missing11 + "'", + schema: schema187.anyOf[4].allOf[0].required, + parentSchema: schema187.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data26 = data.messageType; + if (typeof data26 !== 'string') { + const err53 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[4].allOf[0].properties.messageType.type, + parentSchema: schema187.anyOf[4].allOf[0].properties.messageType, + data: data26, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + } + } else { + const err54 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[4].allOf[0].type, + parentSchema: schema187.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid19 = _errs82 === errors; + if (valid19) { + const _errs87 = errors; + if (errors === _errs87) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if ( + (data.messageType === undefined && (missing12 = 'messageType')) || + (data.status === undefined && (missing12 = 'status')) + ) { + const err55 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema187.anyOf[4].allOf[1].required, + parentSchema: schema187.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data27 = data.messageType; + const _errs89 = errors; + if ('experiment-status-changed' !== data27) { + const err56 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'experiment-status-changed' }, + message: 'must be equal to constant', + schema: 'experiment-status-changed', + parentSchema: schema187.anyOf[4].allOf[1].properties.messageType, + data: data27, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + var valid21 = _errs89 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.status !== undefined) { + let data28 = data.status; + const _errs90 = errors; + if (typeof data28 !== 'string') { + const err57 = { + instancePath: instancePath + '/status', + schemaPath: '#/anyOf/4/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[4].allOf[1].properties.status.type, + parentSchema: schema187.anyOf[4].allOf[1].properties.status, + data: data28, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid21 = _errs90 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.message !== undefined) { + let data29 = data.message; + const _errs92 = errors; + if (typeof data29 !== 'string') { + const err58 = { + instancePath: instancePath + '/message', + schemaPath: '#/anyOf/4/allOf/1/properties/message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[4].allOf[1].properties.message.type, + parentSchema: schema187.anyOf[4].allOf[1].properties.message, + data: data29, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid21 = _errs92 === errors; + } else { + var valid21 = true; + } + } + } + } + } else { + const err59 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[4].allOf[1].type, + parentSchema: schema187.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } + var valid19 = _errs87 === errors; + } + var _valid0 = _errs81 === errors; + valid0 = valid0 || _valid0; + } + } + } + } + if (!valid0) { + const err60 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema187.anyOf, + parentSchema: schema187, + data, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + validate202.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate202.errors = vErrors; + return errors === 0; +} +exports.validateSendSignalingMessageBodyResponse = validate203; +const schema188 = { + title: 'Sig Message', + anyOf: [ + { + title: 'Create Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'createPeerconnection' }, + connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, + connectionUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + type: 'object', + required: ['serviceType', 'serviceId', 'remoteServiceId'], + title: 'Service Config', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + additionalProperties: true, + }, + }, + tiebreaker: { type: 'boolean' }, + config: { type: 'object', additionalProperties: true }, + }, + required: [ + 'command', + 'connectionType', + 'connectionUrl', + 'services', + 'tiebreaker', + ], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Close Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'closePeerconnection' }, + connectionUrl: { type: 'string', format: 'uri' }, + }, + required: ['command', 'connectionUrl'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Signaling Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'signaling' }, + signalingType: { type: 'string' }, + connectionUrl: { type: 'string', format: 'uri' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'signalingType', 'connectionUrl', 'content'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Configuration Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'configuration' }, + configuration: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'configuration'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Experiment Status Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'experiment-status-changed' }, + status: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['messageType', 'status'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-standalone': false, + 'x-name': 'sendSignalingMessageBodyResponse', + 'x-location': + '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate203( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + const _errs3 = errors; + if (errors === _errs3) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema188.anyOf[0].allOf[0].allOf[0].required, + parentSchema: schema188.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[0].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema188.anyOf[0].allOf[0].allOf[0].properties.messageType, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } + } else { + const err2 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[0].allOf[0].allOf[0].type, + parentSchema: schema188.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var valid2 = _errs3 === errors; + if (valid2) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + const err3 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema188.anyOf[0].allOf[0].allOf[1].required, + parentSchema: schema188.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs10 = errors; + if ('command' !== data1) { + const err4 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema188.anyOf[0].allOf[0].allOf[1].properties.messageType, + data: data1, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs11 = errors; + if (typeof data2 !== 'string') { + const err5 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[0].allOf[0].allOf[1].properties.command.type, + parentSchema: schema188.anyOf[0].allOf[0].allOf[1].properties.command, + data: data2, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid4 = _errs11 === errors; + } else { + var valid4 = true; + } + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[0].allOf[0].allOf[1].type, + parentSchema: schema188.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var valid2 = _errs8 === errors; + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs13 = errors; + if (errors === _errs13) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionType === undefined && (missing2 = 'connectionType')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || + (data.services === undefined && (missing2 = 'services')) || + (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) + ) { + const err7 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema188.anyOf[0].allOf[1].required, + parentSchema: schema188.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs15 = errors; + if ('createPeerconnection' !== data3) { + const err8 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'createPeerconnection' }, + message: 'must be equal to constant', + schema: 'createPeerconnection', + parentSchema: schema188.anyOf[0].allOf[1].properties.command, + data: data3, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + var valid5 = _errs15 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionType !== undefined) { + let data4 = data.connectionType; + const _errs16 = errors; + if (typeof data4 !== 'string') { + const err9 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[0].allOf[1].properties.connectionType.type, + parentSchema: schema188.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { + const err10 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/enum', + keyword: 'enum', + params: { + allowedValues: + schema188.anyOf[0].allOf[1].properties.connectionType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema188.anyOf[0].allOf[1].properties.connectionType.enum, + parentSchema: schema188.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + var valid5 = _errs16 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionUrl !== undefined) { + let data5 = data.connectionUrl; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + const err11 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema188.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } else { + const err12 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[0].allOf[1].properties.connectionUrl.type, + parentSchema: + schema188.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + } + var valid5 = _errs18 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.services !== undefined) { + let data6 = data.services; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data6)) { + var valid6 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing3; + if ( + (data7.serviceType === undefined && + (missing3 = 'serviceType')) || + (data7.serviceId === undefined && + (missing3 = 'serviceId')) || + (data7.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + const err13 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema188.anyOf[0].allOf[1].properties.services.items + .required, + parentSchema: + schema188.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data7.serviceType !== undefined) { + let data8 = data7.serviceType; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + const err14 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema188.anyOf[0].allOf[1].properties + .services.items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.serviceId !== undefined) { + let data9 = data7.serviceId; + const _errs27 = errors; + if (typeof data9 !== 'string') { + const err16 = { + instancePath: + instancePath + '/services/' + i0 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.serviceId, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.remoteServiceId !== undefined) { + let data10 = data7.remoteServiceId; + const _errs29 = errors; + if (typeof data10 !== 'string') { + const err17 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId.type, + parentSchema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + const err18 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema188.anyOf[0].allOf[1].properties.services.items + .type, + parentSchema: + schema188.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid6 = _errs22 === errors; + if (!valid6) { + break; + } + } + } else { + const err19 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema188.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema188.anyOf[0].allOf[1].properties.services, + data: data6, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + var valid5 = _errs20 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.tiebreaker !== undefined) { + let data11 = data.tiebreaker; + const _errs31 = errors; + if (typeof data11 !== 'boolean') { + const err20 = { + instancePath: instancePath + '/tiebreaker', + schemaPath: '#/anyOf/0/allOf/1/properties/tiebreaker/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema188.anyOf[0].allOf[1].properties.tiebreaker.type, + parentSchema: schema188.anyOf[0].allOf[1].properties.tiebreaker, + data: data11, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + var valid5 = _errs31 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.config !== undefined) { + let data12 = data.config; + const _errs33 = errors; + if (errors === _errs33) { + if ( + data12 && + typeof data12 == 'object' && + !Array.isArray(data12) + ) { + } else { + const err21 = { + instancePath: instancePath + '/config', + schemaPath: '#/anyOf/0/allOf/1/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[0].allOf[1].properties.config.type, + parentSchema: schema188.anyOf[0].allOf[1].properties.config, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + var valid5 = _errs33 === errors; + } else { + var valid5 = true; + } + } + } + } + } + } + } + } else { + const err22 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[0].allOf[1].type, + parentSchema: schema188.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } + var valid1 = _errs13 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs36 = errors; + const _errs37 = errors; + const _errs38 = errors; + if (errors === _errs38) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing4; + if (data.messageType === undefined && (missing4 = 'messageType')) { + const err23 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: schema188.anyOf[1].allOf[0].allOf[0].required, + parentSchema: schema188.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data13 = data.messageType; + if (typeof data13 !== 'string') { + const err24 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[1].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema188.anyOf[1].allOf[0].allOf[0].properties.messageType, + data: data13, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + } + } + } else { + const err25 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[1].allOf[0].allOf[0].type, + parentSchema: schema188.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid9 = _errs38 === errors; + if (valid9) { + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing5; + if ( + (data.messageType === undefined && (missing5 = 'messageType')) || + (data.command === undefined && (missing5 = 'command')) + ) { + const err26 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: "must have required property '" + missing5 + "'", + schema: schema188.anyOf[1].allOf[0].allOf[1].required, + parentSchema: schema188.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data14 = data.messageType; + const _errs45 = errors; + if ('command' !== data14) { + const err27 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: + schema188.anyOf[1].allOf[0].allOf[1].properties.messageType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.command !== undefined) { + let data15 = data.command; + const _errs46 = errors; + if (typeof data15 !== 'string') { + const err28 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[1].allOf[0].allOf[1].properties.command.type, + parentSchema: schema188.anyOf[1].allOf[0].allOf[1].properties.command, + data: data15, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + var valid11 = _errs46 === errors; + } else { + var valid11 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[1].allOf[0].allOf[1].type, + parentSchema: schema188.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid9 = _errs43 === errors; + } + var valid8 = _errs37 === errors; + if (valid8) { + const _errs48 = errors; + if (errors === _errs48) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.command === undefined && (missing6 = 'command')) || + (data.connectionUrl === undefined && (missing6 = 'connectionUrl')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema188.anyOf[1].allOf[1].required, + parentSchema: schema188.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.command !== undefined) { + let data16 = data.command; + const _errs50 = errors; + if ('closePeerconnection' !== data16) { + const err31 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'closePeerconnection' }, + message: 'must be equal to constant', + schema: 'closePeerconnection', + parentSchema: schema188.anyOf[1].allOf[1].properties.command, + data: data16, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + var valid12 = _errs50 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data.connectionUrl !== undefined) { + let data17 = data.connectionUrl; + const _errs51 = errors; + if (errors === _errs51) { + if (errors === _errs51) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + const err32 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema188.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } else { + const err33 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[1].allOf[1].properties.connectionUrl.type, + parentSchema: + schema188.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + } + } + var valid12 = _errs51 === errors; + } else { + var valid12 = true; + } + } + } + } else { + const err34 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[1].allOf[1].type, + parentSchema: schema188.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + } + var valid8 = _errs48 === errors; + } + var _valid0 = _errs36 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs53 = errors; + const _errs54 = errors; + if (errors === _errs54) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing7; + if (data.messageType === undefined && (missing7 = 'messageType')) { + const err35 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: "must have required property '" + missing7 + "'", + schema: schema188.anyOf[2].allOf[0].required, + parentSchema: schema188.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data18 = data.messageType; + if (typeof data18 !== 'string') { + const err36 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[2].allOf[0].properties.messageType.type, + parentSchema: schema188.anyOf[2].allOf[0].properties.messageType, + data: data18, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } else { + const err37 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[2].allOf[0].type, + parentSchema: schema188.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid13 = _errs54 === errors; + if (valid13) { + const _errs59 = errors; + if (errors === _errs59) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing8; + if ( + (data.messageType === undefined && (missing8 = 'messageType')) || + (data.signalingType === undefined && (missing8 = 'signalingType')) || + (data.connectionUrl === undefined && (missing8 = 'connectionUrl')) || + (data.content === undefined && (missing8 = 'content')) + ) { + const err38 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: "must have required property '" + missing8 + "'", + schema: schema188.anyOf[2].allOf[1].required, + parentSchema: schema188.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data19 = data.messageType; + const _errs61 = errors; + if ('signaling' !== data19) { + const err39 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'signaling' }, + message: 'must be equal to constant', + schema: 'signaling', + parentSchema: schema188.anyOf[2].allOf[1].properties.messageType, + data: data19, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + var valid15 = _errs61 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.signalingType !== undefined) { + let data20 = data.signalingType; + const _errs62 = errors; + if (typeof data20 !== 'string') { + const err40 = { + instancePath: instancePath + '/signalingType', + schemaPath: '#/anyOf/2/allOf/1/properties/signalingType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[2].allOf[1].properties.signalingType.type, + parentSchema: schema188.anyOf[2].allOf[1].properties.signalingType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + var valid15 = _errs62 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.connectionUrl !== undefined) { + let data21 = data.connectionUrl; + const _errs64 = errors; + if (errors === _errs64) { + if (errors === _errs64) { + if (typeof data21 === 'string') { + if (!formats0(data21)) { + const err41 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: + '#/anyOf/2/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema188.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } else { + const err42 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema188.anyOf[2].allOf[1].properties.connectionUrl.type, + parentSchema: + schema188.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + } + var valid15 = _errs64 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.content !== undefined) { + let data22 = data.content; + const _errs66 = errors; + if (errors === _errs66) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + } else { + const err43 = { + instancePath: instancePath + '/content', + schemaPath: '#/anyOf/2/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[2].allOf[1].properties.content.type, + parentSchema: schema188.anyOf[2].allOf[1].properties.content, + data: data22, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid15 = _errs66 === errors; + } else { + var valid15 = true; + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[2].allOf[1].type, + parentSchema: schema188.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid13 = _errs59 === errors; + } + var _valid0 = _errs53 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs69 = errors; + const _errs70 = errors; + if (errors === _errs70) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.messageType === undefined && (missing9 = 'messageType')) { + const err45 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema188.anyOf[3].allOf[0].required, + parentSchema: schema188.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data23 = data.messageType; + if (typeof data23 !== 'string') { + const err46 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[3].allOf[0].properties.messageType.type, + parentSchema: schema188.anyOf[3].allOf[0].properties.messageType, + data: data23, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + } + } else { + const err47 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[3].allOf[0].type, + parentSchema: schema188.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid16 = _errs70 === errors; + if (valid16) { + const _errs75 = errors; + if (errors === _errs75) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing10; + if ( + (data.messageType === undefined && (missing10 = 'messageType')) || + (data.configuration === undefined && (missing10 = 'configuration')) + ) { + const err48 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: "must have required property '" + missing10 + "'", + schema: schema188.anyOf[3].allOf[1].required, + parentSchema: schema188.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data24 = data.messageType; + const _errs77 = errors; + if ('configuration' !== data24) { + const err49 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'configuration' }, + message: 'must be equal to constant', + schema: 'configuration', + parentSchema: schema188.anyOf[3].allOf[1].properties.messageType, + data: data24, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data.configuration !== undefined) { + let data25 = data.configuration; + const _errs78 = errors; + if (errors === _errs78) { + if (data25 && typeof data25 == 'object' && !Array.isArray(data25)) { + } else { + const err50 = { + instancePath: instancePath + '/configuration', + schemaPath: '#/anyOf/3/allOf/1/properties/configuration/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema188.anyOf[3].allOf[1].properties.configuration.type, + parentSchema: + schema188.anyOf[3].allOf[1].properties.configuration, + data: data25, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err51 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[3].allOf[1].type, + parentSchema: schema188.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } + var valid16 = _errs75 === errors; + } + var _valid0 = _errs69 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs81 = errors; + const _errs82 = errors; + if (errors === _errs82) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing11; + if (data.messageType === undefined && (missing11 = 'messageType')) { + const err52 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: "must have required property '" + missing11 + "'", + schema: schema188.anyOf[4].allOf[0].required, + parentSchema: schema188.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data26 = data.messageType; + if (typeof data26 !== 'string') { + const err53 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[4].allOf[0].properties.messageType.type, + parentSchema: schema188.anyOf[4].allOf[0].properties.messageType, + data: data26, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + } + } else { + const err54 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[4].allOf[0].type, + parentSchema: schema188.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid19 = _errs82 === errors; + if (valid19) { + const _errs87 = errors; + if (errors === _errs87) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if ( + (data.messageType === undefined && (missing12 = 'messageType')) || + (data.status === undefined && (missing12 = 'status')) + ) { + const err55 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema188.anyOf[4].allOf[1].required, + parentSchema: schema188.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data27 = data.messageType; + const _errs89 = errors; + if ('experiment-status-changed' !== data27) { + const err56 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'experiment-status-changed' }, + message: 'must be equal to constant', + schema: 'experiment-status-changed', + parentSchema: schema188.anyOf[4].allOf[1].properties.messageType, + data: data27, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + var valid21 = _errs89 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.status !== undefined) { + let data28 = data.status; + const _errs90 = errors; + if (typeof data28 !== 'string') { + const err57 = { + instancePath: instancePath + '/status', + schemaPath: '#/anyOf/4/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[4].allOf[1].properties.status.type, + parentSchema: schema188.anyOf[4].allOf[1].properties.status, + data: data28, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid21 = _errs90 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.message !== undefined) { + let data29 = data.message; + const _errs92 = errors; + if (typeof data29 !== 'string') { + const err58 = { + instancePath: instancePath + '/message', + schemaPath: '#/anyOf/4/allOf/1/properties/message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[4].allOf[1].properties.message.type, + parentSchema: schema188.anyOf[4].allOf[1].properties.message, + data: data29, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid21 = _errs92 === errors; + } else { + var valid21 = true; + } + } + } + } + } else { + const err59 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[4].allOf[1].type, + parentSchema: schema188.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } + var valid19 = _errs87 === errors; + } + var _valid0 = _errs81 === errors; + valid0 = valid0 || _valid0; + } + } + } + } + if (!valid0) { + const err60 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema188.anyOf, + parentSchema: schema188, + data, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + validate203.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate203.errors = vErrors; + return errors === 0; +} +exports.validateListPeerconnectionsResponse200Request = validate204; +const schema189 = { + type: 'array', + items: { + title: 'Peerconnection Overview', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + }, + 'x-standalone': false, + 'x-name': 'listPeerconnectionsResponse200Request', + 'x-location': + '#/paths//peerconnections/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate204( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if (data0.type === undefined && (missing0 = 'type')) { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema189.items.allOf[0].required, + parentSchema: schema189.items.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.type !== undefined) { + let data1 = data0.type; + if (typeof data1 !== 'string') { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema189.items.allOf[0].properties.type.type, + parentSchema: schema189.items.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema189.items.allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema189.items.allOf[0].properties.type.enum, + parentSchema: schema189.items.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + } + } + } else { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema189.items.allOf[0].type, + parentSchema: schema189.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.devices === undefined && (missing1 = 'devices')) { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema189.items.allOf[1].required, + parentSchema: schema189.items.allOf[1], + data: data0, + }, + ]; + return false; + } else { + if (data0.devices !== undefined) { + let data2 = data0.devices; + const _errs8 = errors; + if (errors === _errs8) { + if (Array.isArray(data2)) { + if (data2.length > 2) { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema189.items.allOf[1].properties.devices, + data: data2, + }, + ]; + return false; + } else { + if (data2.length < 2) { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema189.items.allOf[1].properties.devices, + data: data2, + }, + ]; + return false; + } else { + var valid4 = true; + const len1 = data2.length; + for (let i1 = 0; i1 < len1; i1++) { + let data3 = data2[i1]; + const _errs10 = errors; + if (errors === _errs10) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing2; + if (data3.url === undefined && (missing2 = 'url')) { + validate204.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema189.items.allOf[1].properties.devices.items + .required, + parentSchema: + schema189.items.allOf[1].properties.devices.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.url !== undefined) { + let data4 = data3.url; + const _errs12 = errors; + if (errors === _errs12) { + if (errors === _errs12) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate204.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema189.items.allOf[1].properties + .devices.items.properties.url, + data: data4, + }, + ]; + return false; + } + } else { + validate204.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema189.items.allOf[1].properties + .devices.items.properties.url.type, + parentSchema: + schema189.items.allOf[1].properties + .devices.items.properties.url, + data: data4, + }, + ]; + return false; + } + } + } + } + } + } else { + validate204.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema189.items.allOf[1].properties.devices.items + .type, + parentSchema: + schema189.items.allOf[1].properties.devices.items, + data: data3, + }, + ]; + return false; + } + } + var valid4 = _errs10 === errors; + if (!valid4) { + break; + } + } + } + } + } else { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema189.items.allOf[1].properties.devices.type, + parentSchema: schema189.items.allOf[1].properties.devices, + data: data2, + }, + ]; + return false; + } + } + } + } + } else { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema189.items.allOf[1].type, + parentSchema: schema189.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate204.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema189.type, + parentSchema: schema189, + data, + }, + ]; + return false; + } + } + validate204.errors = vErrors; + return errors === 0; +} +exports.validateListPeerconnectionsResponse200Response = validate205; +const schema190 = { + type: 'array', + items: { + title: 'Peerconnection Overview', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + }, + 'x-standalone': false, + 'x-name': 'listPeerconnectionsResponse200Response', + 'x-location': + '#/paths//peerconnections/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate205( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.url === undefined && (missing0 = 'url')) || + (data0.type === undefined && (missing0 = 'type')) || + (data0.status === undefined && (missing0 = 'status')) + ) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema190.items.allOf[0].required, + parentSchema: schema190.items.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema190.items.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema190.items.allOf[0].properties.url.type, + parentSchema: schema190.items.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.type !== undefined) { + let data2 = data0.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema190.items.allOf[0].properties.type.type, + parentSchema: schema190.items.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if (!(data2 === 'local' || data2 === 'webrtc')) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema190.items.allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema190.items.allOf[0].properties.type.enum, + parentSchema: schema190.items.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.status !== undefined) { + let data3 = data0.status; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/status', + schemaPath: '#/items/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema190.items.allOf[0].properties.status.type, + parentSchema: schema190.items.allOf[0].properties.status, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'new' || + data3 === 'connecting' || + data3 === 'connected' || + data3 === 'disconnected' || + data3 === 'failed' || + data3 === 'closed' + ) + ) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/status', + schemaPath: '#/items/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: + schema190.items.allOf[0].properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema190.items.allOf[0].properties.status.enum, + parentSchema: schema190.items.allOf[0].properties.status, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema190.items.allOf[0].type, + parentSchema: schema190.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs10 = errors; + if (errors === _errs10) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.devices === undefined && (missing1 = 'devices')) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema190.items.allOf[1].required, + parentSchema: schema190.items.allOf[1], + data: data0, + }, + ]; + return false; + } else { + if (data0.devices !== undefined) { + let data4 = data0.devices; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + if (data4.length > 2) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema190.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } else { + if (data4.length < 2) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema190.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } else { + var valid4 = true; + const len1 = data4.length; + for (let i1 = 0; i1 < len1; i1++) { + let data5 = data4[i1]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing2; + if (data5.url === undefined && (missing2 = 'url')) { + validate205.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema190.items.allOf[1].properties.devices.items + .required, + parentSchema: + schema190.items.allOf[1].properties.devices.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate205.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema190.items.allOf[1].properties + .devices.items.properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate205.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema190.items.allOf[1].properties + .devices.items.properties.url.type, + parentSchema: + schema190.items.allOf[1].properties + .devices.items.properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate205.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema190.items.allOf[1].properties.devices.items + .type, + parentSchema: + schema190.items.allOf[1].properties.devices.items, + data: data5, + }, + ]; + return false; + } + } + var valid4 = _errs14 === errors; + if (!valid4) { + break; + } + } + } + } + } else { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema190.items.allOf[1].properties.devices.type, + parentSchema: schema190.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } + } + } + } + } else { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema190.items.allOf[1].type, + parentSchema: schema190.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate205.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema190.type, + parentSchema: schema190, + data, + }, + ]; + return false; + } + } + validate205.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionBodyRequest = validate206; +const schema191 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionBodyRequest', + 'x-location': + '#/paths//peerconnections/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate206( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate206.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema191.allOf[0].required, + parentSchema: schema191.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate206.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema191.allOf[0].properties.type.type, + parentSchema: schema191.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate206.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema191.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema191.allOf[0].properties.type.enum, + parentSchema: schema191.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate206.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema191.allOf[0].type, + parentSchema: schema191.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate206.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema191.allOf[1].required, + parentSchema: schema191.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate206.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema191.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate206.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema191.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate206.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema191.allOf[1].properties.devices.items.required, + parentSchema: schema191.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate206.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema191.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate206.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema191.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema191.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data2.config !== undefined) { + let data4 = data2.config; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data4 && + typeof data4 == 'object' && + !Array.isArray(data4) + ) { + if (data4.services !== undefined) { + let data5 = data4.services; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid6 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing3; + if ( + (data6.serviceType === undefined && + (missing3 = 'serviceType')) || + (data6.serviceId === undefined && + (missing3 = 'serviceId')) || + (data6.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema191.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema191.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.serviceType !== undefined) { + let data7 = data6.serviceType; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema191.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } else { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema191.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema191.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } + } + var valid7 = _errs19 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data6.serviceId !== undefined) { + let data8 = data6.serviceId; + const _errs21 = errors; + if (typeof data8 !== 'string') { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema191.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema191.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data8, + }, + ]; + return false; + } + var valid7 = _errs21 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data6.remoteServiceId !== + undefined + ) { + let data9 = data6.remoteServiceId; + const _errs23 = errors; + if (typeof data9 !== 'string') { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema191.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema191.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data9, + }, + ]; + return false; + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema191.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema191.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } + } + var valid6 = _errs16 === errors; + if (!valid6) { + break; + } + } + } else { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema191.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema191.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate206.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema191.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema191.allOf[1].properties.devices.items + .properties.config, + data: data4, + }, + ]; + return false; + } + } + var valid4 = _errs12 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate206.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema191.allOf[1].properties.devices.items.type, + parentSchema: schema191.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate206.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema191.allOf[1].properties.devices.type, + parentSchema: schema191.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate206.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema191.allOf[1].type, + parentSchema: schema191.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate206.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionBodyResponse = validate207; +const schema192 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionBodyResponse', + 'x-location': + '#/paths//peerconnections/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate207( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate207.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema192.allOf[0].required, + parentSchema: schema192.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate207.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema192.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate207.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema192.allOf[0].properties.url.type, + parentSchema: schema192.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate207.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema192.allOf[0].properties.type.type, + parentSchema: schema192.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate207.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema192.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema192.allOf[0].properties.type.enum, + parentSchema: schema192.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate207.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema192.allOf[0].properties.status.type, + parentSchema: schema192.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate207.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema192.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema192.allOf[0].properties.status.enum, + parentSchema: schema192.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate207.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema192.allOf[0].type, + parentSchema: schema192.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate207.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema192.allOf[1].required, + parentSchema: schema192.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate207.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema192.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate207.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema192.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate207.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema192.allOf[1].properties.devices.items.required, + parentSchema: schema192.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate207.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema192.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate207.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema192.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema192.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema192.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema192.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema192.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema192.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema192.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema192.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema192.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema192.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema192.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema192.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema192.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema192.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema192.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate207.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema192.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema192.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate207.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema192.allOf[1].properties.devices.items.type, + parentSchema: schema192.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate207.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema192.allOf[1].properties.devices.type, + parentSchema: schema192.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate207.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema192.allOf[1].type, + parentSchema: schema192.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate207.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse201Request = validate208; +const schema193 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse201Request', + 'x-location': + '#/paths//peerconnections/post/responses/201/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate208( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate208.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema193.allOf[0].required, + parentSchema: schema193.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate208.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema193.allOf[0].properties.type.type, + parentSchema: schema193.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate208.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema193.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema193.allOf[0].properties.type.enum, + parentSchema: schema193.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate208.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema193.allOf[0].type, + parentSchema: schema193.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate208.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema193.allOf[1].required, + parentSchema: schema193.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate208.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema193.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate208.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema193.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate208.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema193.allOf[1].properties.devices.items.required, + parentSchema: schema193.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate208.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema193.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate208.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema193.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema193.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data2.config !== undefined) { + let data4 = data2.config; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data4 && + typeof data4 == 'object' && + !Array.isArray(data4) + ) { + if (data4.services !== undefined) { + let data5 = data4.services; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid6 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing3; + if ( + (data6.serviceType === undefined && + (missing3 = 'serviceType')) || + (data6.serviceId === undefined && + (missing3 = 'serviceId')) || + (data6.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema193.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema193.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.serviceType !== undefined) { + let data7 = data6.serviceType; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema193.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } else { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema193.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema193.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } + } + var valid7 = _errs19 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data6.serviceId !== undefined) { + let data8 = data6.serviceId; + const _errs21 = errors; + if (typeof data8 !== 'string') { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema193.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema193.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data8, + }, + ]; + return false; + } + var valid7 = _errs21 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data6.remoteServiceId !== + undefined + ) { + let data9 = data6.remoteServiceId; + const _errs23 = errors; + if (typeof data9 !== 'string') { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema193.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema193.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data9, + }, + ]; + return false; + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema193.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema193.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } + } + var valid6 = _errs16 === errors; + if (!valid6) { + break; + } + } + } else { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema193.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema193.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate208.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema193.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema193.allOf[1].properties.devices.items + .properties.config, + data: data4, + }, + ]; + return false; + } + } + var valid4 = _errs12 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate208.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema193.allOf[1].properties.devices.items.type, + parentSchema: schema193.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate208.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema193.allOf[1].properties.devices.type, + parentSchema: schema193.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate208.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema193.allOf[1].type, + parentSchema: schema193.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate208.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse201Response = validate209; +const schema194 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse201Response', + 'x-location': + '#/paths//peerconnections/post/responses/201/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate209( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate209.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema194.allOf[0].required, + parentSchema: schema194.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate209.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema194.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate209.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema194.allOf[0].properties.url.type, + parentSchema: schema194.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate209.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema194.allOf[0].properties.type.type, + parentSchema: schema194.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate209.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema194.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema194.allOf[0].properties.type.enum, + parentSchema: schema194.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate209.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema194.allOf[0].properties.status.type, + parentSchema: schema194.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate209.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema194.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema194.allOf[0].properties.status.enum, + parentSchema: schema194.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate209.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema194.allOf[0].type, + parentSchema: schema194.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate209.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema194.allOf[1].required, + parentSchema: schema194.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate209.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema194.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate209.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema194.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate209.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema194.allOf[1].properties.devices.items.required, + parentSchema: schema194.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate209.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema194.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate209.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema194.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema194.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema194.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema194.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema194.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema194.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema194.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema194.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema194.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema194.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema194.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema194.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema194.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema194.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema194.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate209.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema194.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema194.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate209.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema194.allOf[1].properties.devices.items.type, + parentSchema: schema194.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate209.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema194.allOf[1].properties.devices.type, + parentSchema: schema194.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate209.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema194.allOf[1].type, + parentSchema: schema194.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate209.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse202Request = validate210; +const schema195 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse202Request', + 'x-location': + '#/paths//peerconnections/post/responses/202/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate210( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate210.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema195.allOf[0].required, + parentSchema: schema195.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate210.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema195.allOf[0].properties.type.type, + parentSchema: schema195.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate210.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema195.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema195.allOf[0].properties.type.enum, + parentSchema: schema195.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate210.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema195.allOf[0].type, + parentSchema: schema195.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate210.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema195.allOf[1].required, + parentSchema: schema195.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate210.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema195.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate210.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema195.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate210.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema195.allOf[1].properties.devices.items.required, + parentSchema: schema195.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate210.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema195.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate210.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema195.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema195.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data2.config !== undefined) { + let data4 = data2.config; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data4 && + typeof data4 == 'object' && + !Array.isArray(data4) + ) { + if (data4.services !== undefined) { + let data5 = data4.services; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid6 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing3; + if ( + (data6.serviceType === undefined && + (missing3 = 'serviceType')) || + (data6.serviceId === undefined && + (missing3 = 'serviceId')) || + (data6.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema195.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema195.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.serviceType !== undefined) { + let data7 = data6.serviceType; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema195.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } else { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema195.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema195.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } + } + var valid7 = _errs19 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data6.serviceId !== undefined) { + let data8 = data6.serviceId; + const _errs21 = errors; + if (typeof data8 !== 'string') { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema195.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema195.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data8, + }, + ]; + return false; + } + var valid7 = _errs21 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data6.remoteServiceId !== + undefined + ) { + let data9 = data6.remoteServiceId; + const _errs23 = errors; + if (typeof data9 !== 'string') { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema195.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema195.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data9, + }, + ]; + return false; + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema195.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema195.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } + } + var valid6 = _errs16 === errors; + if (!valid6) { + break; + } + } + } else { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema195.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema195.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate210.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema195.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema195.allOf[1].properties.devices.items + .properties.config, + data: data4, + }, + ]; + return false; + } + } + var valid4 = _errs12 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate210.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema195.allOf[1].properties.devices.items.type, + parentSchema: schema195.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate210.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema195.allOf[1].properties.devices.type, + parentSchema: schema195.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate210.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema195.allOf[1].type, + parentSchema: schema195.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate210.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse202Response = validate211; +const schema196 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse202Response', + 'x-location': + '#/paths//peerconnections/post/responses/202/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate211( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate211.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema196.allOf[0].required, + parentSchema: schema196.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate211.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema196.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate211.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema196.allOf[0].properties.url.type, + parentSchema: schema196.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate211.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema196.allOf[0].properties.type.type, + parentSchema: schema196.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate211.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema196.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema196.allOf[0].properties.type.enum, + parentSchema: schema196.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate211.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema196.allOf[0].properties.status.type, + parentSchema: schema196.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate211.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema196.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema196.allOf[0].properties.status.enum, + parentSchema: schema196.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate211.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema196.allOf[0].type, + parentSchema: schema196.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate211.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema196.allOf[1].required, + parentSchema: schema196.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate211.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema196.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate211.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema196.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate211.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema196.allOf[1].properties.devices.items.required, + parentSchema: schema196.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate211.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema196.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate211.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema196.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema196.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema196.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema196.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema196.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema196.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema196.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema196.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema196.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema196.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema196.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema196.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema196.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema196.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema196.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate211.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema196.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema196.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate211.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema196.allOf[1].properties.devices.items.type, + parentSchema: schema196.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate211.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema196.allOf[1].properties.devices.type, + parentSchema: schema196.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate211.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema196.allOf[1].type, + parentSchema: schema196.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate211.errors = vErrors; + return errors === 0; +} +exports.validateGetPeerconnectionResponse200Request = validate212; +const schema197 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getPeerconnectionResponse200Request', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate212( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate212.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema197.allOf[0].required, + parentSchema: schema197.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate212.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema197.allOf[0].properties.type.type, + parentSchema: schema197.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate212.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema197.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema197.allOf[0].properties.type.enum, + parentSchema: schema197.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate212.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema197.allOf[0].type, + parentSchema: schema197.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate212.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema197.allOf[1].required, + parentSchema: schema197.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate212.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema197.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate212.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema197.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate212.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema197.allOf[1].properties.devices.items.required, + parentSchema: schema197.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate212.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema197.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate212.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema197.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema197.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data2.config !== undefined) { + let data4 = data2.config; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data4 && + typeof data4 == 'object' && + !Array.isArray(data4) + ) { + if (data4.services !== undefined) { + let data5 = data4.services; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid6 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing3; + if ( + (data6.serviceType === undefined && + (missing3 = 'serviceType')) || + (data6.serviceId === undefined && + (missing3 = 'serviceId')) || + (data6.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema197.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema197.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.serviceType !== undefined) { + let data7 = data6.serviceType; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema197.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } else { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema197.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema197.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } + } + var valid7 = _errs19 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data6.serviceId !== undefined) { + let data8 = data6.serviceId; + const _errs21 = errors; + if (typeof data8 !== 'string') { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema197.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema197.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data8, + }, + ]; + return false; + } + var valid7 = _errs21 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data6.remoteServiceId !== + undefined + ) { + let data9 = data6.remoteServiceId; + const _errs23 = errors; + if (typeof data9 !== 'string') { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema197.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema197.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data9, + }, + ]; + return false; + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema197.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema197.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } + } + var valid6 = _errs16 === errors; + if (!valid6) { + break; + } + } + } else { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema197.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema197.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate212.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema197.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema197.allOf[1].properties.devices.items + .properties.config, + data: data4, + }, + ]; + return false; + } + } + var valid4 = _errs12 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate212.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema197.allOf[1].properties.devices.items.type, + parentSchema: schema197.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate212.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema197.allOf[1].properties.devices.type, + parentSchema: schema197.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate212.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema197.allOf[1].type, + parentSchema: schema197.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate212.errors = vErrors; + return errors === 0; +} +exports.validateGetPeerconnectionResponse200Response = validate213; +const schema198 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getPeerconnectionResponse200Response', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate213( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate213.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema198.allOf[0].required, + parentSchema: schema198.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate213.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema198.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate213.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema198.allOf[0].properties.url.type, + parentSchema: schema198.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate213.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema198.allOf[0].properties.type.type, + parentSchema: schema198.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate213.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema198.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema198.allOf[0].properties.type.enum, + parentSchema: schema198.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate213.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema198.allOf[0].properties.status.type, + parentSchema: schema198.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate213.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema198.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema198.allOf[0].properties.status.enum, + parentSchema: schema198.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate213.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema198.allOf[0].type, + parentSchema: schema198.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate213.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema198.allOf[1].required, + parentSchema: schema198.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate213.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema198.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate213.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema198.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate213.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema198.allOf[1].properties.devices.items.required, + parentSchema: schema198.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate213.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema198.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate213.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema198.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema198.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema198.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema198.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema198.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema198.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema198.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema198.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema198.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema198.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema198.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema198.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema198.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema198.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema198.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate213.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema198.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema198.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate213.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema198.allOf[1].properties.devices.items.type, + parentSchema: schema198.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate213.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema198.allOf[1].properties.devices.type, + parentSchema: schema198.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate213.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema198.allOf[1].type, + parentSchema: schema198.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate213.errors = vErrors; + return errors === 0; +} +exports.validatePatchPeerconnectionDeviceStatusBodyRequest = validate214; +const schema199 = { + type: 'object', + properties: { + status: { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['status'], + 'x-standalone': false, + 'x-name': 'patchPeerconnectionDeviceStatusBodyRequest', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate214( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.status === undefined && (missing0 = 'status')) { + validate214.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema199.required, + parentSchema: schema199, + data, + }, + ]; + return false; + } else { + if (data.status !== undefined) { + let data0 = data.status; + if (typeof data0 !== 'string') { + validate214.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema199.properties.status.type, + parentSchema: schema199.properties.status, + data: data0, + }, + ]; + return false; + } + if ( + !( + data0 === 'new' || + data0 === 'connecting' || + data0 === 'connected' || + data0 === 'disconnected' || + data0 === 'failed' || + data0 === 'closed' + ) + ) { + validate214.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema199.properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema199.properties.status.enum, + parentSchema: schema199.properties.status, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate214.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema199.type, + parentSchema: schema199, + data, + }, + ]; + return false; + } + } + validate214.errors = vErrors; + return errors === 0; +} +exports.validatePatchPeerconnectionDeviceStatusBodyResponse = validate215; +const schema200 = { + type: 'object', + properties: { + status: { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['status'], + 'x-standalone': false, + 'x-name': 'patchPeerconnectionDeviceStatusBodyResponse', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate215( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.status === undefined && (missing0 = 'status')) { + validate215.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema200.required, + parentSchema: schema200, + data, + }, + ]; + return false; + } else { + if (data.status !== undefined) { + let data0 = data.status; + if (typeof data0 !== 'string') { + validate215.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema200.properties.status.type, + parentSchema: schema200.properties.status, + data: data0, + }, + ]; + return false; + } + if ( + !( + data0 === 'new' || + data0 === 'connecting' || + data0 === 'connected' || + data0 === 'disconnected' || + data0 === 'failed' || + data0 === 'closed' + ) + ) { + validate215.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema200.properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema200.properties.status.enum, + parentSchema: schema200.properties.status, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate215.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema200.type, + parentSchema: schema200, + data, + }, + ]; + return false; + } + } + validate215.errors = vErrors; + return errors === 0; +} diff --git a/services/booking/src/common/src/clients/device/basicValidation.d.cts b/services/booking/src/common/src/clients/device/basicValidation.d.cts new file mode 100644 index 00000000..ffc3951d --- /dev/null +++ b/services/booking/src/common/src/clients/device/basicValidation.d.cts @@ -0,0 +1,779 @@ +export declare function validateAuthenticationMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): AuthenticationMessage; + +export declare function validateConnectionStateChangedMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStateChangedMessage; + +export declare function validateUserReference( + object: unknown, +): UserReference; + +export declare function validateDeviceOverview( + object: unknown, +): DeviceOverview; + +export declare function validateServiceDescription< + T extends 'request' | 'response' | 'all', +>(object: unknown): ServiceDescription; + +export declare function validateInstantiableCloudDevice< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDevice; + +export declare function validateTimeSlot( + object: unknown, +): TimeSlot; + +export declare function validateAvailability( + object: unknown, +): Availability; + +export declare function validateConcreteDevice( + object: unknown, +): ConcreteDevice; + +export declare function validateInstantiableBrowserDevice< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDevice; + +export declare function validateDeviceReference( + object: unknown, +): DeviceReference; + +export declare function validateDeviceGroup( + object: unknown, +): DeviceGroup; + +export declare function validateDevice( + object: unknown, +): Device; + +export declare function validateCallback( + object: unknown, +): Callback; + +export declare function validateEventCallback( + object: unknown, +): EventCallback; + +export declare function validateDeviceChangedEventCallback< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceChangedEventCallback; + +export declare function validateDeviceOverviewUpdate< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceOverviewUpdate; + +export declare function validateInstantiableCloudDeviceUpdate< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDeviceUpdate; + +export declare function validateConcreteDeviceUpdate< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConcreteDeviceUpdate; + +export declare function validateInstantiableBrowserDeviceUpdate< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDeviceUpdate; + +export declare function validateDeviceGroupUpdate< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceGroupUpdate; + +export declare function validateDeviceUpdate( + object: unknown, +): DeviceUpdate; + +export declare function validateAvailabilityRule< + T extends 'request' | 'response' | 'all', +>(object: unknown): AvailabilityRule; + +export declare function validateMessage( + object: unknown, +): Message; + +export declare function validateCommandMessage( + object: unknown, +): CommandMessage; + +export declare function validateServiceConfig( + object: unknown, +): ServiceConfig; + +export declare function validateCreatePeerconnectionMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): CreatePeerconnectionMessage; + +export declare function validateClosePeerconnectionMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): ClosePeerconnectionMessage; + +export declare function validateSignalingMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): SignalingMessage; + +export declare function validateConfigurationMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfigurationMessage; + +export declare function validateExperimentStatusChangedMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentStatusChangedMessage; + +export declare function validateConnectionStatus< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStatus; + +export declare function validatePeerconnectionCommon< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionCommon; + +export declare function validatePeerconnectionOverview< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionOverview; + +export declare function validateConfiguredDeviceReference< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfiguredDeviceReference; + +export declare function validatePeerconnection( + object: unknown, +): Peerconnection; + +export declare function validatePeerconnectionClosedEventCallback< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionClosedEventCallback; + +export declare function validatePeerconnectionStatusChangedEventCallback< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionStatusChangedEventCallback; + +export declare function validateChangedUrl( + object: unknown, +): ChangedUrl; + +export declare function validateDeviceId( + object: unknown, +): DeviceId; + +export declare function validateFlatGroup( + object: unknown, +): FlatGroup; + +export declare function validateStartTime( + object: unknown, +): StartTime; + +export declare function validateEndTime( + object: unknown, +): EndTime; + +export declare function validateClosedUrl( + object: unknown, +): ClosedUrl; + +export declare function validateStatusChangedUrl< + T extends 'request' | 'response' | 'all', +>(object: unknown): StatusChangedUrl; + +export declare function validatePeerconnectionId< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionId; + +export declare function validateDeviceUrl( + object: unknown, +): DeviceUrl; + +export declare function validateListDevicesResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): listDevicesResponse200; + +export declare function validateCreateDeviceBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceBody; + +export declare function validateCreateDeviceResponse201< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceResponse201; + +export declare function validateGetDeviceResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceResponse200; + +export declare function validateUpdateDeviceBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceBody; + +export declare function validateUpdateDeviceResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceResponse200; + +export declare function validateInstantiateDeviceResponse201< + T extends 'request' | 'response' | 'all', +>(object: unknown): instantiateDeviceResponse201; + +export declare function validateGetDeviceAvailabilityResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceAvailabilityResponse200; + +export declare function validateAddDeviceAvailabilityRulesBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesBody; + +export declare function validateAddDeviceAvailabilityRulesResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesResponse200; + +export declare function validateCreateWebsocketTokenResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): createWebsocketTokenResponse200; + +export declare function validateSendSignalingMessageBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): sendSignalingMessageBody; + +export declare function validateListPeerconnectionsResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): listPeerconnectionsResponse200; + +export declare function validateCreatePeerconnectionBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionBody; + +export declare function validateCreatePeerconnectionResponse201< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse201; + +export declare function validateCreatePeerconnectionResponse202< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse202; + +export declare function validateGetPeerconnectionResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): getPeerconnectionResponse200; + +export declare function validatePatchPeerconnectionDeviceStatusBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): patchPeerconnectionDeviceStatusBody; + +export declare function validateAuthenticationMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): AuthenticationMessageRequest; + +export declare function validateAuthenticationMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): AuthenticationMessageResponse; + +export declare function validateConnectionStateChangedMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStateChangedMessageRequest; + +export declare function validateConnectionStateChangedMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStateChangedMessageResponse; + +export declare function validateUserReferenceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): UserReferenceRequest; + +export declare function validateUserReferenceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): UserReferenceResponse; + +export declare function validateDeviceOverviewRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceOverviewRequest; + +export declare function validateDeviceOverviewResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceOverviewResponse; + +export declare function validateServiceDescriptionRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ServiceDescriptionRequest; + +export declare function validateServiceDescriptionResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ServiceDescriptionResponse; + +export declare function validateInstantiableCloudDeviceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDeviceRequest; + +export declare function validateInstantiableCloudDeviceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDeviceResponse; + +export declare function validateTimeSlotRequest( + object: unknown, +): TimeSlotRequest; + +export declare function validateTimeSlotResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): TimeSlotResponse; + +export declare function validateAvailabilityRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): AvailabilityRequest; + +export declare function validateAvailabilityResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): AvailabilityResponse; + +export declare function validateConcreteDeviceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConcreteDeviceRequest; + +export declare function validateConcreteDeviceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConcreteDeviceResponse; + +export declare function validateInstantiableBrowserDeviceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDeviceRequest; + +export declare function validateInstantiableBrowserDeviceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDeviceResponse; + +export declare function validateDeviceReferenceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceReferenceRequest; + +export declare function validateDeviceReferenceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceReferenceResponse; + +export declare function validateDeviceGroupRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceGroupRequest; + +export declare function validateDeviceGroupResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceGroupResponse; + +export declare function validateDeviceRequest( + object: unknown, +): DeviceRequest; + +export declare function validateDeviceResponse( + object: unknown, +): DeviceResponse; + +export declare function validateCallbackRequest( + object: unknown, +): CallbackRequest; + +export declare function validateCallbackResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): CallbackResponse; + +export declare function validateEventCallbackRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): EventCallbackRequest; + +export declare function validateEventCallbackResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): EventCallbackResponse; + +export declare function validateDeviceChangedEventCallbackRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceChangedEventCallbackRequest; + +export declare function validateDeviceChangedEventCallbackResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceChangedEventCallbackResponse; + +export declare function validateDeviceOverviewUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceOverviewUpdateRequest; + +export declare function validateDeviceOverviewUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceOverviewUpdateResponse; + +export declare function validateInstantiableCloudDeviceUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDeviceUpdateRequest; + +export declare function validateInstantiableCloudDeviceUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDeviceUpdateResponse; + +export declare function validateConcreteDeviceUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConcreteDeviceUpdateRequest; + +export declare function validateConcreteDeviceUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConcreteDeviceUpdateResponse; + +export declare function validateInstantiableBrowserDeviceUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDeviceUpdateRequest; + +export declare function validateInstantiableBrowserDeviceUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDeviceUpdateResponse; + +export declare function validateDeviceGroupUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceGroupUpdateRequest; + +export declare function validateDeviceGroupUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceGroupUpdateResponse; + +export declare function validateDeviceUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceUpdateRequest; + +export declare function validateDeviceUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceUpdateResponse; + +export declare function validateAvailabilityRuleRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): AvailabilityRuleRequest; + +export declare function validateAvailabilityRuleResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): AvailabilityRuleResponse; + +export declare function validateMessageRequest( + object: unknown, +): MessageRequest; + +export declare function validateMessageResponse( + object: unknown, +): MessageResponse; + +export declare function validateCommandMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): CommandMessageRequest; + +export declare function validateCommandMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): CommandMessageResponse; + +export declare function validateServiceConfigRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ServiceConfigRequest; + +export declare function validateServiceConfigResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ServiceConfigResponse; + +export declare function validateCreatePeerconnectionMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): CreatePeerconnectionMessageRequest; + +export declare function validateCreatePeerconnectionMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): CreatePeerconnectionMessageResponse; + +export declare function validateClosePeerconnectionMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ClosePeerconnectionMessageRequest; + +export declare function validateClosePeerconnectionMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ClosePeerconnectionMessageResponse; + +export declare function validateSignalingMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): SignalingMessageRequest; + +export declare function validateSignalingMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): SignalingMessageResponse; + +export declare function validateConfigurationMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfigurationMessageRequest; + +export declare function validateConfigurationMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfigurationMessageResponse; + +export declare function validateExperimentStatusChangedMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentStatusChangedMessageRequest; + +export declare function validateExperimentStatusChangedMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentStatusChangedMessageResponse; + +export declare function validateConnectionStatusRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStatusRequest; + +export declare function validateConnectionStatusResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStatusResponse; + +export declare function validatePeerconnectionCommonRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionCommonRequest; + +export declare function validatePeerconnectionCommonResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionCommonResponse; + +export declare function validatePeerconnectionOverviewRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionOverviewRequest; + +export declare function validatePeerconnectionOverviewResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionOverviewResponse; + +export declare function validateConfiguredDeviceReferenceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfiguredDeviceReferenceRequest; + +export declare function validateConfiguredDeviceReferenceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfiguredDeviceReferenceResponse; + +export declare function validatePeerconnectionRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionRequest; + +export declare function validatePeerconnectionResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionResponse; + +export declare function validatePeerconnectionClosedEventCallbackRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionClosedEventCallbackRequest; + +export declare function validatePeerconnectionClosedEventCallbackResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionClosedEventCallbackResponse; + +export declare function validatePeerconnectionStatusChangedEventCallbackRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionStatusChangedEventCallbackRequest; + +export declare function validatePeerconnectionStatusChangedEventCallbackResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionStatusChangedEventCallbackResponse; + +export declare function validateChangedUrlRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ChangedUrlRequest; + +export declare function validateChangedUrlResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ChangedUrlResponse; + +export declare function validateDeviceIdRequest( + object: unknown, +): DeviceIdRequest; + +export declare function validateDeviceIdResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceIdResponse; + +export declare function validateFlatGroupRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): FlatGroupRequest; + +export declare function validateFlatGroupResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): FlatGroupResponse; + +export declare function validateStartTimeRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): StartTimeRequest; + +export declare function validateStartTimeResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): StartTimeResponse; + +export declare function validateEndTimeRequest( + object: unknown, +): EndTimeRequest; + +export declare function validateEndTimeResponse( + object: unknown, +): EndTimeResponse; + +export declare function validateClosedUrlRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ClosedUrlRequest; + +export declare function validateClosedUrlResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ClosedUrlResponse; + +export declare function validateStatusChangedUrlRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): StatusChangedUrlRequest; + +export declare function validateStatusChangedUrlResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): StatusChangedUrlResponse; + +export declare function validatePeerconnectionIdRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionIdRequest; + +export declare function validatePeerconnectionIdResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionIdResponse; + +export declare function validateDeviceUrlRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceUrlRequest; + +export declare function validateDeviceUrlResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceUrlResponse; + +export declare function validateListDevicesResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): listDevicesResponse200Request; + +export declare function validateListDevicesResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): listDevicesResponse200Response; + +export declare function validateCreateDeviceBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceBodyRequest; + +export declare function validateCreateDeviceBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceBodyResponse; + +export declare function validateCreateDeviceResponse201Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceResponse201Request; + +export declare function validateCreateDeviceResponse201Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceResponse201Response; + +export declare function validateGetDeviceResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceResponse200Request; + +export declare function validateGetDeviceResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceResponse200Response; + +export declare function validateUpdateDeviceBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceBodyRequest; + +export declare function validateUpdateDeviceBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceBodyResponse; + +export declare function validateUpdateDeviceResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceResponse200Request; + +export declare function validateUpdateDeviceResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceResponse200Response; + +export declare function validateInstantiateDeviceResponse201Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): instantiateDeviceResponse201Request; + +export declare function validateInstantiateDeviceResponse201Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): instantiateDeviceResponse201Response; + +export declare function validateGetDeviceAvailabilityResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceAvailabilityResponse200Request; + +export declare function validateGetDeviceAvailabilityResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceAvailabilityResponse200Response; + +export declare function validateAddDeviceAvailabilityRulesBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesBodyRequest; + +export declare function validateAddDeviceAvailabilityRulesBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesBodyResponse; + +export declare function validateAddDeviceAvailabilityRulesResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesResponse200Request; + +export declare function validateAddDeviceAvailabilityRulesResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesResponse200Response; + +export declare function validateCreateWebsocketTokenResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): createWebsocketTokenResponse200Request; + +export declare function validateCreateWebsocketTokenResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): createWebsocketTokenResponse200Response; + +export declare function validateSendSignalingMessageBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): sendSignalingMessageBodyRequest; + +export declare function validateSendSignalingMessageBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): sendSignalingMessageBodyResponse; + +export declare function validateListPeerconnectionsResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): listPeerconnectionsResponse200Request; + +export declare function validateListPeerconnectionsResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): listPeerconnectionsResponse200Response; + +export declare function validateCreatePeerconnectionBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionBodyRequest; + +export declare function validateCreatePeerconnectionBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionBodyResponse; + +export declare function validateCreatePeerconnectionResponse201Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse201Request; + +export declare function validateCreatePeerconnectionResponse201Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse201Response; + +export declare function validateCreatePeerconnectionResponse202Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse202Request; + +export declare function validateCreatePeerconnectionResponse202Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse202Response; + +export declare function validateGetPeerconnectionResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): getPeerconnectionResponse200Request; + +export declare function validateGetPeerconnectionResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): getPeerconnectionResponse200Response; + +export declare function validatePatchPeerconnectionDeviceStatusBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): patchPeerconnectionDeviceStatusBodyRequest; + +export declare function validatePatchPeerconnectionDeviceStatusBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): patchPeerconnectionDeviceStatusBodyResponse; diff --git a/services/booking/src/common/src/clients/device/client.ts b/services/booking/src/common/src/clients/device/client.ts new file mode 100644 index 00000000..fd7e35f4 --- /dev/null +++ b/services/booking/src/common/src/clients/device/client.ts @@ -0,0 +1,1444 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; + +import * as RequestValidation from './requestValidation.js'; +import * as Signatures from './signatures.js'; +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * This error class should be used if an error occurs during validation of a request/response. + * @category Errors + */ +export class ValidationError extends Error { + public errors: unknown; + + constructor(message: string, errors: unknown) { + super(message); + this.name = 'ValidationError'; + this.errors = errors; + } +} + +/** + * This error class should be used if an error occurs while fetching a request. + * @category Errors + */ +export class FetchError extends Error { + constructor(message: string) { + super(message); + this.name = 'FetchError'; + } +} + +/** + * This error class should be used if the response of the server has a status + * greater than or equal to 400. This error should contain the validated response. + * @category Errors + */ +export class UnsuccessfulRequestError extends Error { + public response: Types.ResponseData; + + constructor(message: string, response: Types.ResponseData) { + super(message); + this.response = response; + this.name = 'UnsuccessfulRequestError'; + } +} + +/** + * This error class should be used if the validation of an url fails. + * @category Errors + */ +export class InvalidUrlError extends Error { + constructor(message: string) { + super(message); + this.name = 'InvalidUrlError'; + } +} + +/** + * This function attempts to parse a Response as ResponseData. + */ +async function parseResponse(response: Response): Promise { + let text = null; + try { + text = await response.text(); + const json = JSON.parse(text); + return { status: response.status, body: json }; + } catch { + return { status: response.status, body: text }; + } +} + +/** + * This function checks if a string is a valid http url. + * @param string The string to be checked. + * @returns True if the string is a valid http url. + */ +function isValidHttpUrl(string: string) { + let url; + + try { + url = new URL(string); + } catch (_) { + return false; + } + + return url.protocol === 'http:' || url.protocol === 'https:'; +} + +/** + * This function takes an url and a pattern for the requested endpoint and parses the contained path parameters. + * @param url The url to be parsed. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the provided url does not end with the provided endpoint. + * @returns An array containing all parsed path parameters in order of appearance. + * @example + * // returns ["username", "role_name"] + * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function parsePathParameters(url: string, endpoint: string): string[] { + const parameterRegex = '([a-zA-Z0-9-:]+)'; + const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); + const matches = url.match(regex); + + if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint'); + + return matches.slice(1); +} + +/** + * This function validates a given http url and parses its path parameters. + * @param url The url to be validated. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the validation of the provided url fails. + * @returns An array containing all parsed path parameters in order of appearance (see {@link parsePathParameters}). + * @example + * // returns ["username", "role_name"] + * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { + if (!isValidHttpUrl(url)) + throw new InvalidUrlError('Provided url is not a valid http url'); + if (!url.startsWith(baseUrl)) + throw new InvalidUrlError('Provided url does not start with the provided base url'); + const pathParameters = parsePathParameters(url, endpoint); + + let extendedBaseUrl = baseUrl + endpoint; + + pathParameters.forEach(pathParameter => { + extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); + }); + + if (url !== extendedBaseUrl) + throw new InvalidUrlError('Provided url does not match extended base url'); + + return pathParameters; +} + +/** + * This function appends a given endpoint to an url. + * @param url The url to append the endpoint to. + * @param endpoint The endpoint to be appended. + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id", "/token") + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id/", "/token") + * @returns The url with the appended endpoint. + */ +function appendToUrl(url: string, endpoint: string) { + return url.endsWith('/') ? `${url.slice(0, -1)}${endpoint}` : `${url}${endpoint}`; +} + +/** + * Client for the use of the Crosslab API + * @category Client + */ +export class Client { + public readonly baseUrl: string; + public readonly serviceUrl: string; + public accessToken: string; + private fixedHeaders: [string, string][]; + private fetch = async (url: RequestInfo | URL, init: RequestInit) => { + let raw_response; + try { + if ( + url.toString().startsWith(this.baseUrl) || + url.toString().startsWith(this.serviceUrl) + ) { + raw_response = await fetch(url, init); + } else { + raw_response = await fetch( + appendToUrl( + this.baseUrl, + '/proxy?' + new URLSearchParams([['URL', url.toString()]]).toString(), + ), + init, + ); + } + } catch (error) { + if (error instanceof Error) { + throw new FetchError(error.message); + } else if (typeof error === 'string') { + throw new FetchError(error); + } else { + throw new FetchError('Something went wrong while trying to fetch the request'); + } + } + return await parseResponse(raw_response); + }; + + /** + * @category Constructors + */ + constructor( + baseUrl: string, + options: { + serviceUrl?: string; + accessToken?: string; + fixedHeaders?: [string, string][]; + }, + ) { + this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; + this.serviceUrl = options.serviceUrl + ? options.serviceUrl.endsWith('/') + ? options.serviceUrl.slice(0, -1) + : options.serviceUrl + : this.baseUrl; + this.accessToken = options.accessToken ?? ''; + this.fixedHeaders = options.fixedHeaders ?? []; + } + + /** + * List devices + * + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The list of all devices. + */ + public async listDevices(options?: { + headers?: [string, string][]; + url?: string; + }): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); + + if (!RequestValidation.validateListDevicesInput()) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateListDevicesInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateListDevicesOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateListDevicesOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Create a new device + * + * @param device + * The device to be created. + * @param options.changedUrl + * **An URL that will be called once the device changes.** + * + * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed + * as long as every callback resolves with a successful status code. + * + * If the callback fails the url MIGHT not be called in the future. + * + * There can be multiple callbacks registered with the same device. + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The device was created. A JSON representation of the new device is returned. + */ + public async createDevice( + device: Types.Device<'request'>, + options?: { + headers?: [string, string][]; + changedUrl?: string; + url?: string; + }, + ): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); + + const body = device; + + const parameters = { + changedUrl: options?.changedUrl, + }; + + const query: [string, string][] = []; + + if (parameters['changedUrl']) + query.push(['changedUrl', parameters['changedUrl'].toString()]); + + if (!RequestValidation.validateCreateDeviceInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateCreateDeviceInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch( + url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); + + if (!RequestValidation.validateCreateDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateCreateDeviceOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * View a registered device + * + * @param url + * Url of the resource to be accessed. + * @param options.flat_group + * If true the returned device group will only contain concrete devices. I.e. any subgroups will be flattend. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the device. + */ + public async getDevice( + url: string, + options?: { + headers?: [string, string][]; + flat_group?: boolean; + }, + ): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + + const parameters = { + device_id: device_id, + flat_group: options?.flat_group, + }; + + const query: [string, string][] = []; + + if (parameters['flat_group']) + query.push(['flat_group', parameters['flat_group'].toString()]); + + if (!RequestValidation.validateGetDeviceInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateGetDeviceInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch( + url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateGetDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateGetDeviceOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Update an existing device + * + * @param url + * Url of the resource to be accessed. + * @param deviceUpdate + * Updated device. + * @param options.changedUrl + * **An URL that will be called once the device changes.** + * + * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed + * as long as every callback resolves with a successful status code. + * + * If the callback fails the url MIGHT not be called in the future. + * + * There can be multiple callbacks registered with the same device. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the changed device. + */ + public async updateDevice( + url: string, + deviceUpdate: Types.DeviceUpdate<'request'> | undefined, + options?: { + headers?: [string, string][]; + changedUrl?: string; + }, + ): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + + const body = deviceUpdate; + + const parameters = { + device_id: device_id, + changedUrl: options?.changedUrl, + }; + + const query: [string, string][] = []; + + if (parameters['changedUrl']) + query.push(['changedUrl', parameters['changedUrl'].toString()]); + + if (!RequestValidation.validateUpdateDeviceInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateUpdateDeviceInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch( + url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + { + method: 'PATCH', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); + + if (!RequestValidation.validateUpdateDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateUpdateDeviceOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Delete a registered device + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The device was deleted. + */ + public async deleteDevice( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + + const parameters = { + device_id: device_id, + }; + + if (!RequestValidation.validateDeleteDeviceInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateDeleteDeviceInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateDeleteDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateDeleteDeviceOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Instantiate a cloud instantiable device + * + * @param url + * Url of the resource to be accessed. + * @param options.changedUrl + * **An URL that will be called once the device changes.** + * + * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed + * as long as every callback resolves with a successful status code. + * + * If the callback fails the url MIGHT not be called in the future. + * + * There can be multiple callbacks registered with the same device. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the created instance. + */ + public async instantiateDevice( + url: string, + options?: { + headers?: [string, string][]; + changedUrl?: string; + }, + ): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + + const parameters = { + device_id: device_id, + changedUrl: options?.changedUrl, + }; + + const query: [string, string][] = []; + + if (parameters['changedUrl']) + query.push(['changedUrl', parameters['changedUrl'].toString()]); + + if (!RequestValidation.validateInstantiateDeviceInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateInstantiateDeviceInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch( + url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateInstantiateDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateInstantiateDeviceOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Get the availability of a device + * + * @param url + * Url of the resource to be accessed. + * @param options.startTime + * Start time of the requested availability + * @param options.endTime + * End time of the requested availability + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the availability of the device. + */ + public async getDeviceAvailability( + url: string, + options?: { + headers?: [string, string][]; + startTime?: string; + endTime?: string; + }, + ): Promise { + const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + + const parameters = { + device_id: device_id, + startTime: options?.startTime, + endTime: options?.endTime, + }; + + const query: [string, string][] = []; + + if (parameters['startTime']) + query.push(['startTime', parameters['startTime'].toString()]); + + if (parameters['endTime']) query.push(['endTime', parameters['endTime'].toString()]); + + if (!RequestValidation.validateGetDeviceAvailabilityInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateGetDeviceAvailabilityInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch( + url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateGetDeviceAvailabilityOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateGetDeviceAvailabilityOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Delete the availability rules of a device + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The availability rules of the device were deleted successfully. + */ + public async deleteDeviceAvailabilityRules( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + + const parameters = { + device_id: device_id, + }; + + if (!RequestValidation.validateDeleteDeviceAvailabilityRulesInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateDeleteDeviceAvailabilityRulesInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateDeleteDeviceAvailabilityRulesOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateDeleteDeviceAvailabilityRulesOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Add availability rules for a device + * + * @param url + * Url of the resource to be accessed. + * @param availabilityRules + * The availability rules to be applied. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the changed availability. + */ + public async addDeviceAvailabilityRules( + url: string, + availabilityRules: Types.AvailabilityRule<'request'>[] | undefined, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + + const body = availabilityRules; + + const parameters = { + device_id: device_id, + }; + + if (!RequestValidation.validateAddDeviceAvailabilityRulesInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateAddDeviceAvailabilityRulesInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }); + + if (!RequestValidation.validateAddDeviceAvailabilityRulesOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateAddDeviceAvailabilityRulesOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Create new websocket token for device + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The newly generated websocket token for the device. + */ + public async createWebsocketToken( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/devices/{}/websocket'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/websocket'); + + const parameters = { + device_id: device_id, + }; + + if (!RequestValidation.validateCreateWebsocketTokenInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateCreateWebsocketTokenInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateCreateWebsocketTokenOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateCreateWebsocketTokenOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Send signaling message to device + * + * @param url + * Url of the resource to be accessed. + * @param sigMessage + * The signaling message to be sent. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The signaling message was delivered successfully. + */ + public async sendSignalingMessage( + url: string, + sigMessage: + | Types.CreatePeerconnectionMessage<'request'> + | Types.ClosePeerconnectionMessage<'request'> + | Types.SignalingMessage<'request'> + | Types.ConfigurationMessage<'request'> + | Types.ExperimentStatusChangedMessage<'request'>, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/devices/{}/signaling'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/signaling'); + + const body = sigMessage; + + const parameters = { + device_id: device_id, + }; + + if (!RequestValidation.validateSendSignalingMessageInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateSendSignalingMessageInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }); + + if (!RequestValidation.validateSendSignalingMessageOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateSendSignalingMessageOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * List Peer Connection + * + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The list of all peerconnections. + */ + public async listPeerconnections(options?: { + headers?: [string, string][]; + url?: string; + }): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); + + if (!RequestValidation.validateListPeerconnectionsInput()) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateListPeerconnectionsInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateListPeerconnectionsOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateListPeerconnectionsOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Create a new Peer Connection + * + * @param peerconnection + * The peerconnection to be created. + * @param options.closedUrl + * An URL that will be called once the peer connection is closed. + * @param options.statusChangedUrl + * An URL that will be called if the status of the peerconnection changes. + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * 201: The peerconnection was created. A JSON representation of the new peer connection is returned. + * 202: The device service will attempt to create the peerconnection as soon as possible. + */ + public async createPeerconnection( + peerconnection: Types.Peerconnection<'request'>, + options?: { + headers?: [string, string][]; + closedUrl?: string; + statusChangedUrl?: string; + url?: string; + }, + ): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); + + const body = peerconnection; + + const parameters = { + closedUrl: options?.closedUrl, + statusChangedUrl: options?.statusChangedUrl, + }; + + const query: [string, string][] = []; + + if (parameters['closedUrl']) + query.push(['closedUrl', parameters['closedUrl'].toString()]); + + if (parameters['statusChangedUrl']) + query.push(['statusChangedUrl', parameters['statusChangedUrl'].toString()]); + + if (!RequestValidation.validateCreatePeerconnectionInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateCreatePeerconnectionInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch( + url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); + + if (!RequestValidation.validateCreatePeerconnectionOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateCreatePeerconnectionOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * View a peer connection + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the device peer connection. + */ + public async getPeerconnection( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [peerconnection_id] = validateUrl(url, this.baseUrl, '/peerconnections/{}'); + + const parameters = { + peerconnection_id: peerconnection_id, + }; + + if (!RequestValidation.validateGetPeerconnectionInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateGetPeerconnectionInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateGetPeerconnectionOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateGetPeerconnectionOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Delete a peer connection + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * 202: The peerconnection will be deleted as soon as it's closed. + * 204: The peerconnection was deleted successfully. + */ + public async deletePeerconnection( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [peerconnection_id] = validateUrl(url, this.baseUrl, '/peerconnections/{}'); + + const parameters = { + peerconnection_id: peerconnection_id, + }; + + if (!RequestValidation.validateDeletePeerconnectionInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateDeletePeerconnectionInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateDeletePeerconnectionOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateDeletePeerconnectionOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Sets the peerconnection status of a single device. + * + * @param url + * Url of the resource to be accessed. + * @param body + * The JSON Representation of the device peer connection. + * @param device_url + * URL of the device + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * OK. + */ + public async patchPeerconnectionDeviceStatus( + url: string, + body: { + /** + * The status of the peerconnection. + */ + status: Types.ConnectionStatus<'request'>; + [k: string]: unknown; + }, + device_url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/peerconnections/{}/device_status'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [peerconnection_id] = validateUrl( + url, + this.baseUrl, + '/peerconnections/{}/device_status', + ); + + const parameters = { + peerconnection_id: peerconnection_id, + device_url: device_url, + }; + + const query: [string, string][] = []; + + if (parameters['device_url']) + query.push(['device_url', parameters['device_url'].toString()]); + + if (!RequestValidation.validatePatchPeerconnectionDeviceStatusInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validatePatchPeerconnectionDeviceStatusInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch( + url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + { + method: 'PATCH', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); + + if (!RequestValidation.validatePatchPeerconnectionDeviceStatusOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validatePatchPeerconnectionDeviceStatusOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } +} diff --git a/services/booking/src/common/src/clients/device/requestValidation.ts b/services/booking/src/common/src/clients/device/requestValidation.ts new file mode 100644 index 00000000..13992cce --- /dev/null +++ b/services/booking/src/common/src/clients/device/requestValidation.ts @@ -0,0 +1,1136 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as BasicValidation from './basicValidation.cjs'; +import * as Signatures from './signatures.js'; +import { FunctionWithErrors, ResponseData } from './types.js'; + +/** + * This function validates the inputs to listDevices() + */ +export function validateListDevicesInput() { + return true; +} + +/** + * This function validates the outputs of listDevices() + */ +export function validateListDevicesOutput( + response: ResponseData, +): response is Signatures.ListDevicesResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateListDevicesResponse200Response(response.body)) { + (validateListDevicesOutput as FunctionWithErrors).errors = ( + BasicValidation.validateListDevicesResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateListDevicesOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to createDevice() + */ +export function validateCreateDeviceInput( + parameters: Signatures.CreateDeviceParameters, + body: Signatures.CreateDeviceBody, +) { + if (parameters) { + if ( + !BasicValidation.validateChangedUrlRequest(parameters['changedUrl']) && + parameters['changedUrl'] !== undefined + ) { + (validateCreateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateChangedUrlRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + if (parameters !== undefined) { + return false; + } + } + + if (!BasicValidation.validateCreateDeviceBodyRequest(body)) { + (validateCreateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateCreateDeviceBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of createDevice() + */ +export function validateCreateDeviceOutput( + response: ResponseData, +): response is Signatures.CreateDeviceResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 201) { + if (!BasicValidation.validateCreateDeviceResponse201Response(response.body)) { + (validateCreateDeviceOutput as FunctionWithErrors).errors = ( + BasicValidation.validateCreateDeviceResponse201Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateCreateDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to getDevice() + */ +export function validateGetDeviceInput(parameters: Signatures.GetDeviceParameters) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateGetDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateFlatGroupRequest(parameters['flat_group']) && + parameters['flat_group'] !== undefined + ) { + (validateGetDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateFlatGroupRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of getDevice() + */ +export function validateGetDeviceOutput( + response: ResponseData, +): response is Signatures.GetDeviceResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateGetDeviceResponse200Response(response.body)) { + (validateGetDeviceOutput as FunctionWithErrors).errors = ( + BasicValidation.validateGetDeviceResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateGetDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to updateDevice() + */ +export function validateUpdateDeviceInput( + parameters: Signatures.UpdateDeviceParameters, + body: Signatures.UpdateDeviceBody, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateUpdateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateChangedUrlRequest(parameters['changedUrl']) && + parameters['changedUrl'] !== undefined + ) { + (validateUpdateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateChangedUrlRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + if (body === undefined) { + return true; + } + + if (!BasicValidation.validateUpdateDeviceBodyRequest(body)) { + (validateUpdateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateDeviceBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of updateDevice() + */ +export function validateUpdateDeviceOutput( + response: ResponseData, +): response is Signatures.UpdateDeviceResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateUpdateDeviceResponse200Response(response.body)) { + (validateUpdateDeviceOutput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateDeviceResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateUpdateDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to deleteDevice() + */ +export function validateDeleteDeviceInput(parameters: Signatures.DeleteDeviceParameters) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateDeleteDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of deleteDevice() + */ +export function validateDeleteDeviceOutput( + response: ResponseData, +): response is Signatures.DeleteDeviceResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 204) { + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateDeleteDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to instantiateDevice() + */ +export function validateInstantiateDeviceInput( + parameters: Signatures.InstantiateDeviceParameters, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateInstantiateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateChangedUrlRequest(parameters['changedUrl']) && + parameters['changedUrl'] !== undefined + ) { + (validateInstantiateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateChangedUrlRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of instantiateDevice() + */ +export function validateInstantiateDeviceOutput( + response: ResponseData, +): response is Signatures.InstantiateDeviceResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 201) { + if (!BasicValidation.validateInstantiateDeviceResponse201Response(response.body)) { + (validateInstantiateDeviceOutput as FunctionWithErrors).errors = ( + BasicValidation.validateInstantiateDeviceResponse201Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateInstantiateDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to getDeviceAvailability() + */ +export function validateGetDeviceAvailabilityInput( + parameters: Signatures.GetDeviceAvailabilityParameters, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateStartTimeRequest(parameters['startTime']) && + parameters['startTime'] !== undefined + ) { + (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = ( + BasicValidation.validateStartTimeRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateEndTimeRequest(parameters['endTime']) && + parameters['endTime'] !== undefined + ) { + (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = ( + BasicValidation.validateEndTimeRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of getDeviceAvailability() + */ +export function validateGetDeviceAvailabilityOutput( + response: ResponseData, +): response is Signatures.GetDeviceAvailabilityResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if ( + !BasicValidation.validateGetDeviceAvailabilityResponse200Response(response.body) + ) { + (validateGetDeviceAvailabilityOutput as FunctionWithErrors).errors = ( + BasicValidation.validateGetDeviceAvailabilityResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateGetDeviceAvailabilityOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to deleteDeviceAvailabilityRules() + */ +export function validateDeleteDeviceAvailabilityRulesInput( + parameters: Signatures.DeleteDeviceAvailabilityRulesParameters, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateDeleteDeviceAvailabilityRulesInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of deleteDeviceAvailabilityRules() + */ +export function validateDeleteDeviceAvailabilityRulesOutput( + response: ResponseData, +): response is Signatures.DeleteDeviceAvailabilityRulesResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 204) { + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateDeleteDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to addDeviceAvailabilityRules() + */ +export function validateAddDeviceAvailabilityRulesInput( + parameters: Signatures.AddDeviceAvailabilityRulesParameters, + body: Signatures.AddDeviceAvailabilityRulesBody, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateAddDeviceAvailabilityRulesInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + if (body === undefined) { + return true; + } + + if (!BasicValidation.validateAddDeviceAvailabilityRulesBodyRequest(body)) { + (validateAddDeviceAvailabilityRulesInput as FunctionWithErrors).errors = ( + BasicValidation.validateAddDeviceAvailabilityRulesBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of addDeviceAvailabilityRules() + */ +export function validateAddDeviceAvailabilityRulesOutput( + response: ResponseData, +): response is Signatures.AddDeviceAvailabilityRulesResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if ( + !BasicValidation.validateAddDeviceAvailabilityRulesResponse200Response( + response.body, + ) + ) { + (validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = ( + BasicValidation.validateAddDeviceAvailabilityRulesResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to createWebsocketToken() + */ +export function validateCreateWebsocketTokenInput( + parameters: Signatures.CreateWebsocketTokenParameters, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateCreateWebsocketTokenInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of createWebsocketToken() + */ +export function validateCreateWebsocketTokenOutput( + response: ResponseData, +): response is Signatures.CreateWebsocketTokenResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateCreateWebsocketTokenResponse200Response(response.body)) { + (validateCreateWebsocketTokenOutput as FunctionWithErrors).errors = ( + BasicValidation.validateCreateWebsocketTokenResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateCreateWebsocketTokenOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to sendSignalingMessage() + */ +export function validateSendSignalingMessageInput( + parameters: Signatures.SendSignalingMessageParameters, + body: Signatures.SendSignalingMessageBody, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateSendSignalingMessageInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + if (!BasicValidation.validateSendSignalingMessageBodyRequest(body)) { + (validateSendSignalingMessageInput as FunctionWithErrors).errors = ( + BasicValidation.validateSendSignalingMessageBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of sendSignalingMessage() + */ +export function validateSendSignalingMessageOutput( + response: ResponseData, +): response is Signatures.SendSignalingMessageResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateSendSignalingMessageOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to listPeerconnections() + */ +export function validateListPeerconnectionsInput() { + return true; +} + +/** + * This function validates the outputs of listPeerconnections() + */ +export function validateListPeerconnectionsOutput( + response: ResponseData, +): response is Signatures.ListPeerconnectionsResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateListPeerconnectionsResponse200Response(response.body)) { + (validateListPeerconnectionsOutput as FunctionWithErrors).errors = ( + BasicValidation.validateListPeerconnectionsResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateListPeerconnectionsOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to createPeerconnection() + */ +export function validateCreatePeerconnectionInput( + parameters: Signatures.CreatePeerconnectionParameters, + body: Signatures.CreatePeerconnectionBody, +) { + if (parameters) { + if ( + !BasicValidation.validateClosedUrlRequest(parameters['closedUrl']) && + parameters['closedUrl'] !== undefined + ) { + (validateCreatePeerconnectionInput as FunctionWithErrors).errors = ( + BasicValidation.validateClosedUrlRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateStatusChangedUrlRequest(parameters['statusChangedUrl']) && + parameters['statusChangedUrl'] !== undefined + ) { + (validateCreatePeerconnectionInput as FunctionWithErrors).errors = ( + BasicValidation.validateStatusChangedUrlRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + if (parameters !== undefined) { + return false; + } + } + + if (!BasicValidation.validateCreatePeerconnectionBodyRequest(body)) { + (validateCreatePeerconnectionInput as FunctionWithErrors).errors = ( + BasicValidation.validateCreatePeerconnectionBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of createPeerconnection() + */ +export function validateCreatePeerconnectionOutput( + response: ResponseData, +): response is Signatures.CreatePeerconnectionResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 201) { + if (!BasicValidation.validateCreatePeerconnectionResponse201Response(response.body)) { + (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = ( + BasicValidation.validateCreatePeerconnectionResponse201Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 202) { + if (!BasicValidation.validateCreatePeerconnectionResponse202Response(response.body)) { + (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = ( + BasicValidation.validateCreatePeerconnectionResponse202Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to getPeerconnection() + */ +export function validateGetPeerconnectionInput( + parameters: Signatures.GetPeerconnectionParameters, +) { + if (parameters) { + if ( + !BasicValidation.validatePeerconnectionIdRequest(parameters['peerconnection_id']) + ) { + (validateGetPeerconnectionInput as FunctionWithErrors).errors = ( + BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of getPeerconnection() + */ +export function validateGetPeerconnectionOutput( + response: ResponseData, +): response is Signatures.GetPeerconnectionResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateGetPeerconnectionResponse200Response(response.body)) { + (validateGetPeerconnectionOutput as FunctionWithErrors).errors = ( + BasicValidation.validateGetPeerconnectionResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateGetPeerconnectionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to deletePeerconnection() + */ +export function validateDeletePeerconnectionInput( + parameters: Signatures.DeletePeerconnectionParameters, +) { + if (parameters) { + if ( + !BasicValidation.validatePeerconnectionIdRequest(parameters['peerconnection_id']) + ) { + (validateDeletePeerconnectionInput as FunctionWithErrors).errors = ( + BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of deletePeerconnection() + */ +export function validateDeletePeerconnectionOutput( + response: ResponseData, +): response is Signatures.DeletePeerconnectionResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 202) { + return true; + } + + if (response.status === 204) { + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateDeletePeerconnectionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to patchPeerconnectionDeviceStatus() + */ +export function validatePatchPeerconnectionDeviceStatusInput( + parameters: Signatures.PatchPeerconnectionDeviceStatusParameters, + body: Signatures.PatchPeerconnectionDeviceStatusBody, +) { + if (parameters) { + if ( + !BasicValidation.validatePeerconnectionIdRequest(parameters['peerconnection_id']) + ) { + (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = ( + BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors + ).errors; + return false; + } + if (!BasicValidation.validateDeviceUrlRequest(parameters['device_url'])) { + (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceUrlRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + if (!BasicValidation.validatePatchPeerconnectionDeviceStatusBodyRequest(body)) { + (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = ( + BasicValidation.validatePatchPeerconnectionDeviceStatusBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of patchPeerconnectionDeviceStatus() + */ +export function validatePatchPeerconnectionDeviceStatusOutput( + response: ResponseData, +): response is Signatures.PatchPeerconnectionDeviceStatusResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 204) { + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validatePatchPeerconnectionDeviceStatusOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} diff --git a/services/booking/src/common/src/clients/device/signatures.ts b/services/booking/src/common/src/clients/device/signatures.ts new file mode 100644 index 00000000..259b337f --- /dev/null +++ b/services/booking/src/common/src/clients/device/signatures.ts @@ -0,0 +1,1764 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * Typing for all possible responses to the request made by listDevices() + * @category listDevices() + */ +export type ListDevicesResponse = ListDevicesSuccessResponse | ListDevicesErrorResponse; + +/** + * Typing for all successful responses to the request made by listDevices() + * @category listDevices() + */ +export type ListDevicesSuccessResponse = ListDevicesResponse200; + +/** + * Typing for all error responses to the request made by listDevices() + * @category listDevices() + */ +export type ListDevicesErrorResponse = + | ListDevicesResponse400 + | ListDevicesResponse401 + | ListDevicesResponse403 + | ListDevicesResponse404 + | ListDevicesResponse500; + +/** + * Typing for a response with status 200 to the request made by listDevices() + * @category listDevices() + */ +export interface ListDevicesResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.DeviceOverview<'response'>[]; +} + +/** + * Typing for a response with status 400 to the request made by listDevices() + * @category listDevices() + */ +export interface ListDevicesResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by listDevices() + * @category listDevices() + */ +export interface ListDevicesResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by listDevices() + * @category listDevices() + */ +export interface ListDevicesResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by listDevices() + * @category listDevices() + */ +export interface ListDevicesResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by listDevices() + * @category listDevices() + */ +export interface ListDevicesResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by createDevice() + * @category createDevice() + */ +export type CreateDeviceParameters = { + changedUrl?: string; +}; + +/** + * Typing for the body of the request made by createDevice() + * @category createDevice() + */ +export type CreateDeviceBody = Types.Device<'request'>; + +/** + * Typing for all possible responses to the request made by createDevice() + * @category createDevice() + */ +export type CreateDeviceResponse = + | CreateDeviceSuccessResponse + | CreateDeviceErrorResponse; + +/** + * Typing for all successful responses to the request made by createDevice() + * @category createDevice() + */ +export type CreateDeviceSuccessResponse = CreateDeviceResponse201; + +/** + * Typing for all error responses to the request made by createDevice() + * @category createDevice() + */ +export type CreateDeviceErrorResponse = + | CreateDeviceResponse400 + | CreateDeviceResponse401 + | CreateDeviceResponse403 + | CreateDeviceResponse404 + | CreateDeviceResponse500; + +/** + * Typing for a response with status 201 to the request made by createDevice() + * @category createDevice() + */ +export interface CreateDeviceResponse201 extends Types.SuccessResponse { + status: 201; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Device<'response'>; +} + +/** + * Typing for a response with status 400 to the request made by createDevice() + * @category createDevice() + */ +export interface CreateDeviceResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by createDevice() + * @category createDevice() + */ +export interface CreateDeviceResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by createDevice() + * @category createDevice() + */ +export interface CreateDeviceResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by createDevice() + * @category createDevice() + */ +export interface CreateDeviceResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by createDevice() + * @category createDevice() + */ +export interface CreateDeviceResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by getDevice() + * @category getDevice() + */ +export type GetDeviceParameters = { + device_id: string; + flat_group?: boolean; +}; + +/** + * Typing for all possible responses to the request made by getDevice() + * @category getDevice() + */ +export type GetDeviceResponse = GetDeviceSuccessResponse | GetDeviceErrorResponse; + +/** + * Typing for all successful responses to the request made by getDevice() + * @category getDevice() + */ +export type GetDeviceSuccessResponse = GetDeviceResponse200; + +/** + * Typing for all error responses to the request made by getDevice() + * @category getDevice() + */ +export type GetDeviceErrorResponse = + | GetDeviceResponse400 + | GetDeviceResponse401 + | GetDeviceResponse403 + | GetDeviceResponse404 + | GetDeviceResponse500; + +/** + * Typing for a response with status 200 to the request made by getDevice() + * @category getDevice() + */ +export interface GetDeviceResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Device<'response'>; +} + +/** + * Typing for a response with status 400 to the request made by getDevice() + * @category getDevice() + */ +export interface GetDeviceResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by getDevice() + * @category getDevice() + */ +export interface GetDeviceResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by getDevice() + * @category getDevice() + */ +export interface GetDeviceResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by getDevice() + * @category getDevice() + */ +export interface GetDeviceResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by getDevice() + * @category getDevice() + */ +export interface GetDeviceResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by updateDevice() + * @category updateDevice() + */ +export type UpdateDeviceParameters = { + device_id: string; + changedUrl?: string; +}; + +/** + * Typing for the body of the request made by updateDevice() + * @category updateDevice() + */ +export type UpdateDeviceBody = Types.DeviceUpdate<'request'> | undefined; + +/** + * Typing for all possible responses to the request made by updateDevice() + * @category updateDevice() + */ +export type UpdateDeviceResponse = + | UpdateDeviceSuccessResponse + | UpdateDeviceErrorResponse; + +/** + * Typing for all successful responses to the request made by updateDevice() + * @category updateDevice() + */ +export type UpdateDeviceSuccessResponse = UpdateDeviceResponse200; + +/** + * Typing for all error responses to the request made by updateDevice() + * @category updateDevice() + */ +export type UpdateDeviceErrorResponse = + | UpdateDeviceResponse400 + | UpdateDeviceResponse401 + | UpdateDeviceResponse403 + | UpdateDeviceResponse404 + | UpdateDeviceResponse500; + +/** + * Typing for a response with status 200 to the request made by updateDevice() + * @category updateDevice() + */ +export interface UpdateDeviceResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Device<'response'>; +} + +/** + * Typing for a response with status 400 to the request made by updateDevice() + * @category updateDevice() + */ +export interface UpdateDeviceResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by updateDevice() + * @category updateDevice() + */ +export interface UpdateDeviceResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by updateDevice() + * @category updateDevice() + */ +export interface UpdateDeviceResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by updateDevice() + * @category updateDevice() + */ +export interface UpdateDeviceResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by updateDevice() + * @category updateDevice() + */ +export interface UpdateDeviceResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by deleteDevice() + * @category deleteDevice() + */ +export type DeleteDeviceParameters = { + device_id: string; +}; + +/** + * Typing for all possible responses to the request made by deleteDevice() + * @category deleteDevice() + */ +export type DeleteDeviceResponse = + | DeleteDeviceSuccessResponse + | DeleteDeviceErrorResponse; + +/** + * Typing for all successful responses to the request made by deleteDevice() + * @category deleteDevice() + */ +export type DeleteDeviceSuccessResponse = DeleteDeviceResponse204; + +/** + * Typing for all error responses to the request made by deleteDevice() + * @category deleteDevice() + */ +export type DeleteDeviceErrorResponse = + | DeleteDeviceResponse400 + | DeleteDeviceResponse401 + | DeleteDeviceResponse403 + | DeleteDeviceResponse404 + | DeleteDeviceResponse500; + +/** + * Typing for a response with status 204 to the request made by deleteDevice() + * @category deleteDevice() + */ +export interface DeleteDeviceResponse204 extends Types.SuccessResponse { + status: 204; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 400 to the request made by deleteDevice() + * @category deleteDevice() + */ +export interface DeleteDeviceResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by deleteDevice() + * @category deleteDevice() + */ +export interface DeleteDeviceResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by deleteDevice() + * @category deleteDevice() + */ +export interface DeleteDeviceResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by deleteDevice() + * @category deleteDevice() + */ +export interface DeleteDeviceResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by deleteDevice() + * @category deleteDevice() + */ +export interface DeleteDeviceResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by instantiateDevice() + * @category instantiateDevice() + */ +export type InstantiateDeviceParameters = { + device_id: string; + changedUrl?: string; +}; + +/** + * Typing for all possible responses to the request made by instantiateDevice() + * @category instantiateDevice() + */ +export type InstantiateDeviceResponse = + | InstantiateDeviceSuccessResponse + | InstantiateDeviceErrorResponse; + +/** + * Typing for all successful responses to the request made by instantiateDevice() + * @category instantiateDevice() + */ +export type InstantiateDeviceSuccessResponse = InstantiateDeviceResponse201; + +/** + * Typing for all error responses to the request made by instantiateDevice() + * @category instantiateDevice() + */ +export type InstantiateDeviceErrorResponse = + | InstantiateDeviceResponse400 + | InstantiateDeviceResponse401 + | InstantiateDeviceResponse403 + | InstantiateDeviceResponse404 + | InstantiateDeviceResponse500; + +/** + * Typing for a response with status 201 to the request made by instantiateDevice() + * @category instantiateDevice() + */ +export interface InstantiateDeviceResponse201 extends Types.SuccessResponse { + status: 201; + headers?: { + [k: string]: string | undefined; + }; + body: { + instance: Types.ConcreteDevice<'response'>; + deviceToken: string; + [k: string]: unknown; + }; +} + +/** + * Typing for a response with status 400 to the request made by instantiateDevice() + * @category instantiateDevice() + */ +export interface InstantiateDeviceResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by instantiateDevice() + * @category instantiateDevice() + */ +export interface InstantiateDeviceResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by instantiateDevice() + * @category instantiateDevice() + */ +export interface InstantiateDeviceResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by instantiateDevice() + * @category instantiateDevice() + */ +export interface InstantiateDeviceResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by instantiateDevice() + * @category instantiateDevice() + */ +export interface InstantiateDeviceResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by getDeviceAvailability() + * @category getDeviceAvailability() + */ +export type GetDeviceAvailabilityParameters = { + device_id: string; + startTime?: string; + endTime?: string; +}; + +/** + * Typing for all possible responses to the request made by getDeviceAvailability() + * @category getDeviceAvailability() + */ +export type GetDeviceAvailabilityResponse = + | GetDeviceAvailabilitySuccessResponse + | GetDeviceAvailabilityErrorResponse; + +/** + * Typing for all successful responses to the request made by getDeviceAvailability() + * @category getDeviceAvailability() + */ +export type GetDeviceAvailabilitySuccessResponse = GetDeviceAvailabilityResponse200; + +/** + * Typing for all error responses to the request made by getDeviceAvailability() + * @category getDeviceAvailability() + */ +export type GetDeviceAvailabilityErrorResponse = + | GetDeviceAvailabilityResponse400 + | GetDeviceAvailabilityResponse401 + | GetDeviceAvailabilityResponse403 + | GetDeviceAvailabilityResponse404 + | GetDeviceAvailabilityResponse500; + +/** + * Typing for a response with status 200 to the request made by getDeviceAvailability() + * @category getDeviceAvailability() + */ +export interface GetDeviceAvailabilityResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Availability<'response'>; +} + +/** + * Typing for a response with status 400 to the request made by getDeviceAvailability() + * @category getDeviceAvailability() + */ +export interface GetDeviceAvailabilityResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by getDeviceAvailability() + * @category getDeviceAvailability() + */ +export interface GetDeviceAvailabilityResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by getDeviceAvailability() + * @category getDeviceAvailability() + */ +export interface GetDeviceAvailabilityResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by getDeviceAvailability() + * @category getDeviceAvailability() + */ +export interface GetDeviceAvailabilityResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by getDeviceAvailability() + * @category getDeviceAvailability() + */ +export interface GetDeviceAvailabilityResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by deleteDeviceAvailabilityRules() + * @category deleteDeviceAvailabilityRules() + */ +export type DeleteDeviceAvailabilityRulesParameters = { + device_id: string; +}; + +/** + * Typing for all possible responses to the request made by deleteDeviceAvailabilityRules() + * @category deleteDeviceAvailabilityRules() + */ +export type DeleteDeviceAvailabilityRulesResponse = + | DeleteDeviceAvailabilityRulesSuccessResponse + | DeleteDeviceAvailabilityRulesErrorResponse; + +/** + * Typing for all successful responses to the request made by deleteDeviceAvailabilityRules() + * @category deleteDeviceAvailabilityRules() + */ +export type DeleteDeviceAvailabilityRulesSuccessResponse = + DeleteDeviceAvailabilityRulesResponse204; + +/** + * Typing for all error responses to the request made by deleteDeviceAvailabilityRules() + * @category deleteDeviceAvailabilityRules() + */ +export type DeleteDeviceAvailabilityRulesErrorResponse = + | DeleteDeviceAvailabilityRulesResponse400 + | DeleteDeviceAvailabilityRulesResponse401 + | DeleteDeviceAvailabilityRulesResponse403 + | DeleteDeviceAvailabilityRulesResponse404 + | DeleteDeviceAvailabilityRulesResponse500; + +/** + * Typing for a response with status 204 to the request made by deleteDeviceAvailabilityRules() + * @category deleteDeviceAvailabilityRules() + */ +export interface DeleteDeviceAvailabilityRulesResponse204 extends Types.SuccessResponse { + status: 204; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 400 to the request made by deleteDeviceAvailabilityRules() + * @category deleteDeviceAvailabilityRules() + */ +export interface DeleteDeviceAvailabilityRulesResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by deleteDeviceAvailabilityRules() + * @category deleteDeviceAvailabilityRules() + */ +export interface DeleteDeviceAvailabilityRulesResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by deleteDeviceAvailabilityRules() + * @category deleteDeviceAvailabilityRules() + */ +export interface DeleteDeviceAvailabilityRulesResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by deleteDeviceAvailabilityRules() + * @category deleteDeviceAvailabilityRules() + */ +export interface DeleteDeviceAvailabilityRulesResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by deleteDeviceAvailabilityRules() + * @category deleteDeviceAvailabilityRules() + */ +export interface DeleteDeviceAvailabilityRulesResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by addDeviceAvailabilityRules() + * @category addDeviceAvailabilityRules() + */ +export type AddDeviceAvailabilityRulesParameters = { + device_id: string; +}; + +/** + * Typing for the body of the request made by addDeviceAvailabilityRules() + * @category addDeviceAvailabilityRules() + */ +export type AddDeviceAvailabilityRulesBody = + | Types.AvailabilityRule<'request'>[] + | undefined; + +/** + * Typing for all possible responses to the request made by addDeviceAvailabilityRules() + * @category addDeviceAvailabilityRules() + */ +export type AddDeviceAvailabilityRulesResponse = + | AddDeviceAvailabilityRulesSuccessResponse + | AddDeviceAvailabilityRulesErrorResponse; + +/** + * Typing for all successful responses to the request made by addDeviceAvailabilityRules() + * @category addDeviceAvailabilityRules() + */ +export type AddDeviceAvailabilityRulesSuccessResponse = + AddDeviceAvailabilityRulesResponse200; + +/** + * Typing for all error responses to the request made by addDeviceAvailabilityRules() + * @category addDeviceAvailabilityRules() + */ +export type AddDeviceAvailabilityRulesErrorResponse = + | AddDeviceAvailabilityRulesResponse400 + | AddDeviceAvailabilityRulesResponse401 + | AddDeviceAvailabilityRulesResponse403 + | AddDeviceAvailabilityRulesResponse404 + | AddDeviceAvailabilityRulesResponse500; + +/** + * Typing for a response with status 200 to the request made by addDeviceAvailabilityRules() + * @category addDeviceAvailabilityRules() + */ +export interface AddDeviceAvailabilityRulesResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Availability<'response'>; +} + +/** + * Typing for a response with status 400 to the request made by addDeviceAvailabilityRules() + * @category addDeviceAvailabilityRules() + */ +export interface AddDeviceAvailabilityRulesResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by addDeviceAvailabilityRules() + * @category addDeviceAvailabilityRules() + */ +export interface AddDeviceAvailabilityRulesResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by addDeviceAvailabilityRules() + * @category addDeviceAvailabilityRules() + */ +export interface AddDeviceAvailabilityRulesResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by addDeviceAvailabilityRules() + * @category addDeviceAvailabilityRules() + */ +export interface AddDeviceAvailabilityRulesResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by addDeviceAvailabilityRules() + * @category addDeviceAvailabilityRules() + */ +export interface AddDeviceAvailabilityRulesResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by createWebsocketToken() + * @category createWebsocketToken() + */ +export type CreateWebsocketTokenParameters = { + device_id: string; +}; + +/** + * Typing for all possible responses to the request made by createWebsocketToken() + * @category createWebsocketToken() + */ +export type CreateWebsocketTokenResponse = + | CreateWebsocketTokenSuccessResponse + | CreateWebsocketTokenErrorResponse; + +/** + * Typing for all successful responses to the request made by createWebsocketToken() + * @category createWebsocketToken() + */ +export type CreateWebsocketTokenSuccessResponse = CreateWebsocketTokenResponse200; + +/** + * Typing for all error responses to the request made by createWebsocketToken() + * @category createWebsocketToken() + */ +export type CreateWebsocketTokenErrorResponse = + | CreateWebsocketTokenResponse400 + | CreateWebsocketTokenResponse401 + | CreateWebsocketTokenResponse403 + | CreateWebsocketTokenResponse404 + | CreateWebsocketTokenResponse500; + +/** + * Typing for a response with status 200 to the request made by createWebsocketToken() + * @category createWebsocketToken() + */ +export interface CreateWebsocketTokenResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 400 to the request made by createWebsocketToken() + * @category createWebsocketToken() + */ +export interface CreateWebsocketTokenResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by createWebsocketToken() + * @category createWebsocketToken() + */ +export interface CreateWebsocketTokenResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by createWebsocketToken() + * @category createWebsocketToken() + */ +export interface CreateWebsocketTokenResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by createWebsocketToken() + * @category createWebsocketToken() + */ +export interface CreateWebsocketTokenResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by createWebsocketToken() + * @category createWebsocketToken() + */ +export interface CreateWebsocketTokenResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by sendSignalingMessage() + * @category sendSignalingMessage() + */ +export type SendSignalingMessageParameters = { + device_id: string; +}; + +/** + * Typing for the body of the request made by sendSignalingMessage() + * @category sendSignalingMessage() + */ +export type SendSignalingMessageBody = + | Types.CreatePeerconnectionMessage<'request'> + | Types.ClosePeerconnectionMessage<'request'> + | Types.SignalingMessage<'request'> + | Types.ConfigurationMessage<'request'> + | Types.ExperimentStatusChangedMessage<'request'>; + +/** + * Typing for all possible responses to the request made by sendSignalingMessage() + * @category sendSignalingMessage() + */ +export type SendSignalingMessageResponse = + | SendSignalingMessageSuccessResponse + | SendSignalingMessageErrorResponse; + +/** + * Typing for all successful responses to the request made by sendSignalingMessage() + * @category sendSignalingMessage() + */ +export type SendSignalingMessageSuccessResponse = SendSignalingMessageResponse200; + +/** + * Typing for all error responses to the request made by sendSignalingMessage() + * @category sendSignalingMessage() + */ +export type SendSignalingMessageErrorResponse = + | SendSignalingMessageResponse400 + | SendSignalingMessageResponse401 + | SendSignalingMessageResponse403 + | SendSignalingMessageResponse404 + | SendSignalingMessageResponse500; + +/** + * Typing for a response with status 200 to the request made by sendSignalingMessage() + * @category sendSignalingMessage() + */ +export interface SendSignalingMessageResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 400 to the request made by sendSignalingMessage() + * @category sendSignalingMessage() + */ +export interface SendSignalingMessageResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by sendSignalingMessage() + * @category sendSignalingMessage() + */ +export interface SendSignalingMessageResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by sendSignalingMessage() + * @category sendSignalingMessage() + */ +export interface SendSignalingMessageResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by sendSignalingMessage() + * @category sendSignalingMessage() + */ +export interface SendSignalingMessageResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by sendSignalingMessage() + * @category sendSignalingMessage() + */ +export interface SendSignalingMessageResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for all possible responses to the request made by listPeerconnections() + * @category listPeerconnections() + */ +export type ListPeerconnectionsResponse = + | ListPeerconnectionsSuccessResponse + | ListPeerconnectionsErrorResponse; + +/** + * Typing for all successful responses to the request made by listPeerconnections() + * @category listPeerconnections() + */ +export type ListPeerconnectionsSuccessResponse = ListPeerconnectionsResponse200; + +/** + * Typing for all error responses to the request made by listPeerconnections() + * @category listPeerconnections() + */ +export type ListPeerconnectionsErrorResponse = + | ListPeerconnectionsResponse400 + | ListPeerconnectionsResponse401 + | ListPeerconnectionsResponse403 + | ListPeerconnectionsResponse404 + | ListPeerconnectionsResponse500; + +/** + * Typing for a response with status 200 to the request made by listPeerconnections() + * @category listPeerconnections() + */ +export interface ListPeerconnectionsResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.PeerconnectionOverview<'response'>[]; +} + +/** + * Typing for a response with status 400 to the request made by listPeerconnections() + * @category listPeerconnections() + */ +export interface ListPeerconnectionsResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by listPeerconnections() + * @category listPeerconnections() + */ +export interface ListPeerconnectionsResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by listPeerconnections() + * @category listPeerconnections() + */ +export interface ListPeerconnectionsResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by listPeerconnections() + * @category listPeerconnections() + */ +export interface ListPeerconnectionsResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by listPeerconnections() + * @category listPeerconnections() + */ +export interface ListPeerconnectionsResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by createPeerconnection() + * @category createPeerconnection() + */ +export type CreatePeerconnectionParameters = { + closedUrl?: string; + statusChangedUrl?: string; +}; + +/** + * Typing for the body of the request made by createPeerconnection() + * @category createPeerconnection() + */ +export type CreatePeerconnectionBody = Types.Peerconnection<'request'>; + +/** + * Typing for all possible responses to the request made by createPeerconnection() + * @category createPeerconnection() + */ +export type CreatePeerconnectionResponse = + | CreatePeerconnectionSuccessResponse + | CreatePeerconnectionErrorResponse; + +/** + * Typing for all successful responses to the request made by createPeerconnection() + * @category createPeerconnection() + */ +export type CreatePeerconnectionSuccessResponse = + | CreatePeerconnectionResponse201 + | CreatePeerconnectionResponse202; + +/** + * Typing for all error responses to the request made by createPeerconnection() + * @category createPeerconnection() + */ +export type CreatePeerconnectionErrorResponse = + | CreatePeerconnectionResponse400 + | CreatePeerconnectionResponse401 + | CreatePeerconnectionResponse403 + | CreatePeerconnectionResponse404 + | CreatePeerconnectionResponse500; + +/** + * Typing for a response with status 201 to the request made by createPeerconnection() + * @category createPeerconnection() + */ +export interface CreatePeerconnectionResponse201 extends Types.SuccessResponse { + status: 201; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Peerconnection<'response'>; +} + +/** + * Typing for a response with status 202 to the request made by createPeerconnection() + * @category createPeerconnection() + */ +export interface CreatePeerconnectionResponse202 extends Types.SuccessResponse { + status: 202; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Peerconnection<'response'>; +} + +/** + * Typing for a response with status 400 to the request made by createPeerconnection() + * @category createPeerconnection() + */ +export interface CreatePeerconnectionResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by createPeerconnection() + * @category createPeerconnection() + */ +export interface CreatePeerconnectionResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by createPeerconnection() + * @category createPeerconnection() + */ +export interface CreatePeerconnectionResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by createPeerconnection() + * @category createPeerconnection() + */ +export interface CreatePeerconnectionResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by createPeerconnection() + * @category createPeerconnection() + */ +export interface CreatePeerconnectionResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by getPeerconnection() + * @category getPeerconnection() + */ +export type GetPeerconnectionParameters = { + peerconnection_id: string; +}; + +/** + * Typing for all possible responses to the request made by getPeerconnection() + * @category getPeerconnection() + */ +export type GetPeerconnectionResponse = + | GetPeerconnectionSuccessResponse + | GetPeerconnectionErrorResponse; + +/** + * Typing for all successful responses to the request made by getPeerconnection() + * @category getPeerconnection() + */ +export type GetPeerconnectionSuccessResponse = GetPeerconnectionResponse200; + +/** + * Typing for all error responses to the request made by getPeerconnection() + * @category getPeerconnection() + */ +export type GetPeerconnectionErrorResponse = + | GetPeerconnectionResponse400 + | GetPeerconnectionResponse401 + | GetPeerconnectionResponse403 + | GetPeerconnectionResponse404 + | GetPeerconnectionResponse500; + +/** + * Typing for a response with status 200 to the request made by getPeerconnection() + * @category getPeerconnection() + */ +export interface GetPeerconnectionResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Peerconnection<'response'>; +} + +/** + * Typing for a response with status 400 to the request made by getPeerconnection() + * @category getPeerconnection() + */ +export interface GetPeerconnectionResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by getPeerconnection() + * @category getPeerconnection() + */ +export interface GetPeerconnectionResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by getPeerconnection() + * @category getPeerconnection() + */ +export interface GetPeerconnectionResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by getPeerconnection() + * @category getPeerconnection() + */ +export interface GetPeerconnectionResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by getPeerconnection() + * @category getPeerconnection() + */ +export interface GetPeerconnectionResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by deletePeerconnection() + * @category deletePeerconnection() + */ +export type DeletePeerconnectionParameters = { + peerconnection_id: string; +}; + +/** + * Typing for all possible responses to the request made by deletePeerconnection() + * @category deletePeerconnection() + */ +export type DeletePeerconnectionResponse = + | DeletePeerconnectionSuccessResponse + | DeletePeerconnectionErrorResponse; + +/** + * Typing for all successful responses to the request made by deletePeerconnection() + * @category deletePeerconnection() + */ +export type DeletePeerconnectionSuccessResponse = + | DeletePeerconnectionResponse202 + | DeletePeerconnectionResponse204; + +/** + * Typing for all error responses to the request made by deletePeerconnection() + * @category deletePeerconnection() + */ +export type DeletePeerconnectionErrorResponse = + | DeletePeerconnectionResponse400 + | DeletePeerconnectionResponse401 + | DeletePeerconnectionResponse403 + | DeletePeerconnectionResponse404 + | DeletePeerconnectionResponse500; + +/** + * Typing for a response with status 202 to the request made by deletePeerconnection() + * @category deletePeerconnection() + */ +export interface DeletePeerconnectionResponse202 extends Types.SuccessResponse { + status: 202; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 204 to the request made by deletePeerconnection() + * @category deletePeerconnection() + */ +export interface DeletePeerconnectionResponse204 extends Types.SuccessResponse { + status: 204; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 400 to the request made by deletePeerconnection() + * @category deletePeerconnection() + */ +export interface DeletePeerconnectionResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by deletePeerconnection() + * @category deletePeerconnection() + */ +export interface DeletePeerconnectionResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by deletePeerconnection() + * @category deletePeerconnection() + */ +export interface DeletePeerconnectionResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by deletePeerconnection() + * @category deletePeerconnection() + */ +export interface DeletePeerconnectionResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by deletePeerconnection() + * @category deletePeerconnection() + */ +export interface DeletePeerconnectionResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by patchPeerconnectionDeviceStatus() + * @category patchPeerconnectionDeviceStatus() + */ +export type PatchPeerconnectionDeviceStatusParameters = { + peerconnection_id: string; + device_url: string; +}; + +/** + * Typing for the body of the request made by patchPeerconnectionDeviceStatus() + * @category patchPeerconnectionDeviceStatus() + */ +export type PatchPeerconnectionDeviceStatusBody = { + /** + * The status of the peerconnection. + */ + status: Types.ConnectionStatus<'request'>; + [k: string]: unknown; +}; + +/** + * Typing for all possible responses to the request made by patchPeerconnectionDeviceStatus() + * @category patchPeerconnectionDeviceStatus() + */ +export type PatchPeerconnectionDeviceStatusResponse = + | PatchPeerconnectionDeviceStatusSuccessResponse + | PatchPeerconnectionDeviceStatusErrorResponse; + +/** + * Typing for all successful responses to the request made by patchPeerconnectionDeviceStatus() + * @category patchPeerconnectionDeviceStatus() + */ +export type PatchPeerconnectionDeviceStatusSuccessResponse = + PatchPeerconnectionDeviceStatusResponse204; + +/** + * Typing for all error responses to the request made by patchPeerconnectionDeviceStatus() + * @category patchPeerconnectionDeviceStatus() + */ +export type PatchPeerconnectionDeviceStatusErrorResponse = + | PatchPeerconnectionDeviceStatusResponse400 + | PatchPeerconnectionDeviceStatusResponse401 + | PatchPeerconnectionDeviceStatusResponse403 + | PatchPeerconnectionDeviceStatusResponse404 + | PatchPeerconnectionDeviceStatusResponse500; + +/** + * Typing for a response with status 204 to the request made by patchPeerconnectionDeviceStatus() + * @category patchPeerconnectionDeviceStatus() + */ +export interface PatchPeerconnectionDeviceStatusResponse204 + extends Types.SuccessResponse { + status: 204; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 400 to the request made by patchPeerconnectionDeviceStatus() + * @category patchPeerconnectionDeviceStatus() + */ +export interface PatchPeerconnectionDeviceStatusResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by patchPeerconnectionDeviceStatus() + * @category patchPeerconnectionDeviceStatus() + */ +export interface PatchPeerconnectionDeviceStatusResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by patchPeerconnectionDeviceStatus() + * @category patchPeerconnectionDeviceStatus() + */ +export interface PatchPeerconnectionDeviceStatusResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by patchPeerconnectionDeviceStatus() + * @category patchPeerconnectionDeviceStatus() + */ +export interface PatchPeerconnectionDeviceStatusResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by patchPeerconnectionDeviceStatus() + * @category patchPeerconnectionDeviceStatus() + */ +export interface PatchPeerconnectionDeviceStatusResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} diff --git a/services/booking/src/common/src/clients/device/types.ts b/services/booking/src/common/src/clients/device/types.ts new file mode 100644 index 00000000..b309e029 --- /dev/null +++ b/services/booking/src/common/src/clients/device/types.ts @@ -0,0 +1,3805 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as BasicValidation from './basicValidation.cjs'; + +/** + * @internal + */ +export interface FunctionWithErrors { + (...args: unknown[]): unknown; + errors?: unknown; +} + +/** + * @internal + */ +export interface RequestInfo { + method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'OPTIONS' | 'PATCH' | 'HEAD'; + body?: string; + headers?: [string, string][]; +} + +/** + * @internal + */ +export type FetchFunction = ( + url: string, + info?: RequestInfo, +) => Promise | ResponseData; + +export interface ResponseData { + status: number; + headers?: { + [key: string]: string | undefined; + }; + body?: unknown; +} + +export interface SuccessResponse extends ResponseData { + success?: true; +} + +export interface ErrorResponse extends ResponseData { + success?: false; +} + +/** + * @internal + */ +export function isSuccessResponse(response: ResponseData): response is SuccessResponse { + return response.status < 400; +} + +/** + * @internal + */ +export function isErrorResponse(response: ResponseData): response is ErrorResponse { + return response.status >= 400; +} + +/** + * This type allows to pick the required properties of another type. + */ +export type Require = Partial & { + [Property in Key]-?: Type[Property]; +}; + +export type SizedTuple< + T, + MIN extends number | undefined = undefined, + MAX extends number | undefined = undefined, +> = MIN extends number + ? MAX extends number + ? _SizedTuple> + : TupleObject> & T[] + : MAX extends number + ? _SizedTuple, true> + : T[]; + +type _SizedTuple = ARR extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? Tuple | _SizedTuple + : never; + +type Tuple = _Tuple< + T, + NumericRangeTuple +>; + +type _Tuple = N extends [ + infer HEAD, + ...infer TAIL extends number[], +] + ? HEAD extends 0 + ? [] | _Tuple + : [T, ..._Tuple] + : []; + +type TupleObject = N extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? TAIL extends [] + ? Record + : { [P in HEAD]: T } & TupleObject + : Record; + +export type NumericRange< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number = never, +> = ARR['length'] extends END + ? ACC | START | END + : NumericRange< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : ACC | ARR['length'] + >; + +type NumericRangeTuple< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number[] = [], +> = ARR['length'] extends END + ? [START, ...ACC, END] + : NumericRangeTuple< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : [...ACC, ARR['length']] + >; + +export type AuthenticationMessage = + T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'authenticate'; + token?: string; + authenticated?: boolean; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'authenticate'; + token?: string; + authenticated?: boolean; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'authenticate'; + token?: string; + authenticated?: boolean; + [k: string]: unknown; + } + : never; + +export type ConnectionStateChangedMessage< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType?: 'connection-state-changed'; + connectionUrl: string; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType?: 'connection-state-changed'; + connectionUrl: string; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType?: 'connection-state-changed'; + connectionUrl: string; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } + : never; + +export type UserReference = + T extends 'all' + ? { + /** + * URL of the user + */ + url: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * URL of the user + */ + url: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the user + */ + url: string; + [k: string]: unknown; + } + : never; + +export type DeviceOverview = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } + : never; + +export type ServiceDescription = + T extends 'all' + ? { + serviceType?: string; + serviceId?: string; + serviceDirection?: 'consumer' | 'producer' | 'prosumer'; + [k: string]: unknown; + } + : T extends 'request' + ? { + serviceType?: string; + serviceId?: string; + serviceDirection?: 'consumer' | 'producer' | 'prosumer'; + [k: string]: unknown; + } + : T extends 'response' + ? { + serviceType?: string; + serviceId?: string; + serviceDirection?: 'consumer' | 'producer' | 'prosumer'; + [k: string]: unknown; + } + : never; + +export type InstantiableCloudDevice = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type TimeSlot = T extends 'all' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } + : never; + +/** + * A list of time slots that the maintainer of the device announced it is available + * + */ +export type Availability = + T extends 'all' + ? TimeSlot[] + : T extends 'request' + ? TimeSlot<'request'>[] + : T extends 'response' + ? TimeSlot<'response'>[] + : never; + +export type ConcreteDevice = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot[]; + experiment?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot<'response'>[]; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type InstantiableBrowserDevice = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type DeviceReference = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * URL of the device + */ + url: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + [k: string]: unknown; + } + : never; + +export type DeviceGroup = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'response'>[]; + [k: string]: unknown; + } + : never; + +export type Device = T extends 'all' + ? + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot[]; + experiment?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference[]; + [k: string]: unknown; + }) + : T extends 'request' + ? + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'request'>[]; + [k: string]: unknown; + }) + : T extends 'response' + ? + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot<'response'>[]; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'response'>[]; + [k: string]: unknown; + }) + : never; + +export type Callback = T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } + : never; + +export type EventCallback = + T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } + : never; + +export type DeviceChangedEventCallback = + T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'device-changed'; + device: + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot[]; + experiment?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference[]; + [k: string]: unknown; + }); + [k: string]: unknown; + } + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'device-changed'; + device: + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'request'>[]; + [k: string]: unknown; + }); + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'device-changed'; + device: + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot<'response'>[]; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'response'>[]; + [k: string]: unknown; + }); + [k: string]: unknown; + } + : never; + +export type DeviceOverviewUpdate = + T extends 'all' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } + : never; + +export type InstantiableCloudDeviceUpdate< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type ConcreteDeviceUpdate = + T extends 'all' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type InstantiableBrowserDeviceUpdate< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type DeviceGroupUpdate = + T extends 'all' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference<'response'>[]; + [k: string]: unknown; + } + : never; + +export type DeviceUpdate = + T extends 'all' + ? + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference[]; + [k: string]: unknown; + }) + : T extends 'request' + ? + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference<'request'>[]; + [k: string]: unknown; + }) + : T extends 'response' + ? + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference<'response'>[]; + [k: string]: unknown; + }) + : never; + +export type AvailabilityRule = + T extends 'all' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } & { + available?: boolean; + /** + * If specified the time slot is repeated in a fixed offset specified by the frequency + */ + repeat?: { + frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; + /** + * Up to this date-time the time slot will be repeated. + */ + until?: string; + /** + * How often the time slot will be repeated + */ + count?: number; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } & { + available?: boolean; + /** + * If specified the time slot is repeated in a fixed offset specified by the frequency + */ + repeat?: { + frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; + /** + * Up to this date-time the time slot will be repeated. + */ + until?: string; + /** + * How often the time slot will be repeated + */ + count?: number; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } & { + available?: boolean; + /** + * If specified the time slot is repeated in a fixed offset specified by the frequency + */ + repeat?: { + frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; + /** + * Up to this date-time the time slot will be repeated. + */ + until?: string; + /** + * How often the time slot will be repeated + */ + count?: number; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type Message = T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } + : never; + +export type CommandMessage = + T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } + : never; + +export type ServiceConfig = + T extends 'all' + ? { + serviceType: string; + serviceId: string; + remoteServiceId: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + serviceType: string; + serviceId: string; + remoteServiceId: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + serviceType: string; + serviceId: string; + remoteServiceId: string; + [k: string]: unknown; + } + : never; + +export type CreatePeerconnectionMessage< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'createPeerconnection'; + connectionType: 'webrtc' | 'websocket' | 'local'; + connectionUrl: string; + services: ServiceConfig[]; + tiebreaker: boolean; + config?: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'createPeerconnection'; + connectionType: 'webrtc' | 'websocket' | 'local'; + connectionUrl: string; + services: ServiceConfig<'request'>[]; + tiebreaker: boolean; + config?: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'createPeerconnection'; + connectionType: 'webrtc' | 'websocket' | 'local'; + connectionUrl: string; + services: ServiceConfig<'response'>[]; + tiebreaker: boolean; + config?: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type ClosePeerconnectionMessage = + T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'closePeerconnection'; + connectionUrl: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'closePeerconnection'; + connectionUrl: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'closePeerconnection'; + connectionUrl: string; + [k: string]: unknown; + } + : never; + +export type SignalingMessage = + T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'signaling'; + signalingType: string; + connectionUrl: string; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'signaling'; + signalingType: string; + connectionUrl: string; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'signaling'; + signalingType: string; + connectionUrl: string; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type ConfigurationMessage = + T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'configuration'; + configuration: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'configuration'; + configuration: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'configuration'; + configuration: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type ExperimentStatusChangedMessage< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'experiment-status-changed'; + status: string; + message?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'experiment-status-changed'; + status: string; + message?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'experiment-status-changed'; + status: string; + message?: string; + [k: string]: unknown; + } + : never; + +/** + * The status of the peerconnection. + */ +export type ConnectionStatus = + T extends 'all' + ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' + : T extends 'request' + ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' + : T extends 'response' + ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' + : never; + +export type PeerconnectionCommon = + T extends 'all' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } + : never; + +export type PeerconnectionOverview = + T extends 'all' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : never; + +export type ConfiguredDeviceReference = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + config?: { + services?: ServiceConfig[]; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * URL of the device + */ + url: string; + config?: { + services?: ServiceConfig<'request'>[]; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + config?: { + services?: ServiceConfig<'response'>[]; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type Peerconnection = + T extends 'all' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : never; + +export type PeerconnectionClosedEventCallback< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-closed'; + peerconnection: { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-closed'; + peerconnection: { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-closed'; + peerconnection: { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type PeerconnectionStatusChangedEventCallback< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-status-changed'; + peerconnection: { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-status-changed'; + peerconnection: { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-status-changed'; + peerconnection: { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export function isAuthenticationMessage( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is AuthenticationMessage { + switch (type) { + case 'request': + return BasicValidation.validateAuthenticationMessageRequest(obj); + case 'response': + return BasicValidation.validateAuthenticationMessageResponse(obj); + default: + return BasicValidation.validateAuthenticationMessage(obj); + } +} + +export function isConnectionStateChangedMessage< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is ConnectionStateChangedMessage { + switch (type) { + case 'request': + return BasicValidation.validateConnectionStateChangedMessageRequest(obj); + case 'response': + return BasicValidation.validateConnectionStateChangedMessageResponse(obj); + default: + return BasicValidation.validateConnectionStateChangedMessage(obj); + } +} + +export function isDeviceOverview( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is DeviceOverview { + switch (type) { + case 'request': + return BasicValidation.validateDeviceOverviewRequest(obj); + case 'response': + return BasicValidation.validateDeviceOverviewResponse(obj); + default: + return BasicValidation.validateDeviceOverview(obj); + } +} + +export function isInstantiableCloudDevice< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is InstantiableCloudDevice { + switch (type) { + case 'request': + return BasicValidation.validateInstantiableCloudDeviceRequest(obj); + case 'response': + return BasicValidation.validateInstantiableCloudDeviceResponse(obj); + default: + return BasicValidation.validateInstantiableCloudDevice(obj); + } +} + +export function isConcreteDevice( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is ConcreteDevice { + switch (type) { + case 'request': + return BasicValidation.validateConcreteDeviceRequest(obj); + case 'response': + return BasicValidation.validateConcreteDeviceResponse(obj); + default: + return BasicValidation.validateConcreteDevice(obj); + } +} + +export function isInstantiableBrowserDevice< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is InstantiableBrowserDevice { + switch (type) { + case 'request': + return BasicValidation.validateInstantiableBrowserDeviceRequest(obj); + case 'response': + return BasicValidation.validateInstantiableBrowserDeviceResponse(obj); + default: + return BasicValidation.validateInstantiableBrowserDevice(obj); + } +} + +export function isDeviceGroup( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is DeviceGroup { + switch (type) { + case 'request': + return BasicValidation.validateDeviceGroupRequest(obj); + case 'response': + return BasicValidation.validateDeviceGroupResponse(obj); + default: + return BasicValidation.validateDeviceGroup(obj); + } +} + +export function isDevice( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is Device { + switch (type) { + case 'request': + return BasicValidation.validateDeviceRequest(obj); + case 'response': + return BasicValidation.validateDeviceResponse(obj); + default: + return BasicValidation.validateDevice(obj); + } +} + +export function isCallback( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is Callback { + switch (type) { + case 'request': + return BasicValidation.validateCallbackRequest(obj); + case 'response': + return BasicValidation.validateCallbackResponse(obj); + default: + return BasicValidation.validateCallback(obj); + } +} + +export function isEventCallback( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is EventCallback { + switch (type) { + case 'request': + return BasicValidation.validateEventCallbackRequest(obj); + case 'response': + return BasicValidation.validateEventCallbackResponse(obj); + default: + return BasicValidation.validateEventCallback(obj); + } +} + +export function isDeviceChangedEventCallback< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is DeviceChangedEventCallback { + switch (type) { + case 'request': + return BasicValidation.validateDeviceChangedEventCallbackRequest(obj); + case 'response': + return BasicValidation.validateDeviceChangedEventCallbackResponse(obj); + default: + return BasicValidation.validateDeviceChangedEventCallback(obj); + } +} + +export function isMessage( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is Message { + switch (type) { + case 'request': + return BasicValidation.validateMessageRequest(obj); + case 'response': + return BasicValidation.validateMessageResponse(obj); + default: + return BasicValidation.validateMessage(obj); + } +} + +export function isCommandMessage( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is CommandMessage { + switch (type) { + case 'request': + return BasicValidation.validateCommandMessageRequest(obj); + case 'response': + return BasicValidation.validateCommandMessageResponse(obj); + default: + return BasicValidation.validateCommandMessage(obj); + } +} + +export function isCreatePeerconnectionMessage< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is CreatePeerconnectionMessage { + switch (type) { + case 'request': + return BasicValidation.validateCreatePeerconnectionMessageRequest(obj); + case 'response': + return BasicValidation.validateCreatePeerconnectionMessageResponse(obj); + default: + return BasicValidation.validateCreatePeerconnectionMessage(obj); + } +} + +export function isClosePeerconnectionMessage< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is ClosePeerconnectionMessage { + switch (type) { + case 'request': + return BasicValidation.validateClosePeerconnectionMessageRequest(obj); + case 'response': + return BasicValidation.validateClosePeerconnectionMessageResponse(obj); + default: + return BasicValidation.validateClosePeerconnectionMessage(obj); + } +} + +export function isSignalingMessage( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is SignalingMessage { + switch (type) { + case 'request': + return BasicValidation.validateSignalingMessageRequest(obj); + case 'response': + return BasicValidation.validateSignalingMessageResponse(obj); + default: + return BasicValidation.validateSignalingMessage(obj); + } +} + +export function isConfigurationMessage( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is ConfigurationMessage { + switch (type) { + case 'request': + return BasicValidation.validateConfigurationMessageRequest(obj); + case 'response': + return BasicValidation.validateConfigurationMessageResponse(obj); + default: + return BasicValidation.validateConfigurationMessage(obj); + } +} + +export function isExperimentStatusChangedMessage< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is ExperimentStatusChangedMessage { + switch (type) { + case 'request': + return BasicValidation.validateExperimentStatusChangedMessageRequest(obj); + case 'response': + return BasicValidation.validateExperimentStatusChangedMessageResponse(obj); + default: + return BasicValidation.validateExperimentStatusChangedMessage(obj); + } +} + +export function isPeerconnection( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is Peerconnection { + switch (type) { + case 'request': + return BasicValidation.validatePeerconnectionRequest(obj); + case 'response': + return BasicValidation.validatePeerconnectionResponse(obj); + default: + return BasicValidation.validatePeerconnection(obj); + } +} + +export function isPeerconnectionClosedEventCallback< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is PeerconnectionClosedEventCallback { + switch (type) { + case 'request': + return BasicValidation.validatePeerconnectionClosedEventCallbackRequest(obj); + case 'response': + return BasicValidation.validatePeerconnectionClosedEventCallbackResponse(obj); + default: + return BasicValidation.validatePeerconnectionClosedEventCallback(obj); + } +} + +export function isPeerconnectionStatusChangedEventCallback< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is PeerconnectionStatusChangedEventCallback { + switch (type) { + case 'request': + return BasicValidation.validatePeerconnectionStatusChangedEventCallbackRequest(obj); + case 'response': + return BasicValidation.validatePeerconnectionStatusChangedEventCallbackResponse( + obj, + ); + default: + return BasicValidation.validatePeerconnectionStatusChangedEventCallback(obj); + } +} diff --git a/services/booking/src/common/src/clients/index.ts b/services/booking/src/common/src/clients/index.ts new file mode 100644 index 00000000..5cb61223 --- /dev/null +++ b/services/booking/src/common/src/clients/index.ts @@ -0,0 +1,72 @@ +import { RequestHandler } from 'express'; + +import { baseConfig } from '../config.js'; +import { Client as BookingBackendClient } from './booking-backend/client.js'; +import { Client as BookingFrontendClient } from './booking-frontend/client.js'; +import { Client as DeviceClient } from './device/client.js'; +import { Client as ScheduleServiceClient } from './schedule-service/client.js'; + +export const device = new DeviceClient(baseConfig.BASE_URL, { + serviceUrl: baseConfig.DEVICE_SERVICE_URL, + fixedHeaders: [['x-request-authentication', 'experiment-service']], +}); +export const booking = { + backend: new BookingBackendClient(baseConfig.BASE_URL, { + serviceUrl: baseConfig.BOOKING_BACKEND_URL, + fixedHeaders: [['x-request-authentication', 'experiment-service']], + }), + frontend: new BookingFrontendClient(baseConfig.BASE_URL, { + serviceUrl: baseConfig.BOOKING_FRONTEND_URL, + fixedHeaders: [['x-request-authentication', 'experiment-service']], + }), + schedule: new ScheduleServiceClient(baseConfig.BASE_URL, { + serviceUrl: baseConfig.SCHEDULE_SERVICE_URL, + fixedHeaders: [['x-request-authentication', 'experiment-service']], + }), +}; +export const clients = { device, booking }; +export type Clients = typeof clients; + +declare global { + // eslint-disable-next-line @typescript-eslint/no-namespace + namespace Express { + export interface Request { + clients: typeof clients; + } + } +} + +export const middleware: RequestHandler = (req, _res, next) => { + const forward_headers = ['x-request-authentication']; + const fixed_headers = forward_headers + .map(forward_header => { + const value = req.header(forward_header); + if (value) return [forward_header, value] as [string, string]; + else return undefined; + }) + .filter(fixed_header => !!fixed_header) as [string, string][]; + + const bound_device = new DeviceClient(baseConfig.BASE_URL, { + serviceUrl: baseConfig.DEVICE_SERVICE_URL, + fixedHeaders: fixed_headers, + }); + + const bound_booking = { + backend: new BookingBackendClient(baseConfig.BASE_URL, { + serviceUrl: baseConfig.BOOKING_BACKEND_URL, + fixedHeaders: fixed_headers, + }), + frontend: new BookingFrontendClient(baseConfig.BASE_URL, { + serviceUrl: baseConfig.BOOKING_FRONTEND_URL, + fixedHeaders: fixed_headers, + }), + schedule: new ScheduleServiceClient(baseConfig.BASE_URL, { + serviceUrl: baseConfig.SCHEDULE_SERVICE_URL, + fixedHeaders: fixed_headers, + }), + }; + + req.clients = { device: bound_device, booking: bound_booking }; + + next(); +}; diff --git a/services/booking/src/common/src/clients/schedule-service/basicValidation.cjs b/services/booking/src/common/src/clients/schedule-service/basicValidation.cjs new file mode 100644 index 00000000..ff4febf8 --- /dev/null +++ b/services/booking/src/common/src/clients/schedule-service/basicValidation.cjs @@ -0,0 +1,6650 @@ +/* eslint-disable */ +//@ts-nocheck +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +'use strict'; +exports.validateBooking = validate21; +const schema6 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'Booking', + 'x-location': '#/components/schemas/Booking', + 'x-schema-type': 'all', +}; +const formats0 = require('ajv-formats/dist/formats').fullFormats.uri; +const formats2 = require('ajv-formats/dist/formats').fullFormats['date-time']; +function validate21( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate21.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema6.required, + parentSchema: schema6, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.ID.type, + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema6.properties.Time.required, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.Start.type, + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.End.type, + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.properties.Time.type, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Devices.items.type, + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema6.properties.Devices.type, + parentSchema: schema6.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Type.type, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Type.enum, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Status.type, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Status.enum, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.You.type, + parentSchema: schema6.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.External.type, + parentSchema: schema6.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Message.type, + parentSchema: schema6.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate21.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.type, + parentSchema: schema6, + data, + }, + ]; + return false; + } + } + validate21.errors = vErrors; + return errors === 0; +} +exports.validateDevice = validate22; +const schema7 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'Device', + 'x-location': '#/components/schemas/Device', + 'x-schema-type': 'all', +}; +function validate22( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate22.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema7.required, + parentSchema: schema7, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema7.properties.ID.type, + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate22.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema7.type, + parentSchema: schema7, + data, + }, + ]; + return false; + } + } + validate22.errors = vErrors; + return errors === 0; +} +exports.validateExperiment = validate23; +const schema8 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'Experiment', + 'x-location': '#/components/schemas/Experiment', + 'x-schema-type': 'all', +}; +function validate23( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate23.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema8.required, + parentSchema: schema8, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema8.properties.Devices.items.required, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema8.properties.Devices.items.properties.ID.type, + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.properties.Devices.items.type, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema8.properties.Devices.type, + parentSchema: schema8.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate23.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema8.properties.Description.type, + parentSchema: schema8.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate23.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.type, + parentSchema: schema8, + data, + }, + ]; + return false; + } + } + validate23.errors = vErrors; + return errors === 0; +} +exports.validateTimeslot = validate24; +const schema9 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'Timeslot', + 'x-location': '#/components/schemas/Timeslot', + 'x-schema-type': 'all', +}; +function validate24( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate24.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema9.required, + parentSchema: schema9, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.Start.type, + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.End.type, + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate24.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema9.type, + parentSchema: schema9, + data, + }, + ]; + return false; + } + } + validate24.errors = vErrors; + return errors === 0; +} +exports.validateID = validate25; +const schema10 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'ID', + 'x-location': '#/components/parameters/ID/schema', + 'x-schema-type': 'all', +}; +function validate25( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate25.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema10.type, + parentSchema: schema10, + data, + }, + ]; + return false; + } + validate25.errors = vErrors; + return errors === 0; +} +exports.validateScheduleBody = validate26; +const schema11 = { + type: 'object', + required: ['Experiment', 'Time'], + properties: { + Experiment: { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Combined: { + type: 'boolean', + description: + 'If true, show only one timetable per device instead of one for all available physical devices.', + }, + onlyOwn: { + type: 'boolean', + description: + '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleBody', + 'x-location': '#/paths//schedule/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate26( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate26.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema11.required, + parentSchema: schema11, + data, + }, + ]; + return false; + } else { + if (data.Experiment !== undefined) { + let data0 = data.Experiment; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.Devices === undefined && (missing1 = 'Devices')) { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema11.properties.Experiment.required, + parentSchema: schema11.properties.Experiment, + data: data0, + }, + ]; + return false; + } else { + if (data0.Devices !== undefined) { + let data1 = data0.Devices; + const _errs3 = errors; + if (errors === _errs3) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs5 = errors; + if (errors === _errs5) { + if ( + data2 && + typeof data2 == 'object' && + !Array.isArray(data2) + ) { + let missing2; + if (data2.ID === undefined && (missing2 = 'ID')) { + validate26.errors = [ + { + instancePath: + instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema11.properties.Experiment.properties.Devices + .items.required, + parentSchema: + schema11.properties.Experiment.properties.Devices + .items, + data: data2, + }, + ]; + return false; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate26.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema11.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.properties.Experiment.properties + .Devices.items.properties.ID.type, + parentSchema: + schema11.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema11.properties.Experiment.properties.Devices.items + .type, + parentSchema: + schema11.properties.Experiment.properties.Devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs5 === errors; + if (!valid2) { + break; + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment/Devices', + schemaPath: '#/properties/Experiment/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema11.properties.Experiment.properties.Devices.type, + parentSchema: schema11.properties.Experiment.properties.Devices, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Description !== undefined) { + let data4 = data0.Description; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment/Description', + schemaPath: + '#/properties/Experiment/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.properties.Experiment.properties.Description.type, + parentSchema: + schema11.properties.Experiment.properties.Description, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.properties.Experiment.type, + parentSchema: schema11.properties.Experiment, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data5 = data.Time; + const _errs11 = errors; + if (errors === _errs11) { + if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { + let missing3; + if ( + (data5.Start === undefined && (missing3 = 'Start')) || + (data5.End === undefined && (missing3 = 'End')) + ) { + validate26.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema11.properties.Time.required, + parentSchema: schema11.properties.Time, + data: data5, + }, + ]; + return false; + } else { + if (data5.Start !== undefined) { + let data6 = data5.Start; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats2.validate(data6)) { + validate26.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema11.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.properties.Time.properties.Start.type, + parentSchema: schema11.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data5.End !== undefined) { + let data7 = data5.End; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats2.validate(data7)) { + validate26.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema11.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.properties.Time.properties.End.type, + parentSchema: schema11.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.properties.Time.type, + parentSchema: schema11.properties.Time, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Combined !== undefined) { + let data8 = data.Combined; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate26.errors = [ + { + instancePath: instancePath + '/Combined', + schemaPath: '#/properties/Combined/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema11.properties.Combined.type, + parentSchema: schema11.properties.Combined, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.onlyOwn !== undefined) { + let data9 = data.onlyOwn; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate26.errors = [ + { + instancePath: instancePath + '/onlyOwn', + schemaPath: '#/properties/onlyOwn/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema11.properties.onlyOwn.type, + parentSchema: schema11.properties.onlyOwn, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } else { + validate26.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.type, + parentSchema: schema11, + data, + }, + ]; + return false; + } + } + validate26.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse200 = validate27; +const schema12 = { + type: 'array', + items: { + type: 'object', + required: ['Device', 'Booked', 'Free'], + properties: { + Device: { type: 'string', description: 'ID of the device (or * if combined).' }, + Booked: { + type: 'array', + description: 'Array of booked times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + Free: { + type: 'array', + description: 'Array of free times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleResponse200', + 'x-location': '#/paths//schedule/post/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate27( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Device === undefined && (missing0 = 'Device')) || + (data0.Booked === undefined && (missing0 = 'Booked')) || + (data0.Free === undefined && (missing0 = 'Free')) + ) { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema12.items.required, + parentSchema: schema12.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Device !== undefined) { + let data1 = data0.Device; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Device', + schemaPath: '#/items/properties/Device/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema12.items.properties.Device.type, + parentSchema: schema12.items.properties.Device, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Booked !== undefined) { + let data2 = data0.Booked; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len1 = data2.length; + for (let i1 = 0; i1 < len1; i1++) { + let data3 = data2[i1]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.Start === undefined && (missing1 = 'Start')) || + (data3.End === undefined && (missing1 = 'End')) + ) { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema12.items.properties.Booked.items.required, + parentSchema: schema12.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Booked.items + .properties.Start.type, + parentSchema: + schema12.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Booked.items + .properties.End.type, + parentSchema: + schema12.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema12.items.properties.Booked.items.type, + parentSchema: schema12.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked', + schemaPath: '#/items/properties/Booked/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema12.items.properties.Booked.type, + parentSchema: schema12.items.properties.Booked, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Free !== undefined) { + let data6 = data0.Free; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid4 = true; + const len2 = data6.length; + for (let i2 = 0; i2 < len2; i2++) { + let data7 = data6[i2]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if ( + (data7.Start === undefined && (missing2 = 'Start')) || + (data7.End === undefined && (missing2 = 'End')) + ) { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema12.items.properties.Free.items.required, + parentSchema: schema12.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.Start !== undefined) { + let data8 = data7.Start; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats2.validate(data8)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Free.items + .properties.Start.type, + parentSchema: + schema12.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } + } + var valid5 = _errs17 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data7.End !== undefined) { + let data9 = data7.End; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats2.validate(data9)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Free.items + .properties.End.type, + parentSchema: + schema12.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } + } + var valid5 = _errs19 === errors; + } else { + var valid5 = true; + } + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema12.items.properties.Free.items.type, + parentSchema: schema12.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } + } + var valid4 = _errs15 === errors; + if (!valid4) { + break; + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free', + schemaPath: '#/items/properties/Free/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema12.items.properties.Free.type, + parentSchema: schema12.items.properties.Free, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema12.items.type, + parentSchema: schema12.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate27.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema12.type, + parentSchema: schema12, + data, + }, + ]; + return false; + } + } + validate27.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse404 = validate28; +const schema13 = { + type: 'string', + description: 'First unknown device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse404', + 'x-location': '#/paths//schedule/post/responses/404/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate28( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate28.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema13.type, + parentSchema: schema13, + data, + }, + ]; + return false; + } + validate28.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse422 = validate29; +const schema14 = { + type: 'string', + description: 'First virtual device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse422', + 'x-location': '#/paths//schedule/post/responses/422/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate29( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate29.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.type, + parentSchema: schema14, + data, + }, + ]; + return false; + } + validate29.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse500 = validate30; +const schema15 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'scheduleResponse500', + 'x-location': '#/paths//schedule/post/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate30( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate30.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.type, + parentSchema: schema15, + data, + }, + ]; + return false; + } + validate30.errors = vErrors; + return errors === 0; +} +exports.validateBookingRequest = validate31; +const schema16 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingRequest', + 'x-location': '#/components/schemas/Booking_request', + 'x-schema-type': 'request', +}; +function validate31( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate31.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema16.required, + parentSchema: schema16, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate31.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema16.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.ID.type, + parentSchema: schema16.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate31.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema16.properties.Time.required, + parentSchema: schema16.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate31.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema16.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Time.properties.Start.type, + parentSchema: schema16.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate31.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema16.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Time.properties.End.type, + parentSchema: schema16.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.properties.Time.type, + parentSchema: schema16.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema16.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Devices.items.type, + parentSchema: schema16.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema16.properties.Devices.type, + parentSchema: schema16.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Type.type, + parentSchema: schema16.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate31.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema16.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema16.properties.Type.enum, + parentSchema: schema16.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Status.type, + parentSchema: schema16.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate31.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema16.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema16.properties.Status.enum, + parentSchema: schema16.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate31.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema16.properties.You.type, + parentSchema: schema16.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate31.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema16.properties.External.type, + parentSchema: schema16.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Message.type, + parentSchema: schema16.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate31.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.type, + parentSchema: schema16, + data, + }, + ]; + return false; + } + } + validate31.errors = vErrors; + return errors === 0; +} +exports.validateBookingResponse = validate32; +const schema17 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingResponse', + 'x-location': '#/components/schemas/Booking_response', + 'x-schema-type': 'response', +}; +function validate32( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate32.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema17.required, + parentSchema: schema17, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate32.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema17.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.ID.type, + parentSchema: schema17.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate32.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema17.properties.Time.required, + parentSchema: schema17.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate32.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema17.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Time.properties.Start.type, + parentSchema: schema17.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate32.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema17.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Time.properties.End.type, + parentSchema: schema17.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.properties.Time.type, + parentSchema: schema17.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate32.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema17.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Devices.items.type, + parentSchema: schema17.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema17.properties.Devices.type, + parentSchema: schema17.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate32.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Type.type, + parentSchema: schema17.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate32.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema17.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema17.properties.Type.enum, + parentSchema: schema17.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate32.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Status.type, + parentSchema: schema17.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate32.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema17.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema17.properties.Status.enum, + parentSchema: schema17.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate32.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema17.properties.You.type, + parentSchema: schema17.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate32.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema17.properties.External.type, + parentSchema: schema17.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate32.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Message.type, + parentSchema: schema17.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate32.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.type, + parentSchema: schema17, + data, + }, + ]; + return false; + } + } + validate32.errors = vErrors; + return errors === 0; +} +exports.validateDeviceRequest = validate33; +const schema18 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceRequest', + 'x-location': '#/components/schemas/Device_request', + 'x-schema-type': 'request', +}; +function validate33( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate33.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema18.required, + parentSchema: schema18, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate33.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema18.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate33.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.properties.ID.type, + parentSchema: schema18.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate33.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.type, + parentSchema: schema18, + data, + }, + ]; + return false; + } + } + validate33.errors = vErrors; + return errors === 0; +} +exports.validateDeviceResponse = validate34; +const schema19 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceResponse', + 'x-location': '#/components/schemas/Device_response', + 'x-schema-type': 'response', +}; +function validate34( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate34.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema19.required, + parentSchema: schema19, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate34.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema19.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema19.properties.ID.type, + parentSchema: schema19.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate34.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.type, + parentSchema: schema19, + data, + }, + ]; + return false; + } + } + validate34.errors = vErrors; + return errors === 0; +} +exports.validateExperimentRequest = validate35; +const schema20 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentRequest', + 'x-location': '#/components/schemas/Experiment_request', + 'x-schema-type': 'request', +}; +function validate35( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate35.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema20.required, + parentSchema: schema20, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema20.properties.Devices.items.required, + parentSchema: schema20.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema20.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema20.properties.Devices.items.properties.ID.type, + parentSchema: + schema20.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema20.properties.Devices.items.type, + parentSchema: schema20.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema20.properties.Devices.type, + parentSchema: schema20.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate35.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema20.properties.Description.type, + parentSchema: schema20.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate35.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema20.type, + parentSchema: schema20, + data, + }, + ]; + return false; + } + } + validate35.errors = vErrors; + return errors === 0; +} +exports.validateExperimentResponse = validate36; +const schema21 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentResponse', + 'x-location': '#/components/schemas/Experiment_response', + 'x-schema-type': 'response', +}; +function validate36( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate36.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema21.required, + parentSchema: schema21, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate36.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema21.properties.Devices.items.required, + parentSchema: schema21.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate36.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema21.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate36.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.properties.Devices.items.properties.ID.type, + parentSchema: + schema21.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate36.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.properties.Devices.items.type, + parentSchema: schema21.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate36.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema21.properties.Devices.type, + parentSchema: schema21.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate36.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.properties.Description.type, + parentSchema: schema21.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate36.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.type, + parentSchema: schema21, + data, + }, + ]; + return false; + } + } + validate36.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotRequest = validate37; +const schema22 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotRequest', + 'x-location': '#/components/schemas/Timeslot_request', + 'x-schema-type': 'request', +}; +function validate37( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate37.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema22.required, + parentSchema: schema22, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate37.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema22.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.Start.type, + parentSchema: schema22.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate37.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema22.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.End.type, + parentSchema: schema22.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate37.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema22.type, + parentSchema: schema22, + data, + }, + ]; + return false; + } + } + validate37.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotResponse = validate38; +const schema23 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotResponse', + 'x-location': '#/components/schemas/Timeslot_response', + 'x-schema-type': 'response', +}; +function validate38( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate38.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema23.required, + parentSchema: schema23, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate38.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema23.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.properties.Start.type, + parentSchema: schema23.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate38.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema23.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.properties.End.type, + parentSchema: schema23.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate38.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema23.type, + parentSchema: schema23, + data, + }, + ]; + return false; + } + } + validate38.errors = vErrors; + return errors === 0; +} +exports.validateIDRequest = validate39; +const schema24 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDRequest', + 'x-location': '#/components/parameters/ID/schema_request', + 'x-schema-type': 'request', +}; +function validate39( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate39.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema24.type, + parentSchema: schema24, + data, + }, + ]; + return false; + } + validate39.errors = vErrors; + return errors === 0; +} +exports.validateIDResponse = validate40; +const schema25 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDResponse', + 'x-location': '#/components/parameters/ID/schema_response', + 'x-schema-type': 'response', +}; +function validate40( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate40.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.type, + parentSchema: schema25, + data, + }, + ]; + return false; + } + validate40.errors = vErrors; + return errors === 0; +} +exports.validateScheduleBodyRequest = validate41; +const schema26 = { + type: 'object', + required: ['Experiment', 'Time'], + properties: { + Experiment: { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Combined: { + type: 'boolean', + description: + 'If true, show only one timetable per device instead of one for all available physical devices.', + }, + onlyOwn: { + type: 'boolean', + description: + '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleBodyRequest', + 'x-location': + '#/paths//schedule/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate41( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate41.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema26.required, + parentSchema: schema26, + data, + }, + ]; + return false; + } else { + if (data.Experiment !== undefined) { + let data0 = data.Experiment; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.Devices === undefined && (missing1 = 'Devices')) { + validate41.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema26.properties.Experiment.required, + parentSchema: schema26.properties.Experiment, + data: data0, + }, + ]; + return false; + } else { + if (data0.Devices !== undefined) { + let data1 = data0.Devices; + const _errs3 = errors; + if (errors === _errs3) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs5 = errors; + if (errors === _errs5) { + if ( + data2 && + typeof data2 == 'object' && + !Array.isArray(data2) + ) { + let missing2; + if (data2.ID === undefined && (missing2 = 'ID')) { + validate41.errors = [ + { + instancePath: + instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema26.properties.Experiment.properties.Devices + .items.required, + parentSchema: + schema26.properties.Experiment.properties.Devices + .items, + data: data2, + }, + ]; + return false; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate41.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema26.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema26.properties.Experiment.properties + .Devices.items.properties.ID.type, + parentSchema: + schema26.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema26.properties.Experiment.properties.Devices.items + .type, + parentSchema: + schema26.properties.Experiment.properties.Devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs5 === errors; + if (!valid2) { + break; + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Experiment/Devices', + schemaPath: '#/properties/Experiment/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema26.properties.Experiment.properties.Devices.type, + parentSchema: schema26.properties.Experiment.properties.Devices, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Description !== undefined) { + let data4 = data0.Description; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate41.errors = [ + { + instancePath: instancePath + '/Experiment/Description', + schemaPath: + '#/properties/Experiment/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema26.properties.Experiment.properties.Description.type, + parentSchema: + schema26.properties.Experiment.properties.Description, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.properties.Experiment.type, + parentSchema: schema26.properties.Experiment, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data5 = data.Time; + const _errs11 = errors; + if (errors === _errs11) { + if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { + let missing3; + if ( + (data5.Start === undefined && (missing3 = 'Start')) || + (data5.End === undefined && (missing3 = 'End')) + ) { + validate41.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema26.properties.Time.required, + parentSchema: schema26.properties.Time, + data: data5, + }, + ]; + return false; + } else { + if (data5.Start !== undefined) { + let data6 = data5.Start; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats2.validate(data6)) { + validate41.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema26.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.properties.Time.properties.Start.type, + parentSchema: schema26.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data5.End !== undefined) { + let data7 = data5.End; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats2.validate(data7)) { + validate41.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema26.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.properties.Time.properties.End.type, + parentSchema: schema26.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.properties.Time.type, + parentSchema: schema26.properties.Time, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Combined !== undefined) { + let data8 = data.Combined; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate41.errors = [ + { + instancePath: instancePath + '/Combined', + schemaPath: '#/properties/Combined/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema26.properties.Combined.type, + parentSchema: schema26.properties.Combined, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.onlyOwn !== undefined) { + let data9 = data.onlyOwn; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate41.errors = [ + { + instancePath: instancePath + '/onlyOwn', + schemaPath: '#/properties/onlyOwn/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema26.properties.onlyOwn.type, + parentSchema: schema26.properties.onlyOwn, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } else { + validate41.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.type, + parentSchema: schema26, + data, + }, + ]; + return false; + } + } + validate41.errors = vErrors; + return errors === 0; +} +exports.validateScheduleBodyResponse = validate42; +const schema27 = { + type: 'object', + required: ['Experiment', 'Time'], + properties: { + Experiment: { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Combined: { + type: 'boolean', + description: + 'If true, show only one timetable per device instead of one for all available physical devices.', + }, + onlyOwn: { + type: 'boolean', + description: + '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleBodyResponse', + 'x-location': + '#/paths//schedule/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate42( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate42.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema27.required, + parentSchema: schema27, + data, + }, + ]; + return false; + } else { + if (data.Experiment !== undefined) { + let data0 = data.Experiment; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.Devices === undefined && (missing1 = 'Devices')) { + validate42.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema27.properties.Experiment.required, + parentSchema: schema27.properties.Experiment, + data: data0, + }, + ]; + return false; + } else { + if (data0.Devices !== undefined) { + let data1 = data0.Devices; + const _errs3 = errors; + if (errors === _errs3) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs5 = errors; + if (errors === _errs5) { + if ( + data2 && + typeof data2 == 'object' && + !Array.isArray(data2) + ) { + let missing2; + if (data2.ID === undefined && (missing2 = 'ID')) { + validate42.errors = [ + { + instancePath: + instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema27.properties.Experiment.properties.Devices + .items.required, + parentSchema: + schema27.properties.Experiment.properties.Devices + .items, + data: data2, + }, + ]; + return false; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate42.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } else { + validate42.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.properties.Experiment.properties + .Devices.items.properties.ID.type, + parentSchema: + schema27.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } + } + } + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.properties.Experiment.properties.Devices.items + .type, + parentSchema: + schema27.properties.Experiment.properties.Devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs5 === errors; + if (!valid2) { + break; + } + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Experiment/Devices', + schemaPath: '#/properties/Experiment/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.properties.Experiment.properties.Devices.type, + parentSchema: schema27.properties.Experiment.properties.Devices, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Description !== undefined) { + let data4 = data0.Description; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate42.errors = [ + { + instancePath: instancePath + '/Experiment/Description', + schemaPath: + '#/properties/Experiment/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.properties.Experiment.properties.Description.type, + parentSchema: + schema27.properties.Experiment.properties.Description, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.properties.Experiment.type, + parentSchema: schema27.properties.Experiment, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data5 = data.Time; + const _errs11 = errors; + if (errors === _errs11) { + if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { + let missing3; + if ( + (data5.Start === undefined && (missing3 = 'Start')) || + (data5.End === undefined && (missing3 = 'End')) + ) { + validate42.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema27.properties.Time.required, + parentSchema: schema27.properties.Time, + data: data5, + }, + ]; + return false; + } else { + if (data5.Start !== undefined) { + let data6 = data5.Start; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats2.validate(data6)) { + validate42.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema27.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.properties.Time.properties.Start.type, + parentSchema: schema27.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data5.End !== undefined) { + let data7 = data5.End; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats2.validate(data7)) { + validate42.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema27.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.properties.Time.properties.End.type, + parentSchema: schema27.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.properties.Time.type, + parentSchema: schema27.properties.Time, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Combined !== undefined) { + let data8 = data.Combined; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate42.errors = [ + { + instancePath: instancePath + '/Combined', + schemaPath: '#/properties/Combined/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema27.properties.Combined.type, + parentSchema: schema27.properties.Combined, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.onlyOwn !== undefined) { + let data9 = data.onlyOwn; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate42.errors = [ + { + instancePath: instancePath + '/onlyOwn', + schemaPath: '#/properties/onlyOwn/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema27.properties.onlyOwn.type, + parentSchema: schema27.properties.onlyOwn, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } else { + validate42.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.type, + parentSchema: schema27, + data, + }, + ]; + return false; + } + } + validate42.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse200Request = validate43; +const schema28 = { + type: 'array', + items: { + type: 'object', + required: ['Device', 'Booked', 'Free'], + properties: { + Device: { type: 'string', description: 'ID of the device (or * if combined).' }, + Booked: { + type: 'array', + description: 'Array of booked times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + Free: { + type: 'array', + description: 'Array of free times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleResponse200Request', + 'x-location': + '#/paths//schedule/post/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate43( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Device === undefined && (missing0 = 'Device')) || + (data0.Booked === undefined && (missing0 = 'Booked')) || + (data0.Free === undefined && (missing0 = 'Free')) + ) { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema28.items.required, + parentSchema: schema28.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Device !== undefined) { + let data1 = data0.Device; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Device', + schemaPath: '#/items/properties/Device/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema28.items.properties.Device.type, + parentSchema: schema28.items.properties.Device, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Booked !== undefined) { + let data2 = data0.Booked; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len1 = data2.length; + for (let i1 = 0; i1 < len1; i1++) { + let data3 = data2[i1]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.Start === undefined && (missing1 = 'Start')) || + (data3.End === undefined && (missing1 = 'End')) + ) { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema28.items.properties.Booked.items.required, + parentSchema: schema28.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema28.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema28.items.properties.Booked.items + .properties.Start.type, + parentSchema: + schema28.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema28.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema28.items.properties.Booked.items + .properties.End.type, + parentSchema: + schema28.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema28.items.properties.Booked.items.type, + parentSchema: schema28.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked', + schemaPath: '#/items/properties/Booked/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema28.items.properties.Booked.type, + parentSchema: schema28.items.properties.Booked, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Free !== undefined) { + let data6 = data0.Free; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid4 = true; + const len2 = data6.length; + for (let i2 = 0; i2 < len2; i2++) { + let data7 = data6[i2]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if ( + (data7.Start === undefined && (missing2 = 'Start')) || + (data7.End === undefined && (missing2 = 'End')) + ) { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema28.items.properties.Free.items.required, + parentSchema: schema28.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.Start !== undefined) { + let data8 = data7.Start; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats2.validate(data8)) { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema28.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema28.items.properties.Free.items + .properties.Start.type, + parentSchema: + schema28.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } + } + var valid5 = _errs17 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data7.End !== undefined) { + let data9 = data7.End; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats2.validate(data9)) { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema28.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema28.items.properties.Free.items + .properties.End.type, + parentSchema: + schema28.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } + } + var valid5 = _errs19 === errors; + } else { + var valid5 = true; + } + } + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema28.items.properties.Free.items.type, + parentSchema: schema28.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } + } + var valid4 = _errs15 === errors; + if (!valid4) { + break; + } + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free', + schemaPath: '#/items/properties/Free/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema28.items.properties.Free.type, + parentSchema: schema28.items.properties.Free, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema28.items.type, + parentSchema: schema28.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate43.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema28.type, + parentSchema: schema28, + data, + }, + ]; + return false; + } + } + validate43.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse200Response = validate44; +const schema29 = { + type: 'array', + items: { + type: 'object', + required: ['Device', 'Booked', 'Free'], + properties: { + Device: { type: 'string', description: 'ID of the device (or * if combined).' }, + Booked: { + type: 'array', + description: 'Array of booked times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + Free: { + type: 'array', + description: 'Array of free times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleResponse200Response', + 'x-location': + '#/paths//schedule/post/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate44( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Device === undefined && (missing0 = 'Device')) || + (data0.Booked === undefined && (missing0 = 'Booked')) || + (data0.Free === undefined && (missing0 = 'Free')) + ) { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema29.items.required, + parentSchema: schema29.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Device !== undefined) { + let data1 = data0.Device; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Device', + schemaPath: '#/items/properties/Device/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema29.items.properties.Device.type, + parentSchema: schema29.items.properties.Device, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Booked !== undefined) { + let data2 = data0.Booked; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len1 = data2.length; + for (let i1 = 0; i1 < len1; i1++) { + let data3 = data2[i1]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.Start === undefined && (missing1 = 'Start')) || + (data3.End === undefined && (missing1 = 'End')) + ) { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema29.items.properties.Booked.items.required, + parentSchema: schema29.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema29.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema29.items.properties.Booked.items + .properties.Start.type, + parentSchema: + schema29.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema29.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema29.items.properties.Booked.items + .properties.End.type, + parentSchema: + schema29.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema29.items.properties.Booked.items.type, + parentSchema: schema29.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked', + schemaPath: '#/items/properties/Booked/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema29.items.properties.Booked.type, + parentSchema: schema29.items.properties.Booked, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Free !== undefined) { + let data6 = data0.Free; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid4 = true; + const len2 = data6.length; + for (let i2 = 0; i2 < len2; i2++) { + let data7 = data6[i2]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if ( + (data7.Start === undefined && (missing2 = 'Start')) || + (data7.End === undefined && (missing2 = 'End')) + ) { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema29.items.properties.Free.items.required, + parentSchema: schema29.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.Start !== undefined) { + let data8 = data7.Start; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats2.validate(data8)) { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema29.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } else { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema29.items.properties.Free.items + .properties.Start.type, + parentSchema: + schema29.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } + } + var valid5 = _errs17 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data7.End !== undefined) { + let data9 = data7.End; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats2.validate(data9)) { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema29.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } else { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema29.items.properties.Free.items + .properties.End.type, + parentSchema: + schema29.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } + } + var valid5 = _errs19 === errors; + } else { + var valid5 = true; + } + } + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema29.items.properties.Free.items.type, + parentSchema: schema29.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } + } + var valid4 = _errs15 === errors; + if (!valid4) { + break; + } + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free', + schemaPath: '#/items/properties/Free/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema29.items.properties.Free.type, + parentSchema: schema29.items.properties.Free, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema29.items.type, + parentSchema: schema29.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate44.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema29.type, + parentSchema: schema29, + data, + }, + ]; + return false; + } + } + validate44.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse404Request = validate45; +const schema30 = { + type: 'string', + description: 'First unknown device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse404Request', + 'x-location': + '#/paths//schedule/post/responses/404/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate45( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate45.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema30.type, + parentSchema: schema30, + data, + }, + ]; + return false; + } + validate45.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse404Response = validate46; +const schema31 = { + type: 'string', + description: 'First unknown device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse404Response', + 'x-location': + '#/paths//schedule/post/responses/404/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate46( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate46.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.type, + parentSchema: schema31, + data, + }, + ]; + return false; + } + validate46.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse422Request = validate47; +const schema32 = { + type: 'string', + description: 'First virtual device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse422Request', + 'x-location': + '#/paths//schedule/post/responses/422/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate47( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate47.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.type, + parentSchema: schema32, + data, + }, + ]; + return false; + } + validate47.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse422Response = validate48; +const schema33 = { + type: 'string', + description: 'First virtual device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse422Response', + 'x-location': + '#/paths//schedule/post/responses/422/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate48( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate48.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema33.type, + parentSchema: schema33, + data, + }, + ]; + return false; + } + validate48.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse500Request = validate49; +const schema34 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'scheduleResponse500Request', + 'x-location': + '#/paths//schedule/post/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate49( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate49.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema34.type, + parentSchema: schema34, + data, + }, + ]; + return false; + } + validate49.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse500Response = validate50; +const schema35 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'scheduleResponse500Response', + 'x-location': + '#/paths//schedule/post/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate50( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate50.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema35.type, + parentSchema: schema35, + data, + }, + ]; + return false; + } + validate50.errors = vErrors; + return errors === 0; +} diff --git a/services/booking/src/common/src/clients/schedule-service/basicValidation.d.cts b/services/booking/src/common/src/clients/schedule-service/basicValidation.d.cts new file mode 100644 index 00000000..2a3299fc --- /dev/null +++ b/services/booking/src/common/src/clients/schedule-service/basicValidation.d.cts @@ -0,0 +1,119 @@ +export declare function validateBooking( + object: unknown, +): Booking; + +export declare function validateDevice( + object: unknown, +): Device; + +export declare function validateExperiment( + object: unknown, +): Experiment; + +export declare function validateTimeslot( + object: unknown, +): Timeslot; + +export declare function validateID( + object: unknown, +): ID; + +export declare function validateScheduleBody( + object: unknown, +): scheduleBody; + +export declare function validateScheduleResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse200; + +export declare function validateScheduleResponse404< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse404; + +export declare function validateScheduleResponse422< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse422; + +export declare function validateScheduleResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse500; + +export declare function validateBookingRequest( + object: unknown, +): BookingRequest; + +export declare function validateBookingResponse( + object: unknown, +): BookingResponse; + +export declare function validateDeviceRequest( + object: unknown, +): DeviceRequest; + +export declare function validateDeviceResponse( + object: unknown, +): DeviceResponse; + +export declare function validateExperimentRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentRequest; + +export declare function validateExperimentResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentResponse; + +export declare function validateTimeslotRequest( + object: unknown, +): TimeslotRequest; + +export declare function validateTimeslotResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): TimeslotResponse; + +export declare function validateIDRequest( + object: unknown, +): IDRequest; + +export declare function validateIDResponse( + object: unknown, +): IDResponse; + +export declare function validateScheduleBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleBodyRequest; + +export declare function validateScheduleBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleBodyResponse; + +export declare function validateScheduleResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse200Request; + +export declare function validateScheduleResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse200Response; + +export declare function validateScheduleResponse404Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse404Request; + +export declare function validateScheduleResponse404Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse404Response; + +export declare function validateScheduleResponse422Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse422Request; + +export declare function validateScheduleResponse422Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse422Response; + +export declare function validateScheduleResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse500Request; + +export declare function validateScheduleResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse500Response; diff --git a/services/booking/src/common/src/clients/schedule-service/client.ts b/services/booking/src/common/src/clients/schedule-service/client.ts new file mode 100644 index 00000000..774831bd --- /dev/null +++ b/services/booking/src/common/src/clients/schedule-service/client.ts @@ -0,0 +1,305 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; + +import * as RequestValidation from './requestValidation.js'; +import * as Signatures from './signatures.js'; +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * This error class should be used if an error occurs during validation of a request/response. + * @category Errors + */ +export class ValidationError extends Error { + public errors: unknown; + + constructor(message: string, errors: unknown) { + super(message); + this.name = 'ValidationError'; + this.errors = errors; + } +} + +/** + * This error class should be used if an error occurs while fetching a request. + * @category Errors + */ +export class FetchError extends Error { + constructor(message: string) { + super(message); + this.name = 'FetchError'; + } +} + +/** + * This error class should be used if the response of the server has a status + * greater than or equal to 400. This error should contain the validated response. + * @category Errors + */ +export class UnsuccessfulRequestError extends Error { + public response: Types.ResponseData; + + constructor(message: string, response: Types.ResponseData) { + super(message); + this.response = response; + this.name = 'UnsuccessfulRequestError'; + } +} + +/** + * This error class should be used if the validation of an url fails. + * @category Errors + */ +export class InvalidUrlError extends Error { + constructor(message: string) { + super(message); + this.name = 'InvalidUrlError'; + } +} + +/** + * This function attempts to parse a Response as ResponseData. + */ +async function parseResponse(response: Response): Promise { + let text = null; + try { + text = await response.text(); + const json = JSON.parse(text); + return { status: response.status, body: json }; + } catch { + return { status: response.status, body: text }; + } +} + +/** + * This function checks if a string is a valid http url. + * @param string The string to be checked. + * @returns True if the string is a valid http url. + */ +function isValidHttpUrl(string: string) { + let url; + + try { + url = new URL(string); + } catch (_) { + return false; + } + + return url.protocol === 'http:' || url.protocol === 'https:'; +} + +/** + * This function takes an url and a pattern for the requested endpoint and parses the contained path parameters. + * @param url The url to be parsed. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the provided url does not end with the provided endpoint. + * @returns An array containing all parsed path parameters in order of appearance. + * @example + * // returns ["username", "role_name"] + * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function parsePathParameters(url: string, endpoint: string): string[] { + const parameterRegex = '([a-zA-Z0-9-:]+)'; + const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); + const matches = url.match(regex); + + if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint'); + + return matches.slice(1); +} + +/** + * This function validates a given http url and parses its path parameters. + * @param url The url to be validated. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the validation of the provided url fails. + * @returns An array containing all parsed path parameters in order of appearance (see {@link parsePathParameters}). + * @example + * // returns ["username", "role_name"] + * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { + if (!isValidHttpUrl(url)) + throw new InvalidUrlError('Provided url is not a valid http url'); + if (!url.startsWith(baseUrl)) + throw new InvalidUrlError('Provided url does not start with the provided base url'); + const pathParameters = parsePathParameters(url, endpoint); + + let extendedBaseUrl = baseUrl + endpoint; + + pathParameters.forEach(pathParameter => { + extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); + }); + + if (url !== extendedBaseUrl) + throw new InvalidUrlError('Provided url does not match extended base url'); + + return pathParameters; +} + +/** + * This function appends a given endpoint to an url. + * @param url The url to append the endpoint to. + * @param endpoint The endpoint to be appended. + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id", "/token") + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id/", "/token") + * @returns The url with the appended endpoint. + */ +function appendToUrl(url: string, endpoint: string) { + return url.endsWith('/') ? `${url.slice(0, -1)}${endpoint}` : `${url}${endpoint}`; +} + +/** + * Client for the use of the Crosslab API + * @category Client + */ +export class Client { + public readonly baseUrl: string; + public readonly serviceUrl: string; + public accessToken: string; + private fixedHeaders: [string, string][]; + private fetch = async (url: RequestInfo | URL, init: RequestInit) => { + let raw_response; + try { + if ( + url.toString().startsWith(this.baseUrl) || + url.toString().startsWith(this.serviceUrl) + ) { + raw_response = await fetch(url, init); + } else { + raw_response = await fetch( + appendToUrl( + this.baseUrl, + '/proxy?' + new URLSearchParams([['URL', url.toString()]]).toString(), + ), + init, + ); + } + } catch (error) { + if (error instanceof Error) { + throw new FetchError(error.message); + } else if (typeof error === 'string') { + throw new FetchError(error); + } else { + throw new FetchError('Something went wrong while trying to fetch the request'); + } + } + return await parseResponse(raw_response); + }; + + /** + * @category Constructors + */ + constructor( + baseUrl: string, + options: { + serviceUrl?: string; + accessToken?: string; + fixedHeaders?: [string, string][]; + }, + ) { + this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; + this.serviceUrl = options.serviceUrl + ? options.serviceUrl.endsWith('/') + ? options.serviceUrl.slice(0, -1) + : options.serviceUrl + : this.baseUrl; + this.accessToken = options.accessToken ?? ''; + this.fixedHeaders = options.fixedHeaders ?? []; + } + + /** + * Returns the free / booked times for given experiment. + * + * @param body + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * Timetable of free/booked time. If 'Combined' is set to true, an array with only one entry is returned containing the combined timetable. + */ + public async schedule( + body: + | { + /** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ + Experiment: Types.Experiment<'request'>; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * If true, show only one timetable per device instead of one for all available physical devices. + */ + Combined?: boolean; + /** + * (private) Show only devices of this institution. Give an error if a device of an other institution is requested. + */ + onlyOwn?: boolean; + [k: string]: unknown; + } + | undefined, + options?: { + headers?: [string, string][]; + url?: string; + }, + ): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/schedule'); + + if (!RequestValidation.validateScheduleInput(body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateScheduleInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }); + + if (!RequestValidation.validateScheduleOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateScheduleOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } +} diff --git a/services/booking/src/common/src/clients/schedule-service/requestValidation.ts b/services/booking/src/common/src/clients/schedule-service/requestValidation.ts new file mode 100644 index 00000000..8803e553 --- /dev/null +++ b/services/booking/src/common/src/clients/schedule-service/requestValidation.ts @@ -0,0 +1,100 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as BasicValidation from './basicValidation.cjs'; +import * as Signatures from './signatures.js'; +import { FunctionWithErrors, ResponseData } from './types.js'; + +/** + * This function validates the inputs to schedule() + */ +export function validateScheduleInput(body: Signatures.ScheduleBody) { + if (body === undefined) { + return true; + } + + if (!BasicValidation.validateScheduleBodyRequest(body)) { + (validateScheduleInput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of schedule() + */ +export function validateScheduleOutput( + response: ResponseData, +): response is Signatures.ScheduleResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateScheduleResponse200Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + if (!BasicValidation.validateScheduleResponse404Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse404Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 422) { + if (!BasicValidation.validateScheduleResponse422Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse422Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateScheduleResponse500Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + (validateScheduleOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; +} diff --git a/services/booking/src/common/src/clients/schedule-service/signatures.ts b/services/booking/src/common/src/clients/schedule-service/signatures.ts new file mode 100644 index 00000000..32de25f3 --- /dev/null +++ b/services/booking/src/common/src/clients/schedule-service/signatures.ts @@ -0,0 +1,173 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * Typing for the body of the request made by schedule() + * @category schedule() + */ +export type ScheduleBody = + | { + /** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ + Experiment: Types.Experiment<'request'>; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * If true, show only one timetable per device instead of one for all available physical devices. + */ + Combined?: boolean; + /** + * (private) Show only devices of this institution. Give an error if a device of an other institution is requested. + */ + onlyOwn?: boolean; + [k: string]: unknown; + } + | undefined; + +/** + * Typing for all possible responses to the request made by schedule() + * @category schedule() + */ +export type ScheduleResponse = ScheduleSuccessResponse | ScheduleErrorResponse; + +/** + * Typing for all successful responses to the request made by schedule() + * @category schedule() + */ +export type ScheduleSuccessResponse = ScheduleResponse200; + +/** + * Typing for all error responses to the request made by schedule() + * @category schedule() + */ +export type ScheduleErrorResponse = + | ScheduleResponse400 + | ScheduleResponse401 + | ScheduleResponse403 + | ScheduleResponse404 + | ScheduleResponse422 + | ScheduleResponse500 + | ScheduleResponse503; + +/** + * Typing for a response with status 200 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + /** + * ID of the device (or * if combined). + */ + Device: string; + /** + * Array of booked times. + */ + Booked: Types.Timeslot<'response'>[]; + /** + * Array of free times. + */ + Free: Types.Timeslot<'response'>[]; + [k: string]: unknown; + }[]; +} + +/** + * Typing for a response with status 400 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 422 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse422 extends Types.ErrorResponse { + status: 422; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 500 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} diff --git a/services/booking/src/common/src/clients/schedule-service/types.ts b/services/booking/src/common/src/clients/schedule-service/types.ts new file mode 100644 index 00000000..8d0b0be8 --- /dev/null +++ b/services/booking/src/common/src/clients/schedule-service/types.ts @@ -0,0 +1,410 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as _BasicValidation from './basicValidation.cjs'; + +/** + * @internal + */ +export interface FunctionWithErrors { + (...args: unknown[]): unknown; + errors?: unknown; +} + +/** + * @internal + */ +export interface RequestInfo { + method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'OPTIONS' | 'PATCH' | 'HEAD'; + body?: string; + headers?: [string, string][]; +} + +/** + * @internal + */ +export type FetchFunction = ( + url: string, + info?: RequestInfo, +) => Promise | ResponseData; + +export interface ResponseData { + status: number; + headers?: { + [key: string]: string | undefined; + }; + body?: unknown; +} + +export interface SuccessResponse extends ResponseData { + success?: true; +} + +export interface ErrorResponse extends ResponseData { + success?: false; +} + +/** + * @internal + */ +export function isSuccessResponse(response: ResponseData): response is SuccessResponse { + return response.status < 400; +} + +/** + * @internal + */ +export function isErrorResponse(response: ResponseData): response is ErrorResponse { + return response.status >= 400; +} + +/** + * This type allows to pick the required properties of another type. + */ +export type Require = Partial & { + [Property in Key]-?: Type[Property]; +}; + +export type SizedTuple< + T, + MIN extends number | undefined = undefined, + MAX extends number | undefined = undefined, +> = MIN extends number + ? MAX extends number + ? _SizedTuple> + : TupleObject> & T[] + : MAX extends number + ? _SizedTuple, true> + : T[]; + +type _SizedTuple = ARR extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? Tuple | _SizedTuple + : never; + +type Tuple = _Tuple< + T, + NumericRangeTuple +>; + +type _Tuple = N extends [ + infer HEAD, + ...infer TAIL extends number[], +] + ? HEAD extends 0 + ? [] | _Tuple + : [T, ..._Tuple] + : []; + +type TupleObject = N extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? TAIL extends [] + ? Record + : { [P in HEAD]: T } & TupleObject + : Record; + +export type NumericRange< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number = never, +> = ARR['length'] extends END + ? ACC | START | END + : NumericRange< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : ACC | ARR['length'] + >; + +type NumericRangeTuple< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number[] = [], +> = ARR['length'] extends END + ? [START, ...ACC, END] + : NumericRangeTuple< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : [...ACC, ARR['length']] + >; + +/** + * A booking in the booking system. + */ +export type Booking = T extends 'all' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : never; + +/** + * A device might either be a physical/virtual device or a group of device. + */ +export type Device = T extends 'all' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : never; + +/** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ +export type Experiment = T extends 'all' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'request'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'response'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : never; + +/** + * A time slot represents a slice of time used for bookings. + */ +export type Timeslot = T extends 'all' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : never; diff --git a/services/booking/src/common/src/config.ts b/services/booking/src/common/src/config.ts index 85fdaf99..731c88d7 100644 --- a/services/booking/src/common/src/config.ts +++ b/services/booking/src/common/src/config.ts @@ -11,4 +11,9 @@ export const baseConfig = { OwnURL: 'http://localhost', InstitutePrefix: ['http://localhost'], AmqpUrl: 'amqp://localhost:5672/', + BASE_URL: process.env.BASE_URL ?? 'http://localhost', + DEVICE_SERVICE_URL: process.env.DEVICE_SERVICE_URL ?? 'http://localhost:3001', + BOOKING_FRONTEND_URL: process.env.BOOKING_FRONTEND_URL ?? 'http://localhost:3004', + BOOKING_BACKEND_URL: process.env.BOOKING_BACKEND_URL ?? 'http://localhost:3005', + SCHEDULE_SERVICE_URL: process.env.SCHEDULE_SERVICE_URL ?? 'http://localhost:3006', }; diff --git a/services/booking/src/common/src/index.ts b/services/booking/src/common/src/index.ts index 0092b2b2..4a2fb1f1 100644 --- a/services/booking/src/common/src/index.ts +++ b/services/booking/src/common/src/index.ts @@ -1,3 +1,4 @@ -export * from './auth'; -export * from './config'; -export * from './sleep'; +export * from './auth.js'; +export * from './config.js'; +export * from './sleep.js'; +export * from './clients/index.js'; diff --git a/services/booking/src/common/tsconfig.json b/services/booking/src/common/tsconfig.json index e807d467..13bcd3bf 100644 --- a/services/booking/src/common/tsconfig.json +++ b/services/booking/src/common/tsconfig.json @@ -1,13 +1,25 @@ { "compilerOptions": { - "module": "commonjs", - "moduleResolution": "Node", - "target": "ES2020", + "module": "Node16", + "moduleResolution": "Node16", + "allowSyntheticDefaultImports": true, + "target": "ES2022", + "lib": ["ES2022"], + "esModuleInterop": true, "outDir": "lib", "rootDir": "src", - "declaration": true, - "declarationMap": true, + "strict": true, + "noImplicitAny": true, + // "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, "sourceMap": true, - "esModuleInterop": true - } + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "skipLibCheck": true, + "declaration": true, + "declarationMap": true + }, + "include": ["src"] } diff --git a/services/booking/src/device-reservation/Dockerfile b/services/booking/src/device-reservation/Dockerfile new file mode 100644 index 00000000..e3d1b7eb --- /dev/null +++ b/services/booking/src/device-reservation/Dockerfile @@ -0,0 +1,15 @@ +# Build Image +FROM node:lts-alpine AS build +WORKDIR /tmp +COPY .packages /tmp/packages +RUN npm install --global /tmp/packages/* +RUN rm -rf /tmp/packages + +RUN apk add dumb-init +WORKDIR /app +RUN mkdir db +RUN chown node:node /app/* +USER node + +ENV NODE_ENV production +CMD ["dumb-init", "crosslab-device-reservation"] \ No newline at end of file diff --git a/services/booking/src/device-reservation/package-lock.json b/services/booking/src/device-reservation/package-lock.json index ec61f6f2..82460c77 100644 --- a/services/booking/src/device-reservation/package-lock.json +++ b/services/booking/src/device-reservation/package-lock.json @@ -18,15 +18,20 @@ "mysql2": "^3.6.0", "typescript": "^5.2.2" }, + "bin": { + "crosslab-device-reservation": "app/index.js" + }, "devDependencies": { "@types/mocha": "^10.0.0", "c8": "^10.1.0", "mocha": "^10.0.0", "mocha-suppress-logs": "^0.5.1", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3" } }, "../common": { + "name": "@crosslab/booking-service-common", "version": "0.0.1", "license": "Apache-2.0", "dependencies": { @@ -579,6 +584,44 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/async-mutex": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.5.0.tgz", @@ -587,6 +630,21 @@ "tslib": "^2.4.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -670,6 +728,25 @@ } } }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -758,6 +835,12 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -783,6 +866,57 @@ "node": ">= 8" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/dayjs": { "version": "1.11.11", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", @@ -816,6 +950,40 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/denque": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", @@ -845,6 +1013,139 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -899,6 +1200,15 @@ "flat": "cli.js" } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/foreground-child": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz", @@ -935,6 +1245,42 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/generate-function": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", @@ -952,6 +1298,42 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -992,6 +1374,49 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -1000,6 +1425,69 @@ "node": ">=4" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -1009,6 +1497,12 @@ "he": "bin/he" } }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -1042,6 +1536,54 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -1054,23 +1596,96 @@ "node": ">=8" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "engines": { - "node": ">=8" - } + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } }, "node_modules/is-glob": { "version": "4.0.3", @@ -1084,6 +1699,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -1093,6 +1720,21 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -1107,6 +1749,82 @@ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -1119,6 +1837,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -1238,6 +1968,27 @@ "node": ">=4" } }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -1372,6 +2123,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -1582,6 +2342,33 @@ "node": ">=12" } }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -1591,6 +2378,159 @@ "node": ">=0.10.0" } }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm-run-all/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm-run-all/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/npm-run-all/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm-run-all/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/npm-run-all/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1630,6 +2570,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -1648,6 +2601,12 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", @@ -1673,6 +2632,18 @@ "node": "14 || >=16.14" } }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", @@ -1690,6 +2661,36 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/prettier": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", @@ -1718,6 +2719,20 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/readable-stream": { "version": "1.1.14", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", @@ -1741,6 +2756,24 @@ "node": ">=8.10.0" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1755,11 +2788,69 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -1791,6 +2882,38 @@ "randombytes": "^2.1.0" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -1812,6 +2935,33 @@ "node": ">=8" } }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", @@ -1832,6 +2982,38 @@ "node": ">=0.10.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true + }, "node_modules/sqlstring": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", @@ -1874,6 +3056,73 @@ "node": ">=8" } }, + "node_modules/string.prototype.padend": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz", + "integrity": "sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -1899,6 +3148,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -1922,6 +3180,18 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/test-exclude": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", @@ -1998,6 +3268,79 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript": { "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", @@ -2010,6 +3353,21 @@ "node": ">=14.17" } }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -2038,6 +3396,16 @@ "node": ">=10.12.0" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -2053,6 +3421,41 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", diff --git a/services/booking/src/device-reservation/package.json b/services/booking/src/device-reservation/package.json index cff00ff6..b2f41b72 100644 --- a/services/booking/src/device-reservation/package.json +++ b/services/booking/src/device-reservation/package.json @@ -1,11 +1,21 @@ { + "type": "module", "name": "@crosslab/service-device-reservation", "version": "0.1.0", "description": "Part of booking service. Responsible for low level device reservation.", "main": "app/index.js", + "dockerName": "device-reservation", + "bin": { + "crosslab-device-reservation": "./app/index.js" + }, + "files": [ + "app" + ], "scripts": { "test": "npm run build && npx c8 --include=\"app/mainLoop.js\" --include=\"app/messageDefinition.js\" mocha --require mocha-suppress-logs --exit app/*_test.js", - "build": "npx tsc", + "build:compile": "npx tsc", + "build:add-shebang": "bash scripts/add-shebang.sh", + "build": "npm-run-all build:*", "start": "npm run build && node app/index.js", "format": "prettier . --write", "lint": "eslint ." @@ -27,6 +37,7 @@ "c8": "^10.1.0", "mocha": "^10.0.0", "mocha-suppress-logs": "^0.5.1", - "prettier": "^3.0.3" + "prettier": "^3.0.3", + "npm-run-all": "^4.1.5" } } diff --git a/services/booking/src/device-reservation/scripts/add-shebang.sh b/services/booking/src/device-reservation/scripts/add-shebang.sh new file mode 120000 index 00000000..1a5fdd47 --- /dev/null +++ b/services/booking/src/device-reservation/scripts/add-shebang.sh @@ -0,0 +1 @@ +../../../../../common/node/scripts/add-shebang.sh \ No newline at end of file diff --git a/services/booking/src/device-reservation/scripts/build-docker.sh b/services/booking/src/device-reservation/scripts/build-docker.sh new file mode 120000 index 00000000..31019032 --- /dev/null +++ b/services/booking/src/device-reservation/scripts/build-docker.sh @@ -0,0 +1 @@ +../../../../../common/docker/scripts/build-node.sh \ No newline at end of file diff --git a/services/booking/src/device-reservation/scripts/test.sh b/services/booking/src/device-reservation/scripts/test.sh new file mode 100755 index 00000000..2e5b18b7 --- /dev/null +++ b/services/booking/src/device-reservation/scripts/test.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +npm ci +npm test \ No newline at end of file diff --git a/services/booking/src/device-reservation/src/index.ts b/services/booking/src/device-reservation/src/index.ts index 0be3ade1..b05d15dd 100644 --- a/services/booking/src/device-reservation/src/index.ts +++ b/services/booking/src/device-reservation/src/index.ts @@ -1,9 +1,13 @@ -import { mainLoop } from './mainLoop'; +import { fileURLToPath } from 'url'; -export * from './mainLoop'; -export * from './messageDefinition'; -export * from './config'; +import { mainLoop } from './mainLoop.js'; -console.log('Starting reservation service'); +export * from './mainLoop.js'; +export * from './messageDefinition.js'; +export * from './config.js'; -if (require.main === module) mainLoop(); +if (process.argv[1] === fileURLToPath(import.meta.url)) { + console.log('Starting reservation service'); + + mainLoop(); +} diff --git a/services/booking/src/device-reservation/src/mainLoop.ts b/services/booking/src/device-reservation/src/mainLoop.ts index 9b1969f6..019c1b72 100644 --- a/services/booking/src/device-reservation/src/mainLoop.ts +++ b/services/booking/src/device-reservation/src/mainLoop.ts @@ -4,14 +4,13 @@ import { Mutex, withTimeout } from 'async-mutex'; import * as crypto from 'crypto'; import * as mysql from 'mysql2/promise'; -import { config } from './config'; - +import { config } from './config.js'; import { ErrorTimeoutText, ReservationAnswer, ReservationMessage, ReservationRequest, -} from './messageDefinition'; +} from './messageDefinition.js'; (BigInt.prototype as any).toJSON = function () { return this.toString(); @@ -307,7 +306,7 @@ export async function mainLoop(): Promise { break; } } catch (error) { - console.log("Can not process request: " + error); + console.log('Can not process request: ' + error); // Do not jump out here, always send an answer to caller answer = { Type: data.Type, @@ -359,6 +358,7 @@ export async function mainLoop(): Promise { } catch (err) { console.log(err); console.log('Reconnecting...'); + await sleep(1000); } } } diff --git a/services/booking/src/device-reservation/src/mainLoop_test.ts b/services/booking/src/device-reservation/src/mainLoop_test.ts index 28d94cb7..54f4b644 100644 --- a/services/booking/src/device-reservation/src/mainLoop_test.ts +++ b/services/booking/src/device-reservation/src/mainLoop_test.ts @@ -3,15 +3,15 @@ import * as amqplib from 'amqplib'; import dayjs from 'dayjs'; import * as mocha from 'mocha'; import * as mysql from 'mysql2/promise'; -import { config } from './config'; -import { mainLoop } from './mainLoop'; +import { config } from './config.js'; +import { mainLoop } from './mainLoop.js'; import { ErrorTimeoutText, ReservationAnswer, ReservationMessage, ReservationRequest, -} from './messageDefinition'; +} from './messageDefinition.js'; let connection: amqplib.Connection; let channel: amqplib.Channel; @@ -84,9 +84,9 @@ mocha.describe('mainLoop.ts', function () { }); // Drain queues - while (await channel.get(receiveQueue, { noAck: true })) { } + while (await channel.get(receiveQueue, { noAck: true })) {} - while (await channel.get(sendQueue, { noAck: true })) { } + while (await channel.get(sendQueue, { noAck: true })) {} mainLoop(); await sleep(1000); @@ -564,7 +564,6 @@ mocha.describe('mainLoop.ts', function () { } }); - mocha.it('mainLoop.ts get missing values', async () => { let m = new ReservationMessage(ReservationRequest.Get, receiveQueue); diff --git a/services/booking/src/device-reservation/src/messageDefinition.ts b/services/booking/src/device-reservation/src/messageDefinition.ts index 1c7facfa..2ded2d54 100644 --- a/services/booking/src/device-reservation/src/messageDefinition.ts +++ b/services/booking/src/device-reservation/src/messageDefinition.ts @@ -1,5 +1,5 @@ import dayjs from 'dayjs'; -import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'; +import isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js'; export const ErrorTimeoutText = 'Operation timed out, please retry later'; diff --git a/services/booking/src/device-reservation/src/messageDefinition_test.ts b/services/booking/src/device-reservation/src/messageDefinition_test.ts index cae72755..d3731e0e 100644 --- a/services/booking/src/device-reservation/src/messageDefinition_test.ts +++ b/services/booking/src/device-reservation/src/messageDefinition_test.ts @@ -5,7 +5,7 @@ import { ReservationAnswer, ReservationMessage, ReservationRequest, -} from './messageDefinition'; +} from './messageDefinition.js'; (BigInt.prototype as any).toJSON = function () { return this.toString(); diff --git a/services/booking/src/device-reservation/tsconfig.json b/services/booking/src/device-reservation/tsconfig.json index 61b5acc3..a61a2361 100644 --- a/services/booking/src/device-reservation/tsconfig.json +++ b/services/booking/src/device-reservation/tsconfig.json @@ -1,13 +1,24 @@ { "compilerOptions": { - "module": "commonjs", - "moduleResolution": "Node", - "target": "ES2020", + "module": "Node16", + "moduleResolution": "Node16", + "allowSyntheticDefaultImports": true, + "target": "ES2022", + "lib": ["ES2022"], + "esModuleInterop": true, "outDir": "app", "rootDir": "src", - "declaration": true, - "declarationMap": true, + "noImplicitAny": true, + // "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, "sourceMap": true, - "esModuleInterop": true - } + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "skipLibCheck": true, + "declarationMap": true, + "declaration": true + }, + "include": ["src"] } diff --git a/services/booking/src/schedule-service/.env-cmdrc b/services/booking/src/schedule-service/.env-cmdrc index 88810370..a1f80d1e 100644 --- a/services/booking/src/schedule-service/.env-cmdrc +++ b/services/booking/src/schedule-service/.env-cmdrc @@ -1,9 +1,7 @@ { - "development": { - "SECURITY_ISSUER": "http://localhost", - "SECURITY_AUDIENCE": "http://localhost", - "BASE_URL": "http://localhost", - "PORT": "3000", - "API_TOKEN": "booking-service-dev-token" - } -} \ No newline at end of file + "development": { + "BASE_URL": "http://localhost:10801", + "DEVICE_SERVICE_URL": "http://localhost:10801", + "PORT": "10801" + } +} diff --git a/services/booking/src/schedule-service/Dockerfile b/services/booking/src/schedule-service/Dockerfile new file mode 100644 index 00000000..af68a9b1 --- /dev/null +++ b/services/booking/src/schedule-service/Dockerfile @@ -0,0 +1,17 @@ +# Build Image +FROM node:lts-alpine AS build +WORKDIR /tmp +COPY .packages /tmp/packages +RUN npm install --global /tmp/packages/* +RUN rm -rf /tmp/packages + +RUN apk add dumb-init +WORKDIR /app +RUN mkdir db +RUN chown node:node /app/* +USER node + +ENV NODE_ENV production +ENV PORT 3006 +EXPOSE 3006/tcp +CMD ["dumb-init", "crosslab-schedule-service"] \ No newline at end of file diff --git a/services/booking/src/schedule-service/package-lock.json b/services/booking/src/schedule-service/package-lock.json index 426eed99..333cb27a 100644 --- a/services/booking/src/schedule-service/package-lock.json +++ b/services/booking/src/schedule-service/package-lock.json @@ -12,9 +12,9 @@ "@cross-lab-project/api-client": "file:../../../../clients/api/js", "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", - "@cross-lab-project/service-common": "file:../../../common", "@crosslab/booking-service-common": "file:../common", "@crosslab/booking-service-test-common": "file:../test_common", + "@crosslab/service-common": "file:../../../common", "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/express": "^4.17.13", "@types/lodash": "^4.14.198", @@ -25,11 +25,15 @@ "mysql2": "^3.6.0", "typescript": "^5.2.2" }, + "bin": { + "crosslab-schedule-service": "app/index.js" + }, "devDependencies": { "@types/mocha": "^10.0.0", "c8": "^10.1.0", "env-cmd": "^10.1.0", "mocha": "^10.0.0", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3" } }, @@ -150,10 +154,19 @@ "version": "0.0.1", "license": "Apache-2.0", "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0" + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/express": "^4.17.13", + "ajv-formats": "^3.0.1", + "express": "^4.18.1", + "node-fetch": "^3.3.2" }, "devDependencies": { + "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", + "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", + "@types/express": "^4.17.13", "@types/node": "^20.5.9", + "@types/node-fetch": "^2.6.4", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3", "typescript": "^5.2.2" } @@ -165,9 +178,6 @@ "dependencies": { "@crosslab/booking-service-common": "file:../common", "@crosslab/service-device-reservation": "file:../device-reservation", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "@types/express": "^4.17.13", "amqplib": "^0.10.3", "dayjs": "^1.11.5", "express": "^4.18.1", @@ -175,6 +185,9 @@ "typescript": "^5.2.2" }, "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "@types/express": "^4.17.13", "node-mocks-http": "^1.14.1", "prettier": "^3.0.3" } @@ -445,10 +458,6 @@ "resolved": "../../../../helper/openapi-codegeneration", "link": true }, - "node_modules/@cross-lab-project/service-common": { - "resolved": "../../../common", - "link": true - }, "node_modules/@crosslab/booking-service-common": { "resolved": "../common", "link": true @@ -457,6 +466,10 @@ "resolved": "../test_common", "link": true }, + "node_modules/@crosslab/service-common": { + "resolved": "../../../common", + "link": true + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -831,11 +844,64 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1064,6 +1130,12 @@ "node": ">= 6" } }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1116,6 +1188,57 @@ "node": ">= 8" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/dayjs": { "version": "1.11.11", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", @@ -1165,6 +1288,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/denque": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", @@ -1240,6 +1380,75 @@ "node": ">=8.0.0" } }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -1259,6 +1468,49 @@ "node": ">= 0.4" } }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -1415,6 +1667,15 @@ "flat": "cli.js" } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/foreground-child": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz", @@ -1475,6 +1736,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/generate-function": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", @@ -1510,6 +1798,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -1550,6 +1855,22 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -1561,6 +1882,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -1602,6 +1938,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -1622,6 +1973,12 @@ "he": "bin/he" } }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -1670,6 +2027,20 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -1678,6 +2049,40 @@ "node": ">= 0.10" } }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -1690,16 +2095,89 @@ "node": ">=8" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", @@ -1720,6 +2198,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -1729,6 +2219,21 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -1743,6 +2248,82 @@ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -1755,6 +2336,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1869,11 +2468,32 @@ "node": ">=4" } }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -2016,6 +2636,15 @@ "node": ">= 0.6" } }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -2279,6 +2908,33 @@ "node": ">= 0.6" } }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -2288,6 +2944,120 @@ "node": ">=0.10.0" } }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm-run-all/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm-run-all/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/npm-run-all/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm-run-all/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/npm-run-all/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -2296,6 +3066,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -2346,6 +3143,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -2372,6 +3182,12 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", @@ -2402,6 +3218,18 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", @@ -2419,6 +3247,36 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/prettier": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", @@ -2498,6 +3356,20 @@ "node": ">= 0.8" } }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -2510,6 +3382,24 @@ "node": ">=8.10.0" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -2527,6 +3417,41 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -2546,6 +3471,23 @@ } ] }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -2648,6 +3590,21 @@ "node": ">= 0.4" } }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -2674,6 +3631,15 @@ "node": ">=8" } }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", @@ -2711,6 +3677,38 @@ "node": ">=0.10.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true + }, "node_modules/sqlstring": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", @@ -2756,6 +3754,73 @@ "node": ">=8" } }, + "node_modules/string.prototype.padend": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz", + "integrity": "sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2781,6 +3846,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -2804,6 +3878,18 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/test-exclude": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", @@ -2895,6 +3981,79 @@ "node": ">= 0.6" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript": { "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", @@ -2907,6 +4066,21 @@ "node": ">=14.17" } }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -2950,6 +4124,16 @@ "node": ">=10.12.0" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -2973,6 +4157,41 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", diff --git a/services/booking/src/schedule-service/package.json b/services/booking/src/schedule-service/package.json index 0db54b8d..35fdd231 100644 --- a/services/booking/src/schedule-service/package.json +++ b/services/booking/src/schedule-service/package.json @@ -1,13 +1,22 @@ { + "type": "module", "name": "@crosslab/service-schedule-service", "version": "0.0.1", "description": "Part of booking service. Shows schedule of devices - horizontal scaleable.", "main": "app/index.js", + "dockerName": "schedule-service", + "bin": { + "crosslab-schedule-service": "./app/index.js" + }, + "files": [ + "app" + ], "scripts": { "test": "npm run build && env-cmd -e development c8 --include=\"app/operations/index.js\" --include=\"app/timetable.js\" mocha app/*_test.js app/operations/*_test.js", "build:generate": "openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", "build:compile": "tsc && cp src/generated/basicValidation.cjs app/generated/basicValidation.cjs", - "build": "npm run build:generate && npm run build:compile", + "build:add-shebang": "bash scripts/add-shebang.sh", + "build": "npm-run-all build:*", "start": "npm run build && env-cmd -e development node app/index.js", "format": "prettier . --write", "lint": "eslint ." @@ -18,7 +27,7 @@ "@cross-lab-project/api-client": "file:../../../../clients/api/js", "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", - "@cross-lab-project/service-common": "file:../../../common", + "@crosslab/service-common": "file:../../../common", "@crosslab/booking-service-common": "file:../common", "@crosslab/booking-service-test-common": "file:../test_common", "@trivago/prettier-plugin-sort-imports": "^4.2.0", @@ -36,6 +45,7 @@ "c8": "^10.1.0", "env-cmd": "^10.1.0", "mocha": "^10.0.0", - "prettier": "^3.0.3" + "prettier": "^3.0.3", + "npm-run-all": "^4.1.5" } } diff --git a/services/booking/src/schedule-service/scripts/add-shebang.sh b/services/booking/src/schedule-service/scripts/add-shebang.sh new file mode 120000 index 00000000..1a5fdd47 --- /dev/null +++ b/services/booking/src/schedule-service/scripts/add-shebang.sh @@ -0,0 +1 @@ +../../../../../common/node/scripts/add-shebang.sh \ No newline at end of file diff --git a/services/booking/src/schedule-service/scripts/build-docker.sh b/services/booking/src/schedule-service/scripts/build-docker.sh new file mode 120000 index 00000000..31019032 --- /dev/null +++ b/services/booking/src/schedule-service/scripts/build-docker.sh @@ -0,0 +1 @@ +../../../../../common/docker/scripts/build-node.sh \ No newline at end of file diff --git a/services/booking/src/schedule-service/scripts/test.sh b/services/booking/src/schedule-service/scripts/test.sh new file mode 100755 index 00000000..2e5b18b7 --- /dev/null +++ b/services/booking/src/schedule-service/scripts/test.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +npm ci +npm test \ No newline at end of file diff --git a/services/booking/src/schedule-service/src/config.ts b/services/booking/src/schedule-service/src/config.ts index b373106b..9b71859b 100644 --- a/services/booking/src/schedule-service/src/config.ts +++ b/services/booking/src/schedule-service/src/config.ts @@ -8,18 +8,10 @@ export const config = { PORT, BASE_URL: process.env.BASE_URL ?? DEFAULT_BASE_URL, JWKS_URL: process.env.JWKS_URL ?? 'http://localhost/.well-known/jwks.json', - SECURITY_ISSUER: - process.env.SECURITY_ISSUER ?? - die('the environment variable SECURITY_ISSUER is not defined!'), - SECURITY_AUDIENCE: - process.env.SECURITY_AUDIENCE ?? - die('the environment variable SECURITY_AUDIENCE is not defined!'), - API_TOKEN: - process.env.API_TOKEN ?? die('the environment variable API_TOKEN is not defined!'), BookingDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, ReservationDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, CallbackDSN: process.env.BOOKING_DSN ?? baseConfig.BookingDSN, OwnURL: process.env.BASE_URL ?? DEFAULT_BASE_URL, - InstitutePrefix:[process.env.BASE_URL ?? DEFAULT_BASE_URL], - AmqpUrl: process.env.AMQP_URL ?? baseConfig.AmqpUrl, + InstitutePrefix: [process.env.BASE_URL ?? DEFAULT_BASE_URL], + AmqpUrl: process.env.AMQP_URL ?? baseConfig.AmqpUrl, }; diff --git a/services/booking/src/schedule-service/src/index.ts b/services/booking/src/schedule-service/src/index.ts index 65db3adb..140afb5f 100644 --- a/services/booking/src/schedule-service/src/index.ts +++ b/services/booking/src/schedule-service/src/index.ts @@ -1,17 +1,19 @@ -import { authorization, error, logging } from '@cross-lab-project/service-common'; -import express from 'express'; +import { authorization, error, logging } from '@crosslab/service-common'; +import express, { ErrorRequestHandler, RequestHandler } from 'express'; +import { fileURLToPath } from 'url'; -import { config } from './config'; -import { app } from './generated'; +import { config } from './config.js'; +import { app } from './generated/index.js'; -if (require.main === module) { - app.initService({ +if (process.argv[1] === fileURLToPath(import.meta.url)) { + logging.init(); + app.initService({ preHandlers: [ application => { application.use(express.json()); application.use(express.urlencoded({ extended: false })); - application.use(logging.middleware()); - application.use(authorization.middleware()); + application.use(logging.middleware() as RequestHandler); + application.use(authorization.middleware() as RequestHandler); }, ], postHandlers: [ @@ -21,7 +23,7 @@ if (require.main === module) { }); }, ], - errorHandler: error.middleware, + errorHandler: error.middleware as ErrorRequestHandler, }); console.log('Starting schedule-service'); app.listen(config.PORT); diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index 96ea614d..40269c2e 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -1,26 +1,25 @@ -import { APIClient } from '@cross-lab-project/api-client'; -import { DeviceServiceTypes } from '@cross-lab-project/api-client/lib/types/generated/types'; -import { BelongsToUs } from '@crosslab/booking-service-common'; +import { + DeviceServiceTypes, + UnsuccessfulRequestError, +} from '@cross-lab-project/api-client'; +import { BelongsToUs, clients } from '@crosslab/booking-service-common'; import dayjs from 'dayjs'; -import { cloneDeep, map } from 'lodash'; +import lodash from 'lodash'; import * as mysql from 'mysql2/promise'; -import { config } from '../config'; +import { config } from '../config.js'; import { postScheduleRequestBodyType, postScheduleSignature, postScheduleSuccessResponseType, -} from '../generated/signatures'; -import { Timeslot } from '../generated/types'; -import { timetableAnd, timetableNot } from '../timetable'; +} from '../generated/signatures.js'; +import { Timeslot } from '../generated/types.js'; +import { timetableAnd, timetableNot } from '../timetable.js'; // TODO: Missing availability since it is not yet well defined export const postSchedule: postScheduleSignature = async (request, body) => { - await request.authorization.check_authorization_or_fail('create', `booking`); - let api: APIClient = new APIClient(config.OwnURL, config.API_TOKEN); - const laterReq = new Map(); // Device in request, device list, request let timetables: Timeslot[][][] = []; // Booked: Device in request, device list, actual reserved time slots @@ -32,6 +31,8 @@ export const postSchedule: postScheduleSignature = async (request, body) => { >[][] = []; // Device in request, device list let realDevices: string[][] = []; // Device in request, device list + if (!body) body = { Experiment: { Devices: [] }, Time: { Start: '', End: '' } }; + // Collect all timetables for (let device = 0; device < body.Experiment.Devices.length; device++) { // Resolve device @@ -44,10 +45,11 @@ export const postSchedule: postScheduleSignature = async (request, body) => { | DeviceServiceTypes.InstantiableCloudDevice | DeviceServiceTypes.InstantiableBrowserDevice; try { - r = await api.getDevice(body.Experiment.Devices[device].ID, { + r = await clients.device.getDevice(body.Experiment.Devices[device].ID, { flat_group: true, }); - } catch (err) { + } catch (error) { + const err = error as UnsuccessfulRequestError; // Bad status code if (err.response !== undefined && err.response.status !== undefined) { if (err.response.status === 503) { @@ -116,17 +118,17 @@ export const postSchedule: postScheduleSignature = async (request, body) => { }; } if (laterReq.get(d.origin) === undefined) { - let req: postScheduleRequestBodyType = cloneDeep(body); + let req: postScheduleRequestBodyType = lodash.cloneDeep(body); req.onlyOwn = true; req.Experiment.Devices = []; req.Combined = false; laterReq.set(d.origin, [[], [], req]); } - let lr = laterReq.get(d.origin); + let lr = laterReq.get(d.origin)!; lr[0].push(device); lr[1].push(i); - lr[2].Experiment.Devices.push({ ID: realDevices[device][i] }); + lr[2]!.Experiment.Devices.push({ ID: realDevices[device][i] }); laterReq.set(d.origin, lr); t = []; } else { @@ -138,7 +140,7 @@ export const postSchedule: postScheduleSignature = async (request, body) => { // Get availability availability[device].push( - api.getDevice(realDevices[device][i], { flat_group: false }), + clients.device.getDevice(realDevices[device][i], { flat_group: true }), ); } } @@ -153,24 +155,25 @@ export const postSchedule: postScheduleSignature = async (request, body) => { ] >(); // Device in request, device list, request for (let k of laterReq.keys()) { - let lr = laterReq.get(k); - let req = api.schedule(lr[2], { url: k }); + let lr = laterReq.get(k)!; + let req = clients.booking.schedule.schedule(lr[2], { url: k }); lrpromise.set(k, [lr[0], lr[1], lr[2], req]); } for (let k of laterReq.keys()) { - let lr = lrpromise.get(k); + let lr = lrpromise.get(k)!; let req: postScheduleSuccessResponseType['body']; try { req = await lr[3]; - } catch (err) { + } catch (error) { + const err = error as UnsuccessfulRequestError; if (err.response !== undefined && err.response.status !== undefined) { if (err.response.status == 503) { return { status: 503 }; } if (err.response.status == 404) { - return { status: 404, body: err.response.body }; + return { status: 404, body: JSON.stringify(err.response.body) }; } return { status: 500, @@ -180,34 +183,34 @@ export const postSchedule: postScheduleSignature = async (request, body) => { console.log('ANY ERROR lr'); throw err; } - if (req.length != lr[2].Experiment.Devices.length) { + if (req.length != lr[2]!.Experiment.Devices.length) { return { status: 500, body: 'Institution ' + k + ' returned bad result (requested ' + - lr[2].Experiment.Devices.length + + lr[2]!.Experiment.Devices.length + ' devices, got ' + req.length + ')', }; } for (let i = 0; i < req.length; i++) { - if (req[i].Device != lr[2].Experiment.Devices[i].ID) { + if (req[i].Device != lr[2]!.Experiment.Devices[i].ID) { return { status: 500, body: 'Institution ' + k + ' returned bad result (requested device' + - lr[2].Experiment.Devices[i].ID + + lr[2]!.Experiment.Devices[i].ID + ', got ' + req[i].Device + ')', }; } - timetables[lr[i][0]][lr[i][1]] = req[i].Booked; + timetables[(lr as any)[i][0]][(lr as any)[i][1]] = req[i].Booked; } } @@ -230,7 +233,8 @@ export const postSchedule: postScheduleSignature = async (request, body) => { | DeviceServiceTypes.InstantiableBrowserDevice; try { a = await availability[device][i]; - } catch (err) { + } catch (error) { + const err = error as UnsuccessfulRequestError; if (err.response !== undefined && err.response.status !== undefined) { // TODO: Remove later if errors are well specified if (err.response.status === 503) { @@ -248,7 +252,7 @@ export const postSchedule: postScheduleSignature = async (request, body) => { 'Device request ' + realDevices[device][i] + ' returned status code' + - err.status, + err.response.status, }; } console.log('ANY ERROR availability'); @@ -266,8 +270,8 @@ export const postSchedule: postScheduleSignature = async (request, body) => { available = [{ Start: body.Time.Start, End: body.Time.End }]; } else { available = timetableAnd( - a.announcedAvailability.map(e => { - return { Start: e.start, End: e.end }; + a.announcedAvailability!.map(e => { + return { Start: e.start!, End: e.end! }; }), ); } diff --git a/services/booking/src/schedule-service/src/operations/operations_test.ts b/services/booking/src/schedule-service/src/operations/operations_test.ts index 0142e231..bd24aeee 100644 --- a/services/booking/src/schedule-service/src/operations/operations_test.ts +++ b/services/booking/src/schedule-service/src/operations/operations_test.ts @@ -2,19 +2,19 @@ import { fakeServerConfig, getFakeInstitutePrefix, getFakeOwnURL, + getFakeRequest, getSQLDNS, resetFakeServerVars, setupDummySql, startFakeServer, stopFakeServer, tearDownDummySql, - getFakeRequest, } from '@crosslab/booking-service-test-common'; import dayjs from 'dayjs'; import * as mocha from 'mocha'; -import { config } from '../config'; -import { getTimetables, postSchedule } from './index'; +import { config } from '../config.js'; +import { getTimetables, postSchedule } from './index.js'; mocha.describe('operations.ts', function () { this.timeout(10000); @@ -57,23 +57,21 @@ mocha.describe('operations.ts', function () { { Start: '2022-06-27T06:00:00Z', End: '2022-06-27T07:00:00Z' }, ]; - let r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, + let r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], }, - ); + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 200) { throw Error('Response error: ' + r.status); } @@ -167,23 +165,21 @@ mocha.describe('operations.ts', function () { } } - r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: true, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: true, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 200) { throw Error('Response error: ' + r.status); } @@ -256,20 +252,18 @@ mocha.describe('operations.ts', function () { } } - r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 200) { throw Error('Response error: ' + r.status); } @@ -347,20 +341,18 @@ mocha.describe('operations.ts', function () { }); mocha.it('postBookingSchedule (completely free)', async function () { - let r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', - }, - ], - }, - Combined: false, - Time: { Start: '1999-06-25T00:00:00Z', End: '1999-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + let r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + }, + ], + }, + Combined: false, + Time: { Start: '1999-06-25T00:00:00Z', End: '1999-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 200) { throw Error('Response error: ' + r.status); } @@ -405,20 +397,18 @@ mocha.describe('operations.ts', function () { }); mocha.it('postBookingSchedule (completely free)', async function () { - let r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', - }, - ], - }, - Combined: false, - Time: { Start: '1999-06-25T00:00:00Z', End: '1999-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + let r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + }, + ], + }, + Combined: false, + Time: { Start: '1999-06-25T00:00:00Z', End: '1999-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 200) { throw Error('Response error: ' + r.status); } @@ -494,23 +484,21 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_device_service_status = 200; fakeServerConfig.device_wrong_device = true; - let r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + let r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 500) { throw Error('Response error (device wrong device): ' + r.status); } @@ -522,23 +510,21 @@ mocha.describe('operations.ts', function () { fakeServerConfig.device_wrong_device = false; fakeServerConfig.device_single_is_group = true; - r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 500) { throw Error('Response error (device is group): ' + r.status); } @@ -549,23 +535,21 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_device_service_status = 200; fakeServerConfig.device_single_is_group = false; - r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 503) { throw Error('Response error (proxy overloaded): ' + r.status); } @@ -574,23 +558,21 @@ mocha.describe('operations.ts', function () { fakeServerConfig.device_service_status = 404; fakeServerConfig.proxy_server_status = 200; - r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 404) { throw Error('Response error (proxy 404): ' + r.status); } @@ -599,23 +581,21 @@ mocha.describe('operations.ts', function () { fakeServerConfig.device_service_status = 200; fakeServerConfig.proxy_server_status = 404; - r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 404) { throw Error('Response error (proxy 404): ' + r.status); } @@ -625,23 +605,21 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_server_status = 200; fakeServerConfig.proxy_device_service_status = 500; - r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 500) { throw Error('Response error (device generic error): ' + r.status); } @@ -651,23 +629,21 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_server_status = 200; fakeServerConfig.proxy_device_service_status = 200; - r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 500) { throw Error('Response error (device generic error): ' + r.status); } @@ -677,23 +653,21 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_server_status = 500; fakeServerConfig.proxy_device_service_status = 200; - r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 500) { throw Error('Response error (proxy 500): ' + r.status); } @@ -703,23 +677,21 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_server_status = 200; fakeServerConfig.proxy_schedule_short_body = true; - r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 500) { throw Error('Response error (wrong number of devices): ' + r.status); } @@ -730,23 +702,21 @@ mocha.describe('operations.ts', function () { fakeServerConfig.proxy_schedule_short_body = false; fakeServerConfig.proxy_schedule_wrong_device = true; - r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: undefined, - } - ); + r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); if (r.status !== 500) { throw Error('Response error (wrong devices): ' + r.status); } @@ -755,23 +725,21 @@ mocha.describe('operations.ts', function () { mocha.it('postBookingSchedule (bad requests)', async function () { this.timeout(10000); - let r = await postSchedule(getFakeRequest(), - { - Experiment: { - Devices: [ - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', - }, - { - ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', - }, - ], - }, - Combined: false, - Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, - onlyOwn: true, - } - ); + let r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000001', + }, + { + ID: 'http://localhost:10801/devices/00000000-0000-0000-0000-000000000002', + }, + ], + }, + Combined: false, + Time: { Start: '2022-06-25T00:00:00Z', End: '2022-06-28T23:59:59Z' }, + onlyOwn: true, + }); if (r.status !== 400) { throw Error('Response error (onlyOwn wrong usage): ' + r.status); } diff --git a/services/booking/src/schedule-service/src/timetable.ts b/services/booking/src/schedule-service/src/timetable.ts index bd2d8879..403a40b3 100644 --- a/services/booking/src/schedule-service/src/timetable.ts +++ b/services/booking/src/schedule-service/src/timetable.ts @@ -1,7 +1,7 @@ import dayjs from 'dayjs'; -import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'; +import isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js'; -import { Timeslot } from './generated/types'; +import { Timeslot } from './generated/types.js'; dayjs.extend(isSameOrBefore); diff --git a/services/booking/src/schedule-service/src/timetable_test.ts b/services/booking/src/schedule-service/src/timetable_test.ts index e0b9da86..a80c352f 100644 --- a/services/booking/src/schedule-service/src/timetable_test.ts +++ b/services/booking/src/schedule-service/src/timetable_test.ts @@ -1,8 +1,8 @@ import dayjs from 'dayjs'; import * as mocha from 'mocha'; -import { Timeslot } from './generated/types'; -import { timetableAnd, timetableNot, timetableSortInPlace } from './timetable'; +import { Timeslot } from './generated/types.js'; +import { timetableAnd, timetableNot, timetableSortInPlace } from './timetable.js'; mocha.describe('timetable.ts', function () { mocha.it('timetableSortInPlace', function (done) { diff --git a/services/booking/src/schedule-service/tsconfig.json b/services/booking/src/schedule-service/tsconfig.json deleted file mode 100644 index 79b15a31..00000000 --- a/services/booking/src/schedule-service/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "moduleResolution": "Node", - "target": "ES2020", - "outDir": "app", - "rootDir": "src", - "sourceMap": true, - "esModuleInterop": true - }, - "exclude": ["../generated_modified"] -} diff --git a/services/booking/src/schedule-service/tsconfig.json b/services/booking/src/schedule-service/tsconfig.json new file mode 120000 index 00000000..2a9dfaa4 --- /dev/null +++ b/services/booking/src/schedule-service/tsconfig.json @@ -0,0 +1 @@ +../../../../common/node/tsconfig-app.json \ No newline at end of file diff --git a/services/booking/src/test_common/package-lock.json b/services/booking/src/test_common/package-lock.json index 2884b77f..c4243d1d 100644 --- a/services/booking/src/test_common/package-lock.json +++ b/services/booking/src/test_common/package-lock.json @@ -11,9 +11,6 @@ "dependencies": { "@crosslab/booking-service-common": "file:../common", "@crosslab/service-device-reservation": "file:../device-reservation", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "@types/express": "^4.17.13", "amqplib": "^0.10.3", "dayjs": "^1.11.5", "express": "^4.18.1", @@ -21,23 +18,37 @@ "typescript": "^5.2.2" }, "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "@types/express": "^4.17.13", "node-mocks-http": "^1.14.1", "prettier": "^3.0.3" } }, "../common": { + "name": "@crosslab/booking-service-common", "version": "0.0.1", "license": "Apache-2.0", "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0" + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/express": "^4.17.13", + "ajv-formats": "^3.0.1", + "express": "^4.18.1", + "node-fetch": "^3.3.2" }, "devDependencies": { + "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", + "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", + "@types/express": "^4.17.13", "@types/node": "^20.5.9", + "@types/node-fetch": "^2.6.4", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3", "typescript": "^5.2.2" } }, "../device-reservation": { + "name": "@crosslab/service-device-reservation", "version": "0.1.0", "license": "Apache-2.0", "dependencies": { @@ -50,11 +61,15 @@ "mysql2": "^3.6.0", "typescript": "^5.2.2" }, + "bin": { + "crosslab-device-reservation": "app/index.js" + }, "devDependencies": { "@types/mocha": "^10.0.0", "c8": "^10.1.0", "mocha": "^10.0.0", "mocha-suppress-logs": "^0.5.1", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3" } }, @@ -75,6 +90,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dev": true, "dependencies": { "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" @@ -87,6 +103,7 @@ "version": "7.17.7", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "dev": true, "dependencies": { "@babel/types": "^7.17.0", "jsesc": "^2.5.1", @@ -100,6 +117,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dev": true, "dependencies": { "@babel/types": "^7.24.7" }, @@ -111,6 +129,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.24.7", "@babel/helper-validator-identifier": "^7.24.7", @@ -124,6 +143,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "dev": true, "dependencies": { "@babel/template": "^7.24.7", "@babel/types": "^7.24.7" @@ -136,6 +156,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.24.7", "@babel/helper-validator-identifier": "^7.24.7", @@ -149,6 +170,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dev": true, "dependencies": { "@babel/types": "^7.24.7" }, @@ -160,6 +182,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.24.7", "@babel/helper-validator-identifier": "^7.24.7", @@ -173,6 +196,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "dev": true, "dependencies": { "@babel/types": "^7.24.7" }, @@ -184,6 +208,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.24.7", "@babel/helper-validator-identifier": "^7.24.7", @@ -197,6 +222,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "dev": true, "engines": { "node": ">=6.9.0" } @@ -205,6 +231,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "dev": true, "engines": { "node": ">=6.9.0" } @@ -213,6 +240,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", @@ -227,6 +255,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -238,6 +267,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "dev": true, "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/parser": "^7.24.7", @@ -251,6 +281,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.24.7", "@babel/helper-validator-identifier": "^7.24.7", @@ -264,6 +295,7 @@ "version": "7.23.2", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, "dependencies": { "@babel/code-frame": "^7.22.13", "@babel/generator": "^7.23.0", @@ -284,6 +316,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dev": true, "dependencies": { "@babel/types": "^7.24.7", "@jridgewell/gen-mapping": "^0.3.5", @@ -298,6 +331,7 @@ "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.24.7", "@babel/helper-validator-identifier": "^7.24.7", @@ -311,6 +345,7 @@ "version": "7.17.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" @@ -331,6 +366,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -344,6 +380,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, "engines": { "node": ">=6.0.0" } @@ -352,6 +389,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, "engines": { "node": ">=6.0.0" } @@ -359,12 +397,14 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -374,6 +414,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", + "dev": true, "dependencies": { "@babel/generator": "7.17.7", "@babel/parser": "^7.20.5", @@ -396,6 +437,7 @@ "version": "0.10.5", "resolved": "https://registry.npmjs.org/@types/amqplib/-/amqplib-0.10.5.tgz", "integrity": "sha512-/cSykxROY7BWwDoi4Y4/jLAuZTshZxd8Ey1QYa/VaXriMotBDoou7V/twJiOSHzU6t1Kp1AHAUXGCgqq+6DNeg==", + "dev": true, "dependencies": { "@types/node": "*" } @@ -404,6 +446,7 @@ "version": "1.19.5", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dev": true, "dependencies": { "@types/connect": "*", "@types/node": "*" @@ -413,6 +456,7 @@ "version": "3.4.38", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, "dependencies": { "@types/node": "*" } @@ -421,6 +465,7 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dev": true, "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -432,6 +477,7 @@ "version": "4.19.3", "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz", "integrity": "sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg==", + "dev": true, "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -442,17 +488,20 @@ "node_modules/@types/http-errors": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", - "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", - "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true }, "node_modules/@types/node": { "version": "20.14.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "dev": true, "dependencies": { "undici-types": "~5.26.4" } @@ -460,17 +509,20 @@ "node_modules/@types/qs": { "version": "6.9.15", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", - "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", + "dev": true }, "node_modules/@types/range-parser": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", - "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dev": true, "dependencies": { "@types/mime": "^1", "@types/node": "*" @@ -480,6 +532,7 @@ "version": "1.15.7", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dev": true, "dependencies": { "@types/http-errors": "*", "@types/node": "*", @@ -516,6 +569,7 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -599,6 +653,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -612,6 +667,7 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, "dependencies": { "color-name": "1.1.3" } @@ -619,7 +675,8 @@ "node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true }, "node_modules/content-disposition": { "version": "0.5.4", @@ -780,6 +837,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, "engines": { "node": ">=0.8.0" } @@ -949,6 +1007,7 @@ "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, "engines": { "node": ">=4" } @@ -968,6 +1027,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, "engines": { "node": ">=4" } @@ -1068,17 +1128,20 @@ "node_modules/javascript-natural-sort": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", - "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==" + "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==", + "dev": true }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, "bin": { "jsesc": "bin/jsesc" }, @@ -1089,7 +1152,8 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "node_modules/long": { "version": "5.2.3", @@ -1283,12 +1347,14 @@ "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true }, "node_modules/prettier": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", + "dev": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -1480,6 +1546,7 @@ "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -1509,6 +1576,7 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -1520,6 +1588,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, "engines": { "node": ">=4" } @@ -1559,7 +1628,8 @@ "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, "node_modules/unpipe": { "version": "1.0.0", diff --git a/services/booking/src/test_common/package.json b/services/booking/src/test_common/package.json index c28e1ac4..6b56bc57 100644 --- a/services/booking/src/test_common/package.json +++ b/services/booking/src/test_common/package.json @@ -1,10 +1,14 @@ { + "type": "module", "name": "@crosslab/booking-service-test-common", "version": "0.0.1", "description": "Part of booking service.", "main": "lib/index.js", + "files": [ + "lib" + ], "scripts": { - "build": "npx tsc", + "build": "tsc", "format": "prettier . --write", "lint": "eslint ." }, @@ -13,9 +17,6 @@ "dependencies": { "@crosslab/booking-service-common": "file:../common", "@crosslab/service-device-reservation": "file:../device-reservation", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/amqplib": "^0.10.1", - "@types/express": "^4.17.13", "amqplib": "^0.10.3", "dayjs": "^1.11.5", "express": "^4.18.1", @@ -24,6 +25,9 @@ }, "devDependencies": { "node-mocks-http": "^1.14.1", - "prettier": "^3.0.3" + "prettier": "^3.0.3", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/amqplib": "^0.10.1", + "@types/express": "^4.17.13" } } diff --git a/services/booking/src/test_common/src/devicereservationhelper.ts b/services/booking/src/test_common/src/devicereservationhelper.ts index d4f002c0..c8fef9eb 100644 --- a/services/booking/src/test_common/src/devicereservationhelper.ts +++ b/services/booking/src/test_common/src/devicereservationhelper.ts @@ -2,12 +2,13 @@ import { baseConfig, sleep } from '@crosslab/booking-service-common'; import { ReservationMessage, ReservationRequest, - mainLoop, config, + mainLoop, } from '@crosslab/service-device-reservation'; -import {getSQLDNS} from './setup'; import * as amqplib from 'amqplib'; +import { getSQLDNS } from './setup.js'; + var running: boolean = false; export async function startDeviceReservation() { @@ -23,7 +24,7 @@ export async function startDeviceReservation() { // Ensure queue exists await channel.assertQueue('device-reservation', { durable: true, - }); + }); // Drain queue for tests while (await channel.get('device-reservation', { noAck: true })) {} @@ -53,7 +54,7 @@ export async function stopDeviceReservation() { let m = new ReservationMessage(ReservationRequest.Stop, 'TEST_ANSWER_STOP_SERVER'); channel.sendToQueue('device-reservation', Buffer.from(JSON.stringify(m))); - await sleep(1000); + await sleep(1000); while (await channel.get('TEST_ANSWER_STOP_SERVER', { noAck: true })) {} await channel.deleteQueue('TEST_ANSWER_STOP_SERVER'); diff --git a/services/booking/src/test_common/src/fakerequest.ts b/services/booking/src/test_common/src/fakerequest.ts index 9f70bff8..84e72732 100644 --- a/services/booking/src/test_common/src/fakerequest.ts +++ b/services/booking/src/test_common/src/fakerequest.ts @@ -1,42 +1,54 @@ -import * as nodeMocksHttp from "node-mocks-http" +import express from 'express'; +import * as nodeMocksHttp from 'node-mocks-http'; type FakeRequestOptions = { - user: string - isAuthorized: boolean + user: string; + isAuthorized: boolean; }; -export function getFakeRequest(options?: FakeRequestOptions) { - if (options === undefined) { - options = fakeRequestDefaultConfig(); - } - let request = nodeMocksHttp.createRequest(); - request.authorization = {}; - request.authorization.user = options.user; +export function getFakeRequest(options?: FakeRequestOptions): express.Request { + if (options === undefined) { + options = fakeRequestDefaultConfig(); + } + let request = nodeMocksHttp.createRequest(); + request.authorization = {}; + request.authorization.user = options.user; - request.related = []; - request.unrelated = []; + request.related = []; + request.unrelated = []; - request.authorization.check_authorization_or_fail = async function (action: string, id: string): Promise { - if (!options.isAuthorized) { - throw Error("test authorization failed"); - } + request.authorization.check_authorization_or_fail = async function ( + _action: string, + _id: string, + ): Promise { + if (!options?.isAuthorized) { + throw Error('test authorization failed'); } + }; - request.authorization.relate = async function (user: string, action: string, id: string): Promise { - request.related.push([user, action, id]); - return true; - } + request.authorization.relate = async function ( + user: string, + action: string, + id: string, + ): Promise { + request.related.push([user, action, id]); + return true; + }; - request.authorization.unrelate = async function (user: string, action: string, id: string): Promise { - request.unrelated.push([user, action, id]); - return true; - } - return request; + request.authorization.unrelate = async function ( + user: string, + action: string, + id: string, + ): Promise { + request.unrelated.push([user, action, id]); + return true; + }; + return request; } export function fakeRequestDefaultConfig(): FakeRequestOptions { - return { - user: "testuser", - isAuthorized: true, - }; -} \ No newline at end of file + return { + user: 'testuser', + isAuthorized: true, + }; +} diff --git a/services/booking/src/test_common/src/fakeserver.ts b/services/booking/src/test_common/src/fakeserver.ts index 325a3e14..5aa647f5 100644 --- a/services/booking/src/test_common/src/fakeserver.ts +++ b/services/booking/src/test_common/src/fakeserver.ts @@ -1,8 +1,8 @@ import express from 'express'; import * as http from 'http'; -var device_server: http.Server; -var proxy_warning_server: http.Server; +var device_server: http.Server | undefined; +var proxy_warning_server: http.Server | undefined; var running: boolean = false; @@ -24,7 +24,7 @@ export var fakeServerConfig = { callback_test_local_group_was_called: false, callback_test_remote_single_was_called: false, callback_test_new_was_called: false, - device_patch_list: [], + device_patch_list: [] as any[], booking_status: 'booked', }; @@ -38,12 +38,12 @@ export async function startFakeServer() { // Proxy warning let app: express.Application = express(); - app.get('*', (req, res) => { + app.get('*', (_req, res) => { console.log('Proxy access wrong'); res.status(405).send(); }); - app.post('*', (req, res) => { + app.post('*', (_req, res) => { console.log('Proxy access wrong'); res.status(405).send(); }); @@ -54,7 +54,7 @@ export async function startFakeServer() { app.use(express.json()); - app.get('/devices/00000000-0000-0000-0000-000000000001', (req, res) => { + app.get('/devices/00000000-0000-0000-0000-000000000001', (_req, res) => { switch (fakeServerConfig.device_service_status) { case 200: if (fakeServerConfig.device_wrong_device) { @@ -66,6 +66,7 @@ export async function startFakeServer() { res.send( '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000001", "name": "Test Group", "description": "Test group for unit tests", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); + return; case 404: res.status(404).send(); return; @@ -83,7 +84,7 @@ export async function startFakeServer() { } }); - app.get('/devices/00000000-0000-0000-0000-000000000002', (req, res) => { + app.get('/devices/00000000-0000-0000-0000-000000000002', (_req, res) => { switch (fakeServerConfig.device_service_status) { case 200: res.send( @@ -107,7 +108,7 @@ export async function startFakeServer() { } }); - app.get('/devices/00000000-0000-0000-0000-000000000010', (req, res) => { + app.get('/devices/00000000-0000-0000-0000-000000000010', (_req, res) => { switch (fakeServerConfig.device_service_status) { case 200: res.send( @@ -131,7 +132,7 @@ export async function startFakeServer() { } }); - app.get('/devices/10000000-0000-0000-0000-000000000000', (req, res) => { + app.get('/devices/10000000-0000-0000-0000-000000000000', (_req, res) => { switch (fakeServerConfig.device_service_status) { case 200: if (fakeServerConfig.device_single_is_group) { @@ -167,7 +168,7 @@ export async function startFakeServer() { } }); - app.get('/devices/20000000-0000-0000-0000-000000000000', (req, res) => { + app.get('/devices/20000000-0000-0000-0000-000000000000', (_req, res) => { switch (fakeServerConfig.device_service_status) { case 200: if (fakeServerConfig.device_single_is_group) { @@ -203,33 +204,33 @@ export async function startFakeServer() { } }); - app.post('/test_callbacks/test-local-single', (req, res) => { + app.post('/test_callbacks/test-local-single', (_req, res) => { fakeServerConfig.callback_test_local_single_was_called = true; res.status(200).send(); }); - app.post('/test_callbacks/test-local-two-first', (req, res) => { + app.post('/test_callbacks/test-local-two-first', (_req, res) => { fakeServerConfig.callback_test_local_two_first_was_called = true; res.status(200).send(); }); - app.post('/test_callbacks/test-local-two-second', (req, res) => { + app.post('/test_callbacks/test-local-two-second', (_req, res) => { fakeServerConfig.callback_test_local_two_second_was_called = true; res.status(200).send(); }); - app.post('/test_callbacks/test-local-group', (req, res) => { + app.post('/test_callbacks/test-local-group', (_req, res) => { fakeServerConfig.callback_test_local_group_was_called = true; res.status(200).send(); }); - app.post('/test_callbacks/test-remote-single', (req, res) => { + app.post('/test_callbacks/test-remote-single', (_req, res) => { fakeServerConfig.callback_test_remote_single_was_called = true; res.status(200).send(); }); // to add in tests: http://localhost:10801/test_callbacks/callback-test-new - app.post('/test_callbacks/callback-test-new', (req, res) => { + app.post('/test_callbacks/callback-test-new', (_req, res) => { fakeServerConfig.callback_test_new_was_called = true; res.status(200).send(); }); @@ -257,8 +258,10 @@ export async function startFakeServer() { return; case 400: res.status(400).send(); + return; case 401: res.status(401).send(); + return; case 404: res.status(404).send('FAKE404'); return; @@ -414,9 +417,9 @@ export async function stopFakeServer() { if (!running) { throw Error('can not stop fakeserver that is not running.'); } - device_server.close(); + device_server?.close(); device_server = undefined; - proxy_warning_server.close(); + proxy_warning_server?.close(); proxy_warning_server = undefined; running = false; } @@ -439,7 +442,7 @@ export function resetFakeServerVars() { fakeServerConfig.callback_test_local_group_was_called = false; fakeServerConfig.callback_test_remote_single_was_called = false; fakeServerConfig.callback_test_new_was_called = false; - fakeServerConfig.device_patch_list = []; + fakeServerConfig.device_patch_list = []; fakeServerConfig.booking_status = 'booked'; } diff --git a/services/booking/src/test_common/src/index.ts b/services/booking/src/test_common/src/index.ts index fb2b640a..296afc9f 100644 --- a/services/booking/src/test_common/src/index.ts +++ b/services/booking/src/test_common/src/index.ts @@ -1,4 +1,4 @@ -export * from './devicereservationhelper'; -export * from './fakeserver'; -export * from './setup'; -export * from './fakerequest' +export * from './devicereservationhelper.js'; +export * from './fakeserver.js'; +export * from './setup.js'; +export * from './fakerequest.js'; diff --git a/services/booking/src/test_common/src/setup.ts b/services/booking/src/test_common/src/setup.ts index 8604efed..5a0fb5cf 100644 --- a/services/booking/src/test_common/src/setup.ts +++ b/services/booking/src/test_common/src/setup.ts @@ -9,7 +9,7 @@ export enum callbackType { export async function setupDummySql() { let sqlDNS: string = getSQLDNS(); - let db: mysql.Connection; + let db: mysql.Connection | undefined; try { db = await mysql.createConnection(sqlDNS); @@ -389,20 +389,19 @@ export async function setupDummySql() { [BigInt(9), callbackType.DeviceUpdate, BigInt(7), JSON.stringify({ Position: 0 })], ); - // finish await db.commit(); db.end(); } catch (err) { console.log('error in test setup:', err); - await db.rollback(); - db.end(); + await db?.rollback(); + db?.end(); throw err; } } export async function tearDownDummySql() { - let db: mysql.Connection; + let db: mysql.Connection | undefined; try { db = await mysql.createConnection(getSQLDNS()); await db.connect(); @@ -414,7 +413,7 @@ export async function tearDownDummySql() { db.end(); } catch (err) { console.log('error in test tear down:', err); - db.end(); + db?.end(); throw err; } } diff --git a/services/booking/src/test_common/tsconfig.json b/services/booking/src/test_common/tsconfig.json index e807d467..13bcd3bf 100644 --- a/services/booking/src/test_common/tsconfig.json +++ b/services/booking/src/test_common/tsconfig.json @@ -1,13 +1,25 @@ { "compilerOptions": { - "module": "commonjs", - "moduleResolution": "Node", - "target": "ES2020", + "module": "Node16", + "moduleResolution": "Node16", + "allowSyntheticDefaultImports": true, + "target": "ES2022", + "lib": ["ES2022"], + "esModuleInterop": true, "outDir": "lib", "rootDir": "src", - "declaration": true, - "declarationMap": true, + "strict": true, + "noImplicitAny": true, + // "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, "sourceMap": true, - "esModuleInterop": true - } + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "skipLibCheck": true, + "declaration": true, + "declarationMap": true + }, + "include": ["src"] } diff --git a/services/device/api/resources/device.yml b/services/device/api/resources/device.yml index 9d423068..25af05cb 100644 --- a/services/device/api/resources/device.yml +++ b/services/device/api/resources/device.yml @@ -43,6 +43,7 @@ patch: - $ref: '../parameters/device_changed_url.yml' requestBody: description: Updated device. + required: false content: application/json: $ref: '../content/device_update.yml' diff --git a/services/experiment/package.json b/services/experiment/package.json index d2460705..81cd8a81 100644 --- a/services/experiment/package.json +++ b/services/experiment/package.json @@ -18,8 +18,10 @@ "build:generate:code": "npx openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service -o src/generated", "build:generate:test": "npx openapi-codegen -i dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service:test -o test/generated", "build:generate:device": "npx openapi-codegen -i ../device/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/device && prettier ./src/clients/device --write", - "build:generate:booking": "npx openapi-codegen -i ../booking/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/booking && prettier ./src/clients/booking --write", - "build:compile": "tsc && cp src/generated/*.cjs app/generated && cp src/clients/device/basicValidation.cjs app/clients/device/ && cp src/clients/booking/basicValidation.cjs app/clients/booking/", + "build:generate:booking-backend": "npx openapi-codegen -i ../booking/src/booking-backend/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/booking-backend && prettier ./src/clients/booking-backend --write", + "build:generate:booking-frontend": "npx openapi-codegen -i ../booking/src/booking-frontend/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/booking-frontend && prettier ./src/clients/booking-frontend --write", + "build:generate:schedule-service": "npx openapi-codegen -i ../booking/src/schedule-service/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/schedule-service && prettier ./src/clients/schedule-service --write", + "build:compile": "tsc && cp src/generated/*.cjs app/generated && cp src/clients/device/basicValidation.cjs app/clients/device/ && cp src/clients/booking-backend/basicValidation.cjs app/clients/booking-backend/ && cp src/clients/booking-frontend/basicValidation.cjs app/clients/booking-frontend/ && cp src/clients/schedule-service/basicValidation.cjs app/clients/schedule-service/", "build:add-shebang": "bash scripts/add-shebang.sh", "build": "npm-run-all build:*", "start": "node app/index.js", diff --git a/services/experiment/src/clients/booking-backend/basicValidation.cjs b/services/experiment/src/clients/booking-backend/basicValidation.cjs new file mode 100644 index 00000000..83d82620 --- /dev/null +++ b/services/experiment/src/clients/booking-backend/basicValidation.cjs @@ -0,0 +1,3937 @@ +/* eslint-disable */ +//@ts-nocheck +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +'use strict'; +exports.validateBooking = validate21; +const schema6 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'Booking', + 'x-location': '#/components/schemas/Booking', + 'x-schema-type': 'all', +}; +const formats0 = require('ajv-formats/dist/formats').fullFormats.uri; +const formats2 = require('ajv-formats/dist/formats').fullFormats['date-time']; +function validate21( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate21.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema6.required, + parentSchema: schema6, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.ID.type, + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema6.properties.Time.required, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.Start.type, + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.End.type, + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.properties.Time.type, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Devices.items.type, + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema6.properties.Devices.type, + parentSchema: schema6.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Type.type, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Type.enum, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Status.type, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Status.enum, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.You.type, + parentSchema: schema6.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.External.type, + parentSchema: schema6.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Message.type, + parentSchema: schema6.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate21.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.type, + parentSchema: schema6, + data, + }, + ]; + return false; + } + } + validate21.errors = vErrors; + return errors === 0; +} +exports.validateDevice = validate22; +const schema7 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'Device', + 'x-location': '#/components/schemas/Device', + 'x-schema-type': 'all', +}; +function validate22( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate22.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema7.required, + parentSchema: schema7, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema7.properties.ID.type, + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate22.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema7.type, + parentSchema: schema7, + data, + }, + ]; + return false; + } + } + validate22.errors = vErrors; + return errors === 0; +} +exports.validateExperiment = validate23; +const schema8 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'Experiment', + 'x-location': '#/components/schemas/Experiment', + 'x-schema-type': 'all', +}; +function validate23( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate23.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema8.required, + parentSchema: schema8, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema8.properties.Devices.items.required, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema8.properties.Devices.items.properties.ID.type, + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.properties.Devices.items.type, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema8.properties.Devices.type, + parentSchema: schema8.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate23.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema8.properties.Description.type, + parentSchema: schema8.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate23.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.type, + parentSchema: schema8, + data, + }, + ]; + return false; + } + } + validate23.errors = vErrors; + return errors === 0; +} +exports.validateTimeslot = validate24; +const schema9 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'Timeslot', + 'x-location': '#/components/schemas/Timeslot', + 'x-schema-type': 'all', +}; +function validate24( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate24.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema9.required, + parentSchema: schema9, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.Start.type, + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.End.type, + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate24.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema9.type, + parentSchema: schema9, + data, + }, + ]; + return false; + } + } + validate24.errors = vErrors; + return errors === 0; +} +exports.validateID = validate25; +const schema10 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'ID', + 'x-location': '#/components/parameters/ID/schema', + 'x-schema-type': 'all', +}; +function validate25( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate25.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema10.type, + parentSchema: schema10, + data, + }, + ]; + return false; + } + validate25.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse200 = validate26; +const schema11 = { + type: 'array', + description: + 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', + items: { + type: 'object', + required: ['Requested', 'Selected'], + properties: { + Requested: { type: 'string', format: 'uri' }, + Selected: { type: 'string', format: 'uri' }, + }, + }, + 'x-standalone': false, + 'x-name': 'lockBookingResponse200', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate26( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Requested === undefined && (missing0 = 'Requested')) || + (data0.Selected === undefined && (missing0 = 'Selected')) + ) { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema11.items.required, + parentSchema: schema11.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Requested !== undefined) { + let data1 = data0.Requested; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema11.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.items.properties.Requested.type, + parentSchema: schema11.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Selected !== undefined) { + let data2 = data0.Selected; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema11.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.items.properties.Selected.type, + parentSchema: schema11.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.items.type, + parentSchema: schema11.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate26.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema11.type, + parentSchema: schema11, + data, + }, + ]; + return false; + } + } + validate26.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse500 = validate27; +const schema12 = { + type: 'string', + description: 'Error string', + 'x-standalone': false, + 'x-name': 'lockBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate27( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate27.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema12.type, + parentSchema: schema12, + data, + }, + ]; + return false; + } + validate27.errors = vErrors; + return errors === 0; +} +exports.validateUnlockBookingResponse500 = validate28; +const schema13 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'unlockBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate28( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate28.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema13.type, + parentSchema: schema13, + data, + }, + ]; + return false; + } + validate28.errors = vErrors; + return errors === 0; +} +exports.validateBookingCallbackResponse500 = validate29; +const schema14 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'bookingCallbackResponse500', + 'x-location': + '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate29( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate29.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.type, + parentSchema: schema14, + data, + }, + ]; + return false; + } + validate29.errors = vErrors; + return errors === 0; +} +exports.validateBookingRequest = validate30; +const schema15 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingRequest', + 'x-location': '#/components/schemas/Booking_request', + 'x-schema-type': 'request', +}; +function validate30( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate30.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema15.required, + parentSchema: schema15, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate30.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema15.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.ID.type, + parentSchema: schema15.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate30.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema15.properties.Time.required, + parentSchema: schema15.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate30.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema15.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Time.properties.Start.type, + parentSchema: schema15.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate30.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema15.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Time.properties.End.type, + parentSchema: schema15.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema15.properties.Time.type, + parentSchema: schema15.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate30.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema15.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Devices.items.type, + parentSchema: schema15.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema15.properties.Devices.type, + parentSchema: schema15.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate30.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Type.type, + parentSchema: schema15.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate30.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema15.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema15.properties.Type.enum, + parentSchema: schema15.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate30.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Status.type, + parentSchema: schema15.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate30.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema15.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema15.properties.Status.enum, + parentSchema: schema15.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate30.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema15.properties.You.type, + parentSchema: schema15.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate30.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema15.properties.External.type, + parentSchema: schema15.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate30.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.Message.type, + parentSchema: schema15.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate30.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema15.type, + parentSchema: schema15, + data, + }, + ]; + return false; + } + } + validate30.errors = vErrors; + return errors === 0; +} +exports.validateBookingResponse = validate31; +const schema16 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingResponse', + 'x-location': '#/components/schemas/Booking_response', + 'x-schema-type': 'response', +}; +function validate31( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate31.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema16.required, + parentSchema: schema16, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate31.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema16.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.ID.type, + parentSchema: schema16.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate31.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema16.properties.Time.required, + parentSchema: schema16.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate31.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema16.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Time.properties.Start.type, + parentSchema: schema16.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate31.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema16.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Time.properties.End.type, + parentSchema: schema16.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.properties.Time.type, + parentSchema: schema16.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema16.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Devices.items.type, + parentSchema: schema16.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema16.properties.Devices.type, + parentSchema: schema16.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Type.type, + parentSchema: schema16.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate31.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema16.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema16.properties.Type.enum, + parentSchema: schema16.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Status.type, + parentSchema: schema16.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate31.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema16.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema16.properties.Status.enum, + parentSchema: schema16.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate31.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema16.properties.You.type, + parentSchema: schema16.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate31.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema16.properties.External.type, + parentSchema: schema16.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Message.type, + parentSchema: schema16.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate31.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.type, + parentSchema: schema16, + data, + }, + ]; + return false; + } + } + validate31.errors = vErrors; + return errors === 0; +} +exports.validateDeviceRequest = validate32; +const schema17 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceRequest', + 'x-location': '#/components/schemas/Device_request', + 'x-schema-type': 'request', +}; +function validate32( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate32.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema17.required, + parentSchema: schema17, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate32.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema17.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.ID.type, + parentSchema: schema17.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate32.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.type, + parentSchema: schema17, + data, + }, + ]; + return false; + } + } + validate32.errors = vErrors; + return errors === 0; +} +exports.validateDeviceResponse = validate33; +const schema18 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceResponse', + 'x-location': '#/components/schemas/Device_response', + 'x-schema-type': 'response', +}; +function validate33( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate33.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema18.required, + parentSchema: schema18, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate33.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema18.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate33.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.properties.ID.type, + parentSchema: schema18.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate33.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.type, + parentSchema: schema18, + data, + }, + ]; + return false; + } + } + validate33.errors = vErrors; + return errors === 0; +} +exports.validateExperimentRequest = validate34; +const schema19 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentRequest', + 'x-location': '#/components/schemas/Experiment_request', + 'x-schema-type': 'request', +}; +function validate34( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate34.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema19.required, + parentSchema: schema19, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate34.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema19.properties.Devices.items.required, + parentSchema: schema19.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate34.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema19.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema19.properties.Devices.items.properties.ID.type, + parentSchema: + schema19.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.properties.Devices.items.type, + parentSchema: schema19.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema19.properties.Devices.type, + parentSchema: schema19.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate34.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema19.properties.Description.type, + parentSchema: schema19.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate34.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.type, + parentSchema: schema19, + data, + }, + ]; + return false; + } + } + validate34.errors = vErrors; + return errors === 0; +} +exports.validateExperimentResponse = validate35; +const schema20 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentResponse', + 'x-location': '#/components/schemas/Experiment_response', + 'x-schema-type': 'response', +}; +function validate35( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate35.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema20.required, + parentSchema: schema20, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema20.properties.Devices.items.required, + parentSchema: schema20.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema20.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema20.properties.Devices.items.properties.ID.type, + parentSchema: + schema20.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema20.properties.Devices.items.type, + parentSchema: schema20.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema20.properties.Devices.type, + parentSchema: schema20.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate35.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema20.properties.Description.type, + parentSchema: schema20.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate35.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema20.type, + parentSchema: schema20, + data, + }, + ]; + return false; + } + } + validate35.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotRequest = validate36; +const schema21 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotRequest', + 'x-location': '#/components/schemas/Timeslot_request', + 'x-schema-type': 'request', +}; +function validate36( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate36.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema21.required, + parentSchema: schema21, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate36.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema21.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate36.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.properties.Start.type, + parentSchema: schema21.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate36.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema21.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate36.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.properties.End.type, + parentSchema: schema21.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate36.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.type, + parentSchema: schema21, + data, + }, + ]; + return false; + } + } + validate36.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotResponse = validate37; +const schema22 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotResponse', + 'x-location': '#/components/schemas/Timeslot_response', + 'x-schema-type': 'response', +}; +function validate37( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate37.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema22.required, + parentSchema: schema22, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate37.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema22.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.Start.type, + parentSchema: schema22.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate37.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema22.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.End.type, + parentSchema: schema22.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate37.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema22.type, + parentSchema: schema22, + data, + }, + ]; + return false; + } + } + validate37.errors = vErrors; + return errors === 0; +} +exports.validateIDRequest = validate38; +const schema23 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDRequest', + 'x-location': '#/components/parameters/ID/schema_request', + 'x-schema-type': 'request', +}; +function validate38( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate38.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.type, + parentSchema: schema23, + data, + }, + ]; + return false; + } + validate38.errors = vErrors; + return errors === 0; +} +exports.validateIDResponse = validate39; +const schema24 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDResponse', + 'x-location': '#/components/parameters/ID/schema_response', + 'x-schema-type': 'response', +}; +function validate39( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate39.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema24.type, + parentSchema: schema24, + data, + }, + ]; + return false; + } + validate39.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse200Request = validate40; +const schema25 = { + type: 'array', + description: + 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', + items: { + type: 'object', + required: ['Requested', 'Selected'], + properties: { + Requested: { type: 'string', format: 'uri' }, + Selected: { type: 'string', format: 'uri' }, + }, + }, + 'x-standalone': false, + 'x-name': 'lockBookingResponse200Request', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate40( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Requested === undefined && (missing0 = 'Requested')) || + (data0.Selected === undefined && (missing0 = 'Selected')) + ) { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema25.items.required, + parentSchema: schema25.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Requested !== undefined) { + let data1 = data0.Requested; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema25.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.items.properties.Requested.type, + parentSchema: schema25.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Selected !== undefined) { + let data2 = data0.Selected; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema25.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.items.properties.Selected.type, + parentSchema: schema25.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema25.items.type, + parentSchema: schema25.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate40.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema25.type, + parentSchema: schema25, + data, + }, + ]; + return false; + } + } + validate40.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse200Response = validate41; +const schema26 = { + type: 'array', + description: + 'The list of booked devices and selected real devices. Order is guaranteed to be the same as in the booking.', + items: { + type: 'object', + required: ['Requested', 'Selected'], + properties: { + Requested: { type: 'string', format: 'uri' }, + Selected: { type: 'string', format: 'uri' }, + }, + }, + 'x-standalone': false, + 'x-name': 'lockBookingResponse200Response', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate41( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Requested === undefined && (missing0 = 'Requested')) || + (data0.Selected === undefined && (missing0 = 'Selected')) + ) { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema26.items.required, + parentSchema: schema26.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Requested !== undefined) { + let data1 = data0.Requested; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema26.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Requested', + schemaPath: '#/items/properties/Requested/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.items.properties.Requested.type, + parentSchema: schema26.items.properties.Requested, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Selected !== undefined) { + let data2 = data0.Selected; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema26.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Selected', + schemaPath: '#/items/properties/Selected/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.items.properties.Selected.type, + parentSchema: schema26.items.properties.Selected, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.items.type, + parentSchema: schema26.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate41.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema26.type, + parentSchema: schema26, + data, + }, + ]; + return false; + } + } + validate41.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse500Request = validate42; +const schema27 = { + type: 'string', + description: 'Error string', + 'x-standalone': false, + 'x-name': 'lockBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate42( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate42.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.type, + parentSchema: schema27, + data, + }, + ]; + return false; + } + validate42.errors = vErrors; + return errors === 0; +} +exports.validateLockBookingResponse500Response = validate43; +const schema28 = { + type: 'string', + description: 'Error string', + 'x-standalone': false, + 'x-name': 'lockBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/lock/put/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate43( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate43.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema28.type, + parentSchema: schema28, + data, + }, + ]; + return false; + } + validate43.errors = vErrors; + return errors === 0; +} +exports.validateUnlockBookingResponse500Request = validate44; +const schema29 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'unlockBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate44( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate44.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema29.type, + parentSchema: schema29, + data, + }, + ]; + return false; + } + validate44.errors = vErrors; + return errors === 0; +} +exports.validateUnlockBookingResponse500Response = validate45; +const schema30 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'unlockBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/lock/delete/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate45( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate45.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema30.type, + parentSchema: schema30, + data, + }, + ]; + return false; + } + validate45.errors = vErrors; + return errors === 0; +} +exports.validateBookingCallbackResponse500Request = validate46; +const schema31 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'bookingCallbackResponse500Request', + 'x-location': + '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate46( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate46.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.type, + parentSchema: schema31, + data, + }, + ]; + return false; + } + validate46.errors = vErrors; + return errors === 0; +} +exports.validateBookingCallbackResponse500Response = validate47; +const schema32 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'bookingCallbackResponse500Response', + 'x-location': + '#/paths//booking_callback/{ID}/post/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate47( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate47.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.type, + parentSchema: schema32, + data, + }, + ]; + return false; + } + validate47.errors = vErrors; + return errors === 0; +} diff --git a/services/experiment/src/clients/booking-backend/basicValidation.d.cts b/services/experiment/src/clients/booking-backend/basicValidation.d.cts new file mode 100644 index 00000000..51a62d7e --- /dev/null +++ b/services/experiment/src/clients/booking-backend/basicValidation.d.cts @@ -0,0 +1,107 @@ +export declare function validateBooking( + object: unknown, +): Booking; + +export declare function validateDevice( + object: unknown, +): Device; + +export declare function validateExperiment( + object: unknown, +): Experiment; + +export declare function validateTimeslot( + object: unknown, +): Timeslot; + +export declare function validateID( + object: unknown, +): ID; + +export declare function validateLockBookingResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse200; + +export declare function validateLockBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse500; + +export declare function validateUnlockBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): unlockBookingResponse500; + +export declare function validateBookingCallbackResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): bookingCallbackResponse500; + +export declare function validateBookingRequest( + object: unknown, +): BookingRequest; + +export declare function validateBookingResponse( + object: unknown, +): BookingResponse; + +export declare function validateDeviceRequest( + object: unknown, +): DeviceRequest; + +export declare function validateDeviceResponse( + object: unknown, +): DeviceResponse; + +export declare function validateExperimentRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentRequest; + +export declare function validateExperimentResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentResponse; + +export declare function validateTimeslotRequest( + object: unknown, +): TimeslotRequest; + +export declare function validateTimeslotResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): TimeslotResponse; + +export declare function validateIDRequest( + object: unknown, +): IDRequest; + +export declare function validateIDResponse( + object: unknown, +): IDResponse; + +export declare function validateLockBookingResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse200Request; + +export declare function validateLockBookingResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse200Response; + +export declare function validateLockBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse500Request; + +export declare function validateLockBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): lockBookingResponse500Response; + +export declare function validateUnlockBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): unlockBookingResponse500Request; + +export declare function validateUnlockBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): unlockBookingResponse500Response; + +export declare function validateBookingCallbackResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): bookingCallbackResponse500Request; + +export declare function validateBookingCallbackResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): bookingCallbackResponse500Response; diff --git a/services/experiment/src/clients/booking-backend/client.ts b/services/experiment/src/clients/booking-backend/client.ts new file mode 100644 index 00000000..2c864a69 --- /dev/null +++ b/services/experiment/src/clients/booking-backend/client.ts @@ -0,0 +1,420 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; + +import * as RequestValidation from './requestValidation.js'; +import * as Signatures from './signatures.js'; +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * This error class should be used if an error occurs during validation of a request/response. + * @category Errors + */ +export class ValidationError extends Error { + public errors: unknown; + + constructor(message: string, errors: unknown) { + super(message); + this.name = 'ValidationError'; + this.errors = errors; + } +} + +/** + * This error class should be used if an error occurs while fetching a request. + * @category Errors + */ +export class FetchError extends Error { + constructor(message: string) { + super(message); + this.name = 'FetchError'; + } +} + +/** + * This error class should be used if the response of the server has a status + * greater than or equal to 400. This error should contain the validated response. + * @category Errors + */ +export class UnsuccessfulRequestError extends Error { + public response: Types.ResponseData; + + constructor(message: string, response: Types.ResponseData) { + super(message); + this.response = response; + this.name = 'UnsuccessfulRequestError'; + } +} + +/** + * This error class should be used if the validation of an url fails. + * @category Errors + */ +export class InvalidUrlError extends Error { + constructor(message: string) { + super(message); + this.name = 'InvalidUrlError'; + } +} + +/** + * This function attempts to parse a Response as ResponseData. + */ +async function parseResponse(response: Response): Promise { + let text = null; + try { + text = await response.text(); + const json = JSON.parse(text); + return { status: response.status, body: json }; + } catch { + return { status: response.status, body: text }; + } +} + +/** + * This function checks if a string is a valid http url. + * @param string The string to be checked. + * @returns True if the string is a valid http url. + */ +function isValidHttpUrl(string: string) { + let url; + + try { + url = new URL(string); + } catch (_) { + return false; + } + + return url.protocol === 'http:' || url.protocol === 'https:'; +} + +/** + * This function takes an url and a pattern for the requested endpoint and parses the contained path parameters. + * @param url The url to be parsed. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the provided url does not end with the provided endpoint. + * @returns An array containing all parsed path parameters in order of appearance. + * @example + * // returns ["username", "role_name"] + * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function parsePathParameters(url: string, endpoint: string): string[] { + const parameterRegex = '([a-zA-Z0-9-:]+)'; + const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); + const matches = url.match(regex); + + if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint'); + + return matches.slice(1); +} + +/** + * This function validates a given http url and parses its path parameters. + * @param url The url to be validated. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the validation of the provided url fails. + * @returns An array containing all parsed path parameters in order of appearance (see {@link parsePathParameters}). + * @example + * // returns ["username", "role_name"] + * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { + if (!isValidHttpUrl(url)) + throw new InvalidUrlError('Provided url is not a valid http url'); + if (!url.startsWith(baseUrl)) + throw new InvalidUrlError('Provided url does not start with the provided base url'); + const pathParameters = parsePathParameters(url, endpoint); + + let extendedBaseUrl = baseUrl + endpoint; + + pathParameters.forEach(pathParameter => { + extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); + }); + + if (url !== extendedBaseUrl) + throw new InvalidUrlError('Provided url does not match extended base url'); + + return pathParameters; +} + +/** + * This function appends a given endpoint to an url. + * @param url The url to append the endpoint to. + * @param endpoint The endpoint to be appended. + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id", "/token") + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id/", "/token") + * @returns The url with the appended endpoint. + */ +function appendToUrl(url: string, endpoint: string) { + return url.endsWith('/') ? `${url.slice(0, -1)}${endpoint}` : `${url}${endpoint}`; +} + +/** + * Client for the use of the Crosslab API + * @category Client + */ +export class Client { + public readonly baseUrl: string; + public readonly serviceUrl: string; + public accessToken: string; + private fixedHeaders: [string, string][]; + private fetch = async (url: RequestInfo | URL, init: RequestInit) => { + let raw_response; + try { + if ( + url.toString().startsWith(this.baseUrl) || + url.toString().startsWith(this.serviceUrl) + ) { + raw_response = await fetch(url, init); + } else { + raw_response = await fetch( + appendToUrl( + this.baseUrl, + '/proxy?' + new URLSearchParams([['URL', url.toString()]]).toString(), + ), + init, + ); + } + } catch (error) { + if (error instanceof Error) { + throw new FetchError(error.message); + } else if (typeof error === 'string') { + throw new FetchError(error); + } else { + throw new FetchError('Something went wrong while trying to fetch the request'); + } + } + return await parseResponse(raw_response); + }; + + /** + * @category Constructors + */ + constructor( + baseUrl: string, + options: { + serviceUrl?: string; + accessToken?: string; + fixedHeaders?: [string, string][]; + }, + ) { + this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; + this.serviceUrl = options.serviceUrl + ? options.serviceUrl.endsWith('/') + ? options.serviceUrl.slice(0, -1) + : options.serviceUrl + : this.baseUrl; + this.accessToken = options.accessToken ?? ''; + this.fixedHeaders = options.fixedHeaders ?? []; + } + + /** + * Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * All devices were booked by user. + */ + public async lockBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateLockBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateLockBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'PUT', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateLockBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateLockBookingOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Unlocks all devices belonging to a booking, status will be set to 'booked'. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * Unlocking was successful. + */ + public async unlockBooking( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateUnlockBookingInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateUnlockBookingInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateUnlockBookingOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateUnlockBookingOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Callback used for updating device info / booking info. + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * Update was processed. + */ + public async bookingCallback( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/booking_callback/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [ID] = validateUrl(url, this.baseUrl, '/booking_callback/{}'); + + const parameters = { + ID: ID, + }; + + if (!RequestValidation.validateBookingCallbackInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateBookingCallbackInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }); + + if (!RequestValidation.validateBookingCallbackOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateBookingCallbackOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } +} diff --git a/services/experiment/src/clients/booking-backend/requestValidation.ts b/services/experiment/src/clients/booking-backend/requestValidation.ts new file mode 100644 index 00000000..baa00696 --- /dev/null +++ b/services/experiment/src/clients/booking-backend/requestValidation.ts @@ -0,0 +1,211 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as BasicValidation from './basicValidation.cjs'; +import * as Signatures from './signatures.js'; +import { FunctionWithErrors, ResponseData } from './types.js'; + +/** + * This function validates the inputs to lockBooking() + */ +export function validateLockBookingInput(parameters: Signatures.LockBookingParameters) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateLockBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of lockBooking() + */ +export function validateLockBookingOutput( + response: ResponseData, +): response is Signatures.LockBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateLockBookingResponse200Response(response.body)) { + (validateLockBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateLockBookingResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 412) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateLockBookingResponse500Response(response.body)) { + (validateLockBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateLockBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateLockBookingOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to unlockBooking() + */ +export function validateUnlockBookingInput( + parameters: Signatures.UnlockBookingParameters, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateUnlockBookingInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of unlockBooking() + */ +export function validateUnlockBookingOutput( + response: ResponseData, +): response is Signatures.UnlockBookingResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 412) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateUnlockBookingResponse500Response(response.body)) { + (validateUnlockBookingOutput as FunctionWithErrors).errors = ( + BasicValidation.validateUnlockBookingResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateUnlockBookingOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} + +/** + * This function validates the inputs to bookingCallback() + */ +export function validateBookingCallbackInput( + parameters: Signatures.BookingCallbackParameters, +) { + if (parameters) { + if (!BasicValidation.validateIDRequest(parameters['ID'])) { + (validateBookingCallbackInput as FunctionWithErrors).errors = ( + BasicValidation.validateIDRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; +} + +/** + * This function validates the outputs of bookingCallback() + */ +export function validateBookingCallbackOutput( + response: ResponseData, +): response is Signatures.BookingCallbackResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateBookingCallbackResponse500Response(response.body)) { + (validateBookingCallbackOutput as FunctionWithErrors).errors = ( + BasicValidation.validateBookingCallbackResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateBookingCallbackOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} diff --git a/services/experiment/src/clients/booking-backend/signatures.ts b/services/experiment/src/clients/booking-backend/signatures.ts new file mode 100644 index 00000000..3569d504 --- /dev/null +++ b/services/experiment/src/clients/booking-backend/signatures.ts @@ -0,0 +1,329 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * Typing for the parameters of the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingResponse = LockBookingSuccessResponse | LockBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingSuccessResponse = LockBookingResponse200; + +/** + * Typing for all error responses to the request made by lockBooking() + * @category lockBooking() + */ +export type LockBookingErrorResponse = + | LockBookingResponse401 + | LockBookingResponse403 + | LockBookingResponse404 + | LockBookingResponse412 + | LockBookingResponse500 + | LockBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + Requested: string; + Selected: string; + [k: string]: unknown; + }[]; +} + +/** + * Typing for a response with status 401 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 412 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse412 extends Types.ErrorResponse { + status: 412; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by lockBooking() + * @category lockBooking() + */ +export interface LockBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingResponse = + | UnlockBookingSuccessResponse + | UnlockBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingSuccessResponse = UnlockBookingResponse200; + +/** + * Typing for all error responses to the request made by unlockBooking() + * @category unlockBooking() + */ +export type UnlockBookingErrorResponse = + | UnlockBookingResponse401 + | UnlockBookingResponse403 + | UnlockBookingResponse404 + | UnlockBookingResponse412 + | UnlockBookingResponse500 + | UnlockBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 412 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse412 extends Types.ErrorResponse { + status: 412; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by unlockBooking() + * @category unlockBooking() + */ +export interface UnlockBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackResponse = + | BookingCallbackSuccessResponse + | BookingCallbackErrorResponse; + +/** + * Typing for all successful responses to the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackSuccessResponse = BookingCallbackResponse200; + +/** + * Typing for all error responses to the request made by bookingCallback() + * @category bookingCallback() + */ +export type BookingCallbackErrorResponse = + | BookingCallbackResponse404 + | BookingCallbackResponse500 + | BookingCallbackResponse503; + +/** + * Typing for a response with status 200 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by bookingCallback() + * @category bookingCallback() + */ +export interface BookingCallbackResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} diff --git a/services/experiment/src/clients/booking/types.ts b/services/experiment/src/clients/booking-backend/types.ts similarity index 99% rename from services/experiment/src/clients/booking/types.ts rename to services/experiment/src/clients/booking-backend/types.ts index 1630020b..2d71aa30 100644 --- a/services/experiment/src/clients/booking/types.ts +++ b/services/experiment/src/clients/booking-backend/types.ts @@ -167,6 +167,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -217,6 +218,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -267,6 +269,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -332,6 +335,7 @@ export type Experiment = T ext Devices: Device[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; @@ -344,6 +348,7 @@ export type Experiment = T ext Devices: Device<'request'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; @@ -356,6 +361,7 @@ export type Experiment = T ext Devices: Device<'response'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; diff --git a/services/experiment/src/clients/booking-frontend/basicValidation.cjs b/services/experiment/src/clients/booking-frontend/basicValidation.cjs new file mode 100644 index 00000000..25c648d5 --- /dev/null +++ b/services/experiment/src/clients/booking-frontend/basicValidation.cjs @@ -0,0 +1,8434 @@ +/* eslint-disable */ +//@ts-nocheck +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +'use strict'; +exports.validateBooking = validate21; +const schema6 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'Booking', + 'x-location': '#/components/schemas/Booking', + 'x-schema-type': 'all', +}; +const formats0 = require('ajv-formats/dist/formats').fullFormats.uri; +const formats2 = require('ajv-formats/dist/formats').fullFormats['date-time']; +function validate21( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate21.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema6.required, + parentSchema: schema6, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.ID.type, + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema6.properties.Time.required, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.Start.type, + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.End.type, + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.properties.Time.type, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Devices.items.type, + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema6.properties.Devices.type, + parentSchema: schema6.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Type.type, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Type.enum, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Status.type, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Status.enum, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.You.type, + parentSchema: schema6.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.External.type, + parentSchema: schema6.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Message.type, + parentSchema: schema6.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate21.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.type, + parentSchema: schema6, + data, + }, + ]; + return false; + } + } + validate21.errors = vErrors; + return errors === 0; +} +exports.validateDevice = validate22; +const schema7 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'Device', + 'x-location': '#/components/schemas/Device', + 'x-schema-type': 'all', +}; +function validate22( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate22.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema7.required, + parentSchema: schema7, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema7.properties.ID.type, + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate22.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema7.type, + parentSchema: schema7, + data, + }, + ]; + return false; + } + } + validate22.errors = vErrors; + return errors === 0; +} +exports.validateExperiment = validate23; +const schema8 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'Experiment', + 'x-location': '#/components/schemas/Experiment', + 'x-schema-type': 'all', +}; +function validate23( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate23.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema8.required, + parentSchema: schema8, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema8.properties.Devices.items.required, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema8.properties.Devices.items.properties.ID.type, + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.properties.Devices.items.type, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema8.properties.Devices.type, + parentSchema: schema8.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate23.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema8.properties.Description.type, + parentSchema: schema8.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate23.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.type, + parentSchema: schema8, + data, + }, + ]; + return false; + } + } + validate23.errors = vErrors; + return errors === 0; +} +exports.validateTimeslot = validate24; +const schema9 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'Timeslot', + 'x-location': '#/components/schemas/Timeslot', + 'x-schema-type': 'all', +}; +function validate24( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate24.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema9.required, + parentSchema: schema9, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.Start.type, + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.End.type, + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate24.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema9.type, + parentSchema: schema9, + data, + }, + ]; + return false; + } + } + validate24.errors = vErrors; + return errors === 0; +} +exports.validateID = validate25; +const schema10 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'ID', + 'x-location': '#/components/parameters/ID/schema', + 'x-schema-type': 'all', +}; +function validate25( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate25.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema10.type, + parentSchema: schema10, + data, + }, + ]; + return false; + } + validate25.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingBody = validate26; +const schema11 = { + type: 'object', + required: ['Devices', 'Time'], + properties: { + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingBody', + 'x-location': '#/paths//booking/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate26( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate26.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema11.required, + parentSchema: schema11, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate26.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema11.properties.Devices.items.required, + parentSchema: schema11.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate26.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema11.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.properties.Devices.items.properties.ID.type, + parentSchema: + schema11.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.properties.Devices.items.type, + parentSchema: schema11.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema11.properties.Devices.type, + parentSchema: schema11.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data3 = data.Time; + const _errs7 = errors; + if (errors === _errs7) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing2; + if ( + (data3.Start === undefined && (missing2 = 'Start')) || + (data3.End === undefined && (missing2 = 'End')) + ) { + validate26.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema11.properties.Time.required, + parentSchema: schema11.properties.Time, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate26.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema11.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.properties.Time.properties.Start.type, + parentSchema: schema11.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate26.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema11.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.properties.Time.properties.End.type, + parentSchema: schema11.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.properties.Time.type, + parentSchema: schema11.properties.Time, + data: data3, + }, + ]; + return false; + } + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate26.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.properties.Type.type, + parentSchema: schema11.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate26.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema11.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema11.properties.Type.enum, + parentSchema: schema11.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate26.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.type, + parentSchema: schema11, + data, + }, + ]; + return false; + } + } + validate26.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse200 = validate27; +const schema12 = { + type: 'object', + required: ['BookingID'], + properties: { + BookingID: { + type: 'string', + format: 'uri', + description: 'ID at which the booking can be managed.', + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingResponse200', + 'x-location': '#/paths//booking/post/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate27( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate27.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema12.required, + parentSchema: schema12, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate27.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema12.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema12.properties.BookingID.type, + parentSchema: schema12.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate27.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema12.type, + parentSchema: schema12, + data, + }, + ]; + return false; + } + } + validate27.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse500 = validate28; +const schema13 = { + description: 'Error description', + type: 'string', + 'x-standalone': false, + 'x-name': 'newBookingResponse500', + 'x-location': '#/paths//booking/post/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate28( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate28.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema13.type, + parentSchema: schema13, + data, + }, + ]; + return false; + } + validate28.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingBody = validate29; +const schema14 = { + anyOf: [ + { + type: 'object', + description: 'Use this request for adding devices.', + properties: { + Locked: { + type: 'boolean', + description: + 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', + }, + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + }, + }, + { + type: 'object', + description: 'Use this request for adding callbacks.', + properties: { + Callback: { + type: 'string', + format: 'uri', + description: 'Callback which should be called at changes.', + }, + }, + }, + ], + 'x-standalone': false, + 'x-name': 'updateBookingBody', + 'x-location': '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate29( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Locked !== undefined) { + let data0 = data.Locked; + const _errs3 = errors; + if (typeof data0 !== 'boolean') { + const err0 = { + instancePath: instancePath + '/Locked', + schemaPath: '#/anyOf/0/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema14.anyOf[0].properties.Locked.type, + parentSchema: schema14.anyOf[0].properties.Locked, + data: data0, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.Devices !== undefined) { + let data1 = data.Devices; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing0; + if (data2.ID === undefined && (missing0 = 'ID')) { + const err1 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema14.anyOf[0].properties.Devices.items.required, + parentSchema: schema14.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + const err2 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema14.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } else { + const err3 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema14.anyOf[0].properties.Devices.items.properties.ID + .type, + parentSchema: + schema14.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + } + } + } + } + } else { + const err4 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema14.anyOf[0].properties.Devices.items.type, + parentSchema: schema14.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + const err5 = { + instancePath: instancePath + '/Devices', + schemaPath: '#/anyOf/0/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema14.anyOf[0].properties.Devices.type, + parentSchema: schema14.anyOf[0].properties.Devices, + data: data1, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema14.anyOf[0].type, + parentSchema: schema14.anyOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Callback !== undefined) { + let data4 = data.Callback; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + const err7 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema14.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.anyOf[1].properties.Callback.type, + parentSchema: schema14.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } else { + const err9 = { + instancePath, + schemaPath: '#/anyOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema14.anyOf[1].type, + parentSchema: schema14.anyOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var _valid0 = _errs11 === errors; + valid0 = valid0 || _valid0; + } + if (!valid0) { + const err10 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema14.anyOf, + parentSchema: schema14, + data, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + validate29.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate29.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse200 = validate30; +const schema15 = { + type: 'object', + required: ['BookingID'], + properties: { BookingID: { type: 'string', format: 'uri' } }, + 'x-standalone': false, + 'x-name': 'updateBookingResponse200', + 'x-location': + '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate30( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate30.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema15.required, + parentSchema: schema15, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate30.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema15.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate30.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.properties.BookingID.type, + parentSchema: schema15.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate30.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema15.type, + parentSchema: schema15, + data, + }, + ]; + return false; + } + } + validate30.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse400 = validate31; +const schema16 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse400', + 'x-location': + '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate31( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate31.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.type, + parentSchema: schema16, + data, + }, + ]; + return false; + } + validate31.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse500 = validate32; +const schema17 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate32( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate32.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.type, + parentSchema: schema17, + data, + }, + ]; + return false; + } + validate32.errors = vErrors; + return errors === 0; +} +exports.validateDeleteBookingResponse500 = validate33; +const schema18 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'deleteBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate33( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate33.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.type, + parentSchema: schema18, + data, + }, + ]; + return false; + } + validate33.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse200 = validate34; +const schema19 = { + type: 'object', + required: ['Booking', 'Locked'], + properties: { + Booking: { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + }, + Locked: { + type: 'boolean', + description: 'Shows if the booking is in a locked status.', + }, + }, + 'x-standalone': false, + 'x-name': 'getBookingResponse200', + 'x-location': '#/paths//booking/{ID}/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate34( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Booking === undefined && (missing0 = 'Booking')) || + (data.Locked === undefined && (missing0 = 'Locked')) + ) { + validate34.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema19.required, + parentSchema: schema19, + data, + }, + ]; + return false; + } else { + if (data.Booking !== undefined) { + let data0 = data.Booking; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.ID === undefined && (missing1 = 'ID')) || + (data0.Time === undefined && (missing1 = 'Time')) || + (data0.Devices === undefined && (missing1 = 'Devices')) || + (data0.Status === undefined && (missing1 = 'Status')) || + (data0.You === undefined && (missing1 = 'You')) || + (data0.External === undefined && (missing1 = 'External')) + ) { + validate34.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema19.properties.Booking.required, + parentSchema: schema19.properties.Booking, + data: data0, + }, + ]; + return false; + } else { + if (data0.ID !== undefined) { + let data1 = data0.ID; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema19.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema19.properties.Booking.properties.ID.type, + parentSchema: schema19.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Time !== undefined) { + let data2 = data0.Time; + const _errs5 = errors; + if (errors === _errs5) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if ( + (data2.Start === undefined && (missing2 = 'Start')) || + (data2.End === undefined && (missing2 = 'End')) + ) { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema19.properties.Booking.properties.Time.required, + parentSchema: schema19.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } else { + if (data2.Start !== undefined) { + let data3 = data2.Start; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate34.errors = [ + { + instancePath: + instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema19.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema19.properties.Booking.properties.Time + .properties.Start.type, + parentSchema: + schema19.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data2.End !== undefined) { + let data4 = data2.End; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate34.errors = [ + { + instancePath: + instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema19.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema19.properties.Booking.properties.Time + .properties.End.type, + parentSchema: + schema19.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.properties.Booking.properties.Time.type, + parentSchema: schema19.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Devices !== undefined) { + let data5 = data0.Devices; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate34.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema19.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } else { + validate34.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema19.properties.Booking.properties.Devices + .items.type, + parentSchema: + schema19.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } + } + var valid3 = _errs13 === errors; + if (!valid3) { + break; + } + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/Devices', + schemaPath: '#/properties/Booking/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema19.properties.Booking.properties.Devices.type, + parentSchema: + schema19.properties.Booking.properties.Devices, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Type !== undefined) { + let data7 = data0.Type; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema19.properties.Booking.properties.Type.type, + parentSchema: schema19.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + if (!(data7 === 'normal')) { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/enum', + keyword: 'enum', + params: { + allowedValues: + schema19.properties.Booking.properties.Type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema19.properties.Booking.properties.Type.enum, + parentSchema: schema19.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + var valid1 = _errs15 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Status !== undefined) { + let data8 = data0.Status; + const _errs17 = errors; + if (typeof data8 !== 'string') { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema19.properties.Booking.properties.Status.type, + parentSchema: + schema19.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + if ( + !( + data8 === 'pending' || + data8 === 'booked' || + data8 === 'rejected' || + data8 === 'cancelled' || + data8 === 'active' || + data8 === 'active-pending' || + data8 === 'active-rejected' + ) + ) { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/enum', + keyword: 'enum', + params: { + allowedValues: + schema19.properties.Booking.properties.Status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema19.properties.Booking.properties.Status.enum, + parentSchema: + schema19.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + var valid1 = _errs17 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.You !== undefined) { + let data9 = data0.You; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/You', + schemaPath: '#/properties/Booking/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema19.properties.Booking.properties.You.type, + parentSchema: + schema19.properties.Booking.properties.You, + data: data9, + }, + ]; + return false; + } + var valid1 = _errs19 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.External !== undefined) { + let data10 = data0.External; + const _errs21 = errors; + if (typeof data10 !== 'boolean') { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/External', + schemaPath: + '#/properties/Booking/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema19.properties.Booking.properties.External + .type, + parentSchema: + schema19.properties.Booking.properties.External, + data: data10, + }, + ]; + return false; + } + var valid1 = _errs21 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Message !== undefined) { + let data11 = data0.Message; + const _errs23 = errors; + if (typeof data11 !== 'string') { + validate34.errors = [ + { + instancePath: instancePath + '/Booking/Message', + schemaPath: + '#/properties/Booking/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema19.properties.Booking.properties.Message + .type, + parentSchema: + schema19.properties.Booking.properties.Message, + data: data11, + }, + ]; + return false; + } + var valid1 = _errs23 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.properties.Booking.type, + parentSchema: schema19.properties.Booking, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Locked !== undefined) { + let data12 = data.Locked; + const _errs25 = errors; + if (typeof data12 !== 'boolean') { + validate34.errors = [ + { + instancePath: instancePath + '/Locked', + schemaPath: '#/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema19.properties.Locked.type, + parentSchema: schema19.properties.Locked, + data: data12, + }, + ]; + return false; + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate34.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.type, + parentSchema: schema19, + data, + }, + ]; + return false; + } + } + validate34.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse500 = validate35; +const schema20 = { + type: 'string', + description: 'Error code', + 'x-standalone': false, + 'x-name': 'getBookingResponse500', + 'x-location': '#/paths//booking/{ID}/get/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate35( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate35.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema20.type, + parentSchema: schema20, + data, + }, + ]; + return false; + } + validate35.errors = vErrors; + return errors === 0; +} +exports.validateDestroyBookingResponse500 = validate36; +const schema21 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'destroyBookingResponse500', + 'x-location': + '#/paths//booking/{ID}/destroy/delete/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate36( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate36.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.type, + parentSchema: schema21, + data, + }, + ]; + return false; + } + validate36.errors = vErrors; + return errors === 0; +} +exports.validateBookingRequest = validate37; +const schema22 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingRequest', + 'x-location': '#/components/schemas/Booking_request', + 'x-schema-type': 'request', +}; +function validate37( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate37.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema22.required, + parentSchema: schema22, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate37.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema22.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.ID.type, + parentSchema: schema22.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate37.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema22.properties.Time.required, + parentSchema: schema22.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate37.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema22.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.Time.properties.Start.type, + parentSchema: schema22.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate37.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema22.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.Time.properties.End.type, + parentSchema: schema22.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema22.properties.Time.type, + parentSchema: schema22.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate37.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema22.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.Devices.items.type, + parentSchema: schema22.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema22.properties.Devices.type, + parentSchema: schema22.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate37.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.Type.type, + parentSchema: schema22.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate37.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema22.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema22.properties.Type.enum, + parentSchema: schema22.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate37.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.Status.type, + parentSchema: schema22.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate37.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema22.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema22.properties.Status.enum, + parentSchema: schema22.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate37.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema22.properties.You.type, + parentSchema: schema22.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate37.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema22.properties.External.type, + parentSchema: schema22.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate37.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.Message.type, + parentSchema: schema22.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate37.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema22.type, + parentSchema: schema22, + data, + }, + ]; + return false; + } + } + validate37.errors = vErrors; + return errors === 0; +} +exports.validateBookingResponse = validate38; +const schema23 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingResponse', + 'x-location': '#/components/schemas/Booking_response', + 'x-schema-type': 'response', +}; +function validate38( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate38.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema23.required, + parentSchema: schema23, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate38.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema23.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.properties.ID.type, + parentSchema: schema23.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate38.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema23.properties.Time.required, + parentSchema: schema23.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate38.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema23.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.properties.Time.properties.Start.type, + parentSchema: schema23.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate38.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema23.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.properties.Time.properties.End.type, + parentSchema: schema23.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema23.properties.Time.type, + parentSchema: schema23.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate38.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema23.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.properties.Devices.items.type, + parentSchema: schema23.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema23.properties.Devices.type, + parentSchema: schema23.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate38.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.properties.Type.type, + parentSchema: schema23.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate38.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema23.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema23.properties.Type.enum, + parentSchema: schema23.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate38.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.properties.Status.type, + parentSchema: schema23.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate38.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema23.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema23.properties.Status.enum, + parentSchema: schema23.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate38.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema23.properties.You.type, + parentSchema: schema23.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate38.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema23.properties.External.type, + parentSchema: schema23.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate38.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.properties.Message.type, + parentSchema: schema23.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate38.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema23.type, + parentSchema: schema23, + data, + }, + ]; + return false; + } + } + validate38.errors = vErrors; + return errors === 0; +} +exports.validateDeviceRequest = validate39; +const schema24 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceRequest', + 'x-location': '#/components/schemas/Device_request', + 'x-schema-type': 'request', +}; +function validate39( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate39.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema24.required, + parentSchema: schema24, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate39.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema24.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate39.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema24.properties.ID.type, + parentSchema: schema24.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate39.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema24.type, + parentSchema: schema24, + data, + }, + ]; + return false; + } + } + validate39.errors = vErrors; + return errors === 0; +} +exports.validateDeviceResponse = validate40; +const schema25 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceResponse', + 'x-location': '#/components/schemas/Device_response', + 'x-schema-type': 'response', +}; +function validate40( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate40.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema25.required, + parentSchema: schema25, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate40.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema25.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate40.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.properties.ID.type, + parentSchema: schema25.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate40.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema25.type, + parentSchema: schema25, + data, + }, + ]; + return false; + } + } + validate40.errors = vErrors; + return errors === 0; +} +exports.validateExperimentRequest = validate41; +const schema26 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentRequest', + 'x-location': '#/components/schemas/Experiment_request', + 'x-schema-type': 'request', +}; +function validate41( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate41.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema26.required, + parentSchema: schema26, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate41.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema26.properties.Devices.items.required, + parentSchema: schema26.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate41.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema26.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema26.properties.Devices.items.properties.ID.type, + parentSchema: + schema26.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.properties.Devices.items.type, + parentSchema: schema26.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema26.properties.Devices.type, + parentSchema: schema26.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate41.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.properties.Description.type, + parentSchema: schema26.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate41.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.type, + parentSchema: schema26, + data, + }, + ]; + return false; + } + } + validate41.errors = vErrors; + return errors === 0; +} +exports.validateExperimentResponse = validate42; +const schema27 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentResponse', + 'x-location': '#/components/schemas/Experiment_response', + 'x-schema-type': 'response', +}; +function validate42( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate42.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema27.required, + parentSchema: schema27, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate42.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema27.properties.Devices.items.required, + parentSchema: schema27.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate42.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.properties.Devices.items.properties.ID.type, + parentSchema: + schema27.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.properties.Devices.items.type, + parentSchema: schema27.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.properties.Devices.type, + parentSchema: schema27.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate42.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.properties.Description.type, + parentSchema: schema27.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate42.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.type, + parentSchema: schema27, + data, + }, + ]; + return false; + } + } + validate42.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotRequest = validate43; +const schema28 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotRequest', + 'x-location': '#/components/schemas/Timeslot_request', + 'x-schema-type': 'request', +}; +function validate43( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate43.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema28.required, + parentSchema: schema28, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate43.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema28.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema28.properties.Start.type, + parentSchema: schema28.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate43.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema28.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema28.properties.End.type, + parentSchema: schema28.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate43.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema28.type, + parentSchema: schema28, + data, + }, + ]; + return false; + } + } + validate43.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotResponse = validate44; +const schema29 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotResponse', + 'x-location': '#/components/schemas/Timeslot_response', + 'x-schema-type': 'response', +}; +function validate44( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate44.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema29.required, + parentSchema: schema29, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate44.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema29.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema29.properties.Start.type, + parentSchema: schema29.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate44.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema29.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema29.properties.End.type, + parentSchema: schema29.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate44.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema29.type, + parentSchema: schema29, + data, + }, + ]; + return false; + } + } + validate44.errors = vErrors; + return errors === 0; +} +exports.validateIDRequest = validate45; +const schema30 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDRequest', + 'x-location': '#/components/parameters/ID/schema_request', + 'x-schema-type': 'request', +}; +function validate45( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate45.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema30.type, + parentSchema: schema30, + data, + }, + ]; + return false; + } + validate45.errors = vErrors; + return errors === 0; +} +exports.validateIDResponse = validate46; +const schema31 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDResponse', + 'x-location': '#/components/parameters/ID/schema_response', + 'x-schema-type': 'response', +}; +function validate46( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate46.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.type, + parentSchema: schema31, + data, + }, + ]; + return false; + } + validate46.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingBodyRequest = validate47; +const schema32 = { + type: 'object', + required: ['Devices', 'Time'], + properties: { + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingBodyRequest', + 'x-location': + '#/paths//booking/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate47( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate47.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema32.required, + parentSchema: schema32, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate47.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema32.properties.Devices.items.required, + parentSchema: schema32.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate47.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema32.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema32.properties.Devices.items.properties.ID.type, + parentSchema: + schema32.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema32.properties.Devices.items.type, + parentSchema: schema32.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema32.properties.Devices.type, + parentSchema: schema32.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data3 = data.Time; + const _errs7 = errors; + if (errors === _errs7) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing2; + if ( + (data3.Start === undefined && (missing2 = 'Start')) || + (data3.End === undefined && (missing2 = 'End')) + ) { + validate47.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema32.properties.Time.required, + parentSchema: schema32.properties.Time, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate47.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema32.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.properties.Time.properties.Start.type, + parentSchema: schema32.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate47.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema32.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.properties.Time.properties.End.type, + parentSchema: schema32.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate47.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema32.properties.Time.type, + parentSchema: schema32.properties.Time, + data: data3, + }, + ]; + return false; + } + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate47.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.properties.Type.type, + parentSchema: schema32.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate47.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema32.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema32.properties.Type.enum, + parentSchema: schema32.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate47.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema32.type, + parentSchema: schema32, + data, + }, + ]; + return false; + } + } + validate47.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingBodyResponse = validate48; +const schema33 = { + type: 'object', + required: ['Devices', 'Time'], + properties: { + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingBodyResponse', + 'x-location': + '#/paths//booking/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate48( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate48.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema33.required, + parentSchema: schema33, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate48.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema33.properties.Devices.items.required, + parentSchema: schema33.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate48.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema33.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate48.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema33.properties.Devices.items.properties.ID.type, + parentSchema: + schema33.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate48.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema33.properties.Devices.items.type, + parentSchema: schema33.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate48.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema33.properties.Devices.type, + parentSchema: schema33.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data3 = data.Time; + const _errs7 = errors; + if (errors === _errs7) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing2; + if ( + (data3.Start === undefined && (missing2 = 'Start')) || + (data3.End === undefined && (missing2 = 'End')) + ) { + validate48.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema33.properties.Time.required, + parentSchema: schema33.properties.Time, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate48.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema33.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate48.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema33.properties.Time.properties.Start.type, + parentSchema: schema33.properties.Time.properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate48.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema33.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate48.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema33.properties.Time.properties.End.type, + parentSchema: schema33.properties.Time.properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate48.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema33.properties.Time.type, + parentSchema: schema33.properties.Time, + data: data3, + }, + ]; + return false; + } + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate48.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema33.properties.Type.type, + parentSchema: schema33.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate48.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema33.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema33.properties.Type.enum, + parentSchema: schema33.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate48.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema33.type, + parentSchema: schema33, + data, + }, + ]; + return false; + } + } + validate48.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse200Request = validate49; +const schema34 = { + type: 'object', + required: ['BookingID'], + properties: { + BookingID: { + type: 'string', + format: 'uri', + description: 'ID at which the booking can be managed.', + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingResponse200Request', + 'x-location': + '#/paths//booking/post/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate49( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate49.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema34.required, + parentSchema: schema34, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate49.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema34.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate49.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema34.properties.BookingID.type, + parentSchema: schema34.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate49.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema34.type, + parentSchema: schema34, + data, + }, + ]; + return false; + } + } + validate49.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse200Response = validate50; +const schema35 = { + type: 'object', + required: ['BookingID'], + properties: { + BookingID: { + type: 'string', + format: 'uri', + description: 'ID at which the booking can be managed.', + }, + }, + 'x-standalone': false, + 'x-name': 'newBookingResponse200Response', + 'x-location': + '#/paths//booking/post/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate50( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate50.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema35.required, + parentSchema: schema35, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate50.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema35.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate50.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema35.properties.BookingID.type, + parentSchema: schema35.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate50.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema35.type, + parentSchema: schema35, + data, + }, + ]; + return false; + } + } + validate50.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse500Request = validate51; +const schema36 = { + description: 'Error description', + type: 'string', + 'x-standalone': false, + 'x-name': 'newBookingResponse500Request', + 'x-location': + '#/paths//booking/post/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate51( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate51.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema36.type, + parentSchema: schema36, + data, + }, + ]; + return false; + } + validate51.errors = vErrors; + return errors === 0; +} +exports.validateNewBookingResponse500Response = validate52; +const schema37 = { + description: 'Error description', + type: 'string', + 'x-standalone': false, + 'x-name': 'newBookingResponse500Response', + 'x-location': + '#/paths//booking/post/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate52( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate52.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema37.type, + parentSchema: schema37, + data, + }, + ]; + return false; + } + validate52.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingBodyRequest = validate53; +const schema38 = { + anyOf: [ + { + type: 'object', + description: 'Use this request for adding devices.', + properties: { + Locked: { + type: 'boolean', + description: + 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', + }, + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + }, + }, + { + type: 'object', + description: 'Use this request for adding callbacks.', + properties: { + Callback: { + type: 'string', + format: 'uri', + description: 'Callback which should be called at changes.', + }, + }, + }, + ], + 'x-standalone': false, + 'x-name': 'updateBookingBodyRequest', + 'x-location': + '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate53( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Locked !== undefined) { + let data0 = data.Locked; + const _errs3 = errors; + if (typeof data0 !== 'boolean') { + const err0 = { + instancePath: instancePath + '/Locked', + schemaPath: '#/anyOf/0/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema38.anyOf[0].properties.Locked.type, + parentSchema: schema38.anyOf[0].properties.Locked, + data: data0, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.Devices !== undefined) { + let data1 = data.Devices; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing0; + if (data2.ID === undefined && (missing0 = 'ID')) { + const err1 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema38.anyOf[0].properties.Devices.items.required, + parentSchema: schema38.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + const err2 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema38.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } else { + const err3 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema38.anyOf[0].properties.Devices.items.properties.ID + .type, + parentSchema: + schema38.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + } + } + } + } + } else { + const err4 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema38.anyOf[0].properties.Devices.items.type, + parentSchema: schema38.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + const err5 = { + instancePath: instancePath + '/Devices', + schemaPath: '#/anyOf/0/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema38.anyOf[0].properties.Devices.type, + parentSchema: schema38.anyOf[0].properties.Devices, + data: data1, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema38.anyOf[0].type, + parentSchema: schema38.anyOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Callback !== undefined) { + let data4 = data.Callback; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + const err7 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema38.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema38.anyOf[1].properties.Callback.type, + parentSchema: schema38.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } else { + const err9 = { + instancePath, + schemaPath: '#/anyOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema38.anyOf[1].type, + parentSchema: schema38.anyOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var _valid0 = _errs11 === errors; + valid0 = valid0 || _valid0; + } + if (!valid0) { + const err10 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema38.anyOf, + parentSchema: schema38, + data, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + validate53.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate53.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingBodyResponse = validate54; +const schema39 = { + anyOf: [ + { + type: 'object', + description: 'Use this request for adding devices.', + properties: { + Locked: { + type: 'boolean', + description: + 'Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set.', + }, + Devices: { + type: 'array', + description: 'List of devices which should be added.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + }, + }, + { + type: 'object', + description: 'Use this request for adding callbacks.', + properties: { + Callback: { + type: 'string', + format: 'uri', + description: 'Callback which should be called at changes.', + }, + }, + }, + ], + 'x-standalone': false, + 'x-name': 'updateBookingBodyResponse', + 'x-location': + '#/paths//booking/{ID}/patch/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate54( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Locked !== undefined) { + let data0 = data.Locked; + const _errs3 = errors; + if (typeof data0 !== 'boolean') { + const err0 = { + instancePath: instancePath + '/Locked', + schemaPath: '#/anyOf/0/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema39.anyOf[0].properties.Locked.type, + parentSchema: schema39.anyOf[0].properties.Locked, + data: data0, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.Devices !== undefined) { + let data1 = data.Devices; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing0; + if (data2.ID === undefined && (missing0 = 'ID')) { + const err1 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema39.anyOf[0].properties.Devices.items.required, + parentSchema: schema39.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + const err2 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema39.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } else { + const err3 = { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/anyOf/0/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema39.anyOf[0].properties.Devices.items.properties.ID + .type, + parentSchema: + schema39.anyOf[0].properties.Devices.items.properties + .ID, + data: data3, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + } + } + } + } + } else { + const err4 = { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/anyOf/0/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema39.anyOf[0].properties.Devices.items.type, + parentSchema: schema39.anyOf[0].properties.Devices.items, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + const err5 = { + instancePath: instancePath + '/Devices', + schemaPath: '#/anyOf/0/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema39.anyOf[0].properties.Devices.type, + parentSchema: schema39.anyOf[0].properties.Devices, + data: data1, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema39.anyOf[0].type, + parentSchema: schema39.anyOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.Callback !== undefined) { + let data4 = data.Callback; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + const err7 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema39.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: instancePath + '/Callback', + schemaPath: '#/anyOf/1/properties/Callback/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema39.anyOf[1].properties.Callback.type, + parentSchema: schema39.anyOf[1].properties.Callback, + data: data4, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } else { + const err9 = { + instancePath, + schemaPath: '#/anyOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema39.anyOf[1].type, + parentSchema: schema39.anyOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var _valid0 = _errs11 === errors; + valid0 = valid0 || _valid0; + } + if (!valid0) { + const err10 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema39.anyOf, + parentSchema: schema39, + data, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + validate54.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate54.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse200Request = validate55; +const schema40 = { + type: 'object', + required: ['BookingID'], + properties: { BookingID: { type: 'string', format: 'uri' } }, + 'x-standalone': false, + 'x-name': 'updateBookingResponse200Request', + 'x-location': + '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate55( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate55.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema40.required, + parentSchema: schema40, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate55.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema40.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate55.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema40.properties.BookingID.type, + parentSchema: schema40.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate55.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema40.type, + parentSchema: schema40, + data, + }, + ]; + return false; + } + } + validate55.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse200Response = validate56; +const schema41 = { + type: 'object', + required: ['BookingID'], + properties: { BookingID: { type: 'string', format: 'uri' } }, + 'x-standalone': false, + 'x-name': 'updateBookingResponse200Response', + 'x-location': + '#/paths//booking/{ID}/patch/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate56( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.BookingID === undefined && (missing0 = 'BookingID')) { + validate56.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema41.required, + parentSchema: schema41, + data, + }, + ]; + return false; + } else { + if (data.BookingID !== undefined) { + let data0 = data.BookingID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate56.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema41.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/BookingID', + schemaPath: '#/properties/BookingID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema41.properties.BookingID.type, + parentSchema: schema41.properties.BookingID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate56.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema41.type, + parentSchema: schema41, + data, + }, + ]; + return false; + } + } + validate56.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse400Request = validate57; +const schema42 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse400Request', + 'x-location': + '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate57( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate57.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema42.type, + parentSchema: schema42, + data, + }, + ]; + return false; + } + validate57.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse400Response = validate58; +const schema43 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse400Response', + 'x-location': + '#/paths//booking/{ID}/patch/responses/400/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate58( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate58.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema43.type, + parentSchema: schema43, + data, + }, + ]; + return false; + } + validate58.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse500Request = validate59; +const schema44 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate59( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate59.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema44.type, + parentSchema: schema44, + data, + }, + ]; + return false; + } + validate59.errors = vErrors; + return errors === 0; +} +exports.validateUpdateBookingResponse500Response = validate60; +const schema45 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'updateBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/patch/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate60( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate60.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema45.type, + parentSchema: schema45, + data, + }, + ]; + return false; + } + validate60.errors = vErrors; + return errors === 0; +} +exports.validateDeleteBookingResponse500Request = validate61; +const schema46 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'deleteBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate61( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate61.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema46.type, + parentSchema: schema46, + data, + }, + ]; + return false; + } + validate61.errors = vErrors; + return errors === 0; +} +exports.validateDeleteBookingResponse500Response = validate62; +const schema47 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'deleteBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/delete/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate62( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate62.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema47.type, + parentSchema: schema47, + data, + }, + ]; + return false; + } + validate62.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse200Request = validate63; +const schema48 = { + type: 'object', + required: ['Booking', 'Locked'], + properties: { + Booking: { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + }, + Locked: { + type: 'boolean', + description: 'Shows if the booking is in a locked status.', + }, + }, + 'x-standalone': false, + 'x-name': 'getBookingResponse200Request', + 'x-location': + '#/paths//booking/{ID}/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate63( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Booking === undefined && (missing0 = 'Booking')) || + (data.Locked === undefined && (missing0 = 'Locked')) + ) { + validate63.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema48.required, + parentSchema: schema48, + data, + }, + ]; + return false; + } else { + if (data.Booking !== undefined) { + let data0 = data.Booking; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.ID === undefined && (missing1 = 'ID')) || + (data0.Time === undefined && (missing1 = 'Time')) || + (data0.Devices === undefined && (missing1 = 'Devices')) || + (data0.Status === undefined && (missing1 = 'Status')) || + (data0.You === undefined && (missing1 = 'You')) || + (data0.External === undefined && (missing1 = 'External')) + ) { + validate63.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema48.properties.Booking.required, + parentSchema: schema48.properties.Booking, + data: data0, + }, + ]; + return false; + } else { + if (data0.ID !== undefined) { + let data1 = data0.ID; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema48.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } else { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema48.properties.Booking.properties.ID.type, + parentSchema: schema48.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Time !== undefined) { + let data2 = data0.Time; + const _errs5 = errors; + if (errors === _errs5) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if ( + (data2.Start === undefined && (missing2 = 'Start')) || + (data2.End === undefined && (missing2 = 'End')) + ) { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema48.properties.Booking.properties.Time.required, + parentSchema: schema48.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } else { + if (data2.Start !== undefined) { + let data3 = data2.Start; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate63.errors = [ + { + instancePath: + instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema48.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } else { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema48.properties.Booking.properties.Time + .properties.Start.type, + parentSchema: + schema48.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data2.End !== undefined) { + let data4 = data2.End; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate63.errors = [ + { + instancePath: + instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema48.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } else { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema48.properties.Booking.properties.Time + .properties.End.type, + parentSchema: + schema48.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema48.properties.Booking.properties.Time.type, + parentSchema: schema48.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Devices !== undefined) { + let data5 = data0.Devices; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate63.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema48.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } else { + validate63.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema48.properties.Booking.properties.Devices + .items.type, + parentSchema: + schema48.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } + } + var valid3 = _errs13 === errors; + if (!valid3) { + break; + } + } + } else { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/Devices', + schemaPath: '#/properties/Booking/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema48.properties.Booking.properties.Devices.type, + parentSchema: + schema48.properties.Booking.properties.Devices, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Type !== undefined) { + let data7 = data0.Type; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema48.properties.Booking.properties.Type.type, + parentSchema: schema48.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + if (!(data7 === 'normal')) { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/enum', + keyword: 'enum', + params: { + allowedValues: + schema48.properties.Booking.properties.Type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema48.properties.Booking.properties.Type.enum, + parentSchema: schema48.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + var valid1 = _errs15 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Status !== undefined) { + let data8 = data0.Status; + const _errs17 = errors; + if (typeof data8 !== 'string') { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema48.properties.Booking.properties.Status.type, + parentSchema: + schema48.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + if ( + !( + data8 === 'pending' || + data8 === 'booked' || + data8 === 'rejected' || + data8 === 'cancelled' || + data8 === 'active' || + data8 === 'active-pending' || + data8 === 'active-rejected' + ) + ) { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/enum', + keyword: 'enum', + params: { + allowedValues: + schema48.properties.Booking.properties.Status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema48.properties.Booking.properties.Status.enum, + parentSchema: + schema48.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + var valid1 = _errs17 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.You !== undefined) { + let data9 = data0.You; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/You', + schemaPath: '#/properties/Booking/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema48.properties.Booking.properties.You.type, + parentSchema: + schema48.properties.Booking.properties.You, + data: data9, + }, + ]; + return false; + } + var valid1 = _errs19 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.External !== undefined) { + let data10 = data0.External; + const _errs21 = errors; + if (typeof data10 !== 'boolean') { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/External', + schemaPath: + '#/properties/Booking/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema48.properties.Booking.properties.External + .type, + parentSchema: + schema48.properties.Booking.properties.External, + data: data10, + }, + ]; + return false; + } + var valid1 = _errs21 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Message !== undefined) { + let data11 = data0.Message; + const _errs23 = errors; + if (typeof data11 !== 'string') { + validate63.errors = [ + { + instancePath: instancePath + '/Booking/Message', + schemaPath: + '#/properties/Booking/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema48.properties.Booking.properties.Message + .type, + parentSchema: + schema48.properties.Booking.properties.Message, + data: data11, + }, + ]; + return false; + } + var valid1 = _errs23 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } + } else { + validate63.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema48.properties.Booking.type, + parentSchema: schema48.properties.Booking, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Locked !== undefined) { + let data12 = data.Locked; + const _errs25 = errors; + if (typeof data12 !== 'boolean') { + validate63.errors = [ + { + instancePath: instancePath + '/Locked', + schemaPath: '#/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema48.properties.Locked.type, + parentSchema: schema48.properties.Locked, + data: data12, + }, + ]; + return false; + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate63.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema48.type, + parentSchema: schema48, + data, + }, + ]; + return false; + } + } + validate63.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse200Response = validate64; +const schema49 = { + type: 'object', + required: ['Booking', 'Locked'], + properties: { + Booking: { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + }, + Locked: { + type: 'boolean', + description: 'Shows if the booking is in a locked status.', + }, + }, + 'x-standalone': false, + 'x-name': 'getBookingResponse200Response', + 'x-location': + '#/paths//booking/{ID}/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate64( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Booking === undefined && (missing0 = 'Booking')) || + (data.Locked === undefined && (missing0 = 'Locked')) + ) { + validate64.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema49.required, + parentSchema: schema49, + data, + }, + ]; + return false; + } else { + if (data.Booking !== undefined) { + let data0 = data.Booking; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.ID === undefined && (missing1 = 'ID')) || + (data0.Time === undefined && (missing1 = 'Time')) || + (data0.Devices === undefined && (missing1 = 'Devices')) || + (data0.Status === undefined && (missing1 = 'Status')) || + (data0.You === undefined && (missing1 = 'You')) || + (data0.External === undefined && (missing1 = 'External')) + ) { + validate64.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema49.properties.Booking.required, + parentSchema: schema49.properties.Booking, + data: data0, + }, + ]; + return false; + } else { + if (data0.ID !== undefined) { + let data1 = data0.ID; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema49.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } else { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/ID', + schemaPath: '#/properties/Booking/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema49.properties.Booking.properties.ID.type, + parentSchema: schema49.properties.Booking.properties.ID, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Time !== undefined) { + let data2 = data0.Time; + const _errs5 = errors; + if (errors === _errs5) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if ( + (data2.Start === undefined && (missing2 = 'Start')) || + (data2.End === undefined && (missing2 = 'End')) + ) { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema49.properties.Booking.properties.Time.required, + parentSchema: schema49.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } else { + if (data2.Start !== undefined) { + let data3 = data2.Start; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate64.errors = [ + { + instancePath: + instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema49.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } else { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Time/Start', + schemaPath: + '#/properties/Booking/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema49.properties.Booking.properties.Time + .properties.Start.type, + parentSchema: + schema49.properties.Booking.properties.Time + .properties.Start, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data2.End !== undefined) { + let data4 = data2.End; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate64.errors = [ + { + instancePath: + instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema49.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } else { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Time/End', + schemaPath: + '#/properties/Booking/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema49.properties.Booking.properties.Time + .properties.End.type, + parentSchema: + schema49.properties.Booking.properties.Time + .properties.End, + data: data4, + }, + ]; + return false; + } + } + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Time', + schemaPath: '#/properties/Booking/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema49.properties.Booking.properties.Time.type, + parentSchema: schema49.properties.Booking.properties.Time, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Devices !== undefined) { + let data5 = data0.Devices; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate64.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema49.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } else { + validate64.errors = [ + { + instancePath: + instancePath + '/Booking/Devices/' + i0, + schemaPath: + '#/properties/Booking/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema49.properties.Booking.properties.Devices + .items.type, + parentSchema: + schema49.properties.Booking.properties.Devices + .items, + data: data6, + }, + ]; + return false; + } + } + } + var valid3 = _errs13 === errors; + if (!valid3) { + break; + } + } + } else { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Devices', + schemaPath: '#/properties/Booking/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema49.properties.Booking.properties.Devices.type, + parentSchema: + schema49.properties.Booking.properties.Devices, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Type !== undefined) { + let data7 = data0.Type; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema49.properties.Booking.properties.Type.type, + parentSchema: schema49.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + if (!(data7 === 'normal')) { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Type', + schemaPath: '#/properties/Booking/properties/Type/enum', + keyword: 'enum', + params: { + allowedValues: + schema49.properties.Booking.properties.Type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema49.properties.Booking.properties.Type.enum, + parentSchema: schema49.properties.Booking.properties.Type, + data: data7, + }, + ]; + return false; + } + var valid1 = _errs15 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Status !== undefined) { + let data8 = data0.Status; + const _errs17 = errors; + if (typeof data8 !== 'string') { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema49.properties.Booking.properties.Status.type, + parentSchema: + schema49.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + if ( + !( + data8 === 'pending' || + data8 === 'booked' || + data8 === 'rejected' || + data8 === 'cancelled' || + data8 === 'active' || + data8 === 'active-pending' || + data8 === 'active-rejected' + ) + ) { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Status', + schemaPath: '#/properties/Booking/properties/Status/enum', + keyword: 'enum', + params: { + allowedValues: + schema49.properties.Booking.properties.Status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema49.properties.Booking.properties.Status.enum, + parentSchema: + schema49.properties.Booking.properties.Status, + data: data8, + }, + ]; + return false; + } + var valid1 = _errs17 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.You !== undefined) { + let data9 = data0.You; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/You', + schemaPath: '#/properties/Booking/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema49.properties.Booking.properties.You.type, + parentSchema: + schema49.properties.Booking.properties.You, + data: data9, + }, + ]; + return false; + } + var valid1 = _errs19 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.External !== undefined) { + let data10 = data0.External; + const _errs21 = errors; + if (typeof data10 !== 'boolean') { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/External', + schemaPath: + '#/properties/Booking/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema49.properties.Booking.properties.External + .type, + parentSchema: + schema49.properties.Booking.properties.External, + data: data10, + }, + ]; + return false; + } + var valid1 = _errs21 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Message !== undefined) { + let data11 = data0.Message; + const _errs23 = errors; + if (typeof data11 !== 'string') { + validate64.errors = [ + { + instancePath: instancePath + '/Booking/Message', + schemaPath: + '#/properties/Booking/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema49.properties.Booking.properties.Message + .type, + parentSchema: + schema49.properties.Booking.properties.Message, + data: data11, + }, + ]; + return false; + } + var valid1 = _errs23 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } + } else { + validate64.errors = [ + { + instancePath: instancePath + '/Booking', + schemaPath: '#/properties/Booking/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema49.properties.Booking.type, + parentSchema: schema49.properties.Booking, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Locked !== undefined) { + let data12 = data.Locked; + const _errs25 = errors; + if (typeof data12 !== 'boolean') { + validate64.errors = [ + { + instancePath: instancePath + '/Locked', + schemaPath: '#/properties/Locked/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema49.properties.Locked.type, + parentSchema: schema49.properties.Locked, + data: data12, + }, + ]; + return false; + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate64.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema49.type, + parentSchema: schema49, + data, + }, + ]; + return false; + } + } + validate64.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse500Request = validate65; +const schema50 = { + type: 'string', + description: 'Error code', + 'x-standalone': false, + 'x-name': 'getBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/get/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate65( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate65.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema50.type, + parentSchema: schema50, + data, + }, + ]; + return false; + } + validate65.errors = vErrors; + return errors === 0; +} +exports.validateGetBookingResponse500Response = validate66; +const schema51 = { + type: 'string', + description: 'Error code', + 'x-standalone': false, + 'x-name': 'getBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/get/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate66( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate66.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema51.type, + parentSchema: schema51, + data, + }, + ]; + return false; + } + validate66.errors = vErrors; + return errors === 0; +} +exports.validateDestroyBookingResponse500Request = validate67; +const schema52 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'destroyBookingResponse500Request', + 'x-location': + '#/paths//booking/{ID}/destroy/delete/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate67( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate67.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema52.type, + parentSchema: schema52, + data, + }, + ]; + return false; + } + validate67.errors = vErrors; + return errors === 0; +} +exports.validateDestroyBookingResponse500Response = validate68; +const schema53 = { + type: 'string', + description: 'Error description', + 'x-standalone': false, + 'x-name': 'destroyBookingResponse500Response', + 'x-location': + '#/paths//booking/{ID}/destroy/delete/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate68( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate68.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema53.type, + parentSchema: schema53, + data, + }, + ]; + return false; + } + validate68.errors = vErrors; + return errors === 0; +} diff --git a/services/experiment/src/clients/booking-frontend/basicValidation.d.cts b/services/experiment/src/clients/booking-frontend/basicValidation.d.cts new file mode 100644 index 00000000..986e0dcc --- /dev/null +++ b/services/experiment/src/clients/booking-frontend/basicValidation.d.cts @@ -0,0 +1,191 @@ +export declare function validateBooking( + object: unknown, +): Booking; + +export declare function validateDevice( + object: unknown, +): Device; + +export declare function validateExperiment( + object: unknown, +): Experiment; + +export declare function validateTimeslot( + object: unknown, +): Timeslot; + +export declare function validateID( + object: unknown, +): ID; + +export declare function validateNewBookingBody( + object: unknown, +): newBookingBody; + +export declare function validateNewBookingResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse200; + +export declare function validateNewBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse500; + +export declare function validateUpdateBookingBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingBody; + +export declare function validateUpdateBookingResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse200; + +export declare function validateUpdateBookingResponse400< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse400; + +export declare function validateUpdateBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse500; + +export declare function validateDeleteBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): deleteBookingResponse500; + +export declare function validateGetBookingResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse200; + +export declare function validateGetBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse500; + +export declare function validateDestroyBookingResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): destroyBookingResponse500; + +export declare function validateBookingRequest( + object: unknown, +): BookingRequest; + +export declare function validateBookingResponse( + object: unknown, +): BookingResponse; + +export declare function validateDeviceRequest( + object: unknown, +): DeviceRequest; + +export declare function validateDeviceResponse( + object: unknown, +): DeviceResponse; + +export declare function validateExperimentRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentRequest; + +export declare function validateExperimentResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentResponse; + +export declare function validateTimeslotRequest( + object: unknown, +): TimeslotRequest; + +export declare function validateTimeslotResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): TimeslotResponse; + +export declare function validateIDRequest( + object: unknown, +): IDRequest; + +export declare function validateIDResponse( + object: unknown, +): IDResponse; + +export declare function validateNewBookingBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingBodyRequest; + +export declare function validateNewBookingBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingBodyResponse; + +export declare function validateNewBookingResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse200Request; + +export declare function validateNewBookingResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse200Response; + +export declare function validateNewBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse500Request; + +export declare function validateNewBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): newBookingResponse500Response; + +export declare function validateUpdateBookingBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingBodyRequest; + +export declare function validateUpdateBookingBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingBodyResponse; + +export declare function validateUpdateBookingResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse200Request; + +export declare function validateUpdateBookingResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse200Response; + +export declare function validateUpdateBookingResponse400Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse400Request; + +export declare function validateUpdateBookingResponse400Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse400Response; + +export declare function validateUpdateBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse500Request; + +export declare function validateUpdateBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateBookingResponse500Response; + +export declare function validateDeleteBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): deleteBookingResponse500Request; + +export declare function validateDeleteBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): deleteBookingResponse500Response; + +export declare function validateGetBookingResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse200Request; + +export declare function validateGetBookingResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse200Response; + +export declare function validateGetBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse500Request; + +export declare function validateGetBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): getBookingResponse500Response; + +export declare function validateDestroyBookingResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): destroyBookingResponse500Request; + +export declare function validateDestroyBookingResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): destroyBookingResponse500Response; diff --git a/services/experiment/src/clients/booking/client.ts b/services/experiment/src/clients/booking-frontend/client.ts similarity index 63% rename from services/experiment/src/clients/booking/client.ts rename to services/experiment/src/clients/booking-frontend/client.ts index b2aea867..0fe8414a 100644 --- a/services/experiment/src/clients/booking/client.ts +++ b/services/experiment/src/clients/booking-frontend/client.ts @@ -221,86 +221,6 @@ export class Client { this.fixedHeaders = options.fixedHeaders ?? []; } - /** - * Returns the free / booked times for given experiment. - * - * @param body - * @param options.url - * Url of the to be used. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * Timetable of free/booked time. If 'Combined' is set to true, an array with only one entry is returned containing the combined timetable. - */ - public async schedule( - body: { - /** - * An experiment describes a set of devices and how they should be connected (potentially among other metadata). - */ - Experiment: Types.Experiment<'request'>; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: Types.Timeslot<'request'>; - /** - * If true, show only one timetable per device instead of one for all available physical devices. - */ - Combined?: boolean; - /** - * (private) Show only devices of this institution. Give an error if a device of an other institution is requested. - */ - onlyOwn?: boolean; - [k: string]: unknown; - }, - options?: { - headers?: [string, string][]; - url?: string; - }, - ): Promise { - const url = appendToUrl(options?.url ?? this.baseUrl, '/schedule'); - - if (!RequestValidation.validateScheduleInput(body)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateScheduleInput as Types.FunctionWithErrors).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); - - if (!RequestValidation.validateScheduleOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateScheduleOutput as Types.FunctionWithErrors).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - /** * Books an experiment. * @@ -378,24 +298,25 @@ export class Client { } /** - * Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. - * - * @param url - * Url of the resource to be accessed. - * @param body - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The booking change was accepted. The booking status will display whether the booking of all devices was successful. - */ + * Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. + + * + * @param url + * Url of the resource to be accessed. + * @param body + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The booking change was accepted. The booking status will display whether the booking of all devices was successful. + */ public async updateBooking( url: string, body: @@ -661,201 +582,4 @@ export class Client { response, ); } - - /** - * Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * All devices were booked by user. - */ - public async lockBooking( - url: string, - options?: { - headers?: [string, string][]; - }, - ): Promise { - const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); - - const parameters = { - ID: ID, - }; - - if (!RequestValidation.validateLockBookingInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateLockBookingInput as Types.FunctionWithErrors).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'PUT', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); - - if (!RequestValidation.validateLockBookingOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateLockBookingOutput as Types.FunctionWithErrors).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * Unlocks all devices belonging to a booking, status will be set to 'booked'. - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * Unlocking was successful. - */ - public async unlockBooking( - url: string, - options?: { - headers?: [string, string][]; - }, - ): Promise { - const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); - - const parameters = { - ID: ID, - }; - - if (!RequestValidation.validateUnlockBookingInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateUnlockBookingInput as Types.FunctionWithErrors).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); - - if (!RequestValidation.validateUnlockBookingOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateUnlockBookingOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - } - - /** - * Callback used for updating device info / booking info. - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * Update was processed. - */ - public async bookingCallback( - url: string, - options?: { - headers?: [string, string][]; - }, - ): Promise { - const urlSuffix = '/booking_callback/{}'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking_callback/{}'); - - const parameters = { - ID: ID, - }; - - if (!RequestValidation.validateBookingCallbackInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validateBookingCallbackInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); - - if (!RequestValidation.validateBookingCallbackOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateBookingCallbackOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - } } diff --git a/services/experiment/src/clients/booking/requestValidation.ts b/services/experiment/src/clients/booking-frontend/requestValidation.ts similarity index 56% rename from services/experiment/src/clients/booking/requestValidation.ts rename to services/experiment/src/clients/booking-frontend/requestValidation.ts index 86d9ff55..fee97a15 100644 --- a/services/experiment/src/clients/booking/requestValidation.ts +++ b/services/experiment/src/clients/booking-frontend/requestValidation.ts @@ -7,99 +7,6 @@ import * as BasicValidation from './basicValidation.cjs'; import * as Signatures from './signatures.js'; import { FunctionWithErrors, ResponseData } from './types.js'; -/** - * This function validates the inputs to schedule() - */ -export function validateScheduleInput(body: Signatures.ScheduleBody) { - if (body === undefined) { - return true; - } - - if (!BasicValidation.validateScheduleBodyRequest(body)) { - (validateScheduleInput as FunctionWithErrors).errors = ( - BasicValidation.validateScheduleBodyRequest as FunctionWithErrors - ).errors; - return false; - } - - return true; -} - -/** - * This function validates the outputs of schedule() - */ -export function validateScheduleOutput( - response: ResponseData, -): response is Signatures.ScheduleResponse { - if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 200) { - if (!BasicValidation.validateScheduleResponse200Response(response.body)) { - (validateScheduleOutput as FunctionWithErrors).errors = ( - BasicValidation.validateScheduleResponse200Response as FunctionWithErrors - ).errors; - return false; - } - - return true; - } - - if (response.status === 400) { - return true; - } - - if (response.status === 401) { - return true; - } - - if (response.status === 403) { - return true; - } - - if (response.status === 404) { - if (!BasicValidation.validateScheduleResponse404Response(response.body)) { - (validateScheduleOutput as FunctionWithErrors).errors = ( - BasicValidation.validateScheduleResponse404Response as FunctionWithErrors - ).errors; - return false; - } - - return true; - } - - if (response.status === 422) { - if (!BasicValidation.validateScheduleResponse422Response(response.body)) { - (validateScheduleOutput as FunctionWithErrors).errors = ( - BasicValidation.validateScheduleResponse422Response as FunctionWithErrors - ).errors; - return false; - } - - return true; - } - - if (response.status === 500) { - if (!BasicValidation.validateScheduleResponse500Response(response.body)) { - (validateScheduleOutput as FunctionWithErrors).errors = ( - BasicValidation.validateScheduleResponse500Response as FunctionWithErrors - ).errors; - return false; - } - - return true; - } - - if (response.status === 503) { - return true; - } - - ( - validateScheduleOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; - - return false; -} - /** * This function validates the inputs to newBooking() */ @@ -473,206 +380,3 @@ export function validateDestroyBookingOutput( return false; } - -/** - * This function validates the inputs to lockBooking() - */ -export function validateLockBookingInput(parameters: Signatures.LockBookingParameters) { - if (parameters) { - if (!BasicValidation.validateIDRequest(parameters['ID'])) { - (validateLockBookingInput as FunctionWithErrors).errors = ( - BasicValidation.validateIDRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - return true; -} - -/** - * This function validates the outputs of lockBooking() - */ -export function validateLockBookingOutput( - response: ResponseData, -): response is Signatures.LockBookingResponse { - if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 200) { - if (!BasicValidation.validateLockBookingResponse200Response(response.body)) { - (validateLockBookingOutput as FunctionWithErrors).errors = ( - BasicValidation.validateLockBookingResponse200Response as FunctionWithErrors - ).errors; - return false; - } - - return true; - } - - if (response.status === 401) { - return true; - } - - if (response.status === 403) { - return true; - } - - if (response.status === 404) { - return true; - } - - if (response.status === 412) { - return true; - } - - if (response.status === 500) { - if (!BasicValidation.validateLockBookingResponse500Response(response.body)) { - (validateLockBookingOutput as FunctionWithErrors).errors = ( - BasicValidation.validateLockBookingResponse500Response as FunctionWithErrors - ).errors; - return false; - } - - return true; - } - - if (response.status === 503) { - return true; - } - - ( - validateLockBookingOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; - - return false; -} - -/** - * This function validates the inputs to unlockBooking() - */ -export function validateUnlockBookingInput( - parameters: Signatures.UnlockBookingParameters, -) { - if (parameters) { - if (!BasicValidation.validateIDRequest(parameters['ID'])) { - (validateUnlockBookingInput as FunctionWithErrors).errors = ( - BasicValidation.validateIDRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - return true; -} - -/** - * This function validates the outputs of unlockBooking() - */ -export function validateUnlockBookingOutput( - response: ResponseData, -): response is Signatures.UnlockBookingResponse { - if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 200) { - return true; - } - - if (response.status === 401) { - return true; - } - - if (response.status === 403) { - return true; - } - - if (response.status === 404) { - return true; - } - - if (response.status === 412) { - return true; - } - - if (response.status === 500) { - if (!BasicValidation.validateUnlockBookingResponse500Response(response.body)) { - (validateUnlockBookingOutput as FunctionWithErrors).errors = ( - BasicValidation.validateUnlockBookingResponse500Response as FunctionWithErrors - ).errors; - return false; - } - - return true; - } - - if (response.status === 503) { - return true; - } - - ( - validateUnlockBookingOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; - - return false; -} - -/** - * This function validates the inputs to bookingCallback() - */ -export function validateBookingCallbackInput( - parameters: Signatures.BookingCallbackParameters, -) { - if (parameters) { - if (!BasicValidation.validateIDRequest(parameters['ID'])) { - (validateBookingCallbackInput as FunctionWithErrors).errors = ( - BasicValidation.validateIDRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - return true; -} - -/** - * This function validates the outputs of bookingCallback() - */ -export function validateBookingCallbackOutput( - response: ResponseData, -): response is Signatures.BookingCallbackResponse { - if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 200) { - return true; - } - - if (response.status === 404) { - return true; - } - - if (response.status === 500) { - if (!BasicValidation.validateBookingCallbackResponse500Response(response.body)) { - (validateBookingCallbackOutput as FunctionWithErrors).errors = ( - BasicValidation.validateBookingCallbackResponse500Response as FunctionWithErrors - ).errors; - return false; - } - - return true; - } - - if (response.status === 503) { - return true; - } - - ( - validateBookingCallbackOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; - - return false; -} diff --git a/services/experiment/src/clients/booking-frontend/signatures.ts b/services/experiment/src/clients/booking-frontend/signatures.ts new file mode 100644 index 00000000..38b5600d --- /dev/null +++ b/services/experiment/src/clients/booking-frontend/signatures.ts @@ -0,0 +1,629 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * Typing for the body of the request made by newBooking() + * @category newBooking() + */ +export type NewBookingBody = + | { + /** + * List of devices which should be added. + */ + Devices: Types.Device<'request'>[]; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + [k: string]: unknown; + } + | undefined; + +/** + * Typing for all possible responses to the request made by newBooking() + * @category newBooking() + */ +export type NewBookingResponse = NewBookingSuccessResponse | NewBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by newBooking() + * @category newBooking() + */ +export type NewBookingSuccessResponse = NewBookingResponse200; + +/** + * Typing for all error responses to the request made by newBooking() + * @category newBooking() + */ +export type NewBookingErrorResponse = + | NewBookingResponse401 + | NewBookingResponse403 + | NewBookingResponse500 + | NewBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by newBooking() + * @category newBooking() + */ +export interface NewBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + /** + * ID at which the booking can be managed. + */ + BookingID: string; + [k: string]: unknown; + }; +} + +/** + * Typing for a response with status 401 to the request made by newBooking() + * @category newBooking() + */ +export interface NewBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by newBooking() + * @category newBooking() + */ +export interface NewBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by newBooking() + * @category newBooking() + */ +export interface NewBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by newBooking() + * @category newBooking() + */ +export interface NewBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by updateBooking() + * @category updateBooking() + */ +export type UpdateBookingParameters = { + ID: string; +}; + +/** + * Typing for the body of the request made by updateBooking() + * @category updateBooking() + */ +export type UpdateBookingBody = + | { + /** + * Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set. + */ + Locked?: boolean; + /** + * List of devices which should be added. + */ + Devices?: Types.Device<'request'>[]; + [k: string]: unknown; + } + | { + /** + * Callback which should be called at changes. + */ + Callback?: string; + [k: string]: unknown; + }; + +/** + * Typing for all possible responses to the request made by updateBooking() + * @category updateBooking() + */ +export type UpdateBookingResponse = + | UpdateBookingSuccessResponse + | UpdateBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by updateBooking() + * @category updateBooking() + */ +export type UpdateBookingSuccessResponse = UpdateBookingResponse200; + +/** + * Typing for all error responses to the request made by updateBooking() + * @category updateBooking() + */ +export type UpdateBookingErrorResponse = + | UpdateBookingResponse400 + | UpdateBookingResponse401 + | UpdateBookingResponse403 + | UpdateBookingResponse404 + | UpdateBookingResponse423 + | UpdateBookingResponse500 + | UpdateBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + BookingID: string; + [k: string]: unknown; + }; +} + +/** + * Typing for a response with status 400 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 401 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 423 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse423 extends Types.ErrorResponse { + status: 423; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by updateBooking() + * @category updateBooking() + */ +export interface UpdateBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by deleteBooking() + * @category deleteBooking() + */ +export type DeleteBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by deleteBooking() + * @category deleteBooking() + */ +export type DeleteBookingResponse = + | DeleteBookingSuccessResponse + | DeleteBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by deleteBooking() + * @category deleteBooking() + */ +export type DeleteBookingSuccessResponse = DeleteBookingResponse200; + +/** + * Typing for all error responses to the request made by deleteBooking() + * @category deleteBooking() + */ +export type DeleteBookingErrorResponse = + | DeleteBookingResponse401 + | DeleteBookingResponse403 + | DeleteBookingResponse404 + | DeleteBookingResponse423 + | DeleteBookingResponse500 + | DeleteBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 423 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse423 extends Types.ErrorResponse { + status: 423; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by deleteBooking() + * @category deleteBooking() + */ +export interface DeleteBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by getBooking() + * @category getBooking() + */ +export type GetBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by getBooking() + * @category getBooking() + */ +export type GetBookingResponse = GetBookingSuccessResponse | GetBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by getBooking() + * @category getBooking() + */ +export type GetBookingSuccessResponse = GetBookingResponse200; + +/** + * Typing for all error responses to the request made by getBooking() + * @category getBooking() + */ +export type GetBookingErrorResponse = + | GetBookingResponse401 + | GetBookingResponse403 + | GetBookingResponse404 + | GetBookingResponse500 + | GetBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + /** + * A booking in the booking system. + */ + Booking: Types.Booking<'response'>; + /** + * Shows if the booking is in a locked status. + */ + Locked: boolean; + [k: string]: unknown; + }; +} + +/** + * Typing for a response with status 401 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by getBooking() + * @category getBooking() + */ +export interface GetBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for the parameters of the request made by destroyBooking() + * @category destroyBooking() + */ +export type DestroyBookingParameters = { + ID: string; +}; + +/** + * Typing for all possible responses to the request made by destroyBooking() + * @category destroyBooking() + */ +export type DestroyBookingResponse = + | DestroyBookingSuccessResponse + | DestroyBookingErrorResponse; + +/** + * Typing for all successful responses to the request made by destroyBooking() + * @category destroyBooking() + */ +export type DestroyBookingSuccessResponse = DestroyBookingResponse200; + +/** + * Typing for all error responses to the request made by destroyBooking() + * @category destroyBooking() + */ +export type DestroyBookingErrorResponse = + | DestroyBookingResponse401 + | DestroyBookingResponse403 + | DestroyBookingResponse404 + | DestroyBookingResponse423 + | DestroyBookingResponse500 + | DestroyBookingResponse503; + +/** + * Typing for a response with status 200 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 423 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse423 extends Types.ErrorResponse { + status: 423; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 500 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by destroyBooking() + * @category destroyBooking() + */ +export interface DestroyBookingResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} diff --git a/services/experiment/src/clients/booking-frontend/types.ts b/services/experiment/src/clients/booking-frontend/types.ts new file mode 100644 index 00000000..2d71aa30 --- /dev/null +++ b/services/experiment/src/clients/booking-frontend/types.ts @@ -0,0 +1,410 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as _BasicValidation from './basicValidation.cjs'; + +/** + * @internal + */ +export interface FunctionWithErrors { + (...args: unknown[]): unknown; + errors?: unknown; +} + +/** + * @internal + */ +export interface RequestInfo { + method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'OPTIONS' | 'PATCH' | 'HEAD'; + body?: string; + headers?: [string, string][]; +} + +/** + * @internal + */ +export type FetchFunction = ( + url: string, + info?: RequestInfo, +) => Promise | ResponseData; + +export interface ResponseData { + status: number; + headers?: { + [key: string]: string | undefined; + }; + body?: unknown; +} + +export interface SuccessResponse extends ResponseData { + success?: true; +} + +export interface ErrorResponse extends ResponseData { + success?: false; +} + +/** + * @internal + */ +export function isSuccessResponse(response: ResponseData): response is SuccessResponse { + return response.status < 400; +} + +/** + * @internal + */ +export function isErrorResponse(response: ResponseData): response is ErrorResponse { + return response.status >= 400; +} + +/** + * This type allows to pick the required properties of another type. + */ +export type Require = Partial & { + [Property in Key]-?: Type[Property]; +}; + +export type SizedTuple< + T, + MIN extends number | undefined = undefined, + MAX extends number | undefined = undefined, +> = MIN extends number + ? MAX extends number + ? _SizedTuple> + : TupleObject> & T[] + : MAX extends number + ? _SizedTuple, true> + : T[]; + +type _SizedTuple = ARR extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? Tuple | _SizedTuple + : never; + +type Tuple = _Tuple< + T, + NumericRangeTuple +>; + +type _Tuple = N extends [ + infer HEAD, + ...infer TAIL extends number[], +] + ? HEAD extends 0 + ? [] | _Tuple + : [T, ..._Tuple] + : []; + +type TupleObject = N extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? TAIL extends [] + ? Record + : { [P in HEAD]: T } & TupleObject + : Record; + +export type NumericRange< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number = never, +> = ARR['length'] extends END + ? ACC | START | END + : NumericRange< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : ACC | ARR['length'] + >; + +type NumericRangeTuple< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number[] = [], +> = ARR['length'] extends END + ? [START, ...ACC, END] + : NumericRangeTuple< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : [...ACC, ARR['length']] + >; + +/** + * A booking in the booking system. + */ +export type Booking = T extends 'all' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : never; + +/** + * A device might either be a physical/virtual device or a group of device. + */ +export type Device = T extends 'all' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : never; + +/** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ +export type Experiment = T extends 'all' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'request'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'response'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : never; + +/** + * A time slot represents a slice of time used for bookings. + */ +export type Timeslot = T extends 'all' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : never; diff --git a/services/experiment/src/clients/index.ts b/services/experiment/src/clients/index.ts index ea525e51..7ba5fe04 100644 --- a/services/experiment/src/clients/index.ts +++ b/services/experiment/src/clients/index.ts @@ -1,17 +1,29 @@ import { RequestHandler } from 'express'; import { config } from '../config.js'; -import { Client as BookingClient } from './booking/client.js'; +import { Client as BookingBackendClient } from './booking-backend/client.js'; +import { Client as BookingFrontendClient } from './booking-frontend/client.js'; import { Client as DeviceClient } from './device/client.js'; +import { Client as ScheduleServiceClient } from './schedule-service/client.js'; export const device = new DeviceClient(config.BASE_URL, { serviceUrl: config.DEVICE_SERVICE_URL, fixedHeaders: [['x-request-authentication', 'experiment-service']], }); -export const booking = new BookingClient(config.BASE_URL, { - serviceUrl: config.DEVICE_SERVICE_URL, - fixedHeaders: [['x-request-authentication', 'experiment-service']], -}); +export const booking = { + backend: new BookingBackendClient(config.BASE_URL, { + serviceUrl: config.BOOKING_BACKEND_URL, + fixedHeaders: [['x-request-authentication', 'experiment-service']], + }), + frontend: new BookingFrontendClient(config.BASE_URL, { + serviceUrl: config.BOOKING_FRONTEND_URL, + fixedHeaders: [['x-request-authentication', 'experiment-service']], + }), + schedule: new ScheduleServiceClient(config.BASE_URL, { + serviceUrl: config.SCHEDULE_SERVICE_URL, + fixedHeaders: [['x-request-authentication', 'experiment-service']], + }), +}; export const clients = { device, booking }; export type Clients = typeof clients; @@ -39,10 +51,20 @@ export const middleware: RequestHandler = (req, _res, next) => { fixedHeaders: fixed_headers, }); - const bound_booking = new BookingClient(config.BASE_URL, { - serviceUrl: config.DEVICE_SERVICE_URL, - fixedHeaders: fixed_headers, - }); + const bound_booking = { + backend: new BookingBackendClient(config.BASE_URL, { + serviceUrl: config.BOOKING_BACKEND_URL, + fixedHeaders: fixed_headers, + }), + frontend: new BookingFrontendClient(config.BASE_URL, { + serviceUrl: config.BOOKING_FRONTEND_URL, + fixedHeaders: fixed_headers, + }), + schedule: new ScheduleServiceClient(config.BASE_URL, { + serviceUrl: config.SCHEDULE_SERVICE_URL, + fixedHeaders: fixed_headers, + }), + }; req.clients = { device: bound_device, booking: bound_booking }; diff --git a/services/experiment/src/clients/schedule-service/basicValidation.cjs b/services/experiment/src/clients/schedule-service/basicValidation.cjs new file mode 100644 index 00000000..ff4febf8 --- /dev/null +++ b/services/experiment/src/clients/schedule-service/basicValidation.cjs @@ -0,0 +1,6650 @@ +/* eslint-disable */ +//@ts-nocheck +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +'use strict'; +exports.validateBooking = validate21; +const schema6 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'Booking', + 'x-location': '#/components/schemas/Booking', + 'x-schema-type': 'all', +}; +const formats0 = require('ajv-formats/dist/formats').fullFormats.uri; +const formats2 = require('ajv-formats/dist/formats').fullFormats['date-time']; +function validate21( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate21.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema6.required, + parentSchema: schema6, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.ID.type, + parentSchema: schema6.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema6.properties.Time.required, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.Start.type, + parentSchema: schema6.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Time.properties.End.type, + parentSchema: schema6.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.properties.Time.type, + parentSchema: schema6.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Devices.items.type, + parentSchema: schema6.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate21.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema6.properties.Devices.type, + parentSchema: schema6.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Type.type, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate21.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Type.enum, + parentSchema: schema6.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Status.type, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate21.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema6.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema6.properties.Status.enum, + parentSchema: schema6.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.You.type, + parentSchema: schema6.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate21.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema6.properties.External.type, + parentSchema: schema6.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate21.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema6.properties.Message.type, + parentSchema: schema6.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate21.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema6.type, + parentSchema: schema6, + data, + }, + ]; + return false; + } + } + validate21.errors = vErrors; + return errors === 0; +} +exports.validateDevice = validate22; +const schema7 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'Device', + 'x-location': '#/components/schemas/Device', + 'x-schema-type': 'all', +}; +function validate22( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate22.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema7.required, + parentSchema: schema7, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate22.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema7.properties.ID.type, + parentSchema: schema7.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate22.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema7.type, + parentSchema: schema7, + data, + }, + ]; + return false; + } + } + validate22.errors = vErrors; + return errors === 0; +} +exports.validateExperiment = validate23; +const schema8 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'Experiment', + 'x-location': '#/components/schemas/Experiment', + 'x-schema-type': 'all', +}; +function validate23( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate23.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema8.required, + parentSchema: schema8, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema8.properties.Devices.items.required, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema8.properties.Devices.items.properties.ID.type, + parentSchema: + schema8.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.properties.Devices.items.type, + parentSchema: schema8.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate23.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema8.properties.Devices.type, + parentSchema: schema8.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate23.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema8.properties.Description.type, + parentSchema: schema8.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate23.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema8.type, + parentSchema: schema8, + data, + }, + ]; + return false; + } + } + validate23.errors = vErrors; + return errors === 0; +} +exports.validateTimeslot = validate24; +const schema9 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'Timeslot', + 'x-location': '#/components/schemas/Timeslot', + 'x-schema-type': 'all', +}; +function validate24( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate24.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema9.required, + parentSchema: schema9, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.Start.type, + parentSchema: schema9.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate24.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema9.properties.End.type, + parentSchema: schema9.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate24.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema9.type, + parentSchema: schema9, + data, + }, + ]; + return false; + } + } + validate24.errors = vErrors; + return errors === 0; +} +exports.validateID = validate25; +const schema10 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'ID', + 'x-location': '#/components/parameters/ID/schema', + 'x-schema-type': 'all', +}; +function validate25( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate25.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema10.type, + parentSchema: schema10, + data, + }, + ]; + return false; + } + validate25.errors = vErrors; + return errors === 0; +} +exports.validateScheduleBody = validate26; +const schema11 = { + type: 'object', + required: ['Experiment', 'Time'], + properties: { + Experiment: { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Combined: { + type: 'boolean', + description: + 'If true, show only one timetable per device instead of one for all available physical devices.', + }, + onlyOwn: { + type: 'boolean', + description: + '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleBody', + 'x-location': '#/paths//schedule/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate26( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate26.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema11.required, + parentSchema: schema11, + data, + }, + ]; + return false; + } else { + if (data.Experiment !== undefined) { + let data0 = data.Experiment; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.Devices === undefined && (missing1 = 'Devices')) { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema11.properties.Experiment.required, + parentSchema: schema11.properties.Experiment, + data: data0, + }, + ]; + return false; + } else { + if (data0.Devices !== undefined) { + let data1 = data0.Devices; + const _errs3 = errors; + if (errors === _errs3) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs5 = errors; + if (errors === _errs5) { + if ( + data2 && + typeof data2 == 'object' && + !Array.isArray(data2) + ) { + let missing2; + if (data2.ID === undefined && (missing2 = 'ID')) { + validate26.errors = [ + { + instancePath: + instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema11.properties.Experiment.properties.Devices + .items.required, + parentSchema: + schema11.properties.Experiment.properties.Devices + .items, + data: data2, + }, + ]; + return false; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate26.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema11.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.properties.Experiment.properties + .Devices.items.properties.ID.type, + parentSchema: + schema11.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema11.properties.Experiment.properties.Devices.items + .type, + parentSchema: + schema11.properties.Experiment.properties.Devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs5 === errors; + if (!valid2) { + break; + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment/Devices', + schemaPath: '#/properties/Experiment/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema11.properties.Experiment.properties.Devices.type, + parentSchema: schema11.properties.Experiment.properties.Devices, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Description !== undefined) { + let data4 = data0.Description; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment/Description', + schemaPath: + '#/properties/Experiment/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema11.properties.Experiment.properties.Description.type, + parentSchema: + schema11.properties.Experiment.properties.Description, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.properties.Experiment.type, + parentSchema: schema11.properties.Experiment, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data5 = data.Time; + const _errs11 = errors; + if (errors === _errs11) { + if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { + let missing3; + if ( + (data5.Start === undefined && (missing3 = 'Start')) || + (data5.End === undefined && (missing3 = 'End')) + ) { + validate26.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema11.properties.Time.required, + parentSchema: schema11.properties.Time, + data: data5, + }, + ]; + return false; + } else { + if (data5.Start !== undefined) { + let data6 = data5.Start; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats2.validate(data6)) { + validate26.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema11.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.properties.Time.properties.Start.type, + parentSchema: schema11.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data5.End !== undefined) { + let data7 = data5.End; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats2.validate(data7)) { + validate26.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema11.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema11.properties.Time.properties.End.type, + parentSchema: schema11.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate26.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.properties.Time.type, + parentSchema: schema11.properties.Time, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Combined !== undefined) { + let data8 = data.Combined; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate26.errors = [ + { + instancePath: instancePath + '/Combined', + schemaPath: '#/properties/Combined/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema11.properties.Combined.type, + parentSchema: schema11.properties.Combined, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.onlyOwn !== undefined) { + let data9 = data.onlyOwn; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate26.errors = [ + { + instancePath: instancePath + '/onlyOwn', + schemaPath: '#/properties/onlyOwn/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema11.properties.onlyOwn.type, + parentSchema: schema11.properties.onlyOwn, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } else { + validate26.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema11.type, + parentSchema: schema11, + data, + }, + ]; + return false; + } + } + validate26.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse200 = validate27; +const schema12 = { + type: 'array', + items: { + type: 'object', + required: ['Device', 'Booked', 'Free'], + properties: { + Device: { type: 'string', description: 'ID of the device (or * if combined).' }, + Booked: { + type: 'array', + description: 'Array of booked times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + Free: { + type: 'array', + description: 'Array of free times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleResponse200', + 'x-location': '#/paths//schedule/post/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate27( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Device === undefined && (missing0 = 'Device')) || + (data0.Booked === undefined && (missing0 = 'Booked')) || + (data0.Free === undefined && (missing0 = 'Free')) + ) { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema12.items.required, + parentSchema: schema12.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Device !== undefined) { + let data1 = data0.Device; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Device', + schemaPath: '#/items/properties/Device/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema12.items.properties.Device.type, + parentSchema: schema12.items.properties.Device, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Booked !== undefined) { + let data2 = data0.Booked; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len1 = data2.length; + for (let i1 = 0; i1 < len1; i1++) { + let data3 = data2[i1]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.Start === undefined && (missing1 = 'Start')) || + (data3.End === undefined && (missing1 = 'End')) + ) { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema12.items.properties.Booked.items.required, + parentSchema: schema12.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Booked.items + .properties.Start.type, + parentSchema: + schema12.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Booked.items + .properties.End.type, + parentSchema: + schema12.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema12.items.properties.Booked.items.type, + parentSchema: schema12.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked', + schemaPath: '#/items/properties/Booked/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema12.items.properties.Booked.type, + parentSchema: schema12.items.properties.Booked, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Free !== undefined) { + let data6 = data0.Free; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid4 = true; + const len2 = data6.length; + for (let i2 = 0; i2 < len2; i2++) { + let data7 = data6[i2]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if ( + (data7.Start === undefined && (missing2 = 'Start')) || + (data7.End === undefined && (missing2 = 'End')) + ) { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema12.items.properties.Free.items.required, + parentSchema: schema12.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.Start !== undefined) { + let data8 = data7.Start; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats2.validate(data8)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Free.items + .properties.Start.type, + parentSchema: + schema12.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } + } + var valid5 = _errs17 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data7.End !== undefined) { + let data9 = data7.End; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats2.validate(data9)) { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema12.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } else { + validate27.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema12.items.properties.Free.items + .properties.End.type, + parentSchema: + schema12.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } + } + var valid5 = _errs19 === errors; + } else { + var valid5 = true; + } + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema12.items.properties.Free.items.type, + parentSchema: schema12.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } + } + var valid4 = _errs15 === errors; + if (!valid4) { + break; + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free', + schemaPath: '#/items/properties/Free/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema12.items.properties.Free.type, + parentSchema: schema12.items.properties.Free, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate27.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema12.items.type, + parentSchema: schema12.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate27.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema12.type, + parentSchema: schema12, + data, + }, + ]; + return false; + } + } + validate27.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse404 = validate28; +const schema13 = { + type: 'string', + description: 'First unknown device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse404', + 'x-location': '#/paths//schedule/post/responses/404/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate28( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate28.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema13.type, + parentSchema: schema13, + data, + }, + ]; + return false; + } + validate28.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse422 = validate29; +const schema14 = { + type: 'string', + description: 'First virtual device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse422', + 'x-location': '#/paths//schedule/post/responses/422/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate29( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate29.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema14.type, + parentSchema: schema14, + data, + }, + ]; + return false; + } + validate29.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse500 = validate30; +const schema15 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'scheduleResponse500', + 'x-location': '#/paths//schedule/post/responses/500/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate30( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate30.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema15.type, + parentSchema: schema15, + data, + }, + ]; + return false; + } + validate30.errors = vErrors; + return errors === 0; +} +exports.validateBookingRequest = validate31; +const schema16 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingRequest', + 'x-location': '#/components/schemas/Booking_request', + 'x-schema-type': 'request', +}; +function validate31( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate31.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema16.required, + parentSchema: schema16, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate31.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema16.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.ID.type, + parentSchema: schema16.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate31.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema16.properties.Time.required, + parentSchema: schema16.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate31.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema16.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Time.properties.Start.type, + parentSchema: schema16.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate31.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema16.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Time.properties.End.type, + parentSchema: schema16.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.properties.Time.type, + parentSchema: schema16.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema16.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Devices.items.type, + parentSchema: schema16.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate31.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema16.properties.Devices.type, + parentSchema: schema16.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Type.type, + parentSchema: schema16.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate31.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema16.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema16.properties.Type.enum, + parentSchema: schema16.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Status.type, + parentSchema: schema16.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate31.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema16.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema16.properties.Status.enum, + parentSchema: schema16.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate31.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema16.properties.You.type, + parentSchema: schema16.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate31.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema16.properties.External.type, + parentSchema: schema16.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate31.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema16.properties.Message.type, + parentSchema: schema16.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate31.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema16.type, + parentSchema: schema16, + data, + }, + ]; + return false; + } + } + validate31.errors = vErrors; + return errors === 0; +} +exports.validateBookingResponse = validate32; +const schema17 = { + title: 'Booking', + description: 'A booking in the booking system.', + type: 'object', + required: ['ID', 'Time', 'Devices', 'Status', 'You', 'External'], + properties: { + ID: { type: 'string', format: 'uri', description: 'Unique ID of the booking.' }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Devices: { type: 'array', items: { type: 'string', format: 'uri' } }, + Type: { + description: + "Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed.", + type: 'string', + enum: ['normal'], + }, + Status: { + description: + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + type: 'string', + enum: [ + 'pending', + 'booked', + 'rejected', + 'cancelled', + 'active', + 'active-pending', + 'active-rejected', + ], + }, + You: { type: 'boolean', description: 'If true, this booking was done by you.' }, + External: { + type: 'boolean', + description: 'Shows whether the booking was done by an external institution.', + }, + Message: { + type: 'string', + description: + 'User readable notes about the status of the booking (e.g. if devices are unknown).', + }, + }, + 'x-standalone': true, + 'x-name': 'BookingResponse', + 'x-location': '#/components/schemas/Booking_response', + 'x-schema-type': 'response', +}; +function validate32( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.ID === undefined && (missing0 = 'ID')) || + (data.Time === undefined && (missing0 = 'Time')) || + (data.Devices === undefined && (missing0 = 'Devices')) || + (data.Status === undefined && (missing0 = 'Status')) || + (data.You === undefined && (missing0 = 'You')) || + (data.External === undefined && (missing0 = 'External')) + ) { + validate32.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema17.required, + parentSchema: schema17, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate32.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema17.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.ID.type, + parentSchema: schema17.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data1 = data.Time; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if ( + (data1.Start === undefined && (missing1 = 'Start')) || + (data1.End === undefined && (missing1 = 'End')) + ) { + validate32.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema17.properties.Time.required, + parentSchema: schema17.properties.Time, + data: data1, + }, + ]; + return false; + } else { + if (data1.Start !== undefined) { + let data2 = data1.Start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats2.validate(data2)) { + validate32.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema17.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Time.properties.Start.type, + parentSchema: schema17.properties.Time.properties.Start, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data1.End !== undefined) { + let data3 = data1.End; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats2.validate(data3)) { + validate32.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema17.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Time.properties.End.type, + parentSchema: schema17.properties.Time.properties.End, + data: data3, + }, + ]; + return false; + } + } + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.properties.Time.type, + parentSchema: schema17.properties.Time, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Devices !== undefined) { + let data4 = data.Devices; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate32.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema17.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Devices.items.type, + parentSchema: schema17.properties.Devices.items, + data: data5, + }, + ]; + return false; + } + } + } + var valid2 = _errs11 === errors; + if (!valid2) { + break; + } + } + } else { + validate32.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema17.properties.Devices.type, + parentSchema: schema17.properties.Devices, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Type !== undefined) { + let data6 = data.Type; + const _errs13 = errors; + if (typeof data6 !== 'string') { + validate32.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Type.type, + parentSchema: schema17.properties.Type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'normal')) { + validate32.errors = [ + { + instancePath: instancePath + '/Type', + schemaPath: '#/properties/Type/enum', + keyword: 'enum', + params: { allowedValues: schema17.properties.Type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema17.properties.Type.enum, + parentSchema: schema17.properties.Type, + data: data6, + }, + ]; + return false; + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Status !== undefined) { + let data7 = data.Status; + const _errs15 = errors; + if (typeof data7 !== 'string') { + validate32.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Status.type, + parentSchema: schema17.properties.Status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'pending' || + data7 === 'booked' || + data7 === 'rejected' || + data7 === 'cancelled' || + data7 === 'active' || + data7 === 'active-pending' || + data7 === 'active-rejected' + ) + ) { + validate32.errors = [ + { + instancePath: instancePath + '/Status', + schemaPath: '#/properties/Status/enum', + keyword: 'enum', + params: { allowedValues: schema17.properties.Status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema17.properties.Status.enum, + parentSchema: schema17.properties.Status, + data: data7, + }, + ]; + return false; + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.You !== undefined) { + let data8 = data.You; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate32.errors = [ + { + instancePath: instancePath + '/You', + schemaPath: '#/properties/You/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema17.properties.You.type, + parentSchema: schema17.properties.You, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.External !== undefined) { + let data9 = data.External; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate32.errors = [ + { + instancePath: instancePath + '/External', + schemaPath: '#/properties/External/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema17.properties.External.type, + parentSchema: schema17.properties.External, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Message !== undefined) { + let data10 = data.Message; + const _errs21 = errors; + if (typeof data10 !== 'string') { + validate32.errors = [ + { + instancePath: instancePath + '/Message', + schemaPath: '#/properties/Message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema17.properties.Message.type, + parentSchema: schema17.properties.Message, + data: data10, + }, + ]; + return false; + } + var valid0 = _errs21 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } else { + validate32.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema17.type, + parentSchema: schema17, + data, + }, + ]; + return false; + } + } + validate32.errors = vErrors; + return errors === 0; +} +exports.validateDeviceRequest = validate33; +const schema18 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceRequest', + 'x-location': '#/components/schemas/Device_request', + 'x-schema-type': 'request', +}; +function validate33( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate33.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema18.required, + parentSchema: schema18, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate33.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema18.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate33.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema18.properties.ID.type, + parentSchema: schema18.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate33.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema18.type, + parentSchema: schema18, + data, + }, + ]; + return false; + } + } + validate33.errors = vErrors; + return errors === 0; +} +exports.validateDeviceResponse = validate34; +const schema19 = { + title: 'Device', + description: 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + 'x-standalone': true, + 'x-name': 'DeviceResponse', + 'x-location': '#/components/schemas/Device_response', + 'x-schema-type': 'response', +}; +function validate34( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.ID === undefined && (missing0 = 'ID')) { + validate34.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema19.required, + parentSchema: schema19, + data, + }, + ]; + return false; + } else { + if (data.ID !== undefined) { + let data0 = data.ID; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate34.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema19.properties.ID, + data: data0, + }, + ]; + return false; + } + } else { + validate34.errors = [ + { + instancePath: instancePath + '/ID', + schemaPath: '#/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema19.properties.ID.type, + parentSchema: schema19.properties.ID, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate34.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema19.type, + parentSchema: schema19, + data, + }, + ]; + return false; + } + } + validate34.errors = vErrors; + return errors === 0; +} +exports.validateExperimentRequest = validate35; +const schema20 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentRequest', + 'x-location': '#/components/schemas/Experiment_request', + 'x-schema-type': 'request', +}; +function validate35( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate35.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema20.required, + parentSchema: schema20, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema20.properties.Devices.items.required, + parentSchema: schema20.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema20.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema20.properties.Devices.items.properties.ID.type, + parentSchema: + schema20.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema20.properties.Devices.items.type, + parentSchema: schema20.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate35.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema20.properties.Devices.type, + parentSchema: schema20.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate35.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema20.properties.Description.type, + parentSchema: schema20.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate35.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema20.type, + parentSchema: schema20, + data, + }, + ]; + return false; + } + } + validate35.errors = vErrors; + return errors === 0; +} +exports.validateExperimentResponse = validate36; +const schema21 = { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + 'x-standalone': true, + 'x-name': 'ExperimentResponse', + 'x-location': '#/components/schemas/Experiment_response', + 'x-schema-type': 'response', +}; +function validate36( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.Devices === undefined && (missing0 = 'Devices')) { + validate36.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema21.required, + parentSchema: schema21, + data, + }, + ]; + return false; + } else { + if (data.Devices !== undefined) { + let data0 = data.Devices; + const _errs1 = errors; + if (errors === _errs1) { + if (Array.isArray(data0)) { + var valid1 = true; + const len0 = data0.length; + for (let i0 = 0; i0 < len0; i0++) { + let data1 = data0[i0]; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + let missing1; + if (data1.ID === undefined && (missing1 = 'ID')) { + validate36.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema21.properties.Devices.items.required, + parentSchema: schema21.properties.Devices.items, + data: data1, + }, + ]; + return false; + } else { + if (data1.ID !== undefined) { + let data2 = data1.ID; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate36.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema21.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } else { + validate36.errors = [ + { + instancePath: instancePath + '/Devices/' + i0 + '/ID', + schemaPath: + '#/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema21.properties.Devices.items.properties.ID.type, + parentSchema: + schema21.properties.Devices.items.properties.ID, + data: data2, + }, + ]; + return false; + } + } + } + } + } + } else { + validate36.errors = [ + { + instancePath: instancePath + '/Devices/' + i0, + schemaPath: '#/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.properties.Devices.items.type, + parentSchema: schema21.properties.Devices.items, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (!valid1) { + break; + } + } + } else { + validate36.errors = [ + { + instancePath: instancePath + '/Devices', + schemaPath: '#/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema21.properties.Devices.type, + parentSchema: schema21.properties.Devices, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Description !== undefined) { + let data3 = data.Description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate36.errors = [ + { + instancePath: instancePath + '/Description', + schemaPath: '#/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema21.properties.Description.type, + parentSchema: schema21.properties.Description, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate36.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema21.type, + parentSchema: schema21, + data, + }, + ]; + return false; + } + } + validate36.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotRequest = validate37; +const schema22 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotRequest', + 'x-location': '#/components/schemas/Timeslot_request', + 'x-schema-type': 'request', +}; +function validate37( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate37.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema22.required, + parentSchema: schema22, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate37.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema22.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.Start.type, + parentSchema: schema22.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate37.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema22.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate37.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema22.properties.End.type, + parentSchema: schema22.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate37.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema22.type, + parentSchema: schema22, + data, + }, + ]; + return false; + } + } + validate37.errors = vErrors; + return errors === 0; +} +exports.validateTimeslotResponse = validate38; +const schema23 = { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { type: 'string', description: 'End time of the booking.', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeslotResponse', + 'x-location': '#/components/schemas/Timeslot_response', + 'x-schema-type': 'response', +}; +function validate38( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Start === undefined && (missing0 = 'Start')) || + (data.End === undefined && (missing0 = 'End')) + ) { + validate38.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema23.required, + parentSchema: schema23, + data, + }, + ]; + return false; + } else { + if (data.Start !== undefined) { + let data0 = data.Start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats2.validate(data0)) { + validate38.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema23.properties.Start, + data: data0, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/Start', + schemaPath: '#/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.properties.Start.type, + parentSchema: schema23.properties.Start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.End !== undefined) { + let data1 = data.End; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats2.validate(data1)) { + validate38.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema23.properties.End, + data: data1, + }, + ]; + return false; + } + } else { + validate38.errors = [ + { + instancePath: instancePath + '/End', + schemaPath: '#/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema23.properties.End.type, + parentSchema: schema23.properties.End, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate38.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema23.type, + parentSchema: schema23, + data, + }, + ]; + return false; + } + } + validate38.errors = vErrors; + return errors === 0; +} +exports.validateIDRequest = validate39; +const schema24 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDRequest', + 'x-location': '#/components/parameters/ID/schema_request', + 'x-schema-type': 'request', +}; +function validate39( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate39.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema24.type, + parentSchema: schema24, + data, + }, + ]; + return false; + } + validate39.errors = vErrors; + return errors === 0; +} +exports.validateIDResponse = validate40; +const schema25 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'IDResponse', + 'x-location': '#/components/parameters/ID/schema_response', + 'x-schema-type': 'response', +}; +function validate40( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate40.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema25.type, + parentSchema: schema25, + data, + }, + ]; + return false; + } + validate40.errors = vErrors; + return errors === 0; +} +exports.validateScheduleBodyRequest = validate41; +const schema26 = { + type: 'object', + required: ['Experiment', 'Time'], + properties: { + Experiment: { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Combined: { + type: 'boolean', + description: + 'If true, show only one timetable per device instead of one for all available physical devices.', + }, + onlyOwn: { + type: 'boolean', + description: + '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleBodyRequest', + 'x-location': + '#/paths//schedule/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate41( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate41.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema26.required, + parentSchema: schema26, + data, + }, + ]; + return false; + } else { + if (data.Experiment !== undefined) { + let data0 = data.Experiment; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.Devices === undefined && (missing1 = 'Devices')) { + validate41.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema26.properties.Experiment.required, + parentSchema: schema26.properties.Experiment, + data: data0, + }, + ]; + return false; + } else { + if (data0.Devices !== undefined) { + let data1 = data0.Devices; + const _errs3 = errors; + if (errors === _errs3) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs5 = errors; + if (errors === _errs5) { + if ( + data2 && + typeof data2 == 'object' && + !Array.isArray(data2) + ) { + let missing2; + if (data2.ID === undefined && (missing2 = 'ID')) { + validate41.errors = [ + { + instancePath: + instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema26.properties.Experiment.properties.Devices + .items.required, + parentSchema: + schema26.properties.Experiment.properties.Devices + .items, + data: data2, + }, + ]; + return false; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate41.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema26.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema26.properties.Experiment.properties + .Devices.items.properties.ID.type, + parentSchema: + schema26.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema26.properties.Experiment.properties.Devices.items + .type, + parentSchema: + schema26.properties.Experiment.properties.Devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs5 === errors; + if (!valid2) { + break; + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Experiment/Devices', + schemaPath: '#/properties/Experiment/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema26.properties.Experiment.properties.Devices.type, + parentSchema: schema26.properties.Experiment.properties.Devices, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Description !== undefined) { + let data4 = data0.Description; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate41.errors = [ + { + instancePath: instancePath + '/Experiment/Description', + schemaPath: + '#/properties/Experiment/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema26.properties.Experiment.properties.Description.type, + parentSchema: + schema26.properties.Experiment.properties.Description, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.properties.Experiment.type, + parentSchema: schema26.properties.Experiment, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data5 = data.Time; + const _errs11 = errors; + if (errors === _errs11) { + if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { + let missing3; + if ( + (data5.Start === undefined && (missing3 = 'Start')) || + (data5.End === undefined && (missing3 = 'End')) + ) { + validate41.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema26.properties.Time.required, + parentSchema: schema26.properties.Time, + data: data5, + }, + ]; + return false; + } else { + if (data5.Start !== undefined) { + let data6 = data5.Start; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats2.validate(data6)) { + validate41.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema26.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.properties.Time.properties.Start.type, + parentSchema: schema26.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data5.End !== undefined) { + let data7 = data5.End; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats2.validate(data7)) { + validate41.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema26.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema26.properties.Time.properties.End.type, + parentSchema: schema26.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate41.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.properties.Time.type, + parentSchema: schema26.properties.Time, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Combined !== undefined) { + let data8 = data.Combined; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate41.errors = [ + { + instancePath: instancePath + '/Combined', + schemaPath: '#/properties/Combined/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema26.properties.Combined.type, + parentSchema: schema26.properties.Combined, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.onlyOwn !== undefined) { + let data9 = data.onlyOwn; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate41.errors = [ + { + instancePath: instancePath + '/onlyOwn', + schemaPath: '#/properties/onlyOwn/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema26.properties.onlyOwn.type, + parentSchema: schema26.properties.onlyOwn, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } else { + validate41.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema26.type, + parentSchema: schema26, + data, + }, + ]; + return false; + } + } + validate41.errors = vErrors; + return errors === 0; +} +exports.validateScheduleBodyResponse = validate42; +const schema27 = { + type: 'object', + required: ['Experiment', 'Time'], + properties: { + Experiment: { + title: 'Experiment', + description: + 'An experiment describes a set of devices and how they should be connected (potentially among other metadata).', + type: 'object', + required: ['Devices'], + properties: { + Devices: { + type: 'array', + description: 'List of devices used in experiment.', + items: { + title: 'Device', + description: + 'A device might either be a physical/virtual device or a group of device.', + type: 'object', + required: ['ID'], + properties: { + ID: { + type: 'string', + description: + 'Unique ID of the device. Contains the institution (by having an end point at that institution)', + format: 'uri', + }, + }, + }, + }, + Description: { + type: 'string', + description: + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + }, + }, + }, + Time: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + Combined: { + type: 'boolean', + description: + 'If true, show only one timetable per device instead of one for all available physical devices.', + }, + onlyOwn: { + type: 'boolean', + description: + '(private) Show only devices of this institution. Give an error if a device of an other institution is requested.', + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleBodyResponse', + 'x-location': + '#/paths//schedule/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate42( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.Experiment === undefined && (missing0 = 'Experiment')) || + (data.Time === undefined && (missing0 = 'Time')) + ) { + validate42.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema27.required, + parentSchema: schema27, + data, + }, + ]; + return false; + } else { + if (data.Experiment !== undefined) { + let data0 = data.Experiment; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.Devices === undefined && (missing1 = 'Devices')) { + validate42.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema27.properties.Experiment.required, + parentSchema: schema27.properties.Experiment, + data: data0, + }, + ]; + return false; + } else { + if (data0.Devices !== undefined) { + let data1 = data0.Devices; + const _errs3 = errors; + if (errors === _errs3) { + if (Array.isArray(data1)) { + var valid2 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs5 = errors; + if (errors === _errs5) { + if ( + data2 && + typeof data2 == 'object' && + !Array.isArray(data2) + ) { + let missing2; + if (data2.ID === undefined && (missing2 = 'ID')) { + validate42.errors = [ + { + instancePath: + instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema27.properties.Experiment.properties.Devices + .items.required, + parentSchema: + schema27.properties.Experiment.properties.Devices + .items, + data: data2, + }, + ]; + return false; + } else { + if (data2.ID !== undefined) { + let data3 = data2.ID; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate42.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema27.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } else { + validate42.errors = [ + { + instancePath: + instancePath + + '/Experiment/Devices/' + + i0 + + '/ID', + schemaPath: + '#/properties/Experiment/properties/Devices/items/properties/ID/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.properties.Experiment.properties + .Devices.items.properties.ID.type, + parentSchema: + schema27.properties.Experiment.properties + .Devices.items.properties.ID, + data: data3, + }, + ]; + return false; + } + } + } + } + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Experiment/Devices/' + i0, + schemaPath: + '#/properties/Experiment/properties/Devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema27.properties.Experiment.properties.Devices.items + .type, + parentSchema: + schema27.properties.Experiment.properties.Devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs5 === errors; + if (!valid2) { + break; + } + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Experiment/Devices', + schemaPath: '#/properties/Experiment/properties/Devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema27.properties.Experiment.properties.Devices.type, + parentSchema: schema27.properties.Experiment.properties.Devices, + data: data1, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Description !== undefined) { + let data4 = data0.Description; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate42.errors = [ + { + instancePath: instancePath + '/Experiment/Description', + schemaPath: + '#/properties/Experiment/properties/Description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema27.properties.Experiment.properties.Description.type, + parentSchema: + schema27.properties.Experiment.properties.Description, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + } + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Experiment', + schemaPath: '#/properties/Experiment/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.properties.Experiment.type, + parentSchema: schema27.properties.Experiment, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Time !== undefined) { + let data5 = data.Time; + const _errs11 = errors; + if (errors === _errs11) { + if (data5 && typeof data5 == 'object' && !Array.isArray(data5)) { + let missing3; + if ( + (data5.Start === undefined && (missing3 = 'Start')) || + (data5.End === undefined && (missing3 = 'End')) + ) { + validate42.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema27.properties.Time.required, + parentSchema: schema27.properties.Time, + data: data5, + }, + ]; + return false; + } else { + if (data5.Start !== undefined) { + let data6 = data5.Start; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats2.validate(data6)) { + validate42.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema27.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Time/Start', + schemaPath: '#/properties/Time/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.properties.Time.properties.Start.type, + parentSchema: schema27.properties.Time.properties.Start, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data5.End !== undefined) { + let data7 = data5.End; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats2.validate(data7)) { + validate42.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema27.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Time/End', + schemaPath: '#/properties/Time/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema27.properties.Time.properties.End.type, + parentSchema: schema27.properties.Time.properties.End, + data: data7, + }, + ]; + return false; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate42.errors = [ + { + instancePath: instancePath + '/Time', + schemaPath: '#/properties/Time/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.properties.Time.type, + parentSchema: schema27.properties.Time, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.Combined !== undefined) { + let data8 = data.Combined; + const _errs17 = errors; + if (typeof data8 !== 'boolean') { + validate42.errors = [ + { + instancePath: instancePath + '/Combined', + schemaPath: '#/properties/Combined/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema27.properties.Combined.type, + parentSchema: schema27.properties.Combined, + data: data8, + }, + ]; + return false; + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.onlyOwn !== undefined) { + let data9 = data.onlyOwn; + const _errs19 = errors; + if (typeof data9 !== 'boolean') { + validate42.errors = [ + { + instancePath: instancePath + '/onlyOwn', + schemaPath: '#/properties/onlyOwn/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema27.properties.onlyOwn.type, + parentSchema: schema27.properties.onlyOwn, + data: data9, + }, + ]; + return false; + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } else { + validate42.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema27.type, + parentSchema: schema27, + data, + }, + ]; + return false; + } + } + validate42.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse200Request = validate43; +const schema28 = { + type: 'array', + items: { + type: 'object', + required: ['Device', 'Booked', 'Free'], + properties: { + Device: { type: 'string', description: 'ID of the device (or * if combined).' }, + Booked: { + type: 'array', + description: 'Array of booked times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + Free: { + type: 'array', + description: 'Array of free times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleResponse200Request', + 'x-location': + '#/paths//schedule/post/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate43( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Device === undefined && (missing0 = 'Device')) || + (data0.Booked === undefined && (missing0 = 'Booked')) || + (data0.Free === undefined && (missing0 = 'Free')) + ) { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema28.items.required, + parentSchema: schema28.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Device !== undefined) { + let data1 = data0.Device; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Device', + schemaPath: '#/items/properties/Device/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema28.items.properties.Device.type, + parentSchema: schema28.items.properties.Device, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Booked !== undefined) { + let data2 = data0.Booked; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len1 = data2.length; + for (let i1 = 0; i1 < len1; i1++) { + let data3 = data2[i1]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.Start === undefined && (missing1 = 'Start')) || + (data3.End === undefined && (missing1 = 'End')) + ) { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema28.items.properties.Booked.items.required, + parentSchema: schema28.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema28.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema28.items.properties.Booked.items + .properties.Start.type, + parentSchema: + schema28.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema28.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema28.items.properties.Booked.items + .properties.End.type, + parentSchema: + schema28.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema28.items.properties.Booked.items.type, + parentSchema: schema28.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked', + schemaPath: '#/items/properties/Booked/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema28.items.properties.Booked.type, + parentSchema: schema28.items.properties.Booked, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Free !== undefined) { + let data6 = data0.Free; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid4 = true; + const len2 = data6.length; + for (let i2 = 0; i2 < len2; i2++) { + let data7 = data6[i2]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if ( + (data7.Start === undefined && (missing2 = 'Start')) || + (data7.End === undefined && (missing2 = 'End')) + ) { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema28.items.properties.Free.items.required, + parentSchema: schema28.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.Start !== undefined) { + let data8 = data7.Start; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats2.validate(data8)) { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema28.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema28.items.properties.Free.items + .properties.Start.type, + parentSchema: + schema28.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } + } + var valid5 = _errs17 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data7.End !== undefined) { + let data9 = data7.End; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats2.validate(data9)) { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema28.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } else { + validate43.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema28.items.properties.Free.items + .properties.End.type, + parentSchema: + schema28.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } + } + var valid5 = _errs19 === errors; + } else { + var valid5 = true; + } + } + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema28.items.properties.Free.items.type, + parentSchema: schema28.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } + } + var valid4 = _errs15 === errors; + if (!valid4) { + break; + } + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free', + schemaPath: '#/items/properties/Free/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema28.items.properties.Free.type, + parentSchema: schema28.items.properties.Free, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate43.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema28.items.type, + parentSchema: schema28.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate43.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema28.type, + parentSchema: schema28, + data, + }, + ]; + return false; + } + } + validate43.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse200Response = validate44; +const schema29 = { + type: 'array', + items: { + type: 'object', + required: ['Device', 'Booked', 'Free'], + properties: { + Device: { type: 'string', description: 'ID of the device (or * if combined).' }, + Booked: { + type: 'array', + description: 'Array of booked times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + Free: { + type: 'array', + description: 'Array of free times.', + items: { + title: 'Timeslot', + description: 'A time slot represents a slice of time used for bookings.', + type: 'object', + required: ['Start', 'End'], + properties: { + Start: { + type: 'string', + description: 'Start time of the booking.', + format: 'date-time', + }, + End: { + type: 'string', + description: 'End time of the booking.', + format: 'date-time', + }, + }, + }, + }, + }, + }, + 'x-standalone': false, + 'x-name': 'scheduleResponse200Response', + 'x-location': + '#/paths//schedule/post/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate44( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.Device === undefined && (missing0 = 'Device')) || + (data0.Booked === undefined && (missing0 = 'Booked')) || + (data0.Free === undefined && (missing0 = 'Free')) + ) { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema29.items.required, + parentSchema: schema29.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.Device !== undefined) { + let data1 = data0.Device; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Device', + schemaPath: '#/items/properties/Device/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema29.items.properties.Device.type, + parentSchema: schema29.items.properties.Device, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Booked !== undefined) { + let data2 = data0.Booked; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len1 = data2.length; + for (let i1 = 0; i1 < len1; i1++) { + let data3 = data2[i1]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.Start === undefined && (missing1 = 'Start')) || + (data3.End === undefined && (missing1 = 'End')) + ) { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema29.items.properties.Booked.items.required, + parentSchema: schema29.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.Start !== undefined) { + let data4 = data3.Start; + const _errs9 = errors; + if (errors === _errs9) { + if (errors === _errs9) { + if (typeof data4 === 'string') { + if (!formats2.validate(data4)) { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema29.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } else { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/Start', + schemaPath: + '#/items/properties/Booked/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema29.items.properties.Booked.items + .properties.Start.type, + parentSchema: + schema29.items.properties.Booked.items + .properties.Start, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.End !== undefined) { + let data5 = data3.End; + const _errs11 = errors; + if (errors === _errs11) { + if (errors === _errs11) { + if (typeof data5 === 'string') { + if (!formats2.validate(data5)) { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema29.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } else { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Booked/' + + i1 + + '/End', + schemaPath: + '#/items/properties/Booked/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema29.items.properties.Booked.items + .properties.End.type, + parentSchema: + schema29.items.properties.Booked.items + .properties.End, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked/' + i1, + schemaPath: '#/items/properties/Booked/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema29.items.properties.Booked.items.type, + parentSchema: schema29.items.properties.Booked.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Booked', + schemaPath: '#/items/properties/Booked/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema29.items.properties.Booked.type, + parentSchema: schema29.items.properties.Booked, + data: data2, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.Free !== undefined) { + let data6 = data0.Free; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid4 = true; + const len2 = data6.length; + for (let i2 = 0; i2 < len2; i2++) { + let data7 = data6[i2]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if ( + (data7.Start === undefined && (missing2 = 'Start')) || + (data7.End === undefined && (missing2 = 'End')) + ) { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema29.items.properties.Free.items.required, + parentSchema: schema29.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.Start !== undefined) { + let data8 = data7.Start; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats2.validate(data8)) { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema29.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } else { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/Start', + schemaPath: + '#/items/properties/Free/items/properties/Start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema29.items.properties.Free.items + .properties.Start.type, + parentSchema: + schema29.items.properties.Free.items + .properties.Start, + data: data8, + }, + ]; + return false; + } + } + } + var valid5 = _errs17 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data7.End !== undefined) { + let data9 = data7.End; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats2.validate(data9)) { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema29.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } else { + validate44.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/Free/' + + i2 + + '/End', + schemaPath: + '#/items/properties/Free/items/properties/End/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema29.items.properties.Free.items + .properties.End.type, + parentSchema: + schema29.items.properties.Free.items + .properties.End, + data: data9, + }, + ]; + return false; + } + } + } + var valid5 = _errs19 === errors; + } else { + var valid5 = true; + } + } + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free/' + i2, + schemaPath: '#/items/properties/Free/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema29.items.properties.Free.items.type, + parentSchema: schema29.items.properties.Free.items, + data: data7, + }, + ]; + return false; + } + } + var valid4 = _errs15 === errors; + if (!valid4) { + break; + } + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0 + '/Free', + schemaPath: '#/items/properties/Free/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema29.items.properties.Free.type, + parentSchema: schema29.items.properties.Free, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate44.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema29.items.type, + parentSchema: schema29.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate44.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema29.type, + parentSchema: schema29, + data, + }, + ]; + return false; + } + } + validate44.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse404Request = validate45; +const schema30 = { + type: 'string', + description: 'First unknown device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse404Request', + 'x-location': + '#/paths//schedule/post/responses/404/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate45( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate45.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema30.type, + parentSchema: schema30, + data, + }, + ]; + return false; + } + validate45.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse404Response = validate46; +const schema31 = { + type: 'string', + description: 'First unknown device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse404Response', + 'x-location': + '#/paths//schedule/post/responses/404/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate46( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate46.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema31.type, + parentSchema: schema31, + data, + }, + ]; + return false; + } + validate46.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse422Request = validate47; +const schema32 = { + type: 'string', + description: 'First virtual device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse422Request', + 'x-location': + '#/paths//schedule/post/responses/422/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate47( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate47.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema32.type, + parentSchema: schema32, + data, + }, + ]; + return false; + } + validate47.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse422Response = validate48; +const schema33 = { + type: 'string', + description: 'First virtual device ID.', + 'x-standalone': false, + 'x-name': 'scheduleResponse422Response', + 'x-location': + '#/paths//schedule/post/responses/422/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate48( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate48.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema33.type, + parentSchema: schema33, + data, + }, + ]; + return false; + } + validate48.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse500Request = validate49; +const schema34 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'scheduleResponse500Request', + 'x-location': + '#/paths//schedule/post/responses/500/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate49( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate49.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema34.type, + parentSchema: schema34, + data, + }, + ]; + return false; + } + validate49.errors = vErrors; + return errors === 0; +} +exports.validateScheduleResponse500Response = validate50; +const schema35 = { + type: 'string', + description: 'Error description.', + 'x-standalone': false, + 'x-name': 'scheduleResponse500Response', + 'x-location': + '#/paths//schedule/post/responses/500/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate50( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate50.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema35.type, + parentSchema: schema35, + data, + }, + ]; + return false; + } + validate50.errors = vErrors; + return errors === 0; +} diff --git a/services/experiment/src/clients/schedule-service/basicValidation.d.cts b/services/experiment/src/clients/schedule-service/basicValidation.d.cts new file mode 100644 index 00000000..2a3299fc --- /dev/null +++ b/services/experiment/src/clients/schedule-service/basicValidation.d.cts @@ -0,0 +1,119 @@ +export declare function validateBooking( + object: unknown, +): Booking; + +export declare function validateDevice( + object: unknown, +): Device; + +export declare function validateExperiment( + object: unknown, +): Experiment; + +export declare function validateTimeslot( + object: unknown, +): Timeslot; + +export declare function validateID( + object: unknown, +): ID; + +export declare function validateScheduleBody( + object: unknown, +): scheduleBody; + +export declare function validateScheduleResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse200; + +export declare function validateScheduleResponse404< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse404; + +export declare function validateScheduleResponse422< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse422; + +export declare function validateScheduleResponse500< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse500; + +export declare function validateBookingRequest( + object: unknown, +): BookingRequest; + +export declare function validateBookingResponse( + object: unknown, +): BookingResponse; + +export declare function validateDeviceRequest( + object: unknown, +): DeviceRequest; + +export declare function validateDeviceResponse( + object: unknown, +): DeviceResponse; + +export declare function validateExperimentRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentRequest; + +export declare function validateExperimentResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentResponse; + +export declare function validateTimeslotRequest( + object: unknown, +): TimeslotRequest; + +export declare function validateTimeslotResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): TimeslotResponse; + +export declare function validateIDRequest( + object: unknown, +): IDRequest; + +export declare function validateIDResponse( + object: unknown, +): IDResponse; + +export declare function validateScheduleBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleBodyRequest; + +export declare function validateScheduleBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleBodyResponse; + +export declare function validateScheduleResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse200Request; + +export declare function validateScheduleResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse200Response; + +export declare function validateScheduleResponse404Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse404Request; + +export declare function validateScheduleResponse404Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse404Response; + +export declare function validateScheduleResponse422Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse422Request; + +export declare function validateScheduleResponse422Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse422Response; + +export declare function validateScheduleResponse500Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse500Request; + +export declare function validateScheduleResponse500Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): scheduleResponse500Response; diff --git a/services/experiment/src/clients/schedule-service/client.ts b/services/experiment/src/clients/schedule-service/client.ts new file mode 100644 index 00000000..7a05f43c --- /dev/null +++ b/services/experiment/src/clients/schedule-service/client.ts @@ -0,0 +1,303 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; + +import * as RequestValidation from './requestValidation.js'; +import * as Signatures from './signatures.js'; +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * This error class should be used if an error occurs during validation of a request/response. + * @category Errors + */ +export class ValidationError extends Error { + public errors: unknown; + + constructor(message: string, errors: unknown) { + super(message); + this.name = 'ValidationError'; + this.errors = errors; + } +} + +/** + * This error class should be used if an error occurs while fetching a request. + * @category Errors + */ +export class FetchError extends Error { + constructor(message: string) { + super(message); + this.name = 'FetchError'; + } +} + +/** + * This error class should be used if the response of the server has a status + * greater than or equal to 400. This error should contain the validated response. + * @category Errors + */ +export class UnsuccessfulRequestError extends Error { + public response: Types.ResponseData; + + constructor(message: string, response: Types.ResponseData) { + super(message); + this.response = response; + this.name = 'UnsuccessfulRequestError'; + } +} + +/** + * This error class should be used if the validation of an url fails. + * @category Errors + */ +export class InvalidUrlError extends Error { + constructor(message: string) { + super(message); + this.name = 'InvalidUrlError'; + } +} + +/** + * This function attempts to parse a Response as ResponseData. + */ +async function parseResponse(response: Response): Promise { + let text = null; + try { + text = await response.text(); + const json = JSON.parse(text); + return { status: response.status, body: json }; + } catch { + return { status: response.status, body: text }; + } +} + +/** + * This function checks if a string is a valid http url. + * @param string The string to be checked. + * @returns True if the string is a valid http url. + */ +function isValidHttpUrl(string: string) { + let url; + + try { + url = new URL(string); + } catch (_) { + return false; + } + + return url.protocol === 'http:' || url.protocol === 'https:'; +} + +/** + * This function takes an url and a pattern for the requested endpoint and parses the contained path parameters. + * @param url The url to be parsed. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the provided url does not end with the provided endpoint. + * @returns An array containing all parsed path parameters in order of appearance. + * @example + * // returns ["username", "role_name"] + * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function parsePathParameters(url: string, endpoint: string): string[] { + const parameterRegex = '([a-zA-Z0-9-:]+)'; + const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); + const matches = url.match(regex); + + if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint'); + + return matches.slice(1); +} + +/** + * This function validates a given http url and parses its path parameters. + * @param url The url to be validated. + * @param endpoint Pattern of the requested endpoint. + * @throws {InvalidUrlError} Thrown if the validation of the provided url fails. + * @returns An array containing all parsed path parameters in order of appearance (see {@link parsePathParameters}). + * @example + * // returns ["username", "role_name"] + * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") + */ +function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { + if (!isValidHttpUrl(url)) + throw new InvalidUrlError('Provided url is not a valid http url'); + if (!url.startsWith(baseUrl)) + throw new InvalidUrlError('Provided url does not start with the provided base url'); + const pathParameters = parsePathParameters(url, endpoint); + + let extendedBaseUrl = baseUrl + endpoint; + + pathParameters.forEach(pathParameter => { + extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); + }); + + if (url !== extendedBaseUrl) + throw new InvalidUrlError('Provided url does not match extended base url'); + + return pathParameters; +} + +/** + * This function appends a given endpoint to an url. + * @param url The url to append the endpoint to. + * @param endpoint The endpoint to be appended. + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id", "/token") + * @example + * // returns "https://api.example.com/devices/device_id/token" + * appendToUrl("https://api.example.com/devices/device_id/", "/token") + * @returns The url with the appended endpoint. + */ +function appendToUrl(url: string, endpoint: string) { + return url.endsWith('/') ? `${url.slice(0, -1)}${endpoint}` : `${url}${endpoint}`; +} + +/** + * Client for the use of the Crosslab API + * @category Client + */ +export class Client { + public readonly baseUrl: string; + public readonly serviceUrl: string; + public accessToken: string; + private fixedHeaders: [string, string][]; + private fetch = async (url: RequestInfo | URL, init: RequestInit) => { + let raw_response; + try { + if ( + url.toString().startsWith(this.baseUrl) || + url.toString().startsWith(this.serviceUrl) + ) { + raw_response = await fetch(url, init); + } else { + raw_response = await fetch( + appendToUrl( + this.baseUrl, + '/proxy?' + new URLSearchParams([['URL', url.toString()]]).toString(), + ), + init, + ); + } + } catch (error) { + if (error instanceof Error) { + throw new FetchError(error.message); + } else if (typeof error === 'string') { + throw new FetchError(error); + } else { + throw new FetchError('Something went wrong while trying to fetch the request'); + } + } + return await parseResponse(raw_response); + }; + + /** + * @category Constructors + */ + constructor( + baseUrl: string, + options: { + serviceUrl?: string; + accessToken?: string; + fixedHeaders?: [string, string][]; + }, + ) { + this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; + this.serviceUrl = options.serviceUrl + ? options.serviceUrl.endsWith('/') + ? options.serviceUrl.slice(0, -1) + : options.serviceUrl + : this.baseUrl; + this.accessToken = options.accessToken ?? ''; + this.fixedHeaders = options.fixedHeaders ?? []; + } + + /** + * Returns the free / booked times for given experiment. + * + * @param body + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * Timetable of free/booked time. If 'Combined' is set to true, an array with only one entry is returned containing the combined timetable. + */ + public async schedule( + body: { + /** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ + Experiment: Types.Experiment<'request'>; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * If true, show only one timetable per device instead of one for all available physical devices. + */ + Combined?: boolean; + /** + * (private) Show only devices of this institution. Give an error if a device of an other institution is requested. + */ + onlyOwn?: boolean; + [k: string]: unknown; + }, + options?: { + headers?: [string, string][]; + url?: string; + }, + ): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/schedule'); + + if (!RequestValidation.validateScheduleInput(body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateScheduleInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }); + + if (!RequestValidation.validateScheduleOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateScheduleOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } +} diff --git a/services/experiment/src/clients/schedule-service/requestValidation.ts b/services/experiment/src/clients/schedule-service/requestValidation.ts new file mode 100644 index 00000000..a0b51f66 --- /dev/null +++ b/services/experiment/src/clients/schedule-service/requestValidation.ts @@ -0,0 +1,101 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as BasicValidation from './basicValidation.cjs'; +import * as Signatures from './signatures.js'; +import { FunctionWithErrors, ResponseData } from './types.js'; + +/** + * This function validates the inputs to schedule() + */ +export function validateScheduleInput(body: Signatures.ScheduleBody) { + if (body === undefined) { + return true; + } + + if (!BasicValidation.validateScheduleBodyRequest(body)) { + (validateScheduleInput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; +} + +/** + * This function validates the outputs of schedule() + */ +export function validateScheduleOutput( + response: ResponseData, +): response is Signatures.ScheduleResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if (!BasicValidation.validateScheduleResponse200Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + if (!BasicValidation.validateScheduleResponse404Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse404Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 422) { + if (!BasicValidation.validateScheduleResponse422Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse422Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 500) { + if (!BasicValidation.validateScheduleResponse500Response(response.body)) { + (validateScheduleOutput as FunctionWithErrors).errors = ( + BasicValidation.validateScheduleResponse500Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 503) { + return true; + } + + ( + validateScheduleOutput as FunctionWithErrors + ).errors = `Response status ${response.status} is unexpected`; + + return false; +} diff --git a/services/experiment/src/clients/schedule-service/signatures.ts b/services/experiment/src/clients/schedule-service/signatures.ts new file mode 100644 index 00000000..32de25f3 --- /dev/null +++ b/services/experiment/src/clients/schedule-service/signatures.ts @@ -0,0 +1,173 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import * as Types from './types.js'; +// @ts-ignore +import { type Require } from './types.js'; + +/** + * Typing for the body of the request made by schedule() + * @category schedule() + */ +export type ScheduleBody = + | { + /** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ + Experiment: Types.Experiment<'request'>; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * If true, show only one timetable per device instead of one for all available physical devices. + */ + Combined?: boolean; + /** + * (private) Show only devices of this institution. Give an error if a device of an other institution is requested. + */ + onlyOwn?: boolean; + [k: string]: unknown; + } + | undefined; + +/** + * Typing for all possible responses to the request made by schedule() + * @category schedule() + */ +export type ScheduleResponse = ScheduleSuccessResponse | ScheduleErrorResponse; + +/** + * Typing for all successful responses to the request made by schedule() + * @category schedule() + */ +export type ScheduleSuccessResponse = ScheduleResponse200; + +/** + * Typing for all error responses to the request made by schedule() + * @category schedule() + */ +export type ScheduleErrorResponse = + | ScheduleResponse400 + | ScheduleResponse401 + | ScheduleResponse403 + | ScheduleResponse404 + | ScheduleResponse422 + | ScheduleResponse500 + | ScheduleResponse503; + +/** + * Typing for a response with status 200 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse200 extends Types.SuccessResponse { + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: { + /** + * ID of the device (or * if combined). + */ + Device: string; + /** + * Array of booked times. + */ + Booked: Types.Timeslot<'response'>[]; + /** + * Array of free times. + */ + Free: Types.Timeslot<'response'>[]; + [k: string]: unknown; + }[]; +} + +/** + * Typing for a response with status 400 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse400 extends Types.ErrorResponse { + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 401 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse401 extends Types.ErrorResponse { + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 403 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse403 extends Types.ErrorResponse { + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} + +/** + * Typing for a response with status 404 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse404 extends Types.ErrorResponse { + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 422 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse422 extends Types.ErrorResponse { + status: 422; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 500 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse500 extends Types.ErrorResponse { + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body: string; +} + +/** + * Typing for a response with status 503 to the request made by schedule() + * @category schedule() + */ +export interface ScheduleResponse503 extends Types.ErrorResponse { + status: 503; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} diff --git a/services/experiment/src/clients/schedule-service/types.ts b/services/experiment/src/clients/schedule-service/types.ts new file mode 100644 index 00000000..2d71aa30 --- /dev/null +++ b/services/experiment/src/clients/schedule-service/types.ts @@ -0,0 +1,410 @@ +/** + * This file was automatically generated by openapi-codegeneration. + * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, + * and run openapi-codegeneration to regenerate this file. + */ +import * as _BasicValidation from './basicValidation.cjs'; + +/** + * @internal + */ +export interface FunctionWithErrors { + (...args: unknown[]): unknown; + errors?: unknown; +} + +/** + * @internal + */ +export interface RequestInfo { + method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'OPTIONS' | 'PATCH' | 'HEAD'; + body?: string; + headers?: [string, string][]; +} + +/** + * @internal + */ +export type FetchFunction = ( + url: string, + info?: RequestInfo, +) => Promise | ResponseData; + +export interface ResponseData { + status: number; + headers?: { + [key: string]: string | undefined; + }; + body?: unknown; +} + +export interface SuccessResponse extends ResponseData { + success?: true; +} + +export interface ErrorResponse extends ResponseData { + success?: false; +} + +/** + * @internal + */ +export function isSuccessResponse(response: ResponseData): response is SuccessResponse { + return response.status < 400; +} + +/** + * @internal + */ +export function isErrorResponse(response: ResponseData): response is ErrorResponse { + return response.status >= 400; +} + +/** + * This type allows to pick the required properties of another type. + */ +export type Require = Partial & { + [Property in Key]-?: Type[Property]; +}; + +export type SizedTuple< + T, + MIN extends number | undefined = undefined, + MAX extends number | undefined = undefined, +> = MIN extends number + ? MAX extends number + ? _SizedTuple> + : TupleObject> & T[] + : MAX extends number + ? _SizedTuple, true> + : T[]; + +type _SizedTuple = ARR extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? Tuple | _SizedTuple + : never; + +type Tuple = _Tuple< + T, + NumericRangeTuple +>; + +type _Tuple = N extends [ + infer HEAD, + ...infer TAIL extends number[], +] + ? HEAD extends 0 + ? [] | _Tuple + : [T, ..._Tuple] + : []; + +type TupleObject = N extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? TAIL extends [] + ? Record + : { [P in HEAD]: T } & TupleObject + : Record; + +export type NumericRange< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number = never, +> = ARR['length'] extends END + ? ACC | START | END + : NumericRange< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : ACC | ARR['length'] + >; + +type NumericRangeTuple< + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number[] = [], +> = ARR['length'] extends END + ? [START, ...ACC, END] + : NumericRangeTuple< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : [...ACC, ARR['length']] + >; + +/** + * A booking in the booking system. + */ +export type Booking = T extends 'all' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : never; + +/** + * A device might either be a physical/virtual device or a group of device. + */ +export type Device = T extends 'all' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : never; + +/** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ +export type Experiment = T extends 'all' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'request'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'response'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : never; + +/** + * A time slot represents a slice of time used for bookings. + */ +export type Timeslot = T extends 'all' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : never; diff --git a/services/experiment/src/config.ts b/services/experiment/src/config.ts index 12b696e0..e6d09193 100644 --- a/services/experiment/src/config.ts +++ b/services/experiment/src/config.ts @@ -13,6 +13,9 @@ export const config = { NODE_ENV: process.env.NODE_ENV ?? 'development', BASE_URL: process.env.BASE_URL ?? 'http://localhost', DEVICE_SERVICE_URL: process.env.DEVICE_SERVICE_URL ?? 'http://localhost:3001', + BOOKING_FRONTEND_URL: process.env.BOOKING_FRONTEND_URL ?? 'http://localhost:3004', + BOOKING_BACKEND_URL: process.env.BOOKING_BACKEND_URL ?? 'http://localhost:3005', + SCHEDULE_SERVICE_URL: process.env.SCHEDULE_SERVICE_URL ?? 'http://localhost:3006', JWT_SECRET: 'secret', orm: { ...basicOrmConfig, diff --git a/services/experiment/src/methods/experimentStatus/book.ts b/services/experiment/src/methods/experimentStatus/book.ts index f120e65a..f0943f3f 100644 --- a/services/experiment/src/methods/experimentStatus/book.ts +++ b/services/experiment/src/methods/experimentStatus/book.ts @@ -24,7 +24,7 @@ export async function bookExperiment(experimentModel: ExperimentModel) { experimentModel.bookingStart && experimentModel.bookingEnd ) { - const booking = await clients.booking.getBooking(experimentModel.bookingID); + const booking = await clients.booking.frontend.getBooking(experimentModel.bookingID); if ( Date.parse(booking.Booking.Time.Start) !== Date.parse(experimentModel.bookingStart) || @@ -44,7 +44,7 @@ export async function bookExperiment(experimentModel: ExperimentModel) { ); // TODO: error handling - const { BookingID } = await clients.booking.newBooking({ + const { BookingID } = await clients.booking.frontend.newBooking({ Devices: experimentModel.devices.map(device => { return { ID: device.url }; }), @@ -55,7 +55,7 @@ export async function bookExperiment(experimentModel: ExperimentModel) { Type: 'normal', }); - await clients.booking.updateBooking(BookingID, { + await clients.booking.frontend.updateBooking(BookingID, { Callback: callbackUrl, }); diff --git a/services/experiment/src/methods/experimentStatus/finish.ts b/services/experiment/src/methods/experimentStatus/finish.ts index 44c3f136..b2acaefc 100644 --- a/services/experiment/src/methods/experimentStatus/finish.ts +++ b/services/experiment/src/methods/experimentStatus/finish.ts @@ -1,8 +1,7 @@ import { logger } from '@crosslab/service-common'; import assert from 'assert'; -import { UnsuccessfulRequestError as UnsuccessfulRequestErrorBooking } from '../../clients/booking/client.js'; -import { UnsuccessfulRequestError as UnsuccessfulRequestErrorDevice } from '../../clients/device/client.js'; +import { UnsuccessfulRequestError } from '../../clients/device/client.js'; import { Clients } from '../../clients/index.js'; import { repositories } from '../../database/dataSource.js'; import { ExperimentModel } from '../../database/model.js'; @@ -99,10 +98,7 @@ async function deleteInstances(experiment: ExperimentModel, clients: Clients) { try { await clients.device.deleteDevice(device.instance.url); } catch (error) { - if ( - error instanceof UnsuccessfulRequestErrorDevice && - error.response.status === 404 - ) + if (error instanceof UnsuccessfulRequestError && error.response.status === 404) continue; throw error; } @@ -117,10 +113,7 @@ async function deletePeerconnections(experiment: ExperimentModel, clients: Clien try { await clients.device.deletePeerconnection(peerconnection.url); } catch (error) { - if ( - error instanceof UnsuccessfulRequestErrorDevice && - error.response.status === 404 - ) + if (error instanceof UnsuccessfulRequestError && error.response.status === 404) continue; throw error; } @@ -131,12 +124,9 @@ async function deletePeerconnections(experiment: ExperimentModel, clients: Clien async function unlockBooking(experiment: ExperimentModel, clients: Clients) { if (experiment.bookingID) { try { - await clients.booking.unlockBooking(experiment.bookingID); + await clients.booking.backend.unlockBooking(experiment.bookingID); } catch (error) { - if ( - error instanceof UnsuccessfulRequestErrorBooking && - error.response.status === 404 - ) + if (error instanceof UnsuccessfulRequestError && error.response.status === 404) return; throw error; } @@ -146,12 +136,9 @@ async function unlockBooking(experiment: ExperimentModel, clients: Clients) { async function deleteBooking(experiment: ExperimentModel, clients: Clients) { if (experiment.bookingID) { try { - await clients.booking.deleteBooking(experiment.bookingID); + await clients.booking.frontend.deleteBooking(experiment.bookingID); } catch (error) { - if ( - error instanceof UnsuccessfulRequestErrorBooking && - error.response.status === 404 - ) + if (error instanceof UnsuccessfulRequestError && error.response.status === 404) return; throw error; } diff --git a/services/experiment/src/methods/experimentStatus/run.ts b/services/experiment/src/methods/experimentStatus/run.ts index f4bad153..8b6a7d20 100644 --- a/services/experiment/src/methods/experimentStatus/run.ts +++ b/services/experiment/src/methods/experimentStatus/run.ts @@ -46,7 +46,7 @@ export async function runExperiment(experimentModel: ExperimentModel, clients: C `Experiment is in status 'booked', but does not satisfy the requirements for this status`, 500, ); - const booking = await clients.booking.getBooking(experimentModel.bookingID); + const booking = await clients.booking.frontend.getBooking(experimentModel.bookingID); if ( Date.parse(experimentModel.bookingStart) !== Date.parse(booking.Booking.Time.Start) || diff --git a/services/experiment/src/methods/experimentStatus/setup/bookingLocking.ts b/services/experiment/src/methods/experimentStatus/setup/bookingLocking.ts index 23641117..887e73d9 100644 --- a/services/experiment/src/methods/experimentStatus/setup/bookingLocking.ts +++ b/services/experiment/src/methods/experimentStatus/setup/bookingLocking.ts @@ -30,7 +30,9 @@ export async function lockBookingExperiment( ); // TODO: error handling - const lockedDevices = await clients.booking.lockBooking(experimentModel.bookingID); + const lockedDevices = await clients.booking.backend.lockBooking( + experimentModel.bookingID, + ); for (const [index, resolvedDevice] of resolvedDevices.entries()) { if (resolvedDevice.type !== 'group') continue; diff --git a/services/experiment/src/methods/experimentStatus/setup/bookingUpdate.ts b/services/experiment/src/methods/experimentStatus/setup/bookingUpdate.ts index 1d4c8493..505ba024 100644 --- a/services/experiment/src/methods/experimentStatus/setup/bookingUpdate.ts +++ b/services/experiment/src/methods/experimentStatus/setup/bookingUpdate.ts @@ -30,7 +30,7 @@ export async function updateBookingExperiment( ); // TODO: error handling - await clients.booking.updateBooking(experimentModel.bookingID, { + await clients.booking.frontend.updateBooking(experimentModel.bookingID, { Locked: true, Devices: newDeviceUrls.map(newDeviceUrl => { return { diff --git a/services/experiment/src/operations/callbacks/callbackHandler.ts b/services/experiment/src/operations/callbacks/callbackHandler.ts index d0cd3ea2..b3442695 100644 --- a/services/experiment/src/operations/callbacks/callbackHandler.ts +++ b/services/experiment/src/operations/callbacks/callbackHandler.ts @@ -290,7 +290,7 @@ class CallbackHandler { continue; } - const booking = await clients.booking.getBooking(callback.url); + const booking = await clients.booking.frontend.getBooking(callback.url); if (booking.Booking.Status === 'cancelled') await finishExperiment(experimentModel, clients); diff --git a/services/gateway/conf/api_backends.conf b/services/gateway/conf/api_backends.conf index d662500b..31ec2bdb 100644 --- a/services/gateway/conf/api_backends.conf +++ b/services/gateway/conf/api_backends.conf @@ -17,3 +17,15 @@ upstream auth_service { upstream authorization_service { server ${AUTHORIZATION_SERVICE_DOMAIN}; } + +upstream booking_frontend { + server ${BOOKING_FRONTEND_DOMAIN}; +} + +upstream booking_backend { + server ${BOOKING_BACKEND_DOMAIN}; +} + +upstream schedule_service { + server ${SCHEDULE_SERVICE_DOMAIN}; +} \ No newline at end of file diff --git a/services/gateway/conf/api_gateway.conf b/services/gateway/conf/api_gateway.conf index 53b83640..14791b17 100644 --- a/services/gateway/conf/api_gateway.conf +++ b/services/gateway/conf/api_gateway.conf @@ -27,6 +27,7 @@ server { include federation_service.conf; include auth_service.conf; include authorization_service.conf; + include booking_service.conf; # Error responses # error_page 404 = @400; # Treat invalid paths as bad requests diff --git a/services/gateway/conf/booking_service.conf b/services/gateway/conf/booking_service.conf new file mode 100644 index 00000000..b982c0b7 --- /dev/null +++ b/services/gateway/conf/booking_service.conf @@ -0,0 +1,59 @@ +location = /schedule { + limit_except post { deny all; } + auth_request @auth; + auth_request_set $authentication $upstream_http_x_request_authentication; + + proxy_set_header X-Request-Authentication $authentication; + proxy_set_header X-Request-ID $request_id; + proxy_pass http://schedule_service; +} + +location = /booking { + limit_except post { deny all; } + auth_request @auth; + auth_request_set $authentication $upstream_http_x_request_authentication; + + proxy_set_header X-Request-Authentication $authentication; + proxy_set_header X-Request-ID $request_id; + proxy_pass http://booking_frontend; +} + +location ~ ^/booking/[^/]+$ { + limit_except get delete patch { deny all; } + auth_request @auth; + auth_request_set $authentication $upstream_http_x_request_authentication; + + proxy_set_header X-Request-Authentication $authentication; + proxy_set_header X-Request-ID $request_id; + proxy_pass http://booking_frontend; +} + +location ~ ^/booking/[^/]+/destroy$ { + limit_except delete { deny all; } + auth_request @auth; + auth_request_set $authentication $upstream_http_x_request_authentication; + + proxy_set_header X-Request-Authentication $authentication; + proxy_set_header X-Request-ID $request_id; + proxy_pass http://booking_frontend; +} + +location ~ ^/booking/[^/]+/lock$ { + limit_except put delete { deny all; } + auth_request @auth; + auth_request_set $authentication $upstream_http_x_request_authentication; + + proxy_set_header X-Request-Authentication $authentication; + proxy_set_header X-Request-ID $request_id; + proxy_pass http://booking_backend; +} + +location ~ ^/booking_callback/[^/]+$ { + limit_except post { deny all; } + auth_request @auth; + auth_request_set $authentication $upstream_http_x_request_authentication; + + proxy_set_header X-Request-Authentication $authentication; + proxy_set_header X-Request-ID $request_id; + proxy_pass http://booking_backend; +} \ No newline at end of file From 4e4eb5b2245374ca6ffa45b0e9beecd1a431d91a Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Thu, 11 Jul 2024 15:53:30 +0000 Subject: [PATCH 50/79] wip booking service integration --- .jobs.yml | 2 + .../python/src/crosslab/api_client/client.py | 2 +- .../booking/src/booking-backend/package.json | 2 +- .../booking/src/booking-backend/src/index.ts | 50 +++++------ .../booking/src/booking-backend/src/lib.ts | 1 + .../booking/src/booking-frontend/src/index.ts | 44 +++++----- .../booking-frontend/src/operations/index.ts | 3 + services/booking/src/common/package.json | 83 +++++++++---------- .../src/clients/booking-frontend/client.ts | 32 ++++--- .../booking-frontend/requestValidation.ts | 4 - .../clients/booking-frontend/signatures.ts | 32 ++++--- .../src/device-reservation/package.json | 2 +- .../src/device-reservation/src/index.ts | 12 +-- .../booking/src/device-reservation/src/lib.ts | 3 + .../booking/src/schedule-service/src/index.ts | 45 +++++----- .../src/clients/authentication/client.ts | 2 +- services/device/src/clients/device/client.ts | 4 +- .../device/src/clients/federation/client.ts | 2 +- .../booking-frontend/requestValidation.ts | 4 - .../clients/booking-frontend/signatures.ts | 32 ++++--- .../experiment/src/clients/device/client.ts | 4 +- .../src/clients/schedule-service/client.ts | 40 ++++----- 22 files changed, 192 insertions(+), 213 deletions(-) create mode 100644 services/booking/src/booking-backend/src/lib.ts create mode 100644 services/booking/src/device-reservation/src/lib.ts diff --git a/.jobs.yml b/.jobs.yml index f7e4e255..fd80153f 100644 --- a/.jobs.yml +++ b/.jobs.yml @@ -134,6 +134,8 @@ services/authorization: services/booking: - script: build-spec + paths: + - ./api - script: lint-spec dependencies: - services/booking:build-spec diff --git a/clients/api/python/src/crosslab/api_client/client.py b/clients/api/python/src/crosslab/api_client/client.py index 88270b24..514e7b23 100644 --- a/clients/api/python/src/crosslab/api_client/client.py +++ b/clients/api/python/src/crosslab/api_client/client.py @@ -1208,7 +1208,7 @@ async def schedule(self, url: str = "/schedule", body: Optional[ScheduleRequest] return resp raise Exception(f"Unexpected status code: {status}") - async def newBooking(self, url: str = "/booking", body: Optional[NewBookingRequest] = None) -> NewBookingResponse: # noqa: E501 + async def newBooking(self, body: NewBookingRequest, url: str = "/booking") -> NewBookingResponse: # noqa: E501 """ Books an experiment. """ # noqa: E501 diff --git a/services/booking/src/booking-backend/package.json b/services/booking/src/booking-backend/package.json index a1539f7b..8ab6ebbe 100644 --- a/services/booking/src/booking-backend/package.json +++ b/services/booking/src/booking-backend/package.json @@ -3,7 +3,7 @@ "name": "@crosslab/service-booking-backend", "version": "0.0.1", "description": "Part of booking service. Does most of the actual work and is horizontal scaleable.", - "main": "app/index.js", + "main": "app/lib.js", "dockerName": "booking-backend", "bin": { "crosslab-booking-backend": "./app/index.js" diff --git a/services/booking/src/booking-backend/src/index.ts b/services/booking/src/booking-backend/src/index.ts index a5f03696..947d10d7 100644 --- a/services/booking/src/booking-backend/src/index.ts +++ b/services/booking/src/booking-backend/src/index.ts @@ -5,31 +5,27 @@ import { handleDeviceReservationRequest, handleFreeDeviceRequest } from './amqpH import { config } from './config.js'; import { app } from './generated/index.js'; -export * from './messageDefinition.js'; +logging.init(); +app.initService({ + preHandlers: [ + (application: Application) => { + application.use(express.json()); + application.use(express.urlencoded({ extended: false })); + application.use(logging.middleware() as RequestHandler); + application.use(authorization.middleware() as RequestHandler); + }, + ], + postHandlers: [ + (application: Application) => { + application.get('/federation/status', (_req, res) => { + res.send({ status: 'ok' }); + }); + }, + ], + errorHandler: error.middleware as ErrorRequestHandler, +}); -if (require.main === module) { - logging.init(); - app.initService({ - preHandlers: [ - (application: Application) => { - application.use(express.json()); - application.use(express.urlencoded({ extended: false })); - application.use(logging.middleware() as RequestHandler); - application.use(authorization.middleware() as RequestHandler); - }, - ], - postHandlers: [ - (application: Application) => { - application.get('/federation/status', (_req, res) => { - res.send({ status: 'ok' }); - }); - }, - ], - errorHandler: error.middleware as ErrorRequestHandler, - }); - - console.log('Starting booking-backend'); - app.listen(config.PORT); - handleDeviceReservationRequest(); - handleFreeDeviceRequest(); -} +console.log('Starting booking-backend'); +app.listen(config.PORT); +handleDeviceReservationRequest(); +handleFreeDeviceRequest(); diff --git a/services/booking/src/booking-backend/src/lib.ts b/services/booking/src/booking-backend/src/lib.ts new file mode 100644 index 00000000..45e0ad3e --- /dev/null +++ b/services/booking/src/booking-backend/src/lib.ts @@ -0,0 +1 @@ +export * from './messageDefinition.js'; \ No newline at end of file diff --git a/services/booking/src/booking-frontend/src/index.ts b/services/booking/src/booking-frontend/src/index.ts index 5427ec16..3e74f00d 100644 --- a/services/booking/src/booking-frontend/src/index.ts +++ b/services/booking/src/booking-frontend/src/index.ts @@ -4,27 +4,25 @@ import express from 'express'; import { config } from './config.js'; import { app } from './generated/index.js'; -if (require.main === module) { - logging.init(); - app.initService({ - preHandlers: [ - application => { - application.use(express.json()); - application.use(express.urlencoded({ extended: false })); - application.use(logging.middleware() as express.RequestHandler); - application.use(authorization.middleware() as express.RequestHandler); - }, - ], - postHandlers: [ - application => { - application.get('/federation/status', (_req, res) => { - res.send({ status: 'ok' }); - }); - }, - ], - errorHandler: error.middleware as express.ErrorRequestHandler, - }); +logging.init(); +app.initService({ + preHandlers: [ + application => { + application.use(express.json()); + application.use(express.urlencoded({ extended: false })); + application.use(logging.middleware() as express.RequestHandler); + application.use(authorization.middleware() as express.RequestHandler); + }, + ], + postHandlers: [ + application => { + application.get('/federation/status', (_req, res) => { + res.send({ status: 'ok' }); + }); + }, + ], + errorHandler: error.middleware, +}); - console.log('Starting booking-frontend'); - app.listen(config.PORT); -} +console.log('Starting booking-frontend'); +app.listen(config.PORT); diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index 738a3cda..b7bba15a 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -4,6 +4,7 @@ import * as amqplib from 'amqplib'; import dayjs from 'dayjs'; import * as mysql from 'mysql2/promise'; +import { logger } from '../../../../../common/lib/types/logger.js'; import { config } from '../config.js'; import { deleteBookingByIDDestroySignature, @@ -89,6 +90,8 @@ export const postBooking: postBookingSignature = async (request, body) => { } catch (err) { await db.rollback(); + logger.log('error', 'Error creating booking: ' + err.toString()); + return { status: 500, body: err.toString(), diff --git a/services/booking/src/common/package.json b/services/booking/src/common/package.json index 6276f73b..b0b6fefd 100644 --- a/services/booking/src/common/package.json +++ b/services/booking/src/common/package.json @@ -1,44 +1,43 @@ { - "type": "module", - "name": "@crosslab/booking-service-common", - "version": "0.0.1", - "description": "Common resources for booking-service sub-services.", - "main": "lib/index.js", - "files": [ - "lib" - ], - "scripts": { - "copy:clients": "cp src/clients/device/basicValidation.cjs lib/clients/device/ && cp src/clients/booking-backend/basicValidation.cjs lib/clients/booking-backend/ && cp src/clients/booking-frontend/basicValidation.cjs lib/clients/booking-frontend/ && cp src/clients/schedule-service/basicValidation.cjs lib/clients/schedule-service/", - "build:generate": "npm-run-all build:generate:*", - "build:generate:device": "npx openapi-codegen -i ../../../device/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/device && prettier ./src/clients/device --write", - "build:generate:booking-backend": "npx openapi-codegen -i ../booking-backend/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/booking-backend && prettier ./src/clients/booking-backend --write", - "build:generate:booking-frontend": "npx openapi-codegen -i ../booking-frontend/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/booking-frontend && prettier ./src/clients/booking-frontend --write", - "build:generate:schedule-service": "npx openapi-codegen -i ../schedule-service/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/schedule-service && prettier ./src/clients/schedule-service --write", - "build:compile": "tsc", - "build:copy": "npm run copy:clients", - "build": "npm-run-all build:*", - "test": "echo \"Error: no test specified\" && exit 1", - "format": "prettier . --write", - "lint": "eslint ." - }, - "author": "", - "license": "Apache-2.0", - "devDependencies": { - "@types/node": "^20.5.9", - "@types/express": "^4.17.13", - "@types/node-fetch": "^2.6.4", - "prettier": "^3.0.3", - "typescript": "^5.2.2", - "npm-run-all": "^4.1.5", - "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", - "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration" - }, - "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/express": "^4.17.13", - "express": "^4.18.1", - "node-fetch": "^3.3.2", - "ajv-formats": "^3.0.1" - } + "type": "module", + "name": "@crosslab/booking-service-common", + "version": "0.0.1", + "description": "Common resources for booking-service sub-services.", + "main": "lib/index.js", + "files": [ + "lib" + ], + "scripts": { + "copy:clients": "cp src/clients/device/basicValidation.cjs lib/clients/device/ && cp src/clients/booking-backend/basicValidation.cjs lib/clients/booking-backend/ && cp src/clients/booking-frontend/basicValidation.cjs lib/clients/booking-frontend/ && cp src/clients/schedule-service/basicValidation.cjs lib/clients/schedule-service/", + "build:generate": "npm-run-all build:generate:*", + "build:generate:device": "npx openapi-codegen -i ../../../device/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/device && prettier ./src/clients/device --write", + "build:generate:booking-backend": "npx openapi-codegen -i ../booking-backend/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/booking-backend && prettier ./src/clients/booking-backend --write", + "build:generate:booking-frontend": "npx openapi-codegen -i ../booking-frontend/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/booking-frontend && prettier ./src/clients/booking-frontend --write", + "build:generate:schedule-service": "npx openapi-codegen -i ../schedule-service/dist/openapi.json -p @cross-lab-project/codegen-typescript-addon:preset:service-client -o ./src/clients/schedule-service && prettier ./src/clients/schedule-service --write", + "build:compile": "tsc", + "build:copy": "npm run copy:clients", + "build": "npm-run-all build:*", + "test": "echo \"Error: no test specified\" && exit 1", + "format": "prettier . --write", + "lint": "eslint ." + }, + "author": "", + "license": "Apache-2.0", + "devDependencies": { + "@types/node": "^20.5.9", + "@types/express": "^4.17.13", + "@types/node-fetch": "^2.6.4", + "prettier": "^3.0.3", + "typescript": "^5.2.2", + "npm-run-all": "^4.1.5", + "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", + "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration" + }, + "dependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/express": "^4.17.13", + "express": "^4.18.1", + "node-fetch": "^3.3.2", + "ajv-formats": "^3.0.1" } - \ No newline at end of file +} diff --git a/services/booking/src/common/src/clients/booking-frontend/client.ts b/services/booking/src/common/src/clients/booking-frontend/client.ts index c45ffc83..0fe8414a 100644 --- a/services/booking/src/common/src/clients/booking-frontend/client.ts +++ b/services/booking/src/common/src/clients/booking-frontend/client.ts @@ -241,23 +241,21 @@ export class Client { * The booking was accepted. The booking status will display whether the booking of all devices was successful. */ public async newBooking( - body: - | { - /** - * List of devices which should be added. - */ - Devices: Types.Device<'request'>[]; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: Types.Timeslot<'request'>; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - [k: string]: unknown; - } - | undefined, + body: { + /** + * List of devices which should be added. + */ + Devices: Types.Device<'request'>[]; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + [k: string]: unknown; + }, options?: { headers?: [string, string][]; url?: string; diff --git a/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts b/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts index eea88118..bf388f61 100644 --- a/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts +++ b/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts @@ -11,10 +11,6 @@ import { FunctionWithErrors, ResponseData } from './types.js'; * This function validates the inputs to newBooking() */ export function validateNewBookingInput(body: Signatures.NewBookingBody) { - if (body === undefined) { - return true; - } - if (!BasicValidation.validateNewBookingBodyRequest(body)) { (validateNewBookingInput as FunctionWithErrors).errors = ( BasicValidation.validateNewBookingBodyRequest as FunctionWithErrors diff --git a/services/booking/src/common/src/clients/booking-frontend/signatures.ts b/services/booking/src/common/src/clients/booking-frontend/signatures.ts index 38b5600d..09577589 100644 --- a/services/booking/src/common/src/clients/booking-frontend/signatures.ts +++ b/services/booking/src/common/src/clients/booking-frontend/signatures.ts @@ -15,23 +15,21 @@ import { type Require } from './types.js'; * Typing for the body of the request made by newBooking() * @category newBooking() */ -export type NewBookingBody = - | { - /** - * List of devices which should be added. - */ - Devices: Types.Device<'request'>[]; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: Types.Timeslot<'request'>; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - [k: string]: unknown; - } - | undefined; +export type NewBookingBody = { + /** + * List of devices which should be added. + */ + Devices: Types.Device<'request'>[]; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + [k: string]: unknown; +}; /** * Typing for all possible responses to the request made by newBooking() diff --git a/services/booking/src/device-reservation/package.json b/services/booking/src/device-reservation/package.json index b2f41b72..a6480dbd 100644 --- a/services/booking/src/device-reservation/package.json +++ b/services/booking/src/device-reservation/package.json @@ -3,7 +3,7 @@ "name": "@crosslab/service-device-reservation", "version": "0.1.0", "description": "Part of booking service. Responsible for low level device reservation.", - "main": "app/index.js", + "main": "app/lib.js", "dockerName": "device-reservation", "bin": { "crosslab-device-reservation": "./app/index.js" diff --git a/services/booking/src/device-reservation/src/index.ts b/services/booking/src/device-reservation/src/index.ts index b05d15dd..7eeb3136 100644 --- a/services/booking/src/device-reservation/src/index.ts +++ b/services/booking/src/device-reservation/src/index.ts @@ -1,13 +1,5 @@ -import { fileURLToPath } from 'url'; - import { mainLoop } from './mainLoop.js'; -export * from './mainLoop.js'; -export * from './messageDefinition.js'; -export * from './config.js'; - -if (process.argv[1] === fileURLToPath(import.meta.url)) { - console.log('Starting reservation service'); +console.log('Starting reservation service'); - mainLoop(); -} +mainLoop(); diff --git a/services/booking/src/device-reservation/src/lib.ts b/services/booking/src/device-reservation/src/lib.ts new file mode 100644 index 00000000..1763c813 --- /dev/null +++ b/services/booking/src/device-reservation/src/lib.ts @@ -0,0 +1,3 @@ +export * from './mainLoop.js'; +export * from './messageDefinition.js'; +export * from './config.js'; diff --git a/services/booking/src/schedule-service/src/index.ts b/services/booking/src/schedule-service/src/index.ts index 140afb5f..51ae5c03 100644 --- a/services/booking/src/schedule-service/src/index.ts +++ b/services/booking/src/schedule-service/src/index.ts @@ -1,30 +1,27 @@ import { authorization, error, logging } from '@crosslab/service-common'; import express, { ErrorRequestHandler, RequestHandler } from 'express'; -import { fileURLToPath } from 'url'; import { config } from './config.js'; import { app } from './generated/index.js'; -if (process.argv[1] === fileURLToPath(import.meta.url)) { - logging.init(); - app.initService({ - preHandlers: [ - application => { - application.use(express.json()); - application.use(express.urlencoded({ extended: false })); - application.use(logging.middleware() as RequestHandler); - application.use(authorization.middleware() as RequestHandler); - }, - ], - postHandlers: [ - application => { - application.get('/federation/status', (_req, res) => { - res.send({ status: 'ok' }); - }); - }, - ], - errorHandler: error.middleware as ErrorRequestHandler, - }); - console.log('Starting schedule-service'); - app.listen(config.PORT); -} +logging.init(); +app.initService({ + preHandlers: [ + application => { + application.use(express.json()); + application.use(express.urlencoded({ extended: false })); + application.use(logging.middleware() as RequestHandler); + application.use(authorization.middleware() as RequestHandler); + }, + ], + postHandlers: [ + application => { + application.get('/federation/status', (_req, res) => { + res.send({ status: 'ok' }); + }); + }, + ], + errorHandler: error.middleware as ErrorRequestHandler, +}); +console.log('Starting schedule-service'); +app.listen(config.PORT); diff --git a/services/device/src/clients/authentication/client.ts b/services/device/src/clients/authentication/client.ts index e8accc34..1d32d352 100644 --- a/services/device/src/clients/authentication/client.ts +++ b/services/device/src/clients/authentication/client.ts @@ -752,7 +752,7 @@ export class Client { * The JSON representation of the updated user. */ public async updateIdentity( - user: Types.User<'request'>, + user: Types.User<'request'> | undefined, options?: { headers?: [string, string][]; }, diff --git a/services/device/src/clients/device/client.ts b/services/device/src/clients/device/client.ts index a9cd592d..fd7e35f4 100644 --- a/services/device/src/clients/device/client.ts +++ b/services/device/src/clients/device/client.ts @@ -473,7 +473,7 @@ export class Client { */ public async updateDevice( url: string, - deviceUpdate: Types.DeviceUpdate<'request'>, + deviceUpdate: Types.DeviceUpdate<'request'> | undefined, options?: { headers?: [string, string][]; changedUrl?: string; @@ -859,7 +859,7 @@ export class Client { */ public async addDeviceAvailabilityRules( url: string, - availabilityRules: Types.AvailabilityRule<'request'>[], + availabilityRules: Types.AvailabilityRule<'request'>[] | undefined, options?: { headers?: [string, string][]; }, diff --git a/services/device/src/clients/federation/client.ts b/services/device/src/clients/federation/client.ts index de417c91..2aad4cb6 100644 --- a/services/device/src/clients/federation/client.ts +++ b/services/device/src/clients/federation/client.ts @@ -442,7 +442,7 @@ export class Client { */ public async updateInstitution( url: string, - institution: Types.Institution<'request'>, + institution: Types.Institution<'request'> | undefined, options?: { headers?: [string, string][]; }, diff --git a/services/experiment/src/clients/booking-frontend/requestValidation.ts b/services/experiment/src/clients/booking-frontend/requestValidation.ts index fee97a15..aa856d68 100644 --- a/services/experiment/src/clients/booking-frontend/requestValidation.ts +++ b/services/experiment/src/clients/booking-frontend/requestValidation.ts @@ -11,10 +11,6 @@ import { FunctionWithErrors, ResponseData } from './types.js'; * This function validates the inputs to newBooking() */ export function validateNewBookingInput(body: Signatures.NewBookingBody) { - if (body === undefined) { - return true; - } - if (!BasicValidation.validateNewBookingBodyRequest(body)) { (validateNewBookingInput as FunctionWithErrors).errors = ( BasicValidation.validateNewBookingBodyRequest as FunctionWithErrors diff --git a/services/experiment/src/clients/booking-frontend/signatures.ts b/services/experiment/src/clients/booking-frontend/signatures.ts index 38b5600d..09577589 100644 --- a/services/experiment/src/clients/booking-frontend/signatures.ts +++ b/services/experiment/src/clients/booking-frontend/signatures.ts @@ -15,23 +15,21 @@ import { type Require } from './types.js'; * Typing for the body of the request made by newBooking() * @category newBooking() */ -export type NewBookingBody = - | { - /** - * List of devices which should be added. - */ - Devices: Types.Device<'request'>[]; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: Types.Timeslot<'request'>; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - [k: string]: unknown; - } - | undefined; +export type NewBookingBody = { + /** + * List of devices which should be added. + */ + Devices: Types.Device<'request'>[]; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + [k: string]: unknown; +}; /** * Typing for all possible responses to the request made by newBooking() diff --git a/services/experiment/src/clients/device/client.ts b/services/experiment/src/clients/device/client.ts index a9cd592d..fd7e35f4 100644 --- a/services/experiment/src/clients/device/client.ts +++ b/services/experiment/src/clients/device/client.ts @@ -473,7 +473,7 @@ export class Client { */ public async updateDevice( url: string, - deviceUpdate: Types.DeviceUpdate<'request'>, + deviceUpdate: Types.DeviceUpdate<'request'> | undefined, options?: { headers?: [string, string][]; changedUrl?: string; @@ -859,7 +859,7 @@ export class Client { */ public async addDeviceAvailabilityRules( url: string, - availabilityRules: Types.AvailabilityRule<'request'>[], + availabilityRules: Types.AvailabilityRule<'request'>[] | undefined, options?: { headers?: [string, string][]; }, diff --git a/services/experiment/src/clients/schedule-service/client.ts b/services/experiment/src/clients/schedule-service/client.ts index 7a05f43c..774831bd 100644 --- a/services/experiment/src/clients/schedule-service/client.ts +++ b/services/experiment/src/clients/schedule-service/client.ts @@ -241,25 +241,27 @@ export class Client { * Timetable of free/booked time. If 'Combined' is set to true, an array with only one entry is returned containing the combined timetable. */ public async schedule( - body: { - /** - * An experiment describes a set of devices and how they should be connected (potentially among other metadata). - */ - Experiment: Types.Experiment<'request'>; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: Types.Timeslot<'request'>; - /** - * If true, show only one timetable per device instead of one for all available physical devices. - */ - Combined?: boolean; - /** - * (private) Show only devices of this institution. Give an error if a device of an other institution is requested. - */ - onlyOwn?: boolean; - [k: string]: unknown; - }, + body: + | { + /** + * An experiment describes a set of devices and how they should be connected (potentially among other metadata). + */ + Experiment: Types.Experiment<'request'>; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * If true, show only one timetable per device instead of one for all available physical devices. + */ + Combined?: boolean; + /** + * (private) Show only devices of this institution. Give an error if a device of an other institution is requested. + */ + onlyOwn?: boolean; + [k: string]: unknown; + } + | undefined, options?: { headers?: [string, string][]; url?: string; From 494734f67c8ab0e2129013430133fb02758a3c49 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Thu, 11 Jul 2024 16:12:43 +0000 Subject: [PATCH 51/79] Added more debugging logs --- .../src/booking-backend/src/internal.ts | 2 + .../booking-backend/basicValidation.cjs | 12 ++-- .../src/clients/booking-backend/client.ts | 2 +- .../src/clients/booking-backend/types.ts | 6 -- .../booking-frontend/basicValidation.cjs | 18 ++--- .../src/clients/booking-frontend/client.ts | 69 ++++++++++--------- .../booking-frontend/requestValidation.ts | 4 ++ .../clients/booking-frontend/signatures.ts | 32 +++++---- .../src/clients/booking-frontend/types.ts | 6 -- .../schedule-service/basicValidation.cjs | 18 ++--- .../src/clients/schedule-service/types.ts | 6 -- .../schedule-service/src/operations/index.ts | 3 + 12 files changed, 86 insertions(+), 92 deletions(-) diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 9386504a..664681a6 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -282,6 +282,7 @@ export async function dispatchCallback(bookingID: bigint) { } } catch (err) { // Something went wrong here - just continue for now + console.log("error", "Unknown error in dispatchCallback: " + (err as Error).toString()) continue; } } @@ -422,6 +423,7 @@ export async function reservateDevice(r: DeviceBookingRequest) { onlyOwn: true, }); } catch (e) { + console.log("Error while getting schedule in reservateDevice (using next device): " + (e as Error).toString()) continue; } if (schedule.length !== 1) { diff --git a/services/booking/src/common/src/clients/booking-backend/basicValidation.cjs b/services/booking/src/common/src/clients/booking-backend/basicValidation.cjs index 83d82620..91a62041 100644 --- a/services/booking/src/common/src/clients/booking-backend/basicValidation.cjs +++ b/services/booking/src/common/src/clients/booking-backend/basicValidation.cjs @@ -41,7 +41,7 @@ const schema6 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', @@ -661,7 +661,7 @@ const schema8 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, 'x-standalone': true, @@ -1352,7 +1352,7 @@ const schema15 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', @@ -1873,7 +1873,7 @@ const schema16 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', @@ -2593,7 +2593,7 @@ const schema19 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, 'x-standalone': true, @@ -2813,7 +2813,7 @@ const schema20 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, 'x-standalone': true, diff --git a/services/booking/src/common/src/clients/booking-backend/client.ts b/services/booking/src/common/src/clients/booking-backend/client.ts index 2c864a69..2d553fa9 100644 --- a/services/booking/src/common/src/clients/booking-backend/client.ts +++ b/services/booking/src/common/src/clients/booking-backend/client.ts @@ -222,7 +222,7 @@ export class Client { } /** - * Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. + * Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. * * @param url * Url of the resource to be accessed. diff --git a/services/booking/src/common/src/clients/booking-backend/types.ts b/services/booking/src/common/src/clients/booking-backend/types.ts index 8d0b0be8..f1af408d 100644 --- a/services/booking/src/common/src/clients/booking-backend/types.ts +++ b/services/booking/src/common/src/clients/booking-backend/types.ts @@ -167,7 +167,6 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * */ Status: | 'pending' @@ -218,7 +217,6 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * */ Status: | 'pending' @@ -269,7 +267,6 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * */ Status: | 'pending' @@ -335,7 +332,6 @@ export type Experiment = T ext Devices: Device[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * */ Description?: string; [k: string]: unknown; @@ -348,7 +344,6 @@ export type Experiment = T ext Devices: Device<'request'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * */ Description?: string; [k: string]: unknown; @@ -361,7 +356,6 @@ export type Experiment = T ext Devices: Device<'response'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * */ Description?: string; [k: string]: unknown; diff --git a/services/booking/src/common/src/clients/booking-frontend/basicValidation.cjs b/services/booking/src/common/src/clients/booking-frontend/basicValidation.cjs index 25c648d5..b10bad7c 100644 --- a/services/booking/src/common/src/clients/booking-frontend/basicValidation.cjs +++ b/services/booking/src/common/src/clients/booking-frontend/basicValidation.cjs @@ -41,7 +41,7 @@ const schema6 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', @@ -661,7 +661,7 @@ const schema8 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, 'x-standalone': true, @@ -2133,7 +2133,7 @@ const schema19 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', @@ -2847,7 +2847,7 @@ const schema22 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', @@ -3368,7 +3368,7 @@ const schema23 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', @@ -4088,7 +4088,7 @@ const schema26 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, 'x-standalone': true, @@ -4308,7 +4308,7 @@ const schema27 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, 'x-standalone': true, @@ -7031,7 +7031,7 @@ const schema48 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', @@ -7683,7 +7683,7 @@ const schema49 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', diff --git a/services/booking/src/common/src/clients/booking-frontend/client.ts b/services/booking/src/common/src/clients/booking-frontend/client.ts index 0fe8414a..9cb43c1e 100644 --- a/services/booking/src/common/src/clients/booking-frontend/client.ts +++ b/services/booking/src/common/src/clients/booking-frontend/client.ts @@ -241,21 +241,23 @@ export class Client { * The booking was accepted. The booking status will display whether the booking of all devices was successful. */ public async newBooking( - body: { - /** - * List of devices which should be added. - */ - Devices: Types.Device<'request'>[]; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: Types.Timeslot<'request'>; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - [k: string]: unknown; - }, + body: + | { + /** + * List of devices which should be added. + */ + Devices: Types.Device<'request'>[]; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + [k: string]: unknown; + } + | undefined, options?: { headers?: [string, string][]; url?: string; @@ -298,25 +300,24 @@ export class Client { } /** - * Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. - - * - * @param url - * Url of the resource to be accessed. - * @param body - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The booking change was accepted. The booking status will display whether the booking of all devices was successful. - */ + * Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. + * + * @param url + * Url of the resource to be accessed. + * @param body + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The booking change was accepted. The booking status will display whether the booking of all devices was successful. + */ public async updateBooking( url: string, body: diff --git a/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts b/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts index bf388f61..eea88118 100644 --- a/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts +++ b/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts @@ -11,6 +11,10 @@ import { FunctionWithErrors, ResponseData } from './types.js'; * This function validates the inputs to newBooking() */ export function validateNewBookingInput(body: Signatures.NewBookingBody) { + if (body === undefined) { + return true; + } + if (!BasicValidation.validateNewBookingBodyRequest(body)) { (validateNewBookingInput as FunctionWithErrors).errors = ( BasicValidation.validateNewBookingBodyRequest as FunctionWithErrors diff --git a/services/booking/src/common/src/clients/booking-frontend/signatures.ts b/services/booking/src/common/src/clients/booking-frontend/signatures.ts index 09577589..38b5600d 100644 --- a/services/booking/src/common/src/clients/booking-frontend/signatures.ts +++ b/services/booking/src/common/src/clients/booking-frontend/signatures.ts @@ -15,21 +15,23 @@ import { type Require } from './types.js'; * Typing for the body of the request made by newBooking() * @category newBooking() */ -export type NewBookingBody = { - /** - * List of devices which should be added. - */ - Devices: Types.Device<'request'>[]; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: Types.Timeslot<'request'>; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - [k: string]: unknown; -}; +export type NewBookingBody = + | { + /** + * List of devices which should be added. + */ + Devices: Types.Device<'request'>[]; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + [k: string]: unknown; + } + | undefined; /** * Typing for all possible responses to the request made by newBooking() diff --git a/services/booking/src/common/src/clients/booking-frontend/types.ts b/services/booking/src/common/src/clients/booking-frontend/types.ts index 8d0b0be8..f1af408d 100644 --- a/services/booking/src/common/src/clients/booking-frontend/types.ts +++ b/services/booking/src/common/src/clients/booking-frontend/types.ts @@ -167,7 +167,6 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * */ Status: | 'pending' @@ -218,7 +217,6 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * */ Status: | 'pending' @@ -269,7 +267,6 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * */ Status: | 'pending' @@ -335,7 +332,6 @@ export type Experiment = T ext Devices: Device[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * */ Description?: string; [k: string]: unknown; @@ -348,7 +344,6 @@ export type Experiment = T ext Devices: Device<'request'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * */ Description?: string; [k: string]: unknown; @@ -361,7 +356,6 @@ export type Experiment = T ext Devices: Device<'response'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * */ Description?: string; [k: string]: unknown; diff --git a/services/booking/src/common/src/clients/schedule-service/basicValidation.cjs b/services/booking/src/common/src/clients/schedule-service/basicValidation.cjs index ff4febf8..4ec19b60 100644 --- a/services/booking/src/common/src/clients/schedule-service/basicValidation.cjs +++ b/services/booking/src/common/src/clients/schedule-service/basicValidation.cjs @@ -41,7 +41,7 @@ const schema6 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', @@ -661,7 +661,7 @@ const schema8 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, 'x-standalone': true, @@ -1069,7 +1069,7 @@ const schema11 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, }, @@ -2253,7 +2253,7 @@ const schema16 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', @@ -2774,7 +2774,7 @@ const schema17 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", type: 'string', enum: [ 'pending', @@ -3494,7 +3494,7 @@ const schema20 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, 'x-standalone': true, @@ -3714,7 +3714,7 @@ const schema21 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, 'x-standalone': true, @@ -4306,7 +4306,7 @@ const schema26 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, }, @@ -4816,7 +4816,7 @@ const schema27 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', }, }, }, diff --git a/services/booking/src/common/src/clients/schedule-service/types.ts b/services/booking/src/common/src/clients/schedule-service/types.ts index 8d0b0be8..f1af408d 100644 --- a/services/booking/src/common/src/clients/schedule-service/types.ts +++ b/services/booking/src/common/src/clients/schedule-service/types.ts @@ -167,7 +167,6 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * */ Status: | 'pending' @@ -218,7 +217,6 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * */ Status: | 'pending' @@ -269,7 +267,6 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * */ Status: | 'pending' @@ -335,7 +332,6 @@ export type Experiment = T ext Devices: Device[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * */ Description?: string; [k: string]: unknown; @@ -348,7 +344,6 @@ export type Experiment = T ext Devices: Device<'request'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * */ Description?: string; [k: string]: unknown; @@ -361,7 +356,6 @@ export type Experiment = T ext Devices: Device<'response'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * */ Description?: string; [k: string]: unknown; diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index 40269c2e..89dbdac5 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -49,6 +49,7 @@ export const postSchedule: postScheduleSignature = async (request, body) => { flat_group: true, }); } catch (error) { + console.log("Error while getting device " + body.Experiment.Devices[device].ID +" :" + (error as Error).toString()); const err = error as UnsuccessfulRequestError; // Bad status code if (err.response !== undefined && err.response.status !== undefined) { @@ -167,6 +168,7 @@ export const postSchedule: postScheduleSignature = async (request, body) => { try { req = await lr[3]; } catch (error) { + console.log("Error while getting schedule for " + k + " :" + (error as Error).toString()); const err = error as UnsuccessfulRequestError; if (err.response !== undefined && err.response.status !== undefined) { if (err.response.status == 503) { @@ -234,6 +236,7 @@ export const postSchedule: postScheduleSignature = async (request, body) => { try { a = await availability[device][i]; } catch (error) { + console.log("Error while availability for " + device + " " + i + " :" + (error as Error).toString()); const err = error as UnsuccessfulRequestError; if (err.response !== undefined && err.response.status !== undefined) { // TODO: Remove later if errors are well specified From 76ffa63170f7095d554fb8424fc03ae1ea6e385b Mon Sep 17 00:00:00 2001 From: lojuk Date: Thu, 11 Jul 2024 18:13:11 +0200 Subject: [PATCH 52/79] add error logging --- .../booking-frontend/src/operations/index.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index b7bba15a..fa2d48be 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -90,7 +90,7 @@ export const postBooking: postBookingSignature = async (request, body) => { } catch (err) { await db.rollback(); - logger.log('error', 'Error creating booking: ' + err.toString()); + logger.log('error', 'Error creating booking: ' + (err as Error).toString()); return { status: 500, @@ -174,6 +174,7 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter } catch (err) { await db.rollback(); db.end(); + logger.log('error', "Error getting Booking by ID: " + (err as Error).toString()) return { status: 500, @@ -203,6 +204,13 @@ export const deleteBookingByID: deleteBookingByIDSignature = async ( let [code, err] = await commonRemoveBooking(requestID); + if (err != "") { + logger.log('error', "Error deleting booking by ID: " + err) + } + if (code != 200) { + logger.log('warn', "Delete booking by ID returned not 200: " + code) + } + // Typescript seems to have problems to infer body correctly with case 500. // Therefore, the solution here is more complicated if (code === 500) { @@ -356,6 +364,7 @@ export const patchBookingByID: patchBookingByIDSignature = async ( success = true; } catch (err) { + logger.log('error', "Error patching booking in DB: " + (err as Error).toString()) return { status: 500, body: err.toString(), @@ -395,6 +404,13 @@ export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async ); let [code, err] = await commonRemoveBooking(requestID); + + if (err != "") { + logger.log('error', "Error deleting booking by ID destroying signature: " + err) + } + if (code != 200) { + logger.log('warn', "Delete booking by ID destroying signature returned not 200: " + code) + } // Typescript seems to have problems to infer body correctly with case 500. // Therefore, the solution here is more complicated if (code === 500) { @@ -495,6 +511,7 @@ async function commonRemoveBooking( success = true; } catch (err) { + logger.log('error', "Error commonRemoveBooking: " + (err as Error).toString()) return [500, err.toString()]; } finally { if (success) { From fdd6f0788ca344a8806fbe30d9417ca6d4f9d03c Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Thu, 11 Jul 2024 16:46:28 +0000 Subject: [PATCH 53/79] Plastering bigint to string everywhere --- .../booking/src/booking-backend/src/amqpHandle.ts | 4 ++++ .../booking/src/booking-backend/src/internal.ts | 4 ++++ .../src/booking-backend/src/operations/index.ts | 4 ++++ .../src/booking-frontend/src/operations/index.ts | 15 ++++++++++++++- .../booking-frontend/src/operations/index_test.ts | 5 +++++ .../src/schedule-service/src/operations/index.ts | 4 ++++ 6 files changed, 35 insertions(+), 1 deletion(-) diff --git a/services/booking/src/booking-backend/src/amqpHandle.ts b/services/booking/src/booking-backend/src/amqpHandle.ts index e4a0e801..c1b5aed0 100644 --- a/services/booking/src/booking-backend/src/amqpHandle.ts +++ b/services/booking/src/booking-backend/src/amqpHandle.ts @@ -5,6 +5,10 @@ import { config } from './config.js'; import { freeDevice, reservateDevice } from './internal.js'; import { DeviceBookingRequest } from './messageDefinition.js'; +(BigInt.prototype as any).toJSON = function () { + return this.toString(); +}; + export async function handleFreeDeviceRequest(): Promise { // freeDevice console.log('handleFreeDeviceRequest started'); diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 664681a6..21469512 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -19,6 +19,10 @@ import { DeviceBookingRequest } from './messageDefinition.js'; dayjs.extend(isSameOrBefore); dayjs.extend(isSameOrAfter); +(BigInt.prototype as any).toJSON = function () { + return this.toString(); +}; + export enum callbackType { DeviceUpdate, BookingUpdate, diff --git a/services/booking/src/booking-backend/src/operations/index.ts b/services/booking/src/booking-backend/src/operations/index.ts index 2ec13d00..0ac22385 100644 --- a/services/booking/src/booking-backend/src/operations/index.ts +++ b/services/booking/src/booking-backend/src/operations/index.ts @@ -9,6 +9,10 @@ import { } from '../generated/signatures.js'; import { dispatchCallback, handleCallback } from '../internal.js'; +(BigInt.prototype as any).toJSON = function () { + return this.toString(); +}; + export const putBookingByIDLock: putBookingByIDLockSignature = async ( request, parameters, diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index fa2d48be..70f99bcb 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -4,7 +4,7 @@ import * as amqplib from 'amqplib'; import dayjs from 'dayjs'; import * as mysql from 'mysql2/promise'; -import { logger } from '../../../../../common/lib/types/logger.js'; +import { logger } from '@crosslab/service-common/logging'; import { config } from '../config.js'; import { deleteBookingByIDDestroySignature, @@ -16,6 +16,10 @@ import { } from '../generated/signatures.js'; import { Booking, Device, Experiment, Timeslot } from '../generated/types.js'; +(BigInt.prototype as any).toJSON = function () { + return this.toString(); +}; + export const postBooking: postBookingSignature = async (request, body) => { await request.authorization.check_authorization_or_fail('create', `booking`); @@ -65,6 +69,15 @@ export const postBooking: postBookingSignature = async (request, body) => { // Send devices to backend for (let i = 0; i < body.Devices.length; i++) { + logger.log("info", JSON.stringify( + new DeviceBookingRequest( + bookingID, + new URL(body.Devices[i].ID), + i, + dayjs(body.Time.Start), + dayjs(body.Time.End), + ), + )); let s = JSON.stringify( new DeviceBookingRequest( bookingID, diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index 55c909cf..e2bbc0a3 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -37,6 +37,7 @@ import { StopAMQPTestFree, TestAMQPresults, } from './indextest_helper_amqp_free.js'; +import { logging } from '@crosslab/service-common'; let connection: amqplib.Connection; let channel: amqplib.Channel; @@ -59,6 +60,10 @@ mocha.describe('operations.ts', function () { startFakeServer(); }); + mocha.before(function(){ + logging.init(); + } ) + mocha.after(function () { stopFakeServer(); }); diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index 89dbdac5..1ad03329 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -16,6 +16,10 @@ import { import { Timeslot } from '../generated/types.js'; import { timetableAnd, timetableNot } from '../timetable.js'; +(BigInt.prototype as any).toJSON = function () { + return this.toString(); +}; + // TODO: Missing availability since it is not yet well defined export const postSchedule: postScheduleSignature = async (request, body) => { await request.authorization.check_authorization_or_fail('create', `booking`); From b989291c86ecf9850abe56bd94181cfbeda88b22 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 12 Jul 2024 09:03:40 +0000 Subject: [PATCH 54/79] Do not free devices not booked --- services/booking/src/booking-backend/src/internal.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 21469512..424986e3 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -623,6 +623,13 @@ export async function freeDevice(internalreference: bigint) { } // Free now + + // no device actually booked + if(typeof(rows[0].local) == null) { + return + } + + // device is booked if (rows[0].local) { // This is a local device let connection: amqplib.Connection | undefined; From 71f3cc708e3da98d7122ee6f4fffaf6ed8ad6e1c Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 12 Jul 2024 09:10:01 +0000 Subject: [PATCH 55/79] Always ack free message This prevents loops when devices can not be freed, e.g. when no device was booked --- services/booking/src/booking-backend/src/amqpHandle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/booking/src/booking-backend/src/amqpHandle.ts b/services/booking/src/booking-backend/src/amqpHandle.ts index c1b5aed0..6b344967 100644 --- a/services/booking/src/booking-backend/src/amqpHandle.ts +++ b/services/booking/src/booking-backend/src/amqpHandle.ts @@ -51,7 +51,7 @@ export async function handleFreeDeviceRequest(): Promise { channel.ack(msg); } catch (err) { console.log('Error freeing device:' + err); - channel.nack(msg); + channel.ack(msg); } } } catch (err) { From 803ee73d8bf8867a46208ebf3647954ad0212779 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 12 Jul 2024 11:29:04 +0000 Subject: [PATCH 56/79] Support milliseconds --- services/booking/sql/booking.sql | 2 +- .../src/booking-frontend/package-lock.json | 6 + .../src/operations/index_test.ts | 153 ++++++++++++++++++ services/booking/src/test_common/src/setup.ts | 2 +- 4 files changed, 161 insertions(+), 2 deletions(-) diff --git a/services/booking/sql/booking.sql b/services/booking/sql/booking.sql index 542edf14..702d5ddf 100644 --- a/services/booking/sql/booking.sql +++ b/services/booking/sql/booking.sql @@ -1,3 +1,3 @@ -CREATE TABLE booking (`id` BIGINT UNSIGNED AUTO_INCREMENT, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `type` ENUM('normal'), `status` ENUM('pending', 'booked', 'rejected', 'cancelled', 'active', 'active-pending', 'active-rejected') NOT NULL, `user` TEXT NOT NULL, `message` LONGTEXT, PRIMARY KEY (`id`)); +CREATE TABLE booking (`id` BIGINT UNSIGNED AUTO_INCREMENT, `start` DATETIME(3) NOT NULL, `end` DATETIME(3) NOT NULL, `type` ENUM('normal'), `status` ENUM('pending', 'booked', 'rejected', 'cancelled', 'active', 'active-pending', 'active-rejected') NOT NULL, `user` TEXT NOT NULL, `message` LONGTEXT, PRIMARY KEY (`id`)); CREATE TABLE bookeddevices (`id` BIGINT UNSIGNED AUTO_INCREMENT, `booking` BIGINT UNSIGNED NOT NULL, `originaldevice` TEXT NOT NULL, `originalposition` INT NOT NULL, `bookeddevice` TEXT, `remotereference` TEXT, `local` BOOLEAN, PRIMARY KEY (`id`), `reservation` BIGINT UNSIGNED, FOREIGN KEY(`booking`) REFERENCES booking (`id`) ON DELETE CASCADE ON UPDATE RESTRICT); CREATE TABLE bookingcallbacks (`id` BIGINT UNSIGNED AUTO_INCREMENT, `booking` BIGINT UNSIGNED NOT NULL, `url` TEXT NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY(`booking`) REFERENCES booking (`id`) ON DELETE CASCADE ON UPDATE RESTRICT); diff --git a/services/booking/src/booking-frontend/package-lock.json b/services/booking/src/booking-frontend/package-lock.json index ea5e80e1..0912e4af 100644 --- a/services/booking/src/booking-frontend/package-lock.json +++ b/services/booking/src/booking-frontend/package-lock.json @@ -38,6 +38,7 @@ } }, "../../../../helper/crosslab-typescript-addon": { + "name": "@cross-lab-project/codegen-typescript-addon", "license": "UNLICENSED", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", @@ -65,6 +66,7 @@ } }, "../../../../helper/openapi-codegeneration": { + "name": "@cross-lab-project/openapi-codegen", "license": "UNLICENSED", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", @@ -99,6 +101,7 @@ } }, "../../../common": { + "name": "@crosslab/service-common", "license": "UNLICENSED", "dependencies": { "express": "^4.18.1", @@ -127,6 +130,7 @@ } }, "../booking-backend": { + "name": "@crosslab/service-booking-backend", "version": "0.0.1", "license": "Apache-2.0", "dependencies": { @@ -164,6 +168,7 @@ } }, "../common": { + "name": "@crosslab/booking-service-common", "version": "0.0.1", "license": "Apache-2.0", "dependencies": { @@ -185,6 +190,7 @@ } }, "../test_common": { + "name": "@crosslab/booking-service-test-common", "version": "0.0.1", "license": "Apache-2.0", "dependencies": { diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index e2bbc0a3..da05cc94 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -328,6 +328,159 @@ mocha.describe('operations.ts', function () { } }); + mocha.it('postBooking single device with milliseconds', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + // Count number of bookings + let [rows, _]: [any, any] = await db.execute('SELECT count(*) AS n FROM booking'); + if (rows.length !== 1) { + throw new Error('internal error: wrong number of rows' + rows.length); + } + let before: number = rows[0].n; + + // Try booking + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); + let result = await postBooking(req, { + Time: { + Start: dayjs('2000-01-01T07:00:00.444Z').toISOString(), + End: dayjs('2000-01-01T08:00:00.555Z').toISOString(), + }, + Devices: [ + { ID: 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' }, + ], + }); + await sleep(250); + + if (result.status != 200) { + throw new Error( + 'Booking failed with status ' + result.status + ' ' + result.body, + ); + } + + // Ensure number has increased by one + [rows, _] = await db.execute('SELECT count(*) AS n FROM booking'); + if (rows.length !== 1) { + throw new Error('internal error: wrong number of rows' + rows.length); + } + + if (Number(rows[0].n) != Number(before) + 1) { + throw new Error( + 'number of bookings was changed from ' + before + ' to ' + rows[0].n, + ); + } + + let split = result.body.BookingID.split('/'); + let bookingID: bigint = BigInt(split[split.length - 1]); + + [rows, _] = await db.execute( + 'SELECT `start`,`end`,`type`,`user` FROM booking WHERE `id`=?', + [bookingID], + ); + if (rows.length !== 1) { + throw new Error('wrong number of rows: ' + rows.length); + } + + if (!dayjs(rows[0].start).isSame(dayjs('2000-01-01T07:00:00.444Z'))) { + throw new Error('wrong start ' + rows[0].start); + } + + if (!dayjs(rows[0].end).isSame(dayjs('2000-01-01T08:00:00.555Z'))) { + throw new Error('wrong end ' + rows[0].end); + } + + if (rows[0].type != 'normal') { + throw new Error('wrong type ' + rows[0].type); + } + + if (rows[0].user != 'unittest.user') { + throw new Error('wrong user ' + rows[0].user); + } + + if ((req as any).related.length != 1) { + throw new Error('wrong number of related' + (req as any).related); + } + + if ((req as any).related[0][0] != 'user:unittest.user') { + throw new Error('wrong related user ' + (req as any).related); + } + + if ((req as any).related[0][1] != 'owner') { + throw new Error('wrong related relationship ' + (req as any).related); + } + + if ((req as any).related[0][2] != `booking:${bookingID}`) { + throw new Error('wrong related user ' + (req as any).related); + } + + if ((req as any).unrelated.length != 0) { + throw new Error('wrong number of related' + (req as any).unrelated); + } + + // bookeddevices + [rows, _] = await db.execute( + 'SELECT count(*) AS n FROM bookeddevices WHERE booking=?', + [bookingID], + ); + if (rows.length !== 1) { + throw new Error('internal error: wrong number of rows' + rows.length); + } + + if (Number(rows[0].n) != 1) { + throw new Error('number of booked devices is wrong: ' + rows[0].n); + } + + [rows, _] = await db.execute( + 'SELECT originaldevice FROM bookeddevices WHERE booking=? AND originalposition=?', + [bookingID, 0], + ); + if (rows.length !== 1) { + throw new Error('found ' + rows.length + ' devices for position 0'); + } + + if ( + rows[0].originaldevice !== + 'http://localhost:10801/devices/10000000-0000-0000-0000-000000000000' + ) { + throw new Error('wrong original device ' + rows[0].originaldevice); + } + + // AMQP + if (TestAMQPresultsBooking.size != 1) { + throw new Error( + 'wrong number of device reservation messages found ' + + MapToString(TestAMQPresultsBooking), + ); + } + if ( + !TestAMQPresultsBooking.has( + bookingID.toString() + + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + ) + ) { + throw new Error( + 'wrong device reservation messages found' + MapToString(TestAMQPresultsBooking), + ); + } + if ( + TestAMQPresultsBooking.get( + bookingID.toString() + + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + ) !== 1 + ) { + throw new Error( + 'wrong device reservation message number found' + + MapToString(TestAMQPresultsBooking), + ); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + mocha.it('postBooking multiple devices', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); diff --git a/services/booking/src/test_common/src/setup.ts b/services/booking/src/test_common/src/setup.ts index 5a0fb5cf..712209d9 100644 --- a/services/booking/src/test_common/src/setup.ts +++ b/services/booking/src/test_common/src/setup.ts @@ -55,7 +55,7 @@ export async function setupDummySql() { // Booking await db.execute( - "CREATE TABLE booking (`id` BIGINT UNSIGNED AUTO_INCREMENT, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `type` ENUM('normal'), `status` ENUM('pending', 'booked', 'rejected', 'cancelled', 'active', 'active-pending', 'active-rejected') NOT NULL, `user` TEXT NOT NULL, `message` LONGTEXT, PRIMARY KEY (`id`))", + "CREATE TABLE booking (`id` BIGINT UNSIGNED AUTO_INCREMENT, `start` DATETIME(3) NOT NULL, `end` DATETIME(3) NOT NULL, `type` ENUM('normal'), `status` ENUM('pending', 'booked', 'rejected', 'cancelled', 'active', 'active-pending', 'active-rejected') NOT NULL, `user` TEXT NOT NULL, `message` LONGTEXT, PRIMARY KEY (`id`))", ); await db.execute( 'CREATE TABLE bookeddevices (`id` BIGINT UNSIGNED AUTO_INCREMENT, `booking` BIGINT UNSIGNED NOT NULL, `originaldevice` TEXT NOT NULL, `originalposition` INT NOT NULL, `bookeddevice` TEXT, `remotereference` TEXT, `local` BOOLEAN, PRIMARY KEY (`id`), `reservation` BIGINT UNSIGNED, FOREIGN KEY(`booking`) REFERENCES booking (`id`) ON DELETE CASCADE ON UPDATE RESTRICT)', From 49b5c1027e2002504117061a8fbef26b44b3e4cf Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Mon, 15 Jul 2024 08:07:54 +0000 Subject: [PATCH 57/79] wip booking service integration --- .jobs.yml | 85 +++- .../templates/service-client/client.ts.njk | 29 +- .../config/mariadb/00_init_dbs_and_users.sql | 4 +- integration-test/docker-compose.yaml | 25 ++ integration-test/scripts/test.sh | 7 +- integration-test/src/helper/experimentTest.ts | 4 + services/booking/sql/device-reservation.sql | 2 +- .../src/booking-backend/src/internal.ts | 16 +- .../booking-frontend/src/operations/index.ts | 46 ++- services/booking/src/common/src/auth.ts | 7 + .../booking-backend/basicValidation.cjs | 12 +- .../src/clients/booking-backend/client.ts | 113 +++-- .../src/clients/booking-backend/types.ts | 6 + .../booking-frontend/basicValidation.cjs | 18 +- .../src/clients/booking-frontend/client.ts | 238 ++++++----- .../booking-frontend/requestValidation.ts | 4 - .../clients/booking-frontend/signatures.ts | 32 +- .../src/clients/booking-frontend/types.ts | 6 + .../src/common/src/clients/device/client.ts | 390 +++++++++++++----- .../schedule-service/basicValidation.cjs | 18 +- .../src/clients/schedule-service/client.ts | 51 ++- .../src/clients/schedule-service/types.ts | 6 + services/booking/src/common/src/config.ts | 4 +- .../schedule-service/src/operations/index.ts | 40 +- .../src/clients/authentication/client.ts | 282 ++++++++----- services/device/src/clients/device/client.ts | 390 +++++++++++++----- .../device/src/clients/federation/client.ts | 175 +++++--- .../src/clients/booking-backend/client.ts | 111 +++-- .../src/clients/booking-frontend/client.ts | 169 +++++--- .../experiment/src/clients/device/client.ts | 390 +++++++++++++----- .../src/clients/schedule-service/client.ts | 51 ++- .../src/methods/experimentStatus/book.ts | 25 +- services/experiment/src/types/typeguards.ts | 8 +- .../lti/src/clients/authentication/client.ts | 69 ++-- services/lti/src/clients/experiment/client.ts | 75 ++-- 35 files changed, 1956 insertions(+), 952 deletions(-) diff --git a/.jobs.yml b/.jobs.yml index fd80153f..6496f9c1 100644 --- a/.jobs.yml +++ b/.jobs.yml @@ -132,28 +132,87 @@ services/authorization: tags: - test -services/booking: - - script: build-spec - paths: - - ./api - - script: lint-spec +services/booking/src/common: + - script: build + dependencies: + - helper/crosslab-typescript-addon:build + - helper/openapi-codegeneration:build + - services/booking:build-spec + +services/booking/src/device-reservation: + - script: build + dependencies: + - services/booking/src/common:build + - script: test + dependencies: + - services/booking/src/device-reservation:build + tags: + - test + - script: build-docker + dependencies: + - services/booking/src/device-reservation:build + +services/booking/src/test_common: + - script: build + dependencies: + - services/booking/src/common:build + - services/booking/src/device-reservation:build + +services/booking/src/booking-backend: + - script: build + dependencies: + - services/booking:build-spec + - services/booking/src/test_common:build + - script: test + dependencies: + - services/booking/src/booking-backend:build + tags: + - test + - script: build-docker + dependencies: + - services/booking/src/booking-backend:build + +services/booking/src/booking-frontend: + - script: build dependencies: - services/booking:build-spec + - services/booking/src/booking-backend:build + - script: test + dependencies: + - services/booking/src/booking-frontend:build tags: - test + - script: build-docker + dependencies: + - services/booking/src/booking-frontend:build + +services/booking/src/schedule-service: - script: build dependencies: - services/booking:build-spec - services/common:build + - services/booking/src/common:build + - services/booking/src/test_common:build - helper/crosslab-typescript-addon:build - helper/openapi-codegeneration:build - - clients/api/js:build - script: test dependencies: - - services/booking:build + - services/booking/src/schedule-service:build + tags: + - test - script: build-docker dependencies: - - services/booking:build + - services/booking/src/schedule-service:build + +services/booking: + - script: build-spec + paths: + - ./api + - script: lint-spec + paths: + - ./api + dependencies: + - services/booking:build-spec tags: - test @@ -493,14 +552,20 @@ integration-test: - services/common:build - services/auth:build - services/authorization:build - - services/booking:build + - services/booking/src/booking-backend:build + - services/booking/src/booking-frontend:build + - services/booking/src/device-reservation:build + - services/booking/src/schedule-service:build - services/device:build - services/experiment:build - services/federation:build - services/gateway:build - services/auth:build-docker - services/authorization:build-docker - - services/booking:build-docker + - services/booking/src/booking-backend:build-docker + - services/booking/src/booking-frontend:build-docker + - services/booking/src/device-reservation:build-docker + - services/booking/src/schedule-service:build-docker - services/device:build-docker - services/experiment:build-docker - services/federation:build-docker diff --git a/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk b/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk index 6d1c490b..86b5ced4 100644 --- a/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk +++ b/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk @@ -135,9 +135,9 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); + if (!(url).startsWith(baseUrl)) + throw new InvalidUrlError(`Provided url "${url}" does not start with the provided base url "${baseUrl}"`); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -147,7 +147,7 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError(`Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`); return pathParameters; } @@ -179,10 +179,11 @@ export class Client { private fixedHeaders: [string, string][] private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()) try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -213,12 +214,8 @@ export class Client { baseUrl: string, options: { serviceUrl?: string; accessToken?: string, fixedHeaders?: [string, string][] }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -476,7 +473,7 @@ export class Client { const urlSuffix = '{{ operation.path | replace(r/{.*?}/g, "{}") }}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) const [{{ operation.path | replace(r/(.*?{(.*?)})(\/\w*)*/g, "$2,") }}] = - {{- "" }} validateUrl(url, this.baseUrl, '{{ operation.path | replace(r/{.*?}/g, "{}") }}') + {{- "" }} validateUrl(new URL(url).toString(), this.baseUrl, '{{ operation.path | replace(r/{.*?}/g, "{}") }}') {%- else %} const url = appendToUrl( {{ "options?.url ?? " if optionalUrl }}this.baseUrl, @@ -484,10 +481,11 @@ export class Client { ) {%- endif %} {%- elif optionalUrl %} - const url = appendToUrl({{ "options?.url ?? " if optionalUrl }}this.baseUrl, "{{ operation.path }}") + const url = appendToUrl(options?.url ?? this.baseUrl, "{{ operation.path }}") {%- else %} const url = appendToUrl(this.baseUrl, "{{ operation.path }}") {%- endif %} + console.log("trying to fetch url:", url); {{ body if operation.requestBody }} @@ -518,7 +516,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` {%- endif %} - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) {{ "+ '?' + new URLSearchParams(query)" if queryParameters | length > 0 }}, { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) {{ "+ '?' + new URLSearchParams(query)" if queryParameters | length > 0 }}); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) {{ "+ '?' + new URLSearchParams(query)" if queryParameters | length > 0 }}, { method: "{{ operation.method | upper }}", headers: [ ["Content-Type", "application/json"], diff --git a/integration-test/config/mariadb/00_init_dbs_and_users.sql b/integration-test/config/mariadb/00_init_dbs_and_users.sql index 9793e62e..d0054407 100755 --- a/integration-test/config/mariadb/00_init_dbs_and_users.sql +++ b/integration-test/config/mariadb/00_init_dbs_and_users.sql @@ -25,8 +25,8 @@ GRANT ALL PRIVILEGES ON booking.* to booking@'%'; FLUSH PRIVILEGES; USE booking; -CREATE TABLE booking (`id` BIGINT UNSIGNED AUTO_INCREMENT, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `type` ENUM('normal'), `status` ENUM('pending', 'booked', 'rejected', 'cancelled', 'active', 'active-pending', 'active-rejected') NOT NULL, `user` TEXT NOT NULL, `message` LONGTEXT, PRIMARY KEY (`id`)); +CREATE TABLE booking (`id` BIGINT UNSIGNED AUTO_INCREMENT, `start` DATETIME(3) NOT NULL, `end` DATETIME(3) NOT NULL, `type` ENUM('normal'), `status` ENUM('pending', 'booked', 'rejected', 'cancelled', 'active', 'active-pending', 'active-rejected') NOT NULL, `user` TEXT NOT NULL, `message` LONGTEXT, PRIMARY KEY (`id`)); CREATE TABLE bookeddevices (`id` BIGINT UNSIGNED AUTO_INCREMENT, `booking` BIGINT UNSIGNED NOT NULL, `originaldevice` TEXT NOT NULL, `originalposition` INT NOT NULL, `bookeddevice` TEXT, `remotereference` TEXT, `local` BOOLEAN, PRIMARY KEY (`id`), `reservation` BIGINT UNSIGNED, FOREIGN KEY(`booking`) REFERENCES booking (`id`) ON DELETE CASCADE ON UPDATE RESTRICT); CREATE TABLE bookingcallbacks (`id` BIGINT UNSIGNED AUTO_INCREMENT, `booking` BIGINT UNSIGNED NOT NULL, `url` TEXT NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY(`booking`) REFERENCES booking (`id`) ON DELETE CASCADE ON UPDATE RESTRICT); CREATE TABLE callback (`id` VARCHAR(600), `type` INTEGER, `targetbooking` BIGINT UNSIGNED NOT NULL, `parameters` JSON NOT NULL DEFAULT "{}", PRIMARY KEY(`id`)); -CREATE TABLE reservation (`id` BIGINT UNSIGNED AUTO_INCREMENT, `device` TEXT NOT NULL, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `bookingreference` TEXT NOT NULL, PRIMARY KEY (`id`)); \ No newline at end of file +CREATE TABLE reservation (`id` BIGINT UNSIGNED AUTO_INCREMENT, `device` TEXT NOT NULL, `start` DATETIME(3) NOT NULL, `end` DATETIME(3) NOT NULL, `bookingreference` TEXT NOT NULL, PRIMARY KEY (`id`)); \ No newline at end of file diff --git a/integration-test/docker-compose.yaml b/integration-test/docker-compose.yaml index 49e5bb25..be16b194 100644 --- a/integration-test/docker-compose.yaml +++ b/integration-test/docker-compose.yaml @@ -45,11 +45,14 @@ services: backend: volumes: - './config/mariadb:/docker-entrypoint-initdb.d:ro' + - 'db:/var/lib/mysql' environment: MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:?} healthcheck: test: ['CMD', 'healthcheck.sh', '--su=mysql', '--connect', '--innodb_initialized'] restart: on-failure + extra_hosts: + - '${API_BASE_HOST}=host-gateway' rabbitmq: image: rabbitmq:3.13.4 volumes: @@ -60,6 +63,8 @@ services: test: ['CMD', 'rabbitmqctl', 'status'] networks: backend: + extra_hosts: + - '${API_BASE_HOST}=host-gateway' gateway: image: ${GATEWAY_IMAGE:?} ports: @@ -73,6 +78,8 @@ services: db: condition: service_healthy restart: on-failure + extra_hosts: + - '${API_BASE_HOST}=host-gateway' # Services authentication: image: ${AUTHENTICATION_IMAGE:?} @@ -89,6 +96,8 @@ services: db: condition: service_healthy restart: on-failure + extra_hosts: + - '${API_BASE_HOST}=host-gateway' authorization: image: ${AUTHORIZATION_IMAGE:?} environment: @@ -102,6 +111,8 @@ services: db: condition: service_healthy restart: on-failure + extra_hosts: + - '${API_BASE_HOST}=host-gateway' booking-frontend: image: ${BOOKING_FRONTEND_IMAGE:?} environment: @@ -116,6 +127,8 @@ services: rabbitmq: condition: service_healthy restart: on-failure + extra_hosts: + - '${API_BASE_HOST}=host-gateway' booking-backend: image: ${BOOKING_BACKEND_IMAGE:?} environment: @@ -130,6 +143,8 @@ services: rabbitmq: condition: service_healthy restart: on-failure + extra_hosts: + - '${API_BASE_HOST}=host-gateway' schedule-service: image: ${SCHEDULE_SERVICE_IMAGE:?} environment: @@ -141,6 +156,8 @@ services: db: condition: service_healthy restart: on-failure + extra_hosts: + - '${API_BASE_HOST}=host-gateway' device-reservation: image: ${DEVICE_RESERVATION_IMAGE:?} environment: @@ -155,6 +172,8 @@ services: rabbitmq: condition: service_healthy restart: on-failure + extra_hosts: + - '${API_BASE_HOST}=host-gateway' device: image: ${DEVICE_IMAGE:?} environment: @@ -167,6 +186,8 @@ services: db: condition: service_healthy restart: on-failure + extra_hosts: + - '${API_BASE_HOST}=host-gateway' experiment: image: ${EXPERIMENT_IMAGE:?} environment: @@ -179,6 +200,8 @@ services: db: condition: service_healthy restart: on-failure + extra_hosts: + - '${API_BASE_HOST}=host-gateway' federation: image: ${FEDERATION_IMAGE:?} environment: @@ -191,3 +214,5 @@ services: db: condition: service_healthy restart: on-failure + extra_hosts: + - '${API_BASE_HOST}=host-gateway' diff --git a/integration-test/scripts/test.sh b/integration-test/scripts/test.sh index da87ad7c..f5431228 100755 --- a/integration-test/scripts/test.sh +++ b/integration-test/scripts/test.sh @@ -14,14 +14,16 @@ export BOOKING_BACKEND_IMAGE=$(docker load -i ../services/booking/src/booking-ba export SCHEDULE_SERVICE_IMAGE=$(docker load -i ../services/booking/src/schedule-service/dist/docker-image.tar | tail -1 | grep -Eo "[^ ]+$") export DEVICE_RESERVATION_IMAGE=$(docker load -i ../services/booking/src/device-reservation/dist/docker-image.tar | tail -1 | grep -Eo "[^ ]+$") -COMPOSE_HTTP_TIMEOUT=600 docker-compose up --no-color > dist/server.log 2>&1 & +mkdir -p db +rm -rf db/* + +COMPOSE_HTTP_TIMEOUT=600 docker-compose up --force-recreate --no-color > dist/server.log 2>&1 & end_time=$(($(date +%s) + 600)) # Set end time to 10 minutes from now #rm -rf venv virtualenv venv && venv/bin/pip install -r requirements.txt npm ci - for url in "http://localhost/auth/status" "http://localhost/device/status" "http://localhost/authorization/status" "http://localhost/federation/status" "http://localhost/experiment/status"; do while true; do if curl --output /dev/null --silent --head --fail "$url"; then @@ -38,6 +40,7 @@ for url in "http://localhost/auth/status" "http://localhost/device/status" "http done done +export HOST="http://host.docker.internal" export USERNAME="admin" export PASSWORD="admin" diff --git a/integration-test/src/helper/experimentTest.ts b/integration-test/src/helper/experimentTest.ts index 5daecae3..b4ba20ef 100644 --- a/integration-test/src/helper/experimentTest.ts +++ b/integration-test/src/helper/experimentTest.ts @@ -93,6 +93,10 @@ export class ExperimentTest extends TypedEmitter { ...deviceMeta, }); + if (apiDevice.type === 'device') { + await client.addDeviceAvailabilityRules(apiDevice.url, [{ available: true }]); + } + assert(apiDevice.url, 'Device URL is not defined'); this.apiDevices.push({ ...apiDevice }); diff --git a/services/booking/sql/device-reservation.sql b/services/booking/sql/device-reservation.sql index 5d6712fe..de0aa648 100644 --- a/services/booking/sql/device-reservation.sql +++ b/services/booking/sql/device-reservation.sql @@ -1 +1 @@ -CREATE TABLE reservation (`id` BIGINT UNSIGNED AUTO_INCREMENT, `device` TEXT NOT NULL, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `bookingreference` TEXT NOT NULL, PRIMARY KEY (`id`)); +CREATE TABLE reservation (`id` BIGINT UNSIGNED AUTO_INCREMENT, `device` TEXT NOT NULL, `start` DATETIME(3) NOT NULL, `end` DATETIME(3) NOT NULL, `bookingreference` TEXT NOT NULL, PRIMARY KEY (`id`)); diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 424986e3..4c3f367e 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -286,7 +286,10 @@ export async function dispatchCallback(bookingID: bigint) { } } catch (err) { // Something went wrong here - just continue for now - console.log("error", "Unknown error in dispatchCallback: " + (err as Error).toString()) + console.log( + 'error', + 'Unknown error in dispatchCallback: ' + (err as Error).toString(), + ); continue; } } @@ -427,7 +430,10 @@ export async function reservateDevice(r: DeviceBookingRequest) { onlyOwn: true, }); } catch (e) { - console.log("Error while getting schedule in reservateDevice (using next device): " + (e as Error).toString()) + console.log( + 'Error while getting schedule in reservateDevice (using next device): ' + + (e as Error).toString(), + ); continue; } if (schedule.length !== 1) { @@ -625,9 +631,9 @@ export async function freeDevice(internalreference: bigint) { // Free now // no device actually booked - if(typeof(rows[0].local) == null) { - return - } + if (rows[0].local === null) { + return; + } // device is booked if (rows[0].local) { diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index 70f99bcb..66fe1870 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -1,10 +1,10 @@ import { BelongsToUs, sleep } from '@crosslab/booking-service-common'; import { DeviceBookingRequest } from '@crosslab/service-booking-backend'; +import { logger } from '@crosslab/service-common/logging'; import * as amqplib from 'amqplib'; import dayjs from 'dayjs'; import * as mysql from 'mysql2/promise'; -import { logger } from '@crosslab/service-common/logging'; import { config } from '../config.js'; import { deleteBookingByIDDestroySignature, @@ -69,15 +69,18 @@ export const postBooking: postBookingSignature = async (request, body) => { // Send devices to backend for (let i = 0; i < body.Devices.length; i++) { - logger.log("info", JSON.stringify( - new DeviceBookingRequest( - bookingID, - new URL(body.Devices[i].ID), - i, - dayjs(body.Time.Start), - dayjs(body.Time.End), + logger.log( + 'info', + JSON.stringify( + new DeviceBookingRequest( + bookingID, + new URL(body.Devices[i].ID), + i, + dayjs(body.Time.Start), + dayjs(body.Time.End), + ), ), - )); + ); let s = JSON.stringify( new DeviceBookingRequest( bookingID, @@ -134,7 +137,9 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter try { let body: getBookingByID200ResponseType['body'] = { Booking: { - ID: parameters.ID, + ID: config.OwnURL.endsWith('/') + ? config.OwnURL + 'booking/' + requestID + : config.OwnURL + '/booking/' + requestID, Time: { Start: '', End: '' }, Devices: [], Type: 'normal', @@ -187,7 +192,7 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter } catch (err) { await db.rollback(); db.end(); - logger.log('error', "Error getting Booking by ID: " + (err as Error).toString()) + logger.log('error', 'Error getting Booking by ID: ' + (err as Error).toString()); return { status: 500, @@ -217,11 +222,11 @@ export const deleteBookingByID: deleteBookingByIDSignature = async ( let [code, err] = await commonRemoveBooking(requestID); - if (err != "") { - logger.log('error', "Error deleting booking by ID: " + err) + if (err != '') { + logger.log('error', 'Error deleting booking by ID: ' + err); } if (code != 200) { - logger.log('warn', "Delete booking by ID returned not 200: " + code) + logger.log('warn', 'Delete booking by ID returned not 200: ' + code); } // Typescript seems to have problems to infer body correctly with case 500. @@ -377,7 +382,7 @@ export const patchBookingByID: patchBookingByIDSignature = async ( success = true; } catch (err) { - logger.log('error', "Error patching booking in DB: " + (err as Error).toString()) + logger.log('error', 'Error patching booking in DB: ' + (err as Error).toString()); return { status: 500, body: err.toString(), @@ -418,11 +423,14 @@ export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async let [code, err] = await commonRemoveBooking(requestID); - if (err != "") { - logger.log('error', "Error deleting booking by ID destroying signature: " + err) + if (err != '') { + logger.log('error', 'Error deleting booking by ID destroying signature: ' + err); } if (code != 200) { - logger.log('warn', "Delete booking by ID destroying signature returned not 200: " + code) + logger.log( + 'warn', + 'Delete booking by ID destroying signature returned not 200: ' + code, + ); } // Typescript seems to have problems to infer body correctly with case 500. // Therefore, the solution here is more complicated @@ -524,7 +532,7 @@ async function commonRemoveBooking( success = true; } catch (err) { - logger.log('error', "Error commonRemoveBooking: " + (err as Error).toString()) + logger.log('error', 'Error commonRemoveBooking: ' + (err as Error).toString()); return [500, err.toString()]; } finally { if (success) { diff --git a/services/booking/src/common/src/auth.ts b/services/booking/src/common/src/auth.ts index a0d3bf22..72c21968 100644 --- a/services/booking/src/common/src/auth.ts +++ b/services/booking/src/common/src/auth.ts @@ -22,6 +22,13 @@ function convertInstitutionPrefix(): void { export function BelongsToUs(url: URL): boolean { convertInstitutionPrefix(); for (let i = 0; i < institutePrefixURL.length; i++) { + console.log( + 'DEBUG:', + url.toString(), + url.hostname, + institutePrefixURL[i].toString(), + institutePrefixURL[i].hostname, + ); if (url.hostname == institutePrefixURL[i].hostname) { return true; } diff --git a/services/booking/src/common/src/clients/booking-backend/basicValidation.cjs b/services/booking/src/common/src/clients/booking-backend/basicValidation.cjs index 91a62041..83d82620 100644 --- a/services/booking/src/common/src/clients/booking-backend/basicValidation.cjs +++ b/services/booking/src/common/src/clients/booking-backend/basicValidation.cjs @@ -41,7 +41,7 @@ const schema6 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -661,7 +661,7 @@ const schema8 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, @@ -1352,7 +1352,7 @@ const schema15 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -1873,7 +1873,7 @@ const schema16 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -2593,7 +2593,7 @@ const schema19 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, @@ -2813,7 +2813,7 @@ const schema20 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, diff --git a/services/booking/src/common/src/clients/booking-backend/client.ts b/services/booking/src/common/src/clients/booking-backend/client.ts index 2d553fa9..f54a62e0 100644 --- a/services/booking/src/common/src/clients/booking-backend/client.ts +++ b/services/booking/src/common/src/clients/booking-backend/client.ts @@ -129,9 +129,11 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, + ); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -141,7 +143,9 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, + ); return pathParameters; } @@ -173,10 +177,11 @@ export class Client { private fixedHeaders: [string, string][]; private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()); try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -211,18 +216,14 @@ export class Client { fixedHeaders?: [string, string][]; }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } /** - * Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. + * Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. * * @param url * Url of the resource to be accessed. @@ -247,7 +248,8 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); + const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}/lock'); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -261,15 +263,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'PUT', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'PUT', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateLockBookingOutput(response)) throw new ValidationError( @@ -312,7 +321,8 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); + const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}/lock'); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -326,15 +336,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateUnlockBookingOutput(response)) throw new ValidationError( @@ -377,7 +394,12 @@ export class Client { ): Promise { const urlSuffix = '/booking_callback/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking_callback/{}'); + const [ID] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/booking_callback/{}', + ); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -393,15 +415,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateBookingCallbackOutput(response)) throw new ValidationError( diff --git a/services/booking/src/common/src/clients/booking-backend/types.ts b/services/booking/src/common/src/clients/booking-backend/types.ts index f1af408d..8d0b0be8 100644 --- a/services/booking/src/common/src/clients/booking-backend/types.ts +++ b/services/booking/src/common/src/clients/booking-backend/types.ts @@ -167,6 +167,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -217,6 +218,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -267,6 +269,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -332,6 +335,7 @@ export type Experiment = T ext Devices: Device[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; @@ -344,6 +348,7 @@ export type Experiment = T ext Devices: Device<'request'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; @@ -356,6 +361,7 @@ export type Experiment = T ext Devices: Device<'response'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; diff --git a/services/booking/src/common/src/clients/booking-frontend/basicValidation.cjs b/services/booking/src/common/src/clients/booking-frontend/basicValidation.cjs index b10bad7c..25c648d5 100644 --- a/services/booking/src/common/src/clients/booking-frontend/basicValidation.cjs +++ b/services/booking/src/common/src/clients/booking-frontend/basicValidation.cjs @@ -41,7 +41,7 @@ const schema6 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -661,7 +661,7 @@ const schema8 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, @@ -2133,7 +2133,7 @@ const schema19 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -2847,7 +2847,7 @@ const schema22 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -3368,7 +3368,7 @@ const schema23 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -4088,7 +4088,7 @@ const schema26 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, @@ -4308,7 +4308,7 @@ const schema27 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, @@ -7031,7 +7031,7 @@ const schema48 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -7683,7 +7683,7 @@ const schema49 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', diff --git a/services/booking/src/common/src/clients/booking-frontend/client.ts b/services/booking/src/common/src/clients/booking-frontend/client.ts index 9cb43c1e..65e60847 100644 --- a/services/booking/src/common/src/clients/booking-frontend/client.ts +++ b/services/booking/src/common/src/clients/booking-frontend/client.ts @@ -129,9 +129,11 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, + ); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -141,7 +143,9 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, + ); return pathParameters; } @@ -173,10 +177,11 @@ export class Client { private fixedHeaders: [string, string][]; private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()); try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -211,12 +216,8 @@ export class Client { fixedHeaders?: [string, string][]; }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -241,29 +242,28 @@ export class Client { * The booking was accepted. The booking status will display whether the booking of all devices was successful. */ public async newBooking( - body: - | { - /** - * List of devices which should be added. - */ - Devices: Types.Device<'request'>[]; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: Types.Timeslot<'request'>; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - [k: string]: unknown; - } - | undefined, + body: { + /** + * List of devices which should be added. + */ + Devices: Types.Device<'request'>[]; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + [k: string]: unknown; + }, options?: { headers?: [string, string][]; url?: string; }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/booking'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateNewBookingInput(body)) throw new ValidationError( @@ -273,16 +273,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateNewBookingOutput(response)) throw new ValidationError( @@ -300,24 +307,25 @@ export class Client { } /** - * Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. - * - * @param url - * Url of the resource to be accessed. - * @param body - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The booking change was accepted. The booking status will display whether the booking of all devices was successful. - */ + * Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. + + * + * @param url + * Url of the resource to be accessed. + * @param body + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The booking change was accepted. The booking status will display whether the booking of all devices was successful. + */ public async updateBooking( url: string, body: @@ -345,7 +353,8 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -359,16 +368,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'PATCH', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'PATCH', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateUpdateBookingOutput(response)) throw new ValidationError( @@ -413,7 +429,8 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -427,15 +444,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeleteBookingOutput(response)) throw new ValidationError( @@ -478,7 +502,8 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -492,15 +517,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateGetBookingOutput(response)) throw new ValidationError( @@ -543,7 +575,12 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/destroy'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/destroy'); + const [ID] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/booking/{}/destroy', + ); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -559,15 +596,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDestroyBookingOutput(response)) throw new ValidationError( diff --git a/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts b/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts index eea88118..bf388f61 100644 --- a/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts +++ b/services/booking/src/common/src/clients/booking-frontend/requestValidation.ts @@ -11,10 +11,6 @@ import { FunctionWithErrors, ResponseData } from './types.js'; * This function validates the inputs to newBooking() */ export function validateNewBookingInput(body: Signatures.NewBookingBody) { - if (body === undefined) { - return true; - } - if (!BasicValidation.validateNewBookingBodyRequest(body)) { (validateNewBookingInput as FunctionWithErrors).errors = ( BasicValidation.validateNewBookingBodyRequest as FunctionWithErrors diff --git a/services/booking/src/common/src/clients/booking-frontend/signatures.ts b/services/booking/src/common/src/clients/booking-frontend/signatures.ts index 38b5600d..09577589 100644 --- a/services/booking/src/common/src/clients/booking-frontend/signatures.ts +++ b/services/booking/src/common/src/clients/booking-frontend/signatures.ts @@ -15,23 +15,21 @@ import { type Require } from './types.js'; * Typing for the body of the request made by newBooking() * @category newBooking() */ -export type NewBookingBody = - | { - /** - * List of devices which should be added. - */ - Devices: Types.Device<'request'>[]; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: Types.Timeslot<'request'>; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - [k: string]: unknown; - } - | undefined; +export type NewBookingBody = { + /** + * List of devices which should be added. + */ + Devices: Types.Device<'request'>[]; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: Types.Timeslot<'request'>; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + [k: string]: unknown; +}; /** * Typing for all possible responses to the request made by newBooking() diff --git a/services/booking/src/common/src/clients/booking-frontend/types.ts b/services/booking/src/common/src/clients/booking-frontend/types.ts index f1af408d..8d0b0be8 100644 --- a/services/booking/src/common/src/clients/booking-frontend/types.ts +++ b/services/booking/src/common/src/clients/booking-frontend/types.ts @@ -167,6 +167,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -217,6 +218,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -267,6 +269,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -332,6 +335,7 @@ export type Experiment = T ext Devices: Device[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; @@ -344,6 +348,7 @@ export type Experiment = T ext Devices: Device<'request'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; @@ -356,6 +361,7 @@ export type Experiment = T ext Devices: Device<'response'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; diff --git a/services/booking/src/common/src/clients/device/client.ts b/services/booking/src/common/src/clients/device/client.ts index fd7e35f4..19211284 100644 --- a/services/booking/src/common/src/clients/device/client.ts +++ b/services/booking/src/common/src/clients/device/client.ts @@ -129,9 +129,11 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, + ); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -141,7 +143,9 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, + ); return pathParameters; } @@ -173,10 +177,11 @@ export class Client { private fixedHeaders: [string, string][]; private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()); try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -211,12 +216,8 @@ export class Client { fixedHeaders?: [string, string][]; }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -244,6 +245,7 @@ export class Client { url?: string; }): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateListDevicesInput()) throw new ValidationError( @@ -253,15 +255,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateListDevicesOutput(response)) throw new ValidationError( @@ -316,6 +325,7 @@ export class Client { }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); + console.log('trying to fetch url:', url); const body = device; @@ -336,8 +346,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'POST', headers: [ @@ -394,7 +412,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -414,8 +433,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'GET', headers: [ @@ -481,7 +508,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const body = deviceUpdate; @@ -503,8 +531,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'PATCH', headers: [ @@ -558,7 +594,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -572,15 +609,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeleteDeviceOutput(response)) throw new ValidationError( @@ -631,7 +675,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -653,8 +698,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'POST', headers: [ @@ -715,7 +768,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/availability', + ); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -740,8 +798,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'GET', headers: [ @@ -796,7 +862,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/availability', + ); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -812,15 +883,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeleteDeviceAvailabilityRulesOutput(response)) throw new ValidationError( @@ -866,7 +944,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/availability', + ); + console.log('trying to fetch url:', url); const body = availabilityRules; @@ -884,16 +967,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateAddDeviceAvailabilityRulesOutput(response)) throw new ValidationError( @@ -938,7 +1028,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/websocket'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/websocket'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/websocket', + ); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -954,15 +1049,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateCreateWebsocketTokenOutput(response)) throw new ValidationError( @@ -1015,7 +1117,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/signaling'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/signaling'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/signaling', + ); + console.log('trying to fetch url:', url); const body = sigMessage; @@ -1033,16 +1140,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateSendSignalingMessageOutput(response)) throw new ValidationError( @@ -1082,6 +1196,7 @@ export class Client { url?: string; }): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateListPeerconnectionsInput()) throw new ValidationError( @@ -1093,15 +1208,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateListPeerconnectionsOutput(response)) throw new ValidationError( @@ -1155,6 +1277,7 @@ export class Client { }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); + console.log('trying to fetch url:', url); const body = peerconnection; @@ -1181,8 +1304,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'POST', headers: [ @@ -1238,7 +1369,12 @@ export class Client { ): Promise { const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [peerconnection_id] = validateUrl(url, this.baseUrl, '/peerconnections/{}'); + const [peerconnection_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/peerconnections/{}', + ); + console.log('trying to fetch url:', url); const parameters = { peerconnection_id: peerconnection_id, @@ -1254,15 +1390,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateGetPeerconnectionOutput(response)) throw new ValidationError( @@ -1308,7 +1451,12 @@ export class Client { ): Promise { const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [peerconnection_id] = validateUrl(url, this.baseUrl, '/peerconnections/{}'); + const [peerconnection_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/peerconnections/{}', + ); + console.log('trying to fetch url:', url); const parameters = { peerconnection_id: peerconnection_id, @@ -1324,15 +1472,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeletePeerconnectionOutput(response)) throw new ValidationError( @@ -1388,10 +1543,11 @@ export class Client { const urlSuffix = '/peerconnections/{}/device_status'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); const [peerconnection_id] = validateUrl( - url, + new URL(url).toString(), this.baseUrl, '/peerconnections/{}/device_status', ); + console.log('trying to fetch url:', url); const parameters = { peerconnection_id: peerconnection_id, @@ -1413,8 +1569,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'PATCH', headers: [ diff --git a/services/booking/src/common/src/clients/schedule-service/basicValidation.cjs b/services/booking/src/common/src/clients/schedule-service/basicValidation.cjs index 4ec19b60..ff4febf8 100644 --- a/services/booking/src/common/src/clients/schedule-service/basicValidation.cjs +++ b/services/booking/src/common/src/clients/schedule-service/basicValidation.cjs @@ -41,7 +41,7 @@ const schema6 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -661,7 +661,7 @@ const schema8 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, @@ -1069,7 +1069,7 @@ const schema11 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, }, @@ -2253,7 +2253,7 @@ const schema16 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -2774,7 +2774,7 @@ const schema17 = { }, Status: { description: - "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.", + "Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked.\n", type: 'string', enum: [ 'pending', @@ -3494,7 +3494,7 @@ const schema20 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, @@ -3714,7 +3714,7 @@ const schema21 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, 'x-standalone': true, @@ -4306,7 +4306,7 @@ const schema26 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, }, @@ -4816,7 +4816,7 @@ const schema27 = { Description: { type: 'string', description: - 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.', + 'User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing.\n', }, }, }, diff --git a/services/booking/src/common/src/clients/schedule-service/client.ts b/services/booking/src/common/src/clients/schedule-service/client.ts index 774831bd..5241f64f 100644 --- a/services/booking/src/common/src/clients/schedule-service/client.ts +++ b/services/booking/src/common/src/clients/schedule-service/client.ts @@ -129,9 +129,11 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, + ); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -141,7 +143,9 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, + ); return pathParameters; } @@ -173,10 +177,11 @@ export class Client { private fixedHeaders: [string, string][]; private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()); try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -211,12 +216,8 @@ export class Client { fixedHeaders?: [string, string][]; }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -268,6 +269,7 @@ export class Client { }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/schedule'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateScheduleInput(body)) throw new ValidationError( @@ -277,16 +279,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateScheduleOutput(response)) throw new ValidationError( diff --git a/services/booking/src/common/src/clients/schedule-service/types.ts b/services/booking/src/common/src/clients/schedule-service/types.ts index f1af408d..8d0b0be8 100644 --- a/services/booking/src/common/src/clients/schedule-service/types.ts +++ b/services/booking/src/common/src/clients/schedule-service/types.ts @@ -167,6 +167,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -217,6 +218,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -267,6 +269,7 @@ export type Booking = T extend Type?: 'normal'; /** * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ Status: | 'pending' @@ -332,6 +335,7 @@ export type Experiment = T ext Devices: Device[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; @@ -344,6 +348,7 @@ export type Experiment = T ext Devices: Device<'request'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; @@ -356,6 +361,7 @@ export type Experiment = T ext Devices: Device<'response'>[]; /** * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * */ Description?: string; [k: string]: unknown; diff --git a/services/booking/src/common/src/config.ts b/services/booking/src/common/src/config.ts index 731c88d7..34d4f873 100644 --- a/services/booking/src/common/src/config.ts +++ b/services/booking/src/common/src/config.ts @@ -8,8 +8,8 @@ export const baseConfig = { 'mysql://test:test@localhost/test?supportBigNumbers=true&bigNumberStrings=true', ReservationDSN: 'mysql://test:test@localhost/test', CallbackDSN: 'mysql://test:test@localhost/test', - OwnURL: 'http://localhost', - InstitutePrefix: ['http://localhost'], + OwnURL: process.env.BASE_URL ?? 'http://localhost', + InstitutePrefix: [process.env.BASE_URL ?? 'http://localhost'], AmqpUrl: 'amqp://localhost:5672/', BASE_URL: process.env.BASE_URL ?? 'http://localhost', DEVICE_SERVICE_URL: process.env.DEVICE_SERVICE_URL ?? 'http://localhost:3001', diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index 1ad03329..ebe5b938 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -53,7 +53,12 @@ export const postSchedule: postScheduleSignature = async (request, body) => { flat_group: true, }); } catch (error) { - console.log("Error while getting device " + body.Experiment.Devices[device].ID +" :" + (error as Error).toString()); + console.log( + 'Error while getting device ' + + body.Experiment.Devices[device].ID + + ' :' + + (error as Error).toString(), + ); const err = error as UnsuccessfulRequestError; // Bad status code if (err.response !== undefined && err.response.status !== undefined) { @@ -113,6 +118,13 @@ export const postSchedule: postScheduleSignature = async (request, body) => { // Get timetable let d: URL = new URL(realDevices[device][i]); + console.log( + 'DEBUG:', + d.toString(), + body.Experiment.Devices[device].ID, + BelongsToUs(d), + JSON.stringify(config.InstitutePrefix), + ); let t: Timeslot[] = []; if (!BelongsToUs(d)) { // This is not our device @@ -172,7 +184,9 @@ export const postSchedule: postScheduleSignature = async (request, body) => { try { req = await lr[3]; } catch (error) { - console.log("Error while getting schedule for " + k + " :" + (error as Error).toString()); + console.log( + 'Error while getting schedule for ' + k + ' :' + (error as Error).toString(), + ); const err = error as UnsuccessfulRequestError; if (err.response !== undefined && err.response.status !== undefined) { if (err.response.status == 503) { @@ -240,7 +254,14 @@ export const postSchedule: postScheduleSignature = async (request, body) => { try { a = await availability[device][i]; } catch (error) { - console.log("Error while availability for " + device + " " + i + " :" + (error as Error).toString()); + console.log( + 'Error while availability for ' + + device + + ' ' + + i + + ' :' + + (error as Error).toString(), + ); const err = error as UnsuccessfulRequestError; if (err.response !== undefined && err.response.status !== undefined) { // TODO: Remove later if errors are well specified @@ -276,8 +297,14 @@ export const postSchedule: postScheduleSignature = async (request, body) => { if (a.type == 'cloud instantiable' || a.type == 'edge instantiable') { available = [{ Start: body.Time.Start, End: body.Time.End }]; } else { + const announcedAvailability = await clients.device.getDeviceAvailability(a.url, { + startTime: body.Time.Start, + endTime: body.Time.End, + }); + console.log('DEBUG:', JSON.stringify(a.announcedAvailability)); + console.log('DEBUG:', JSON.stringify(announcedAvailability)); available = timetableAnd( - a.announcedAvailability!.map(e => { + announcedAvailability!.map(e => { return { Start: e.start!, End: e.end! }; }), ); @@ -289,6 +316,11 @@ export const postSchedule: postScheduleSignature = async (request, body) => { ); let notFree: Timeslot[] = timetableAnd(notAvailable, timetables[device][i]); + console.log( + JSON.stringify( + timetableNot(notFree, dayjs(body.Time.Start), dayjs(body.Time.End)), + ), + ); // Now push free free.push(timetableNot(notFree, dayjs(body.Time.Start), dayjs(body.Time.End))); } diff --git a/services/device/src/clients/authentication/client.ts b/services/device/src/clients/authentication/client.ts index 1d32d352..7e1abffa 100644 --- a/services/device/src/clients/authentication/client.ts +++ b/services/device/src/clients/authentication/client.ts @@ -129,9 +129,11 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, + ); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -141,7 +143,9 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, + ); return pathParameters; } @@ -173,10 +177,11 @@ export class Client { private fixedHeaders: [string, string][]; private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()); try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -211,12 +216,8 @@ export class Client { fixedHeaders?: [string, string][]; }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -252,6 +253,7 @@ export class Client { }, ): Promise { const url = appendToUrl(this.baseUrl, '/login'); + console.log('trying to fetch url:', url); const body: Signatures.LoginBody = { username: username, @@ -265,15 +267,22 @@ export class Client { (RequestValidation.validateLoginInput as Types.FunctionWithErrors).errors, ); - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateLoginOutput(response)) throw new ValidationError( @@ -307,6 +316,7 @@ export class Client { */ public async logout(options?: { headers?: [string, string][] }): Promise { const url = appendToUrl(this.baseUrl, '/logout'); + console.log('trying to fetch url:', url); const body: Signatures.LogoutBody = { token: this.accessToken }; @@ -318,16 +328,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateLogoutOutput(response)) throw new ValidationError( @@ -370,6 +387,7 @@ export class Client { url?: string; }): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/users'); + console.log('trying to fetch url:', url); const parameters = { username: options?.username, @@ -388,8 +406,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'GET', headers: [ @@ -444,6 +470,7 @@ export class Client { }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/users'); + console.log('trying to fetch url:', url); const body = user; @@ -455,16 +482,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateCreateUserOutput(response)) throw new ValidationError( @@ -507,7 +541,8 @@ export class Client { ): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [user_id] = validateUrl(url, this.baseUrl, '/users/{}'); + const [user_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}'); + console.log('trying to fetch url:', url); const parameters = { user_id: user_id, @@ -521,15 +556,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateGetUserOutput(response)) throw new ValidationError( @@ -575,7 +617,8 @@ export class Client { ): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [user_id] = validateUrl(url, this.baseUrl, '/users/{}'); + const [user_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}'); + console.log('trying to fetch url:', url); const body = user; @@ -591,16 +634,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'PATCH', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'PATCH', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateUpdateUserOutput(response)) throw new ValidationError( @@ -643,7 +693,8 @@ export class Client { ): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [user_id] = validateUrl(url, this.baseUrl, '/users/{}'); + const [user_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}'); + console.log('trying to fetch url:', url); const parameters = { user_id: user_id, @@ -657,15 +708,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeleteUserOutput(response)) throw new ValidationError( @@ -699,6 +757,7 @@ export class Client { headers?: [string, string][]; }): Promise { const url = appendToUrl(this.baseUrl, '/identity'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateGetIdentityInput()) throw new ValidationError( @@ -708,15 +767,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateGetIdentityOutput(response)) throw new ValidationError( @@ -758,6 +824,7 @@ export class Client { }, ): Promise { const url = appendToUrl(this.baseUrl, '/identity'); + console.log('trying to fetch url:', url); const body = user; @@ -771,16 +838,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'PATCH', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'PATCH', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateUpdateIdentityOutput(response)) throw new ValidationError( @@ -851,6 +925,7 @@ export class Client { }, ): Promise { const url = appendToUrl(this.baseUrl, '/token'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateCreateTokenInput(body)) throw new ValidationError( @@ -858,15 +933,22 @@ export class Client { (RequestValidation.validateCreateTokenInput as Types.FunctionWithErrors).errors, ); - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateCreateTokenOutput(response)) throw new ValidationError( diff --git a/services/device/src/clients/device/client.ts b/services/device/src/clients/device/client.ts index fd7e35f4..19211284 100644 --- a/services/device/src/clients/device/client.ts +++ b/services/device/src/clients/device/client.ts @@ -129,9 +129,11 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, + ); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -141,7 +143,9 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, + ); return pathParameters; } @@ -173,10 +177,11 @@ export class Client { private fixedHeaders: [string, string][]; private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()); try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -211,12 +216,8 @@ export class Client { fixedHeaders?: [string, string][]; }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -244,6 +245,7 @@ export class Client { url?: string; }): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateListDevicesInput()) throw new ValidationError( @@ -253,15 +255,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateListDevicesOutput(response)) throw new ValidationError( @@ -316,6 +325,7 @@ export class Client { }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); + console.log('trying to fetch url:', url); const body = device; @@ -336,8 +346,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'POST', headers: [ @@ -394,7 +412,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -414,8 +433,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'GET', headers: [ @@ -481,7 +508,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const body = deviceUpdate; @@ -503,8 +531,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'PATCH', headers: [ @@ -558,7 +594,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -572,15 +609,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeleteDeviceOutput(response)) throw new ValidationError( @@ -631,7 +675,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -653,8 +698,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'POST', headers: [ @@ -715,7 +768,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/availability', + ); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -740,8 +798,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'GET', headers: [ @@ -796,7 +862,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/availability', + ); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -812,15 +883,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeleteDeviceAvailabilityRulesOutput(response)) throw new ValidationError( @@ -866,7 +944,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/availability', + ); + console.log('trying to fetch url:', url); const body = availabilityRules; @@ -884,16 +967,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateAddDeviceAvailabilityRulesOutput(response)) throw new ValidationError( @@ -938,7 +1028,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/websocket'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/websocket'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/websocket', + ); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -954,15 +1049,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateCreateWebsocketTokenOutput(response)) throw new ValidationError( @@ -1015,7 +1117,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/signaling'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/signaling'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/signaling', + ); + console.log('trying to fetch url:', url); const body = sigMessage; @@ -1033,16 +1140,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateSendSignalingMessageOutput(response)) throw new ValidationError( @@ -1082,6 +1196,7 @@ export class Client { url?: string; }): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateListPeerconnectionsInput()) throw new ValidationError( @@ -1093,15 +1208,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateListPeerconnectionsOutput(response)) throw new ValidationError( @@ -1155,6 +1277,7 @@ export class Client { }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); + console.log('trying to fetch url:', url); const body = peerconnection; @@ -1181,8 +1304,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'POST', headers: [ @@ -1238,7 +1369,12 @@ export class Client { ): Promise { const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [peerconnection_id] = validateUrl(url, this.baseUrl, '/peerconnections/{}'); + const [peerconnection_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/peerconnections/{}', + ); + console.log('trying to fetch url:', url); const parameters = { peerconnection_id: peerconnection_id, @@ -1254,15 +1390,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateGetPeerconnectionOutput(response)) throw new ValidationError( @@ -1308,7 +1451,12 @@ export class Client { ): Promise { const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [peerconnection_id] = validateUrl(url, this.baseUrl, '/peerconnections/{}'); + const [peerconnection_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/peerconnections/{}', + ); + console.log('trying to fetch url:', url); const parameters = { peerconnection_id: peerconnection_id, @@ -1324,15 +1472,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeletePeerconnectionOutput(response)) throw new ValidationError( @@ -1388,10 +1543,11 @@ export class Client { const urlSuffix = '/peerconnections/{}/device_status'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); const [peerconnection_id] = validateUrl( - url, + new URL(url).toString(), this.baseUrl, '/peerconnections/{}/device_status', ); + console.log('trying to fetch url:', url); const parameters = { peerconnection_id: peerconnection_id, @@ -1413,8 +1569,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'PATCH', headers: [ diff --git a/services/device/src/clients/federation/client.ts b/services/device/src/clients/federation/client.ts index 2aad4cb6..5eb22094 100644 --- a/services/device/src/clients/federation/client.ts +++ b/services/device/src/clients/federation/client.ts @@ -129,9 +129,11 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, + ); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -141,7 +143,9 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, + ); return pathParameters; } @@ -173,10 +177,11 @@ export class Client { private fixedHeaders: [string, string][]; private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()); try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -211,12 +216,8 @@ export class Client { fixedHeaders?: [string, string][]; }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -244,6 +245,7 @@ export class Client { url?: string; }): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/institutions'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateListInstitutionsInput()) throw new ValidationError( @@ -255,15 +257,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateListInstitutionsOutput(response)) throw new ValidationError( @@ -310,6 +319,7 @@ export class Client { }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/institutions'); + console.log('trying to fetch url:', url); const body = institution; @@ -323,16 +333,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateCreateInstitutionOutput(response)) throw new ValidationError( @@ -377,7 +394,12 @@ export class Client { ): Promise { const urlSuffix = '/institutions/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [institution_id] = validateUrl(url, this.baseUrl, '/institutions/{}'); + const [institution_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/institutions/{}', + ); + console.log('trying to fetch url:', url); const parameters = { institution_id: institution_id, @@ -393,15 +415,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateGetInstitutionOutput(response)) throw new ValidationError( @@ -449,7 +478,12 @@ export class Client { ): Promise { const urlSuffix = '/institutions/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [institution_id] = validateUrl(url, this.baseUrl, '/institutions/{}'); + const [institution_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/institutions/{}', + ); + console.log('trying to fetch url:', url); const body = institution; @@ -467,16 +501,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'PATCH', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'PATCH', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateUpdateInstitutionOutput(response)) throw new ValidationError( @@ -521,7 +562,12 @@ export class Client { ): Promise { const urlSuffix = '/institutions/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [institution_id] = validateUrl(url, this.baseUrl, '/institutions/{}'); + const [institution_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/institutions/{}', + ); + console.log('trying to fetch url:', url); const parameters = { institution_id: institution_id, @@ -537,15 +583,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeleteInstitutionOutput(response)) throw new ValidationError( diff --git a/services/experiment/src/clients/booking-backend/client.ts b/services/experiment/src/clients/booking-backend/client.ts index 2c864a69..f54a62e0 100644 --- a/services/experiment/src/clients/booking-backend/client.ts +++ b/services/experiment/src/clients/booking-backend/client.ts @@ -129,9 +129,11 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, + ); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -141,7 +143,9 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, + ); return pathParameters; } @@ -173,10 +177,11 @@ export class Client { private fixedHeaders: [string, string][]; private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()); try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -211,12 +216,8 @@ export class Client { fixedHeaders?: [string, string][]; }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -247,7 +248,8 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); + const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}/lock'); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -261,15 +263,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'PUT', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'PUT', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateLockBookingOutput(response)) throw new ValidationError( @@ -312,7 +321,8 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/lock'); + const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}/lock'); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -326,15 +336,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateUnlockBookingOutput(response)) throw new ValidationError( @@ -377,7 +394,12 @@ export class Client { ): Promise { const urlSuffix = '/booking_callback/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking_callback/{}'); + const [ID] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/booking_callback/{}', + ); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -393,15 +415,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateBookingCallbackOutput(response)) throw new ValidationError( diff --git a/services/experiment/src/clients/booking-frontend/client.ts b/services/experiment/src/clients/booking-frontend/client.ts index 0fe8414a..65e60847 100644 --- a/services/experiment/src/clients/booking-frontend/client.ts +++ b/services/experiment/src/clients/booking-frontend/client.ts @@ -129,9 +129,11 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, + ); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -141,7 +143,9 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, + ); return pathParameters; } @@ -173,10 +177,11 @@ export class Client { private fixedHeaders: [string, string][]; private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()); try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -211,12 +216,8 @@ export class Client { fixedHeaders?: [string, string][]; }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -262,6 +263,7 @@ export class Client { }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/booking'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateNewBookingInput(body)) throw new ValidationError( @@ -271,16 +273,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateNewBookingOutput(response)) throw new ValidationError( @@ -344,7 +353,8 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -358,16 +368,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'PATCH', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'PATCH', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateUpdateBookingOutput(response)) throw new ValidationError( @@ -412,7 +429,8 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -426,15 +444,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeleteBookingOutput(response)) throw new ValidationError( @@ -477,7 +502,8 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -491,15 +517,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateGetBookingOutput(response)) throw new ValidationError( @@ -542,7 +575,12 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/destroy'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(url, this.baseUrl, '/booking/{}/destroy'); + const [ID] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/booking/{}/destroy', + ); + console.log('trying to fetch url:', url); const parameters = { ID: ID, @@ -558,15 +596,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDestroyBookingOutput(response)) throw new ValidationError( diff --git a/services/experiment/src/clients/device/client.ts b/services/experiment/src/clients/device/client.ts index fd7e35f4..19211284 100644 --- a/services/experiment/src/clients/device/client.ts +++ b/services/experiment/src/clients/device/client.ts @@ -129,9 +129,11 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, + ); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -141,7 +143,9 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, + ); return pathParameters; } @@ -173,10 +177,11 @@ export class Client { private fixedHeaders: [string, string][]; private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()); try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -211,12 +216,8 @@ export class Client { fixedHeaders?: [string, string][]; }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -244,6 +245,7 @@ export class Client { url?: string; }): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateListDevicesInput()) throw new ValidationError( @@ -253,15 +255,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateListDevicesOutput(response)) throw new ValidationError( @@ -316,6 +325,7 @@ export class Client { }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); + console.log('trying to fetch url:', url); const body = device; @@ -336,8 +346,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'POST', headers: [ @@ -394,7 +412,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -414,8 +433,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'GET', headers: [ @@ -481,7 +508,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const body = deviceUpdate; @@ -503,8 +531,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'PATCH', headers: [ @@ -558,7 +594,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -572,15 +609,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeleteDeviceOutput(response)) throw new ValidationError( @@ -631,7 +675,8 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -653,8 +698,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'POST', headers: [ @@ -715,7 +768,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/availability', + ); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -740,8 +798,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'GET', headers: [ @@ -796,7 +862,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/availability', + ); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -812,15 +883,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeleteDeviceAvailabilityRulesOutput(response)) throw new ValidationError( @@ -866,7 +944,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/availability'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/availability', + ); + console.log('trying to fetch url:', url); const body = availabilityRules; @@ -884,16 +967,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateAddDeviceAvailabilityRulesOutput(response)) throw new ValidationError( @@ -938,7 +1028,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/websocket'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/websocket'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/websocket', + ); + console.log('trying to fetch url:', url); const parameters = { device_id: device_id, @@ -954,15 +1049,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateCreateWebsocketTokenOutput(response)) throw new ValidationError( @@ -1015,7 +1117,12 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/signaling'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(url, this.baseUrl, '/devices/{}/signaling'); + const [device_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/devices/{}/signaling', + ); + console.log('trying to fetch url:', url); const body = sigMessage; @@ -1033,16 +1140,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateSendSignalingMessageOutput(response)) throw new ValidationError( @@ -1082,6 +1196,7 @@ export class Client { url?: string; }): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateListPeerconnectionsInput()) throw new ValidationError( @@ -1093,15 +1208,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateListPeerconnectionsOutput(response)) throw new ValidationError( @@ -1155,6 +1277,7 @@ export class Client { }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); + console.log('trying to fetch url:', url); const body = peerconnection; @@ -1181,8 +1304,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'POST', headers: [ @@ -1238,7 +1369,12 @@ export class Client { ): Promise { const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [peerconnection_id] = validateUrl(url, this.baseUrl, '/peerconnections/{}'); + const [peerconnection_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/peerconnections/{}', + ); + console.log('trying to fetch url:', url); const parameters = { peerconnection_id: peerconnection_id, @@ -1254,15 +1390,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateGetPeerconnectionOutput(response)) throw new ValidationError( @@ -1308,7 +1451,12 @@ export class Client { ): Promise { const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [peerconnection_id] = validateUrl(url, this.baseUrl, '/peerconnections/{}'); + const [peerconnection_id] = validateUrl( + new URL(url).toString(), + this.baseUrl, + '/peerconnections/{}', + ); + console.log('trying to fetch url:', url); const parameters = { peerconnection_id: peerconnection_id, @@ -1324,15 +1472,22 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); if (!RequestValidation.validateDeletePeerconnectionOutput(response)) throw new ValidationError( @@ -1388,10 +1543,11 @@ export class Client { const urlSuffix = '/peerconnections/{}/device_status'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); const [peerconnection_id] = validateUrl( - url, + new URL(url).toString(), this.baseUrl, '/peerconnections/{}/device_status', ); + console.log('trying to fetch url:', url); const parameters = { peerconnection_id: peerconnection_id, @@ -1413,8 +1569,16 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); const response = await this.fetch( - url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), { method: 'PATCH', headers: [ diff --git a/services/experiment/src/clients/schedule-service/client.ts b/services/experiment/src/clients/schedule-service/client.ts index 774831bd..5241f64f 100644 --- a/services/experiment/src/clients/schedule-service/client.ts +++ b/services/experiment/src/clients/schedule-service/client.ts @@ -129,9 +129,11 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, + ); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -141,7 +143,9 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError( + `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, + ); return pathParameters; } @@ -173,10 +177,11 @@ export class Client { private fixedHeaders: [string, string][]; private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()); try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -211,12 +216,8 @@ export class Client { fixedHeaders?: [string, string][]; }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -268,6 +269,7 @@ export class Client { }, ): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, '/schedule'); + console.log('trying to fetch url:', url); if (!RequestValidation.validateScheduleInput(body)) throw new ValidationError( @@ -277,16 +279,23 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}`; - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl), { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }); + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); if (!RequestValidation.validateScheduleOutput(response)) throw new ValidationError( diff --git a/services/experiment/src/methods/experimentStatus/book.ts b/services/experiment/src/methods/experimentStatus/book.ts index f0943f3f..962c72ec 100644 --- a/services/experiment/src/methods/experimentStatus/book.ts +++ b/services/experiment/src/methods/experimentStatus/book.ts @@ -44,7 +44,7 @@ export async function bookExperiment(experimentModel: ExperimentModel) { ); // TODO: error handling - const { BookingID } = await clients.booking.frontend.newBooking({ + const booking = await clients.booking.frontend.newBooking({ Devices: experimentModel.devices.map(device => { return { ID: device.url }; }), @@ -54,16 +54,33 @@ export async function bookExperiment(experimentModel: ExperimentModel) { }, Type: 'normal', }); + console.log( + 'BOOKING DATA:', + startTime, + endTime, + JSON.stringify(await clients.booking.frontend.getBooking(booking.BookingID)), + ); - await clients.booking.frontend.updateBooking(BookingID, { + await clients.booking.frontend.updateBooking(booking.BookingID, { Callback: callbackUrl, }); - callbackHandler.addListener('booking', BookingID, experimentModel.uuid); + // TEMPORARY HOTFIX: wait for booking to have status "booked" + await new Promise(async resolve => { + for (let i = 0; i < 10; i++) { + const updatedBooking = await clients.booking.frontend.getBooking(booking.BookingID); + + if (updatedBooking.Booking.Status === 'booked') resolve(); + + await new Promise(resolve => setTimeout(resolve, 1000)); + } + }); + + callbackHandler.addListener('booking', booking.BookingID, experimentModel.uuid); experimentModel.bookingStart = startTime.toISOString(); experimentModel.bookingEnd = endTime.toISOString(); - experimentModel.bookingID = BookingID; + experimentModel.bookingID = booking.BookingID; experimentModel.status = 'booked'; await repositories.experiment.save(experimentModel); diff --git a/services/experiment/src/types/typeguards.ts b/services/experiment/src/types/typeguards.ts index 81a128aa..23d9e4c5 100644 --- a/services/experiment/src/types/typeguards.ts +++ b/services/experiment/src/types/typeguards.ts @@ -111,10 +111,10 @@ function validateExperimentStatusFinished( return true; } -function hasBooking(_experimentModel: ExperimentModel) { - // if (!experimentModel.bookingID) return false - // if (!experimentModel.bookingStart) return false - // if (!experimentModel.bookingEnd) return false +function hasBooking(experimentModel: ExperimentModel) { + if (!experimentModel.bookingID) return false; + if (!experimentModel.bookingStart) return false; + if (!experimentModel.bookingEnd) return false; return true; } diff --git a/services/lti/src/clients/authentication/client.ts b/services/lti/src/clients/authentication/client.ts index 05d2d375..48065dd4 100644 --- a/services/lti/src/clients/authentication/client.ts +++ b/services/lti/src/clients/authentication/client.ts @@ -131,9 +131,9 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); + if (!(url).startsWith(baseUrl)) + throw new InvalidUrlError(`Provided url "${url}" does not start with the provided base url "${baseUrl}"`); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -143,7 +143,7 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError(`Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`); return pathParameters; } @@ -175,10 +175,11 @@ export class Client { private fixedHeaders: [string, string][] private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()) try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -209,12 +210,8 @@ export class Client { baseUrl: string, options: { serviceUrl?: string; accessToken?: string, fixedHeaders?: [string, string][] }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -248,6 +245,7 @@ export class Client { headers?: [string, string][], method?: "tui" | "local",}): Promise { const url = appendToUrl(this.baseUrl, "/login") + console.log("trying to fetch url:", url); const body: Signatures.LoginBody = @@ -265,7 +263,8 @@ export class Client { (RequestValidation.validateLoginInput as Types.FunctionWithErrors).errors ) - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "POST", headers: [ ["Content-Type", "application/json"], @@ -307,6 +306,7 @@ export class Client { */ public async logout(options?: { headers?: [string, string][] }): Promise { const url = appendToUrl(this.baseUrl, "/logout") + console.log("trying to fetch url:", url); const body: Signatures.LogoutBody = { token: this.accessToken } @@ -320,7 +320,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "POST", headers: [ ["Content-Type", "application/json"], @@ -370,6 +371,7 @@ export class Client { options?: { headers?: [string, string][],username?: string,url?: string}): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, "/users") + console.log("trying to fetch url:", url); @@ -391,7 +393,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -442,6 +445,7 @@ export class Client { options?: { headers?: [string, string][],url?: string}): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, "/users") + console.log("trying to fetch url:", url); const body = user @@ -455,7 +459,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "POST", headers: [ ["Content-Type", "application/json"], @@ -506,7 +511,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [user_id,] = validateUrl(url, this.baseUrl, '/users/{}') + const [user_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}') + console.log("trying to fetch url:", url); @@ -523,7 +529,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -575,7 +582,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [user_id,] = validateUrl(url, this.baseUrl, '/users/{}') + const [user_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}') + console.log("trying to fetch url:", url); const body = user @@ -592,7 +600,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "PATCH", headers: [ ["Content-Type", "application/json"], @@ -643,7 +652,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [user_id,] = validateUrl(url, this.baseUrl, '/users/{}') + const [user_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}') + console.log("trying to fetch url:", url); @@ -660,7 +670,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "DELETE", headers: [ ["Content-Type", "application/json"], @@ -704,6 +715,7 @@ export class Client { options?: { headers?: [string, string][],}): Promise { const url = appendToUrl(this.baseUrl, "/identity") + console.log("trying to fetch url:", url); @@ -717,7 +729,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -762,10 +775,11 @@ export class Client { * @returns * The JSON representation of the updated user. */ - public async updateIdentity(user: Types.User<"request">, + public async updateIdentity(user: Types.User<"request"> | undefined, options?: { headers?: [string, string][],}): Promise { const url = appendToUrl(this.baseUrl, "/identity") + console.log("trying to fetch url:", url); const body = user @@ -779,7 +793,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "PATCH", headers: [ ["Content-Type", "application/json"], @@ -854,6 +869,7 @@ export class Client { options?: { headers?: [string, string][],}): Promise { const url = appendToUrl(this.baseUrl, "/token") + console.log("trying to fetch url:", url); @@ -865,7 +881,8 @@ export class Client { (RequestValidation.validateCreateTokenInput as Types.FunctionWithErrors).errors ) - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "POST", headers: [ ["Content-Type", "application/json"], diff --git a/services/lti/src/clients/experiment/client.ts b/services/lti/src/clients/experiment/client.ts index 65e924ce..6f9fc433 100644 --- a/services/lti/src/clients/experiment/client.ts +++ b/services/lti/src/clients/experiment/client.ts @@ -131,9 +131,9 @@ function parsePathParameters(url: string, endpoint: string): string[] { */ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); + throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); + if (!(url).startsWith(baseUrl)) + throw new InvalidUrlError(`Provided url "${url}" does not start with the provided base url "${baseUrl}"`); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -143,7 +143,7 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); + throw new InvalidUrlError(`Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`); return pathParameters; } @@ -175,10 +175,11 @@ export class Client { private fixedHeaders: [string, string][] private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()) try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -209,12 +210,8 @@ export class Client { baseUrl: string, options: { serviceUrl?: string; accessToken?: string, fixedHeaders?: [string, string][] }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -243,6 +240,7 @@ export class Client { options?: { headers?: [string, string][],experimentStatus?: string,url?: string}): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, "/experiments") + console.log("trying to fetch url:", url); @@ -264,7 +262,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -318,6 +317,7 @@ export class Client { options?: { headers?: [string, string][],changedURL?: string,url?: string}): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, "/experiments") + console.log("trying to fetch url:", url); const body = experiment @@ -339,7 +339,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "POST", headers: [ ["Content-Type", "application/json"], @@ -390,7 +391,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/experiments/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [experiment_id,] = validateUrl(url, this.baseUrl, '/experiments/{}') + const [experiment_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/experiments/{}') + console.log("trying to fetch url:", url); @@ -407,7 +409,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -457,12 +460,13 @@ export class Client { * 200: The JSON Representation of the changed experiment * 202: The JSON Representation of the changed experiment, that will be set to running eventually */ - public async updateExperiment(url: string,experimentUpdate: Types.ExperimentUpdate<"request">, + public async updateExperiment(url: string,experimentUpdate: Types.ExperimentUpdate<"request"> | undefined, options?: { headers?: [string, string][],changedURL?: string,}): Promise { const urlSuffix = '/experiments/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [experiment_id,] = validateUrl(url, this.baseUrl, '/experiments/{}') + const [experiment_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/experiments/{}') + console.log("trying to fetch url:", url); const body = experimentUpdate @@ -485,7 +489,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "PATCH", headers: [ ["Content-Type", "application/json"], @@ -536,7 +541,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/experiments/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [experiment_id,] = validateUrl(url, this.baseUrl, '/experiments/{}') + const [experiment_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/experiments/{}') + console.log("trying to fetch url:", url); @@ -553,7 +559,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "DELETE", headers: [ ["Content-Type", "application/json"], @@ -600,6 +607,7 @@ export class Client { options?: { headers?: [string, string][],url?: string}): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, "/templates") + console.log("trying to fetch url:", url); @@ -613,7 +621,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -665,6 +674,7 @@ export class Client { options?: { headers?: [string, string][],url?: string}): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, "/templates") + console.log("trying to fetch url:", url); const body = template @@ -678,7 +688,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "POST", headers: [ ["Content-Type", "application/json"], @@ -729,7 +740,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/templates/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [template_id,] = validateUrl(url, this.baseUrl, '/templates/{}') + const [template_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/templates/{}') + console.log("trying to fetch url:", url); @@ -746,7 +758,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -799,7 +812,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/templates/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [template_id,] = validateUrl(url, this.baseUrl, '/templates/{}') + const [template_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/templates/{}') + console.log("trying to fetch url:", url); const body = templateUpdate @@ -816,7 +830,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "PATCH", headers: [ ["Content-Type", "application/json"], @@ -867,7 +882,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/templates/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [template_id,] = validateUrl(url, this.baseUrl, '/templates/{}') + const [template_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/templates/{}') + console.log("trying to fetch url:", url); @@ -884,7 +900,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "DELETE", headers: [ ["Content-Type", "application/json"], From c2f9ef16c0d780863564d817fcc3a5f3632114b8 Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Mon, 15 Jul 2024 09:10:58 +0000 Subject: [PATCH 58/79] wip integration booking service - update integration test to run on localhost --- integration-test/docker-compose.yaml | 117 +++++++++------------------ integration-test/scripts/test.sh | 14 +++- 2 files changed, 47 insertions(+), 84 deletions(-) diff --git a/integration-test/docker-compose.yaml b/integration-test/docker-compose.yaml index be16b194..05011252 100644 --- a/integration-test/docker-compose.yaml +++ b/integration-test/docker-compose.yaml @@ -6,53 +6,42 @@ # version: '3' -networks: - backend: - frontend: - -volumes: - db: - x-config: &common-config - AUTHORIZATION_SERVER: 'http://authorization:3010' + AUTHORIZATION_SERVER: 'http://localhost:3010' AUTHORIZATION_PSK: '${AUTHORIZATION_PSK:?}' LOGGING: '${LOGGING_LEVEL:-warn}' BASE_URL: ${API_BASE_URL} DB_TYPE: mariadb - DB_HOST: db + DB_HOST: localhost DB_PORT: 3306 - AUTH_SERVICE_URL: 'http://authentication:3000' - DEVICE_SERVICE_URL: 'http://device:3001' - EXPERIMENT_SERVICE_URL: 'http://experiment:3002' - FEDERATION_SERVICE_URL: 'http://federation:3003' - BOOKING_FRONTEND_URL: 'http://booking-frontend:3004' - BOOKING_BACKEND_URL: 'http://booking-backend:3005' - SCHEDULE_SERVICE_URL: 'http://schedule-service:3006' - AUTH_SERVICE_DOMAIN: 'authentication:3000' - DEVICE_SERVICE_DOMAIN: 'device:3001' - EXPERIMENT_SERVICE_DOMAIN: 'experiment:3002' - FEDERATION_SERVICE_DOMAIN: 'federation:3003' - BOOKING_FRONTEND_DOMAIN: 'booking-frontend:3004' - BOOKING_BACKEND_DOMAIN: 'booking-backend:3005' - SCHEDULE_SERVICE_DOMAIN: 'schedule-service:3006' - AUTHORIZATION_SERVICE_DOMAIN: 'authorization:3010' + AUTH_SERVICE_URL: 'http://localhost:3000' + DEVICE_SERVICE_URL: 'http://localhost:3001' + EXPERIMENT_SERVICE_URL: 'http://localhost:3002' + FEDERATION_SERVICE_URL: 'http://localhost:3003' + BOOKING_FRONTEND_URL: 'http://localhost:3004' + BOOKING_BACKEND_URL: 'http://localhost:3005' + SCHEDULE_SERVICE_URL: 'http://localhost:3006' + AUTH_SERVICE_DOMAIN: 'localhost:3000' + DEVICE_SERVICE_DOMAIN: 'localhost:3001' + EXPERIMENT_SERVICE_DOMAIN: 'localhost:3002' + FEDERATION_SERVICE_DOMAIN: 'localhost:3003' + BOOKING_FRONTEND_DOMAIN: 'localhost:3004' + BOOKING_BACKEND_DOMAIN: 'localhost:3005' + SCHEDULE_SERVICE_DOMAIN: 'localhost:3006' + AUTHORIZATION_SERVICE_DOMAIN: 'localhost:3010' services: # Database db: image: mariadb:11.2.3 - networks: - backend: + network_mode: 'host' volumes: - './config/mariadb:/docker-entrypoint-initdb.d:ro' - - 'db:/var/lib/mysql' environment: MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:?} healthcheck: test: ['CMD', 'healthcheck.sh', '--su=mysql', '--connect', '--innodb_initialized'] restart: on-failure - extra_hosts: - - '${API_BASE_HOST}=host-gateway' rabbitmq: image: rabbitmq:3.13.4 volumes: @@ -61,25 +50,18 @@ services: - ./config/rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins:ro healthcheck: test: ['CMD', 'rabbitmqctl', 'status'] - networks: - backend: - extra_hosts: - - '${API_BASE_HOST}=host-gateway' + network_mode: 'host' gateway: image: ${GATEWAY_IMAGE:?} ports: - '${API_PORT}:80' environment: <<: *common-config - networks: - frontend: - backend: + network_mode: 'host' depends_on: db: condition: service_healthy restart: on-failure - extra_hosts: - - '${API_BASE_HOST}=host-gateway' # Services authentication: image: ${AUTHENTICATION_IMAGE:?} @@ -90,14 +72,11 @@ services: ADMIN_USERNAME: admin ADMIN_PASSWORD: ${ADMIN_PASSWORD:?} JWT_SECRET: ${JWT_SECRET:?} - networks: - backend: + network_mode: 'host' depends_on: db: condition: service_healthy restart: on-failure - extra_hosts: - - '${API_BASE_HOST}=host-gateway' authorization: image: ${AUTHORIZATION_IMAGE:?} environment: @@ -105,114 +84,90 @@ services: DB_USERNAME: authorization DB_DATABASE: authorization JWT_SECRET: ${JWT_SECRET:?} - networks: - backend: + network_mode: 'host' depends_on: db: condition: service_healthy restart: on-failure - extra_hosts: - - '${API_BASE_HOST}=host-gateway' booking-frontend: image: ${BOOKING_FRONTEND_IMAGE:?} environment: <<: *common-config - BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true - AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@rabbitmq:5672 - networks: - backend: + BOOKING_DSN: mysql://booking@localhost:3306/booking?supportBigNumbers=true&bigNumberStrings=true + AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@localhost:5672 + network_mode: 'host' depends_on: db: condition: service_healthy rabbitmq: condition: service_healthy restart: on-failure - extra_hosts: - - '${API_BASE_HOST}=host-gateway' booking-backend: image: ${BOOKING_BACKEND_IMAGE:?} environment: <<: *common-config - BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true - AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@rabbitmq:5672 - networks: - backend: + BOOKING_DSN: mysql://booking@localhost:3306/booking?supportBigNumbers=true&bigNumberStrings=true + AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@localhost:5672 + network_mode: 'host' depends_on: db: condition: service_healthy rabbitmq: condition: service_healthy restart: on-failure - extra_hosts: - - '${API_BASE_HOST}=host-gateway' schedule-service: image: ${SCHEDULE_SERVICE_IMAGE:?} environment: <<: *common-config - BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true - networks: - backend: + BOOKING_DSN: mysql://booking@localhost:3306/booking?supportBigNumbers=true&bigNumberStrings=true + network_mode: 'host' depends_on: db: condition: service_healthy restart: on-failure - extra_hosts: - - '${API_BASE_HOST}=host-gateway' device-reservation: image: ${DEVICE_RESERVATION_IMAGE:?} environment: <<: *common-config - BOOKING_DSN: mysql://booking@db:3306/booking?supportBigNumbers=true&bigNumberStrings=true - AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@rabbitmq:5672 - networks: - backend: + BOOKING_DSN: mysql://booking@localhost:3306/booking?supportBigNumbers=true&bigNumberStrings=true + AMQP_URL: amqp://rabbitmq:${RABBITMQ_PASSWORD:?}@localhost:5672 + network_mode: 'host' depends_on: db: condition: service_healthy rabbitmq: condition: service_healthy restart: on-failure - extra_hosts: - - '${API_BASE_HOST}=host-gateway' device: image: ${DEVICE_IMAGE:?} environment: <<: *common-config DB_USERNAME: device DB_DATABASE: device - networks: - backend: + network_mode: 'host' depends_on: db: condition: service_healthy restart: on-failure - extra_hosts: - - '${API_BASE_HOST}=host-gateway' experiment: image: ${EXPERIMENT_IMAGE:?} environment: <<: *common-config DB_USERNAME: experiment DB_DATABASE: experiment - networks: - backend: + network_mode: 'host' depends_on: db: condition: service_healthy restart: on-failure - extra_hosts: - - '${API_BASE_HOST}=host-gateway' federation: image: ${FEDERATION_IMAGE:?} environment: <<: *common-config DB_USERNAME: federation DB_DATABASE: federation - networks: - backend: + network_mode: 'host' depends_on: db: condition: service_healthy restart: on-failure - extra_hosts: - - '${API_BASE_HOST}=host-gateway' diff --git a/integration-test/scripts/test.sh b/integration-test/scripts/test.sh index f5431228..52dddf06 100755 --- a/integration-test/scripts/test.sh +++ b/integration-test/scripts/test.sh @@ -17,9 +17,18 @@ export DEVICE_RESERVATION_IMAGE=$(docker load -i ../services/booking/src/device- mkdir -p db rm -rf db/* -COMPOSE_HTTP_TIMEOUT=600 docker-compose up --force-recreate --no-color > dist/server.log 2>&1 & +COMPOSE_HTTP_TIMEOUT=600 docker compose up --force-recreate --no-color > dist/server.log 2>&1 & end_time=$(($(date +%s) + 600)) # Set end time to 10 minutes from now +# trap ctrl-c and call ctrl_c() +trap ctrl_c INT + +ctrl_c () { + echo "Stopping containers and removing volumes!" + docker compose down --volumes > dist/server.log 2>&1 + exit 1 +} + #rm -rf venv virtualenv venv && venv/bin/pip install -r requirements.txt npm ci @@ -40,10 +49,9 @@ for url in "http://localhost/auth/status" "http://localhost/device/status" "http done done -export HOST="http://host.docker.internal" export USERNAME="admin" export PASSWORD="admin" npm run test -docker-compose down +docker compose down --volumes > dist/server.log 2>&1 From 57045a64d24927062a2431a7cfdc6ae9a2deebe0 Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Mon, 15 Jul 2024 09:33:25 +0000 Subject: [PATCH 59/79] wip booking service integration - update deployment sql init script - remove announcedAvailability property from concrete devices in database - return available timeslots for [now, now + week in ms] timeframe when getting a concrete device --- .../config/mariadb/00_init_dbs_and_users.sql | 4 ++-- ...21035482365-RemoveAnnouncedAvailability.ts | 14 +++++++++++ .../src/database/migrations/mariadb/index.ts | 7 +++++- ...21035468806-RemoveAnnouncedAvailability.ts | 24 +++++++++++++++++++ .../src/database/migrations/sqlite/index.ts | 8 +++++-- services/device/src/database/model.ts | 3 --- .../repositories/device/concreteDevice.ts | 9 +++++-- services/device/src/globals.ts | 6 ++++- .../devices/device/availability/post.ts | 7 +----- 9 files changed, 65 insertions(+), 17 deletions(-) create mode 100644 services/device/src/database/migrations/mariadb/1721035482365-RemoveAnnouncedAvailability.ts create mode 100644 services/device/src/database/migrations/sqlite/1721035468806-RemoveAnnouncedAvailability.ts diff --git a/deployment/production/core/config/mariadb/00_init_dbs_and_users.sql b/deployment/production/core/config/mariadb/00_init_dbs_and_users.sql index 9793e62e..d0054407 100755 --- a/deployment/production/core/config/mariadb/00_init_dbs_and_users.sql +++ b/deployment/production/core/config/mariadb/00_init_dbs_and_users.sql @@ -25,8 +25,8 @@ GRANT ALL PRIVILEGES ON booking.* to booking@'%'; FLUSH PRIVILEGES; USE booking; -CREATE TABLE booking (`id` BIGINT UNSIGNED AUTO_INCREMENT, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `type` ENUM('normal'), `status` ENUM('pending', 'booked', 'rejected', 'cancelled', 'active', 'active-pending', 'active-rejected') NOT NULL, `user` TEXT NOT NULL, `message` LONGTEXT, PRIMARY KEY (`id`)); +CREATE TABLE booking (`id` BIGINT UNSIGNED AUTO_INCREMENT, `start` DATETIME(3) NOT NULL, `end` DATETIME(3) NOT NULL, `type` ENUM('normal'), `status` ENUM('pending', 'booked', 'rejected', 'cancelled', 'active', 'active-pending', 'active-rejected') NOT NULL, `user` TEXT NOT NULL, `message` LONGTEXT, PRIMARY KEY (`id`)); CREATE TABLE bookeddevices (`id` BIGINT UNSIGNED AUTO_INCREMENT, `booking` BIGINT UNSIGNED NOT NULL, `originaldevice` TEXT NOT NULL, `originalposition` INT NOT NULL, `bookeddevice` TEXT, `remotereference` TEXT, `local` BOOLEAN, PRIMARY KEY (`id`), `reservation` BIGINT UNSIGNED, FOREIGN KEY(`booking`) REFERENCES booking (`id`) ON DELETE CASCADE ON UPDATE RESTRICT); CREATE TABLE bookingcallbacks (`id` BIGINT UNSIGNED AUTO_INCREMENT, `booking` BIGINT UNSIGNED NOT NULL, `url` TEXT NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY(`booking`) REFERENCES booking (`id`) ON DELETE CASCADE ON UPDATE RESTRICT); CREATE TABLE callback (`id` VARCHAR(600), `type` INTEGER, `targetbooking` BIGINT UNSIGNED NOT NULL, `parameters` JSON NOT NULL DEFAULT "{}", PRIMARY KEY(`id`)); -CREATE TABLE reservation (`id` BIGINT UNSIGNED AUTO_INCREMENT, `device` TEXT NOT NULL, `start` DATETIME NOT NULL, `end` DATETIME NOT NULL, `bookingreference` TEXT NOT NULL, PRIMARY KEY (`id`)); \ No newline at end of file +CREATE TABLE reservation (`id` BIGINT UNSIGNED AUTO_INCREMENT, `device` TEXT NOT NULL, `start` DATETIME(3) NOT NULL, `end` DATETIME(3) NOT NULL, `bookingreference` TEXT NOT NULL, PRIMARY KEY (`id`)); \ No newline at end of file diff --git a/services/device/src/database/migrations/mariadb/1721035482365-RemoveAnnouncedAvailability.ts b/services/device/src/database/migrations/mariadb/1721035482365-RemoveAnnouncedAvailability.ts new file mode 100644 index 00000000..c3bb8104 --- /dev/null +++ b/services/device/src/database/migrations/mariadb/1721035482365-RemoveAnnouncedAvailability.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class RemoveAnnouncedAvailability1721035482365 implements MigrationInterface { + name = 'RemoveAnnouncedAvailability1721035482365' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`Device\` DROP COLUMN \`announcedAvailability\``); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`Device\` ADD \`announcedAvailability\` text NULL`); + } + +} diff --git a/services/device/src/database/migrations/mariadb/index.ts b/services/device/src/database/migrations/mariadb/index.ts index 44468015..cc394e52 100644 --- a/services/device/src/database/migrations/mariadb/index.ts +++ b/services/device/src/database/migrations/mariadb/index.ts @@ -1,4 +1,9 @@ import { Setup1690370717132 } from './1690370717132-Setup.js'; import { RemoveOwnerProperty1701781258758 } from './1701781258758-RemoveOwnerProperty.js'; +import { RemoveAnnouncedAvailability1721035482365 } from './1721035482365-RemoveAnnouncedAvailability.js'; -export const Migrations = [Setup1690370717132, RemoveOwnerProperty1701781258758]; +export const Migrations = [ + Setup1690370717132, + RemoveOwnerProperty1701781258758, + RemoveAnnouncedAvailability1721035482365, +]; diff --git a/services/device/src/database/migrations/sqlite/1721035468806-RemoveAnnouncedAvailability.ts b/services/device/src/database/migrations/sqlite/1721035468806-RemoveAnnouncedAvailability.ts new file mode 100644 index 00000000..b3f62ba9 --- /dev/null +++ b/services/device/src/database/migrations/sqlite/1721035468806-RemoveAnnouncedAvailability.ts @@ -0,0 +1,24 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class RemoveAnnouncedAvailability1721035468806 implements MigrationInterface { + name = 'RemoveAnnouncedAvailability1721035468806' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP INDEX "IDX_41fd67cfa14290cc8dc11f12df"`); + await queryRunner.query(`CREATE TABLE "temporary_Device" ("uuid" varchar PRIMARY KEY NOT NULL, "name" varchar NOT NULL, "description" varchar, "type" varchar NOT NULL, "isPublic" boolean NOT NULL DEFAULT (0), "deletedAt" datetime, "connected" boolean, "availabilityRules" text, "experiment" varchar, "token" varchar, "services" text, "devices" text, "instantiateUrl" varchar, "codeUrl" varchar, "instanceOfUuid" varchar, CONSTRAINT "FK_2f318c27d7d5c9441431f910fd4" FOREIGN KEY ("instanceOfUuid") REFERENCES "Device" ("uuid") ON DELETE NO ACTION ON UPDATE NO ACTION)`); + await queryRunner.query(`INSERT INTO "temporary_Device"("uuid", "name", "description", "type", "isPublic", "deletedAt", "connected", "availabilityRules", "experiment", "token", "services", "devices", "instantiateUrl", "codeUrl", "instanceOfUuid") SELECT "uuid", "name", "description", "type", "isPublic", "deletedAt", "connected", "availabilityRules", "experiment", "token", "services", "devices", "instantiateUrl", "codeUrl", "instanceOfUuid" FROM "Device"`); + await queryRunner.query(`DROP TABLE "Device"`); + await queryRunner.query(`ALTER TABLE "temporary_Device" RENAME TO "Device"`); + await queryRunner.query(`CREATE INDEX "IDX_41fd67cfa14290cc8dc11f12df" ON "Device" ("type") `); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP INDEX "IDX_41fd67cfa14290cc8dc11f12df"`); + await queryRunner.query(`ALTER TABLE "Device" RENAME TO "temporary_Device"`); + await queryRunner.query(`CREATE TABLE "Device" ("uuid" varchar PRIMARY KEY NOT NULL, "name" varchar NOT NULL, "description" varchar, "type" varchar NOT NULL, "isPublic" boolean NOT NULL DEFAULT (0), "deletedAt" datetime, "connected" boolean, "announcedAvailability" text, "availabilityRules" text, "experiment" varchar, "token" varchar, "services" text, "devices" text, "instantiateUrl" varchar, "codeUrl" varchar, "instanceOfUuid" varchar, CONSTRAINT "FK_2f318c27d7d5c9441431f910fd4" FOREIGN KEY ("instanceOfUuid") REFERENCES "Device" ("uuid") ON DELETE NO ACTION ON UPDATE NO ACTION)`); + await queryRunner.query(`INSERT INTO "Device"("uuid", "name", "description", "type", "isPublic", "deletedAt", "connected", "availabilityRules", "experiment", "token", "services", "devices", "instantiateUrl", "codeUrl", "instanceOfUuid") SELECT "uuid", "name", "description", "type", "isPublic", "deletedAt", "connected", "availabilityRules", "experiment", "token", "services", "devices", "instantiateUrl", "codeUrl", "instanceOfUuid" FROM "temporary_Device"`); + await queryRunner.query(`DROP TABLE "temporary_Device"`); + await queryRunner.query(`CREATE INDEX "IDX_41fd67cfa14290cc8dc11f12df" ON "Device" ("type") `); + } + +} diff --git a/services/device/src/database/migrations/sqlite/index.ts b/services/device/src/database/migrations/sqlite/index.ts index 138bad95..e9e85bbc 100644 --- a/services/device/src/database/migrations/sqlite/index.ts +++ b/services/device/src/database/migrations/sqlite/index.ts @@ -1,5 +1,9 @@ import { Setup1692095173359 } from './1692095173359-Setup.js'; import { RemoveOwnerProperty1701781240608 } from './1701781240608-RemoveOwnerProperty.js'; +import { RemoveAnnouncedAvailability1721035468806 } from './1721035468806-RemoveAnnouncedAvailability.js'; -export const Migrations = [Setup1692095173359, RemoveOwnerProperty1701781240608]; -// typeorm-ts-node-commonjs migration:generate -d src/database/dataSource.ts src/database/migrations/sqlite/Setup +export const Migrations = [ + Setup1692095173359, + RemoveOwnerProperty1701781240608, + RemoveAnnouncedAvailability1721035468806, +]; diff --git a/services/device/src/database/model.ts b/services/device/src/database/model.ts index 4dbc1bb6..265df0e6 100644 --- a/services/device/src/database/model.ts +++ b/services/device/src/database/model.ts @@ -68,9 +68,6 @@ export class ConcreteDeviceModel extends DeviceOverviewModel { @Column() connected!: boolean; - @Column('simple-json') - announcedAvailability!: Required[]; - @Column('simple-json') availabilityRules!: AvailabilityRule[]; diff --git a/services/device/src/database/repositories/device/concreteDevice.ts b/services/device/src/database/repositories/device/concreteDevice.ts index 74622b2a..893d316c 100644 --- a/services/device/src/database/repositories/device/concreteDevice.ts +++ b/services/device/src/database/repositories/device/concreteDevice.ts @@ -2,6 +2,8 @@ import { AbstractRepository } from '@crosslab/service-common'; import { EntityManager } from 'typeorm'; import { ConcreteDevice, ConcreteDeviceUpdate } from '../../../generated/types.js'; +import { WEEK } from '../../../globals.js'; +import { calculateAvailability } from '../../../methods/availability.js'; import { ConcreteDeviceModel } from '../../model.js'; import { DeviceOverviewRepository } from './deviceOverview.js'; @@ -30,7 +32,6 @@ export class ConcreteDeviceRepository extends AbstractRepository< async create(data?: ConcreteDevice<'request'>): Promise { const model = await super.create(data); model.type = 'device'; - model.announcedAvailability = []; model.availabilityRules = []; model.connected = false; model.services = []; @@ -54,7 +55,11 @@ export class ConcreteDeviceRepository extends AbstractRepository< return { ...(await this.dependencies.deviceOverview.format(model)), type: 'device', - announcedAvailability: model.announcedAvailability, + announcedAvailability: calculateAvailability( + model.availabilityRules, + Date.now(), + Date.now() + WEEK, + ), connected: model.connected, experiment: model.experiment ?? undefined, services: model.services, diff --git a/services/device/src/globals.ts b/services/device/src/globals.ts index a27e1d37..f4032f31 100644 --- a/services/device/src/globals.ts +++ b/services/device/src/globals.ts @@ -1,2 +1,6 @@ export const timeoutMap: Map = new Map(); -export const WEEK = 1000 * 60 * 60 * 24 * 7; + +/** + * Time of a week in milliseconds + */ +export const WEEK = 604800000; diff --git a/services/device/src/operations/devices/device/availability/post.ts b/services/device/src/operations/devices/device/availability/post.ts index d1506f72..8017297f 100644 --- a/services/device/src/operations/devices/device/availability/post.ts +++ b/services/device/src/operations/devices/device/availability/post.ts @@ -40,11 +40,6 @@ export const postDevicesByDeviceIdAvailability: postDevicesByDeviceIdAvailabilit const start = Date.now(); const end = start + WEEK; - deviceModel.announcedAvailability = calculateAvailability( - deviceModel.availabilityRules, - start, - end, - ); await repositories.device.save(deviceModel); sendChangedCallback(deviceModel); @@ -53,6 +48,6 @@ export const postDevicesByDeviceIdAvailability: postDevicesByDeviceIdAvailabilit return { status: 200, - body: deviceModel.announcedAvailability, + body: calculateAvailability(deviceModel.availabilityRules, start, end), }; }; From 9b9582409d5954cd275e1ddf8bf7b50afd8a114d Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Wed, 17 Jul 2024 09:16:21 +0000 Subject: [PATCH 60/79] add env for integration-test --- integration-test/.env | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 integration-test/.env diff --git a/integration-test/.env b/integration-test/.env new file mode 100644 index 00000000..e17bb62a --- /dev/null +++ b/integration-test/.env @@ -0,0 +1,36 @@ +# The port on which the gateway will be exposed +API_PORT=80 +# The port on which the LTI Service will be exposed +LTI_PORT=8081 + +# The domain under which the Crosslab-API will be available +API_BASE_URL=http://localhost:$API_PORT +LTI_BASE_URL=http://localhost:$LTI_PORT + +# The crosslab instance will have a default admin user, with the following password: +ADMIN_PASSWORD=admin + +# The root password for the MySQL database +# Choose a strong password. E.g. using `pwgen 64` +DB_ROOT_PASSWORD=db_test + +# All request to the internal Authorization API use the following key for authentication +# Choose a strong password. E.g. using `pwgen 64` +AUTHORIZATION_PSK=auth_test + +# The Authorization Server and the Authorization Server will share a secret for signing/checking JWTs +# Choose a strong password. E.g. using `pwgen 64` +JWT_SECRET=jwt_test + +# The LTI Service signs its Cookies with a secret +# Choose a strong password. E.g. using `pwgen 64` +COOKIE_SECRET=cookie_test + +# The Logging level for the application +# Options are: fatal, error, warn, info, debug, trace +# Default is warn +LOGGING_LEVEL=info + +# The default password for rabbitmq +# Choose a strong password. E.g. using `pwgen 64` +RABBITMQ_PASSWORD=rabbitmq \ No newline at end of file From cea64884147c36ebc74e8e887b5f4c96f0ae3722 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 13 Aug 2024 08:03:10 +0000 Subject: [PATCH 61/79] Fixed URL comparison --- services/booking/src/booking-backend/src/internal.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 4c3f367e..3aed2bb4 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -15,6 +15,7 @@ import * as mysql from 'mysql2/promise'; import { config } from './config.js'; import { DeviceBookingRequest } from './messageDefinition.js'; +import { logger } from '@crosslab/service-common'; dayjs.extend(isSameOrBefore); dayjs.extend(isSameOrAfter); @@ -497,7 +498,7 @@ export async function reservateDevice(r: DeviceBookingRequest) { if ( data.Type === ReservationRequest.New && data.Successful && - data.Device?.toString() === possibleDevices[i] && + data.Device?.toString() === new URL(possibleDevices[i]).toString() && data.Start?.isSame(r.Start) && data.End?.isSame(r.End) ) { From c154c169e33b6471cf21e53a41f1ea9d41b2f438 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 3 Sep 2024 07:51:30 +0000 Subject: [PATCH 62/79] Fixed call for device callback --- services/booking/src/booking-backend/src/internal.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 3aed2bb4..1697cfcd 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -205,7 +205,10 @@ async function addDeviceCallback( [id, callbackType.DeviceUpdate, targetbooking, data], ); - await clients.device.updateDevice(device.toString(), undefined, { + // TODO: For now get the type first since it is required. Remove this once the type is no longer needed + let deviceData = await clients.device.getDevice(device.toString()); + + await clients.device.updateDevice(device.toString(), {type: deviceData.type} , { changedUrl: config.OwnURL + '/booking_callback/' + id, }); } catch (e) { From e5b8970af8eafdd15a0b2eb05032e1b40a34057b Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 3 Sep 2024 08:16:42 +0000 Subject: [PATCH 63/79] Fixed id parsing --- .../src/booking-backend/src/operations/index.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/services/booking/src/booking-backend/src/operations/index.ts b/services/booking/src/booking-backend/src/operations/index.ts index 0ac22385..431f3878 100644 --- a/services/booking/src/booking-backend/src/operations/index.ts +++ b/services/booking/src/booking-backend/src/operations/index.ts @@ -171,26 +171,25 @@ export const postBookingCallbackByID: postBookingCallbackByIDSignature = async ( request, parameters, ) => { - let parameterID: bigint = BigInt(parameters.ID); - - await request.authorization.check_authorization_or_fail( - 'edit', - `booking:${parameterID}`, - ); - let db = await mysql.createConnection(config.BookingDSN); await db.connect(); try { let [rows, fields]: [any, any] = await db.execute( 'SELECT `type`, `targetbooking`, `parameters` FROM callback WHERE `id`=?', - [parameterID], + [parameters.ID], ); if (rows.length === 0) { return { status: 404, }; } + + await request.authorization.check_authorization_or_fail( + 'edit', + `booking:${rows[0].targetbooking}`, + ); + await handleCallback( rows[0].type, rows[0].targetbooking, From 94ee359acd97b0731f45a72de449f5e242ea6bb6 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 3 Sep 2024 10:21:07 +0200 Subject: [PATCH 64/79] Removed unneeded permission check --- .../booking/src/booking-backend/src/operations/index.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/services/booking/src/booking-backend/src/operations/index.ts b/services/booking/src/booking-backend/src/operations/index.ts index 431f3878..9430f040 100644 --- a/services/booking/src/booking-backend/src/operations/index.ts +++ b/services/booking/src/booking-backend/src/operations/index.ts @@ -168,7 +168,7 @@ export const deleteBookingByIDLock: deleteBookingByIDLockSignature = async ( }; export const postBookingCallbackByID: postBookingCallbackByIDSignature = async ( - request, + _, parameters, ) => { let db = await mysql.createConnection(config.BookingDSN); @@ -185,11 +185,6 @@ export const postBookingCallbackByID: postBookingCallbackByIDSignature = async ( }; } - await request.authorization.check_authorization_or_fail( - 'edit', - `booking:${rows[0].targetbooking}`, - ); - await handleCallback( rows[0].type, rows[0].targetbooking, From 4be55c3293c906842aa6777eb9176d12acd0009d Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Tue, 3 Sep 2024 08:53:01 +0000 Subject: [PATCH 65/79] Ignore callbacks for devices not (longer) booked --- .../src/booking-backend/src/internal.ts | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 1697cfcd..50508500 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -67,12 +67,18 @@ export async function handleCallback( if (rows.length == 0) { throw Error( 'Booking, Position (' + - targetBooking + - ',' + - parameters.Position + - ') not known', + targetBooking + + ',' + + parameters.Position + + ') not known', ); } + + // Check if device is actually booked -- if not, just jump out + if (rows[0].bookeddevice == null && rows[0].remotereference == null) { + return; + } + let bookedDeviceId: bigint = BigInt(rows[0].id); let originalDevice: string = rows[0].originaldevice; @@ -208,7 +214,7 @@ async function addDeviceCallback( // TODO: For now get the type first since it is required. Remove this once the type is no longer needed let deviceData = await clients.device.getDevice(device.toString()); - await clients.device.updateDevice(device.toString(), {type: deviceData.type} , { + await clients.device.updateDevice(device.toString(), { type: deviceData.type }, { changedUrl: config.OwnURL + '/booking_callback/' + id, }); } catch (e) { @@ -436,7 +442,7 @@ export async function reservateDevice(r: DeviceBookingRequest) { } catch (e) { console.log( 'Error while getting schedule in reservateDevice (using next device): ' + - (e as Error).toString(), + (e as Error).toString(), ); continue; } @@ -811,7 +817,7 @@ export async function DeleteBooking( // Don't jump out here, since some devices might already be freed console.log( 'Got error while cancelling booking, devices might not be freed: ' + - (err as Error).toString(), + (err as Error).toString(), ); } finally { await channel.close(); From f386331af722ba944b9ef1529645c3eb1828aec9 Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Tue, 3 Sep 2024 11:01:43 +0000 Subject: [PATCH 66/79] fix integration-test --- integration-test/src/fixtures/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-test/src/fixtures/client.ts b/integration-test/src/fixtures/client.ts index 4940b8eb..ad027143 100644 --- a/integration-test/src/fixtures/client.ts +++ b/integration-test/src/fixtures/client.ts @@ -6,7 +6,7 @@ export interface ClientContext { export const mochaHooks = { async beforeAll(this: ClientContext & Mocha.Context) { - this.client = new APIClient(process.env['HOST'] ?? 'http://localhost'); + this.client = new APIClient(process.env['HOST'] ?? 'http://localhost:80'); const username = process.env['USERNAME']; const password = process.env['PASSWORD']; if (username && password) { From cf42afdfdc27bef6ca2c406bd8fb34e60cce976b Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Wed, 4 Sep 2024 08:21:45 +0000 Subject: [PATCH 67/79] add availability to devices inside group (integration-test) --- integration-test/src/helper/experimentTest.ts | 1 + .../devices/websocket/handling/disconnect.ts | 25 ++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/integration-test/src/helper/experimentTest.ts b/integration-test/src/helper/experimentTest.ts index b4ba20ef..2ae656fb 100644 --- a/integration-test/src/helper/experimentTest.ts +++ b/integration-test/src/helper/experimentTest.ts @@ -87,6 +87,7 @@ export class ExperimentTest extends TypedEmitter { name: 'Internal Test Device', isPublic: true, }); + await client.addDeviceAvailabilityRules(device.url, [{ available: true }]); deviceMeta.devices.push(device); } const apiDevice = await client.createDevice({ diff --git a/services/device/src/operations/devices/websocket/handling/disconnect.ts b/services/device/src/operations/devices/websocket/handling/disconnect.ts index 8e320e47..0c6c94af 100644 --- a/services/device/src/operations/devices/websocket/handling/disconnect.ts +++ b/services/device/src/operations/devices/websocket/handling/disconnect.ts @@ -1,6 +1,11 @@ +import { logger } from '@crosslab/service-common'; + import { repositories } from '../../../../database/dataSource.js'; import { signalingQueueManager } from '../../../../methods/signaling/signalingQueueManager.js'; -import { deviceUrlFromId } from '../../../../methods/urlFromId.js'; +import { + deviceUrlFromId, + peerconnectionUrlFromId, +} from '../../../../methods/urlFromId.js'; import { sendStatusChangedCallback } from '../../../callbacks/index.js'; export const disconnectTimeouts = new Map(); @@ -19,11 +24,19 @@ export function addDisconnectTimeout(deviceId: string) { for (const peerconnection of peerconnections) { peerconnection.status = 'closed'; - try { - signalingQueueManager.closeSignalingQueues(peerconnection.uuid); - } catch { - // empty - } + signalingQueueManager.closeSignalingQueues(peerconnection.uuid).catch(error => + logger.log( + 'error', + `Something went wrong while trying to close the signaling queues of peerconnection "${peerconnectionUrlFromId( + peerconnection.uuid, + )}"`, + { + data: { + error, + }, + }, + ), + ); await repositories.peerconnection.save(peerconnection); sendStatusChangedCallback(peerconnection); } From f4e86c82d83cd6952e0ea39cc2e27b381238fc3e Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 4 Sep 2024 11:35:08 +0000 Subject: [PATCH 68/79] Fixed patch booking with empty device list Added test case for this bug --- .../booking-frontend/src/operations/index.ts | 166 +++++++++--------- .../src/operations/index_test.ts | 101 ++++++++--- 2 files changed, 160 insertions(+), 107 deletions(-) diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index 66fe1870..a02f6b9c 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -273,7 +273,7 @@ export const patchBookingByID: patchBookingByIDSignature = async ( } // if both are set, the request is invalid - if (typeof body.Callback === 'string' && typeof body.Devices !== 'undefined') { + if (typeof body.Callback === 'string' && typeof body.Devices !== 'undefined' && (body.Devices as Device[]).length !== 0) { return { status: 400, body: 'can not add callback and devices in one request', @@ -287,97 +287,103 @@ export const patchBookingByID: patchBookingByIDSignature = async ( } else if (typeof body.Devices !== 'undefined') { let Devices: Device[] = body.Devices as Device[]; - // Set locked to default if not given - if (body.Locked == undefined) { - body.Locked = false; - } + if (Devices.length !== 0) { - switch (body.Locked) { - case true: - if ( - rows[0].status !== 'active' && - rows[0].status !== 'active-rejected' && - rows[0].status !== 'active-pending' - ) { - return { - status: 423, - }; - } - await db.execute('UPDATE booking SET `status`=? WHERE id=?', [ - 'active-pending', - requestID, - ]); - break; - case false: - if (rows[0].status !== 'booked' && rows[0].status !== 'pending') { - return { - status: 423, - }; - } - await db.execute('UPDATE booking SET `status`=? WHERE id=?', [ - 'pending', - requestID, - ]); - break; - default: - throw Error('BUG: unknown status body.Locked: ' + body.Locked); - break; - } + // Set locked to default if not given + if (body.Locked == undefined) { + body.Locked = false; + } - let [deviceRows, deviceFields]: [any, any] = await db.execute( - 'SELECT MAX(`originalposition`) as max FROM bookeddevices WHERE `booking`=?', - [requestID], - ); + switch (body.Locked) { + case true: + if ( + rows[0].status !== 'active' && + rows[0].status !== 'active-rejected' && + rows[0].status !== 'active-pending' + ) { + return { + status: 423, + }; + } + await db.execute('UPDATE booking SET `status`=? WHERE id=?', [ + 'active-pending', + requestID, + ]); + break; + case false: + if (rows[0].status !== 'booked' && rows[0].status !== 'pending') { + return { + status: 423, + }; + } + await db.execute('UPDATE booking SET `status`=? WHERE id=?', [ + 'pending', + requestID, + ]); + break; + default: + throw Error('BUG: unknown status body.Locked: ' + body.Locked); + break; + } - let toadd: number = 0; - if (deviceRows.length != 0) { - toadd = deviceRows[0].max + 1; - } + let [deviceRows, deviceFields]: [any, any] = await db.execute( + 'SELECT MAX(`originalposition`) as max FROM bookeddevices WHERE `booking`=?', + [requestID], + ); - let start: string = rows[0].start; - let end: string = rows[0].end; + let toadd: number = 0; + if (deviceRows.length != 0) { + toadd = deviceRows[0].max + 1; + } - let connection = await amqplib.connect(config.AmqpUrl); - let channel = await connection.createChannel(); + let start: string = rows[0].start; + let end: string = rows[0].end; - await channel.assertQueue('device-booking', { - durable: true, - }); + let connection = await amqplib.connect(config.AmqpUrl); + let channel = await connection.createChannel(); - try { - for (let i = 0; i < Devices.length; i++) { - await db.execute( - 'INSERT INTO bookeddevices (`booking`, `originaldevice`, `originalposition`) VALUES (?,?,?)', - [requestID, Devices[i].ID, i + toadd], - ); - } - await db.commit(); - db.beginTransaction(); + await channel.assertQueue('device-booking', { + durable: true, + }); - // Send devices to backend - for (let i = 0; i < Devices.length; i++) { - let s = JSON.stringify( - new DeviceBookingRequest( - requestID, - new URL(Devices[i].ID), - i + toadd, - dayjs(start), - dayjs(end), - ), - ); - if ( - !channel.sendToQueue('device-booking', Buffer.from(s), { persistent: true }) - ) { - throw new Error('amqp queue full'); + try { + for (let i = 0; i < Devices.length; i++) { + await db.execute( + 'INSERT INTO bookeddevices (`booking`, `originaldevice`, `originalposition`) VALUES (?,?,?)', + [requestID, Devices[i].ID, i + toadd], + ); + } + await db.commit(); + db.beginTransaction(); + + // Send devices to backend + for (let i = 0; i < Devices.length; i++) { + let s = JSON.stringify( + new DeviceBookingRequest( + requestID, + new URL(Devices[i].ID), + i + toadd, + dayjs(start), + dayjs(end), + ), + ); + if ( + !channel.sendToQueue('device-booking', Buffer.from(s), { persistent: true }) + ) { + throw new Error('amqp queue full'); + } } + } finally { + await channel.close(); + await await sleep(250); + await connection.close(); } - } finally { - await channel.close(); - await await sleep(250); - await connection.close(); } } else { - throw Error('Unknown request type'); + return { + status: 500, + body: "Unknown request type or wrong/missing parameter", + }; } success = true; diff --git a/services/booking/src/booking-frontend/src/operations/index_test.ts b/services/booking/src/booking-frontend/src/operations/index_test.ts index da05cc94..ddb3c970 100644 --- a/services/booking/src/booking-frontend/src/operations/index_test.ts +++ b/services/booking/src/booking-frontend/src/operations/index_test.ts @@ -60,9 +60,9 @@ mocha.describe('operations.ts', function () { startFakeServer(); }); - mocha.before(function(){ + mocha.before(function () { logging.init(); - } ) + }) mocha.after(function () { stopFakeServer(); @@ -88,8 +88,8 @@ mocha.describe('operations.ts', function () { }); // Drain queues - while (await channel.get('device-booking', { noAck: true })) {} - while (await channel.get('device-freeing', { noAck: true })) {} + while (await channel.get('device-booking', { noAck: true })) { } + while (await channel.get('device-freeing', { noAck: true })) { } }); mocha.afterEach(async function () { @@ -155,9 +155,9 @@ mocha.describe('operations.ts', function () { if (Number(rows[0].n) != Number(before)) { throw new Error( 'authorization failed but number of bookings was changed from ' + - before + - ' to ' + - rows[0].n, + before + + ' to ' + + rows[0].n, ); } if ((req as any).related.length != 0) { @@ -297,13 +297,13 @@ mocha.describe('operations.ts', function () { if (TestAMQPresultsBooking.size != 1) { throw new Error( 'wrong number of device reservation messages found ' + - MapToString(TestAMQPresultsBooking), + MapToString(TestAMQPresultsBooking), ); } if ( !TestAMQPresultsBooking.has( bookingID.toString() + - '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', ) ) { throw new Error( @@ -313,12 +313,12 @@ mocha.describe('operations.ts', function () { if ( TestAMQPresultsBooking.get( bookingID.toString() + - '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', ) !== 1 ) { throw new Error( 'wrong device reservation message number found' + - MapToString(TestAMQPresultsBooking), + MapToString(TestAMQPresultsBooking), ); } } finally { @@ -450,13 +450,13 @@ mocha.describe('operations.ts', function () { if (TestAMQPresultsBooking.size != 1) { throw new Error( 'wrong number of device reservation messages found ' + - MapToString(TestAMQPresultsBooking), + MapToString(TestAMQPresultsBooking), ); } if ( !TestAMQPresultsBooking.has( bookingID.toString() + - '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', ) ) { throw new Error( @@ -466,12 +466,12 @@ mocha.describe('operations.ts', function () { if ( TestAMQPresultsBooking.get( bookingID.toString() + - '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', ) !== 1 ) { throw new Error( 'wrong device reservation message number found' + - MapToString(TestAMQPresultsBooking), + MapToString(TestAMQPresultsBooking), ); } } finally { @@ -619,13 +619,13 @@ mocha.describe('operations.ts', function () { if (TestAMQPresultsBooking.size != 2) { throw new Error( 'wrong number of device reservation messages found ' + - MapToString(TestAMQPresultsBooking), + MapToString(TestAMQPresultsBooking), ); } if ( !TestAMQPresultsBooking.has( bookingID.toString() + - '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', ) ) { throw new Error( @@ -635,18 +635,18 @@ mocha.describe('operations.ts', function () { if ( TestAMQPresultsBooking.get( bookingID.toString() + - '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', + '-0-http://localhost:10801/devices/10000000-0000-0000-0000-000000000000', ) !== 1 ) { throw new Error( 'wrong device reservation message number found' + - MapToString(TestAMQPresultsBooking), + MapToString(TestAMQPresultsBooking), ); } if ( !TestAMQPresultsBooking.has( bookingID.toString() + - '-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010', + '-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010', ) ) { throw new Error( @@ -656,12 +656,12 @@ mocha.describe('operations.ts', function () { if ( TestAMQPresultsBooking.get( bookingID.toString() + - '-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010', + '-1-http://localhost:10801/devices/00000000-0000-0000-0000-000000000010', ) !== 1 ) { throw new Error( 'wrong device reservation message number found' + - MapToString(TestAMQPresultsBooking), + MapToString(TestAMQPresultsBooking), ); } } finally { @@ -709,7 +709,7 @@ mocha.describe('operations.ts', function () { throw new Error('booking is locked'); } - if (b.body.Booking.ID != '1') { + if (b.body.Booking.ID != 'http://localhost:10801/booking/1') { throw new Error('bad id' + b.body.Booking.ID); } @@ -768,7 +768,7 @@ mocha.describe('operations.ts', function () { throw new Error('booking is locked'); } - if (b.body.Booking.ID != '1') { + if (b.body.Booking.ID != 'http://localhost:10801/booking/1') { throw new Error('bad id' + b.body.Booking.ID); } @@ -827,7 +827,7 @@ mocha.describe('operations.ts', function () { throw new Error('booking is locked'); } - if (b.body.Booking.ID != '2') { + if (b.body.Booking.ID != 'http://localhost:10801/booking/2') { throw new Error('bad id' + b.body.Booking.ID); } @@ -893,7 +893,7 @@ mocha.describe('operations.ts', function () { throw new Error('booking is locked'); } - if (b.body.Booking.ID != '3') { + if (b.body.Booking.ID != 'http://localhost:10801/booking/3') { throw new Error('bad id' + b.body.Booking.ID); } @@ -959,7 +959,7 @@ mocha.describe('operations.ts', function () { throw new Error('booking is not locked'); } - if (b.body.Booking.ID != '1') { + if (b.body.Booking.ID != 'http://localhost:10801/booking/1') { throw new Error('bad id' + b.body.Booking.ID); } @@ -1435,6 +1435,53 @@ mocha.describe('operations.ts', function () { } }); + mocha.it('patchBookingByID empty device list does not change anything', async function () { + let db = await mysql.createConnection(getSQLDNS()); + await db.connect(); + await StartAMQPTestBooking(); + try { + await db.execute('UPDATE booking SET `status`=? WHERE `id`=?', [ + 'active', + BigInt(1), + ]); + + let req = getFakeRequest({ user: 'unittest.user', isAuthorized: true }); + + let res = await patchBookingByID( + req, + { ID: '1' }, + { + Devices: [], + Locked: true, + }, + ); + await sleep(250); + + if (res.status != 200) { + throw new Error('bad status code ' + res.status); + } + + if (TestAMQPresultsBooking.size != 0) { + throw new Error('devices were requested ' + MapToString(TestAMQPresultsBooking)); + } + + let [rows, _]: [any, any] = await db.execute('SELECT `status` FROM booking WHERE `id`=?', [ + BigInt(1), + ]); + if (rows.length !== 1) { + throw new Error('can not find booking'); + } + + if (rows[0].status != 'active') { + throw new Error('wrong status ' + rows[0].status); + } + } finally { + db.end(); + await StopAMQPTestBooking(); + ResetAMQPBookingDeviceCount(); + } + }); + mocha.it('patchBookingByID booking not available callback', async function () { let db = await mysql.createConnection(getSQLDNS()); await db.connect(); From 2fcee2dcc85309589cad496d1718e9eb4c7c2962 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 4 Sep 2024 14:02:50 +0000 Subject: [PATCH 69/79] Added hack to add port to localhost for integration-test --- .../booking-backend/src/operations/index.ts | 5 +- .../booking-frontend/src/operations/index.ts | 3 +- .../src/clients/device/basicValidation.cjs | 163686 +-------------- .../src/clients/device/basicValidation.d.cts | 1109 +- .../src/common/src/clients/device/client.ts | 2749 +- .../src/clients/device/requestValidation.ts | 1623 +- .../common/src/clients/device/signatures.ts | 1309 +- .../src/common/src/clients/device/types.ts | 7340 +- services/booking/src/common/src/hacks.ts | 24 + .../schedule-service/src/operations/index.ts | 3 +- 10 files changed, 6877 insertions(+), 170974 deletions(-) create mode 100644 services/booking/src/common/src/hacks.ts diff --git a/services/booking/src/booking-backend/src/operations/index.ts b/services/booking/src/booking-backend/src/operations/index.ts index 9430f040..39e8aaf5 100644 --- a/services/booking/src/booking-backend/src/operations/index.ts +++ b/services/booking/src/booking-backend/src/operations/index.ts @@ -1,4 +1,5 @@ import * as mysql from 'mysql2/promise'; +import { hackURLWithPort } from '@crosslab/booking-service-common'; import { config } from '../config.js'; import { @@ -80,8 +81,8 @@ export const putBookingByIDLock: putBookingByIDLockSignature = async ( ); for (let i = 0; i < deviceRows.length; i++) { deviceList.push({ - Requested: deviceRows[i].originaldevice, - Selected: deviceRows[i].bookeddevice, + Requested: hackURLWithPort(deviceRows[i].originaldevice), + Selected: hackURLWithPort(deviceRows[i].bookeddevice), }); } diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index a02f6b9c..f565ddaa 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -4,6 +4,7 @@ import { logger } from '@crosslab/service-common/logging'; import * as amqplib from 'amqplib'; import dayjs from 'dayjs'; import * as mysql from 'mysql2/promise'; +import { hackURLWithPort } from '@crosslab/booking-service-common'; import { config } from '../config.js'; import { @@ -182,7 +183,7 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter [requestID], ); for (let i = 0; i < rows.length; i++) { - body.Booking.Devices.push(rows[i].originaldevice); + body.Booking.Devices.push(hackURLWithPort(rows[i].originaldevice)); } return { diff --git a/services/booking/src/common/src/clients/device/basicValidation.cjs b/services/booking/src/common/src/clients/device/basicValidation.cjs index c1a37652..5ee086d4 100644 --- a/services/booking/src/common/src/clients/device/basicValidation.cjs +++ b/services/booking/src/common/src/clients/device/basicValidation.cjs @@ -5,163688 +5,4 @@ * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, * and run openapi-codegeneration to regenerate this file. */ -'use strict'; -exports.validateAuthenticationMessage = validate21; -const schema6 = { - title: 'Authentication Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'authenticate' }, - token: { type: 'string' }, - authenticated: { type: 'boolean' }, - }, - required: ['messageType'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'AuthenticationMessage', - 'x-location': '#/components/schemas/authentication_message', - 'x-schema-type': 'all', -}; -function validate21( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate21.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema6.allOf[0].required, - parentSchema: schema6.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate21.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema6.allOf[0].properties.messageType.type, - parentSchema: schema6.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate21.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema6.allOf[0].type, - parentSchema: schema6.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.messageType === undefined && (missing1 = 'messageType')) { - validate21.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema6.allOf[1].required, - parentSchema: schema6.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('authenticate' !== data1) { - validate21.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'authenticate' }, - message: 'must be equal to constant', - schema: 'authenticate', - parentSchema: schema6.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.token !== undefined) { - let data2 = data.token; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate21.errors = [ - { - instancePath: instancePath + '/token', - schemaPath: '#/allOf/1/properties/token/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema6.allOf[1].properties.token.type, - parentSchema: schema6.allOf[1].properties.token, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.authenticated !== undefined) { - let data3 = data.authenticated; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - validate21.errors = [ - { - instancePath: instancePath + '/authenticated', - schemaPath: '#/allOf/1/properties/authenticated/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema6.allOf[1].properties.authenticated.type, - parentSchema: schema6.allOf[1].properties.authenticated, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate21.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema6.allOf[1].type, - parentSchema: schema6.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate21.errors = vErrors; - return errors === 0; -} -exports.validateConnectionStateChangedMessage = validate22; -const schema7 = { - title: 'Connection State Changed Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'connection-state-changed' }, - connectionUrl: { type: 'string', format: 'uri' }, - status: { - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['connectionUrl', 'status'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ConnectionStateChangedMessage', - 'x-location': '#/components/schemas/connection_state_changed_message', - 'x-schema-type': 'all', -}; -const formats0 = require('ajv-formats/dist/formats').fullFormats.uri; -function validate22( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate22.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema7.allOf[0].required, - parentSchema: schema7.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate22.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema7.allOf[0].properties.messageType.type, - parentSchema: schema7.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate22.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema7.allOf[0].type, - parentSchema: schema7.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || - (data.status === undefined && (missing1 = 'status')) - ) { - validate22.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema7.allOf[1].required, - parentSchema: schema7.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('connection-state-changed' !== data1) { - validate22.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'connection-state-changed' }, - message: 'must be equal to constant', - schema: 'connection-state-changed', - parentSchema: schema7.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.connectionUrl !== undefined) { - let data2 = data.connectionUrl; - const _errs8 = errors; - if (errors === _errs8) { - if (errors === _errs8) { - if (typeof data2 === 'string') { - if (!formats0(data2)) { - validate22.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema7.allOf[1].properties.connectionUrl, - data: data2, - }, - ]; - return false; - } - } else { - validate22.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema7.allOf[1].properties.connectionUrl.type, - parentSchema: schema7.allOf[1].properties.connectionUrl, - data: data2, - }, - ]; - return false; - } - } - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.status !== undefined) { - let data3 = data.status; - const _errs10 = errors; - if (typeof data3 !== 'string') { - validate22.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/1/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema7.allOf[1].properties.status.type, - parentSchema: schema7.allOf[1].properties.status, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'new' || - data3 === 'connecting' || - data3 === 'connected' || - data3 === 'disconnected' || - data3 === 'failed' || - data3 === 'closed' - ) - ) { - validate22.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/1/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema7.allOf[1].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema7.allOf[1].properties.status.enum, - parentSchema: schema7.allOf[1].properties.status, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate22.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema7.allOf[1].type, - parentSchema: schema7.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate22.errors = vErrors; - return errors === 0; -} -exports.validateUserReference = validate23; -const schema8 = { - title: 'User Reference', - type: 'object', - properties: { url: { type: 'string', description: 'URL of the user', format: 'uri' } }, - required: ['url'], - 'x-standalone': true, - 'x-name': 'UserReference', - 'x-location': '#/components/schemas/user_reference', - 'x-schema-type': 'all', -}; -function validate23( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.url === undefined && (missing0 = 'url')) { - validate23.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema8.required, - parentSchema: schema8, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate23.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema8.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate23.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema8.properties.url.type, - parentSchema: schema8.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - } - } - } else { - validate23.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema8.type, - parentSchema: schema8, - data, - }, - ]; - return false; - } - } - validate23.errors = vErrors; - return errors === 0; -} -exports.validateDeviceOverview = validate24; -const schema9 = { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'DeviceOverview', - 'x-location': '#/components/schemas/device_overview', - 'x-schema-type': 'all', -}; -function validate24( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate24.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema9.required, - parentSchema: schema9, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate24.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema9.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate24.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema9.properties.url.type, - parentSchema: schema9.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs3 = errors; - if (typeof data1 !== 'string') { - validate24.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema9.properties.name.type, - parentSchema: schema9.properties.name, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs5 = errors; - if (typeof data2 !== 'string') { - validate24.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema9.properties.description.type, - parentSchema: schema9.properties.description, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs5 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs7 = errors; - if (typeof data3 !== 'string') { - validate24.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema9.properties.type.type, - parentSchema: schema9.properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate24.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema9.properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema9.properties.type.enum, - parentSchema: schema9.properties.type, - data: data3, - }, - ]; - return false; - } - var valid0 = _errs7 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs9 = errors; - if (typeof data4 !== 'boolean') { - validate24.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema9.properties.isPublic.type, - parentSchema: schema9.properties.isPublic, - data: data4, - }, - ]; - return false; - } - var valid0 = _errs9 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs11 = errors; - if (errors === _errs11) { - if (Array.isArray(data5)) { - var valid1 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs13 = errors; - if (errors === _errs13) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - validate24.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: schema9.properties.viewer.items.required, - parentSchema: schema9.properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs15 = errors; - if (errors === _errs15) { - if (errors === _errs15) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate24.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema9.properties.viewer.items.properties - .url, - data: data7, - }, - ]; - return false; - } - } else { - validate24.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema9.properties.viewer.items.properties - .url.type, - parentSchema: - schema9.properties.viewer.items.properties - .url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate24.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema9.properties.viewer.items.type, - parentSchema: schema9.properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid1 = _errs13 === errors; - if (!valid1) { - break; - } - } - } else { - validate24.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema9.properties.viewer.type, - parentSchema: schema9.properties.viewer, - data: data5, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs17 = errors; - if (errors === _errs17) { - if (Array.isArray(data8)) { - var valid3 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs19 = errors; - if (errors === _errs19) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - validate24.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: schema9.properties.owner.items.required, - parentSchema: schema9.properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs21 = errors; - if (errors === _errs21) { - if (errors === _errs21) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate24.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema9.properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate24.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema9.properties.owner.items.properties - .url.type, - parentSchema: - schema9.properties.owner.items.properties - .url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate24.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema9.properties.owner.items.type, - parentSchema: schema9.properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid3 = _errs19 === errors; - if (!valid3) { - break; - } - } - } else { - validate24.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema9.properties.owner.type, - parentSchema: schema9.properties.owner, - data: data8, - }, - ]; - return false; - } - } - var valid0 = _errs17 === errors; - } else { - var valid0 = true; - } - } - } - } - } - } - } - } - } else { - validate24.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema9.type, - parentSchema: schema9, - data, - }, - ]; - return false; - } - } - validate24.errors = vErrors; - return errors === 0; -} -exports.validateServiceDescription = validate25; -const schema10 = { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { type: 'string', enum: ['consumer', 'producer', 'prosumer'] }, - }, - additionalProperties: true, - 'x-standalone': true, - 'x-name': 'ServiceDescription', - 'x-location': '#/components/schemas/service_description', - 'x-schema-type': 'all', -}; -function validate25( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.serviceType !== undefined) { - let data0 = data.serviceType; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate25.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema10.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } else { - validate25.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema10.properties.serviceType.type, - parentSchema: schema10.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs2 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.serviceId !== undefined) { - let data1 = data.serviceId; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate25.errors = [ - { - instancePath: instancePath + '/serviceId', - schemaPath: '#/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema10.properties.serviceId.type, - parentSchema: schema10.properties.serviceId, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs4 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.serviceDirection !== undefined) { - let data2 = data.serviceDirection; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate25.errors = [ - { - instancePath: instancePath + '/serviceDirection', - schemaPath: '#/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema10.properties.serviceDirection.type, - parentSchema: schema10.properties.serviceDirection, - data: data2, - }, - ]; - return false; - } - if (!(data2 === 'consumer' || data2 === 'producer' || data2 === 'prosumer')) { - validate25.errors = [ - { - instancePath: instancePath + '/serviceDirection', - schemaPath: '#/properties/serviceDirection/enum', - keyword: 'enum', - params: { allowedValues: schema10.properties.serviceDirection.enum }, - message: 'must be equal to one of the allowed values', - schema: schema10.properties.serviceDirection.enum, - parentSchema: schema10.properties.serviceDirection, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs6 === errors; - } else { - var valid0 = true; - } - } - } - } else { - validate25.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema10.type, - parentSchema: schema10, - data, - }, - ]; - return false; - } - } - validate25.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableCloudDevice = validate26; -const schema11 = { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'InstantiableCloudDevice', - 'x-location': '#/components/schemas/device_cloud_instantiable', - 'x-schema-type': 'all', -}; -function validate26( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate26.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema11.allOf[0].required, - parentSchema: schema11.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate26.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema11.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate26.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema11.allOf[0].properties.url.type, - parentSchema: schema11.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate26.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema11.allOf[0].properties.name.type, - parentSchema: schema11.allOf[0].properties.name, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate26.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema11.allOf[0].properties.description.type, - parentSchema: schema11.allOf[0].properties.description, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate26.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema11.allOf[0].properties.type.type, - parentSchema: schema11.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate26.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema11.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema11.allOf[0].properties.type.enum, - parentSchema: schema11.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs10 = errors; - if (typeof data4 !== 'boolean') { - validate26.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema11.allOf[0].properties.isPublic.type, - parentSchema: schema11.allOf[0].properties.isPublic, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data5)) { - var valid2 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - validate26.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema11.allOf[0].properties.viewer.items.required, - parentSchema: - schema11.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate26.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema11.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } else { - validate26.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema11.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema11.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate26.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema11.allOf[0].properties.viewer.items.type, - parentSchema: schema11.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid2 = _errs14 === errors; - if (!valid2) { - break; - } - } - } else { - validate26.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema11.allOf[0].properties.viewer.type, - parentSchema: schema11.allOf[0].properties.viewer, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs12 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data8)) { - var valid4 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - validate26.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema11.allOf[0].properties.owner.items.required, - parentSchema: - schema11.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate26.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema11.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate26.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema11.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema11.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate26.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema11.allOf[0].properties.owner.items.type, - parentSchema: - schema11.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid4 = _errs20 === errors; - if (!valid4) { - break; - } - } - } else { - validate26.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema11.allOf[0].properties.owner.type, - parentSchema: schema11.allOf[0].properties.owner, - data: data8, - }, - ]; - return false; - } - } - var valid1 = _errs18 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } - } else { - validate26.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema11.allOf[0].type, - parentSchema: schema11.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data11) { - validate26.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema11.allOf[1].properties.type, - data: data11, - }, - ]; - return false; - } - var valid6 = _errs26 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - validate26.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema11.allOf[1].properties.instantiateUrl, - data: data12, - }, - ]; - return false; - } - } else { - validate26.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema11.allOf[1].properties.instantiateUrl.type, - parentSchema: schema11.allOf[1].properties.instantiateUrl, - data: data12, - }, - ]; - return false; - } - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data13)) { - var valid7 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - validate26.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema11.allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }, - ]; - return false; - } - } else { - validate26.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema11.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema11.allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }, - ]; - return false; - } - } - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate26.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema11.allOf[1].properties.services.items.properties - .serviceId.type, - parentSchema: - schema11.allOf[1].properties.services.items.properties - .serviceId, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs38 = errors; - if (typeof data17 !== 'string') { - validate26.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema11.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema11.allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }, - ]; - return false; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - validate26.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema11.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema11.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema11.allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }, - ]; - return false; - } - var valid8 = _errs38 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate26.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema11.allOf[1].properties.services.items.type, - parentSchema: schema11.allOf[1].properties.services.items, - data: data14, - }, - ]; - return false; - } - } - var valid7 = _errs31 === errors; - if (!valid7) { - break; - } - } - } else { - validate26.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema11.allOf[1].properties.services.type, - parentSchema: schema11.allOf[1].properties.services, - data: data13, - }, - ]; - return false; - } - } - var valid6 = _errs29 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate26.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema11.allOf[1].type, - parentSchema: schema11.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs24 === errors; - } - validate26.errors = vErrors; - return errors === 0; -} -exports.validateTimeSlot = validate27; -const schema12 = { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - 'x-standalone': true, - 'x-name': 'TimeSlot', - 'x-location': '#/components/schemas/time_slot', - 'x-schema-type': 'all', -}; -const formats22 = require('ajv-formats/dist/formats').fullFormats['date-time']; -function validate27( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.start !== undefined) { - let data0 = data.start; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats22.validate(data0)) { - validate27.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema12.properties.start, - data: data0, - }, - ]; - return false; - } - } else { - validate27.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema12.properties.start.type, - parentSchema: schema12.properties.start, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.end !== undefined) { - let data1 = data.end; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate27.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema12.properties.end, - data: data1, - }, - ]; - return false; - } - } else { - validate27.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema12.properties.end.type, - parentSchema: schema12.properties.end, - data: data1, - }, - ]; - return false; - } - } - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - } - } else { - validate27.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema12.type, - parentSchema: schema12, - data, - }, - ]; - return false; - } - } - validate27.errors = vErrors; - return errors === 0; -} -exports.validateAvailability = validate28; -const schema13 = { - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - 'x-standalone': true, - 'x-name': 'Availability', - 'x-location': '#/components/schemas/availability', - 'x-schema-type': 'all', -}; -function validate28( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate28.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema13.items.properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate28.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema13.items.properties.start.type, - parentSchema: schema13.items.properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate28.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema13.items.properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate28.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema13.items.properties.end.type, - parentSchema: schema13.items.properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate28.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema13.items.type, - parentSchema: schema13.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate28.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema13.type, - parentSchema: schema13, - data, - }, - ]; - return false; - } - } - validate28.errors = vErrors; - return errors === 0; -} -exports.validateConcreteDevice = validate29; -const schema14 = { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ConcreteDevice', - 'x-location': '#/components/schemas/device_concrete', - 'x-schema-type': 'all', -}; -function validate29( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate29.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema14.allOf[0].required, - parentSchema: schema14.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate29.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema14.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate29.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema14.allOf[0].properties.url.type, - parentSchema: schema14.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate29.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema14.allOf[0].properties.name.type, - parentSchema: schema14.allOf[0].properties.name, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate29.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema14.allOf[0].properties.description.type, - parentSchema: schema14.allOf[0].properties.description, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate29.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema14.allOf[0].properties.type.type, - parentSchema: schema14.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate29.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema14.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema14.allOf[0].properties.type.enum, - parentSchema: schema14.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs10 = errors; - if (typeof data4 !== 'boolean') { - validate29.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema14.allOf[0].properties.isPublic.type, - parentSchema: schema14.allOf[0].properties.isPublic, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data5)) { - var valid2 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - validate29.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema14.allOf[0].properties.viewer.items.required, - parentSchema: - schema14.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate29.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema14.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } else { - validate29.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema14.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema14.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate29.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema14.allOf[0].properties.viewer.items.type, - parentSchema: schema14.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid2 = _errs14 === errors; - if (!valid2) { - break; - } - } - } else { - validate29.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema14.allOf[0].properties.viewer.type, - parentSchema: schema14.allOf[0].properties.viewer, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs12 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data8)) { - var valid4 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - validate29.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema14.allOf[0].properties.owner.items.required, - parentSchema: - schema14.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate29.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema14.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate29.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema14.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema14.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate29.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema14.allOf[0].properties.owner.items.type, - parentSchema: - schema14.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid4 = _errs20 === errors; - if (!valid4) { - break; - } - } - } else { - validate29.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema14.allOf[0].properties.owner.type, - parentSchema: schema14.allOf[0].properties.owner, - data: data8, - }, - ]; - return false; - } - } - var valid1 = _errs18 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } - } else { - validate29.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema14.allOf[0].type, - parentSchema: schema14.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs26 = errors; - if ('device' !== data11) { - validate29.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema14.allOf[1].properties.type, - data: data11, - }, - ]; - return false; - } - var valid6 = _errs26 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.connected !== undefined) { - let data12 = data.connected; - const _errs27 = errors; - if (typeof data12 !== 'boolean') { - validate29.errors = [ - { - instancePath: instancePath + '/connected', - schemaPath: '#/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema14.allOf[1].properties.connected.type, - parentSchema: schema14.allOf[1].properties.connected, - data: data12, - }, - ]; - return false; - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.announcedAvailability !== undefined) { - let data13 = data.announcedAvailability; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data13)) { - var valid7 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.start !== undefined) { - let data15 = data14.start; - const _errs33 = errors; - if (errors === _errs33) { - if (errors === _errs33) { - if (typeof data15 === 'string') { - if (!formats22.validate(data15)) { - validate29.errors = [ - { - instancePath: - instancePath + - '/announcedAvailability/' + - i2 + - '/start', - schemaPath: - '#/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema14.allOf[1].properties.announcedAvailability - .items.properties.start, - data: data15, - }, - ]; - return false; - } - } else { - validate29.errors = [ - { - instancePath: - instancePath + - '/announcedAvailability/' + - i2 + - '/start', - schemaPath: - '#/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema14.allOf[1].properties.announcedAvailability - .items.properties.start.type, - parentSchema: - schema14.allOf[1].properties.announcedAvailability - .items.properties.start, - data: data15, - }, - ]; - return false; - } - } - } - var valid8 = _errs33 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data14.end !== undefined) { - let data16 = data14.end; - const _errs35 = errors; - if (errors === _errs35) { - if (errors === _errs35) { - if (typeof data16 === 'string') { - if (!formats22.validate(data16)) { - validate29.errors = [ - { - instancePath: - instancePath + - '/announcedAvailability/' + - i2 + - '/end', - schemaPath: - '#/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema14.allOf[1].properties - .announcedAvailability.items.properties.end, - data: data16, - }, - ]; - return false; - } - } else { - validate29.errors = [ - { - instancePath: - instancePath + - '/announcedAvailability/' + - i2 + - '/end', - schemaPath: - '#/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema14.allOf[1].properties.announcedAvailability - .items.properties.end.type, - parentSchema: - schema14.allOf[1].properties.announcedAvailability - .items.properties.end, - data: data16, - }, - ]; - return false; - } - } - } - var valid8 = _errs35 === errors; - } else { - var valid8 = true; - } - } - } else { - validate29.errors = [ - { - instancePath: instancePath + '/announcedAvailability/' + i2, - schemaPath: - '#/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema14.allOf[1].properties.announcedAvailability.items - .type, - parentSchema: - schema14.allOf[1].properties.announcedAvailability.items, - data: data14, - }, - ]; - return false; - } - } - var valid7 = _errs31 === errors; - if (!valid7) { - break; - } - } - } else { - validate29.errors = [ - { - instancePath: instancePath + '/announcedAvailability', - schemaPath: '#/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema14.allOf[1].properties.announcedAvailability.type, - parentSchema: schema14.allOf[1].properties.announcedAvailability, - data: data13, - }, - ]; - return false; - } - } - var valid6 = _errs29 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.experiment !== undefined) { - let data17 = data.experiment; - const _errs37 = errors; - if (errors === _errs37) { - if (errors === _errs37) { - if (typeof data17 === 'string') { - if (!formats0(data17)) { - validate29.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema14.allOf[1].properties.experiment, - data: data17, - }, - ]; - return false; - } - } else { - validate29.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema14.allOf[1].properties.experiment.type, - parentSchema: schema14.allOf[1].properties.experiment, - data: data17, - }, - ]; - return false; - } - } - } - var valid6 = _errs37 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data18 = data.services; - const _errs39 = errors; - if (errors === _errs39) { - if (Array.isArray(data18)) { - var valid9 = true; - const len3 = data18.length; - for (let i3 = 0; i3 < len3; i3++) { - let data19 = data18[i3]; - const _errs41 = errors; - if (errors === _errs41) { - if ( - data19 && - typeof data19 == 'object' && - !Array.isArray(data19) - ) { - if (data19.serviceType !== undefined) { - let data20 = data19.serviceType; - const _errs44 = errors; - if (errors === _errs44) { - if (errors === _errs44) { - if (typeof data20 === 'string') { - if (!formats0(data20)) { - validate29.errors = [ - { - instancePath: - instancePath + - '/services/' + - i3 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema14.allOf[1].properties.services.items - .properties.serviceType, - data: data20, - }, - ]; - return false; - } - } else { - validate29.errors = [ - { - instancePath: - instancePath + - '/services/' + - i3 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema14.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema14.allOf[1].properties.services.items - .properties.serviceType, - data: data20, - }, - ]; - return false; - } - } - } - var valid10 = _errs44 === errors; - } else { - var valid10 = true; - } - if (valid10) { - if (data19.serviceId !== undefined) { - let data21 = data19.serviceId; - const _errs46 = errors; - if (typeof data21 !== 'string') { - validate29.errors = [ - { - instancePath: - instancePath + '/services/' + i3 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema14.allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema14.allOf[1].properties.services.items - .properties.serviceId, - data: data21, - }, - ]; - return false; - } - var valid10 = _errs46 === errors; - } else { - var valid10 = true; - } - if (valid10) { - if (data19.serviceDirection !== undefined) { - let data22 = data19.serviceDirection; - const _errs48 = errors; - if (typeof data22 !== 'string') { - validate29.errors = [ - { - instancePath: - instancePath + - '/services/' + - i3 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema14.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema14.allOf[1].properties.services.items - .properties.serviceDirection, - data: data22, - }, - ]; - return false; - } - if ( - !( - data22 === 'consumer' || - data22 === 'producer' || - data22 === 'prosumer' - ) - ) { - validate29.errors = [ - { - instancePath: - instancePath + - '/services/' + - i3 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema14.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema14.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema14.allOf[1].properties.services.items - .properties.serviceDirection, - data: data22, - }, - ]; - return false; - } - var valid10 = _errs48 === errors; - } else { - var valid10 = true; - } - } - } - } else { - validate29.errors = [ - { - instancePath: instancePath + '/services/' + i3, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema14.allOf[1].properties.services.items.type, - parentSchema: schema14.allOf[1].properties.services.items, - data: data19, - }, - ]; - return false; - } - } - var valid9 = _errs41 === errors; - if (!valid9) { - break; - } - } - } else { - validate29.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema14.allOf[1].properties.services.type, - parentSchema: schema14.allOf[1].properties.services, - data: data18, - }, - ]; - return false; - } - } - var valid6 = _errs39 === errors; - } else { - var valid6 = true; - } - } - } - } - } - } else { - validate29.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema14.allOf[1].type, - parentSchema: schema14.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs24 === errors; - } - validate29.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableBrowserDevice = validate30; -const schema15 = { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'InstantiableBrowserDevice', - 'x-location': '#/components/schemas/device_edge_instantiable', - 'x-schema-type': 'all', -}; -function validate30( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate30.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema15.allOf[0].required, - parentSchema: schema15.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate30.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema15.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate30.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema15.allOf[0].properties.url.type, - parentSchema: schema15.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate30.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema15.allOf[0].properties.name.type, - parentSchema: schema15.allOf[0].properties.name, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate30.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema15.allOf[0].properties.description.type, - parentSchema: schema15.allOf[0].properties.description, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate30.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema15.allOf[0].properties.type.type, - parentSchema: schema15.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate30.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema15.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema15.allOf[0].properties.type.enum, - parentSchema: schema15.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs10 = errors; - if (typeof data4 !== 'boolean') { - validate30.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema15.allOf[0].properties.isPublic.type, - parentSchema: schema15.allOf[0].properties.isPublic, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data5)) { - var valid2 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - validate30.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema15.allOf[0].properties.viewer.items.required, - parentSchema: - schema15.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate30.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema15.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } else { - validate30.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema15.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema15.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate30.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema15.allOf[0].properties.viewer.items.type, - parentSchema: schema15.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid2 = _errs14 === errors; - if (!valid2) { - break; - } - } - } else { - validate30.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema15.allOf[0].properties.viewer.type, - parentSchema: schema15.allOf[0].properties.viewer, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs12 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data8)) { - var valid4 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - validate30.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema15.allOf[0].properties.owner.items.required, - parentSchema: - schema15.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate30.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema15.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate30.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema15.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema15.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate30.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema15.allOf[0].properties.owner.items.type, - parentSchema: - schema15.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid4 = _errs20 === errors; - if (!valid4) { - break; - } - } - } else { - validate30.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema15.allOf[0].properties.owner.type, - parentSchema: schema15.allOf[0].properties.owner, - data: data8, - }, - ]; - return false; - } - } - var valid1 = _errs18 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } - } else { - validate30.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema15.allOf[0].type, - parentSchema: schema15.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs26 = errors; - if ('edge instantiable' !== data11) { - validate30.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema15.allOf[1].properties.type, - data: data11, - }, - ]; - return false; - } - var valid6 = _errs26 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.codeUrl !== undefined) { - let data12 = data.codeUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - validate30.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema15.allOf[1].properties.codeUrl, - data: data12, - }, - ]; - return false; - } - } else { - validate30.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema15.allOf[1].properties.codeUrl.type, - parentSchema: schema15.allOf[1].properties.codeUrl, - data: data12, - }, - ]; - return false; - } - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data13)) { - var valid7 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - validate30.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema15.allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }, - ]; - return false; - } - } else { - validate30.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema15.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema15.allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }, - ]; - return false; - } - } - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate30.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema15.allOf[1].properties.services.items.properties - .serviceId.type, - parentSchema: - schema15.allOf[1].properties.services.items.properties - .serviceId, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs38 = errors; - if (typeof data17 !== 'string') { - validate30.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema15.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema15.allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }, - ]; - return false; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - validate30.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema15.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema15.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema15.allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }, - ]; - return false; - } - var valid8 = _errs38 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate30.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema15.allOf[1].properties.services.items.type, - parentSchema: schema15.allOf[1].properties.services.items, - data: data14, - }, - ]; - return false; - } - } - var valid7 = _errs31 === errors; - if (!valid7) { - break; - } - } - } else { - validate30.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema15.allOf[1].properties.services.type, - parentSchema: schema15.allOf[1].properties.services, - data: data13, - }, - ]; - return false; - } - } - var valid6 = _errs29 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate30.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema15.allOf[1].type, - parentSchema: schema15.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs24 === errors; - } - validate30.errors = vErrors; - return errors === 0; -} -exports.validateDeviceReference = validate31; -const schema16 = { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - 'x-standalone': true, - 'x-name': 'DeviceReference', - 'x-location': '#/components/schemas/device_reference', - 'x-schema-type': 'all', -}; -function validate31( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.url === undefined && (missing0 = 'url')) { - validate31.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema16.required, - parentSchema: schema16, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate31.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema16.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate31.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema16.properties.url.type, - parentSchema: schema16.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - } - } - } else { - validate31.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema16.type, - parentSchema: schema16, - data, - }, - ]; - return false; - } - } - validate31.errors = vErrors; - return errors === 0; -} -exports.validateDeviceGroup = validate32; -const schema17 = { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'DeviceGroup', - 'x-location': '#/components/schemas/device_group', - 'x-schema-type': 'all', -}; -function validate32( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate32.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema17.allOf[0].required, - parentSchema: schema17.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate32.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema17.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate32.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema17.allOf[0].properties.url.type, - parentSchema: schema17.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate32.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema17.allOf[0].properties.name.type, - parentSchema: schema17.allOf[0].properties.name, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate32.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema17.allOf[0].properties.description.type, - parentSchema: schema17.allOf[0].properties.description, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate32.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema17.allOf[0].properties.type.type, - parentSchema: schema17.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate32.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema17.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema17.allOf[0].properties.type.enum, - parentSchema: schema17.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs10 = errors; - if (typeof data4 !== 'boolean') { - validate32.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema17.allOf[0].properties.isPublic.type, - parentSchema: schema17.allOf[0].properties.isPublic, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data5)) { - var valid2 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - validate32.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema17.allOf[0].properties.viewer.items.required, - parentSchema: - schema17.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate32.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema17.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } else { - validate32.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema17.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema17.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate32.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema17.allOf[0].properties.viewer.items.type, - parentSchema: schema17.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid2 = _errs14 === errors; - if (!valid2) { - break; - } - } - } else { - validate32.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema17.allOf[0].properties.viewer.type, - parentSchema: schema17.allOf[0].properties.viewer, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs12 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data8)) { - var valid4 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - validate32.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema17.allOf[0].properties.owner.items.required, - parentSchema: - schema17.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate32.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema17.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate32.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema17.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema17.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate32.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema17.allOf[0].properties.owner.items.type, - parentSchema: - schema17.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid4 = _errs20 === errors; - if (!valid4) { - break; - } - } - } else { - validate32.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema17.allOf[0].properties.owner.type, - parentSchema: schema17.allOf[0].properties.owner, - data: data8, - }, - ]; - return false; - } - } - var valid1 = _errs18 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } - } else { - validate32.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema17.allOf[0].type, - parentSchema: schema17.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if (data.devices === undefined && (missing3 = 'devices')) { - validate32.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema17.allOf[1].required, - parentSchema: schema17.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.type !== undefined) { - let data11 = data.type; - const _errs26 = errors; - if ('group' !== data11) { - validate32.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema17.allOf[1].properties.type, - data: data11, - }, - ]; - return false; - } - var valid6 = _errs26 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.devices !== undefined) { - let data12 = data.devices; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - let missing4; - if (data13.url === undefined && (missing4 = 'url')) { - validate32.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: schema17.allOf[1].properties.devices.items.required, - parentSchema: schema17.allOf[1].properties.devices.items, - data: data13, - }, - ]; - return false; - } else { - if (data13.url !== undefined) { - let data14 = data13.url; - const _errs31 = errors; - if (errors === _errs31) { - if (errors === _errs31) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate32.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema17.allOf[1].properties.devices.items - .properties.url, - data: data14, - }, - ]; - return false; - } - } else { - validate32.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema17.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema17.allOf[1].properties.devices.items - .properties.url, - data: data14, - }, - ]; - return false; - } - } - } - } - } - } else { - validate32.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema17.allOf[1].properties.devices.items.type, - parentSchema: schema17.allOf[1].properties.devices.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate32.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema17.allOf[1].properties.devices.type, - parentSchema: schema17.allOf[1].properties.devices, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate32.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema17.allOf[1].type, - parentSchema: schema17.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs24 === errors; - } - validate32.errors = vErrors; - return errors === 0; -} -exports.validateDevice = validate33; -const schema18 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'Device', - 'x-location': '#/components/schemas/device', - 'x-schema-type': 'all', -}; -function validate33( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema18.anyOf[0].allOf[0].required, - parentSchema: schema18.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - const err1 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema18.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema18.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err3 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema18.anyOf[0].allOf[0].properties.name, - data: data1, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err4 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema18.anyOf[0].allOf[0].properties.description, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs10 = errors; - if (typeof data3 !== 'string') { - const err5 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema18.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema18.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema18.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema18.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs12 = errors; - if (typeof data4 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema18.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema18.anyOf[0].allOf[0].properties.isPublic, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - const err8 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema18.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema18.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - const err9 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema18.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema18.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema18.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema18.anyOf[0].allOf[0].properties.viewer, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data8)) { - var valid5 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - const err13 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema18.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema18.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - const err14 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[0].allOf[0].properties - .owner.items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema18.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[0].allOf[0].properties.owner.items - .type, - parentSchema: - schema18.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema18.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema18.anyOf[0].allOf[0].properties.owner, - data: data8, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema18.anyOf[0].allOf[0].type, - parentSchema: schema18.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs28 = errors; - if ('cloud instantiable' !== data11) { - const err19 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema18.anyOf[0].allOf[1].properties.type, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err20 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema18.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema18.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data13)) { - var valid8 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs36 = errors; - if (errors === _errs36) { - if (errors === _errs36) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema18.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err24 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema18.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs40 = errors; - if (typeof data17 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema18.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema18.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema18.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema18.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid9 = _errs40 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err27 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema18.anyOf[0].allOf[1].properties.services.items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema18.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema18.anyOf[0].allOf[1].properties.services, - data: data13, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema18.anyOf[0].allOf[1].type, - parentSchema: schema18.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid1 = _errs26 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs42 = errors; - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.url === undefined && (missing3 = 'url')) || - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema18.anyOf[1].allOf[0].required, - parentSchema: schema18.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.url !== undefined) { - let data18 = data.url; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - const err31 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema18.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema18.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.name !== undefined) { - let data19 = data.name; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err33 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema18.anyOf[1].allOf[0].properties.name, - data: data19, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data20 = data.description; - const _errs49 = errors; - if (typeof data20 !== 'string') { - const err34 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema18.anyOf[1].allOf[0].properties.description, - data: data20, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data21 = data.type; - const _errs51 = errors; - if (typeof data21 !== 'string') { - const err35 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema18.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data21 === 'device' || - data21 === 'group' || - data21 === 'edge instantiable' || - data21 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema18.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema18.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema18.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data22 = data.isPublic; - const _errs53 = errors; - if (typeof data22 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema18.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema18.anyOf[1].allOf[0].properties.isPublic, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid11 = _errs53 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data23 = data.viewer; - const _errs55 = errors; - if (errors === _errs55) { - if (Array.isArray(data23)) { - var valid12 = true; - const len3 = data23.length; - for (let i3 = 0; i3 < len3; i3++) { - let data24 = data23[i3]; - const _errs57 = errors; - if (errors === _errs57) { - if ( - data24 && - typeof data24 == 'object' && - !Array.isArray(data24) - ) { - let missing4; - if (data24.url === undefined && (missing4 = 'url')) { - const err38 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema18.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema18.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data24.url !== undefined) { - let data25 = data24.url; - const _errs59 = errors; - if (errors === _errs59) { - if (errors === _errs59) { - if (typeof data25 === 'string') { - if (!formats0(data25)) { - const err39 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema18.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema18.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid12 = _errs57 === errors; - if (!valid12) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema18.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema18.anyOf[1].allOf[0].properties.viewer, - data: data23, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid11 = _errs55 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data26 = data.owner; - const _errs61 = errors; - if (errors === _errs61) { - if (Array.isArray(data26)) { - var valid14 = true; - const len4 = data26.length; - for (let i4 = 0; i4 < len4; i4++) { - let data27 = data26[i4]; - const _errs63 = errors; - if (errors === _errs63) { - if ( - data27 && - typeof data27 == 'object' && - !Array.isArray(data27) - ) { - let missing5; - if (data27.url === undefined && (missing5 = 'url')) { - const err43 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema18.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema18.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data27.url !== undefined) { - let data28 = data27.url; - const _errs65 = errors; - if (errors === _errs65) { - if (errors === _errs65) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err44 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[1].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema18.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema18.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid14 = _errs63 === errors; - if (!valid14) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema18.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema18.anyOf[1].allOf[0].properties.owner, - data: data26, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid11 = _errs61 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema18.anyOf[1].allOf[0].type, - parentSchema: schema18.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid10 = _errs43 === errors; - if (valid10) { - const _errs67 = errors; - if (errors === _errs67) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data29 = data.type; - const _errs69 = errors; - if ('device' !== data29) { - const err49 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema18.anyOf[1].allOf[1].properties.type, - data: data29, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.connected !== undefined) { - let data30 = data.connected; - const _errs70 = errors; - if (typeof data30 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/connected', - schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema18.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema18.anyOf[1].allOf[1].properties.connected, - data: data30, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid16 = _errs70 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.announcedAvailability !== undefined) { - let data31 = data.announcedAvailability; - const _errs72 = errors; - if (errors === _errs72) { - if (Array.isArray(data31)) { - var valid17 = true; - const len5 = data31.length; - for (let i5 = 0; i5 < len5; i5++) { - let data32 = data31[i5]; - const _errs74 = errors; - if (errors === _errs74) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - if (data32.start !== undefined) { - let data33 = data32.start; - const _errs76 = errors; - if (errors === _errs76) { - if (errors === _errs76) { - if (typeof data33 === 'string') { - if (!formats22.validate(data33)) { - const err51 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema18.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start - .type, - parentSchema: - schema18.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid18 = _errs76 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data32.end !== undefined) { - let data34 = data32.end; - const _errs78 = errors; - if (errors === _errs78) { - if (errors === _errs78) { - if (typeof data34 === 'string') { - if (!formats22.validate(data34)) { - const err53 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema18.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end - .type, - parentSchema: - schema18.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } else { - const err55 = { - instancePath: instancePath + '/announcedAvailability/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[1].allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema18.anyOf[1].allOf[1].properties.announcedAvailability - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid17 = _errs74 === errors; - if (!valid17) { - break; - } - } - } else { - const err56 = { - instancePath: instancePath + '/announcedAvailability', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema18.anyOf[1].allOf[1].properties.announcedAvailability.type, - parentSchema: - schema18.anyOf[1].allOf[1].properties.announcedAvailability, - data: data31, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid16 = _errs72 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data35 = data.experiment; - const _errs80 = errors; - if (errors === _errs80) { - if (errors === _errs80) { - if (typeof data35 === 'string') { - if (!formats0(data35)) { - const err57 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema18.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid16 = _errs80 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data36 = data.services; - const _errs82 = errors; - if (errors === _errs82) { - if (Array.isArray(data36)) { - var valid19 = true; - const len6 = data36.length; - for (let i6 = 0; i6 < len6; i6++) { - let data37 = data36[i6]; - const _errs84 = errors; - if (errors === _errs84) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.serviceType !== undefined) { - let data38 = data37.serviceType; - const _errs87 = errors; - if (errors === _errs87) { - if (errors === _errs87) { - if (typeof data38 === 'string') { - if (!formats0(data38)) { - const err59 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema18.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid20 = _errs87 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceId !== undefined) { - let data39 = data37.serviceId; - const _errs89 = errors; - if (typeof data39 !== 'string') { - const err61 = { - instancePath: - instancePath + '/services/' + i6 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[1].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema18.anyOf[1].allOf[1].properties.services - .items.properties.serviceId, - data: data39, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs89 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceDirection !== undefined) { - let data40 = data37.serviceDirection; - const _errs91 = errors; - if (typeof data40 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema18.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data40 === 'consumer' || - data40 === 'producer' || - data40 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema18.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema18.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema18.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid20 = _errs91 === errors; - } else { - var valid20 = true; - } - } - } - } else { - const err64 = { - instancePath: instancePath + '/services/' + i6, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[1].allOf[1].properties.services.items - .type, - parentSchema: - schema18.anyOf[1].allOf[1].properties.services.items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid19 = _errs84 === errors; - if (!valid19) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema18.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema18.anyOf[1].allOf[1].properties.services, - data: data36, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid16 = _errs82 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema18.anyOf[1].allOf[1].type, - parentSchema: schema18.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid10 = _errs67 === errors; - } - var _valid0 = _errs42 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs93 = errors; - const _errs94 = errors; - if (errors === _errs94) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.url === undefined && (missing6 = 'url')) || - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err67 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema18.anyOf[2].allOf[0].required, - parentSchema: schema18.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data.url !== undefined) { - let data41 = data.url; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data41 === 'string') { - if (!formats0(data41)) { - const err68 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema18.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema18.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid22 = _errs96 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.name !== undefined) { - let data42 = data.name; - const _errs98 = errors; - if (typeof data42 !== 'string') { - const err70 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema18.anyOf[2].allOf[0].properties.name, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid22 = _errs98 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.description !== undefined) { - let data43 = data.description; - const _errs100 = errors; - if (typeof data43 !== 'string') { - const err71 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema18.anyOf[2].allOf[0].properties.description, - data: data43, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid22 = _errs100 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs102 = errors; - if (typeof data44 !== 'string') { - const err72 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema18.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data44 === 'device' || - data44 === 'group' || - data44 === 'edge instantiable' || - data44 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema18.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema18.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema18.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid22 = _errs102 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.isPublic !== undefined) { - let data45 = data.isPublic; - const _errs104 = errors; - if (typeof data45 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema18.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema18.anyOf[2].allOf[0].properties.isPublic, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid22 = _errs104 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.viewer !== undefined) { - let data46 = data.viewer; - const _errs106 = errors; - if (errors === _errs106) { - if (Array.isArray(data46)) { - var valid23 = true; - const len7 = data46.length; - for (let i7 = 0; i7 < len7; i7++) { - let data47 = data46[i7]; - const _errs108 = errors; - if (errors === _errs108) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - let missing7; - if (data47.url === undefined && (missing7 = 'url')) { - const err75 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema18.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema18.anyOf[2].allOf[0].properties.viewer - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data47.url !== undefined) { - let data48 = data47.url; - const _errs110 = errors; - if (errors === _errs110) { - if (errors === _errs110) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema18.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema18.anyOf[2].allOf[0].properties.viewer.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid23 = _errs108 === errors; - if (!valid23) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema18.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema18.anyOf[2].allOf[0].properties.viewer, - data: data46, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid22 = _errs106 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.owner !== undefined) { - let data49 = data.owner; - const _errs112 = errors; - if (errors === _errs112) { - if (Array.isArray(data49)) { - var valid25 = true; - const len8 = data49.length; - for (let i8 = 0; i8 < len8; i8++) { - let data50 = data49[i8]; - const _errs114 = errors; - if (errors === _errs114) { - if ( - data50 && - typeof data50 == 'object' && - !Array.isArray(data50) - ) { - let missing8; - if (data50.url === undefined && (missing8 = 'url')) { - const err80 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema18.anyOf[2].allOf[0].properties.owner - .items.required, - parentSchema: - schema18.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data50.url !== undefined) { - let data51 = data50.url; - const _errs116 = errors; - if (errors === _errs116) { - if (errors === _errs116) { - if (typeof data51 === 'string') { - if (!formats0(data51)) { - const err81 = { - instancePath: - instancePath + - '/owner/' + - i8 + - '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + '/owner/' + i8 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema18.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema18.anyOf[2].allOf[0].properties.owner.items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid25 = _errs114 === errors; - if (!valid25) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema18.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema18.anyOf[2].allOf[0].properties.owner, - data: data49, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid22 = _errs112 === errors; - } else { - var valid22 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema18.anyOf[2].allOf[0].type, - parentSchema: schema18.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid21 = _errs94 === errors; - if (valid21) { - const _errs118 = errors; - if (errors === _errs118) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data52 = data.type; - const _errs120 = errors; - if ('edge instantiable' !== data52) { - const err86 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema18.anyOf[2].allOf[1].properties.type, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.codeUrl !== undefined) { - let data53 = data.codeUrl; - const _errs121 = errors; - if (errors === _errs121) { - if (errors === _errs121) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err87 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema18.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema18.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid27 = _errs121 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.services !== undefined) { - let data54 = data.services; - const _errs123 = errors; - if (errors === _errs123) { - if (Array.isArray(data54)) { - var valid28 = true; - const len9 = data54.length; - for (let i9 = 0; i9 < len9; i9++) { - let data55 = data54[i9]; - const _errs125 = errors; - if (errors === _errs125) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - if (data55.serviceType !== undefined) { - let data56 = data55.serviceType; - const _errs128 = errors; - if (errors === _errs128) { - if (errors === _errs128) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err89 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema18.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid29 = _errs128 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceId !== undefined) { - let data57 = data55.serviceId; - const _errs130 = errors; - if (typeof data57 !== 'string') { - const err91 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[2].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema18.anyOf[2].allOf[1].properties.services.items - .properties.serviceId, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid29 = _errs130 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceDirection !== undefined) { - let data58 = data55.serviceDirection; - const _errs132 = errors; - if (typeof data58 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema18.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data58 === 'consumer' || - data58 === 'producer' || - data58 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema18.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema18.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema18.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid29 = _errs132 === errors; - } else { - var valid29 = true; - } - } - } - } else { - const err94 = { - instancePath: instancePath + '/services/' + i9, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[2].allOf[1].properties.services.items.type, - parentSchema: - schema18.anyOf[2].allOf[1].properties.services.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid28 = _errs125 === errors; - if (!valid28) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema18.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema18.anyOf[2].allOf[1].properties.services, - data: data54, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid27 = _errs123 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err96 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema18.anyOf[2].allOf[1].type, - parentSchema: schema18.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid21 = _errs118 === errors; - } - var _valid0 = _errs93 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs134 = errors; - const _errs135 = errors; - if (errors === _errs135) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.url === undefined && (missing9 = 'url')) || - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err97 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema18.anyOf[3].allOf[0].required, - parentSchema: schema18.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data.url !== undefined) { - let data59 = data.url; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data59 === 'string') { - if (!formats0(data59)) { - const err98 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema18.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema18.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid31 = _errs137 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.name !== undefined) { - let data60 = data.name; - const _errs139 = errors; - if (typeof data60 !== 'string') { - const err100 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema18.anyOf[3].allOf[0].properties.name, - data: data60, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid31 = _errs139 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.description !== undefined) { - let data61 = data.description; - const _errs141 = errors; - if (typeof data61 !== 'string') { - const err101 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema18.anyOf[3].allOf[0].properties.description, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid31 = _errs141 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.type !== undefined) { - let data62 = data.type; - const _errs143 = errors; - if (typeof data62 !== 'string') { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema18.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema18.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data62 === 'device' || - data62 === 'group' || - data62 === 'edge instantiable' || - data62 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema18.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema18.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema18.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid31 = _errs143 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.isPublic !== undefined) { - let data63 = data.isPublic; - const _errs145 = errors; - if (typeof data63 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema18.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema18.anyOf[3].allOf[0].properties.isPublic, - data: data63, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid31 = _errs145 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.viewer !== undefined) { - let data64 = data.viewer; - const _errs147 = errors; - if (errors === _errs147) { - if (Array.isArray(data64)) { - var valid32 = true; - const len10 = data64.length; - for (let i10 = 0; i10 < len10; i10++) { - let data65 = data64[i10]; - const _errs149 = errors; - if (errors === _errs149) { - if ( - data65 && - typeof data65 == 'object' && - !Array.isArray(data65) - ) { - let missing10; - if (data65.url === undefined && (missing10 = 'url')) { - const err105 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema18.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema18.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data65.url !== undefined) { - let data66 = data65.url; - const _errs151 = errors; - if (errors === _errs151) { - if (errors === _errs151) { - if (typeof data66 === 'string') { - if (!formats0(data66)) { - const err106 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema18.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema18.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid32 = _errs149 === errors; - if (!valid32) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema18.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: - schema18.anyOf[3].allOf[0].properties.viewer, - data: data64, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid31 = _errs147 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.owner !== undefined) { - let data67 = data.owner; - const _errs153 = errors; - if (errors === _errs153) { - if (Array.isArray(data67)) { - var valid34 = true; - const len11 = data67.length; - for (let i11 = 0; i11 < len11; i11++) { - let data68 = data67[i11]; - const _errs155 = errors; - if (errors === _errs155) { - if ( - data68 && - typeof data68 == 'object' && - !Array.isArray(data68) - ) { - let missing11; - if ( - data68.url === undefined && - (missing11 = 'url') - ) { - const err110 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema18.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema18.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data68.url !== undefined) { - let data69 = data68.url; - const _errs157 = errors; - if (errors === _errs157) { - if (errors === _errs157) { - if (typeof data69 === 'string') { - if (!formats0(data69)) { - const err111 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[3].allOf[0] - .properties.owner.items.properties - .url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema18.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[3].allOf[0].properties.owner - .items.type, - parentSchema: - schema18.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid34 = _errs155 === errors; - if (!valid34) { - break; - } - } - } else { - const err114 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema18.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema18.anyOf[3].allOf[0].properties.owner, - data: data67, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid31 = _errs153 === errors; - } else { - var valid31 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema18.anyOf[3].allOf[0].type, - parentSchema: schema18.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid30 = _errs135 === errors; - if (valid30) { - const _errs159 = errors; - if (errors === _errs159) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err116 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema18.anyOf[3].allOf[1].required, - parentSchema: schema18.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data.type !== undefined) { - let data70 = data.type; - const _errs161 = errors; - if ('group' !== data70) { - const err117 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema18.anyOf[3].allOf[1].properties.type, - data: data70, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data.devices !== undefined) { - let data71 = data.devices; - const _errs162 = errors; - if (errors === _errs162) { - if (Array.isArray(data71)) { - var valid37 = true; - const len12 = data71.length; - for (let i12 = 0; i12 < len12; i12++) { - let data72 = data71[i12]; - const _errs164 = errors; - if (errors === _errs164) { - if ( - data72 && - typeof data72 == 'object' && - !Array.isArray(data72) - ) { - let missing13; - if (data72.url === undefined && (missing13 = 'url')) { - const err118 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema18.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema18.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data72.url !== undefined) { - let data73 = data72.url; - const _errs166 = errors; - if (errors === _errs166) { - if (errors === _errs166) { - if (typeof data73 === 'string') { - if (!formats0(data73)) { - const err119 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema18.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema18.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema18.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema18.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema18.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid37 = _errs164 === errors; - if (!valid37) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema18.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema18.anyOf[3].allOf[1].properties.devices, - data: data71, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid36 = _errs162 === errors; - } else { - var valid36 = true; - } - } - } - } else { - const err123 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema18.anyOf[3].allOf[1].type, - parentSchema: schema18.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid30 = _errs159 === errors; - } - var _valid0 = _errs134 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err124 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema18.anyOf, - parentSchema: schema18, - data, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate33.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate33.errors = vErrors; - return errors === 0; -} -exports.validateCallback = validate34; -const schema19 = { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'Callback', - 'x-location': '#/components/schemas/callback', - 'x-schema-type': 'all', -}; -function validate34( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate34.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema19.required, - parentSchema: schema19, - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate34.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema19.properties.callbackType.type, - parentSchema: schema19.properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate34.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema19.type, - parentSchema: schema19, - data, - }, - ]; - return false; - } - } - validate34.errors = vErrors; - return errors === 0; -} -exports.validateEventCallback = validate35; -const schema20 = { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'EventCallback', - 'x-location': '#/components/schemas/event_callback', - 'x-schema-type': 'all', -}; -function validate35( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate35.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema20.allOf[0].required, - parentSchema: schema20.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate35.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema20.allOf[0].properties.callbackType.type, - parentSchema: schema20.allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate35.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema20.allOf[0].type, - parentSchema: schema20.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs4 = errors; - if (errors === _errs4) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate35.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema20.allOf[1].required, - parentSchema: schema20.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs6 = errors; - if (typeof data1 !== 'string') { - validate35.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema20.allOf[1].properties.callbackType.type, - parentSchema: schema20.allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate35.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: schema20.allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema20.allOf[1].properties.callbackType.enum, - parentSchema: schema20.allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate35.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema20.allOf[1].properties.eventType.type, - parentSchema: schema20.allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - } - } - } else { - validate35.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema20.allOf[1].type, - parentSchema: schema20.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs4 === errors; - } - validate35.errors = vErrors; - return errors === 0; -} -exports.validateDeviceChangedEventCallback = validate36; -const schema21 = { - title: 'Device Changed Event Callback', - allOf: [ - { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - eventType: { type: 'string', enum: ['device-changed'] }, - device: { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - }, - }, - required: ['eventType', 'device'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'DeviceChangedEventCallback', - 'x-location': '#/components/schemas/device_changed', - 'x-schema-type': 'all', -}; -function validate36( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate36.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema21.allOf[0].allOf[0].required, - parentSchema: schema21.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate36.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema21.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema21.allOf[0].allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate36.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema21.allOf[0].allOf[0].type, - parentSchema: schema21.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate36.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema21.allOf[0].allOf[1].required, - parentSchema: schema21.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs7 = errors; - if (typeof data1 !== 'string') { - validate36.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema21.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema21.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate36.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: - schema21.allOf[0].allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema21.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema21.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs7 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate36.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema21.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema21.allOf[0].allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate36.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema21.allOf[0].allOf[1].type, - parentSchema: schema21.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.eventType === undefined && (missing2 = 'eventType')) || - (data.device === undefined && (missing2 = 'device')) - ) { - validate36.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema21.allOf[1].required, - parentSchema: schema21.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.eventType !== undefined) { - let data3 = data.eventType; - const _errs13 = errors; - if (typeof data3 !== 'string') { - validate36.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema21.allOf[1].properties.eventType.type, - parentSchema: schema21.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - if (!(data3 === 'device-changed')) { - validate36.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/enum', - keyword: 'enum', - params: { allowedValues: schema21.allOf[1].properties.eventType.enum }, - message: 'must be equal to one of the allowed values', - schema: schema21.allOf[1].properties.eventType.enum, - parentSchema: schema21.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.device !== undefined) { - let data4 = data.device; - const _errs15 = errors; - const _errs16 = errors; - let valid5 = false; - const _errs17 = errors; - const _errs18 = errors; - if (errors === _errs18) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing3; - if ( - (data4.url === undefined && (missing3 = 'url')) || - (data4.type === undefined && (missing3 = 'type')) || - (data4.name === undefined && (missing3 = 'name')) || - (data4.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err0 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0].required, - parentSchema: schema21.allOf[1].properties.device.anyOf[0].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - const err1 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.url, - data: data5, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.url.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.url, - data: data5, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid7 = _errs20 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.name !== undefined) { - let data6 = data4.name; - const _errs22 = errors; - if (typeof data6 !== 'string') { - const err3 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.name.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.name, - data: data6, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid7 = _errs22 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.description !== undefined) { - let data7 = data4.description; - const _errs24 = errors; - if (typeof data7 !== 'string') { - const err4 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.description.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.description, - data: data7, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid7 = _errs24 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.type !== undefined) { - let data8 = data4.type; - const _errs26 = errors; - if (typeof data8 !== 'string') { - const err5 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type, - data: data8, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data8 === 'device' || - data8 === 'group' || - data8 === 'edge instantiable' || - data8 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type.enum, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type, - data: data8, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.isPublic !== undefined) { - let data9 = data4.isPublic; - const _errs28 = errors; - if (typeof data9 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.isPublic.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.isPublic, - data: data9, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.viewer !== undefined) { - let data10 = data4.viewer; - const _errs30 = errors; - if (errors === _errs30) { - if (Array.isArray(data10)) { - var valid8 = true; - const len0 = data10.length; - for (let i0 = 0; i0 < len0; i0++) { - let data11 = data10[i0]; - const _errs32 = errors; - if (errors === _errs32) { - if ( - data11 && - typeof data11 == 'object' && - !Array.isArray(data11) - ) { - let missing4; - if ( - data11.url === undefined && - (missing4 = 'url') - ) { - const err8 = { - instancePath: - instancePath + '/device/viewer/' + i0, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + - missing4 + - "'", - schema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[0].properties.viewer - .items.required, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[0].properties.viewer - .items, - data: data11, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data11.url !== undefined) { - let data12 = data11.url; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err9 = { - instancePath: - instancePath + - '/device/viewer/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.viewer.items - .properties.url, - data: data12, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + - '/device/viewer/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.viewer.items - .properties.url.type, - parentSchema: - schema21.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.viewer.items - .properties.url, - data: data12, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: - instancePath + '/device/viewer/' + i0, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.viewer.items.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.viewer.items, - data: data11, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid8 = _errs32 === errors; - if (!valid8) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.viewer.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.viewer, - data: data10, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid7 = _errs30 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.owner !== undefined) { - let data13 = data4.owner; - const _errs36 = errors; - if (errors === _errs36) { - if (Array.isArray(data13)) { - var valid10 = true; - const len1 = data13.length; - for (let i1 = 0; i1 < len1; i1++) { - let data14 = data13[i1]; - const _errs38 = errors; - if (errors === _errs38) { - if ( - data14 && - typeof data14 == 'object' && - !Array.isArray(data14) - ) { - let missing5; - if ( - data14.url === undefined && - (missing5 = 'url') - ) { - const err13 = { - instancePath: - instancePath + '/device/owner/' + i1, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + - missing5 + - "'", - schema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner - .items.required, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner - .items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data14.url !== undefined) { - let data15 = data14.url; - const _errs40 = errors; - if (errors === _errs40) { - if (errors === _errs40) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err14 = { - instancePath: - instancePath + - '/device/owner/' + - i1 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.owner.items - .properties.url, - data: data15, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + - '/device/owner/' + - i1 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema21.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.owner.items - .properties.url, - data: data15, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: - instancePath + '/device/owner/' + i1, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner - .items.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner - .items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid10 = _errs38 === errors; - if (!valid10) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.owner.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.owner, - data: data13, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid7 = _errs36 === errors; - } else { - var valid7 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema21.allOf[1].properties.device.anyOf[0].allOf[0].type, - parentSchema: schema21.allOf[1].properties.device.anyOf[0].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid6 = _errs18 === errors; - if (valid6) { - const _errs42 = errors; - if (errors === _errs42) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - if (data4.type !== undefined) { - let data16 = data4.type; - const _errs44 = errors; - if ('cloud instantiable' !== data16) { - const err19 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: - schema21.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.type, - data: data16, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid12 = _errs44 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if (data4.instantiateUrl !== undefined) { - let data17 = data4.instantiateUrl; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data17 === 'string') { - if (!formats0(data17)) { - const err20 = { - instancePath: instancePath + '/device/instantiateUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.instantiateUrl, - data: data17, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/device/instantiateUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.instantiateUrl.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.instantiateUrl, - data: data17, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid12 = _errs45 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if (data4.services !== undefined) { - let data18 = data4.services; - const _errs47 = errors; - if (errors === _errs47) { - if (Array.isArray(data18)) { - var valid13 = true; - const len2 = data18.length; - for (let i2 = 0; i2 < len2; i2++) { - let data19 = data18[i2]; - const _errs49 = errors; - if (errors === _errs49) { - if ( - data19 && - typeof data19 == 'object' && - !Array.isArray(data19) - ) { - if (data19.serviceType !== undefined) { - let data20 = data19.serviceType; - const _errs52 = errors; - if (errors === _errs52) { - if (errors === _errs52) { - if (typeof data20 === 'string') { - if (!formats0(data20)) { - const err22 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data20, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data20, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid14 = _errs52 === errors; - } else { - var valid14 = true; - } - if (valid14) { - if (data19.serviceId !== undefined) { - let data21 = data19.serviceId; - const _errs54 = errors; - if (typeof data21 !== 'string') { - const err24 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[0] - .allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0] - .allOf[1].properties.services.items - .properties.serviceId, - data: data21, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid14 = _errs54 === errors; - } else { - var valid14 = true; - } - if (valid14) { - if (data19.serviceDirection !== undefined) { - let data22 = data19.serviceDirection; - const _errs56 = errors; - if (typeof data22 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection, - data: data22, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data22 === 'consumer' || - data22 === 'producer' || - data22 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema21.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection - .enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection, - data: data22, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid14 = _errs56 === errors; - } else { - var valid14 = true; - } - } - } - } else { - const err27 = { - instancePath: - instancePath + '/device/services/' + i2, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device.anyOf[0] - .allOf[1].properties.services.items.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0] - .allOf[1].properties.services.items, - data: data19, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid13 = _errs49 === errors; - if (!valid13) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/device/services', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.services.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.services, - data: data18, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid12 = _errs47 === errors; - } else { - var valid12 = true; - } - } - } - } else { - const err29 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema21.allOf[1].properties.device.anyOf[0].allOf[1].type, - parentSchema: schema21.allOf[1].properties.device.anyOf[0].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid6 = _errs42 === errors; - } - var _valid0 = _errs17 === errors; - valid5 = valid5 || _valid0; - if (!valid5) { - const _errs58 = errors; - const _errs59 = errors; - if (errors === _errs59) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing6; - if ( - (data4.url === undefined && (missing6 = 'url')) || - (data4.type === undefined && (missing6 = 'type')) || - (data4.name === undefined && (missing6 = 'name')) || - (data4.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err30 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0].required, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data4.url !== undefined) { - let data23 = data4.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err31 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.url.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid16 = _errs61 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.name !== undefined) { - let data24 = data4.name; - const _errs63 = errors; - if (typeof data24 !== 'string') { - const err33 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.name.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.name, - data: data24, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid16 = _errs63 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.description !== undefined) { - let data25 = data4.description; - const _errs65 = errors; - if (typeof data25 !== 'string') { - const err34 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.description.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.description, - data: data25, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.type !== undefined) { - let data26 = data4.type; - const _errs67 = errors; - if (typeof data26 !== 'string') { - const err35 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type, - data: data26, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data26 === 'device' || - data26 === 'group' || - data26 === 'edge instantiable' || - data26 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type.enum, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type, - data: data26, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid16 = _errs67 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.isPublic !== undefined) { - let data27 = data4.isPublic; - const _errs69 = errors; - if (typeof data27 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.isPublic.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.isPublic, - data: data27, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.viewer !== undefined) { - let data28 = data4.viewer; - const _errs71 = errors; - if (errors === _errs71) { - if (Array.isArray(data28)) { - var valid17 = true; - const len3 = data28.length; - for (let i3 = 0; i3 < len3; i3++) { - let data29 = data28[i3]; - const _errs73 = errors; - if (errors === _errs73) { - if ( - data29 && - typeof data29 == 'object' && - !Array.isArray(data29) - ) { - let missing7; - if ( - data29.url === undefined && - (missing7 = 'url') - ) { - const err38 = { - instancePath: - instancePath + '/device/viewer/' + i3, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + - missing7 + - "'", - schema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer - .items.required, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer - .items, - data: data29, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data29.url !== undefined) { - let data30 = data29.url; - const _errs75 = errors; - if (errors === _errs75) { - if (errors === _errs75) { - if (typeof data30 === 'string') { - if (!formats0(data30)) { - const err39 = { - instancePath: - instancePath + - '/device/viewer/' + - i3 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.viewer.items - .properties.url, - data: data30, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + - '/device/viewer/' + - i3 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.viewer.items - .properties.url.type, - parentSchema: - schema21.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.viewer.items - .properties.url, - data: data30, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: - instancePath + '/device/viewer/' + i3, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer - .items.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer - .items, - data: data29, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid17 = _errs73 === errors; - if (!valid17) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.viewer.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.viewer, - data: data28, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid16 = _errs71 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.owner !== undefined) { - let data31 = data4.owner; - const _errs77 = errors; - if (errors === _errs77) { - if (Array.isArray(data31)) { - var valid19 = true; - const len4 = data31.length; - for (let i4 = 0; i4 < len4; i4++) { - let data32 = data31[i4]; - const _errs79 = errors; - if (errors === _errs79) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - let missing8; - if ( - data32.url === undefined && - (missing8 = 'url') - ) { - const err43 = { - instancePath: - instancePath + '/device/owner/' + i4, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items.required, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data32.url !== undefined) { - let data33 = data32.url; - const _errs81 = errors; - if (errors === _errs81) { - if (errors === _errs81) { - if (typeof data33 === 'string') { - if (!formats0(data33)) { - const err44 = { - instancePath: - instancePath + - '/device/owner/' + - i4 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.owner.items - .properties.url, - data: data33, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + - '/device/owner/' + - i4 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema21.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.owner.items - .properties.url, - data: data33, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: - instancePath + '/device/owner/' + i4, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid19 = _errs79 === errors; - if (!valid19) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.owner.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.owner, - data: data31, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid16 = _errs77 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema21.allOf[1].properties.device.anyOf[1].allOf[0].type, - parentSchema: schema21.allOf[1].properties.device.anyOf[1].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid15 = _errs59 === errors; - if (valid15) { - const _errs83 = errors; - if (errors === _errs83) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - if (data4.type !== undefined) { - let data34 = data4.type; - const _errs85 = errors; - if ('device' !== data34) { - const err49 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: - schema21.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.type, - data: data34, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid21 = _errs85 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data4.connected !== undefined) { - let data35 = data4.connected; - const _errs86 = errors; - if (typeof data35 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/device/connected', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema21.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.connected.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.connected, - data: data35, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid21 = _errs86 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data4.announcedAvailability !== undefined) { - let data36 = data4.announcedAvailability; - const _errs88 = errors; - if (errors === _errs88) { - if (Array.isArray(data36)) { - var valid22 = true; - const len5 = data36.length; - for (let i5 = 0; i5 < len5; i5++) { - let data37 = data36[i5]; - const _errs90 = errors; - if (errors === _errs90) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.start !== undefined) { - let data38 = data37.start; - const _errs92 = errors; - if (errors === _errs92) { - if (errors === _errs92) { - if (typeof data38 === 'string') { - if (!formats22.validate(data38)) { - const err51 = { - instancePath: - instancePath + - '/device/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + - 'date-time' + - '"', - schema: 'date-time', - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.start, - data: data38, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/device/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.start.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.start, - data: data38, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid23 = _errs92 === errors; - } else { - var valid23 = true; - } - if (valid23) { - if (data37.end !== undefined) { - let data39 = data37.end; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data39 === 'string') { - if (!formats22.validate(data39)) { - const err53 = { - instancePath: - instancePath + - '/device/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + - 'date-time' + - '"', - schema: 'date-time', - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.end, - data: data39, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/device/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.end.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.end, - data: data39, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid23 = _errs94 === errors; - } else { - var valid23 = true; - } - } - } else { - const err55 = { - instancePath: - instancePath + - '/device/announcedAvailability/' + - i5, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.announcedAvailability - .items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid22 = _errs90 === errors; - if (!valid22) { - break; - } - } - } else { - const err56 = { - instancePath: - instancePath + '/device/announcedAvailability', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.announcedAvailability.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.announcedAvailability, - data: data36, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid21 = _errs88 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data4.experiment !== undefined) { - let data40 = data4.experiment; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err57 = { - instancePath: instancePath + '/device/experiment', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.experiment, - data: data40, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/device/experiment', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.experiment.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.experiment, - data: data40, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid21 = _errs96 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data4.services !== undefined) { - let data41 = data4.services; - const _errs98 = errors; - if (errors === _errs98) { - if (Array.isArray(data41)) { - var valid24 = true; - const len6 = data41.length; - for (let i6 = 0; i6 < len6; i6++) { - let data42 = data41[i6]; - const _errs100 = errors; - if (errors === _errs100) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - if (data42.serviceType !== undefined) { - let data43 = data42.serviceType; - const _errs103 = errors; - if (errors === _errs103) { - if (errors === _errs103) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err59 = { - instancePath: - instancePath + - '/device/services/' + - i6 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties - .device.anyOf[1].allOf[1] - .properties.services.items - .properties.serviceType, - data: data43, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/device/services/' + - i6 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceType.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceType, - data: data43, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid25 = _errs103 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data42.serviceId !== undefined) { - let data44 = data42.serviceId; - const _errs105 = errors; - if (typeof data44 !== 'string') { - const err61 = { - instancePath: - instancePath + - '/device/services/' + - i6 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties.serviceId - .type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceId, - data: data44, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data42.serviceDirection !== undefined) { - let data45 = data42.serviceDirection; - const _errs107 = errors; - if (typeof data45 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/device/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceDirection.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceDirection, - data: data45, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data45 === 'consumer' || - data45 === 'producer' || - data45 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/device/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema21.allOf[1].properties - .device.anyOf[1].allOf[1] - .properties.services.items - .properties.serviceDirection - .enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceDirection.enum, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceDirection, - data: data45, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err64 = { - instancePath: - instancePath + '/device/services/' + i6, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.services.items.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.services.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid24 = _errs100 === errors; - if (!valid24) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/device/services', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.services.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.services, - data: data41, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs98 === errors; - } else { - var valid21 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device.anyOf[1].allOf[1].type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[1].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid15 = _errs83 === errors; - } - var _valid0 = _errs58 === errors; - valid5 = valid5 || _valid0; - if (!valid5) { - const _errs109 = errors; - const _errs110 = errors; - if (errors === _errs110) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing9; - if ( - (data4.url === undefined && (missing9 = 'url')) || - (data4.type === undefined && (missing9 = 'type')) || - (data4.name === undefined && (missing9 = 'name')) || - (data4.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err67 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: - schema21.allOf[1].properties.device.anyOf[2].allOf[0] - .required, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data4.url !== undefined) { - let data46 = data4.url; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data46 === 'string') { - if (!formats0(data46)) { - const err68 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.url, - data: data46, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.url.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.url, - data: data46, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.name !== undefined) { - let data47 = data4.name; - const _errs114 = errors; - if (typeof data47 !== 'string') { - const err70 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.name.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.name, - data: data47, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.description !== undefined) { - let data48 = data4.description; - const _errs116 = errors; - if (typeof data48 !== 'string') { - const err71 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.description.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.description, - data: data48, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.type !== undefined) { - let data49 = data4.type; - const _errs118 = errors; - if (typeof data49 !== 'string') { - const err72 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.type.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.type, - data: data49, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data49 === 'device' || - data49 === 'group' || - data49 === 'edge instantiable' || - data49 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.type.enum, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.type, - data: data49, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid27 = _errs118 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.isPublic !== undefined) { - let data50 = data4.isPublic; - const _errs120 = errors; - if (typeof data50 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.isPublic.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.isPublic, - data: data50, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.viewer !== undefined) { - let data51 = data4.viewer; - const _errs122 = errors; - if (errors === _errs122) { - if (Array.isArray(data51)) { - var valid28 = true; - const len7 = data51.length; - for (let i7 = 0; i7 < len7; i7++) { - let data52 = data51[i7]; - const _errs124 = errors; - if (errors === _errs124) { - if ( - data52 && - typeof data52 == 'object' && - !Array.isArray(data52) - ) { - let missing10; - if ( - data52.url === undefined && - (missing10 = 'url') - ) { - const err75 = { - instancePath: - instancePath + '/device/viewer/' + i7, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items.required, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items, - data: data52, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data52.url !== undefined) { - let data53 = data52.url; - const _errs126 = errors; - if (errors === _errs126) { - if (errors === _errs126) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err76 = { - instancePath: - instancePath + - '/device/viewer/' + - i7 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.viewer.items - .properties.url, - data: data53, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + - '/device/viewer/' + - i7 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.viewer.items - .properties.url.type, - parentSchema: - schema21.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.viewer.items - .properties.url, - data: data53, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: - instancePath + '/device/viewer/' + i7, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items, - data: data52, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid28 = _errs124 === errors; - if (!valid28) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.viewer.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.viewer, - data: data51, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid27 = _errs122 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.owner !== undefined) { - let data54 = data4.owner; - const _errs128 = errors; - if (errors === _errs128) { - if (Array.isArray(data54)) { - var valid30 = true; - const len8 = data54.length; - for (let i8 = 0; i8 < len8; i8++) { - let data55 = data54[i8]; - const _errs130 = errors; - if (errors === _errs130) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - let missing11; - if ( - data55.url === undefined && - (missing11 = 'url') - ) { - const err80 = { - instancePath: - instancePath + - '/device/owner/' + - i8, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { - missingProperty: missing11, - }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[0].properties - .owner.items.required, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[0].properties - .owner.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data55.url !== undefined) { - let data56 = data55.url; - const _errs132 = errors; - if (errors === _errs132) { - if (errors === _errs132) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err81 = { - instancePath: - instancePath + - '/device/owner/' + - i8 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema21.allOf[1] - .properties.device - .anyOf[2].allOf[0] - .properties.owner.items - .properties.url, - data: data56, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + - '/device/owner/' + - i8 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema21.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.owner.items - .properties.url, - data: data56, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: - instancePath + '/device/owner/' + i8, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[0].properties.owner - .items.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[0].properties.owner - .items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid30 = _errs130 === errors; - if (!valid30) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.owner.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.owner, - data: data54, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid27 = _errs128 === errors; - } else { - var valid27 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device.anyOf[2].allOf[0].type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid26 = _errs110 === errors; - if (valid26) { - const _errs134 = errors; - if (errors === _errs134) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - if (data4.type !== undefined) { - let data57 = data4.type; - const _errs136 = errors; - if ('edge instantiable' !== data57) { - const err86 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: - schema21.allOf[1].properties.device.anyOf[2].allOf[1] - .properties.type, - data: data57, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid32 = _errs136 === errors; - } else { - var valid32 = true; - } - if (valid32) { - if (data4.codeUrl !== undefined) { - let data58 = data4.codeUrl; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data58 === 'string') { - if (!formats0(data58)) { - const err87 = { - instancePath: instancePath + '/device/codeUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.codeUrl, - data: data58, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/device/codeUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.codeUrl.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.codeUrl, - data: data58, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid32 = _errs137 === errors; - } else { - var valid32 = true; - } - if (valid32) { - if (data4.services !== undefined) { - let data59 = data4.services; - const _errs139 = errors; - if (errors === _errs139) { - if (Array.isArray(data59)) { - var valid33 = true; - const len9 = data59.length; - for (let i9 = 0; i9 < len9; i9++) { - let data60 = data59[i9]; - const _errs141 = errors; - if (errors === _errs141) { - if ( - data60 && - typeof data60 == 'object' && - !Array.isArray(data60) - ) { - if (data60.serviceType !== undefined) { - let data61 = data60.serviceType; - const _errs144 = errors; - if (errors === _errs144) { - if (errors === _errs144) { - if (typeof data61 === 'string') { - if (!formats0(data61)) { - const err89 = { - instancePath: - instancePath + - '/device/services/' + - i9 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceType, - data: data61, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + - '/device/services/' + - i9 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceType.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceType, - data: data61, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data60.serviceId !== undefined) { - let data62 = data60.serviceId; - const _errs146 = errors; - if (typeof data62 !== 'string') { - const err91 = { - instancePath: - instancePath + - '/device/services/' + - i9 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data62, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid34 = _errs146 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data60.serviceDirection !== undefined) { - let data63 = data60.serviceDirection; - const _errs148 = errors; - if (typeof data63 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/device/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection, - data: data63, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data63 === 'consumer' || - data63 === 'producer' || - data63 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/device/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema21.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection.enum, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection, - data: data63, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid34 = _errs148 === errors; - } else { - var valid34 = true; - } - } - } - } else { - const err94 = { - instancePath: - instancePath + '/device/services/' + i9, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services.items.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services.items, - data: data60, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid33 = _errs141 === errors; - if (!valid33) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/device/services', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid32 = _errs139 === errors; - } else { - var valid32 = true; - } - } - } - } else { - const err96 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device.anyOf[2].allOf[1].type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[2].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid26 = _errs134 === errors; - } - var _valid0 = _errs109 === errors; - valid5 = valid5 || _valid0; - if (!valid5) { - const _errs150 = errors; - const _errs151 = errors; - if (errors === _errs151) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing12; - if ( - (data4.url === undefined && (missing12 = 'url')) || - (data4.type === undefined && (missing12 = 'type')) || - (data4.name === undefined && (missing12 = 'name')) || - (data4.isPublic === undefined && (missing12 = 'isPublic')) - ) { - const err97 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: - schema21.allOf[1].properties.device.anyOf[3].allOf[0] - .required, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data4.url !== undefined) { - let data64 = data4.url; - const _errs153 = errors; - if (errors === _errs153) { - if (errors === _errs153) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err98 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.url.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid36 = _errs153 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.name !== undefined) { - let data65 = data4.name; - const _errs155 = errors; - if (typeof data65 !== 'string') { - const err100 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[3].allOf[0] - .properties.name.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3].allOf[0] - .properties.name, - data: data65, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid36 = _errs155 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.description !== undefined) { - let data66 = data4.description; - const _errs157 = errors; - if (typeof data66 !== 'string') { - const err101 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.description.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.description, - data: data66, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid36 = _errs157 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.type !== undefined) { - let data67 = data4.type; - const _errs159 = errors; - if (typeof data67 !== 'string') { - const err102 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type, - data: data67, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data67 === 'device' || - data67 === 'group' || - data67 === 'edge instantiable' || - data67 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type.enum, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type, - data: data67, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid36 = _errs159 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.isPublic !== undefined) { - let data68 = data4.isPublic; - const _errs161 = errors; - if (typeof data68 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.isPublic.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.isPublic, - data: data68, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.viewer !== undefined) { - let data69 = data4.viewer; - const _errs163 = errors; - if (errors === _errs163) { - if (Array.isArray(data69)) { - var valid37 = true; - const len10 = data69.length; - for (let i10 = 0; i10 < len10; i10++) { - let data70 = data69[i10]; - const _errs165 = errors; - if (errors === _errs165) { - if ( - data70 && - typeof data70 == 'object' && - !Array.isArray(data70) - ) { - let missing13; - if ( - data70.url === undefined && - (missing13 = 'url') - ) { - const err105 = { - instancePath: - instancePath + - '/device/viewer/' + - i10, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { - missingProperty: missing13, - }, - message: - "must have required property '" + - missing13 + - "'", - schema: - schema21.allOf[1].properties.device - .anyOf[3].allOf[0].properties - .viewer.items.required, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[3].allOf[0].properties - .viewer.items, - data: data70, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data70.url !== undefined) { - let data71 = data70.url; - const _errs167 = errors; - if (errors === _errs167) { - if (errors === _errs167) { - if (typeof data71 === 'string') { - if (!formats0(data71)) { - const err106 = { - instancePath: - instancePath + - '/device/viewer/' + - i10 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema21.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.viewer.items - .properties.url, - data: data71, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/device/viewer/' + - i10 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties - .device.anyOf[3].allOf[0] - .properties.viewer.items - .properties.url.type, - parentSchema: - schema21.allOf[1].properties - .device.anyOf[3].allOf[0] - .properties.viewer.items - .properties.url, - data: data71, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: - instancePath + - '/device/viewer/' + - i10, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device - .anyOf[3].allOf[0].properties.viewer - .items.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[3].allOf[0].properties.viewer - .items, - data: data70, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid37 = _errs165 === errors; - if (!valid37) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.viewer.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.viewer, - data: data69, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid36 = _errs163 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.owner !== undefined) { - let data72 = data4.owner; - const _errs169 = errors; - if (errors === _errs169) { - if (Array.isArray(data72)) { - var valid39 = true; - const len11 = data72.length; - for (let i11 = 0; i11 < len11; i11++) { - let data73 = data72[i11]; - const _errs171 = errors; - if (errors === _errs171) { - if ( - data73 && - typeof data73 == 'object' && - !Array.isArray(data73) - ) { - let missing14; - if ( - data73.url === undefined && - (missing14 = 'url') - ) { - const err110 = { - instancePath: - instancePath + - '/device/owner/' + - i11, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { - missingProperty: missing14, - }, - message: - "must have required property '" + - missing14 + - "'", - schema: - schema21.allOf[1].properties - .device.anyOf[3].allOf[0] - .properties.owner.items - .required, - parentSchema: - schema21.allOf[1].properties - .device.anyOf[3].allOf[0] - .properties.owner.items, - data: data73, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data73.url !== undefined) { - let data74 = data73.url; - const _errs173 = errors; - if (errors === _errs173) { - if (errors === _errs173) { - if ( - typeof data74 === 'string' - ) { - if (!formats0(data74)) { - const err111 = { - instancePath: - instancePath + - '/device/owner/' + - i11 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema21.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.owner - .items.properties.url, - data: data74, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/device/owner/' + - i11 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema21.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.owner.items - .properties.url, - data: data74, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: - instancePath + - '/device/owner/' + - i11, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device - .anyOf[3].allOf[0].properties - .owner.items.type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[3].allOf[0].properties - .owner.items, - data: data73, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid39 = _errs171 === errors; - if (!valid39) { - break; - } - } - } else { - const err114 = { - instancePath: - instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device - .anyOf[3].allOf[0].properties.owner - .type, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[3].allOf[0].properties.owner, - data: data72, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid36 = _errs169 === errors; - } else { - var valid36 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device.anyOf[3].allOf[0].type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid35 = _errs151 === errors; - if (valid35) { - const _errs175 = errors; - if (errors === _errs175) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing15; - if (data4.devices === undefined && (missing15 = 'devices')) { - const err116 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing15 }, - message: "must have required property '" + missing15 + "'", - schema: - schema21.allOf[1].properties.device.anyOf[3].allOf[1] - .required, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data4.type !== undefined) { - let data75 = data4.type; - const _errs177 = errors; - if ('group' !== data75) { - const err117 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: - schema21.allOf[1].properties.device.anyOf[3].allOf[1] - .properties.type, - data: data75, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid41 = _errs177 === errors; - } else { - var valid41 = true; - } - if (valid41) { - if (data4.devices !== undefined) { - let data76 = data4.devices; - const _errs178 = errors; - if (errors === _errs178) { - if (Array.isArray(data76)) { - var valid42 = true; - const len12 = data76.length; - for (let i12 = 0; i12 < len12; i12++) { - let data77 = data76[i12]; - const _errs180 = errors; - if (errors === _errs180) { - if ( - data77 && - typeof data77 == 'object' && - !Array.isArray(data77) - ) { - let missing16; - if ( - data77.url === undefined && - (missing16 = 'url') - ) { - const err118 = { - instancePath: - instancePath + '/device/devices/' + i12, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing16 }, - message: - "must have required property '" + - missing16 + - "'", - schema: - schema21.allOf[1].properties.device - .anyOf[3].allOf[1].properties.devices - .items.required, - parentSchema: - schema21.allOf[1].properties.device - .anyOf[3].allOf[1].properties.devices - .items, - data: data77, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data77.url !== undefined) { - let data78 = data77.url; - const _errs182 = errors; - if (errors === _errs182) { - if (errors === _errs182) { - if (typeof data78 === 'string') { - if (!formats0(data78)) { - const err119 = { - instancePath: - instancePath + - '/device/devices/' + - i12 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema21.allOf[1].properties - .device.anyOf[3].allOf[1] - .properties.devices.items - .properties.url, - data: data78, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + - '/device/devices/' + - i12 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema21.allOf[1].properties - .device.anyOf[3].allOf[1] - .properties.devices.items - .properties.url.type, - parentSchema: - schema21.allOf[1].properties - .device.anyOf[3].allOf[1] - .properties.devices.items - .properties.url, - data: data78, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: - instancePath + '/device/devices/' + i12, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[1].properties.devices.items.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[1].properties.devices.items, - data: data77, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid42 = _errs180 === errors; - if (!valid42) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/device/devices', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[1].properties.devices.type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3] - .allOf[1].properties.devices, - data: data76, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid41 = _errs178 === errors; - } else { - var valid41 = true; - } - } - } - } else { - const err123 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema21.allOf[1].properties.device.anyOf[3].allOf[1].type, - parentSchema: - schema21.allOf[1].properties.device.anyOf[3].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid35 = _errs175 === errors; - } - var _valid0 = _errs150 === errors; - valid5 = valid5 || _valid0; - } - } - } - if (!valid5) { - const err124 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema21.allOf[1].properties.device.anyOf, - parentSchema: schema21.allOf[1].properties.device, - data: data4, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate36.errors = vErrors; - return false; - } else { - errors = _errs16; - if (vErrors !== null) { - if (_errs16) { - vErrors.length = _errs16; - } else { - vErrors = null; - } - } - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate36.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema21.allOf[1].type, - parentSchema: schema21.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate36.errors = vErrors; - return errors === 0; -} -exports.validateDeviceOverviewUpdate = validate37; -const schema22 = { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - 'x-standalone': true, - 'x-name': 'DeviceOverviewUpdate', - 'x-location': '#/components/schemas/device_overview_update', - 'x-schema-type': 'all', -}; -function validate37( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate37.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema22.required, - parentSchema: schema22, - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs1 = errors; - if (typeof data0 !== 'string') { - validate37.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema22.properties.name.type, - parentSchema: schema22.properties.name, - data: data0, - }, - ]; - return false; - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs3 = errors; - if (typeof data1 !== 'string') { - validate37.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema22.properties.description.type, - parentSchema: schema22.properties.description, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs5 = errors; - if (typeof data2 !== 'string') { - validate37.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema22.properties.type.type, - parentSchema: schema22.properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate37.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema22.properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema22.properties.type.enum, - parentSchema: schema22.properties.type, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs5 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs7 = errors; - if (typeof data3 !== 'boolean') { - validate37.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema22.properties.isPublic.type, - parentSchema: schema22.properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid0 = _errs7 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs9 = errors; - if (errors === _errs9) { - if (Array.isArray(data4)) { - var valid1 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs11 = errors; - if (errors === _errs11) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate37.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: schema22.properties.viewer.items.required, - parentSchema: schema22.properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs13 = errors; - if (errors === _errs13) { - if (errors === _errs13) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate37.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema22.properties.viewer.items.properties - .url, - data: data6, - }, - ]; - return false; - } - } else { - validate37.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema22.properties.viewer.items.properties - .url.type, - parentSchema: - schema22.properties.viewer.items.properties - .url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate37.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema22.properties.viewer.items.type, - parentSchema: schema22.properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs11 === errors; - if (!valid1) { - break; - } - } - } else { - validate37.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema22.properties.viewer.type, - parentSchema: schema22.properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid0 = _errs9 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs15 = errors; - if (errors === _errs15) { - if (Array.isArray(data7)) { - var valid3 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs17 = errors; - if (errors === _errs17) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate37.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: schema22.properties.owner.items.required, - parentSchema: schema22.properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate37.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema22.properties.owner.items.properties - .url, - data: data9, - }, - ]; - return false; - } - } else { - validate37.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema22.properties.owner.items.properties - .url.type, - parentSchema: - schema22.properties.owner.items.properties - .url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate37.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema22.properties.owner.items.type, - parentSchema: schema22.properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid3 = _errs17 === errors; - if (!valid3) { - break; - } - } - } else { - validate37.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema22.properties.owner.type, - parentSchema: schema22.properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid0 = _errs15 === errors; - } else { - var valid0 = true; - } - } - } - } - } - } - } - } else { - validate37.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema22.type, - parentSchema: schema22, - data, - }, - ]; - return false; - } - } - validate37.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableCloudDeviceUpdate = validate38; -const schema23 = { - title: 'Instantiable Cloud Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'InstantiableCloudDeviceUpdate', - 'x-location': '#/components/schemas/device_cloud_instantiable_update', - 'x-schema-type': 'all', -}; -function validate38( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate38.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema23.allOf[0].required, - parentSchema: schema23.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate38.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema23.allOf[0].properties.name.type, - parentSchema: schema23.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate38.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema23.allOf[0].properties.description.type, - parentSchema: schema23.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate38.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema23.allOf[0].properties.type.type, - parentSchema: schema23.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate38.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema23.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema23.allOf[0].properties.type.enum, - parentSchema: schema23.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate38.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema23.allOf[0].properties.isPublic.type, - parentSchema: schema23.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate38.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema23.allOf[0].properties.viewer.items.required, - parentSchema: schema23.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate38.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema23.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate38.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema23.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema23.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate38.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema23.allOf[0].properties.viewer.items.type, - parentSchema: schema23.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate38.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema23.allOf[0].properties.viewer.type, - parentSchema: schema23.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate38.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema23.allOf[0].properties.owner.items.required, - parentSchema: - schema23.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate38.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema23.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate38.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema23.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema23.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate38.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema23.allOf[0].properties.owner.items.type, - parentSchema: schema23.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate38.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema23.allOf[0].properties.owner.type, - parentSchema: schema23.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate38.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema23.allOf[0].type, - parentSchema: schema23.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('cloud instantiable' !== data10) { - validate38.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema23.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate38.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema23.allOf[1].properties.instantiateUrl, - data: data11, - }, - ]; - return false; - } - } else { - validate38.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema23.allOf[1].properties.instantiateUrl.type, - parentSchema: schema23.allOf[1].properties.instantiateUrl, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate38.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema23.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate38.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema23.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema23.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate38.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema23.allOf[1].properties.services.items.properties - .serviceId.type, - parentSchema: - schema23.allOf[1].properties.services.items.properties - .serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate38.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema23.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema23.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate38.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema23.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema23.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema23.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate38.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema23.allOf[1].properties.services.items.type, - parentSchema: schema23.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate38.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema23.allOf[1].properties.services.type, - parentSchema: schema23.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate38.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema23.allOf[1].type, - parentSchema: schema23.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate38.errors = vErrors; - return errors === 0; -} -exports.validateConcreteDeviceUpdate = validate39; -const schema24 = { - title: 'Concrete Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'ConcreteDeviceUpdate', - 'x-location': '#/components/schemas/device_concrete_update', - 'x-schema-type': 'all', -}; -function validate39( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate39.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema24.allOf[0].required, - parentSchema: schema24.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate39.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema24.allOf[0].properties.name.type, - parentSchema: schema24.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate39.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema24.allOf[0].properties.description.type, - parentSchema: schema24.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate39.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema24.allOf[0].properties.type.type, - parentSchema: schema24.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate39.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema24.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema24.allOf[0].properties.type.enum, - parentSchema: schema24.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate39.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema24.allOf[0].properties.isPublic.type, - parentSchema: schema24.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate39.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema24.allOf[0].properties.viewer.items.required, - parentSchema: schema24.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate39.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema24.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate39.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema24.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema24.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate39.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema24.allOf[0].properties.viewer.items.type, - parentSchema: schema24.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate39.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema24.allOf[0].properties.viewer.type, - parentSchema: schema24.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate39.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema24.allOf[0].properties.owner.items.required, - parentSchema: - schema24.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate39.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema24.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate39.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema24.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema24.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate39.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema24.allOf[0].properties.owner.items.type, - parentSchema: schema24.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate39.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema24.allOf[0].properties.owner.type, - parentSchema: schema24.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate39.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema24.allOf[0].type, - parentSchema: schema24.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('device' !== data10) { - validate39.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema24.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.experiment !== undefined) { - let data11 = data.experiment; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate39.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema24.allOf[1].properties.experiment, - data: data11, - }, - ]; - return false; - } - } else { - validate39.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema24.allOf[1].properties.experiment.type, - parentSchema: schema24.allOf[1].properties.experiment, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate39.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema24.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate39.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema24.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema24.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate39.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema24.allOf[1].properties.services.items.properties - .serviceId.type, - parentSchema: - schema24.allOf[1].properties.services.items.properties - .serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate39.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema24.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema24.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate39.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema24.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema24.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema24.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate39.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema24.allOf[1].properties.services.items.type, - parentSchema: schema24.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate39.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema24.allOf[1].properties.services.type, - parentSchema: schema24.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate39.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema24.allOf[1].type, - parentSchema: schema24.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate39.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableBrowserDeviceUpdate = validate40; -const schema25 = { - title: 'Instantiable Browser Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'InstantiableBrowserDeviceUpdate', - 'x-location': '#/components/schemas/device_edge_instantiable_update', - 'x-schema-type': 'all', -}; -function validate40( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate40.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema25.allOf[0].required, - parentSchema: schema25.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate40.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema25.allOf[0].properties.name.type, - parentSchema: schema25.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate40.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema25.allOf[0].properties.description.type, - parentSchema: schema25.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate40.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema25.allOf[0].properties.type.type, - parentSchema: schema25.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate40.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema25.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema25.allOf[0].properties.type.enum, - parentSchema: schema25.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate40.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema25.allOf[0].properties.isPublic.type, - parentSchema: schema25.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate40.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema25.allOf[0].properties.viewer.items.required, - parentSchema: schema25.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate40.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema25.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate40.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema25.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema25.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate40.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema25.allOf[0].properties.viewer.items.type, - parentSchema: schema25.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate40.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema25.allOf[0].properties.viewer.type, - parentSchema: schema25.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate40.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema25.allOf[0].properties.owner.items.required, - parentSchema: - schema25.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate40.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema25.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate40.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema25.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema25.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate40.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema25.allOf[0].properties.owner.items.type, - parentSchema: schema25.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate40.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema25.allOf[0].properties.owner.type, - parentSchema: schema25.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate40.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema25.allOf[0].type, - parentSchema: schema25.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('edge instantiable' !== data10) { - validate40.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema25.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.codeUrl !== undefined) { - let data11 = data.codeUrl; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate40.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema25.allOf[1].properties.codeUrl, - data: data11, - }, - ]; - return false; - } - } else { - validate40.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema25.allOf[1].properties.codeUrl.type, - parentSchema: schema25.allOf[1].properties.codeUrl, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate40.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema25.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate40.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema25.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema25.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate40.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema25.allOf[1].properties.services.items.properties - .serviceId.type, - parentSchema: - schema25.allOf[1].properties.services.items.properties - .serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate40.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema25.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema25.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate40.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema25.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema25.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema25.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate40.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema25.allOf[1].properties.services.items.type, - parentSchema: schema25.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate40.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema25.allOf[1].properties.services.type, - parentSchema: schema25.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate40.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema25.allOf[1].type, - parentSchema: schema25.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate40.errors = vErrors; - return errors === 0; -} -exports.validateDeviceGroupUpdate = validate41; -const schema26 = { - title: 'Device Group Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'DeviceGroupUpdate', - 'x-location': '#/components/schemas/device_group_update', - 'x-schema-type': 'all', -}; -function validate41( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate41.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema26.allOf[0].required, - parentSchema: schema26.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate41.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema26.allOf[0].properties.name.type, - parentSchema: schema26.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate41.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema26.allOf[0].properties.description.type, - parentSchema: schema26.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate41.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema26.allOf[0].properties.type.type, - parentSchema: schema26.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate41.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema26.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema26.allOf[0].properties.type.enum, - parentSchema: schema26.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate41.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema26.allOf[0].properties.isPublic.type, - parentSchema: schema26.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate41.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema26.allOf[0].properties.viewer.items.required, - parentSchema: schema26.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate41.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema26.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate41.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema26.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema26.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate41.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema26.allOf[0].properties.viewer.items.type, - parentSchema: schema26.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate41.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema26.allOf[0].properties.viewer.type, - parentSchema: schema26.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate41.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema26.allOf[0].properties.owner.items.required, - parentSchema: - schema26.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate41.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema26.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate41.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema26.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema26.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate41.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema26.allOf[0].properties.owner.items.type, - parentSchema: schema26.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate41.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema26.allOf[0].properties.owner.type, - parentSchema: schema26.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate41.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema26.allOf[0].type, - parentSchema: schema26.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('group' !== data10) { - validate41.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema26.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.devices !== undefined) { - let data11 = data.devices; - const _errs25 = errors; - if (errors === _errs25) { - if (Array.isArray(data11)) { - var valid7 = true; - const len2 = data11.length; - for (let i2 = 0; i2 < len2; i2++) { - let data12 = data11[i2]; - const _errs27 = errors; - if (errors === _errs27) { - if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { - let missing3; - if (data12.url === undefined && (missing3 = 'url')) { - validate41.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema26.allOf[1].properties.devices.items.required, - parentSchema: schema26.allOf[1].properties.devices.items, - data: data12, - }, - ]; - return false; - } else { - if (data12.url !== undefined) { - let data13 = data12.url; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data13 === 'string') { - if (!formats0(data13)) { - validate41.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema26.allOf[1].properties.devices.items - .properties.url, - data: data13, - }, - ]; - return false; - } - } else { - validate41.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema26.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema26.allOf[1].properties.devices.items - .properties.url, - data: data13, - }, - ]; - return false; - } - } - } - } - } - } else { - validate41.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema26.allOf[1].properties.devices.items.type, - parentSchema: schema26.allOf[1].properties.devices.items, - data: data12, - }, - ]; - return false; - } - } - var valid7 = _errs27 === errors; - if (!valid7) { - break; - } - } - } else { - validate41.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema26.allOf[1].properties.devices.type, - parentSchema: schema26.allOf[1].properties.devices, - data: data11, - }, - ]; - return false; - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - } - } else { - validate41.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema26.allOf[1].type, - parentSchema: schema26.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate41.errors = vErrors; - return errors === 0; -} -exports.validateDeviceUpdate = validate42; -const schema27 = { - title: 'Device Update', - anyOf: [ - { - title: 'Instantiable Cloud Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Concrete Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Instantiable Browser Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Device Group Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - }, - ], - }, - ], - 'x-standalone': true, - 'x-name': 'DeviceUpdate', - 'x-location': '#/components/schemas/device_update', - 'x-schema-type': 'all', -}; -function validate42( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema27.anyOf[0].allOf[0].required, - parentSchema: schema27.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs4 = errors; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema27.anyOf[0].allOf[0].properties.name, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err2 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema27.anyOf[0].allOf[0].properties.description, - data: data1, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err3 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema27.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema27.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema27.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema27.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema27.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema27.anyOf[0].allOf[0].properties.isPublic, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - var valid3 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - const err6 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: - schema27.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema27.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - const err7 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema27.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema27.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema27.anyOf[0].allOf[0].properties.viewer, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid5 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - const err11 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema27.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema27.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - const err12 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema27.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[0].allOf[0].properties.owner.items.type, - parentSchema: - schema27.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema27.anyOf[0].allOf[0].properties.owner, - data: data7, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema27.anyOf[0].allOf[0].type, - parentSchema: schema27.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data10) { - const err17 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema27.anyOf[0].allOf[1].properties.type, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err18 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema27.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema27.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data12)) { - var valid8 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err20 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema27.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs36 = errors; - if (typeof data15 !== 'string') { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema27.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema27.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema27.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema27.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema27.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err25 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema27.anyOf[0].allOf[1].properties.services.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema27.anyOf[0].allOf[1].properties.services, - data: data12, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err27 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema27.anyOf[0].allOf[1].type, - parentSchema: schema27.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid1 = _errs24 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs40 = errors; - const _errs41 = errors; - if (errors === _errs41) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if (data.type === undefined && (missing3 = 'type')) { - const err28 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema27.anyOf[1].allOf[0].required, - parentSchema: schema27.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data.name !== undefined) { - let data17 = data.name; - const _errs43 = errors; - if (typeof data17 !== 'string') { - const err29 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema27.anyOf[1].allOf[0].properties.name, - data: data17, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid11 = _errs43 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data18 = data.description; - const _errs45 = errors; - if (typeof data18 !== 'string') { - const err30 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema27.anyOf[1].allOf[0].properties.description, - data: data18, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data19 = data.type; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err31 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema27.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data19 === 'device' || - data19 === 'group' || - data19 === 'edge instantiable' || - data19 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema27.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema27.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema27.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data20 = data.isPublic; - const _errs49 = errors; - if (typeof data20 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema27.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema27.anyOf[1].allOf[0].properties.isPublic, - data: data20, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data21 = data.viewer; - const _errs51 = errors; - if (errors === _errs51) { - if (Array.isArray(data21)) { - var valid12 = true; - const len3 = data21.length; - for (let i3 = 0; i3 < len3; i3++) { - let data22 = data21[i3]; - const _errs53 = errors; - if (errors === _errs53) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - let missing4; - if (data22.url === undefined && (missing4 = 'url')) { - const err34 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema27.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema27.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data22.url !== undefined) { - let data23 = data22.url; - const _errs55 = errors; - if (errors === _errs55) { - if (errors === _errs55) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err35 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema27.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[1].allOf[0].properties.viewer.items.type, - parentSchema: - schema27.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid12 = _errs53 === errors; - if (!valid12) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema27.anyOf[1].allOf[0].properties.viewer, - data: data21, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data24 = data.owner; - const _errs57 = errors; - if (errors === _errs57) { - if (Array.isArray(data24)) { - var valid14 = true; - const len4 = data24.length; - for (let i4 = 0; i4 < len4; i4++) { - let data25 = data24[i4]; - const _errs59 = errors; - if (errors === _errs59) { - if ( - data25 && - typeof data25 == 'object' && - !Array.isArray(data25) - ) { - let missing5; - if (data25.url === undefined && (missing5 = 'url')) { - const err39 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema27.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema27.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data25.url !== undefined) { - let data26 = data25.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data26 === 'string') { - if (!formats0(data26)) { - const err40 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[1].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema27.anyOf[1].allOf[0].properties.owner - .items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema27.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid14 = _errs59 === errors; - if (!valid14) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema27.anyOf[1].allOf[0].properties.owner, - data: data24, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid11 = _errs57 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema27.anyOf[1].allOf[0].type, - parentSchema: schema27.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid10 = _errs41 === errors; - if (valid10) { - const _errs63 = errors; - if (errors === _errs63) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data27 = data.type; - const _errs65 = errors; - if ('device' !== data27) { - const err45 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema27.anyOf[1].allOf[1].properties.type, - data: data27, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data28 = data.experiment; - const _errs66 = errors; - if (errors === _errs66) { - if (errors === _errs66) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err46 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema27.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema27.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid16 = _errs66 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data29 = data.services; - const _errs68 = errors; - if (errors === _errs68) { - if (Array.isArray(data29)) { - var valid17 = true; - const len5 = data29.length; - for (let i5 = 0; i5 < len5; i5++) { - let data30 = data29[i5]; - const _errs70 = errors; - if (errors === _errs70) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - if (data30.serviceType !== undefined) { - let data31 = data30.serviceType; - const _errs73 = errors; - if (errors === _errs73) { - if (errors === _errs73) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err48 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[1].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema27.anyOf[1].allOf[1].properties.services.items - .properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid18 = _errs73 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceId !== undefined) { - let data32 = data30.serviceId; - const _errs75 = errors; - if (typeof data32 !== 'string') { - const err50 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[1].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema27.anyOf[1].allOf[1].properties.services.items - .properties.serviceId, - data: data32, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid18 = _errs75 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceDirection !== undefined) { - let data33 = data30.serviceDirection; - const _errs77 = errors; - if (typeof data33 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema27.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data33 === 'consumer' || - data33 === 'producer' || - data33 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema27.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema27.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema27.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err53 = { - instancePath: instancePath + '/services/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[1].allOf[1].properties.services.items.type, - parentSchema: - schema27.anyOf[1].allOf[1].properties.services.items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid17 = _errs70 === errors; - if (!valid17) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema27.anyOf[1].allOf[1].properties.services, - data: data29, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid16 = _errs68 === errors; - } else { - var valid16 = true; - } - } - } - } else { - const err55 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema27.anyOf[1].allOf[1].type, - parentSchema: schema27.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid10 = _errs63 === errors; - } - var _valid0 = _errs40 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs79 = errors; - const _errs80 = errors; - if (errors === _errs80) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if (data.type === undefined && (missing6 = 'type')) { - const err56 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema27.anyOf[2].allOf[0].required, - parentSchema: schema27.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data.name !== undefined) { - let data34 = data.name; - const _errs82 = errors; - if (typeof data34 !== 'string') { - const err57 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema27.anyOf[2].allOf[0].properties.name, - data: data34, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid20 = _errs82 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.description !== undefined) { - let data35 = data.description; - const _errs84 = errors; - if (typeof data35 !== 'string') { - const err58 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema27.anyOf[2].allOf[0].properties.description, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid20 = _errs84 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.type !== undefined) { - let data36 = data.type; - const _errs86 = errors; - if (typeof data36 !== 'string') { - const err59 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema27.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data36 === 'device' || - data36 === 'group' || - data36 === 'edge instantiable' || - data36 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema27.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema27.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema27.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid20 = _errs86 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.isPublic !== undefined) { - let data37 = data.isPublic; - const _errs88 = errors; - if (typeof data37 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema27.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema27.anyOf[2].allOf[0].properties.isPublic, - data: data37, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs88 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.viewer !== undefined) { - let data38 = data.viewer; - const _errs90 = errors; - if (errors === _errs90) { - if (Array.isArray(data38)) { - var valid21 = true; - const len6 = data38.length; - for (let i6 = 0; i6 < len6; i6++) { - let data39 = data38[i6]; - const _errs92 = errors; - if (errors === _errs92) { - if ( - data39 && - typeof data39 == 'object' && - !Array.isArray(data39) - ) { - let missing7; - if (data39.url === undefined && (missing7 = 'url')) { - const err62 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema27.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema27.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data39.url !== undefined) { - let data40 = data39.url; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err63 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[2].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema27.anyOf[2].allOf[0].properties.viewer - .items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema27.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs92 === errors; - if (!valid21) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema27.anyOf[2].allOf[0].properties.viewer, - data: data38, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid20 = _errs90 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.owner !== undefined) { - let data41 = data.owner; - const _errs96 = errors; - if (errors === _errs96) { - if (Array.isArray(data41)) { - var valid23 = true; - const len7 = data41.length; - for (let i7 = 0; i7 < len7; i7++) { - let data42 = data41[i7]; - const _errs98 = errors; - if (errors === _errs98) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - let missing8; - if (data42.url === undefined && (missing8 = 'url')) { - const err67 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + missing8 + "'", - schema: - schema27.anyOf[2].allOf[0].properties.owner.items - .required, - parentSchema: - schema27.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data42.url !== undefined) { - let data43 = data42.url; - const _errs100 = errors; - if (errors === _errs100) { - if (errors === _errs100) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err68 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema27.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema27.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid23 = _errs98 === errors; - if (!valid23) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema27.anyOf[2].allOf[0].properties.owner, - data: data41, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid20 = _errs96 === errors; - } else { - var valid20 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema27.anyOf[2].allOf[0].type, - parentSchema: schema27.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid19 = _errs80 === errors; - if (valid19) { - const _errs102 = errors; - if (errors === _errs102) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs104 = errors; - if ('edge instantiable' !== data44) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema27.anyOf[2].allOf[1].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.codeUrl !== undefined) { - let data45 = data.codeUrl; - const _errs105 = errors; - if (errors === _errs105) { - if (errors === _errs105) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err74 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema27.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema27.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.services !== undefined) { - let data46 = data.services; - const _errs107 = errors; - if (errors === _errs107) { - if (Array.isArray(data46)) { - var valid26 = true; - const len8 = data46.length; - for (let i8 = 0; i8 < len8; i8++) { - let data47 = data46[i8]; - const _errs109 = errors; - if (errors === _errs109) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - if (data47.serviceType !== undefined) { - let data48 = data47.serviceType; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema27.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceId !== undefined) { - let data49 = data47.serviceId; - const _errs114 = errors; - if (typeof data49 !== 'string') { - const err78 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[2].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema27.anyOf[2].allOf[1].properties.services.items - .properties.serviceId, - data: data49, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceDirection !== undefined) { - let data50 = data47.serviceDirection; - const _errs116 = errors; - if (typeof data50 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema27.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data50 === 'consumer' || - data50 === 'producer' || - data50 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema27.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema27.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema27.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err81 = { - instancePath: instancePath + '/services/' + i8, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[2].allOf[1].properties.services.items.type, - parentSchema: - schema27.anyOf[2].allOf[1].properties.services.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid26 = _errs109 === errors; - if (!valid26) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema27.anyOf[2].allOf[1].properties.services, - data: data46, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err83 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema27.anyOf[2].allOf[1].type, - parentSchema: schema27.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid19 = _errs102 === errors; - } - var _valid0 = _errs79 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs118 = errors; - const _errs119 = errors; - if (errors === _errs119) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if (data.type === undefined && (missing9 = 'type')) { - const err84 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema27.anyOf[3].allOf[0].required, - parentSchema: schema27.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data.name !== undefined) { - let data51 = data.name; - const _errs121 = errors; - if (typeof data51 !== 'string') { - const err85 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema27.anyOf[3].allOf[0].properties.name, - data: data51, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid29 = _errs121 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.description !== undefined) { - let data52 = data.description; - const _errs123 = errors; - if (typeof data52 !== 'string') { - const err86 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema27.anyOf[3].allOf[0].properties.description, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid29 = _errs123 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.type !== undefined) { - let data53 = data.type; - const _errs125 = errors; - if (typeof data53 !== 'string') { - const err87 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema27.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema27.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data53 === 'device' || - data53 === 'group' || - data53 === 'edge instantiable' || - data53 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema27.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema27.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema27.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid29 = _errs125 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.isPublic !== undefined) { - let data54 = data.isPublic; - const _errs127 = errors; - if (typeof data54 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema27.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema27.anyOf[3].allOf[0].properties.isPublic, - data: data54, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid29 = _errs127 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.viewer !== undefined) { - let data55 = data.viewer; - const _errs129 = errors; - if (errors === _errs129) { - if (Array.isArray(data55)) { - var valid30 = true; - const len9 = data55.length; - for (let i9 = 0; i9 < len9; i9++) { - let data56 = data55[i9]; - const _errs131 = errors; - if (errors === _errs131) { - if ( - data56 && - typeof data56 == 'object' && - !Array.isArray(data56) - ) { - let missing10; - if (data56.url === undefined && (missing10 = 'url')) { - const err90 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + missing10 + "'", - schema: - schema27.anyOf[3].allOf[0].properties.viewer.items - .required, - parentSchema: - schema27.anyOf[3].allOf[0].properties.viewer - .items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data56.url !== undefined) { - let data57 = data56.url; - const _errs133 = errors; - if (errors === _errs133) { - if (errors === _errs133) { - if (typeof data57 === 'string') { - if (!formats0(data57)) { - const err91 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema27.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema27.anyOf[3].allOf[0].properties.viewer.items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid30 = _errs131 === errors; - if (!valid30) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema27.anyOf[3].allOf[0].properties.viewer, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid29 = _errs129 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.owner !== undefined) { - let data58 = data.owner; - const _errs135 = errors; - if (errors === _errs135) { - if (Array.isArray(data58)) { - var valid32 = true; - const len10 = data58.length; - for (let i10 = 0; i10 < len10; i10++) { - let data59 = data58[i10]; - const _errs137 = errors; - if (errors === _errs137) { - if ( - data59 && - typeof data59 == 'object' && - !Array.isArray(data59) - ) { - let missing11; - if (data59.url === undefined && (missing11 = 'url')) { - const err95 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema27.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema27.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data59.url !== undefined) { - let data60 = data59.url; - const _errs139 = errors; - if (errors === _errs139) { - if (errors === _errs139) { - if (typeof data60 === 'string') { - if (!formats0(data60)) { - const err96 = { - instancePath: - instancePath + - '/owner/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + '/owner/' + i10 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema27.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[3].allOf[0].properties.owner.items - .type, - parentSchema: - schema27.anyOf[3].allOf[0].properties.owner.items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid32 = _errs137 === errors; - if (!valid32) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[3].allOf[0].properties.owner.type, - parentSchema: schema27.anyOf[3].allOf[0].properties.owner, - data: data58, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid29 = _errs135 === errors; - } else { - var valid29 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema27.anyOf[3].allOf[0].type, - parentSchema: schema27.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid28 = _errs119 === errors; - if (valid28) { - const _errs141 = errors; - if (errors === _errs141) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data61 = data.type; - const _errs143 = errors; - if ('group' !== data61) { - const err101 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema27.anyOf[3].allOf[1].properties.type, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data.devices !== undefined) { - let data62 = data.devices; - const _errs144 = errors; - if (errors === _errs144) { - if (Array.isArray(data62)) { - var valid35 = true; - const len11 = data62.length; - for (let i11 = 0; i11 < len11; i11++) { - let data63 = data62[i11]; - const _errs146 = errors; - if (errors === _errs146) { - if ( - data63 && - typeof data63 == 'object' && - !Array.isArray(data63) - ) { - let missing12; - if (data63.url === undefined && (missing12 = 'url')) { - const err102 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: - "must have required property '" + missing12 + "'", - schema: - schema27.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema27.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } else { - if (data63.url !== undefined) { - let data64 = data63.url; - const _errs148 = errors; - if (errors === _errs148) { - if (errors === _errs148) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err103 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema27.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - } else { - const err104 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema27.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema27.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } - } - } - } - } else { - const err105 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema27.anyOf[3].allOf[1].properties.devices.items.type, - parentSchema: - schema27.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - var valid35 = _errs146 === errors; - if (!valid35) { - break; - } - } - } else { - const err106 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema27.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema27.anyOf[3].allOf[1].properties.devices, - data: data62, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - } - } else { - const err107 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema27.anyOf[3].allOf[1].type, - parentSchema: schema27.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid28 = _errs141 === errors; - } - var _valid0 = _errs118 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err108 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema27.anyOf, - parentSchema: schema27, - data, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - validate42.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate42.errors = vErrors; - return errors === 0; -} -exports.validateAvailabilityRule = validate43; -const schema28 = { - title: 'Availability Rule', - type: 'object', - allOf: [ - { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - { - type: 'object', - properties: { - available: { type: 'boolean' }, - repeat: { - description: - 'If specified the time slot is repeated in a fixed offset specified by the frequency', - type: 'object', - properties: { - frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, - until: { - description: 'Up to this date-time the time slot will be repeated.', - type: 'string', - format: 'date-time', - }, - count: { - description: 'How often the time slot will be repeated', - type: 'integer', - }, - }, - required: ['frequency'], - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'AvailabilityRule', - 'x-location': '#/components/schemas/availability_rule', - 'x-schema-type': 'all', -}; -function validate43( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (!(data && typeof data == 'object' && !Array.isArray(data))) { - validate43.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema28.type, - parentSchema: schema28, - data, - }, - ]; - return false; - } - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.start !== undefined) { - let data0 = data.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data0 === 'string') { - if (!formats22.validate(data0)) { - validate43.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/allOf/0/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema28.allOf[0].properties.start, - data: data0, - }, - ]; - return false; - } - } else { - validate43.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/allOf/0/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema28.allOf[0].properties.start.type, - parentSchema: schema28.allOf[0].properties.start, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.end !== undefined) { - let data1 = data.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate43.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/allOf/0/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema28.allOf[0].properties.end, - data: data1, - }, - ]; - return false; - } - } else { - validate43.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/allOf/0/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema28.allOf[0].properties.end.type, - parentSchema: schema28.allOf[0].properties.end, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate43.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema28.allOf[0].type, - parentSchema: schema28.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (valid0) { - const _errs7 = errors; - if (errors === _errs7) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.available !== undefined) { - let data2 = data.available; - const _errs9 = errors; - if (typeof data2 !== 'boolean') { - validate43.errors = [ - { - instancePath: instancePath + '/available', - schemaPath: '#/allOf/1/properties/available/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema28.allOf[1].properties.available.type, - parentSchema: schema28.allOf[1].properties.available, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs9 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.repeat !== undefined) { - let data3 = data.repeat; - const _errs11 = errors; - if (errors === _errs11) { - if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { - let missing0; - if (data3.frequency === undefined && (missing0 = 'frequency')) { - validate43.errors = [ - { - instancePath: instancePath + '/repeat', - schemaPath: '#/allOf/1/properties/repeat/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema28.allOf[1].properties.repeat.required, - parentSchema: schema28.allOf[1].properties.repeat, - data: data3, - }, - ]; - return false; - } else { - if (data3.frequency !== undefined) { - let data4 = data3.frequency; - const _errs13 = errors; - if (typeof data4 !== 'string') { - validate43.errors = [ - { - instancePath: instancePath + '/repeat/frequency', - schemaPath: - '#/allOf/1/properties/repeat/properties/frequency/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema28.allOf[1].properties.repeat.properties.frequency.type, - parentSchema: - schema28.allOf[1].properties.repeat.properties.frequency, - data: data4, - }, - ]; - return false; - } - if ( - !(data4 === 'HOURLY' || data4 === 'DAILY' || data4 === 'WEEKLY') - ) { - validate43.errors = [ - { - instancePath: instancePath + '/repeat/frequency', - schemaPath: - '#/allOf/1/properties/repeat/properties/frequency/enum', - keyword: 'enum', - params: { - allowedValues: - schema28.allOf[1].properties.repeat.properties.frequency - .enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema28.allOf[1].properties.repeat.properties.frequency.enum, - parentSchema: - schema28.allOf[1].properties.repeat.properties.frequency, - data: data4, - }, - ]; - return false; - } - var valid3 = _errs13 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.until !== undefined) { - let data5 = data3.until; - const _errs15 = errors; - if (errors === _errs15) { - if (errors === _errs15) { - if (typeof data5 === 'string') { - if (!formats22.validate(data5)) { - validate43.errors = [ - { - instancePath: instancePath + '/repeat/until', - schemaPath: - '#/allOf/1/properties/repeat/properties/until/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema28.allOf[1].properties.repeat.properties.until, - data: data5, - }, - ]; - return false; - } - } else { - validate43.errors = [ - { - instancePath: instancePath + '/repeat/until', - schemaPath: - '#/allOf/1/properties/repeat/properties/until/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema28.allOf[1].properties.repeat.properties.until - .type, - parentSchema: - schema28.allOf[1].properties.repeat.properties.until, - data: data5, - }, - ]; - return false; - } - } - } - var valid3 = _errs15 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.count !== undefined) { - let data6 = data3.count; - const _errs17 = errors; - if ( - !( - typeof data6 == 'number' && - !(data6 % 1) && - !isNaN(data6) && - isFinite(data6) - ) - ) { - validate43.errors = [ - { - instancePath: instancePath + '/repeat/count', - schemaPath: - '#/allOf/1/properties/repeat/properties/count/type', - keyword: 'type', - params: { type: 'integer' }, - message: 'must be integer', - schema: - schema28.allOf[1].properties.repeat.properties.count.type, - parentSchema: - schema28.allOf[1].properties.repeat.properties.count, - data: data6, - }, - ]; - return false; - } - var valid3 = _errs17 === errors; - } else { - var valid3 = true; - } - } - } - } - } else { - validate43.errors = [ - { - instancePath: instancePath + '/repeat', - schemaPath: '#/allOf/1/properties/repeat/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema28.allOf[1].properties.repeat.type, - parentSchema: schema28.allOf[1].properties.repeat, - data: data3, - }, - ]; - return false; - } - } - var valid2 = _errs11 === errors; - } else { - var valid2 = true; - } - } - } else { - validate43.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema28.allOf[1].type, - parentSchema: schema28.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs7 === errors; - } - validate43.errors = vErrors; - return errors === 0; -} -exports.validateMessage = validate44; -const schema29 = { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'Message', - 'x-location': '#/components/schemas/message', - 'x-schema-type': 'all', -}; -function validate44( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate44.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema29.required, - parentSchema: schema29, - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate44.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema29.properties.messageType.type, - parentSchema: schema29.properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate44.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema29.type, - parentSchema: schema29, - data, - }, - ]; - return false; - } - } - validate44.errors = vErrors; - return errors === 0; -} -exports.validateCommandMessage = validate45; -const schema30 = { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { messageType: { const: 'command' }, command: { type: 'string' } }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'CommandMessage', - 'x-location': '#/components/schemas/command_message', - 'x-schema-type': 'all', -}; -function validate45( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate45.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema30.allOf[0].required, - parentSchema: schema30.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate45.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema30.allOf[0].properties.messageType.type, - parentSchema: schema30.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate45.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema30.allOf[0].type, - parentSchema: schema30.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - validate45.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema30.allOf[1].required, - parentSchema: schema30.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('command' !== data1) { - validate45.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema30.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate45.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema30.allOf[1].properties.command.type, - parentSchema: schema30.allOf[1].properties.command, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - } - } - } else { - validate45.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema30.allOf[1].type, - parentSchema: schema30.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate45.errors = vErrors; - return errors === 0; -} -exports.validateServiceConfig = validate46; -const schema31 = { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - 'x-standalone': true, - 'x-name': 'ServiceConfig', - 'x-location': '#/components/schemas/service_config', - 'x-schema-type': 'all', -}; -function validate46( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.serviceType === undefined && (missing0 = 'serviceType')) || - (data.serviceId === undefined && (missing0 = 'serviceId')) || - (data.remoteServiceId === undefined && (missing0 = 'remoteServiceId')) - ) { - validate46.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema31.required, - parentSchema: schema31, - data, - }, - ]; - return false; - } else { - if (data.serviceType !== undefined) { - let data0 = data.serviceType; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate46.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema31.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } else { - validate46.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema31.properties.serviceType.type, - parentSchema: schema31.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs2 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.serviceId !== undefined) { - let data1 = data.serviceId; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate46.errors = [ - { - instancePath: instancePath + '/serviceId', - schemaPath: '#/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema31.properties.serviceId.type, - parentSchema: schema31.properties.serviceId, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs4 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.remoteServiceId !== undefined) { - let data2 = data.remoteServiceId; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate46.errors = [ - { - instancePath: instancePath + '/remoteServiceId', - schemaPath: '#/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema31.properties.remoteServiceId.type, - parentSchema: schema31.properties.remoteServiceId, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs6 === errors; - } else { - var valid0 = true; - } - } - } - } - } else { - validate46.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema31.type, - parentSchema: schema31, - data, - }, - ]; - return false; - } - } - validate46.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionMessage = validate47; -const schema32 = { - title: 'Create Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { messageType: { const: 'command' }, command: { type: 'string' } }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'createPeerconnection' }, - connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, - connectionUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - type: 'object', - required: ['serviceType', 'serviceId', 'remoteServiceId'], - title: 'Service Config', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - additionalProperties: true, - }, - }, - tiebreaker: { type: 'boolean' }, - config: { type: 'object', additionalProperties: true }, - }, - required: ['command', 'connectionType', 'connectionUrl', 'services', 'tiebreaker'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'CreatePeerconnectionMessage', - 'x-location': '#/components/schemas/create_peerconnection_message', - 'x-schema-type': 'all', -}; -function validate47( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate47.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema32.allOf[0].allOf[0].required, - parentSchema: schema32.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate47.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema32.allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema32.allOf[0].allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate47.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema32.allOf[0].allOf[0].type, - parentSchema: schema32.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs6 = errors; - if (errors === _errs6) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - validate47.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema32.allOf[0].allOf[1].required, - parentSchema: schema32.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs8 = errors; - if ('command' !== data1) { - validate47.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema32.allOf[0].allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs8 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate47.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema32.allOf[0].allOf[1].properties.command.type, - parentSchema: schema32.allOf[0].allOf[1].properties.command, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate47.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema32.allOf[0].allOf[1].type, - parentSchema: schema32.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs6 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.command === undefined && (missing2 = 'command')) || - (data.connectionType === undefined && (missing2 = 'connectionType')) || - (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || - (data.services === undefined && (missing2 = 'services')) || - (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) - ) { - validate47.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema32.allOf[1].required, - parentSchema: schema32.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.command !== undefined) { - let data3 = data.command; - const _errs13 = errors; - if ('createPeerconnection' !== data3) { - validate47.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'createPeerconnection' }, - message: 'must be equal to constant', - schema: 'createPeerconnection', - parentSchema: schema32.allOf[1].properties.command, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.connectionType !== undefined) { - let data4 = data.connectionType; - const _errs14 = errors; - if (typeof data4 !== 'string') { - validate47.errors = [ - { - instancePath: instancePath + '/connectionType', - schemaPath: '#/allOf/1/properties/connectionType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema32.allOf[1].properties.connectionType.type, - parentSchema: schema32.allOf[1].properties.connectionType, - data: data4, - }, - ]; - return false; - } - if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { - validate47.errors = [ - { - instancePath: instancePath + '/connectionType', - schemaPath: '#/allOf/1/properties/connectionType/enum', - keyword: 'enum', - params: { - allowedValues: schema32.allOf[1].properties.connectionType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema32.allOf[1].properties.connectionType.enum, - parentSchema: schema32.allOf[1].properties.connectionType, - data: data4, - }, - ]; - return false; - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.connectionUrl !== undefined) { - let data5 = data.connectionUrl; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate47.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema32.allOf[1].properties.connectionUrl, - data: data5, - }, - ]; - return false; - } - } else { - validate47.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema32.allOf[1].properties.connectionUrl.type, - parentSchema: schema32.allOf[1].properties.connectionUrl, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.services !== undefined) { - let data6 = data.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data6)) { - var valid5 = true; - const len0 = data6.length; - for (let i0 = 0; i0 < len0; i0++) { - let data7 = data6[i0]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing3; - if ( - (data7.serviceType === undefined && - (missing3 = 'serviceType')) || - (data7.serviceId === undefined && - (missing3 = 'serviceId')) || - (data7.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate47.errors = [ - { - instancePath: instancePath + '/services/' + i0, - schemaPath: - '#/allOf/1/properties/services/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: - "must have required property '" + missing3 + "'", - schema: - schema32.allOf[1].properties.services.items.required, - parentSchema: - schema32.allOf[1].properties.services.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.serviceType !== undefined) { - let data8 = data7.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - validate47.errors = [ - { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema32.allOf[1].properties.services.items - .properties.serviceType, - data: data8, - }, - ]; - return false; - } - } else { - validate47.errors = [ - { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema32.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema32.allOf[1].properties.services.items - .properties.serviceType, - data: data8, - }, - ]; - return false; - } - } - } - var valid6 = _errs23 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data7.serviceId !== undefined) { - let data9 = data7.serviceId; - const _errs25 = errors; - if (typeof data9 !== 'string') { - validate47.errors = [ - { - instancePath: - instancePath + '/services/' + i0 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema32.allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema32.allOf[1].properties.services.items - .properties.serviceId, - data: data9, - }, - ]; - return false; - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data7.remoteServiceId !== undefined) { - let data10 = data7.remoteServiceId; - const _errs27 = errors; - if (typeof data10 !== 'string') { - validate47.errors = [ - { - instancePath: - instancePath + - '/services/' + - i0 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema32.allOf[1].properties.services.items - .properties.remoteServiceId.type, - parentSchema: - schema32.allOf[1].properties.services.items - .properties.remoteServiceId, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } - } else { - validate47.errors = [ - { - instancePath: instancePath + '/services/' + i0, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema32.allOf[1].properties.services.items.type, - parentSchema: schema32.allOf[1].properties.services.items, - data: data7, - }, - ]; - return false; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - validate47.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema32.allOf[1].properties.services.type, - parentSchema: schema32.allOf[1].properties.services, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.tiebreaker !== undefined) { - let data11 = data.tiebreaker; - const _errs29 = errors; - if (typeof data11 !== 'boolean') { - validate47.errors = [ - { - instancePath: instancePath + '/tiebreaker', - schemaPath: '#/allOf/1/properties/tiebreaker/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema32.allOf[1].properties.tiebreaker.type, - parentSchema: schema32.allOf[1].properties.tiebreaker, - data: data11, - }, - ]; - return false; - } - var valid4 = _errs29 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.config !== undefined) { - let data12 = data.config; - const _errs31 = errors; - if (errors === _errs31) { - if ( - data12 && - typeof data12 == 'object' && - !Array.isArray(data12) - ) { - } else { - validate47.errors = [ - { - instancePath: instancePath + '/config', - schemaPath: '#/allOf/1/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema32.allOf[1].properties.config.type, - parentSchema: schema32.allOf[1].properties.config, - data: data12, - }, - ]; - return false; - } - } - var valid4 = _errs31 === errors; - } else { - var valid4 = true; - } - } - } - } - } - } - } - } else { - validate47.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema32.allOf[1].type, - parentSchema: schema32.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate47.errors = vErrors; - return errors === 0; -} -exports.validateClosePeerconnectionMessage = validate48; -const schema33 = { - title: 'Close Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { messageType: { const: 'command' }, command: { type: 'string' } }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'closePeerconnection' }, - connectionUrl: { type: 'string', format: 'uri' }, - }, - required: ['command', 'connectionUrl'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ClosePeerconnectionMessage', - 'x-location': '#/components/schemas/close_peerconnection_message', - 'x-schema-type': 'all', -}; -function validate48( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate48.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema33.allOf[0].allOf[0].required, - parentSchema: schema33.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate48.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema33.allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema33.allOf[0].allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate48.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema33.allOf[0].allOf[0].type, - parentSchema: schema33.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs6 = errors; - if (errors === _errs6) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - validate48.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema33.allOf[0].allOf[1].required, - parentSchema: schema33.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs8 = errors; - if ('command' !== data1) { - validate48.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema33.allOf[0].allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs8 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate48.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema33.allOf[0].allOf[1].properties.command.type, - parentSchema: schema33.allOf[0].allOf[1].properties.command, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate48.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema33.allOf[0].allOf[1].type, - parentSchema: schema33.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs6 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.command === undefined && (missing2 = 'command')) || - (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) - ) { - validate48.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema33.allOf[1].required, - parentSchema: schema33.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.command !== undefined) { - let data3 = data.command; - const _errs13 = errors; - if ('closePeerconnection' !== data3) { - validate48.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'closePeerconnection' }, - message: 'must be equal to constant', - schema: 'closePeerconnection', - parentSchema: schema33.allOf[1].properties.command, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.connectionUrl !== undefined) { - let data4 = data.connectionUrl; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data4 === 'string') { - if (!formats0(data4)) { - validate48.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema33.allOf[1].properties.connectionUrl, - data: data4, - }, - ]; - return false; - } - } else { - validate48.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema33.allOf[1].properties.connectionUrl.type, - parentSchema: schema33.allOf[1].properties.connectionUrl, - data: data4, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate48.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema33.allOf[1].type, - parentSchema: schema33.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate48.errors = vErrors; - return errors === 0; -} -exports.validateSignalingMessage = validate49; -const schema34 = { - title: 'Signaling Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'signaling' }, - signalingType: { type: 'string' }, - connectionUrl: { type: 'string', format: 'uri' }, - content: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'signalingType', 'connectionUrl', 'content'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'SignalingMessage', - 'x-location': '#/components/schemas/signaling_message', - 'x-schema-type': 'all', -}; -function validate49( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate49.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema34.allOf[0].required, - parentSchema: schema34.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate49.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema34.allOf[0].properties.messageType.type, - parentSchema: schema34.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate49.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema34.allOf[0].type, - parentSchema: schema34.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.signalingType === undefined && (missing1 = 'signalingType')) || - (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || - (data.content === undefined && (missing1 = 'content')) - ) { - validate49.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema34.allOf[1].required, - parentSchema: schema34.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('signaling' !== data1) { - validate49.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'signaling' }, - message: 'must be equal to constant', - schema: 'signaling', - parentSchema: schema34.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.signalingType !== undefined) { - let data2 = data.signalingType; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate49.errors = [ - { - instancePath: instancePath + '/signalingType', - schemaPath: '#/allOf/1/properties/signalingType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema34.allOf[1].properties.signalingType.type, - parentSchema: schema34.allOf[1].properties.signalingType, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.connectionUrl !== undefined) { - let data3 = data.connectionUrl; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate49.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema34.allOf[1].properties.connectionUrl, - data: data3, - }, - ]; - return false; - } - } else { - validate49.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema34.allOf[1].properties.connectionUrl.type, - parentSchema: schema34.allOf[1].properties.connectionUrl, - data: data3, - }, - ]; - return false; - } - } - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.content !== undefined) { - let data4 = data.content; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - } else { - validate49.errors = [ - { - instancePath: instancePath + '/content', - schemaPath: '#/allOf/1/properties/content/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema34.allOf[1].properties.content.type, - parentSchema: schema34.allOf[1].properties.content, - data: data4, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } else { - validate49.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema34.allOf[1].type, - parentSchema: schema34.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate49.errors = vErrors; - return errors === 0; -} -exports.validateConfigurationMessage = validate50; -const schema35 = { - title: 'Configuration Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'configuration' }, - configuration: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'configuration'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ConfigurationMessage', - 'x-location': '#/components/schemas/configuration_message', - 'x-schema-type': 'all', -}; -function validate50( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate50.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema35.allOf[0].required, - parentSchema: schema35.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate50.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema35.allOf[0].properties.messageType.type, - parentSchema: schema35.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate50.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema35.allOf[0].type, - parentSchema: schema35.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.configuration === undefined && (missing1 = 'configuration')) - ) { - validate50.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema35.allOf[1].required, - parentSchema: schema35.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('configuration' !== data1) { - validate50.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'configuration' }, - message: 'must be equal to constant', - schema: 'configuration', - parentSchema: schema35.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.configuration !== undefined) { - let data2 = data.configuration; - const _errs8 = errors; - if (errors === _errs8) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - } else { - validate50.errors = [ - { - instancePath: instancePath + '/configuration', - schemaPath: '#/allOf/1/properties/configuration/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema35.allOf[1].properties.configuration.type, - parentSchema: schema35.allOf[1].properties.configuration, - data: data2, - }, - ]; - return false; - } - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - } - } - } else { - validate50.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema35.allOf[1].type, - parentSchema: schema35.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate50.errors = vErrors; - return errors === 0; -} -exports.validateExperimentStatusChangedMessage = validate51; -const schema36 = { - title: 'Experiment Status Changed Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'experiment-status-changed' }, - status: { type: 'string' }, - message: { type: 'string' }, - }, - required: ['messageType', 'status'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ExperimentStatusChangedMessage', - 'x-location': '#/components/schemas/experiment_status_changed_message', - 'x-schema-type': 'all', -}; -function validate51( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate51.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema36.allOf[0].required, - parentSchema: schema36.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate51.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema36.allOf[0].properties.messageType.type, - parentSchema: schema36.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate51.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema36.allOf[0].type, - parentSchema: schema36.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.status === undefined && (missing1 = 'status')) - ) { - validate51.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema36.allOf[1].required, - parentSchema: schema36.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('experiment-status-changed' !== data1) { - validate51.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'experiment-status-changed' }, - message: 'must be equal to constant', - schema: 'experiment-status-changed', - parentSchema: schema36.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate51.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/1/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema36.allOf[1].properties.status.type, - parentSchema: schema36.allOf[1].properties.status, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.message !== undefined) { - let data3 = data.message; - const _errs10 = errors; - if (typeof data3 !== 'string') { - validate51.errors = [ - { - instancePath: instancePath + '/message', - schemaPath: '#/allOf/1/properties/message/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema36.allOf[1].properties.message.type, - parentSchema: schema36.allOf[1].properties.message, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate51.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema36.allOf[1].type, - parentSchema: schema36.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate51.errors = vErrors; - return errors === 0; -} -exports.validateConnectionStatus = validate52; -const schema37 = { - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - 'x-standalone': true, - 'x-name': 'ConnectionStatus', - 'x-location': '#/components/schemas/peerconnection_status', - 'x-schema-type': 'all', -}; -function validate52( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate52.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema37.type, - parentSchema: schema37, - data, - }, - ]; - return false; - } - if ( - !( - data === 'new' || - data === 'connecting' || - data === 'connected' || - data === 'disconnected' || - data === 'failed' || - data === 'closed' - ) - ) { - validate52.errors = [ - { - instancePath, - schemaPath: '#/enum', - keyword: 'enum', - params: { allowedValues: schema37.enum }, - message: 'must be equal to one of the allowed values', - schema: schema37.enum, - parentSchema: schema37, - data, - }, - ]; - return false; - } - validate52.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionCommon = validate53; -const schema38 = { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - 'x-standalone': true, - 'x-name': 'PeerconnectionCommon', - 'x-location': '#/components/schemas/peerconnection_common', - 'x-schema-type': 'all', -}; -function validate53( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate53.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema38.required, - parentSchema: schema38, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate53.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema38.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate53.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema38.properties.url.type, - parentSchema: schema38.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs3 = errors; - if (typeof data1 !== 'string') { - validate53.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema38.properties.type.type, - parentSchema: schema38.properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate53.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema38.properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema38.properties.type.enum, - parentSchema: schema38.properties.type, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs5 = errors; - if (typeof data2 !== 'string') { - validate53.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema38.properties.status.type, - parentSchema: schema38.properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate53.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema38.properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema38.properties.status.enum, - parentSchema: schema38.properties.status, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs5 === errors; - } else { - var valid0 = true; - } - } - } - } - } else { - validate53.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema38.type, - parentSchema: schema38, - data, - }, - ]; - return false; - } - } - validate53.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionOverview = validate54; -const schema39 = { - title: 'Peerconnection Overview', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-standalone': true, - 'x-name': 'PeerconnectionOverview', - 'x-location': '#/components/schemas/peerconnection_overview', - 'x-schema-type': 'all', -}; -function validate54( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate54.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema39.allOf[0].required, - parentSchema: schema39.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate54.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema39.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate54.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema39.allOf[0].properties.url.type, - parentSchema: schema39.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate54.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema39.allOf[0].properties.type.type, - parentSchema: schema39.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate54.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema39.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema39.allOf[0].properties.type.enum, - parentSchema: schema39.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate54.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema39.allOf[0].properties.status.type, - parentSchema: schema39.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate54.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema39.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema39.allOf[0].properties.status.enum, - parentSchema: schema39.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate54.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema39.allOf[0].type, - parentSchema: schema39.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate54.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema39.allOf[1].required, - parentSchema: schema39.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate54.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema39.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate54.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema39.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate54.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema39.allOf[1].properties.devices.items.required, - parentSchema: schema39.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate54.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema39.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate54.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema39.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema39.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - } - } - } else { - validate54.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema39.allOf[1].properties.devices.items.type, - parentSchema: schema39.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate54.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema39.allOf[1].properties.devices.type, - parentSchema: schema39.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate54.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema39.allOf[1].type, - parentSchema: schema39.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate54.errors = vErrors; - return errors === 0; -} -exports.validateConfiguredDeviceReference = validate55; -const schema40 = { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - 'x-standalone': true, - 'x-name': 'ConfiguredDeviceReference', - 'x-location': '#/components/schemas/configured_device_reference', - 'x-schema-type': 'all', -}; -function validate55( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.url === undefined && (missing0 = 'url')) { - validate55.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema40.required, - parentSchema: schema40, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate55.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema40.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate55.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema40.properties.url.type, - parentSchema: schema40.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.config !== undefined) { - let data1 = data.config; - const _errs3 = errors; - if (errors === _errs3) { - if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { - if (data1.services !== undefined) { - let data2 = data1.services; - const _errs5 = errors; - if (errors === _errs5) { - if (Array.isArray(data2)) { - var valid2 = true; - const len0 = data2.length; - for (let i0 = 0; i0 < len0; i0++) { - let data3 = data2[i0]; - const _errs7 = errors; - if (errors === _errs7) { - if ( - data3 && - typeof data3 == 'object' && - !Array.isArray(data3) - ) { - let missing1; - if ( - (data3.serviceType === undefined && - (missing1 = 'serviceType')) || - (data3.serviceId === undefined && - (missing1 = 'serviceId')) || - (data3.remoteServiceId === undefined && - (missing1 = 'remoteServiceId')) - ) { - validate55.errors = [ - { - instancePath: instancePath + '/config/services/' + i0, - schemaPath: - '#/properties/config/properties/services/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema40.properties.config.properties.services.items - .required, - parentSchema: - schema40.properties.config.properties.services.items, - data: data3, - }, - ]; - return false; - } else { - if (data3.serviceType !== undefined) { - let data4 = data3.serviceType; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data4 === 'string') { - if (!formats0(data4)) { - validate55.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/serviceType', - schemaPath: - '#/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema40.properties.config.properties - .services.items.properties.serviceType, - data: data4, - }, - ]; - return false; - } - } else { - validate55.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/serviceType', - schemaPath: - '#/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema40.properties.config.properties.services - .items.properties.serviceType.type, - parentSchema: - schema40.properties.config.properties.services - .items.properties.serviceType, - data: data4, - }, - ]; - return false; - } - } - } - var valid3 = _errs10 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.serviceId !== undefined) { - let data5 = data3.serviceId; - const _errs12 = errors; - if (typeof data5 !== 'string') { - validate55.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/serviceId', - schemaPath: - '#/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema40.properties.config.properties.services - .items.properties.serviceId.type, - parentSchema: - schema40.properties.config.properties.services - .items.properties.serviceId, - data: data5, - }, - ]; - return false; - } - var valid3 = _errs12 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.remoteServiceId !== undefined) { - let data6 = data3.remoteServiceId; - const _errs14 = errors; - if (typeof data6 !== 'string') { - validate55.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/remoteServiceId', - schemaPath: - '#/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema40.properties.config.properties.services - .items.properties.remoteServiceId.type, - parentSchema: - schema40.properties.config.properties.services - .items.properties.remoteServiceId, - data: data6, - }, - ]; - return false; - } - var valid3 = _errs14 === errors; - } else { - var valid3 = true; - } - } - } - } - } else { - validate55.errors = [ - { - instancePath: instancePath + '/config/services/' + i0, - schemaPath: - '#/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema40.properties.config.properties.services.items - .type, - parentSchema: - schema40.properties.config.properties.services.items, - data: data3, - }, - ]; - return false; - } - } - var valid2 = _errs7 === errors; - if (!valid2) { - break; - } - } - } else { - validate55.errors = [ - { - instancePath: instancePath + '/config/services', - schemaPath: '#/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema40.properties.config.properties.services.type, - parentSchema: schema40.properties.config.properties.services, - data: data2, - }, - ]; - return false; - } - } - } - } else { - validate55.errors = [ - { - instancePath: instancePath + '/config', - schemaPath: '#/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema40.properties.config.type, - parentSchema: schema40.properties.config, - data: data1, - }, - ]; - return false; - } - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - } - } - } else { - validate55.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema40.type, - parentSchema: schema40, - data, - }, - ]; - return false; - } - } - validate55.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnection = validate56; -const schema41 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'Peerconnection', - 'x-location': '#/components/schemas/peerconnection', - 'x-schema-type': 'all', -}; -function validate56( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate56.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema41.allOf[0].required, - parentSchema: schema41.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate56.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema41.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate56.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema41.allOf[0].properties.url.type, - parentSchema: schema41.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate56.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema41.allOf[0].properties.type.type, - parentSchema: schema41.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate56.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema41.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema41.allOf[0].properties.type.enum, - parentSchema: schema41.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate56.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema41.allOf[0].properties.status.type, - parentSchema: schema41.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate56.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema41.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema41.allOf[0].properties.status.enum, - parentSchema: schema41.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate56.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema41.allOf[0].type, - parentSchema: schema41.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate56.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema41.allOf[1].required, - parentSchema: schema41.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate56.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema41.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate56.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema41.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate56.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema41.allOf[1].properties.devices.items.required, - parentSchema: schema41.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate56.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema41.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate56.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema41.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema41.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.config !== undefined) { - let data6 = data4.config; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - if (data6.services !== undefined) { - let data7 = data6.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid6 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing3; - if ( - (data8.serviceType === undefined && - (missing3 = 'serviceType')) || - (data8.serviceId === undefined && - (missing3 = 'serviceId')) || - (data8.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate56.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema41.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema41.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.serviceType !== undefined) { - let data9 = data8.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate56.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema41.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } else { - validate56.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema41.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema41.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data8.serviceId !== undefined) { - let data10 = data8.serviceId; - const _errs25 = errors; - if (typeof data10 !== 'string') { - validate56.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema41.allOf[1].properties - .devices.items.properties - .config.properties - .services.items.properties - .serviceId.type, - parentSchema: - schema41.allOf[1].properties - .devices.items.properties - .config.properties - .services.items.properties - .serviceId, - data: data10, - }, - ]; - return false; - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data8.remoteServiceId !== - undefined - ) { - let data11 = - data8.remoteServiceId; - const _errs27 = errors; - if (typeof data11 !== 'string') { - validate56.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema41.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema41.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data11, - }, - ]; - return false; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate56.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema41.allOf[1].properties.devices - .items.properties.config - .properties.services.items.type, - parentSchema: - schema41.allOf[1].properties.devices - .items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } - } - var valid6 = _errs20 === errors; - if (!valid6) { - break; - } - } - } else { - validate56.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema41.allOf[1].properties.devices.items - .properties.config.properties.services - .type, - parentSchema: - schema41.allOf[1].properties.devices.items - .properties.config.properties.services, - data: data7, - }, - ]; - return false; - } - } - } - } else { - validate56.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema41.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema41.allOf[1].properties.devices.items - .properties.config, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate56.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema41.allOf[1].properties.devices.items.type, - parentSchema: schema41.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate56.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema41.allOf[1].properties.devices.type, - parentSchema: schema41.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate56.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema41.allOf[1].type, - parentSchema: schema41.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate56.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionClosedEventCallback = validate57; -const schema42 = { - title: 'Peerconnection Closed Event Callback', - allOf: [ - { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - eventType: { type: 'string', enum: ['peerconnection-closed'] }, - peerconnection: { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: [ - 'new', - 'connecting', - 'connected', - 'disconnected', - 'failed', - 'closed', - ], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - }, - required: ['eventType', 'peerconnection'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'PeerconnectionClosedEventCallback', - 'x-location': '#/components/schemas/peerconnection_closed', - 'x-schema-type': 'all', -}; -function validate57( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate57.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema42.allOf[0].allOf[0].required, - parentSchema: schema42.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate57.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema42.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema42.allOf[0].allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate57.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema42.allOf[0].allOf[0].type, - parentSchema: schema42.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate57.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema42.allOf[0].allOf[1].required, - parentSchema: schema42.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs7 = errors; - if (typeof data1 !== 'string') { - validate57.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema42.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema42.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate57.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: - schema42.allOf[0].allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema42.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema42.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs7 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate57.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema42.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema42.allOf[0].allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate57.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema42.allOf[0].allOf[1].type, - parentSchema: schema42.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.eventType === undefined && (missing2 = 'eventType')) || - (data.peerconnection === undefined && (missing2 = 'peerconnection')) - ) { - validate57.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema42.allOf[1].required, - parentSchema: schema42.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.eventType !== undefined) { - let data3 = data.eventType; - const _errs13 = errors; - if (typeof data3 !== 'string') { - validate57.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema42.allOf[1].properties.eventType.type, - parentSchema: schema42.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - if (!(data3 === 'peerconnection-closed')) { - validate57.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/enum', - keyword: 'enum', - params: { allowedValues: schema42.allOf[1].properties.eventType.enum }, - message: 'must be equal to one of the allowed values', - schema: schema42.allOf[1].properties.eventType.enum, - parentSchema: schema42.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.peerconnection !== undefined) { - let data4 = data.peerconnection; - const _errs15 = errors; - const _errs16 = errors; - if (errors === _errs16) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing3; - if ( - (data4.url === undefined && (missing3 = 'url')) || - (data4.type === undefined && (missing3 = 'type')) || - (data4.status === undefined && (missing3 = 'status')) - ) { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema42.allOf[1].properties.peerconnection.allOf[0].required, - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.url.type, - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid6 = _errs18 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data4.type !== undefined) { - let data6 = data4.type; - const _errs20 = errors; - if (typeof data6 !== 'string') { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.type.type, - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data6, - }, - ]; - return false; - } - if (!(data6 === 'local' || data6 === 'webrtc')) { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data6, - }, - ]; - return false; - } - var valid6 = _errs20 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data4.status !== undefined) { - let data7 = data4.status; - const _errs22 = errors; - if (typeof data7 !== 'string') { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection/status', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.status.type, - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.status, - data: data7, - }, - ]; - return false; - } - if ( - !( - data7 === 'new' || - data7 === 'connecting' || - data7 === 'connected' || - data7 === 'disconnected' || - data7 === 'failed' || - data7 === 'closed' - ) - ) { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection/status', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', - keyword: 'enum', - params: { - allowedValues: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.status.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.status.enum, - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] - .properties.status, - data: data7, - }, - ]; - return false; - } - var valid6 = _errs22 === errors; - } else { - var valid6 = true; - } - } - } - } - } else { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema42.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema42.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs16 === errors; - if (valid5) { - const _errs24 = errors; - if (errors === _errs24) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing4; - if (data4.devices === undefined && (missing4 = 'devices')) { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: - schema42.allOf[1].properties.peerconnection.allOf[1].required, - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } else { - if (data4.devices !== undefined) { - let data8 = data4.devices; - const _errs26 = errors; - if (errors === _errs26) { - if (Array.isArray(data8)) { - if (data8.length > 2) { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data8, - }, - ]; - return false; - } else { - if (data8.length < 2) { - validate57.errors = [ - { - instancePath: - instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data8, - }, - ]; - return false; - } else { - var valid8 = true; - const len0 = data8.length; - for (let i0 = 0; i0 < len0; i0++) { - let data9 = data8[i0]; - const _errs28 = errors; - if (errors === _errs28) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing5; - if (data9.url === undefined && (missing5 = 'url')) { - validate57.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + - missing5 + - "'", - schema: - schema42.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items - .required, - parentSchema: - schema42.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs30 = errors; - if (errors === _errs30) { - if (errors === _errs30) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate57.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema42.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate57.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema42.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url.type, - parentSchema: - schema42.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - var valid9 = _errs30 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data9.config !== undefined) { - let data11 = data9.config; - const _errs32 = errors; - if (errors === _errs32) { - if ( - data11 && - typeof data11 == 'object' && - !Array.isArray(data11) - ) { - if (data11.services !== undefined) { - let data12 = data11.services; - const _errs34 = errors; - if (errors === _errs34) { - if (Array.isArray(data12)) { - var valid11 = true; - const len1 = data12.length; - for (let i1 = 0; i1 < len1; i1++) { - let data13 = data12[i1]; - const _errs36 = errors; - if (errors === _errs36) { - if ( - data13 && - typeof data13 == 'object' && - !Array.isArray(data13) - ) { - let missing6; - if ( - (data13.serviceType === - undefined && - (missing6 = - 'serviceType')) || - (data13.serviceId === - undefined && - (missing6 = - 'serviceId')) || - (data13.remoteServiceId === - undefined && - (missing6 = - 'remoteServiceId')) - ) { - validate57.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: - missing6, - }, - message: - "must have required property '" + - missing6 + - "'", - schema: - schema42.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.required, - parentSchema: - schema42.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data13, - }, - ]; - return false; - } else { - if ( - data13.serviceType !== - undefined - ) { - let data14 = - data13.serviceType; - const _errs39 = errors; - if (errors === _errs39) { - if ( - errors === _errs39 - ) { - if ( - typeof data14 === - 'string' - ) { - if ( - !formats0(data14) - ) { - validate57.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: - 'format', - params: { - format: - 'uri', - }, - message: - 'must match format "' + - 'uri' + - '"', - schema: - 'uri', - parentSchema: - schema42 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate57.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema42 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType - .type, - parentSchema: - schema42 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid12 = - _errs39 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data13.serviceId !== - undefined - ) { - let data15 = - data13.serviceId; - const _errs41 = errors; - if ( - typeof data15 !== - 'string' - ) { - validate57.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema42 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId - .type, - parentSchema: - schema42 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId, - data: data15, - }, - ]; - return false; - } - var valid12 = - _errs41 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data13.remoteServiceId !== - undefined - ) { - let data16 = - data13.remoteServiceId; - const _errs43 = - errors; - if ( - typeof data16 !== - 'string' - ) { - validate57.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema42 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId - .type, - parentSchema: - schema42 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId, - data: data16, - }, - ]; - return false; - } - var valid12 = - _errs43 === errors; - } else { - var valid12 = true; - } - } - } - } - } else { - validate57.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { - type: 'object', - }, - message: 'must be object', - schema: - schema42.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.type, - parentSchema: - schema42.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data13, - }, - ]; - return false; - } - } - var valid11 = _errs36 === errors; - if (!valid11) { - break; - } - } - } else { - validate57.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema42.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services.type, - parentSchema: - schema42.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services, - data: data12, - }, - ]; - return false; - } - } - } - } else { - validate57.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema42.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config.type, - parentSchema: - schema42.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config, - data: data11, - }, - ]; - return false; - } - } - var valid9 = _errs32 === errors; - } else { - var valid9 = true; - } - } - } - } else { - validate57.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema42.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items.type, - parentSchema: - schema42.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data9, - }, - ]; - return false; - } - } - var valid8 = _errs28 === errors; - if (!valid8) { - break; - } - } - } - } - } else { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema42.allOf[1].properties.peerconnection.allOf[1] - .properties.devices.type, - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data8, - }, - ]; - return false; - } - } - } - } - } else { - validate57.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema42.allOf[1].properties.peerconnection.allOf[1].type, - parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs24 === errors; - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate57.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema42.allOf[1].type, - parentSchema: schema42.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate57.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionStatusChangedEventCallback = validate58; -const schema43 = { - title: 'Peerconnection Status Changed Event Callback', - allOf: [ - { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - eventType: { type: 'string', enum: ['peerconnection-status-changed'] }, - peerconnection: { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: [ - 'new', - 'connecting', - 'connected', - 'disconnected', - 'failed', - 'closed', - ], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - }, - required: ['eventType', 'peerconnection'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'PeerconnectionStatusChangedEventCallback', - 'x-location': '#/components/schemas/peerconnection_status_changed', - 'x-schema-type': 'all', -}; -function validate58( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate58.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema43.allOf[0].allOf[0].required, - parentSchema: schema43.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate58.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema43.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema43.allOf[0].allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate58.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema43.allOf[0].allOf[0].type, - parentSchema: schema43.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate58.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema43.allOf[0].allOf[1].required, - parentSchema: schema43.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs7 = errors; - if (typeof data1 !== 'string') { - validate58.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema43.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema43.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate58.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: - schema43.allOf[0].allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema43.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema43.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs7 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate58.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema43.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema43.allOf[0].allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate58.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema43.allOf[0].allOf[1].type, - parentSchema: schema43.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.eventType === undefined && (missing2 = 'eventType')) || - (data.peerconnection === undefined && (missing2 = 'peerconnection')) - ) { - validate58.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema43.allOf[1].required, - parentSchema: schema43.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.eventType !== undefined) { - let data3 = data.eventType; - const _errs13 = errors; - if (typeof data3 !== 'string') { - validate58.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema43.allOf[1].properties.eventType.type, - parentSchema: schema43.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - if (!(data3 === 'peerconnection-status-changed')) { - validate58.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/enum', - keyword: 'enum', - params: { allowedValues: schema43.allOf[1].properties.eventType.enum }, - message: 'must be equal to one of the allowed values', - schema: schema43.allOf[1].properties.eventType.enum, - parentSchema: schema43.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.peerconnection !== undefined) { - let data4 = data.peerconnection; - const _errs15 = errors; - const _errs16 = errors; - if (errors === _errs16) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing3; - if ( - (data4.url === undefined && (missing3 = 'url')) || - (data4.type === undefined && (missing3 = 'type')) || - (data4.status === undefined && (missing3 = 'status')) - ) { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema43.allOf[1].properties.peerconnection.allOf[0].required, - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.url.type, - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid6 = _errs18 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data4.type !== undefined) { - let data6 = data4.type; - const _errs20 = errors; - if (typeof data6 !== 'string') { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.type.type, - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data6, - }, - ]; - return false; - } - if (!(data6 === 'local' || data6 === 'webrtc')) { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data6, - }, - ]; - return false; - } - var valid6 = _errs20 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data4.status !== undefined) { - let data7 = data4.status; - const _errs22 = errors; - if (typeof data7 !== 'string') { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection/status', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.status.type, - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.status, - data: data7, - }, - ]; - return false; - } - if ( - !( - data7 === 'new' || - data7 === 'connecting' || - data7 === 'connected' || - data7 === 'disconnected' || - data7 === 'failed' || - data7 === 'closed' - ) - ) { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection/status', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', - keyword: 'enum', - params: { - allowedValues: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.status.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.status.enum, - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] - .properties.status, - data: data7, - }, - ]; - return false; - } - var valid6 = _errs22 === errors; - } else { - var valid6 = true; - } - } - } - } - } else { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema43.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema43.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs16 === errors; - if (valid5) { - const _errs24 = errors; - if (errors === _errs24) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing4; - if (data4.devices === undefined && (missing4 = 'devices')) { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: - schema43.allOf[1].properties.peerconnection.allOf[1].required, - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } else { - if (data4.devices !== undefined) { - let data8 = data4.devices; - const _errs26 = errors; - if (errors === _errs26) { - if (Array.isArray(data8)) { - if (data8.length > 2) { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data8, - }, - ]; - return false; - } else { - if (data8.length < 2) { - validate58.errors = [ - { - instancePath: - instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data8, - }, - ]; - return false; - } else { - var valid8 = true; - const len0 = data8.length; - for (let i0 = 0; i0 < len0; i0++) { - let data9 = data8[i0]; - const _errs28 = errors; - if (errors === _errs28) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing5; - if (data9.url === undefined && (missing5 = 'url')) { - validate58.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + - missing5 + - "'", - schema: - schema43.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items - .required, - parentSchema: - schema43.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs30 = errors; - if (errors === _errs30) { - if (errors === _errs30) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate58.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema43.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate58.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema43.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url.type, - parentSchema: - schema43.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - var valid9 = _errs30 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data9.config !== undefined) { - let data11 = data9.config; - const _errs32 = errors; - if (errors === _errs32) { - if ( - data11 && - typeof data11 == 'object' && - !Array.isArray(data11) - ) { - if (data11.services !== undefined) { - let data12 = data11.services; - const _errs34 = errors; - if (errors === _errs34) { - if (Array.isArray(data12)) { - var valid11 = true; - const len1 = data12.length; - for (let i1 = 0; i1 < len1; i1++) { - let data13 = data12[i1]; - const _errs36 = errors; - if (errors === _errs36) { - if ( - data13 && - typeof data13 == 'object' && - !Array.isArray(data13) - ) { - let missing6; - if ( - (data13.serviceType === - undefined && - (missing6 = - 'serviceType')) || - (data13.serviceId === - undefined && - (missing6 = - 'serviceId')) || - (data13.remoteServiceId === - undefined && - (missing6 = - 'remoteServiceId')) - ) { - validate58.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: - missing6, - }, - message: - "must have required property '" + - missing6 + - "'", - schema: - schema43.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.required, - parentSchema: - schema43.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data13, - }, - ]; - return false; - } else { - if ( - data13.serviceType !== - undefined - ) { - let data14 = - data13.serviceType; - const _errs39 = errors; - if (errors === _errs39) { - if ( - errors === _errs39 - ) { - if ( - typeof data14 === - 'string' - ) { - if ( - !formats0(data14) - ) { - validate58.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: - 'format', - params: { - format: - 'uri', - }, - message: - 'must match format "' + - 'uri' + - '"', - schema: - 'uri', - parentSchema: - schema43 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate58.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema43 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType - .type, - parentSchema: - schema43 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid12 = - _errs39 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data13.serviceId !== - undefined - ) { - let data15 = - data13.serviceId; - const _errs41 = errors; - if ( - typeof data15 !== - 'string' - ) { - validate58.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema43 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId - .type, - parentSchema: - schema43 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId, - data: data15, - }, - ]; - return false; - } - var valid12 = - _errs41 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data13.remoteServiceId !== - undefined - ) { - let data16 = - data13.remoteServiceId; - const _errs43 = - errors; - if ( - typeof data16 !== - 'string' - ) { - validate58.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema43 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId - .type, - parentSchema: - schema43 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId, - data: data16, - }, - ]; - return false; - } - var valid12 = - _errs43 === errors; - } else { - var valid12 = true; - } - } - } - } - } else { - validate58.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { - type: 'object', - }, - message: 'must be object', - schema: - schema43.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.type, - parentSchema: - schema43.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data13, - }, - ]; - return false; - } - } - var valid11 = _errs36 === errors; - if (!valid11) { - break; - } - } - } else { - validate58.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema43.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services.type, - parentSchema: - schema43.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services, - data: data12, - }, - ]; - return false; - } - } - } - } else { - validate58.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema43.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config.type, - parentSchema: - schema43.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config, - data: data11, - }, - ]; - return false; - } - } - var valid9 = _errs32 === errors; - } else { - var valid9 = true; - } - } - } - } else { - validate58.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema43.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items.type, - parentSchema: - schema43.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data9, - }, - ]; - return false; - } - } - var valid8 = _errs28 === errors; - if (!valid8) { - break; - } - } - } - } - } else { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema43.allOf[1].properties.peerconnection.allOf[1] - .properties.devices.type, - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data8, - }, - ]; - return false; - } - } - } - } - } else { - validate58.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema43.allOf[1].properties.peerconnection.allOf[1].type, - parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs24 === errors; - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate58.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema43.allOf[1].type, - parentSchema: schema43.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate58.errors = vErrors; - return errors === 0; -} -exports.validateChangedUrl = validate59; -const schema44 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'ChangedUrl', - 'x-location': '#/components/parameters/device_changed_url/schema', - 'x-schema-type': 'all', -}; -function validate59( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate59.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema44, - data, - }, - ]; - return false; - } - } else { - validate59.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema44.type, - parentSchema: schema44, - data, - }, - ]; - return false; - } - } - } - validate59.errors = vErrors; - return errors === 0; -} -exports.validateDeviceId = validate60; -const schema45 = { - type: 'string', - format: 'uuid', - 'x-standalone': false, - 'x-name': 'DeviceId', - 'x-location': '#/components/parameters/device_id/schema', - 'x-schema-type': 'all', -}; -const formats258 = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; -function validate60( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats258.test(data)) { - validate60.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uuid' }, - message: 'must match format "' + 'uuid' + '"', - schema: 'uuid', - parentSchema: schema45, - data, - }, - ]; - return false; - } - } else { - validate60.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema45.type, - parentSchema: schema45, - data, - }, - ]; - return false; - } - } - } - validate60.errors = vErrors; - return errors === 0; -} -exports.validateFlatGroup = validate61; -const schema46 = { - type: 'boolean', - default: false, - 'x-standalone': false, - 'x-name': 'FlatGroup', - 'x-location': '#/components/parameters/flat_group/schema', - 'x-schema-type': 'all', -}; -function validate61( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'boolean') { - validate61.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema46.type, - parentSchema: schema46, - data, - }, - ]; - return false; - } - validate61.errors = vErrors; - return errors === 0; -} -exports.validateStartTime = validate62; -const schema47 = { - type: 'string', - format: 'date-time', - 'x-standalone': false, - 'x-name': 'StartTime', - 'x-location': '#/components/parameters/start_time/schema', - 'x-schema-type': 'all', -}; -function validate62( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats22.validate(data)) { - validate62.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema47, - data, - }, - ]; - return false; - } - } else { - validate62.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema47.type, - parentSchema: schema47, - data, - }, - ]; - return false; - } - } - } - validate62.errors = vErrors; - return errors === 0; -} -exports.validateEndTime = validate63; -const schema48 = { - type: 'string', - format: 'date-time', - 'x-standalone': false, - 'x-name': 'EndTime', - 'x-location': '#/components/parameters/end_time/schema', - 'x-schema-type': 'all', -}; -function validate63( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats22.validate(data)) { - validate63.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema48, - data, - }, - ]; - return false; - } - } else { - validate63.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema48.type, - parentSchema: schema48, - data, - }, - ]; - return false; - } - } - } - validate63.errors = vErrors; - return errors === 0; -} -exports.validateClosedUrl = validate64; -const schema49 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'ClosedUrl', - 'x-location': '#/components/parameters/closed_url/schema', - 'x-schema-type': 'all', -}; -function validate64( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate64.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema49, - data, - }, - ]; - return false; - } - } else { - validate64.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema49.type, - parentSchema: schema49, - data, - }, - ]; - return false; - } - } - } - validate64.errors = vErrors; - return errors === 0; -} -exports.validateStatusChangedUrl = validate65; -const schema50 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'StatusChangedUrl', - 'x-location': '#/components/parameters/status_changed_url/schema', - 'x-schema-type': 'all', -}; -function validate65( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate65.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema50, - data, - }, - ]; - return false; - } - } else { - validate65.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema50.type, - parentSchema: schema50, - data, - }, - ]; - return false; - } - } - } - validate65.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionId = validate66; -const schema51 = { - type: 'string', - format: 'uuid', - 'x-standalone': false, - 'x-name': 'PeerconnectionId', - 'x-location': '#/components/parameters/peerconnection_id/schema', - 'x-schema-type': 'all', -}; -function validate66( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats258.test(data)) { - validate66.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uuid' }, - message: 'must match format "' + 'uuid' + '"', - schema: 'uuid', - parentSchema: schema51, - data, - }, - ]; - return false; - } - } else { - validate66.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema51.type, - parentSchema: schema51, - data, - }, - ]; - return false; - } - } - } - validate66.errors = vErrors; - return errors === 0; -} -exports.validateDeviceUrl = validate67; -const schema52 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'DeviceUrl', - 'x-location': '#/components/parameters/device_url/schema', - 'x-schema-type': 'all', -}; -function validate67( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate67.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema52, - data, - }, - ]; - return false; - } - } else { - validate67.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema52.type, - parentSchema: schema52, - data, - }, - ]; - return false; - } - } - } - validate67.errors = vErrors; - return errors === 0; -} -exports.validateListDevicesResponse200 = validate68; -const schema53 = { - type: 'array', - items: { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - 'x-standalone': false, - 'x-name': 'listDevicesResponse200', - 'x-location': '#/paths//devices/get/responses/200/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate68( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if ( - (data0.url === undefined && (missing0 = 'url')) || - (data0.type === undefined && (missing0 = 'type')) || - (data0.name === undefined && (missing0 = 'name')) || - (data0.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate68.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema53.items.required, - parentSchema: schema53.items, - data: data0, - }, - ]; - return false; - } else { - if (data0.url !== undefined) { - let data1 = data0.url; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats0(data1)) { - validate68.errors = [ - { - instancePath: instancePath + '/' + i0 + '/url', - schemaPath: '#/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema53.items.properties.url, - data: data1, - }, - ]; - return false; - } - } else { - validate68.errors = [ - { - instancePath: instancePath + '/' + i0 + '/url', - schemaPath: '#/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema53.items.properties.url.type, - parentSchema: schema53.items.properties.url, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.name !== undefined) { - let data2 = data0.name; - const _errs5 = errors; - if (typeof data2 !== 'string') { - validate68.errors = [ - { - instancePath: instancePath + '/' + i0 + '/name', - schemaPath: '#/items/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema53.items.properties.name.type, - parentSchema: schema53.items.properties.name, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.description !== undefined) { - let data3 = data0.description; - const _errs7 = errors; - if (typeof data3 !== 'string') { - validate68.errors = [ - { - instancePath: instancePath + '/' + i0 + '/description', - schemaPath: '#/items/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema53.items.properties.description.type, - parentSchema: schema53.items.properties.description, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs7 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.type !== undefined) { - let data4 = data0.type; - const _errs9 = errors; - if (typeof data4 !== 'string') { - validate68.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema53.items.properties.type.type, - parentSchema: schema53.items.properties.type, - data: data4, - }, - ]; - return false; - } - if ( - !( - data4 === 'device' || - data4 === 'group' || - data4 === 'edge instantiable' || - data4 === 'cloud instantiable' - ) - ) { - validate68.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema53.items.properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema53.items.properties.type.enum, - parentSchema: schema53.items.properties.type, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs9 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.isPublic !== undefined) { - let data5 = data0.isPublic; - const _errs11 = errors; - if (typeof data5 !== 'boolean') { - validate68.errors = [ - { - instancePath: instancePath + '/' + i0 + '/isPublic', - schemaPath: '#/items/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema53.items.properties.isPublic.type, - parentSchema: schema53.items.properties.isPublic, - data: data5, - }, - ]; - return false; - } - var valid1 = _errs11 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.viewer !== undefined) { - let data6 = data0.viewer; - const _errs13 = errors; - if (errors === _errs13) { - if (Array.isArray(data6)) { - var valid2 = true; - const len1 = data6.length; - for (let i1 = 0; i1 < len1; i1++) { - let data7 = data6[i1]; - const _errs15 = errors; - if (errors === _errs15) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing1; - if (data7.url === undefined && (missing1 = 'url')) { - validate68.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/viewer/' + i1, - schemaPath: - '#/items/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + - missing1 + - "'", - schema: - schema53.items.properties.viewer.items - .required, - parentSchema: - schema53.items.properties.viewer.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.url !== undefined) { - let data8 = data7.url; - const _errs17 = errors; - if (errors === _errs17) { - if (errors === _errs17) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - validate68.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/viewer/' + - i1 + - '/url', - schemaPath: - '#/items/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema53.items.properties.viewer - .items.properties.url, - data: data8, - }, - ]; - return false; - } - } else { - validate68.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/viewer/' + - i1 + - '/url', - schemaPath: - '#/items/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema53.items.properties.viewer.items - .properties.url.type, - parentSchema: - schema53.items.properties.viewer.items - .properties.url, - data: data8, - }, - ]; - return false; - } - } - } - } - } - } else { - validate68.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/viewer/' + i1, - schemaPath: - '#/items/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema53.items.properties.viewer.items.type, - parentSchema: - schema53.items.properties.viewer.items, - data: data7, - }, - ]; - return false; - } - } - var valid2 = _errs15 === errors; - if (!valid2) { - break; - } - } - } else { - validate68.errors = [ - { - instancePath: instancePath + '/' + i0 + '/viewer', - schemaPath: '#/items/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema53.items.properties.viewer.type, - parentSchema: schema53.items.properties.viewer, - data: data6, - }, - ]; - return false; - } - } - var valid1 = _errs13 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.owner !== undefined) { - let data9 = data0.owner; - const _errs19 = errors; - if (errors === _errs19) { - if (Array.isArray(data9)) { - var valid4 = true; - const len2 = data9.length; - for (let i2 = 0; i2 < len2; i2++) { - let data10 = data9[i2]; - const _errs21 = errors; - if (errors === _errs21) { - if ( - data10 && - typeof data10 == 'object' && - !Array.isArray(data10) - ) { - let missing2; - if ( - data10.url === undefined && - (missing2 = 'url') - ) { - validate68.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/owner/' + i2, - schemaPath: - '#/items/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + - missing2 + - "'", - schema: - schema53.items.properties.owner.items - .required, - parentSchema: - schema53.items.properties.owner.items, - data: data10, - }, - ]; - return false; - } else { - if (data10.url !== undefined) { - let data11 = data10.url; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate68.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/owner/' + - i2 + - '/url', - schemaPath: - '#/items/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema53.items.properties.owner - .items.properties.url, - data: data11, - }, - ]; - return false; - } - } else { - validate68.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/owner/' + - i2 + - '/url', - schemaPath: - '#/items/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema53.items.properties.owner - .items.properties.url.type, - parentSchema: - schema53.items.properties.owner - .items.properties.url, - data: data11, - }, - ]; - return false; - } - } - } - } - } - } else { - validate68.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/owner/' + i2, - schemaPath: - '#/items/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema53.items.properties.owner.items.type, - parentSchema: - schema53.items.properties.owner.items, - data: data10, - }, - ]; - return false; - } - } - var valid4 = _errs21 === errors; - if (!valid4) { - break; - } - } - } else { - validate68.errors = [ - { - instancePath: instancePath + '/' + i0 + '/owner', - schemaPath: '#/items/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema53.items.properties.owner.type, - parentSchema: schema53.items.properties.owner, - data: data9, - }, - ]; - return false; - } - } - var valid1 = _errs19 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } - } else { - validate68.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema53.items.type, - parentSchema: schema53.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate68.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema53.type, - parentSchema: schema53, - data, - }, - ]; - return false; - } - } - validate68.errors = vErrors; - return errors === 0; -} -exports.validateCreateDeviceBody = validate69; -const schema54 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createDeviceBody', - 'x-location': '#/paths//devices/post/requestBody/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate69( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema54.anyOf[0].allOf[0].required, - parentSchema: schema54.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - const err1 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema54.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err3 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.name, - data: data1, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err4 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.description, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs10 = errors; - if (typeof data3 !== 'string') { - const err5 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema54.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema54.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema54.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs12 = errors; - if (typeof data4 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema54.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.isPublic, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - const err8 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema54.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema54.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - const err9 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema54.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema54.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema54.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.viewer, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data8)) { - var valid5 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - const err13 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema54.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema54.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - const err14 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[0].allOf[0].properties - .owner.items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema54.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[0].allOf[0].properties.owner.items - .type, - parentSchema: - schema54.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema54.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.owner, - data: data8, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema54.anyOf[0].allOf[0].type, - parentSchema: schema54.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs28 = errors; - if ('cloud instantiable' !== data11) { - const err19 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema54.anyOf[0].allOf[1].properties.type, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err20 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema54.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema54.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data13)) { - var valid8 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs36 = errors; - if (errors === _errs36) { - if (errors === _errs36) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err24 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs40 = errors; - if (typeof data17 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema54.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema54.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid9 = _errs40 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err27 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema54.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema54.anyOf[0].allOf[1].properties.services, - data: data13, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema54.anyOf[0].allOf[1].type, - parentSchema: schema54.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid1 = _errs26 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs42 = errors; - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.url === undefined && (missing3 = 'url')) || - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema54.anyOf[1].allOf[0].required, - parentSchema: schema54.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.url !== undefined) { - let data18 = data.url; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - const err31 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema54.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.name !== undefined) { - let data19 = data.name; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err33 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.name, - data: data19, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data20 = data.description; - const _errs49 = errors; - if (typeof data20 !== 'string') { - const err34 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.description, - data: data20, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data21 = data.type; - const _errs51 = errors; - if (typeof data21 !== 'string') { - const err35 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data21 === 'device' || - data21 === 'group' || - data21 === 'edge instantiable' || - data21 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema54.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema54.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema54.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data22 = data.isPublic; - const _errs53 = errors; - if (typeof data22 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema54.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.isPublic, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid11 = _errs53 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data23 = data.viewer; - const _errs55 = errors; - if (errors === _errs55) { - if (Array.isArray(data23)) { - var valid12 = true; - const len3 = data23.length; - for (let i3 = 0; i3 < len3; i3++) { - let data24 = data23[i3]; - const _errs57 = errors; - if (errors === _errs57) { - if ( - data24 && - typeof data24 == 'object' && - !Array.isArray(data24) - ) { - let missing4; - if (data24.url === undefined && (missing4 = 'url')) { - const err38 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema54.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema54.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data24.url !== undefined) { - let data25 = data24.url; - const _errs59 = errors; - if (errors === _errs59) { - if (errors === _errs59) { - if (typeof data25 === 'string') { - if (!formats0(data25)) { - const err39 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema54.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema54.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid12 = _errs57 === errors; - if (!valid12) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema54.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.viewer, - data: data23, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid11 = _errs55 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data26 = data.owner; - const _errs61 = errors; - if (errors === _errs61) { - if (Array.isArray(data26)) { - var valid14 = true; - const len4 = data26.length; - for (let i4 = 0; i4 < len4; i4++) { - let data27 = data26[i4]; - const _errs63 = errors; - if (errors === _errs63) { - if ( - data27 && - typeof data27 == 'object' && - !Array.isArray(data27) - ) { - let missing5; - if (data27.url === undefined && (missing5 = 'url')) { - const err43 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema54.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema54.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data27.url !== undefined) { - let data28 = data27.url; - const _errs65 = errors; - if (errors === _errs65) { - if (errors === _errs65) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err44 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[1].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema54.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema54.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid14 = _errs63 === errors; - if (!valid14) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema54.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.owner, - data: data26, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid11 = _errs61 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema54.anyOf[1].allOf[0].type, - parentSchema: schema54.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid10 = _errs43 === errors; - if (valid10) { - const _errs67 = errors; - if (errors === _errs67) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data29 = data.type; - const _errs69 = errors; - if ('device' !== data29) { - const err49 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema54.anyOf[1].allOf[1].properties.type, - data: data29, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.connected !== undefined) { - let data30 = data.connected; - const _errs70 = errors; - if (typeof data30 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/connected', - schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema54.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema54.anyOf[1].allOf[1].properties.connected, - data: data30, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid16 = _errs70 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.announcedAvailability !== undefined) { - let data31 = data.announcedAvailability; - const _errs72 = errors; - if (errors === _errs72) { - if (Array.isArray(data31)) { - var valid17 = true; - const len5 = data31.length; - for (let i5 = 0; i5 < len5; i5++) { - let data32 = data31[i5]; - const _errs74 = errors; - if (errors === _errs74) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - if (data32.start !== undefined) { - let data33 = data32.start; - const _errs76 = errors; - if (errors === _errs76) { - if (errors === _errs76) { - if (typeof data33 === 'string') { - if (!formats22.validate(data33)) { - const err51 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema54.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start - .type, - parentSchema: - schema54.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid18 = _errs76 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data32.end !== undefined) { - let data34 = data32.end; - const _errs78 = errors; - if (errors === _errs78) { - if (errors === _errs78) { - if (typeof data34 === 'string') { - if (!formats22.validate(data34)) { - const err53 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema54.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end - .type, - parentSchema: - schema54.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } else { - const err55 = { - instancePath: instancePath + '/announcedAvailability/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[1].allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema54.anyOf[1].allOf[1].properties.announcedAvailability - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid17 = _errs74 === errors; - if (!valid17) { - break; - } - } - } else { - const err56 = { - instancePath: instancePath + '/announcedAvailability', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema54.anyOf[1].allOf[1].properties.announcedAvailability.type, - parentSchema: - schema54.anyOf[1].allOf[1].properties.announcedAvailability, - data: data31, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid16 = _errs72 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data35 = data.experiment; - const _errs80 = errors; - if (errors === _errs80) { - if (errors === _errs80) { - if (typeof data35 === 'string') { - if (!formats0(data35)) { - const err57 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema54.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid16 = _errs80 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data36 = data.services; - const _errs82 = errors; - if (errors === _errs82) { - if (Array.isArray(data36)) { - var valid19 = true; - const len6 = data36.length; - for (let i6 = 0; i6 < len6; i6++) { - let data37 = data36[i6]; - const _errs84 = errors; - if (errors === _errs84) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.serviceType !== undefined) { - let data38 = data37.serviceType; - const _errs87 = errors; - if (errors === _errs87) { - if (errors === _errs87) { - if (typeof data38 === 'string') { - if (!formats0(data38)) { - const err59 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema54.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid20 = _errs87 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceId !== undefined) { - let data39 = data37.serviceId; - const _errs89 = errors; - if (typeof data39 !== 'string') { - const err61 = { - instancePath: - instancePath + '/services/' + i6 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[1].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema54.anyOf[1].allOf[1].properties.services - .items.properties.serviceId, - data: data39, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs89 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceDirection !== undefined) { - let data40 = data37.serviceDirection; - const _errs91 = errors; - if (typeof data40 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema54.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data40 === 'consumer' || - data40 === 'producer' || - data40 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema54.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema54.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema54.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid20 = _errs91 === errors; - } else { - var valid20 = true; - } - } - } - } else { - const err64 = { - instancePath: instancePath + '/services/' + i6, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[1].allOf[1].properties.services.items - .type, - parentSchema: - schema54.anyOf[1].allOf[1].properties.services.items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid19 = _errs84 === errors; - if (!valid19) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema54.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema54.anyOf[1].allOf[1].properties.services, - data: data36, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid16 = _errs82 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema54.anyOf[1].allOf[1].type, - parentSchema: schema54.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid10 = _errs67 === errors; - } - var _valid0 = _errs42 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs93 = errors; - const _errs94 = errors; - if (errors === _errs94) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.url === undefined && (missing6 = 'url')) || - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err67 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema54.anyOf[2].allOf[0].required, - parentSchema: schema54.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data.url !== undefined) { - let data41 = data.url; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data41 === 'string') { - if (!formats0(data41)) { - const err68 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema54.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid22 = _errs96 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.name !== undefined) { - let data42 = data.name; - const _errs98 = errors; - if (typeof data42 !== 'string') { - const err70 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.name, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid22 = _errs98 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.description !== undefined) { - let data43 = data.description; - const _errs100 = errors; - if (typeof data43 !== 'string') { - const err71 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.description, - data: data43, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid22 = _errs100 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs102 = errors; - if (typeof data44 !== 'string') { - const err72 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data44 === 'device' || - data44 === 'group' || - data44 === 'edge instantiable' || - data44 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema54.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema54.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema54.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid22 = _errs102 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.isPublic !== undefined) { - let data45 = data.isPublic; - const _errs104 = errors; - if (typeof data45 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema54.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.isPublic, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid22 = _errs104 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.viewer !== undefined) { - let data46 = data.viewer; - const _errs106 = errors; - if (errors === _errs106) { - if (Array.isArray(data46)) { - var valid23 = true; - const len7 = data46.length; - for (let i7 = 0; i7 < len7; i7++) { - let data47 = data46[i7]; - const _errs108 = errors; - if (errors === _errs108) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - let missing7; - if (data47.url === undefined && (missing7 = 'url')) { - const err75 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema54.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema54.anyOf[2].allOf[0].properties.viewer - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data47.url !== undefined) { - let data48 = data47.url; - const _errs110 = errors; - if (errors === _errs110) { - if (errors === _errs110) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema54.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema54.anyOf[2].allOf[0].properties.viewer.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid23 = _errs108 === errors; - if (!valid23) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema54.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.viewer, - data: data46, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid22 = _errs106 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.owner !== undefined) { - let data49 = data.owner; - const _errs112 = errors; - if (errors === _errs112) { - if (Array.isArray(data49)) { - var valid25 = true; - const len8 = data49.length; - for (let i8 = 0; i8 < len8; i8++) { - let data50 = data49[i8]; - const _errs114 = errors; - if (errors === _errs114) { - if ( - data50 && - typeof data50 == 'object' && - !Array.isArray(data50) - ) { - let missing8; - if (data50.url === undefined && (missing8 = 'url')) { - const err80 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema54.anyOf[2].allOf[0].properties.owner - .items.required, - parentSchema: - schema54.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data50.url !== undefined) { - let data51 = data50.url; - const _errs116 = errors; - if (errors === _errs116) { - if (errors === _errs116) { - if (typeof data51 === 'string') { - if (!formats0(data51)) { - const err81 = { - instancePath: - instancePath + - '/owner/' + - i8 + - '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + '/owner/' + i8 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema54.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema54.anyOf[2].allOf[0].properties.owner.items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid25 = _errs114 === errors; - if (!valid25) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema54.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.owner, - data: data49, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid22 = _errs112 === errors; - } else { - var valid22 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema54.anyOf[2].allOf[0].type, - parentSchema: schema54.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid21 = _errs94 === errors; - if (valid21) { - const _errs118 = errors; - if (errors === _errs118) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data52 = data.type; - const _errs120 = errors; - if ('edge instantiable' !== data52) { - const err86 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema54.anyOf[2].allOf[1].properties.type, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.codeUrl !== undefined) { - let data53 = data.codeUrl; - const _errs121 = errors; - if (errors === _errs121) { - if (errors === _errs121) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err87 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema54.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema54.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid27 = _errs121 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.services !== undefined) { - let data54 = data.services; - const _errs123 = errors; - if (errors === _errs123) { - if (Array.isArray(data54)) { - var valid28 = true; - const len9 = data54.length; - for (let i9 = 0; i9 < len9; i9++) { - let data55 = data54[i9]; - const _errs125 = errors; - if (errors === _errs125) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - if (data55.serviceType !== undefined) { - let data56 = data55.serviceType; - const _errs128 = errors; - if (errors === _errs128) { - if (errors === _errs128) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err89 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema54.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid29 = _errs128 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceId !== undefined) { - let data57 = data55.serviceId; - const _errs130 = errors; - if (typeof data57 !== 'string') { - const err91 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[2].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema54.anyOf[2].allOf[1].properties.services.items - .properties.serviceId, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid29 = _errs130 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceDirection !== undefined) { - let data58 = data55.serviceDirection; - const _errs132 = errors; - if (typeof data58 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema54.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data58 === 'consumer' || - data58 === 'producer' || - data58 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema54.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema54.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema54.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid29 = _errs132 === errors; - } else { - var valid29 = true; - } - } - } - } else { - const err94 = { - instancePath: instancePath + '/services/' + i9, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[2].allOf[1].properties.services.items.type, - parentSchema: - schema54.anyOf[2].allOf[1].properties.services.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid28 = _errs125 === errors; - if (!valid28) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema54.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema54.anyOf[2].allOf[1].properties.services, - data: data54, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid27 = _errs123 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err96 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema54.anyOf[2].allOf[1].type, - parentSchema: schema54.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid21 = _errs118 === errors; - } - var _valid0 = _errs93 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs134 = errors; - const _errs135 = errors; - if (errors === _errs135) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.url === undefined && (missing9 = 'url')) || - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err97 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema54.anyOf[3].allOf[0].required, - parentSchema: schema54.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data.url !== undefined) { - let data59 = data.url; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data59 === 'string') { - if (!formats0(data59)) { - const err98 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema54.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema54.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid31 = _errs137 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.name !== undefined) { - let data60 = data.name; - const _errs139 = errors; - if (typeof data60 !== 'string') { - const err100 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema54.anyOf[3].allOf[0].properties.name, - data: data60, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid31 = _errs139 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.description !== undefined) { - let data61 = data.description; - const _errs141 = errors; - if (typeof data61 !== 'string') { - const err101 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema54.anyOf[3].allOf[0].properties.description, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid31 = _errs141 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.type !== undefined) { - let data62 = data.type; - const _errs143 = errors; - if (typeof data62 !== 'string') { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema54.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema54.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data62 === 'device' || - data62 === 'group' || - data62 === 'edge instantiable' || - data62 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema54.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema54.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema54.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid31 = _errs143 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.isPublic !== undefined) { - let data63 = data.isPublic; - const _errs145 = errors; - if (typeof data63 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema54.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema54.anyOf[3].allOf[0].properties.isPublic, - data: data63, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid31 = _errs145 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.viewer !== undefined) { - let data64 = data.viewer; - const _errs147 = errors; - if (errors === _errs147) { - if (Array.isArray(data64)) { - var valid32 = true; - const len10 = data64.length; - for (let i10 = 0; i10 < len10; i10++) { - let data65 = data64[i10]; - const _errs149 = errors; - if (errors === _errs149) { - if ( - data65 && - typeof data65 == 'object' && - !Array.isArray(data65) - ) { - let missing10; - if (data65.url === undefined && (missing10 = 'url')) { - const err105 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema54.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema54.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data65.url !== undefined) { - let data66 = data65.url; - const _errs151 = errors; - if (errors === _errs151) { - if (errors === _errs151) { - if (typeof data66 === 'string') { - if (!formats0(data66)) { - const err106 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema54.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema54.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid32 = _errs149 === errors; - if (!valid32) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema54.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: - schema54.anyOf[3].allOf[0].properties.viewer, - data: data64, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid31 = _errs147 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.owner !== undefined) { - let data67 = data.owner; - const _errs153 = errors; - if (errors === _errs153) { - if (Array.isArray(data67)) { - var valid34 = true; - const len11 = data67.length; - for (let i11 = 0; i11 < len11; i11++) { - let data68 = data67[i11]; - const _errs155 = errors; - if (errors === _errs155) { - if ( - data68 && - typeof data68 == 'object' && - !Array.isArray(data68) - ) { - let missing11; - if ( - data68.url === undefined && - (missing11 = 'url') - ) { - const err110 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema54.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema54.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data68.url !== undefined) { - let data69 = data68.url; - const _errs157 = errors; - if (errors === _errs157) { - if (errors === _errs157) { - if (typeof data69 === 'string') { - if (!formats0(data69)) { - const err111 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[3].allOf[0] - .properties.owner.items.properties - .url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema54.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[3].allOf[0].properties.owner - .items.type, - parentSchema: - schema54.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid34 = _errs155 === errors; - if (!valid34) { - break; - } - } - } else { - const err114 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema54.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema54.anyOf[3].allOf[0].properties.owner, - data: data67, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid31 = _errs153 === errors; - } else { - var valid31 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema54.anyOf[3].allOf[0].type, - parentSchema: schema54.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid30 = _errs135 === errors; - if (valid30) { - const _errs159 = errors; - if (errors === _errs159) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err116 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema54.anyOf[3].allOf[1].required, - parentSchema: schema54.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data.type !== undefined) { - let data70 = data.type; - const _errs161 = errors; - if ('group' !== data70) { - const err117 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema54.anyOf[3].allOf[1].properties.type, - data: data70, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data.devices !== undefined) { - let data71 = data.devices; - const _errs162 = errors; - if (errors === _errs162) { - if (Array.isArray(data71)) { - var valid37 = true; - const len12 = data71.length; - for (let i12 = 0; i12 < len12; i12++) { - let data72 = data71[i12]; - const _errs164 = errors; - if (errors === _errs164) { - if ( - data72 && - typeof data72 == 'object' && - !Array.isArray(data72) - ) { - let missing13; - if (data72.url === undefined && (missing13 = 'url')) { - const err118 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema54.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema54.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data72.url !== undefined) { - let data73 = data72.url; - const _errs166 = errors; - if (errors === _errs166) { - if (errors === _errs166) { - if (typeof data73 === 'string') { - if (!formats0(data73)) { - const err119 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema54.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema54.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema54.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema54.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema54.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid37 = _errs164 === errors; - if (!valid37) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema54.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema54.anyOf[3].allOf[1].properties.devices, - data: data71, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid36 = _errs162 === errors; - } else { - var valid36 = true; - } - } - } - } else { - const err123 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema54.anyOf[3].allOf[1].type, - parentSchema: schema54.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid30 = _errs159 === errors; - } - var _valid0 = _errs134 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err124 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema54.anyOf, - parentSchema: schema54, - data, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate69.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate69.errors = vErrors; - return errors === 0; -} -exports.validateCreateDeviceResponse201 = validate70; -const schema55 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createDeviceResponse201', - 'x-location': '#/paths//devices/post/responses/201/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate70( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema55.anyOf[0].allOf[0].required, - parentSchema: schema55.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - const err1 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema55.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err3 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.name, - data: data1, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err4 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.description, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs10 = errors; - if (typeof data3 !== 'string') { - const err5 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema55.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema55.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema55.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs12 = errors; - if (typeof data4 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema55.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.isPublic, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - const err8 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema55.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema55.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - const err9 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema55.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema55.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema55.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.viewer, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data8)) { - var valid5 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - const err13 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema55.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema55.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - const err14 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[0].allOf[0].properties - .owner.items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema55.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[0].allOf[0].properties.owner.items - .type, - parentSchema: - schema55.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema55.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.owner, - data: data8, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema55.anyOf[0].allOf[0].type, - parentSchema: schema55.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs28 = errors; - if ('cloud instantiable' !== data11) { - const err19 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema55.anyOf[0].allOf[1].properties.type, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err20 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema55.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema55.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data13)) { - var valid8 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs36 = errors; - if (errors === _errs36) { - if (errors === _errs36) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err24 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs40 = errors; - if (typeof data17 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema55.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema55.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid9 = _errs40 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err27 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema55.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema55.anyOf[0].allOf[1].properties.services, - data: data13, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema55.anyOf[0].allOf[1].type, - parentSchema: schema55.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid1 = _errs26 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs42 = errors; - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.url === undefined && (missing3 = 'url')) || - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema55.anyOf[1].allOf[0].required, - parentSchema: schema55.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.url !== undefined) { - let data18 = data.url; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - const err31 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema55.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.name !== undefined) { - let data19 = data.name; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err33 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.name, - data: data19, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data20 = data.description; - const _errs49 = errors; - if (typeof data20 !== 'string') { - const err34 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.description, - data: data20, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data21 = data.type; - const _errs51 = errors; - if (typeof data21 !== 'string') { - const err35 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data21 === 'device' || - data21 === 'group' || - data21 === 'edge instantiable' || - data21 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema55.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema55.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema55.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data22 = data.isPublic; - const _errs53 = errors; - if (typeof data22 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema55.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.isPublic, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid11 = _errs53 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data23 = data.viewer; - const _errs55 = errors; - if (errors === _errs55) { - if (Array.isArray(data23)) { - var valid12 = true; - const len3 = data23.length; - for (let i3 = 0; i3 < len3; i3++) { - let data24 = data23[i3]; - const _errs57 = errors; - if (errors === _errs57) { - if ( - data24 && - typeof data24 == 'object' && - !Array.isArray(data24) - ) { - let missing4; - if (data24.url === undefined && (missing4 = 'url')) { - const err38 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema55.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema55.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data24.url !== undefined) { - let data25 = data24.url; - const _errs59 = errors; - if (errors === _errs59) { - if (errors === _errs59) { - if (typeof data25 === 'string') { - if (!formats0(data25)) { - const err39 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema55.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema55.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid12 = _errs57 === errors; - if (!valid12) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema55.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.viewer, - data: data23, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid11 = _errs55 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data26 = data.owner; - const _errs61 = errors; - if (errors === _errs61) { - if (Array.isArray(data26)) { - var valid14 = true; - const len4 = data26.length; - for (let i4 = 0; i4 < len4; i4++) { - let data27 = data26[i4]; - const _errs63 = errors; - if (errors === _errs63) { - if ( - data27 && - typeof data27 == 'object' && - !Array.isArray(data27) - ) { - let missing5; - if (data27.url === undefined && (missing5 = 'url')) { - const err43 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema55.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema55.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data27.url !== undefined) { - let data28 = data27.url; - const _errs65 = errors; - if (errors === _errs65) { - if (errors === _errs65) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err44 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[1].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema55.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema55.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid14 = _errs63 === errors; - if (!valid14) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema55.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.owner, - data: data26, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid11 = _errs61 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema55.anyOf[1].allOf[0].type, - parentSchema: schema55.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid10 = _errs43 === errors; - if (valid10) { - const _errs67 = errors; - if (errors === _errs67) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data29 = data.type; - const _errs69 = errors; - if ('device' !== data29) { - const err49 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema55.anyOf[1].allOf[1].properties.type, - data: data29, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.connected !== undefined) { - let data30 = data.connected; - const _errs70 = errors; - if (typeof data30 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/connected', - schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema55.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema55.anyOf[1].allOf[1].properties.connected, - data: data30, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid16 = _errs70 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.announcedAvailability !== undefined) { - let data31 = data.announcedAvailability; - const _errs72 = errors; - if (errors === _errs72) { - if (Array.isArray(data31)) { - var valid17 = true; - const len5 = data31.length; - for (let i5 = 0; i5 < len5; i5++) { - let data32 = data31[i5]; - const _errs74 = errors; - if (errors === _errs74) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - if (data32.start !== undefined) { - let data33 = data32.start; - const _errs76 = errors; - if (errors === _errs76) { - if (errors === _errs76) { - if (typeof data33 === 'string') { - if (!formats22.validate(data33)) { - const err51 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema55.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start - .type, - parentSchema: - schema55.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid18 = _errs76 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data32.end !== undefined) { - let data34 = data32.end; - const _errs78 = errors; - if (errors === _errs78) { - if (errors === _errs78) { - if (typeof data34 === 'string') { - if (!formats22.validate(data34)) { - const err53 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema55.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end - .type, - parentSchema: - schema55.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } else { - const err55 = { - instancePath: instancePath + '/announcedAvailability/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[1].allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema55.anyOf[1].allOf[1].properties.announcedAvailability - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid17 = _errs74 === errors; - if (!valid17) { - break; - } - } - } else { - const err56 = { - instancePath: instancePath + '/announcedAvailability', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema55.anyOf[1].allOf[1].properties.announcedAvailability.type, - parentSchema: - schema55.anyOf[1].allOf[1].properties.announcedAvailability, - data: data31, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid16 = _errs72 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data35 = data.experiment; - const _errs80 = errors; - if (errors === _errs80) { - if (errors === _errs80) { - if (typeof data35 === 'string') { - if (!formats0(data35)) { - const err57 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema55.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid16 = _errs80 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data36 = data.services; - const _errs82 = errors; - if (errors === _errs82) { - if (Array.isArray(data36)) { - var valid19 = true; - const len6 = data36.length; - for (let i6 = 0; i6 < len6; i6++) { - let data37 = data36[i6]; - const _errs84 = errors; - if (errors === _errs84) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.serviceType !== undefined) { - let data38 = data37.serviceType; - const _errs87 = errors; - if (errors === _errs87) { - if (errors === _errs87) { - if (typeof data38 === 'string') { - if (!formats0(data38)) { - const err59 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema55.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid20 = _errs87 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceId !== undefined) { - let data39 = data37.serviceId; - const _errs89 = errors; - if (typeof data39 !== 'string') { - const err61 = { - instancePath: - instancePath + '/services/' + i6 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[1].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema55.anyOf[1].allOf[1].properties.services - .items.properties.serviceId, - data: data39, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs89 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceDirection !== undefined) { - let data40 = data37.serviceDirection; - const _errs91 = errors; - if (typeof data40 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema55.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data40 === 'consumer' || - data40 === 'producer' || - data40 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema55.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema55.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema55.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid20 = _errs91 === errors; - } else { - var valid20 = true; - } - } - } - } else { - const err64 = { - instancePath: instancePath + '/services/' + i6, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[1].allOf[1].properties.services.items - .type, - parentSchema: - schema55.anyOf[1].allOf[1].properties.services.items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid19 = _errs84 === errors; - if (!valid19) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema55.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema55.anyOf[1].allOf[1].properties.services, - data: data36, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid16 = _errs82 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema55.anyOf[1].allOf[1].type, - parentSchema: schema55.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid10 = _errs67 === errors; - } - var _valid0 = _errs42 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs93 = errors; - const _errs94 = errors; - if (errors === _errs94) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.url === undefined && (missing6 = 'url')) || - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err67 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema55.anyOf[2].allOf[0].required, - parentSchema: schema55.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data.url !== undefined) { - let data41 = data.url; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data41 === 'string') { - if (!formats0(data41)) { - const err68 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema55.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid22 = _errs96 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.name !== undefined) { - let data42 = data.name; - const _errs98 = errors; - if (typeof data42 !== 'string') { - const err70 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.name, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid22 = _errs98 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.description !== undefined) { - let data43 = data.description; - const _errs100 = errors; - if (typeof data43 !== 'string') { - const err71 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.description, - data: data43, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid22 = _errs100 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs102 = errors; - if (typeof data44 !== 'string') { - const err72 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data44 === 'device' || - data44 === 'group' || - data44 === 'edge instantiable' || - data44 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema55.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema55.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema55.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid22 = _errs102 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.isPublic !== undefined) { - let data45 = data.isPublic; - const _errs104 = errors; - if (typeof data45 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema55.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.isPublic, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid22 = _errs104 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.viewer !== undefined) { - let data46 = data.viewer; - const _errs106 = errors; - if (errors === _errs106) { - if (Array.isArray(data46)) { - var valid23 = true; - const len7 = data46.length; - for (let i7 = 0; i7 < len7; i7++) { - let data47 = data46[i7]; - const _errs108 = errors; - if (errors === _errs108) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - let missing7; - if (data47.url === undefined && (missing7 = 'url')) { - const err75 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema55.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema55.anyOf[2].allOf[0].properties.viewer - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data47.url !== undefined) { - let data48 = data47.url; - const _errs110 = errors; - if (errors === _errs110) { - if (errors === _errs110) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema55.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema55.anyOf[2].allOf[0].properties.viewer.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid23 = _errs108 === errors; - if (!valid23) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema55.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.viewer, - data: data46, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid22 = _errs106 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.owner !== undefined) { - let data49 = data.owner; - const _errs112 = errors; - if (errors === _errs112) { - if (Array.isArray(data49)) { - var valid25 = true; - const len8 = data49.length; - for (let i8 = 0; i8 < len8; i8++) { - let data50 = data49[i8]; - const _errs114 = errors; - if (errors === _errs114) { - if ( - data50 && - typeof data50 == 'object' && - !Array.isArray(data50) - ) { - let missing8; - if (data50.url === undefined && (missing8 = 'url')) { - const err80 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema55.anyOf[2].allOf[0].properties.owner - .items.required, - parentSchema: - schema55.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data50.url !== undefined) { - let data51 = data50.url; - const _errs116 = errors; - if (errors === _errs116) { - if (errors === _errs116) { - if (typeof data51 === 'string') { - if (!formats0(data51)) { - const err81 = { - instancePath: - instancePath + - '/owner/' + - i8 + - '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + '/owner/' + i8 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema55.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema55.anyOf[2].allOf[0].properties.owner.items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid25 = _errs114 === errors; - if (!valid25) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema55.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.owner, - data: data49, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid22 = _errs112 === errors; - } else { - var valid22 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema55.anyOf[2].allOf[0].type, - parentSchema: schema55.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid21 = _errs94 === errors; - if (valid21) { - const _errs118 = errors; - if (errors === _errs118) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data52 = data.type; - const _errs120 = errors; - if ('edge instantiable' !== data52) { - const err86 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema55.anyOf[2].allOf[1].properties.type, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.codeUrl !== undefined) { - let data53 = data.codeUrl; - const _errs121 = errors; - if (errors === _errs121) { - if (errors === _errs121) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err87 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema55.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema55.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid27 = _errs121 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.services !== undefined) { - let data54 = data.services; - const _errs123 = errors; - if (errors === _errs123) { - if (Array.isArray(data54)) { - var valid28 = true; - const len9 = data54.length; - for (let i9 = 0; i9 < len9; i9++) { - let data55 = data54[i9]; - const _errs125 = errors; - if (errors === _errs125) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - if (data55.serviceType !== undefined) { - let data56 = data55.serviceType; - const _errs128 = errors; - if (errors === _errs128) { - if (errors === _errs128) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err89 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema55.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid29 = _errs128 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceId !== undefined) { - let data57 = data55.serviceId; - const _errs130 = errors; - if (typeof data57 !== 'string') { - const err91 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[2].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema55.anyOf[2].allOf[1].properties.services.items - .properties.serviceId, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid29 = _errs130 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceDirection !== undefined) { - let data58 = data55.serviceDirection; - const _errs132 = errors; - if (typeof data58 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema55.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data58 === 'consumer' || - data58 === 'producer' || - data58 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema55.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema55.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema55.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid29 = _errs132 === errors; - } else { - var valid29 = true; - } - } - } - } else { - const err94 = { - instancePath: instancePath + '/services/' + i9, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[2].allOf[1].properties.services.items.type, - parentSchema: - schema55.anyOf[2].allOf[1].properties.services.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid28 = _errs125 === errors; - if (!valid28) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema55.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema55.anyOf[2].allOf[1].properties.services, - data: data54, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid27 = _errs123 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err96 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema55.anyOf[2].allOf[1].type, - parentSchema: schema55.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid21 = _errs118 === errors; - } - var _valid0 = _errs93 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs134 = errors; - const _errs135 = errors; - if (errors === _errs135) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.url === undefined && (missing9 = 'url')) || - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err97 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema55.anyOf[3].allOf[0].required, - parentSchema: schema55.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data.url !== undefined) { - let data59 = data.url; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data59 === 'string') { - if (!formats0(data59)) { - const err98 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema55.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema55.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid31 = _errs137 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.name !== undefined) { - let data60 = data.name; - const _errs139 = errors; - if (typeof data60 !== 'string') { - const err100 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema55.anyOf[3].allOf[0].properties.name, - data: data60, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid31 = _errs139 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.description !== undefined) { - let data61 = data.description; - const _errs141 = errors; - if (typeof data61 !== 'string') { - const err101 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema55.anyOf[3].allOf[0].properties.description, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid31 = _errs141 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.type !== undefined) { - let data62 = data.type; - const _errs143 = errors; - if (typeof data62 !== 'string') { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema55.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema55.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data62 === 'device' || - data62 === 'group' || - data62 === 'edge instantiable' || - data62 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema55.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema55.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema55.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid31 = _errs143 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.isPublic !== undefined) { - let data63 = data.isPublic; - const _errs145 = errors; - if (typeof data63 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema55.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema55.anyOf[3].allOf[0].properties.isPublic, - data: data63, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid31 = _errs145 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.viewer !== undefined) { - let data64 = data.viewer; - const _errs147 = errors; - if (errors === _errs147) { - if (Array.isArray(data64)) { - var valid32 = true; - const len10 = data64.length; - for (let i10 = 0; i10 < len10; i10++) { - let data65 = data64[i10]; - const _errs149 = errors; - if (errors === _errs149) { - if ( - data65 && - typeof data65 == 'object' && - !Array.isArray(data65) - ) { - let missing10; - if (data65.url === undefined && (missing10 = 'url')) { - const err105 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema55.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema55.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data65.url !== undefined) { - let data66 = data65.url; - const _errs151 = errors; - if (errors === _errs151) { - if (errors === _errs151) { - if (typeof data66 === 'string') { - if (!formats0(data66)) { - const err106 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema55.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema55.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid32 = _errs149 === errors; - if (!valid32) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema55.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: - schema55.anyOf[3].allOf[0].properties.viewer, - data: data64, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid31 = _errs147 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.owner !== undefined) { - let data67 = data.owner; - const _errs153 = errors; - if (errors === _errs153) { - if (Array.isArray(data67)) { - var valid34 = true; - const len11 = data67.length; - for (let i11 = 0; i11 < len11; i11++) { - let data68 = data67[i11]; - const _errs155 = errors; - if (errors === _errs155) { - if ( - data68 && - typeof data68 == 'object' && - !Array.isArray(data68) - ) { - let missing11; - if ( - data68.url === undefined && - (missing11 = 'url') - ) { - const err110 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema55.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema55.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data68.url !== undefined) { - let data69 = data68.url; - const _errs157 = errors; - if (errors === _errs157) { - if (errors === _errs157) { - if (typeof data69 === 'string') { - if (!formats0(data69)) { - const err111 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[3].allOf[0] - .properties.owner.items.properties - .url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema55.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[3].allOf[0].properties.owner - .items.type, - parentSchema: - schema55.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid34 = _errs155 === errors; - if (!valid34) { - break; - } - } - } else { - const err114 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema55.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema55.anyOf[3].allOf[0].properties.owner, - data: data67, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid31 = _errs153 === errors; - } else { - var valid31 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema55.anyOf[3].allOf[0].type, - parentSchema: schema55.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid30 = _errs135 === errors; - if (valid30) { - const _errs159 = errors; - if (errors === _errs159) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err116 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema55.anyOf[3].allOf[1].required, - parentSchema: schema55.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data.type !== undefined) { - let data70 = data.type; - const _errs161 = errors; - if ('group' !== data70) { - const err117 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema55.anyOf[3].allOf[1].properties.type, - data: data70, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data.devices !== undefined) { - let data71 = data.devices; - const _errs162 = errors; - if (errors === _errs162) { - if (Array.isArray(data71)) { - var valid37 = true; - const len12 = data71.length; - for (let i12 = 0; i12 < len12; i12++) { - let data72 = data71[i12]; - const _errs164 = errors; - if (errors === _errs164) { - if ( - data72 && - typeof data72 == 'object' && - !Array.isArray(data72) - ) { - let missing13; - if (data72.url === undefined && (missing13 = 'url')) { - const err118 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema55.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema55.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data72.url !== undefined) { - let data73 = data72.url; - const _errs166 = errors; - if (errors === _errs166) { - if (errors === _errs166) { - if (typeof data73 === 'string') { - if (!formats0(data73)) { - const err119 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema55.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema55.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema55.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema55.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema55.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid37 = _errs164 === errors; - if (!valid37) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema55.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema55.anyOf[3].allOf[1].properties.devices, - data: data71, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid36 = _errs162 === errors; - } else { - var valid36 = true; - } - } - } - } else { - const err123 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema55.anyOf[3].allOf[1].type, - parentSchema: schema55.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid30 = _errs159 === errors; - } - var _valid0 = _errs134 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err124 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema55.anyOf, - parentSchema: schema55, - data, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate70.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate70.errors = vErrors; - return errors === 0; -} -exports.validateGetDeviceResponse200 = validate71; -const schema56 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'getDeviceResponse200', - 'x-location': - '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate71( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema56.anyOf[0].allOf[0].required, - parentSchema: schema56.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - const err1 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema56.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err3 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.name, - data: data1, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err4 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.description, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs10 = errors; - if (typeof data3 !== 'string') { - const err5 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema56.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema56.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema56.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs12 = errors; - if (typeof data4 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema56.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.isPublic, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - const err8 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema56.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema56.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - const err9 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema56.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema56.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema56.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.viewer, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data8)) { - var valid5 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - const err13 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema56.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema56.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - const err14 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[0].allOf[0].properties - .owner.items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema56.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[0].allOf[0].properties.owner.items - .type, - parentSchema: - schema56.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema56.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.owner, - data: data8, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema56.anyOf[0].allOf[0].type, - parentSchema: schema56.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs28 = errors; - if ('cloud instantiable' !== data11) { - const err19 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema56.anyOf[0].allOf[1].properties.type, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err20 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema56.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema56.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data13)) { - var valid8 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs36 = errors; - if (errors === _errs36) { - if (errors === _errs36) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err24 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs40 = errors; - if (typeof data17 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema56.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema56.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid9 = _errs40 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err27 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema56.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema56.anyOf[0].allOf[1].properties.services, - data: data13, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema56.anyOf[0].allOf[1].type, - parentSchema: schema56.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid1 = _errs26 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs42 = errors; - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.url === undefined && (missing3 = 'url')) || - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema56.anyOf[1].allOf[0].required, - parentSchema: schema56.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.url !== undefined) { - let data18 = data.url; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - const err31 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema56.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.name !== undefined) { - let data19 = data.name; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err33 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.name, - data: data19, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data20 = data.description; - const _errs49 = errors; - if (typeof data20 !== 'string') { - const err34 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.description, - data: data20, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data21 = data.type; - const _errs51 = errors; - if (typeof data21 !== 'string') { - const err35 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data21 === 'device' || - data21 === 'group' || - data21 === 'edge instantiable' || - data21 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema56.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema56.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema56.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data22 = data.isPublic; - const _errs53 = errors; - if (typeof data22 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema56.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.isPublic, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid11 = _errs53 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data23 = data.viewer; - const _errs55 = errors; - if (errors === _errs55) { - if (Array.isArray(data23)) { - var valid12 = true; - const len3 = data23.length; - for (let i3 = 0; i3 < len3; i3++) { - let data24 = data23[i3]; - const _errs57 = errors; - if (errors === _errs57) { - if ( - data24 && - typeof data24 == 'object' && - !Array.isArray(data24) - ) { - let missing4; - if (data24.url === undefined && (missing4 = 'url')) { - const err38 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema56.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema56.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data24.url !== undefined) { - let data25 = data24.url; - const _errs59 = errors; - if (errors === _errs59) { - if (errors === _errs59) { - if (typeof data25 === 'string') { - if (!formats0(data25)) { - const err39 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema56.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema56.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid12 = _errs57 === errors; - if (!valid12) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema56.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.viewer, - data: data23, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid11 = _errs55 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data26 = data.owner; - const _errs61 = errors; - if (errors === _errs61) { - if (Array.isArray(data26)) { - var valid14 = true; - const len4 = data26.length; - for (let i4 = 0; i4 < len4; i4++) { - let data27 = data26[i4]; - const _errs63 = errors; - if (errors === _errs63) { - if ( - data27 && - typeof data27 == 'object' && - !Array.isArray(data27) - ) { - let missing5; - if (data27.url === undefined && (missing5 = 'url')) { - const err43 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema56.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema56.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data27.url !== undefined) { - let data28 = data27.url; - const _errs65 = errors; - if (errors === _errs65) { - if (errors === _errs65) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err44 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[1].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema56.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema56.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid14 = _errs63 === errors; - if (!valid14) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema56.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.owner, - data: data26, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid11 = _errs61 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema56.anyOf[1].allOf[0].type, - parentSchema: schema56.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid10 = _errs43 === errors; - if (valid10) { - const _errs67 = errors; - if (errors === _errs67) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data29 = data.type; - const _errs69 = errors; - if ('device' !== data29) { - const err49 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema56.anyOf[1].allOf[1].properties.type, - data: data29, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.connected !== undefined) { - let data30 = data.connected; - const _errs70 = errors; - if (typeof data30 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/connected', - schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema56.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema56.anyOf[1].allOf[1].properties.connected, - data: data30, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid16 = _errs70 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.announcedAvailability !== undefined) { - let data31 = data.announcedAvailability; - const _errs72 = errors; - if (errors === _errs72) { - if (Array.isArray(data31)) { - var valid17 = true; - const len5 = data31.length; - for (let i5 = 0; i5 < len5; i5++) { - let data32 = data31[i5]; - const _errs74 = errors; - if (errors === _errs74) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - if (data32.start !== undefined) { - let data33 = data32.start; - const _errs76 = errors; - if (errors === _errs76) { - if (errors === _errs76) { - if (typeof data33 === 'string') { - if (!formats22.validate(data33)) { - const err51 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema56.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start - .type, - parentSchema: - schema56.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid18 = _errs76 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data32.end !== undefined) { - let data34 = data32.end; - const _errs78 = errors; - if (errors === _errs78) { - if (errors === _errs78) { - if (typeof data34 === 'string') { - if (!formats22.validate(data34)) { - const err53 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema56.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end - .type, - parentSchema: - schema56.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } else { - const err55 = { - instancePath: instancePath + '/announcedAvailability/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[1].allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema56.anyOf[1].allOf[1].properties.announcedAvailability - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid17 = _errs74 === errors; - if (!valid17) { - break; - } - } - } else { - const err56 = { - instancePath: instancePath + '/announcedAvailability', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema56.anyOf[1].allOf[1].properties.announcedAvailability.type, - parentSchema: - schema56.anyOf[1].allOf[1].properties.announcedAvailability, - data: data31, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid16 = _errs72 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data35 = data.experiment; - const _errs80 = errors; - if (errors === _errs80) { - if (errors === _errs80) { - if (typeof data35 === 'string') { - if (!formats0(data35)) { - const err57 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema56.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid16 = _errs80 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data36 = data.services; - const _errs82 = errors; - if (errors === _errs82) { - if (Array.isArray(data36)) { - var valid19 = true; - const len6 = data36.length; - for (let i6 = 0; i6 < len6; i6++) { - let data37 = data36[i6]; - const _errs84 = errors; - if (errors === _errs84) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.serviceType !== undefined) { - let data38 = data37.serviceType; - const _errs87 = errors; - if (errors === _errs87) { - if (errors === _errs87) { - if (typeof data38 === 'string') { - if (!formats0(data38)) { - const err59 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema56.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid20 = _errs87 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceId !== undefined) { - let data39 = data37.serviceId; - const _errs89 = errors; - if (typeof data39 !== 'string') { - const err61 = { - instancePath: - instancePath + '/services/' + i6 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[1].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema56.anyOf[1].allOf[1].properties.services - .items.properties.serviceId, - data: data39, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs89 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceDirection !== undefined) { - let data40 = data37.serviceDirection; - const _errs91 = errors; - if (typeof data40 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema56.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data40 === 'consumer' || - data40 === 'producer' || - data40 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema56.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema56.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema56.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid20 = _errs91 === errors; - } else { - var valid20 = true; - } - } - } - } else { - const err64 = { - instancePath: instancePath + '/services/' + i6, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[1].allOf[1].properties.services.items - .type, - parentSchema: - schema56.anyOf[1].allOf[1].properties.services.items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid19 = _errs84 === errors; - if (!valid19) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema56.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema56.anyOf[1].allOf[1].properties.services, - data: data36, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid16 = _errs82 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema56.anyOf[1].allOf[1].type, - parentSchema: schema56.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid10 = _errs67 === errors; - } - var _valid0 = _errs42 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs93 = errors; - const _errs94 = errors; - if (errors === _errs94) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.url === undefined && (missing6 = 'url')) || - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err67 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema56.anyOf[2].allOf[0].required, - parentSchema: schema56.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data.url !== undefined) { - let data41 = data.url; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data41 === 'string') { - if (!formats0(data41)) { - const err68 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema56.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid22 = _errs96 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.name !== undefined) { - let data42 = data.name; - const _errs98 = errors; - if (typeof data42 !== 'string') { - const err70 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.name, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid22 = _errs98 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.description !== undefined) { - let data43 = data.description; - const _errs100 = errors; - if (typeof data43 !== 'string') { - const err71 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.description, - data: data43, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid22 = _errs100 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs102 = errors; - if (typeof data44 !== 'string') { - const err72 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data44 === 'device' || - data44 === 'group' || - data44 === 'edge instantiable' || - data44 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema56.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema56.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema56.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid22 = _errs102 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.isPublic !== undefined) { - let data45 = data.isPublic; - const _errs104 = errors; - if (typeof data45 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema56.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.isPublic, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid22 = _errs104 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.viewer !== undefined) { - let data46 = data.viewer; - const _errs106 = errors; - if (errors === _errs106) { - if (Array.isArray(data46)) { - var valid23 = true; - const len7 = data46.length; - for (let i7 = 0; i7 < len7; i7++) { - let data47 = data46[i7]; - const _errs108 = errors; - if (errors === _errs108) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - let missing7; - if (data47.url === undefined && (missing7 = 'url')) { - const err75 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema56.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema56.anyOf[2].allOf[0].properties.viewer - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data47.url !== undefined) { - let data48 = data47.url; - const _errs110 = errors; - if (errors === _errs110) { - if (errors === _errs110) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema56.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema56.anyOf[2].allOf[0].properties.viewer.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid23 = _errs108 === errors; - if (!valid23) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema56.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.viewer, - data: data46, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid22 = _errs106 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.owner !== undefined) { - let data49 = data.owner; - const _errs112 = errors; - if (errors === _errs112) { - if (Array.isArray(data49)) { - var valid25 = true; - const len8 = data49.length; - for (let i8 = 0; i8 < len8; i8++) { - let data50 = data49[i8]; - const _errs114 = errors; - if (errors === _errs114) { - if ( - data50 && - typeof data50 == 'object' && - !Array.isArray(data50) - ) { - let missing8; - if (data50.url === undefined && (missing8 = 'url')) { - const err80 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema56.anyOf[2].allOf[0].properties.owner - .items.required, - parentSchema: - schema56.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data50.url !== undefined) { - let data51 = data50.url; - const _errs116 = errors; - if (errors === _errs116) { - if (errors === _errs116) { - if (typeof data51 === 'string') { - if (!formats0(data51)) { - const err81 = { - instancePath: - instancePath + - '/owner/' + - i8 + - '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + '/owner/' + i8 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema56.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema56.anyOf[2].allOf[0].properties.owner.items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid25 = _errs114 === errors; - if (!valid25) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema56.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.owner, - data: data49, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid22 = _errs112 === errors; - } else { - var valid22 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema56.anyOf[2].allOf[0].type, - parentSchema: schema56.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid21 = _errs94 === errors; - if (valid21) { - const _errs118 = errors; - if (errors === _errs118) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data52 = data.type; - const _errs120 = errors; - if ('edge instantiable' !== data52) { - const err86 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema56.anyOf[2].allOf[1].properties.type, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.codeUrl !== undefined) { - let data53 = data.codeUrl; - const _errs121 = errors; - if (errors === _errs121) { - if (errors === _errs121) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err87 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema56.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema56.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid27 = _errs121 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.services !== undefined) { - let data54 = data.services; - const _errs123 = errors; - if (errors === _errs123) { - if (Array.isArray(data54)) { - var valid28 = true; - const len9 = data54.length; - for (let i9 = 0; i9 < len9; i9++) { - let data55 = data54[i9]; - const _errs125 = errors; - if (errors === _errs125) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - if (data55.serviceType !== undefined) { - let data56 = data55.serviceType; - const _errs128 = errors; - if (errors === _errs128) { - if (errors === _errs128) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err89 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema56.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid29 = _errs128 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceId !== undefined) { - let data57 = data55.serviceId; - const _errs130 = errors; - if (typeof data57 !== 'string') { - const err91 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[2].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema56.anyOf[2].allOf[1].properties.services.items - .properties.serviceId, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid29 = _errs130 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceDirection !== undefined) { - let data58 = data55.serviceDirection; - const _errs132 = errors; - if (typeof data58 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema56.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data58 === 'consumer' || - data58 === 'producer' || - data58 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema56.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema56.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema56.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid29 = _errs132 === errors; - } else { - var valid29 = true; - } - } - } - } else { - const err94 = { - instancePath: instancePath + '/services/' + i9, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[2].allOf[1].properties.services.items.type, - parentSchema: - schema56.anyOf[2].allOf[1].properties.services.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid28 = _errs125 === errors; - if (!valid28) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema56.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema56.anyOf[2].allOf[1].properties.services, - data: data54, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid27 = _errs123 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err96 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema56.anyOf[2].allOf[1].type, - parentSchema: schema56.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid21 = _errs118 === errors; - } - var _valid0 = _errs93 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs134 = errors; - const _errs135 = errors; - if (errors === _errs135) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.url === undefined && (missing9 = 'url')) || - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err97 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema56.anyOf[3].allOf[0].required, - parentSchema: schema56.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data.url !== undefined) { - let data59 = data.url; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data59 === 'string') { - if (!formats0(data59)) { - const err98 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema56.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema56.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid31 = _errs137 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.name !== undefined) { - let data60 = data.name; - const _errs139 = errors; - if (typeof data60 !== 'string') { - const err100 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema56.anyOf[3].allOf[0].properties.name, - data: data60, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid31 = _errs139 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.description !== undefined) { - let data61 = data.description; - const _errs141 = errors; - if (typeof data61 !== 'string') { - const err101 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema56.anyOf[3].allOf[0].properties.description, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid31 = _errs141 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.type !== undefined) { - let data62 = data.type; - const _errs143 = errors; - if (typeof data62 !== 'string') { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema56.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema56.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data62 === 'device' || - data62 === 'group' || - data62 === 'edge instantiable' || - data62 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema56.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema56.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema56.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid31 = _errs143 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.isPublic !== undefined) { - let data63 = data.isPublic; - const _errs145 = errors; - if (typeof data63 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema56.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema56.anyOf[3].allOf[0].properties.isPublic, - data: data63, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid31 = _errs145 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.viewer !== undefined) { - let data64 = data.viewer; - const _errs147 = errors; - if (errors === _errs147) { - if (Array.isArray(data64)) { - var valid32 = true; - const len10 = data64.length; - for (let i10 = 0; i10 < len10; i10++) { - let data65 = data64[i10]; - const _errs149 = errors; - if (errors === _errs149) { - if ( - data65 && - typeof data65 == 'object' && - !Array.isArray(data65) - ) { - let missing10; - if (data65.url === undefined && (missing10 = 'url')) { - const err105 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema56.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema56.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data65.url !== undefined) { - let data66 = data65.url; - const _errs151 = errors; - if (errors === _errs151) { - if (errors === _errs151) { - if (typeof data66 === 'string') { - if (!formats0(data66)) { - const err106 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema56.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema56.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid32 = _errs149 === errors; - if (!valid32) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema56.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: - schema56.anyOf[3].allOf[0].properties.viewer, - data: data64, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid31 = _errs147 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.owner !== undefined) { - let data67 = data.owner; - const _errs153 = errors; - if (errors === _errs153) { - if (Array.isArray(data67)) { - var valid34 = true; - const len11 = data67.length; - for (let i11 = 0; i11 < len11; i11++) { - let data68 = data67[i11]; - const _errs155 = errors; - if (errors === _errs155) { - if ( - data68 && - typeof data68 == 'object' && - !Array.isArray(data68) - ) { - let missing11; - if ( - data68.url === undefined && - (missing11 = 'url') - ) { - const err110 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema56.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema56.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data68.url !== undefined) { - let data69 = data68.url; - const _errs157 = errors; - if (errors === _errs157) { - if (errors === _errs157) { - if (typeof data69 === 'string') { - if (!formats0(data69)) { - const err111 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[3].allOf[0] - .properties.owner.items.properties - .url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema56.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[3].allOf[0].properties.owner - .items.type, - parentSchema: - schema56.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid34 = _errs155 === errors; - if (!valid34) { - break; - } - } - } else { - const err114 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema56.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema56.anyOf[3].allOf[0].properties.owner, - data: data67, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid31 = _errs153 === errors; - } else { - var valid31 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema56.anyOf[3].allOf[0].type, - parentSchema: schema56.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid30 = _errs135 === errors; - if (valid30) { - const _errs159 = errors; - if (errors === _errs159) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err116 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema56.anyOf[3].allOf[1].required, - parentSchema: schema56.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data.type !== undefined) { - let data70 = data.type; - const _errs161 = errors; - if ('group' !== data70) { - const err117 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema56.anyOf[3].allOf[1].properties.type, - data: data70, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data.devices !== undefined) { - let data71 = data.devices; - const _errs162 = errors; - if (errors === _errs162) { - if (Array.isArray(data71)) { - var valid37 = true; - const len12 = data71.length; - for (let i12 = 0; i12 < len12; i12++) { - let data72 = data71[i12]; - const _errs164 = errors; - if (errors === _errs164) { - if ( - data72 && - typeof data72 == 'object' && - !Array.isArray(data72) - ) { - let missing13; - if (data72.url === undefined && (missing13 = 'url')) { - const err118 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema56.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema56.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data72.url !== undefined) { - let data73 = data72.url; - const _errs166 = errors; - if (errors === _errs166) { - if (errors === _errs166) { - if (typeof data73 === 'string') { - if (!formats0(data73)) { - const err119 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema56.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema56.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema56.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema56.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema56.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid37 = _errs164 === errors; - if (!valid37) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema56.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema56.anyOf[3].allOf[1].properties.devices, - data: data71, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid36 = _errs162 === errors; - } else { - var valid36 = true; - } - } - } - } else { - const err123 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema56.anyOf[3].allOf[1].type, - parentSchema: schema56.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid30 = _errs159 === errors; - } - var _valid0 = _errs134 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err124 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema56.anyOf, - parentSchema: schema56, - data, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate71.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate71.errors = vErrors; - return errors === 0; -} -exports.validateUpdateDeviceBody = validate72; -const schema57 = { - title: 'Device Update', - anyOf: [ - { - title: 'Instantiable Cloud Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Concrete Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Instantiable Browser Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Device Group Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - }, - ], - }, - ], - 'x-standalone': false, - 'x-name': 'updateDeviceBody', - 'x-location': - '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate72( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema57.anyOf[0].allOf[0].required, - parentSchema: schema57.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs4 = errors; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.name, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err2 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.description, - data: data1, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err3 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema57.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema57.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema57.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema57.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.isPublic, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - var valid3 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - const err6 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: - schema57.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema57.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - const err7 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema57.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema57.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.viewer, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid5 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - const err11 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema57.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema57.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - const err12 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema57.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[0].allOf[0].properties.owner.items.type, - parentSchema: - schema57.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.owner, - data: data7, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema57.anyOf[0].allOf[0].type, - parentSchema: schema57.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data10) { - const err17 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema57.anyOf[0].allOf[1].properties.type, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err18 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema57.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema57.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data12)) { - var valid8 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err20 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs36 = errors; - if (typeof data15 !== 'string') { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema57.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema57.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err25 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema57.anyOf[0].allOf[1].properties.services, - data: data12, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err27 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema57.anyOf[0].allOf[1].type, - parentSchema: schema57.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid1 = _errs24 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs40 = errors; - const _errs41 = errors; - if (errors === _errs41) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if (data.type === undefined && (missing3 = 'type')) { - const err28 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema57.anyOf[1].allOf[0].required, - parentSchema: schema57.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data.name !== undefined) { - let data17 = data.name; - const _errs43 = errors; - if (typeof data17 !== 'string') { - const err29 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.name, - data: data17, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid11 = _errs43 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data18 = data.description; - const _errs45 = errors; - if (typeof data18 !== 'string') { - const err30 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.description, - data: data18, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data19 = data.type; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err31 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data19 === 'device' || - data19 === 'group' || - data19 === 'edge instantiable' || - data19 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema57.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema57.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema57.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data20 = data.isPublic; - const _errs49 = errors; - if (typeof data20 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema57.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.isPublic, - data: data20, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data21 = data.viewer; - const _errs51 = errors; - if (errors === _errs51) { - if (Array.isArray(data21)) { - var valid12 = true; - const len3 = data21.length; - for (let i3 = 0; i3 < len3; i3++) { - let data22 = data21[i3]; - const _errs53 = errors; - if (errors === _errs53) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - let missing4; - if (data22.url === undefined && (missing4 = 'url')) { - const err34 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema57.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema57.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data22.url !== undefined) { - let data23 = data22.url; - const _errs55 = errors; - if (errors === _errs55) { - if (errors === _errs55) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err35 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema57.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[1].allOf[0].properties.viewer.items.type, - parentSchema: - schema57.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid12 = _errs53 === errors; - if (!valid12) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.viewer, - data: data21, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data24 = data.owner; - const _errs57 = errors; - if (errors === _errs57) { - if (Array.isArray(data24)) { - var valid14 = true; - const len4 = data24.length; - for (let i4 = 0; i4 < len4; i4++) { - let data25 = data24[i4]; - const _errs59 = errors; - if (errors === _errs59) { - if ( - data25 && - typeof data25 == 'object' && - !Array.isArray(data25) - ) { - let missing5; - if (data25.url === undefined && (missing5 = 'url')) { - const err39 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema57.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema57.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data25.url !== undefined) { - let data26 = data25.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data26 === 'string') { - if (!formats0(data26)) { - const err40 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[1].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema57.anyOf[1].allOf[0].properties.owner - .items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema57.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid14 = _errs59 === errors; - if (!valid14) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.owner, - data: data24, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid11 = _errs57 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema57.anyOf[1].allOf[0].type, - parentSchema: schema57.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid10 = _errs41 === errors; - if (valid10) { - const _errs63 = errors; - if (errors === _errs63) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data27 = data.type; - const _errs65 = errors; - if ('device' !== data27) { - const err45 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema57.anyOf[1].allOf[1].properties.type, - data: data27, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data28 = data.experiment; - const _errs66 = errors; - if (errors === _errs66) { - if (errors === _errs66) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err46 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema57.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema57.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid16 = _errs66 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data29 = data.services; - const _errs68 = errors; - if (errors === _errs68) { - if (Array.isArray(data29)) { - var valid17 = true; - const len5 = data29.length; - for (let i5 = 0; i5 < len5; i5++) { - let data30 = data29[i5]; - const _errs70 = errors; - if (errors === _errs70) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - if (data30.serviceType !== undefined) { - let data31 = data30.serviceType; - const _errs73 = errors; - if (errors === _errs73) { - if (errors === _errs73) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err48 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[1].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema57.anyOf[1].allOf[1].properties.services.items - .properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid18 = _errs73 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceId !== undefined) { - let data32 = data30.serviceId; - const _errs75 = errors; - if (typeof data32 !== 'string') { - const err50 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[1].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema57.anyOf[1].allOf[1].properties.services.items - .properties.serviceId, - data: data32, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid18 = _errs75 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceDirection !== undefined) { - let data33 = data30.serviceDirection; - const _errs77 = errors; - if (typeof data33 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema57.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data33 === 'consumer' || - data33 === 'producer' || - data33 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema57.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema57.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema57.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err53 = { - instancePath: instancePath + '/services/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[1].allOf[1].properties.services.items.type, - parentSchema: - schema57.anyOf[1].allOf[1].properties.services.items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid17 = _errs70 === errors; - if (!valid17) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema57.anyOf[1].allOf[1].properties.services, - data: data29, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid16 = _errs68 === errors; - } else { - var valid16 = true; - } - } - } - } else { - const err55 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema57.anyOf[1].allOf[1].type, - parentSchema: schema57.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid10 = _errs63 === errors; - } - var _valid0 = _errs40 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs79 = errors; - const _errs80 = errors; - if (errors === _errs80) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if (data.type === undefined && (missing6 = 'type')) { - const err56 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema57.anyOf[2].allOf[0].required, - parentSchema: schema57.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data.name !== undefined) { - let data34 = data.name; - const _errs82 = errors; - if (typeof data34 !== 'string') { - const err57 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.name, - data: data34, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid20 = _errs82 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.description !== undefined) { - let data35 = data.description; - const _errs84 = errors; - if (typeof data35 !== 'string') { - const err58 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.description, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid20 = _errs84 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.type !== undefined) { - let data36 = data.type; - const _errs86 = errors; - if (typeof data36 !== 'string') { - const err59 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data36 === 'device' || - data36 === 'group' || - data36 === 'edge instantiable' || - data36 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema57.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema57.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema57.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid20 = _errs86 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.isPublic !== undefined) { - let data37 = data.isPublic; - const _errs88 = errors; - if (typeof data37 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema57.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.isPublic, - data: data37, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs88 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.viewer !== undefined) { - let data38 = data.viewer; - const _errs90 = errors; - if (errors === _errs90) { - if (Array.isArray(data38)) { - var valid21 = true; - const len6 = data38.length; - for (let i6 = 0; i6 < len6; i6++) { - let data39 = data38[i6]; - const _errs92 = errors; - if (errors === _errs92) { - if ( - data39 && - typeof data39 == 'object' && - !Array.isArray(data39) - ) { - let missing7; - if (data39.url === undefined && (missing7 = 'url')) { - const err62 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema57.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema57.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data39.url !== undefined) { - let data40 = data39.url; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err63 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[2].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema57.anyOf[2].allOf[0].properties.viewer - .items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema57.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs92 === errors; - if (!valid21) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.viewer, - data: data38, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid20 = _errs90 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.owner !== undefined) { - let data41 = data.owner; - const _errs96 = errors; - if (errors === _errs96) { - if (Array.isArray(data41)) { - var valid23 = true; - const len7 = data41.length; - for (let i7 = 0; i7 < len7; i7++) { - let data42 = data41[i7]; - const _errs98 = errors; - if (errors === _errs98) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - let missing8; - if (data42.url === undefined && (missing8 = 'url')) { - const err67 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + missing8 + "'", - schema: - schema57.anyOf[2].allOf[0].properties.owner.items - .required, - parentSchema: - schema57.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data42.url !== undefined) { - let data43 = data42.url; - const _errs100 = errors; - if (errors === _errs100) { - if (errors === _errs100) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err68 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema57.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema57.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid23 = _errs98 === errors; - if (!valid23) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.owner, - data: data41, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid20 = _errs96 === errors; - } else { - var valid20 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema57.anyOf[2].allOf[0].type, - parentSchema: schema57.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid19 = _errs80 === errors; - if (valid19) { - const _errs102 = errors; - if (errors === _errs102) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs104 = errors; - if ('edge instantiable' !== data44) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema57.anyOf[2].allOf[1].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.codeUrl !== undefined) { - let data45 = data.codeUrl; - const _errs105 = errors; - if (errors === _errs105) { - if (errors === _errs105) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err74 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema57.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema57.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.services !== undefined) { - let data46 = data.services; - const _errs107 = errors; - if (errors === _errs107) { - if (Array.isArray(data46)) { - var valid26 = true; - const len8 = data46.length; - for (let i8 = 0; i8 < len8; i8++) { - let data47 = data46[i8]; - const _errs109 = errors; - if (errors === _errs109) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - if (data47.serviceType !== undefined) { - let data48 = data47.serviceType; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema57.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceId !== undefined) { - let data49 = data47.serviceId; - const _errs114 = errors; - if (typeof data49 !== 'string') { - const err78 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[2].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema57.anyOf[2].allOf[1].properties.services.items - .properties.serviceId, - data: data49, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceDirection !== undefined) { - let data50 = data47.serviceDirection; - const _errs116 = errors; - if (typeof data50 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema57.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data50 === 'consumer' || - data50 === 'producer' || - data50 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema57.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema57.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema57.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err81 = { - instancePath: instancePath + '/services/' + i8, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[2].allOf[1].properties.services.items.type, - parentSchema: - schema57.anyOf[2].allOf[1].properties.services.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid26 = _errs109 === errors; - if (!valid26) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema57.anyOf[2].allOf[1].properties.services, - data: data46, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err83 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema57.anyOf[2].allOf[1].type, - parentSchema: schema57.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid19 = _errs102 === errors; - } - var _valid0 = _errs79 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs118 = errors; - const _errs119 = errors; - if (errors === _errs119) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if (data.type === undefined && (missing9 = 'type')) { - const err84 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema57.anyOf[3].allOf[0].required, - parentSchema: schema57.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data.name !== undefined) { - let data51 = data.name; - const _errs121 = errors; - if (typeof data51 !== 'string') { - const err85 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.name, - data: data51, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid29 = _errs121 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.description !== undefined) { - let data52 = data.description; - const _errs123 = errors; - if (typeof data52 !== 'string') { - const err86 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.description, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid29 = _errs123 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.type !== undefined) { - let data53 = data.type; - const _errs125 = errors; - if (typeof data53 !== 'string') { - const err87 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema57.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data53 === 'device' || - data53 === 'group' || - data53 === 'edge instantiable' || - data53 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema57.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema57.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema57.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid29 = _errs125 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.isPublic !== undefined) { - let data54 = data.isPublic; - const _errs127 = errors; - if (typeof data54 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema57.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.isPublic, - data: data54, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid29 = _errs127 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.viewer !== undefined) { - let data55 = data.viewer; - const _errs129 = errors; - if (errors === _errs129) { - if (Array.isArray(data55)) { - var valid30 = true; - const len9 = data55.length; - for (let i9 = 0; i9 < len9; i9++) { - let data56 = data55[i9]; - const _errs131 = errors; - if (errors === _errs131) { - if ( - data56 && - typeof data56 == 'object' && - !Array.isArray(data56) - ) { - let missing10; - if (data56.url === undefined && (missing10 = 'url')) { - const err90 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + missing10 + "'", - schema: - schema57.anyOf[3].allOf[0].properties.viewer.items - .required, - parentSchema: - schema57.anyOf[3].allOf[0].properties.viewer - .items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data56.url !== undefined) { - let data57 = data56.url; - const _errs133 = errors; - if (errors === _errs133) { - if (errors === _errs133) { - if (typeof data57 === 'string') { - if (!formats0(data57)) { - const err91 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema57.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema57.anyOf[3].allOf[0].properties.viewer.items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid30 = _errs131 === errors; - if (!valid30) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.viewer, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid29 = _errs129 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.owner !== undefined) { - let data58 = data.owner; - const _errs135 = errors; - if (errors === _errs135) { - if (Array.isArray(data58)) { - var valid32 = true; - const len10 = data58.length; - for (let i10 = 0; i10 < len10; i10++) { - let data59 = data58[i10]; - const _errs137 = errors; - if (errors === _errs137) { - if ( - data59 && - typeof data59 == 'object' && - !Array.isArray(data59) - ) { - let missing11; - if (data59.url === undefined && (missing11 = 'url')) { - const err95 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema57.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema57.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data59.url !== undefined) { - let data60 = data59.url; - const _errs139 = errors; - if (errors === _errs139) { - if (errors === _errs139) { - if (typeof data60 === 'string') { - if (!formats0(data60)) { - const err96 = { - instancePath: - instancePath + - '/owner/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + '/owner/' + i10 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema57.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[3].allOf[0].properties.owner.items - .type, - parentSchema: - schema57.anyOf[3].allOf[0].properties.owner.items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid32 = _errs137 === errors; - if (!valid32) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[3].allOf[0].properties.owner.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.owner, - data: data58, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid29 = _errs135 === errors; - } else { - var valid29 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema57.anyOf[3].allOf[0].type, - parentSchema: schema57.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid28 = _errs119 === errors; - if (valid28) { - const _errs141 = errors; - if (errors === _errs141) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data61 = data.type; - const _errs143 = errors; - if ('group' !== data61) { - const err101 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema57.anyOf[3].allOf[1].properties.type, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data.devices !== undefined) { - let data62 = data.devices; - const _errs144 = errors; - if (errors === _errs144) { - if (Array.isArray(data62)) { - var valid35 = true; - const len11 = data62.length; - for (let i11 = 0; i11 < len11; i11++) { - let data63 = data62[i11]; - const _errs146 = errors; - if (errors === _errs146) { - if ( - data63 && - typeof data63 == 'object' && - !Array.isArray(data63) - ) { - let missing12; - if (data63.url === undefined && (missing12 = 'url')) { - const err102 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: - "must have required property '" + missing12 + "'", - schema: - schema57.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema57.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } else { - if (data63.url !== undefined) { - let data64 = data63.url; - const _errs148 = errors; - if (errors === _errs148) { - if (errors === _errs148) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err103 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema57.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - } else { - const err104 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema57.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema57.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } - } - } - } - } else { - const err105 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema57.anyOf[3].allOf[1].properties.devices.items.type, - parentSchema: - schema57.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - var valid35 = _errs146 === errors; - if (!valid35) { - break; - } - } - } else { - const err106 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema57.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema57.anyOf[3].allOf[1].properties.devices, - data: data62, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - } - } else { - const err107 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema57.anyOf[3].allOf[1].type, - parentSchema: schema57.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid28 = _errs141 === errors; - } - var _valid0 = _errs118 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err108 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema57.anyOf, - parentSchema: schema57, - data, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - validate72.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate72.errors = vErrors; - return errors === 0; -} -exports.validateUpdateDeviceResponse200 = validate73; -const schema58 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'updateDeviceResponse200', - 'x-location': - '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate73( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema58.anyOf[0].allOf[0].required, - parentSchema: schema58.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - const err1 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema58.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err3 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.name, - data: data1, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err4 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.description, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs10 = errors; - if (typeof data3 !== 'string') { - const err5 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema58.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema58.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema58.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs12 = errors; - if (typeof data4 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema58.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.isPublic, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - const err8 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema58.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema58.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - const err9 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema58.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema58.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.viewer, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data8)) { - var valid5 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - const err13 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema58.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema58.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - const err14 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[0].allOf[0].properties - .owner.items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema58.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[0].allOf[0].properties.owner.items - .type, - parentSchema: - schema58.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.owner, - data: data8, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema58.anyOf[0].allOf[0].type, - parentSchema: schema58.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs28 = errors; - if ('cloud instantiable' !== data11) { - const err19 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema58.anyOf[0].allOf[1].properties.type, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err20 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema58.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema58.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data13)) { - var valid8 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs36 = errors; - if (errors === _errs36) { - if (errors === _errs36) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err24 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs40 = errors; - if (typeof data17 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema58.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema58.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid9 = _errs40 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err27 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema58.anyOf[0].allOf[1].properties.services, - data: data13, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema58.anyOf[0].allOf[1].type, - parentSchema: schema58.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid1 = _errs26 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs42 = errors; - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.url === undefined && (missing3 = 'url')) || - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema58.anyOf[1].allOf[0].required, - parentSchema: schema58.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.url !== undefined) { - let data18 = data.url; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - const err31 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema58.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.name !== undefined) { - let data19 = data.name; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err33 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.name, - data: data19, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data20 = data.description; - const _errs49 = errors; - if (typeof data20 !== 'string') { - const err34 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.description, - data: data20, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data21 = data.type; - const _errs51 = errors; - if (typeof data21 !== 'string') { - const err35 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data21 === 'device' || - data21 === 'group' || - data21 === 'edge instantiable' || - data21 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema58.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema58.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema58.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data22 = data.isPublic; - const _errs53 = errors; - if (typeof data22 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema58.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.isPublic, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid11 = _errs53 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data23 = data.viewer; - const _errs55 = errors; - if (errors === _errs55) { - if (Array.isArray(data23)) { - var valid12 = true; - const len3 = data23.length; - for (let i3 = 0; i3 < len3; i3++) { - let data24 = data23[i3]; - const _errs57 = errors; - if (errors === _errs57) { - if ( - data24 && - typeof data24 == 'object' && - !Array.isArray(data24) - ) { - let missing4; - if (data24.url === undefined && (missing4 = 'url')) { - const err38 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema58.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema58.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data24.url !== undefined) { - let data25 = data24.url; - const _errs59 = errors; - if (errors === _errs59) { - if (errors === _errs59) { - if (typeof data25 === 'string') { - if (!formats0(data25)) { - const err39 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema58.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema58.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid12 = _errs57 === errors; - if (!valid12) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.viewer, - data: data23, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid11 = _errs55 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data26 = data.owner; - const _errs61 = errors; - if (errors === _errs61) { - if (Array.isArray(data26)) { - var valid14 = true; - const len4 = data26.length; - for (let i4 = 0; i4 < len4; i4++) { - let data27 = data26[i4]; - const _errs63 = errors; - if (errors === _errs63) { - if ( - data27 && - typeof data27 == 'object' && - !Array.isArray(data27) - ) { - let missing5; - if (data27.url === undefined && (missing5 = 'url')) { - const err43 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema58.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema58.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data27.url !== undefined) { - let data28 = data27.url; - const _errs65 = errors; - if (errors === _errs65) { - if (errors === _errs65) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err44 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[1].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema58.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema58.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid14 = _errs63 === errors; - if (!valid14) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.owner, - data: data26, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid11 = _errs61 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema58.anyOf[1].allOf[0].type, - parentSchema: schema58.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid10 = _errs43 === errors; - if (valid10) { - const _errs67 = errors; - if (errors === _errs67) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data29 = data.type; - const _errs69 = errors; - if ('device' !== data29) { - const err49 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema58.anyOf[1].allOf[1].properties.type, - data: data29, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.connected !== undefined) { - let data30 = data.connected; - const _errs70 = errors; - if (typeof data30 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/connected', - schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema58.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema58.anyOf[1].allOf[1].properties.connected, - data: data30, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid16 = _errs70 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.announcedAvailability !== undefined) { - let data31 = data.announcedAvailability; - const _errs72 = errors; - if (errors === _errs72) { - if (Array.isArray(data31)) { - var valid17 = true; - const len5 = data31.length; - for (let i5 = 0; i5 < len5; i5++) { - let data32 = data31[i5]; - const _errs74 = errors; - if (errors === _errs74) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - if (data32.start !== undefined) { - let data33 = data32.start; - const _errs76 = errors; - if (errors === _errs76) { - if (errors === _errs76) { - if (typeof data33 === 'string') { - if (!formats22.validate(data33)) { - const err51 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema58.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start - .type, - parentSchema: - schema58.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid18 = _errs76 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data32.end !== undefined) { - let data34 = data32.end; - const _errs78 = errors; - if (errors === _errs78) { - if (errors === _errs78) { - if (typeof data34 === 'string') { - if (!formats22.validate(data34)) { - const err53 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema58.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end - .type, - parentSchema: - schema58.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } else { - const err55 = { - instancePath: instancePath + '/announcedAvailability/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[1].allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema58.anyOf[1].allOf[1].properties.announcedAvailability - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid17 = _errs74 === errors; - if (!valid17) { - break; - } - } - } else { - const err56 = { - instancePath: instancePath + '/announcedAvailability', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema58.anyOf[1].allOf[1].properties.announcedAvailability.type, - parentSchema: - schema58.anyOf[1].allOf[1].properties.announcedAvailability, - data: data31, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid16 = _errs72 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data35 = data.experiment; - const _errs80 = errors; - if (errors === _errs80) { - if (errors === _errs80) { - if (typeof data35 === 'string') { - if (!formats0(data35)) { - const err57 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema58.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid16 = _errs80 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data36 = data.services; - const _errs82 = errors; - if (errors === _errs82) { - if (Array.isArray(data36)) { - var valid19 = true; - const len6 = data36.length; - for (let i6 = 0; i6 < len6; i6++) { - let data37 = data36[i6]; - const _errs84 = errors; - if (errors === _errs84) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.serviceType !== undefined) { - let data38 = data37.serviceType; - const _errs87 = errors; - if (errors === _errs87) { - if (errors === _errs87) { - if (typeof data38 === 'string') { - if (!formats0(data38)) { - const err59 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema58.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid20 = _errs87 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceId !== undefined) { - let data39 = data37.serviceId; - const _errs89 = errors; - if (typeof data39 !== 'string') { - const err61 = { - instancePath: - instancePath + '/services/' + i6 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[1].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema58.anyOf[1].allOf[1].properties.services - .items.properties.serviceId, - data: data39, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs89 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceDirection !== undefined) { - let data40 = data37.serviceDirection; - const _errs91 = errors; - if (typeof data40 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema58.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data40 === 'consumer' || - data40 === 'producer' || - data40 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema58.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema58.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema58.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid20 = _errs91 === errors; - } else { - var valid20 = true; - } - } - } - } else { - const err64 = { - instancePath: instancePath + '/services/' + i6, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[1].allOf[1].properties.services.items - .type, - parentSchema: - schema58.anyOf[1].allOf[1].properties.services.items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid19 = _errs84 === errors; - if (!valid19) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema58.anyOf[1].allOf[1].properties.services, - data: data36, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid16 = _errs82 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema58.anyOf[1].allOf[1].type, - parentSchema: schema58.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid10 = _errs67 === errors; - } - var _valid0 = _errs42 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs93 = errors; - const _errs94 = errors; - if (errors === _errs94) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.url === undefined && (missing6 = 'url')) || - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err67 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema58.anyOf[2].allOf[0].required, - parentSchema: schema58.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data.url !== undefined) { - let data41 = data.url; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data41 === 'string') { - if (!formats0(data41)) { - const err68 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema58.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid22 = _errs96 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.name !== undefined) { - let data42 = data.name; - const _errs98 = errors; - if (typeof data42 !== 'string') { - const err70 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.name, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid22 = _errs98 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.description !== undefined) { - let data43 = data.description; - const _errs100 = errors; - if (typeof data43 !== 'string') { - const err71 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.description, - data: data43, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid22 = _errs100 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs102 = errors; - if (typeof data44 !== 'string') { - const err72 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data44 === 'device' || - data44 === 'group' || - data44 === 'edge instantiable' || - data44 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema58.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema58.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema58.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid22 = _errs102 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.isPublic !== undefined) { - let data45 = data.isPublic; - const _errs104 = errors; - if (typeof data45 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema58.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.isPublic, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid22 = _errs104 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.viewer !== undefined) { - let data46 = data.viewer; - const _errs106 = errors; - if (errors === _errs106) { - if (Array.isArray(data46)) { - var valid23 = true; - const len7 = data46.length; - for (let i7 = 0; i7 < len7; i7++) { - let data47 = data46[i7]; - const _errs108 = errors; - if (errors === _errs108) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - let missing7; - if (data47.url === undefined && (missing7 = 'url')) { - const err75 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema58.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema58.anyOf[2].allOf[0].properties.viewer - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data47.url !== undefined) { - let data48 = data47.url; - const _errs110 = errors; - if (errors === _errs110) { - if (errors === _errs110) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema58.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema58.anyOf[2].allOf[0].properties.viewer.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid23 = _errs108 === errors; - if (!valid23) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.viewer, - data: data46, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid22 = _errs106 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.owner !== undefined) { - let data49 = data.owner; - const _errs112 = errors; - if (errors === _errs112) { - if (Array.isArray(data49)) { - var valid25 = true; - const len8 = data49.length; - for (let i8 = 0; i8 < len8; i8++) { - let data50 = data49[i8]; - const _errs114 = errors; - if (errors === _errs114) { - if ( - data50 && - typeof data50 == 'object' && - !Array.isArray(data50) - ) { - let missing8; - if (data50.url === undefined && (missing8 = 'url')) { - const err80 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema58.anyOf[2].allOf[0].properties.owner - .items.required, - parentSchema: - schema58.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data50.url !== undefined) { - let data51 = data50.url; - const _errs116 = errors; - if (errors === _errs116) { - if (errors === _errs116) { - if (typeof data51 === 'string') { - if (!formats0(data51)) { - const err81 = { - instancePath: - instancePath + - '/owner/' + - i8 + - '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + '/owner/' + i8 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema58.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema58.anyOf[2].allOf[0].properties.owner.items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid25 = _errs114 === errors; - if (!valid25) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.owner, - data: data49, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid22 = _errs112 === errors; - } else { - var valid22 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema58.anyOf[2].allOf[0].type, - parentSchema: schema58.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid21 = _errs94 === errors; - if (valid21) { - const _errs118 = errors; - if (errors === _errs118) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data52 = data.type; - const _errs120 = errors; - if ('edge instantiable' !== data52) { - const err86 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema58.anyOf[2].allOf[1].properties.type, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.codeUrl !== undefined) { - let data53 = data.codeUrl; - const _errs121 = errors; - if (errors === _errs121) { - if (errors === _errs121) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err87 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema58.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema58.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid27 = _errs121 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.services !== undefined) { - let data54 = data.services; - const _errs123 = errors; - if (errors === _errs123) { - if (Array.isArray(data54)) { - var valid28 = true; - const len9 = data54.length; - for (let i9 = 0; i9 < len9; i9++) { - let data55 = data54[i9]; - const _errs125 = errors; - if (errors === _errs125) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - if (data55.serviceType !== undefined) { - let data56 = data55.serviceType; - const _errs128 = errors; - if (errors === _errs128) { - if (errors === _errs128) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err89 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema58.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid29 = _errs128 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceId !== undefined) { - let data57 = data55.serviceId; - const _errs130 = errors; - if (typeof data57 !== 'string') { - const err91 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[2].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema58.anyOf[2].allOf[1].properties.services.items - .properties.serviceId, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid29 = _errs130 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceDirection !== undefined) { - let data58 = data55.serviceDirection; - const _errs132 = errors; - if (typeof data58 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema58.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data58 === 'consumer' || - data58 === 'producer' || - data58 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema58.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema58.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema58.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid29 = _errs132 === errors; - } else { - var valid29 = true; - } - } - } - } else { - const err94 = { - instancePath: instancePath + '/services/' + i9, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[2].allOf[1].properties.services.items.type, - parentSchema: - schema58.anyOf[2].allOf[1].properties.services.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid28 = _errs125 === errors; - if (!valid28) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema58.anyOf[2].allOf[1].properties.services, - data: data54, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid27 = _errs123 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err96 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema58.anyOf[2].allOf[1].type, - parentSchema: schema58.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid21 = _errs118 === errors; - } - var _valid0 = _errs93 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs134 = errors; - const _errs135 = errors; - if (errors === _errs135) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.url === undefined && (missing9 = 'url')) || - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err97 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema58.anyOf[3].allOf[0].required, - parentSchema: schema58.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data.url !== undefined) { - let data59 = data.url; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data59 === 'string') { - if (!formats0(data59)) { - const err98 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema58.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema58.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid31 = _errs137 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.name !== undefined) { - let data60 = data.name; - const _errs139 = errors; - if (typeof data60 !== 'string') { - const err100 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema58.anyOf[3].allOf[0].properties.name, - data: data60, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid31 = _errs139 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.description !== undefined) { - let data61 = data.description; - const _errs141 = errors; - if (typeof data61 !== 'string') { - const err101 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema58.anyOf[3].allOf[0].properties.description, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid31 = _errs141 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.type !== undefined) { - let data62 = data.type; - const _errs143 = errors; - if (typeof data62 !== 'string') { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema58.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema58.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data62 === 'device' || - data62 === 'group' || - data62 === 'edge instantiable' || - data62 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema58.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema58.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema58.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid31 = _errs143 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.isPublic !== undefined) { - let data63 = data.isPublic; - const _errs145 = errors; - if (typeof data63 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema58.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema58.anyOf[3].allOf[0].properties.isPublic, - data: data63, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid31 = _errs145 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.viewer !== undefined) { - let data64 = data.viewer; - const _errs147 = errors; - if (errors === _errs147) { - if (Array.isArray(data64)) { - var valid32 = true; - const len10 = data64.length; - for (let i10 = 0; i10 < len10; i10++) { - let data65 = data64[i10]; - const _errs149 = errors; - if (errors === _errs149) { - if ( - data65 && - typeof data65 == 'object' && - !Array.isArray(data65) - ) { - let missing10; - if (data65.url === undefined && (missing10 = 'url')) { - const err105 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema58.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema58.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data65.url !== undefined) { - let data66 = data65.url; - const _errs151 = errors; - if (errors === _errs151) { - if (errors === _errs151) { - if (typeof data66 === 'string') { - if (!formats0(data66)) { - const err106 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema58.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema58.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid32 = _errs149 === errors; - if (!valid32) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: - schema58.anyOf[3].allOf[0].properties.viewer, - data: data64, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid31 = _errs147 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.owner !== undefined) { - let data67 = data.owner; - const _errs153 = errors; - if (errors === _errs153) { - if (Array.isArray(data67)) { - var valid34 = true; - const len11 = data67.length; - for (let i11 = 0; i11 < len11; i11++) { - let data68 = data67[i11]; - const _errs155 = errors; - if (errors === _errs155) { - if ( - data68 && - typeof data68 == 'object' && - !Array.isArray(data68) - ) { - let missing11; - if ( - data68.url === undefined && - (missing11 = 'url') - ) { - const err110 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema58.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema58.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data68.url !== undefined) { - let data69 = data68.url; - const _errs157 = errors; - if (errors === _errs157) { - if (errors === _errs157) { - if (typeof data69 === 'string') { - if (!formats0(data69)) { - const err111 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[3].allOf[0] - .properties.owner.items.properties - .url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema58.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[3].allOf[0].properties.owner - .items.type, - parentSchema: - schema58.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid34 = _errs155 === errors; - if (!valid34) { - break; - } - } - } else { - const err114 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema58.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema58.anyOf[3].allOf[0].properties.owner, - data: data67, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid31 = _errs153 === errors; - } else { - var valid31 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema58.anyOf[3].allOf[0].type, - parentSchema: schema58.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid30 = _errs135 === errors; - if (valid30) { - const _errs159 = errors; - if (errors === _errs159) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err116 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema58.anyOf[3].allOf[1].required, - parentSchema: schema58.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data.type !== undefined) { - let data70 = data.type; - const _errs161 = errors; - if ('group' !== data70) { - const err117 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema58.anyOf[3].allOf[1].properties.type, - data: data70, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data.devices !== undefined) { - let data71 = data.devices; - const _errs162 = errors; - if (errors === _errs162) { - if (Array.isArray(data71)) { - var valid37 = true; - const len12 = data71.length; - for (let i12 = 0; i12 < len12; i12++) { - let data72 = data71[i12]; - const _errs164 = errors; - if (errors === _errs164) { - if ( - data72 && - typeof data72 == 'object' && - !Array.isArray(data72) - ) { - let missing13; - if (data72.url === undefined && (missing13 = 'url')) { - const err118 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema58.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema58.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data72.url !== undefined) { - let data73 = data72.url; - const _errs166 = errors; - if (errors === _errs166) { - if (errors === _errs166) { - if (typeof data73 === 'string') { - if (!formats0(data73)) { - const err119 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema58.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema58.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema58.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema58.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema58.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid37 = _errs164 === errors; - if (!valid37) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema58.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema58.anyOf[3].allOf[1].properties.devices, - data: data71, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid36 = _errs162 === errors; - } else { - var valid36 = true; - } - } - } - } else { - const err123 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema58.anyOf[3].allOf[1].type, - parentSchema: schema58.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid30 = _errs159 === errors; - } - var _valid0 = _errs134 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err124 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema58.anyOf, - parentSchema: schema58, - data, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate73.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate73.errors = vErrors; - return errors === 0; -} -exports.validateInstantiateDeviceResponse201 = validate74; -const schema59 = { - type: 'object', - properties: { - instance: { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - deviceToken: { type: 'string' }, - }, - required: ['instance', 'deviceToken'], - 'x-standalone': false, - 'x-name': 'instantiateDeviceResponse201', - 'x-location': - '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate74( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.instance === undefined && (missing0 = 'instance')) || - (data.deviceToken === undefined && (missing0 = 'deviceToken')) - ) { - validate74.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema59.required, - parentSchema: schema59, - data, - }, - ]; - return false; - } else { - if (data.instance !== undefined) { - let data0 = data.instance; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing1; - if ( - (data0.url === undefined && (missing1 = 'url')) || - (data0.type === undefined && (missing1 = 'type')) || - (data0.name === undefined && (missing1 = 'name')) || - (data0.isPublic === undefined && (missing1 = 'isPublic')) - ) { - validate74.errors = [ - { - instancePath: instancePath + '/instance', - schemaPath: '#/properties/instance/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema59.properties.instance.allOf[0].required, - parentSchema: schema59.properties.instance.allOf[0], - data: data0, - }, - ]; - return false; - } else { - if (data0.url !== undefined) { - let data1 = data0.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data1 === 'string') { - if (!formats0(data1)) { - validate74.errors = [ - { - instancePath: instancePath + '/instance/url', - schemaPath: - '#/properties/instance/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema59.properties.instance.allOf[0].properties.url, - data: data1, - }, - ]; - return false; - } - } else { - validate74.errors = [ - { - instancePath: instancePath + '/instance/url', - schemaPath: - '#/properties/instance/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance.allOf[0].properties.url.type, - parentSchema: - schema59.properties.instance.allOf[0].properties.url, - data: data1, - }, - ]; - return false; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.name !== undefined) { - let data2 = data0.name; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate74.errors = [ - { - instancePath: instancePath + '/instance/name', - schemaPath: - '#/properties/instance/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance.allOf[0].properties.name.type, - parentSchema: - schema59.properties.instance.allOf[0].properties.name, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.description !== undefined) { - let data3 = data0.description; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate74.errors = [ - { - instancePath: instancePath + '/instance/description', - schemaPath: - '#/properties/instance/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance.allOf[0].properties.description - .type, - parentSchema: - schema59.properties.instance.allOf[0].properties - .description, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.type !== undefined) { - let data4 = data0.type; - const _errs10 = errors; - if (typeof data4 !== 'string') { - validate74.errors = [ - { - instancePath: instancePath + '/instance/type', - schemaPath: - '#/properties/instance/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance.allOf[0].properties.type - .type, - parentSchema: - schema59.properties.instance.allOf[0].properties.type, - data: data4, - }, - ]; - return false; - } - if ( - !( - data4 === 'device' || - data4 === 'group' || - data4 === 'edge instantiable' || - data4 === 'cloud instantiable' - ) - ) { - validate74.errors = [ - { - instancePath: instancePath + '/instance/type', - schemaPath: - '#/properties/instance/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema59.properties.instance.allOf[0].properties.type - .enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema59.properties.instance.allOf[0].properties.type - .enum, - parentSchema: - schema59.properties.instance.allOf[0].properties.type, - data: data4, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.isPublic !== undefined) { - let data5 = data0.isPublic; - const _errs12 = errors; - if (typeof data5 !== 'boolean') { - validate74.errors = [ - { - instancePath: instancePath + '/instance/isPublic', - schemaPath: - '#/properties/instance/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema59.properties.instance.allOf[0].properties - .isPublic.type, - parentSchema: - schema59.properties.instance.allOf[0].properties - .isPublic, - data: data5, - }, - ]; - return false; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.viewer !== undefined) { - let data6 = data0.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data6)) { - var valid3 = true; - const len0 = data6.length; - for (let i0 = 0; i0 < len0; i0++) { - let data7 = data6[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing2; - if (data7.url === undefined && (missing2 = 'url')) { - validate74.errors = [ - { - instancePath: - instancePath + '/instance/viewer/' + i0, - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + - missing2 + - "'", - schema: - schema59.properties.instance.allOf[0] - .properties.viewer.items.required, - parentSchema: - schema59.properties.instance.allOf[0] - .properties.viewer.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.url !== undefined) { - let data8 = data7.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/viewer/' + - i0 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema59.properties.instance - .allOf[0].properties.viewer - .items.properties.url, - data: data8, - }, - ]; - return false; - } - } else { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/viewer/' + - i0 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance - .allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema59.properties.instance - .allOf[0].properties.viewer.items - .properties.url, - data: data8, - }, - ]; - return false; - } - } - } - } - } - } else { - validate74.errors = [ - { - instancePath: - instancePath + '/instance/viewer/' + i0, - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema59.properties.instance.allOf[0] - .properties.viewer.items.type, - parentSchema: - schema59.properties.instance.allOf[0] - .properties.viewer.items, - data: data7, - }, - ]; - return false; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - validate74.errors = [ - { - instancePath: instancePath + '/instance/viewer', - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema59.properties.instance.allOf[0].properties - .viewer.type, - parentSchema: - schema59.properties.instance.allOf[0].properties - .viewer, - data: data6, - }, - ]; - return false; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.owner !== undefined) { - let data9 = data0.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data9)) { - var valid5 = true; - const len1 = data9.length; - for (let i1 = 0; i1 < len1; i1++) { - let data10 = data9[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data10 && - typeof data10 == 'object' && - !Array.isArray(data10) - ) { - let missing3; - if ( - data10.url === undefined && - (missing3 = 'url') - ) { - validate74.errors = [ - { - instancePath: - instancePath + '/instance/owner/' + i1, - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema59.properties.instance.allOf[0] - .properties.owner.items.required, - parentSchema: - schema59.properties.instance.allOf[0] - .properties.owner.items, - data: data10, - }, - ]; - return false; - } else { - if (data10.url !== undefined) { - let data11 = data10.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/owner/' + - i1 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema59.properties.instance - .allOf[0].properties.owner - .items.properties.url, - data: data11, - }, - ]; - return false; - } - } else { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/owner/' + - i1 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance - .allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema59.properties.instance - .allOf[0].properties.owner.items - .properties.url, - data: data11, - }, - ]; - return false; - } - } - } - } - } - } else { - validate74.errors = [ - { - instancePath: - instancePath + '/instance/owner/' + i1, - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema59.properties.instance.allOf[0] - .properties.owner.items.type, - parentSchema: - schema59.properties.instance.allOf[0] - .properties.owner.items, - data: data10, - }, - ]; - return false; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - validate74.errors = [ - { - instancePath: instancePath + '/instance/owner', - schemaPath: - '#/properties/instance/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema59.properties.instance.allOf[0].properties - .owner.type, - parentSchema: - schema59.properties.instance.allOf[0].properties - .owner, - data: data9, - }, - ]; - return false; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - validate74.errors = [ - { - instancePath: instancePath + '/instance', - schemaPath: '#/properties/instance/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema59.properties.instance.allOf[0].type, - parentSchema: schema59.properties.instance.allOf[0], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.type !== undefined) { - let data12 = data0.type; - const _errs28 = errors; - if ('device' !== data12) { - validate74.errors = [ - { - instancePath: instancePath + '/instance/type', - schemaPath: '#/properties/instance/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: - schema59.properties.instance.allOf[1].properties.type, - data: data12, - }, - ]; - return false; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data0.connected !== undefined) { - let data13 = data0.connected; - const _errs29 = errors; - if (typeof data13 !== 'boolean') { - validate74.errors = [ - { - instancePath: instancePath + '/instance/connected', - schemaPath: - '#/properties/instance/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema59.properties.instance.allOf[1].properties.connected - .type, - parentSchema: - schema59.properties.instance.allOf[1].properties.connected, - data: data13, - }, - ]; - return false; - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data0.announcedAvailability !== undefined) { - let data14 = data0.announcedAvailability; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data14)) { - var valid8 = true; - const len2 = data14.length; - for (let i2 = 0; i2 < len2; i2++) { - let data15 = data14[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if ( - data15 && - typeof data15 == 'object' && - !Array.isArray(data15) - ) { - if (data15.start !== undefined) { - let data16 = data15.start; - const _errs35 = errors; - if (errors === _errs35) { - if (errors === _errs35) { - if (typeof data16 === 'string') { - if (!formats22.validate(data16)) { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/announcedAvailability/' + - i2 + - '/start', - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema59.properties.instance.allOf[1] - .properties.announcedAvailability.items - .properties.start, - data: data16, - }, - ]; - return false; - } - } else { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/announcedAvailability/' + - i2 + - '/start', - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance.allOf[1] - .properties.announcedAvailability.items - .properties.start.type, - parentSchema: - schema59.properties.instance.allOf[1] - .properties.announcedAvailability.items - .properties.start, - data: data16, - }, - ]; - return false; - } - } - } - var valid9 = _errs35 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data15.end !== undefined) { - let data17 = data15.end; - const _errs37 = errors; - if (errors === _errs37) { - if (errors === _errs37) { - if (typeof data17 === 'string') { - if (!formats22.validate(data17)) { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/announcedAvailability/' + - i2 + - '/end', - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + - 'date-time' + - '"', - schema: 'date-time', - parentSchema: - schema59.properties.instance.allOf[1] - .properties.announcedAvailability - .items.properties.end, - data: data17, - }, - ]; - return false; - } - } else { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/announcedAvailability/' + - i2 + - '/end', - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance.allOf[1] - .properties.announcedAvailability.items - .properties.end.type, - parentSchema: - schema59.properties.instance.allOf[1] - .properties.announcedAvailability.items - .properties.end, - data: data17, - }, - ]; - return false; - } - } - } - var valid9 = _errs37 === errors; - } else { - var valid9 = true; - } - } - } else { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/announcedAvailability/' + - i2, - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema59.properties.instance.allOf[1].properties - .announcedAvailability.items.type, - parentSchema: - schema59.properties.instance.allOf[1].properties - .announcedAvailability.items, - data: data15, - }, - ]; - return false; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - validate74.errors = [ - { - instancePath: - instancePath + '/instance/announcedAvailability', - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema59.properties.instance.allOf[1].properties - .announcedAvailability.type, - parentSchema: - schema59.properties.instance.allOf[1].properties - .announcedAvailability, - data: data14, - }, - ]; - return false; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data0.experiment !== undefined) { - let data18 = data0.experiment; - const _errs39 = errors; - if (errors === _errs39) { - if (errors === _errs39) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - validate74.errors = [ - { - instancePath: instancePath + '/instance/experiment', - schemaPath: - '#/properties/instance/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema59.properties.instance.allOf[1].properties - .experiment, - data: data18, - }, - ]; - return false; - } - } else { - validate74.errors = [ - { - instancePath: instancePath + '/instance/experiment', - schemaPath: - '#/properties/instance/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance.allOf[1].properties - .experiment.type, - parentSchema: - schema59.properties.instance.allOf[1].properties - .experiment, - data: data18, - }, - ]; - return false; - } - } - } - var valid7 = _errs39 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data0.services !== undefined) { - let data19 = data0.services; - const _errs41 = errors; - if (errors === _errs41) { - if (Array.isArray(data19)) { - var valid10 = true; - const len3 = data19.length; - for (let i3 = 0; i3 < len3; i3++) { - let data20 = data19[i3]; - const _errs43 = errors; - if (errors === _errs43) { - if ( - data20 && - typeof data20 == 'object' && - !Array.isArray(data20) - ) { - if (data20.serviceType !== undefined) { - let data21 = data20.serviceType; - const _errs46 = errors; - if (errors === _errs46) { - if (errors === _errs46) { - if (typeof data21 === 'string') { - if (!formats0(data21)) { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i3 + - '/serviceType', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema59.properties.instance.allOf[1] - .properties.services.items - .properties.serviceType, - data: data21, - }, - ]; - return false; - } - } else { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i3 + - '/serviceType', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance.allOf[1] - .properties.services.items.properties - .serviceType.type, - parentSchema: - schema59.properties.instance.allOf[1] - .properties.services.items.properties - .serviceType, - data: data21, - }, - ]; - return false; - } - } - } - var valid11 = _errs46 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data20.serviceId !== undefined) { - let data22 = data20.serviceId; - const _errs48 = errors; - if (typeof data22 !== 'string') { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i3 + - '/serviceId', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance.allOf[1] - .properties.services.items.properties - .serviceId.type, - parentSchema: - schema59.properties.instance.allOf[1] - .properties.services.items.properties - .serviceId, - data: data22, - }, - ]; - return false; - } - var valid11 = _errs48 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data20.serviceDirection !== undefined) { - let data23 = data20.serviceDirection; - const _errs50 = errors; - if (typeof data23 !== 'string') { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i3 + - '/serviceDirection', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema59.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection.type, - parentSchema: - schema59.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection, - data: data23, - }, - ]; - return false; - } - if ( - !( - data23 === 'consumer' || - data23 === 'producer' || - data23 === 'prosumer' - ) - ) { - validate74.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i3 + - '/serviceDirection', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema59.properties.instance.allOf[1] - .properties.services.items - .properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema59.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection.enum, - parentSchema: - schema59.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection, - data: data23, - }, - ]; - return false; - } - var valid11 = _errs50 === errors; - } else { - var valid11 = true; - } - } - } - } else { - validate74.errors = [ - { - instancePath: - instancePath + '/instance/services/' + i3, - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema59.properties.instance.allOf[1].properties - .services.items.type, - parentSchema: - schema59.properties.instance.allOf[1].properties - .services.items, - data: data20, - }, - ]; - return false; - } - } - var valid10 = _errs43 === errors; - if (!valid10) { - break; - } - } - } else { - validate74.errors = [ - { - instancePath: instancePath + '/instance/services', - schemaPath: - '#/properties/instance/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema59.properties.instance.allOf[1].properties - .services.type, - parentSchema: - schema59.properties.instance.allOf[1].properties - .services, - data: data19, - }, - ]; - return false; - } - } - var valid7 = _errs41 === errors; - } else { - var valid7 = true; - } - } - } - } - } - } else { - validate74.errors = [ - { - instancePath: instancePath + '/instance', - schemaPath: '#/properties/instance/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema59.properties.instance.allOf[1].type, - parentSchema: schema59.properties.instance.allOf[1], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs26 === errors; - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.deviceToken !== undefined) { - let data24 = data.deviceToken; - const _errs52 = errors; - if (typeof data24 !== 'string') { - validate74.errors = [ - { - instancePath: instancePath + '/deviceToken', - schemaPath: '#/properties/deviceToken/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema59.properties.deviceToken.type, - parentSchema: schema59.properties.deviceToken, - data: data24, - }, - ]; - return false; - } - var valid0 = _errs52 === errors; - } else { - var valid0 = true; - } - } - } - } else { - validate74.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema59.type, - parentSchema: schema59, - data, - }, - ]; - return false; - } - } - validate74.errors = vErrors; - return errors === 0; -} -exports.validateGetDeviceAvailabilityResponse200 = validate75; -const schema60 = { - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - 'x-standalone': false, - 'x-name': 'getDeviceAvailabilityResponse200', - 'x-location': - '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate75( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate75.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema60.items.properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate75.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema60.items.properties.start.type, - parentSchema: schema60.items.properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate75.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema60.items.properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate75.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema60.items.properties.end.type, - parentSchema: schema60.items.properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate75.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema60.items.type, - parentSchema: schema60.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate75.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema60.type, - parentSchema: schema60, - data, - }, - ]; - return false; - } - } - validate75.errors = vErrors; - return errors === 0; -} -exports.validateAddDeviceAvailabilityRulesBody = validate76; -const schema61 = { - title: 'Availability Rules', - description: 'The availability rule to be applied.', - type: 'array', - items: { - title: 'Availability Rule', - type: 'object', - allOf: [ - { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - { - type: 'object', - properties: { - available: { type: 'boolean' }, - repeat: { - description: - 'If specified the time slot is repeated in a fixed offset specified by the frequency', - type: 'object', - properties: { - frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, - until: { - description: 'Up to this date-time the time slot will be repeated.', - type: 'string', - format: 'date-time', - }, - count: { - description: 'How often the time slot will be repeated', - type: 'integer', - }, - }, - required: ['frequency'], - }, - }, - }, - ], - }, - 'x-standalone': false, - 'x-name': 'addDeviceAvailabilityRulesBody', - 'x-location': - '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate76( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { - validate76.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema61.items.type, - parentSchema: schema61.items, - data: data0, - }, - ]; - return false; - } - const _errs3 = errors; - if (errors === _errs3) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate76.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/allOf/0/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema61.items.allOf[0].properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate76.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/allOf/0/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema61.items.allOf[0].properties.start.type, - parentSchema: schema61.items.allOf[0].properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid2 = _errs5 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs7 = errors; - if (errors === _errs7) { - if (errors === _errs7) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate76.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/allOf/0/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema61.items.allOf[0].properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate76.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/allOf/0/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema61.items.allOf[0].properties.end.type, - parentSchema: schema61.items.allOf[0].properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - } - } else { - validate76.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema61.items.allOf[0].type, - parentSchema: schema61.items.allOf[0], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs3 === errors; - if (valid1) { - const _errs9 = errors; - if (errors === _errs9) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.available !== undefined) { - let data3 = data0.available; - const _errs11 = errors; - if (typeof data3 !== 'boolean') { - validate76.errors = [ - { - instancePath: instancePath + '/' + i0 + '/available', - schemaPath: '#/items/allOf/1/properties/available/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema61.items.allOf[1].properties.available.type, - parentSchema: schema61.items.allOf[1].properties.available, - data: data3, - }, - ]; - return false; - } - var valid3 = _errs11 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data0.repeat !== undefined) { - let data4 = data0.repeat; - const _errs13 = errors; - if (errors === _errs13) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing0; - if (data4.frequency === undefined && (missing0 = 'frequency')) { - validate76.errors = [ - { - instancePath: instancePath + '/' + i0 + '/repeat', - schemaPath: '#/items/allOf/1/properties/repeat/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema61.items.allOf[1].properties.repeat.required, - parentSchema: schema61.items.allOf[1].properties.repeat, - data: data4, - }, - ]; - return false; - } else { - if (data4.frequency !== undefined) { - let data5 = data4.frequency; - const _errs15 = errors; - if (typeof data5 !== 'string') { - validate76.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/frequency', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/frequency/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema61.items.allOf[1].properties.repeat.properties - .frequency.type, - parentSchema: - schema61.items.allOf[1].properties.repeat.properties - .frequency, - data: data5, - }, - ]; - return false; - } - if ( - !( - data5 === 'HOURLY' || - data5 === 'DAILY' || - data5 === 'WEEKLY' - ) - ) { - validate76.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/frequency', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/frequency/enum', - keyword: 'enum', - params: { - allowedValues: - schema61.items.allOf[1].properties.repeat.properties - .frequency.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema61.items.allOf[1].properties.repeat.properties - .frequency.enum, - parentSchema: - schema61.items.allOf[1].properties.repeat.properties - .frequency, - data: data5, - }, - ]; - return false; - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.until !== undefined) { - let data6 = data4.until; - const _errs17 = errors; - if (errors === _errs17) { - if (errors === _errs17) { - if (typeof data6 === 'string') { - if (!formats22.validate(data6)) { - validate76.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/until', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/until/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema61.items.allOf[1].properties.repeat - .properties.until, - data: data6, - }, - ]; - return false; - } - } else { - validate76.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/until', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/until/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema61.items.allOf[1].properties.repeat - .properties.until.type, - parentSchema: - schema61.items.allOf[1].properties.repeat - .properties.until, - data: data6, - }, - ]; - return false; - } - } - } - var valid4 = _errs17 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.count !== undefined) { - let data7 = data4.count; - const _errs19 = errors; - if ( - !( - typeof data7 == 'number' && - !(data7 % 1) && - !isNaN(data7) && - isFinite(data7) - ) - ) { - validate76.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/count', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/count/type', - keyword: 'type', - params: { type: 'integer' }, - message: 'must be integer', - schema: - schema61.items.allOf[1].properties.repeat.properties - .count.type, - parentSchema: - schema61.items.allOf[1].properties.repeat.properties - .count, - data: data7, - }, - ]; - return false; - } - var valid4 = _errs19 === errors; - } else { - var valid4 = true; - } - } - } - } - } else { - validate76.errors = [ - { - instancePath: instancePath + '/' + i0 + '/repeat', - schemaPath: '#/items/allOf/1/properties/repeat/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema61.items.allOf[1].properties.repeat.type, - parentSchema: schema61.items.allOf[1].properties.repeat, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs13 === errors; - } else { - var valid3 = true; - } - } - } else { - validate76.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema61.items.allOf[1].type, - parentSchema: schema61.items.allOf[1], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs9 === errors; - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate76.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema61.type, - parentSchema: schema61, - data, - }, - ]; - return false; - } - } - validate76.errors = vErrors; - return errors === 0; -} -exports.validateAddDeviceAvailabilityRulesResponse200 = validate77; -const schema62 = { - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - 'x-standalone': false, - 'x-name': 'addDeviceAvailabilityRulesResponse200', - 'x-location': - '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate77( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate77.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema62.items.properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate77.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema62.items.properties.start.type, - parentSchema: schema62.items.properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate77.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema62.items.properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate77.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema62.items.properties.end.type, - parentSchema: schema62.items.properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate77.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema62.items.type, - parentSchema: schema62.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate77.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema62.type, - parentSchema: schema62, - data, - }, - ]; - return false; - } - } - validate77.errors = vErrors; - return errors === 0; -} -exports.validateCreateWebsocketTokenResponse200 = validate78; -const schema63 = { - type: 'string', - 'x-standalone': false, - 'x-name': 'createWebsocketTokenResponse200', - 'x-location': - '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate78( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate78.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema63.type, - parentSchema: schema63, - data, - }, - ]; - return false; - } - validate78.errors = vErrors; - return errors === 0; -} -exports.validateSendSignalingMessageBody = validate79; -const schema64 = { - title: 'Sig Message', - anyOf: [ - { - title: 'Create Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'command' }, - command: { type: 'string' }, - }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'createPeerconnection' }, - connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, - connectionUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - type: 'object', - required: ['serviceType', 'serviceId', 'remoteServiceId'], - title: 'Service Config', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - additionalProperties: true, - }, - }, - tiebreaker: { type: 'boolean' }, - config: { type: 'object', additionalProperties: true }, - }, - required: [ - 'command', - 'connectionType', - 'connectionUrl', - 'services', - 'tiebreaker', - ], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Close Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'command' }, - command: { type: 'string' }, - }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'closePeerconnection' }, - connectionUrl: { type: 'string', format: 'uri' }, - }, - required: ['command', 'connectionUrl'], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Signaling Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'signaling' }, - signalingType: { type: 'string' }, - connectionUrl: { type: 'string', format: 'uri' }, - content: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'signalingType', 'connectionUrl', 'content'], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Configuration Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'configuration' }, - configuration: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'configuration'], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Experiment Status Changed Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'experiment-status-changed' }, - status: { type: 'string' }, - message: { type: 'string' }, - }, - required: ['messageType', 'status'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-standalone': false, - 'x-name': 'sendSignalingMessageBody', - 'x-location': - '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate79( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - const _errs3 = errors; - if (errors === _errs3) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema64.anyOf[0].allOf[0].allOf[0].required, - parentSchema: schema64.anyOf[0].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/0/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[0].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema64.anyOf[0].allOf[0].allOf[0].properties.messageType, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } - } - } else { - const err2 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[0].allOf[0].allOf[0].type, - parentSchema: schema64.anyOf[0].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - var valid2 = _errs3 === errors; - if (valid2) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - const err3 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema64.anyOf[0].allOf[0].allOf[1].required, - parentSchema: schema64.anyOf[0].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs10 = errors; - if ('command' !== data1) { - const err4 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema64.anyOf[0].allOf[0].allOf[1].properties.messageType, - data: data1, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid4 = _errs10 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs11 = errors; - if (typeof data2 !== 'string') { - const err5 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[0].allOf[0].allOf[1].properties.command.type, - parentSchema: schema64.anyOf[0].allOf[0].allOf[1].properties.command, - data: data2, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid4 = _errs11 === errors; - } else { - var valid4 = true; - } - } - } - } else { - const err6 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[0].allOf[0].allOf[1].type, - parentSchema: schema64.anyOf[0].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - } - var valid2 = _errs8 === errors; - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs13 = errors; - if (errors === _errs13) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.command === undefined && (missing2 = 'command')) || - (data.connectionType === undefined && (missing2 = 'connectionType')) || - (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || - (data.services === undefined && (missing2 = 'services')) || - (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) - ) { - const err7 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema64.anyOf[0].allOf[1].required, - parentSchema: schema64.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } else { - if (data.command !== undefined) { - let data3 = data.command; - const _errs15 = errors; - if ('createPeerconnection' !== data3) { - const err8 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/0/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'createPeerconnection' }, - message: 'must be equal to constant', - schema: 'createPeerconnection', - parentSchema: schema64.anyOf[0].allOf[1].properties.command, - data: data3, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - var valid5 = _errs15 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.connectionType !== undefined) { - let data4 = data.connectionType; - const _errs16 = errors; - if (typeof data4 !== 'string') { - const err9 = { - instancePath: instancePath + '/connectionType', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[0].allOf[1].properties.connectionType.type, - parentSchema: schema64.anyOf[0].allOf[1].properties.connectionType, - data: data4, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { - const err10 = { - instancePath: instancePath + '/connectionType', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/enum', - keyword: 'enum', - params: { - allowedValues: - schema64.anyOf[0].allOf[1].properties.connectionType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema64.anyOf[0].allOf[1].properties.connectionType.enum, - parentSchema: schema64.anyOf[0].allOf[1].properties.connectionType, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - var valid5 = _errs16 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.connectionUrl !== undefined) { - let data5 = data.connectionUrl; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - const err11 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema64.anyOf[0].allOf[1].properties.connectionUrl, - data: data5, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } else { - const err12 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[0].allOf[1].properties.connectionUrl.type, - parentSchema: schema64.anyOf[0].allOf[1].properties.connectionUrl, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - } - var valid5 = _errs18 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.services !== undefined) { - let data6 = data.services; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data6)) { - var valid6 = true; - const len0 = data6.length; - for (let i0 = 0; i0 < len0; i0++) { - let data7 = data6[i0]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing3; - if ( - (data7.serviceType === undefined && - (missing3 = 'serviceType')) || - (data7.serviceId === undefined && - (missing3 = 'serviceId')) || - (data7.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - const err13 = { - instancePath: instancePath + '/services/' + i0, - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema64.anyOf[0].allOf[1].properties.services.items - .required, - parentSchema: - schema64.anyOf[0].allOf[1].properties.services.items, - data: data7, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data7.serviceType !== undefined) { - let data8 = data7.serviceType; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - const err14 = { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema64.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema64.anyOf[0].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema64.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data8, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data7.serviceId !== undefined) { - let data9 = data7.serviceId; - const _errs27 = errors; - if (typeof data9 !== 'string') { - const err16 = { - instancePath: - instancePath + '/services/' + i0 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema64.anyOf[0].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema64.anyOf[0].allOf[1].properties.services - .items.properties.serviceId, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data7.remoteServiceId !== undefined) { - let data10 = data7.remoteServiceId; - const _errs29 = errors; - if (typeof data10 !== 'string') { - const err17 = { - instancePath: - instancePath + - '/services/' + - i0 + - '/remoteServiceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema64.anyOf[0].allOf[1].properties.services - .items.properties.remoteServiceId.type, - parentSchema: - schema64.anyOf[0].allOf[1].properties.services - .items.properties.remoteServiceId, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - const err18 = { - instancePath: instancePath + '/services/' + i0, - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema64.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema64.anyOf[0].allOf[1].properties.services.items, - data: data7, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid6 = _errs22 === errors; - if (!valid6) { - break; - } - } - } else { - const err19 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema64.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema64.anyOf[0].allOf[1].properties.services, - data: data6, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - var valid5 = _errs20 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.tiebreaker !== undefined) { - let data11 = data.tiebreaker; - const _errs31 = errors; - if (typeof data11 !== 'boolean') { - const err20 = { - instancePath: instancePath + '/tiebreaker', - schemaPath: '#/anyOf/0/allOf/1/properties/tiebreaker/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema64.anyOf[0].allOf[1].properties.tiebreaker.type, - parentSchema: schema64.anyOf[0].allOf[1].properties.tiebreaker, - data: data11, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - var valid5 = _errs31 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.config !== undefined) { - let data12 = data.config; - const _errs33 = errors; - if (errors === _errs33) { - if ( - data12 && - typeof data12 == 'object' && - !Array.isArray(data12) - ) { - } else { - const err21 = { - instancePath: instancePath + '/config', - schemaPath: '#/anyOf/0/allOf/1/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[0].allOf[1].properties.config.type, - parentSchema: schema64.anyOf[0].allOf[1].properties.config, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - var valid5 = _errs33 === errors; - } else { - var valid5 = true; - } - } - } - } - } - } - } - } else { - const err22 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[0].allOf[1].type, - parentSchema: schema64.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } - var valid1 = _errs13 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs36 = errors; - const _errs37 = errors; - const _errs38 = errors; - if (errors === _errs38) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing4; - if (data.messageType === undefined && (missing4 = 'messageType')) { - const err23 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: schema64.anyOf[1].allOf[0].allOf[0].required, - parentSchema: schema64.anyOf[1].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data13 = data.messageType; - if (typeof data13 !== 'string') { - const err24 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/1/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[1].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema64.anyOf[1].allOf[0].allOf[0].properties.messageType, - data: data13, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - } - } - } else { - const err25 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[1].allOf[0].allOf[0].type, - parentSchema: schema64.anyOf[1].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid9 = _errs38 === errors; - if (valid9) { - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing5; - if ( - (data.messageType === undefined && (missing5 = 'messageType')) || - (data.command === undefined && (missing5 = 'command')) - ) { - const err26 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: "must have required property '" + missing5 + "'", - schema: schema64.anyOf[1].allOf[0].allOf[1].required, - parentSchema: schema64.anyOf[1].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data14 = data.messageType; - const _errs45 = errors; - if ('command' !== data14) { - const err27 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: - schema64.anyOf[1].allOf[0].allOf[1].properties.messageType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.command !== undefined) { - let data15 = data.command; - const _errs46 = errors; - if (typeof data15 !== 'string') { - const err28 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[1].allOf[0].allOf[1].properties.command.type, - parentSchema: schema64.anyOf[1].allOf[0].allOf[1].properties.command, - data: data15, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - var valid11 = _errs46 === errors; - } else { - var valid11 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[1].allOf[0].allOf[1].type, - parentSchema: schema64.anyOf[1].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid9 = _errs43 === errors; - } - var valid8 = _errs37 === errors; - if (valid8) { - const _errs48 = errors; - if (errors === _errs48) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.command === undefined && (missing6 = 'command')) || - (data.connectionUrl === undefined && (missing6 = 'connectionUrl')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema64.anyOf[1].allOf[1].required, - parentSchema: schema64.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.command !== undefined) { - let data16 = data.command; - const _errs50 = errors; - if ('closePeerconnection' !== data16) { - const err31 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/1/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'closePeerconnection' }, - message: 'must be equal to constant', - schema: 'closePeerconnection', - parentSchema: schema64.anyOf[1].allOf[1].properties.command, - data: data16, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - var valid12 = _errs50 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if (data.connectionUrl !== undefined) { - let data17 = data.connectionUrl; - const _errs51 = errors; - if (errors === _errs51) { - if (errors === _errs51) { - if (typeof data17 === 'string') { - if (!formats0(data17)) { - const err32 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema64.anyOf[1].allOf[1].properties.connectionUrl, - data: data17, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } else { - const err33 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[1].allOf[1].properties.connectionUrl.type, - parentSchema: schema64.anyOf[1].allOf[1].properties.connectionUrl, - data: data17, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - } - } - var valid12 = _errs51 === errors; - } else { - var valid12 = true; - } - } - } - } else { - const err34 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[1].allOf[1].type, - parentSchema: schema64.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - } - var valid8 = _errs48 === errors; - } - var _valid0 = _errs36 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs53 = errors; - const _errs54 = errors; - if (errors === _errs54) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing7; - if (data.messageType === undefined && (missing7 = 'messageType')) { - const err35 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: "must have required property '" + missing7 + "'", - schema: schema64.anyOf[2].allOf[0].required, - parentSchema: schema64.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data18 = data.messageType; - if (typeof data18 !== 'string') { - const err36 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/2/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[2].allOf[0].properties.messageType.type, - parentSchema: schema64.anyOf[2].allOf[0].properties.messageType, - data: data18, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } else { - const err37 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[2].allOf[0].type, - parentSchema: schema64.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid13 = _errs54 === errors; - if (valid13) { - const _errs59 = errors; - if (errors === _errs59) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing8; - if ( - (data.messageType === undefined && (missing8 = 'messageType')) || - (data.signalingType === undefined && (missing8 = 'signalingType')) || - (data.connectionUrl === undefined && (missing8 = 'connectionUrl')) || - (data.content === undefined && (missing8 = 'content')) - ) { - const err38 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: "must have required property '" + missing8 + "'", - schema: schema64.anyOf[2].allOf[1].required, - parentSchema: schema64.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data19 = data.messageType; - const _errs61 = errors; - if ('signaling' !== data19) { - const err39 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/2/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'signaling' }, - message: 'must be equal to constant', - schema: 'signaling', - parentSchema: schema64.anyOf[2].allOf[1].properties.messageType, - data: data19, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - var valid15 = _errs61 === errors; - } else { - var valid15 = true; - } - if (valid15) { - if (data.signalingType !== undefined) { - let data20 = data.signalingType; - const _errs62 = errors; - if (typeof data20 !== 'string') { - const err40 = { - instancePath: instancePath + '/signalingType', - schemaPath: '#/anyOf/2/allOf/1/properties/signalingType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[2].allOf[1].properties.signalingType.type, - parentSchema: schema64.anyOf[2].allOf[1].properties.signalingType, - data: data20, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - var valid15 = _errs62 === errors; - } else { - var valid15 = true; - } - if (valid15) { - if (data.connectionUrl !== undefined) { - let data21 = data.connectionUrl; - const _errs64 = errors; - if (errors === _errs64) { - if (errors === _errs64) { - if (typeof data21 === 'string') { - if (!formats0(data21)) { - const err41 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: - '#/anyOf/2/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema64.anyOf[2].allOf[1].properties.connectionUrl, - data: data21, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } else { - const err42 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema64.anyOf[2].allOf[1].properties.connectionUrl.type, - parentSchema: - schema64.anyOf[2].allOf[1].properties.connectionUrl, - data: data21, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - } - var valid15 = _errs64 === errors; - } else { - var valid15 = true; - } - if (valid15) { - if (data.content !== undefined) { - let data22 = data.content; - const _errs66 = errors; - if (errors === _errs66) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - } else { - const err43 = { - instancePath: instancePath + '/content', - schemaPath: '#/anyOf/2/allOf/1/properties/content/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[2].allOf[1].properties.content.type, - parentSchema: schema64.anyOf[2].allOf[1].properties.content, - data: data22, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid15 = _errs66 === errors; - } else { - var valid15 = true; - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[2].allOf[1].type, - parentSchema: schema64.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid13 = _errs59 === errors; - } - var _valid0 = _errs53 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs69 = errors; - const _errs70 = errors; - if (errors === _errs70) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if (data.messageType === undefined && (missing9 = 'messageType')) { - const err45 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema64.anyOf[3].allOf[0].required, - parentSchema: schema64.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data23 = data.messageType; - if (typeof data23 !== 'string') { - const err46 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/3/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[3].allOf[0].properties.messageType.type, - parentSchema: schema64.anyOf[3].allOf[0].properties.messageType, - data: data23, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - } - } else { - const err47 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[3].allOf[0].type, - parentSchema: schema64.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid16 = _errs70 === errors; - if (valid16) { - const _errs75 = errors; - if (errors === _errs75) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing10; - if ( - (data.messageType === undefined && (missing10 = 'messageType')) || - (data.configuration === undefined && (missing10 = 'configuration')) - ) { - const err48 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: "must have required property '" + missing10 + "'", - schema: schema64.anyOf[3].allOf[1].required, - parentSchema: schema64.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data24 = data.messageType; - const _errs77 = errors; - if ('configuration' !== data24) { - const err49 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/3/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'configuration' }, - message: 'must be equal to constant', - schema: 'configuration', - parentSchema: schema64.anyOf[3].allOf[1].properties.messageType, - data: data24, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data.configuration !== undefined) { - let data25 = data.configuration; - const _errs78 = errors; - if (errors === _errs78) { - if (data25 && typeof data25 == 'object' && !Array.isArray(data25)) { - } else { - const err50 = { - instancePath: instancePath + '/configuration', - schemaPath: '#/anyOf/3/allOf/1/properties/configuration/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema64.anyOf[3].allOf[1].properties.configuration.type, - parentSchema: - schema64.anyOf[3].allOf[1].properties.configuration, - data: data25, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err51 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[3].allOf[1].type, - parentSchema: schema64.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } - var valid16 = _errs75 === errors; - } - var _valid0 = _errs69 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs81 = errors; - const _errs82 = errors; - if (errors === _errs82) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing11; - if (data.messageType === undefined && (missing11 = 'messageType')) { - const err52 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: "must have required property '" + missing11 + "'", - schema: schema64.anyOf[4].allOf[0].required, - parentSchema: schema64.anyOf[4].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data26 = data.messageType; - if (typeof data26 !== 'string') { - const err53 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/4/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[4].allOf[0].properties.messageType.type, - parentSchema: schema64.anyOf[4].allOf[0].properties.messageType, - data: data26, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - } - } else { - const err54 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[4].allOf[0].type, - parentSchema: schema64.anyOf[4].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid19 = _errs82 === errors; - if (valid19) { - const _errs87 = errors; - if (errors === _errs87) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if ( - (data.messageType === undefined && (missing12 = 'messageType')) || - (data.status === undefined && (missing12 = 'status')) - ) { - const err55 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema64.anyOf[4].allOf[1].required, - parentSchema: schema64.anyOf[4].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data27 = data.messageType; - const _errs89 = errors; - if ('experiment-status-changed' !== data27) { - const err56 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/4/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'experiment-status-changed' }, - message: 'must be equal to constant', - schema: 'experiment-status-changed', - parentSchema: schema64.anyOf[4].allOf[1].properties.messageType, - data: data27, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - var valid21 = _errs89 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data.status !== undefined) { - let data28 = data.status; - const _errs90 = errors; - if (typeof data28 !== 'string') { - const err57 = { - instancePath: instancePath + '/status', - schemaPath: '#/anyOf/4/allOf/1/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[4].allOf[1].properties.status.type, - parentSchema: schema64.anyOf[4].allOf[1].properties.status, - data: data28, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid21 = _errs90 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data.message !== undefined) { - let data29 = data.message; - const _errs92 = errors; - if (typeof data29 !== 'string') { - const err58 = { - instancePath: instancePath + '/message', - schemaPath: '#/anyOf/4/allOf/1/properties/message/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema64.anyOf[4].allOf[1].properties.message.type, - parentSchema: schema64.anyOf[4].allOf[1].properties.message, - data: data29, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid21 = _errs92 === errors; - } else { - var valid21 = true; - } - } - } - } - } else { - const err59 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema64.anyOf[4].allOf[1].type, - parentSchema: schema64.anyOf[4].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } - var valid19 = _errs87 === errors; - } - var _valid0 = _errs81 === errors; - valid0 = valid0 || _valid0; - } - } - } - } - if (!valid0) { - const err60 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema64.anyOf, - parentSchema: schema64, - data, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - validate79.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate79.errors = vErrors; - return errors === 0; -} -exports.validateListPeerconnectionsResponse200 = validate80; -const schema65 = { - type: 'array', - items: { - title: 'Peerconnection Overview', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - }, - 'x-standalone': false, - 'x-name': 'listPeerconnectionsResponse200', - 'x-location': - '#/paths//peerconnections/get/responses/200/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate80( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if ( - (data0.url === undefined && (missing0 = 'url')) || - (data0.type === undefined && (missing0 = 'type')) || - (data0.status === undefined && (missing0 = 'status')) - ) { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema65.items.allOf[0].required, - parentSchema: schema65.items.allOf[0], - data: data0, - }, - ]; - return false; - } else { - if (data0.url !== undefined) { - let data1 = data0.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data1 === 'string') { - if (!formats0(data1)) { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0 + '/url', - schemaPath: '#/items/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema65.items.allOf[0].properties.url, - data: data1, - }, - ]; - return false; - } - } else { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0 + '/url', - schemaPath: '#/items/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema65.items.allOf[0].properties.url.type, - parentSchema: schema65.items.allOf[0].properties.url, - data: data1, - }, - ]; - return false; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.type !== undefined) { - let data2 = data0.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema65.items.allOf[0].properties.type.type, - parentSchema: schema65.items.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if (!(data2 === 'local' || data2 === 'webrtc')) { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema65.items.allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema65.items.allOf[0].properties.type.enum, - parentSchema: schema65.items.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.status !== undefined) { - let data3 = data0.status; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0 + '/status', - schemaPath: '#/items/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema65.items.allOf[0].properties.status.type, - parentSchema: schema65.items.allOf[0].properties.status, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'new' || - data3 === 'connecting' || - data3 === 'connected' || - data3 === 'disconnected' || - data3 === 'failed' || - data3 === 'closed' - ) - ) { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0 + '/status', - schemaPath: '#/items/allOf/0/properties/status/enum', - keyword: 'enum', - params: { - allowedValues: schema65.items.allOf[0].properties.status.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema65.items.allOf[0].properties.status.enum, - parentSchema: schema65.items.allOf[0].properties.status, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema65.items.allOf[0].type, - parentSchema: schema65.items.allOf[0], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs10 = errors; - if (errors === _errs10) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing1; - if (data0.devices === undefined && (missing1 = 'devices')) { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema65.items.allOf[1].required, - parentSchema: schema65.items.allOf[1], - data: data0, - }, - ]; - return false; - } else { - if (data0.devices !== undefined) { - let data4 = data0.devices; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - if (data4.length > 2) { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0 + '/devices', - schemaPath: '#/items/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema65.items.allOf[1].properties.devices, - data: data4, - }, - ]; - return false; - } else { - if (data4.length < 2) { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0 + '/devices', - schemaPath: '#/items/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema65.items.allOf[1].properties.devices, - data: data4, - }, - ]; - return false; - } else { - var valid4 = true; - const len1 = data4.length; - for (let i1 = 0; i1 < len1; i1++) { - let data5 = data4[i1]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing2; - if (data5.url === undefined && (missing2 = 'url')) { - validate80.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/devices/' + i1, - schemaPath: - '#/items/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema65.items.allOf[1].properties.devices.items - .required, - parentSchema: - schema65.items.allOf[1].properties.devices.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate80.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/devices/' + - i1 + - '/url', - schemaPath: - '#/items/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema65.items.allOf[1].properties - .devices.items.properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate80.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/devices/' + - i1 + - '/url', - schemaPath: - '#/items/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema65.items.allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema65.items.allOf[1].properties.devices - .items.properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate80.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/devices/' + i1, - schemaPath: - '#/items/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema65.items.allOf[1].properties.devices.items - .type, - parentSchema: - schema65.items.allOf[1].properties.devices.items, - data: data5, - }, - ]; - return false; - } - } - var valid4 = _errs14 === errors; - if (!valid4) { - break; - } - } - } - } - } else { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0 + '/devices', - schemaPath: '#/items/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema65.items.allOf[1].properties.devices.type, - parentSchema: schema65.items.allOf[1].properties.devices, - data: data4, - }, - ]; - return false; - } - } - } - } - } else { - validate80.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema65.items.allOf[1].type, - parentSchema: schema65.items.allOf[1], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate80.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema65.type, - parentSchema: schema65, - data, - }, - ]; - return false; - } - } - validate80.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionBody = validate81; -const schema66 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createPeerconnectionBody', - 'x-location': - '#/paths//peerconnections/post/requestBody/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate81( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate81.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema66.allOf[0].required, - parentSchema: schema66.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate81.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema66.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate81.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema66.allOf[0].properties.url.type, - parentSchema: schema66.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate81.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema66.allOf[0].properties.type.type, - parentSchema: schema66.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate81.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema66.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema66.allOf[0].properties.type.enum, - parentSchema: schema66.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate81.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema66.allOf[0].properties.status.type, - parentSchema: schema66.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate81.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema66.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema66.allOf[0].properties.status.enum, - parentSchema: schema66.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate81.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema66.allOf[0].type, - parentSchema: schema66.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate81.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema66.allOf[1].required, - parentSchema: schema66.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate81.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema66.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate81.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema66.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate81.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema66.allOf[1].properties.devices.items.required, - parentSchema: schema66.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate81.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema66.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate81.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema66.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema66.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.config !== undefined) { - let data6 = data4.config; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - if (data6.services !== undefined) { - let data7 = data6.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid6 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing3; - if ( - (data8.serviceType === undefined && - (missing3 = 'serviceType')) || - (data8.serviceId === undefined && - (missing3 = 'serviceId')) || - (data8.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate81.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema66.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema66.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.serviceType !== undefined) { - let data9 = data8.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate81.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema66.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } else { - validate81.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema66.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema66.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data8.serviceId !== undefined) { - let data10 = data8.serviceId; - const _errs25 = errors; - if (typeof data10 !== 'string') { - validate81.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema66.allOf[1].properties - .devices.items.properties - .config.properties - .services.items.properties - .serviceId.type, - parentSchema: - schema66.allOf[1].properties - .devices.items.properties - .config.properties - .services.items.properties - .serviceId, - data: data10, - }, - ]; - return false; - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data8.remoteServiceId !== - undefined - ) { - let data11 = - data8.remoteServiceId; - const _errs27 = errors; - if (typeof data11 !== 'string') { - validate81.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema66.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema66.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data11, - }, - ]; - return false; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate81.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema66.allOf[1].properties.devices - .items.properties.config - .properties.services.items.type, - parentSchema: - schema66.allOf[1].properties.devices - .items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } - } - var valid6 = _errs20 === errors; - if (!valid6) { - break; - } - } - } else { - validate81.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema66.allOf[1].properties.devices.items - .properties.config.properties.services - .type, - parentSchema: - schema66.allOf[1].properties.devices.items - .properties.config.properties.services, - data: data7, - }, - ]; - return false; - } - } - } - } else { - validate81.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema66.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema66.allOf[1].properties.devices.items - .properties.config, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate81.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema66.allOf[1].properties.devices.items.type, - parentSchema: schema66.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate81.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema66.allOf[1].properties.devices.type, - parentSchema: schema66.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate81.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema66.allOf[1].type, - parentSchema: schema66.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate81.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionResponse201 = validate82; -const schema67 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createPeerconnectionResponse201', - 'x-location': - '#/paths//peerconnections/post/responses/201/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate82( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate82.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema67.allOf[0].required, - parentSchema: schema67.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate82.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema67.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate82.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema67.allOf[0].properties.url.type, - parentSchema: schema67.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate82.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema67.allOf[0].properties.type.type, - parentSchema: schema67.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate82.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema67.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema67.allOf[0].properties.type.enum, - parentSchema: schema67.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate82.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema67.allOf[0].properties.status.type, - parentSchema: schema67.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate82.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema67.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema67.allOf[0].properties.status.enum, - parentSchema: schema67.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate82.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema67.allOf[0].type, - parentSchema: schema67.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate82.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema67.allOf[1].required, - parentSchema: schema67.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate82.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema67.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate82.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema67.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate82.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema67.allOf[1].properties.devices.items.required, - parentSchema: schema67.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate82.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema67.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate82.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema67.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema67.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.config !== undefined) { - let data6 = data4.config; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - if (data6.services !== undefined) { - let data7 = data6.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid6 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing3; - if ( - (data8.serviceType === undefined && - (missing3 = 'serviceType')) || - (data8.serviceId === undefined && - (missing3 = 'serviceId')) || - (data8.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate82.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema67.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema67.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.serviceType !== undefined) { - let data9 = data8.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate82.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema67.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } else { - validate82.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema67.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema67.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data8.serviceId !== undefined) { - let data10 = data8.serviceId; - const _errs25 = errors; - if (typeof data10 !== 'string') { - validate82.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema67.allOf[1].properties - .devices.items.properties - .config.properties - .services.items.properties - .serviceId.type, - parentSchema: - schema67.allOf[1].properties - .devices.items.properties - .config.properties - .services.items.properties - .serviceId, - data: data10, - }, - ]; - return false; - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data8.remoteServiceId !== - undefined - ) { - let data11 = - data8.remoteServiceId; - const _errs27 = errors; - if (typeof data11 !== 'string') { - validate82.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema67.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema67.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data11, - }, - ]; - return false; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate82.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema67.allOf[1].properties.devices - .items.properties.config - .properties.services.items.type, - parentSchema: - schema67.allOf[1].properties.devices - .items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } - } - var valid6 = _errs20 === errors; - if (!valid6) { - break; - } - } - } else { - validate82.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema67.allOf[1].properties.devices.items - .properties.config.properties.services - .type, - parentSchema: - schema67.allOf[1].properties.devices.items - .properties.config.properties.services, - data: data7, - }, - ]; - return false; - } - } - } - } else { - validate82.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema67.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema67.allOf[1].properties.devices.items - .properties.config, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate82.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema67.allOf[1].properties.devices.items.type, - parentSchema: schema67.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate82.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema67.allOf[1].properties.devices.type, - parentSchema: schema67.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate82.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema67.allOf[1].type, - parentSchema: schema67.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate82.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionResponse202 = validate83; -const schema68 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createPeerconnectionResponse202', - 'x-location': - '#/paths//peerconnections/post/responses/202/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate83( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate83.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema68.allOf[0].required, - parentSchema: schema68.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate83.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema68.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate83.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema68.allOf[0].properties.url.type, - parentSchema: schema68.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate83.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema68.allOf[0].properties.type.type, - parentSchema: schema68.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate83.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema68.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema68.allOf[0].properties.type.enum, - parentSchema: schema68.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate83.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema68.allOf[0].properties.status.type, - parentSchema: schema68.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate83.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema68.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema68.allOf[0].properties.status.enum, - parentSchema: schema68.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate83.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema68.allOf[0].type, - parentSchema: schema68.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate83.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema68.allOf[1].required, - parentSchema: schema68.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate83.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema68.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate83.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema68.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate83.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema68.allOf[1].properties.devices.items.required, - parentSchema: schema68.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate83.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema68.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate83.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema68.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema68.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.config !== undefined) { - let data6 = data4.config; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - if (data6.services !== undefined) { - let data7 = data6.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid6 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing3; - if ( - (data8.serviceType === undefined && - (missing3 = 'serviceType')) || - (data8.serviceId === undefined && - (missing3 = 'serviceId')) || - (data8.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate83.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema68.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema68.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.serviceType !== undefined) { - let data9 = data8.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate83.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema68.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } else { - validate83.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema68.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema68.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data8.serviceId !== undefined) { - let data10 = data8.serviceId; - const _errs25 = errors; - if (typeof data10 !== 'string') { - validate83.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema68.allOf[1].properties - .devices.items.properties - .config.properties - .services.items.properties - .serviceId.type, - parentSchema: - schema68.allOf[1].properties - .devices.items.properties - .config.properties - .services.items.properties - .serviceId, - data: data10, - }, - ]; - return false; - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data8.remoteServiceId !== - undefined - ) { - let data11 = - data8.remoteServiceId; - const _errs27 = errors; - if (typeof data11 !== 'string') { - validate83.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema68.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema68.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data11, - }, - ]; - return false; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate83.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema68.allOf[1].properties.devices - .items.properties.config - .properties.services.items.type, - parentSchema: - schema68.allOf[1].properties.devices - .items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } - } - var valid6 = _errs20 === errors; - if (!valid6) { - break; - } - } - } else { - validate83.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema68.allOf[1].properties.devices.items - .properties.config.properties.services - .type, - parentSchema: - schema68.allOf[1].properties.devices.items - .properties.config.properties.services, - data: data7, - }, - ]; - return false; - } - } - } - } else { - validate83.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema68.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema68.allOf[1].properties.devices.items - .properties.config, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate83.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema68.allOf[1].properties.devices.items.type, - parentSchema: schema68.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate83.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema68.allOf[1].properties.devices.type, - parentSchema: schema68.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate83.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema68.allOf[1].type, - parentSchema: schema68.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate83.errors = vErrors; - return errors === 0; -} -exports.validateGetPeerconnectionResponse200 = validate84; -const schema69 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'getPeerconnectionResponse200', - 'x-location': - '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate84( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate84.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema69.allOf[0].required, - parentSchema: schema69.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate84.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema69.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate84.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema69.allOf[0].properties.url.type, - parentSchema: schema69.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate84.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema69.allOf[0].properties.type.type, - parentSchema: schema69.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate84.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema69.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema69.allOf[0].properties.type.enum, - parentSchema: schema69.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate84.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema69.allOf[0].properties.status.type, - parentSchema: schema69.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate84.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema69.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema69.allOf[0].properties.status.enum, - parentSchema: schema69.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate84.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema69.allOf[0].type, - parentSchema: schema69.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate84.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema69.allOf[1].required, - parentSchema: schema69.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate84.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema69.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate84.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema69.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate84.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema69.allOf[1].properties.devices.items.required, - parentSchema: schema69.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate84.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema69.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate84.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema69.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema69.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.config !== undefined) { - let data6 = data4.config; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - if (data6.services !== undefined) { - let data7 = data6.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid6 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing3; - if ( - (data8.serviceType === undefined && - (missing3 = 'serviceType')) || - (data8.serviceId === undefined && - (missing3 = 'serviceId')) || - (data8.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate84.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema69.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema69.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.serviceType !== undefined) { - let data9 = data8.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate84.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema69.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } else { - validate84.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema69.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema69.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data8.serviceId !== undefined) { - let data10 = data8.serviceId; - const _errs25 = errors; - if (typeof data10 !== 'string') { - validate84.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema69.allOf[1].properties - .devices.items.properties - .config.properties - .services.items.properties - .serviceId.type, - parentSchema: - schema69.allOf[1].properties - .devices.items.properties - .config.properties - .services.items.properties - .serviceId, - data: data10, - }, - ]; - return false; - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data8.remoteServiceId !== - undefined - ) { - let data11 = - data8.remoteServiceId; - const _errs27 = errors; - if (typeof data11 !== 'string') { - validate84.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema69.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema69.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data11, - }, - ]; - return false; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate84.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema69.allOf[1].properties.devices - .items.properties.config - .properties.services.items.type, - parentSchema: - schema69.allOf[1].properties.devices - .items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } - } - var valid6 = _errs20 === errors; - if (!valid6) { - break; - } - } - } else { - validate84.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema69.allOf[1].properties.devices.items - .properties.config.properties.services - .type, - parentSchema: - schema69.allOf[1].properties.devices.items - .properties.config.properties.services, - data: data7, - }, - ]; - return false; - } - } - } - } else { - validate84.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema69.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema69.allOf[1].properties.devices.items - .properties.config, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate84.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema69.allOf[1].properties.devices.items.type, - parentSchema: schema69.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate84.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema69.allOf[1].properties.devices.type, - parentSchema: schema69.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate84.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema69.allOf[1].type, - parentSchema: schema69.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate84.errors = vErrors; - return errors === 0; -} -exports.validatePatchPeerconnectionDeviceStatusBody = validate85; -const schema70 = { - type: 'object', - properties: { - status: { - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['status'], - 'x-standalone': false, - 'x-name': 'patchPeerconnectionDeviceStatusBody', - 'x-location': - '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema', - 'x-schema-type': 'all', -}; -function validate85( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.status === undefined && (missing0 = 'status')) { - validate85.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema70.required, - parentSchema: schema70, - data, - }, - ]; - return false; - } else { - if (data.status !== undefined) { - let data0 = data.status; - if (typeof data0 !== 'string') { - validate85.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema70.properties.status.type, - parentSchema: schema70.properties.status, - data: data0, - }, - ]; - return false; - } - if ( - !( - data0 === 'new' || - data0 === 'connecting' || - data0 === 'connected' || - data0 === 'disconnected' || - data0 === 'failed' || - data0 === 'closed' - ) - ) { - validate85.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema70.properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema70.properties.status.enum, - parentSchema: schema70.properties.status, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate85.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema70.type, - parentSchema: schema70, - data, - }, - ]; - return false; - } - } - validate85.errors = vErrors; - return errors === 0; -} -exports.validateAuthenticationMessageRequest = validate86; -const schema71 = { - title: 'Authentication Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'authenticate' }, - token: { type: 'string' }, - authenticated: { type: 'boolean' }, - }, - required: ['messageType'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'AuthenticationMessageRequest', - 'x-location': '#/components/schemas/authentication_message_request', - 'x-schema-type': 'request', -}; -function validate86( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate86.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema71.allOf[0].required, - parentSchema: schema71.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate86.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema71.allOf[0].properties.messageType.type, - parentSchema: schema71.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate86.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema71.allOf[0].type, - parentSchema: schema71.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.messageType === undefined && (missing1 = 'messageType')) { - validate86.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema71.allOf[1].required, - parentSchema: schema71.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('authenticate' !== data1) { - validate86.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'authenticate' }, - message: 'must be equal to constant', - schema: 'authenticate', - parentSchema: schema71.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.token !== undefined) { - let data2 = data.token; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate86.errors = [ - { - instancePath: instancePath + '/token', - schemaPath: '#/allOf/1/properties/token/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema71.allOf[1].properties.token.type, - parentSchema: schema71.allOf[1].properties.token, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.authenticated !== undefined) { - let data3 = data.authenticated; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - validate86.errors = [ - { - instancePath: instancePath + '/authenticated', - schemaPath: '#/allOf/1/properties/authenticated/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema71.allOf[1].properties.authenticated.type, - parentSchema: schema71.allOf[1].properties.authenticated, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate86.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema71.allOf[1].type, - parentSchema: schema71.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate86.errors = vErrors; - return errors === 0; -} -exports.validateAuthenticationMessageResponse = validate87; -const schema72 = { - title: 'Authentication Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'authenticate' }, - token: { type: 'string' }, - authenticated: { type: 'boolean' }, - }, - required: ['messageType'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'AuthenticationMessageResponse', - 'x-location': '#/components/schemas/authentication_message_response', - 'x-schema-type': 'response', -}; -function validate87( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate87.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema72.allOf[0].required, - parentSchema: schema72.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate87.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema72.allOf[0].properties.messageType.type, - parentSchema: schema72.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate87.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema72.allOf[0].type, - parentSchema: schema72.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.messageType === undefined && (missing1 = 'messageType')) { - validate87.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema72.allOf[1].required, - parentSchema: schema72.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('authenticate' !== data1) { - validate87.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'authenticate' }, - message: 'must be equal to constant', - schema: 'authenticate', - parentSchema: schema72.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.token !== undefined) { - let data2 = data.token; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate87.errors = [ - { - instancePath: instancePath + '/token', - schemaPath: '#/allOf/1/properties/token/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema72.allOf[1].properties.token.type, - parentSchema: schema72.allOf[1].properties.token, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.authenticated !== undefined) { - let data3 = data.authenticated; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - validate87.errors = [ - { - instancePath: instancePath + '/authenticated', - schemaPath: '#/allOf/1/properties/authenticated/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema72.allOf[1].properties.authenticated.type, - parentSchema: schema72.allOf[1].properties.authenticated, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate87.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema72.allOf[1].type, - parentSchema: schema72.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate87.errors = vErrors; - return errors === 0; -} -exports.validateConnectionStateChangedMessageRequest = validate88; -const schema73 = { - title: 'Connection State Changed Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'connection-state-changed' }, - connectionUrl: { type: 'string', format: 'uri' }, - status: { - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['connectionUrl', 'status'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ConnectionStateChangedMessageRequest', - 'x-location': '#/components/schemas/connection_state_changed_message_request', - 'x-schema-type': 'request', -}; -function validate88( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate88.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema73.allOf[0].required, - parentSchema: schema73.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate88.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema73.allOf[0].properties.messageType.type, - parentSchema: schema73.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate88.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema73.allOf[0].type, - parentSchema: schema73.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || - (data.status === undefined && (missing1 = 'status')) - ) { - validate88.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema73.allOf[1].required, - parentSchema: schema73.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('connection-state-changed' !== data1) { - validate88.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'connection-state-changed' }, - message: 'must be equal to constant', - schema: 'connection-state-changed', - parentSchema: schema73.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.connectionUrl !== undefined) { - let data2 = data.connectionUrl; - const _errs8 = errors; - if (errors === _errs8) { - if (errors === _errs8) { - if (typeof data2 === 'string') { - if (!formats0(data2)) { - validate88.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema73.allOf[1].properties.connectionUrl, - data: data2, - }, - ]; - return false; - } - } else { - validate88.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema73.allOf[1].properties.connectionUrl.type, - parentSchema: schema73.allOf[1].properties.connectionUrl, - data: data2, - }, - ]; - return false; - } - } - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.status !== undefined) { - let data3 = data.status; - const _errs10 = errors; - if (typeof data3 !== 'string') { - validate88.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/1/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema73.allOf[1].properties.status.type, - parentSchema: schema73.allOf[1].properties.status, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'new' || - data3 === 'connecting' || - data3 === 'connected' || - data3 === 'disconnected' || - data3 === 'failed' || - data3 === 'closed' - ) - ) { - validate88.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/1/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema73.allOf[1].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema73.allOf[1].properties.status.enum, - parentSchema: schema73.allOf[1].properties.status, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate88.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema73.allOf[1].type, - parentSchema: schema73.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate88.errors = vErrors; - return errors === 0; -} -exports.validateConnectionStateChangedMessageResponse = validate89; -const schema74 = { - title: 'Connection State Changed Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'connection-state-changed' }, - connectionUrl: { type: 'string', format: 'uri' }, - status: { - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['connectionUrl', 'status'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ConnectionStateChangedMessageResponse', - 'x-location': '#/components/schemas/connection_state_changed_message_response', - 'x-schema-type': 'response', -}; -function validate89( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate89.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema74.allOf[0].required, - parentSchema: schema74.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate89.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema74.allOf[0].properties.messageType.type, - parentSchema: schema74.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate89.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema74.allOf[0].type, - parentSchema: schema74.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || - (data.status === undefined && (missing1 = 'status')) - ) { - validate89.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema74.allOf[1].required, - parentSchema: schema74.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('connection-state-changed' !== data1) { - validate89.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'connection-state-changed' }, - message: 'must be equal to constant', - schema: 'connection-state-changed', - parentSchema: schema74.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.connectionUrl !== undefined) { - let data2 = data.connectionUrl; - const _errs8 = errors; - if (errors === _errs8) { - if (errors === _errs8) { - if (typeof data2 === 'string') { - if (!formats0(data2)) { - validate89.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema74.allOf[1].properties.connectionUrl, - data: data2, - }, - ]; - return false; - } - } else { - validate89.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema74.allOf[1].properties.connectionUrl.type, - parentSchema: schema74.allOf[1].properties.connectionUrl, - data: data2, - }, - ]; - return false; - } - } - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.status !== undefined) { - let data3 = data.status; - const _errs10 = errors; - if (typeof data3 !== 'string') { - validate89.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/1/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema74.allOf[1].properties.status.type, - parentSchema: schema74.allOf[1].properties.status, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'new' || - data3 === 'connecting' || - data3 === 'connected' || - data3 === 'disconnected' || - data3 === 'failed' || - data3 === 'closed' - ) - ) { - validate89.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/1/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema74.allOf[1].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema74.allOf[1].properties.status.enum, - parentSchema: schema74.allOf[1].properties.status, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate89.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema74.allOf[1].type, - parentSchema: schema74.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate89.errors = vErrors; - return errors === 0; -} -exports.validateUserReferenceRequest = validate90; -const schema75 = { - title: 'User Reference', - type: 'object', - properties: { url: { type: 'string', description: 'URL of the user', format: 'uri' } }, - required: ['url'], - 'x-standalone': true, - 'x-name': 'UserReferenceRequest', - 'x-location': '#/components/schemas/user_reference_request', - 'x-schema-type': 'request', -}; -function validate90( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.url === undefined && (missing0 = 'url')) { - validate90.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema75.required, - parentSchema: schema75, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate90.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema75.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate90.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema75.properties.url.type, - parentSchema: schema75.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - } - } - } else { - validate90.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema75.type, - parentSchema: schema75, - data, - }, - ]; - return false; - } - } - validate90.errors = vErrors; - return errors === 0; -} -exports.validateUserReferenceResponse = validate91; -const schema76 = { - title: 'User Reference', - type: 'object', - properties: { url: { type: 'string', description: 'URL of the user', format: 'uri' } }, - required: ['url'], - 'x-standalone': true, - 'x-name': 'UserReferenceResponse', - 'x-location': '#/components/schemas/user_reference_response', - 'x-schema-type': 'response', -}; -function validate91( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.url === undefined && (missing0 = 'url')) { - validate91.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema76.required, - parentSchema: schema76, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate91.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema76.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate91.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema76.properties.url.type, - parentSchema: schema76.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - } - } - } else { - validate91.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema76.type, - parentSchema: schema76, - data, - }, - ]; - return false; - } - } - validate91.errors = vErrors; - return errors === 0; -} -exports.validateDeviceOverviewRequest = validate92; -const schema77 = { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'DeviceOverviewRequest', - 'x-location': '#/components/schemas/device_overview_request', - 'x-schema-type': 'request', -}; -function validate92( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate92.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema77.required, - parentSchema: schema77, - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs1 = errors; - if (typeof data0 !== 'string') { - validate92.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema77.properties.name.type, - parentSchema: schema77.properties.name, - data: data0, - }, - ]; - return false; - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs3 = errors; - if (typeof data1 !== 'string') { - validate92.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema77.properties.description.type, - parentSchema: schema77.properties.description, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs5 = errors; - if (typeof data2 !== 'string') { - validate92.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema77.properties.type.type, - parentSchema: schema77.properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate92.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema77.properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema77.properties.type.enum, - parentSchema: schema77.properties.type, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs5 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs7 = errors; - if (typeof data3 !== 'boolean') { - validate92.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema77.properties.isPublic.type, - parentSchema: schema77.properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid0 = _errs7 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs9 = errors; - if (errors === _errs9) { - if (Array.isArray(data4)) { - var valid1 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs11 = errors; - if (errors === _errs11) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate92.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: schema77.properties.viewer.items.required, - parentSchema: schema77.properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs13 = errors; - if (errors === _errs13) { - if (errors === _errs13) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate92.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema77.properties.viewer.items.properties - .url, - data: data6, - }, - ]; - return false; - } - } else { - validate92.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema77.properties.viewer.items.properties - .url.type, - parentSchema: - schema77.properties.viewer.items.properties - .url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate92.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema77.properties.viewer.items.type, - parentSchema: schema77.properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs11 === errors; - if (!valid1) { - break; - } - } - } else { - validate92.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema77.properties.viewer.type, - parentSchema: schema77.properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid0 = _errs9 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs15 = errors; - if (errors === _errs15) { - if (Array.isArray(data7)) { - var valid3 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs17 = errors; - if (errors === _errs17) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate92.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: schema77.properties.owner.items.required, - parentSchema: schema77.properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate92.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema77.properties.owner.items.properties - .url, - data: data9, - }, - ]; - return false; - } - } else { - validate92.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema77.properties.owner.items.properties - .url.type, - parentSchema: - schema77.properties.owner.items.properties - .url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate92.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema77.properties.owner.items.type, - parentSchema: schema77.properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid3 = _errs17 === errors; - if (!valid3) { - break; - } - } - } else { - validate92.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema77.properties.owner.type, - parentSchema: schema77.properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid0 = _errs15 === errors; - } else { - var valid0 = true; - } - } - } - } - } - } - } - } else { - validate92.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema77.type, - parentSchema: schema77, - data, - }, - ]; - return false; - } - } - validate92.errors = vErrors; - return errors === 0; -} -exports.validateDeviceOverviewResponse = validate93; -const schema78 = { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'DeviceOverviewResponse', - 'x-location': '#/components/schemas/device_overview_response', - 'x-schema-type': 'response', -}; -function validate93( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate93.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema78.required, - parentSchema: schema78, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate93.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema78.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate93.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema78.properties.url.type, - parentSchema: schema78.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs3 = errors; - if (typeof data1 !== 'string') { - validate93.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema78.properties.name.type, - parentSchema: schema78.properties.name, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs5 = errors; - if (typeof data2 !== 'string') { - validate93.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema78.properties.description.type, - parentSchema: schema78.properties.description, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs5 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs7 = errors; - if (typeof data3 !== 'string') { - validate93.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema78.properties.type.type, - parentSchema: schema78.properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate93.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema78.properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema78.properties.type.enum, - parentSchema: schema78.properties.type, - data: data3, - }, - ]; - return false; - } - var valid0 = _errs7 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs9 = errors; - if (typeof data4 !== 'boolean') { - validate93.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema78.properties.isPublic.type, - parentSchema: schema78.properties.isPublic, - data: data4, - }, - ]; - return false; - } - var valid0 = _errs9 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs11 = errors; - if (errors === _errs11) { - if (Array.isArray(data5)) { - var valid1 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs13 = errors; - if (errors === _errs13) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - validate93.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: schema78.properties.viewer.items.required, - parentSchema: schema78.properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs15 = errors; - if (errors === _errs15) { - if (errors === _errs15) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate93.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema78.properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } else { - validate93.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema78.properties.viewer.items.properties - .url.type, - parentSchema: - schema78.properties.viewer.items.properties - .url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate93.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema78.properties.viewer.items.type, - parentSchema: schema78.properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid1 = _errs13 === errors; - if (!valid1) { - break; - } - } - } else { - validate93.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema78.properties.viewer.type, - parentSchema: schema78.properties.viewer, - data: data5, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs17 = errors; - if (errors === _errs17) { - if (Array.isArray(data8)) { - var valid3 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs19 = errors; - if (errors === _errs19) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - validate93.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: schema78.properties.owner.items.required, - parentSchema: schema78.properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs21 = errors; - if (errors === _errs21) { - if (errors === _errs21) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate93.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema78.properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate93.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema78.properties.owner.items.properties - .url.type, - parentSchema: - schema78.properties.owner.items.properties - .url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate93.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema78.properties.owner.items.type, - parentSchema: schema78.properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid3 = _errs19 === errors; - if (!valid3) { - break; - } - } - } else { - validate93.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema78.properties.owner.type, - parentSchema: schema78.properties.owner, - data: data8, - }, - ]; - return false; - } - } - var valid0 = _errs17 === errors; - } else { - var valid0 = true; - } - } - } - } - } - } - } - } - } else { - validate93.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema78.type, - parentSchema: schema78, - data, - }, - ]; - return false; - } - } - validate93.errors = vErrors; - return errors === 0; -} -exports.validateServiceDescriptionRequest = validate94; -const schema79 = { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { type: 'string', enum: ['consumer', 'producer', 'prosumer'] }, - }, - additionalProperties: true, - 'x-standalone': true, - 'x-name': 'ServiceDescriptionRequest', - 'x-location': '#/components/schemas/service_description_request', - 'x-schema-type': 'request', -}; -function validate94( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.serviceType !== undefined) { - let data0 = data.serviceType; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate94.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema79.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } else { - validate94.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema79.properties.serviceType.type, - parentSchema: schema79.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs2 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.serviceId !== undefined) { - let data1 = data.serviceId; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate94.errors = [ - { - instancePath: instancePath + '/serviceId', - schemaPath: '#/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema79.properties.serviceId.type, - parentSchema: schema79.properties.serviceId, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs4 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.serviceDirection !== undefined) { - let data2 = data.serviceDirection; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate94.errors = [ - { - instancePath: instancePath + '/serviceDirection', - schemaPath: '#/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema79.properties.serviceDirection.type, - parentSchema: schema79.properties.serviceDirection, - data: data2, - }, - ]; - return false; - } - if (!(data2 === 'consumer' || data2 === 'producer' || data2 === 'prosumer')) { - validate94.errors = [ - { - instancePath: instancePath + '/serviceDirection', - schemaPath: '#/properties/serviceDirection/enum', - keyword: 'enum', - params: { allowedValues: schema79.properties.serviceDirection.enum }, - message: 'must be equal to one of the allowed values', - schema: schema79.properties.serviceDirection.enum, - parentSchema: schema79.properties.serviceDirection, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs6 === errors; - } else { - var valid0 = true; - } - } - } - } else { - validate94.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema79.type, - parentSchema: schema79, - data, - }, - ]; - return false; - } - } - validate94.errors = vErrors; - return errors === 0; -} -exports.validateServiceDescriptionResponse = validate95; -const schema80 = { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { type: 'string', enum: ['consumer', 'producer', 'prosumer'] }, - }, - additionalProperties: true, - 'x-standalone': true, - 'x-name': 'ServiceDescriptionResponse', - 'x-location': '#/components/schemas/service_description_response', - 'x-schema-type': 'response', -}; -function validate95( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.serviceType !== undefined) { - let data0 = data.serviceType; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate95.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema80.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } else { - validate95.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema80.properties.serviceType.type, - parentSchema: schema80.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs2 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.serviceId !== undefined) { - let data1 = data.serviceId; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate95.errors = [ - { - instancePath: instancePath + '/serviceId', - schemaPath: '#/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema80.properties.serviceId.type, - parentSchema: schema80.properties.serviceId, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs4 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.serviceDirection !== undefined) { - let data2 = data.serviceDirection; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate95.errors = [ - { - instancePath: instancePath + '/serviceDirection', - schemaPath: '#/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema80.properties.serviceDirection.type, - parentSchema: schema80.properties.serviceDirection, - data: data2, - }, - ]; - return false; - } - if (!(data2 === 'consumer' || data2 === 'producer' || data2 === 'prosumer')) { - validate95.errors = [ - { - instancePath: instancePath + '/serviceDirection', - schemaPath: '#/properties/serviceDirection/enum', - keyword: 'enum', - params: { allowedValues: schema80.properties.serviceDirection.enum }, - message: 'must be equal to one of the allowed values', - schema: schema80.properties.serviceDirection.enum, - parentSchema: schema80.properties.serviceDirection, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs6 === errors; - } else { - var valid0 = true; - } - } - } - } else { - validate95.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema80.type, - parentSchema: schema80, - data, - }, - ]; - return false; - } - } - validate95.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableCloudDeviceRequest = validate96; -const schema81 = { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'InstantiableCloudDeviceRequest', - 'x-location': '#/components/schemas/device_cloud_instantiable_request', - 'x-schema-type': 'request', -}; -function validate96( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate96.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema81.allOf[0].required, - parentSchema: schema81.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate96.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema81.allOf[0].properties.name.type, - parentSchema: schema81.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate96.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema81.allOf[0].properties.description.type, - parentSchema: schema81.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate96.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema81.allOf[0].properties.type.type, - parentSchema: schema81.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate96.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema81.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema81.allOf[0].properties.type.enum, - parentSchema: schema81.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate96.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema81.allOf[0].properties.isPublic.type, - parentSchema: schema81.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate96.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema81.allOf[0].properties.viewer.items.required, - parentSchema: schema81.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate96.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema81.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate96.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema81.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema81.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate96.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema81.allOf[0].properties.viewer.items.type, - parentSchema: schema81.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate96.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema81.allOf[0].properties.viewer.type, - parentSchema: schema81.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate96.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema81.allOf[0].properties.owner.items.required, - parentSchema: - schema81.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate96.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema81.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate96.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema81.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema81.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate96.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema81.allOf[0].properties.owner.items.type, - parentSchema: schema81.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate96.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema81.allOf[0].properties.owner.type, - parentSchema: schema81.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate96.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema81.allOf[0].type, - parentSchema: schema81.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('cloud instantiable' !== data10) { - validate96.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema81.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate96.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema81.allOf[1].properties.instantiateUrl, - data: data11, - }, - ]; - return false; - } - } else { - validate96.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema81.allOf[1].properties.instantiateUrl.type, - parentSchema: schema81.allOf[1].properties.instantiateUrl, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate96.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema81.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate96.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema81.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema81.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate96.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema81.allOf[1].properties.services.items.properties - .serviceId.type, - parentSchema: - schema81.allOf[1].properties.services.items.properties - .serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate96.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema81.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema81.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate96.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema81.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema81.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema81.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate96.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema81.allOf[1].properties.services.items.type, - parentSchema: schema81.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate96.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema81.allOf[1].properties.services.type, - parentSchema: schema81.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate96.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema81.allOf[1].type, - parentSchema: schema81.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate96.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableCloudDeviceResponse = validate97; -const schema82 = { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'InstantiableCloudDeviceResponse', - 'x-location': '#/components/schemas/device_cloud_instantiable_response', - 'x-schema-type': 'response', -}; -function validate97( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate97.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema82.allOf[0].required, - parentSchema: schema82.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate97.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema82.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate97.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema82.allOf[0].properties.url.type, - parentSchema: schema82.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate97.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema82.allOf[0].properties.name.type, - parentSchema: schema82.allOf[0].properties.name, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate97.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema82.allOf[0].properties.description.type, - parentSchema: schema82.allOf[0].properties.description, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate97.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema82.allOf[0].properties.type.type, - parentSchema: schema82.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate97.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema82.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema82.allOf[0].properties.type.enum, - parentSchema: schema82.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs10 = errors; - if (typeof data4 !== 'boolean') { - validate97.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema82.allOf[0].properties.isPublic.type, - parentSchema: schema82.allOf[0].properties.isPublic, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data5)) { - var valid2 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - validate97.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema82.allOf[0].properties.viewer.items.required, - parentSchema: - schema82.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate97.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema82.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } else { - validate97.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema82.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema82.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate97.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema82.allOf[0].properties.viewer.items.type, - parentSchema: schema82.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid2 = _errs14 === errors; - if (!valid2) { - break; - } - } - } else { - validate97.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema82.allOf[0].properties.viewer.type, - parentSchema: schema82.allOf[0].properties.viewer, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs12 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data8)) { - var valid4 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - validate97.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema82.allOf[0].properties.owner.items.required, - parentSchema: - schema82.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate97.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema82.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate97.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema82.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema82.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate97.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema82.allOf[0].properties.owner.items.type, - parentSchema: - schema82.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid4 = _errs20 === errors; - if (!valid4) { - break; - } - } - } else { - validate97.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema82.allOf[0].properties.owner.type, - parentSchema: schema82.allOf[0].properties.owner, - data: data8, - }, - ]; - return false; - } - } - var valid1 = _errs18 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } - } else { - validate97.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema82.allOf[0].type, - parentSchema: schema82.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data11) { - validate97.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema82.allOf[1].properties.type, - data: data11, - }, - ]; - return false; - } - var valid6 = _errs26 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - validate97.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema82.allOf[1].properties.instantiateUrl, - data: data12, - }, - ]; - return false; - } - } else { - validate97.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema82.allOf[1].properties.instantiateUrl.type, - parentSchema: schema82.allOf[1].properties.instantiateUrl, - data: data12, - }, - ]; - return false; - } - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data13)) { - var valid7 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - validate97.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema82.allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }, - ]; - return false; - } - } else { - validate97.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema82.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema82.allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }, - ]; - return false; - } - } - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate97.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema82.allOf[1].properties.services.items.properties - .serviceId.type, - parentSchema: - schema82.allOf[1].properties.services.items.properties - .serviceId, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs38 = errors; - if (typeof data17 !== 'string') { - validate97.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema82.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema82.allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }, - ]; - return false; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - validate97.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema82.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema82.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema82.allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }, - ]; - return false; - } - var valid8 = _errs38 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate97.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema82.allOf[1].properties.services.items.type, - parentSchema: schema82.allOf[1].properties.services.items, - data: data14, - }, - ]; - return false; - } - } - var valid7 = _errs31 === errors; - if (!valid7) { - break; - } - } - } else { - validate97.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema82.allOf[1].properties.services.type, - parentSchema: schema82.allOf[1].properties.services, - data: data13, - }, - ]; - return false; - } - } - var valid6 = _errs29 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate97.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema82.allOf[1].type, - parentSchema: schema82.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs24 === errors; - } - validate97.errors = vErrors; - return errors === 0; -} -exports.validateTimeSlotRequest = validate98; -const schema83 = { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - 'x-standalone': true, - 'x-name': 'TimeSlotRequest', - 'x-location': '#/components/schemas/time_slot_request', - 'x-schema-type': 'request', -}; -function validate98( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.start !== undefined) { - let data0 = data.start; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats22.validate(data0)) { - validate98.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema83.properties.start, - data: data0, - }, - ]; - return false; - } - } else { - validate98.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema83.properties.start.type, - parentSchema: schema83.properties.start, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.end !== undefined) { - let data1 = data.end; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate98.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema83.properties.end, - data: data1, - }, - ]; - return false; - } - } else { - validate98.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema83.properties.end.type, - parentSchema: schema83.properties.end, - data: data1, - }, - ]; - return false; - } - } - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - } - } else { - validate98.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema83.type, - parentSchema: schema83, - data, - }, - ]; - return false; - } - } - validate98.errors = vErrors; - return errors === 0; -} -exports.validateTimeSlotResponse = validate99; -const schema84 = { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - 'x-standalone': true, - 'x-name': 'TimeSlotResponse', - 'x-location': '#/components/schemas/time_slot_response', - 'x-schema-type': 'response', -}; -function validate99( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.start !== undefined) { - let data0 = data.start; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats22.validate(data0)) { - validate99.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema84.properties.start, - data: data0, - }, - ]; - return false; - } - } else { - validate99.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema84.properties.start.type, - parentSchema: schema84.properties.start, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.end !== undefined) { - let data1 = data.end; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate99.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema84.properties.end, - data: data1, - }, - ]; - return false; - } - } else { - validate99.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema84.properties.end.type, - parentSchema: schema84.properties.end, - data: data1, - }, - ]; - return false; - } - } - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - } - } else { - validate99.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema84.type, - parentSchema: schema84, - data, - }, - ]; - return false; - } - } - validate99.errors = vErrors; - return errors === 0; -} -exports.validateAvailabilityRequest = validate100; -const schema85 = { - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - 'x-standalone': true, - 'x-name': 'AvailabilityRequest', - 'x-location': '#/components/schemas/availability_request', - 'x-schema-type': 'request', -}; -function validate100( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate100.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema85.items.properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate100.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema85.items.properties.start.type, - parentSchema: schema85.items.properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate100.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema85.items.properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate100.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema85.items.properties.end.type, - parentSchema: schema85.items.properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate100.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema85.items.type, - parentSchema: schema85.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate100.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema85.type, - parentSchema: schema85, - data, - }, - ]; - return false; - } - } - validate100.errors = vErrors; - return errors === 0; -} -exports.validateAvailabilityResponse = validate101; -const schema86 = { - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - 'x-standalone': true, - 'x-name': 'AvailabilityResponse', - 'x-location': '#/components/schemas/availability_response', - 'x-schema-type': 'response', -}; -function validate101( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate101.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema86.items.properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate101.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema86.items.properties.start.type, - parentSchema: schema86.items.properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate101.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema86.items.properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate101.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema86.items.properties.end.type, - parentSchema: schema86.items.properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate101.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema86.items.type, - parentSchema: schema86.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate101.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema86.type, - parentSchema: schema86, - data, - }, - ]; - return false; - } - } - validate101.errors = vErrors; - return errors === 0; -} -exports.validateConcreteDeviceRequest = validate102; -const schema87 = { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ConcreteDeviceRequest', - 'x-location': '#/components/schemas/device_concrete_request', - 'x-schema-type': 'request', -}; -function validate102( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate102.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema87.allOf[0].required, - parentSchema: schema87.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate102.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema87.allOf[0].properties.name.type, - parentSchema: schema87.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate102.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema87.allOf[0].properties.description.type, - parentSchema: schema87.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate102.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema87.allOf[0].properties.type.type, - parentSchema: schema87.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate102.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema87.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema87.allOf[0].properties.type.enum, - parentSchema: schema87.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate102.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema87.allOf[0].properties.isPublic.type, - parentSchema: schema87.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate102.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema87.allOf[0].properties.viewer.items.required, - parentSchema: schema87.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate102.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema87.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate102.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema87.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema87.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate102.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema87.allOf[0].properties.viewer.items.type, - parentSchema: schema87.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate102.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema87.allOf[0].properties.viewer.type, - parentSchema: schema87.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate102.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema87.allOf[0].properties.owner.items.required, - parentSchema: - schema87.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate102.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema87.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate102.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema87.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema87.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate102.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema87.allOf[0].properties.owner.items.type, - parentSchema: schema87.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate102.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema87.allOf[0].properties.owner.type, - parentSchema: schema87.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate102.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema87.allOf[0].type, - parentSchema: schema87.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('device' !== data10) { - validate102.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema87.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.experiment !== undefined) { - let data11 = data.experiment; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate102.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema87.allOf[1].properties.experiment, - data: data11, - }, - ]; - return false; - } - } else { - validate102.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema87.allOf[1].properties.experiment.type, - parentSchema: schema87.allOf[1].properties.experiment, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate102.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema87.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate102.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema87.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema87.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate102.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema87.allOf[1].properties.services.items.properties - .serviceId.type, - parentSchema: - schema87.allOf[1].properties.services.items.properties - .serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate102.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema87.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema87.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate102.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema87.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema87.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema87.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate102.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema87.allOf[1].properties.services.items.type, - parentSchema: schema87.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate102.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema87.allOf[1].properties.services.type, - parentSchema: schema87.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate102.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema87.allOf[1].type, - parentSchema: schema87.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate102.errors = vErrors; - return errors === 0; -} -exports.validateConcreteDeviceResponse = validate103; -const schema88 = { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ConcreteDeviceResponse', - 'x-location': '#/components/schemas/device_concrete_response', - 'x-schema-type': 'response', -}; -function validate103( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate103.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema88.allOf[0].required, - parentSchema: schema88.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate103.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema88.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate103.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema88.allOf[0].properties.url.type, - parentSchema: schema88.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate103.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema88.allOf[0].properties.name.type, - parentSchema: schema88.allOf[0].properties.name, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate103.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema88.allOf[0].properties.description.type, - parentSchema: schema88.allOf[0].properties.description, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate103.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema88.allOf[0].properties.type.type, - parentSchema: schema88.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate103.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema88.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema88.allOf[0].properties.type.enum, - parentSchema: schema88.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs10 = errors; - if (typeof data4 !== 'boolean') { - validate103.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema88.allOf[0].properties.isPublic.type, - parentSchema: schema88.allOf[0].properties.isPublic, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data5)) { - var valid2 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - validate103.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema88.allOf[0].properties.viewer.items.required, - parentSchema: - schema88.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate103.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema88.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } else { - validate103.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema88.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema88.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate103.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema88.allOf[0].properties.viewer.items.type, - parentSchema: schema88.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid2 = _errs14 === errors; - if (!valid2) { - break; - } - } - } else { - validate103.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema88.allOf[0].properties.viewer.type, - parentSchema: schema88.allOf[0].properties.viewer, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs12 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data8)) { - var valid4 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - validate103.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema88.allOf[0].properties.owner.items.required, - parentSchema: - schema88.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate103.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema88.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate103.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema88.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema88.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate103.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema88.allOf[0].properties.owner.items.type, - parentSchema: - schema88.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid4 = _errs20 === errors; - if (!valid4) { - break; - } - } - } else { - validate103.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema88.allOf[0].properties.owner.type, - parentSchema: schema88.allOf[0].properties.owner, - data: data8, - }, - ]; - return false; - } - } - var valid1 = _errs18 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } - } else { - validate103.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema88.allOf[0].type, - parentSchema: schema88.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs26 = errors; - if ('device' !== data11) { - validate103.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema88.allOf[1].properties.type, - data: data11, - }, - ]; - return false; - } - var valid6 = _errs26 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.connected !== undefined) { - let data12 = data.connected; - const _errs27 = errors; - if (typeof data12 !== 'boolean') { - validate103.errors = [ - { - instancePath: instancePath + '/connected', - schemaPath: '#/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema88.allOf[1].properties.connected.type, - parentSchema: schema88.allOf[1].properties.connected, - data: data12, - }, - ]; - return false; - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.announcedAvailability !== undefined) { - let data13 = data.announcedAvailability; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data13)) { - var valid7 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.start !== undefined) { - let data15 = data14.start; - const _errs33 = errors; - if (errors === _errs33) { - if (errors === _errs33) { - if (typeof data15 === 'string') { - if (!formats22.validate(data15)) { - validate103.errors = [ - { - instancePath: - instancePath + - '/announcedAvailability/' + - i2 + - '/start', - schemaPath: - '#/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema88.allOf[1].properties.announcedAvailability - .items.properties.start, - data: data15, - }, - ]; - return false; - } - } else { - validate103.errors = [ - { - instancePath: - instancePath + - '/announcedAvailability/' + - i2 + - '/start', - schemaPath: - '#/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema88.allOf[1].properties.announcedAvailability - .items.properties.start.type, - parentSchema: - schema88.allOf[1].properties.announcedAvailability - .items.properties.start, - data: data15, - }, - ]; - return false; - } - } - } - var valid8 = _errs33 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data14.end !== undefined) { - let data16 = data14.end; - const _errs35 = errors; - if (errors === _errs35) { - if (errors === _errs35) { - if (typeof data16 === 'string') { - if (!formats22.validate(data16)) { - validate103.errors = [ - { - instancePath: - instancePath + - '/announcedAvailability/' + - i2 + - '/end', - schemaPath: - '#/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema88.allOf[1].properties - .announcedAvailability.items.properties.end, - data: data16, - }, - ]; - return false; - } - } else { - validate103.errors = [ - { - instancePath: - instancePath + - '/announcedAvailability/' + - i2 + - '/end', - schemaPath: - '#/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema88.allOf[1].properties.announcedAvailability - .items.properties.end.type, - parentSchema: - schema88.allOf[1].properties.announcedAvailability - .items.properties.end, - data: data16, - }, - ]; - return false; - } - } - } - var valid8 = _errs35 === errors; - } else { - var valid8 = true; - } - } - } else { - validate103.errors = [ - { - instancePath: instancePath + '/announcedAvailability/' + i2, - schemaPath: - '#/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema88.allOf[1].properties.announcedAvailability.items - .type, - parentSchema: - schema88.allOf[1].properties.announcedAvailability.items, - data: data14, - }, - ]; - return false; - } - } - var valid7 = _errs31 === errors; - if (!valid7) { - break; - } - } - } else { - validate103.errors = [ - { - instancePath: instancePath + '/announcedAvailability', - schemaPath: '#/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema88.allOf[1].properties.announcedAvailability.type, - parentSchema: schema88.allOf[1].properties.announcedAvailability, - data: data13, - }, - ]; - return false; - } - } - var valid6 = _errs29 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.experiment !== undefined) { - let data17 = data.experiment; - const _errs37 = errors; - if (errors === _errs37) { - if (errors === _errs37) { - if (typeof data17 === 'string') { - if (!formats0(data17)) { - validate103.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema88.allOf[1].properties.experiment, - data: data17, - }, - ]; - return false; - } - } else { - validate103.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema88.allOf[1].properties.experiment.type, - parentSchema: schema88.allOf[1].properties.experiment, - data: data17, - }, - ]; - return false; - } - } - } - var valid6 = _errs37 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data18 = data.services; - const _errs39 = errors; - if (errors === _errs39) { - if (Array.isArray(data18)) { - var valid9 = true; - const len3 = data18.length; - for (let i3 = 0; i3 < len3; i3++) { - let data19 = data18[i3]; - const _errs41 = errors; - if (errors === _errs41) { - if ( - data19 && - typeof data19 == 'object' && - !Array.isArray(data19) - ) { - if (data19.serviceType !== undefined) { - let data20 = data19.serviceType; - const _errs44 = errors; - if (errors === _errs44) { - if (errors === _errs44) { - if (typeof data20 === 'string') { - if (!formats0(data20)) { - validate103.errors = [ - { - instancePath: - instancePath + - '/services/' + - i3 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema88.allOf[1].properties.services.items - .properties.serviceType, - data: data20, - }, - ]; - return false; - } - } else { - validate103.errors = [ - { - instancePath: - instancePath + - '/services/' + - i3 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema88.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema88.allOf[1].properties.services.items - .properties.serviceType, - data: data20, - }, - ]; - return false; - } - } - } - var valid10 = _errs44 === errors; - } else { - var valid10 = true; - } - if (valid10) { - if (data19.serviceId !== undefined) { - let data21 = data19.serviceId; - const _errs46 = errors; - if (typeof data21 !== 'string') { - validate103.errors = [ - { - instancePath: - instancePath + '/services/' + i3 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema88.allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema88.allOf[1].properties.services.items - .properties.serviceId, - data: data21, - }, - ]; - return false; - } - var valid10 = _errs46 === errors; - } else { - var valid10 = true; - } - if (valid10) { - if (data19.serviceDirection !== undefined) { - let data22 = data19.serviceDirection; - const _errs48 = errors; - if (typeof data22 !== 'string') { - validate103.errors = [ - { - instancePath: - instancePath + - '/services/' + - i3 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema88.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema88.allOf[1].properties.services.items - .properties.serviceDirection, - data: data22, - }, - ]; - return false; - } - if ( - !( - data22 === 'consumer' || - data22 === 'producer' || - data22 === 'prosumer' - ) - ) { - validate103.errors = [ - { - instancePath: - instancePath + - '/services/' + - i3 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema88.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema88.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema88.allOf[1].properties.services.items - .properties.serviceDirection, - data: data22, - }, - ]; - return false; - } - var valid10 = _errs48 === errors; - } else { - var valid10 = true; - } - } - } - } else { - validate103.errors = [ - { - instancePath: instancePath + '/services/' + i3, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema88.allOf[1].properties.services.items.type, - parentSchema: schema88.allOf[1].properties.services.items, - data: data19, - }, - ]; - return false; - } - } - var valid9 = _errs41 === errors; - if (!valid9) { - break; - } - } - } else { - validate103.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema88.allOf[1].properties.services.type, - parentSchema: schema88.allOf[1].properties.services, - data: data18, - }, - ]; - return false; - } - } - var valid6 = _errs39 === errors; - } else { - var valid6 = true; - } - } - } - } - } - } else { - validate103.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema88.allOf[1].type, - parentSchema: schema88.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs24 === errors; - } - validate103.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableBrowserDeviceRequest = validate104; -const schema89 = { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'InstantiableBrowserDeviceRequest', - 'x-location': '#/components/schemas/device_edge_instantiable_request', - 'x-schema-type': 'request', -}; -function validate104( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate104.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema89.allOf[0].required, - parentSchema: schema89.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate104.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema89.allOf[0].properties.name.type, - parentSchema: schema89.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate104.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema89.allOf[0].properties.description.type, - parentSchema: schema89.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate104.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema89.allOf[0].properties.type.type, - parentSchema: schema89.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate104.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema89.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema89.allOf[0].properties.type.enum, - parentSchema: schema89.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate104.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema89.allOf[0].properties.isPublic.type, - parentSchema: schema89.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate104.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema89.allOf[0].properties.viewer.items.required, - parentSchema: schema89.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate104.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema89.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate104.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema89.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema89.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate104.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema89.allOf[0].properties.viewer.items.type, - parentSchema: schema89.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate104.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema89.allOf[0].properties.viewer.type, - parentSchema: schema89.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate104.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema89.allOf[0].properties.owner.items.required, - parentSchema: - schema89.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate104.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema89.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate104.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema89.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema89.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate104.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema89.allOf[0].properties.owner.items.type, - parentSchema: schema89.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate104.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema89.allOf[0].properties.owner.type, - parentSchema: schema89.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate104.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema89.allOf[0].type, - parentSchema: schema89.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('edge instantiable' !== data10) { - validate104.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema89.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.codeUrl !== undefined) { - let data11 = data.codeUrl; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate104.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema89.allOf[1].properties.codeUrl, - data: data11, - }, - ]; - return false; - } - } else { - validate104.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema89.allOf[1].properties.codeUrl.type, - parentSchema: schema89.allOf[1].properties.codeUrl, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate104.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema89.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate104.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema89.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema89.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate104.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema89.allOf[1].properties.services.items.properties - .serviceId.type, - parentSchema: - schema89.allOf[1].properties.services.items.properties - .serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate104.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema89.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema89.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate104.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema89.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema89.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema89.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate104.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema89.allOf[1].properties.services.items.type, - parentSchema: schema89.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate104.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema89.allOf[1].properties.services.type, - parentSchema: schema89.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate104.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema89.allOf[1].type, - parentSchema: schema89.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate104.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableBrowserDeviceResponse = validate105; -const schema90 = { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'InstantiableBrowserDeviceResponse', - 'x-location': '#/components/schemas/device_edge_instantiable_response', - 'x-schema-type': 'response', -}; -function validate105( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate105.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema90.allOf[0].required, - parentSchema: schema90.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate105.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema90.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate105.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema90.allOf[0].properties.url.type, - parentSchema: schema90.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate105.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema90.allOf[0].properties.name.type, - parentSchema: schema90.allOf[0].properties.name, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate105.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema90.allOf[0].properties.description.type, - parentSchema: schema90.allOf[0].properties.description, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate105.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema90.allOf[0].properties.type.type, - parentSchema: schema90.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate105.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema90.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema90.allOf[0].properties.type.enum, - parentSchema: schema90.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs10 = errors; - if (typeof data4 !== 'boolean') { - validate105.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema90.allOf[0].properties.isPublic.type, - parentSchema: schema90.allOf[0].properties.isPublic, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data5)) { - var valid2 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - validate105.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema90.allOf[0].properties.viewer.items.required, - parentSchema: - schema90.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate105.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema90.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } else { - validate105.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema90.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema90.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate105.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema90.allOf[0].properties.viewer.items.type, - parentSchema: schema90.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid2 = _errs14 === errors; - if (!valid2) { - break; - } - } - } else { - validate105.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema90.allOf[0].properties.viewer.type, - parentSchema: schema90.allOf[0].properties.viewer, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs12 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data8)) { - var valid4 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - validate105.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema90.allOf[0].properties.owner.items.required, - parentSchema: - schema90.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate105.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema90.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate105.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema90.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema90.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate105.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema90.allOf[0].properties.owner.items.type, - parentSchema: - schema90.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid4 = _errs20 === errors; - if (!valid4) { - break; - } - } - } else { - validate105.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema90.allOf[0].properties.owner.type, - parentSchema: schema90.allOf[0].properties.owner, - data: data8, - }, - ]; - return false; - } - } - var valid1 = _errs18 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } - } else { - validate105.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema90.allOf[0].type, - parentSchema: schema90.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs26 = errors; - if ('edge instantiable' !== data11) { - validate105.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema90.allOf[1].properties.type, - data: data11, - }, - ]; - return false; - } - var valid6 = _errs26 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.codeUrl !== undefined) { - let data12 = data.codeUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - validate105.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema90.allOf[1].properties.codeUrl, - data: data12, - }, - ]; - return false; - } - } else { - validate105.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema90.allOf[1].properties.codeUrl.type, - parentSchema: schema90.allOf[1].properties.codeUrl, - data: data12, - }, - ]; - return false; - } - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data13)) { - var valid7 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - validate105.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema90.allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }, - ]; - return false; - } - } else { - validate105.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema90.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema90.allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }, - ]; - return false; - } - } - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate105.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema90.allOf[1].properties.services.items.properties - .serviceId.type, - parentSchema: - schema90.allOf[1].properties.services.items.properties - .serviceId, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs38 = errors; - if (typeof data17 !== 'string') { - validate105.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema90.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema90.allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }, - ]; - return false; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - validate105.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema90.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema90.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema90.allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }, - ]; - return false; - } - var valid8 = _errs38 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate105.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema90.allOf[1].properties.services.items.type, - parentSchema: schema90.allOf[1].properties.services.items, - data: data14, - }, - ]; - return false; - } - } - var valid7 = _errs31 === errors; - if (!valid7) { - break; - } - } - } else { - validate105.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema90.allOf[1].properties.services.type, - parentSchema: schema90.allOf[1].properties.services, - data: data13, - }, - ]; - return false; - } - } - var valid6 = _errs29 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate105.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema90.allOf[1].type, - parentSchema: schema90.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs24 === errors; - } - validate105.errors = vErrors; - return errors === 0; -} -exports.validateDeviceReferenceRequest = validate106; -const schema91 = { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - 'x-standalone': true, - 'x-name': 'DeviceReferenceRequest', - 'x-location': '#/components/schemas/device_reference_request', - 'x-schema-type': 'request', -}; -function validate106( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.url === undefined && (missing0 = 'url')) { - validate106.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema91.required, - parentSchema: schema91, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate106.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema91.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate106.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema91.properties.url.type, - parentSchema: schema91.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - } - } - } else { - validate106.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema91.type, - parentSchema: schema91, - data, - }, - ]; - return false; - } - } - validate106.errors = vErrors; - return errors === 0; -} -exports.validateDeviceReferenceResponse = validate107; -const schema92 = { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - 'x-standalone': true, - 'x-name': 'DeviceReferenceResponse', - 'x-location': '#/components/schemas/device_reference_response', - 'x-schema-type': 'response', -}; -function validate107( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.url === undefined && (missing0 = 'url')) { - validate107.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema92.required, - parentSchema: schema92, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate107.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema92.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate107.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema92.properties.url.type, - parentSchema: schema92.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - } - } - } else { - validate107.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema92.type, - parentSchema: schema92, - data, - }, - ]; - return false; - } - } - validate107.errors = vErrors; - return errors === 0; -} -exports.validateDeviceGroupRequest = validate108; -const schema93 = { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'DeviceGroupRequest', - 'x-location': '#/components/schemas/device_group_request', - 'x-schema-type': 'request', -}; -function validate108( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate108.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema93.allOf[0].required, - parentSchema: schema93.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate108.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema93.allOf[0].properties.name.type, - parentSchema: schema93.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate108.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema93.allOf[0].properties.description.type, - parentSchema: schema93.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate108.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema93.allOf[0].properties.type.type, - parentSchema: schema93.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate108.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema93.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema93.allOf[0].properties.type.enum, - parentSchema: schema93.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate108.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema93.allOf[0].properties.isPublic.type, - parentSchema: schema93.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate108.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema93.allOf[0].properties.viewer.items.required, - parentSchema: schema93.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate108.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema93.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate108.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema93.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema93.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate108.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema93.allOf[0].properties.viewer.items.type, - parentSchema: schema93.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate108.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema93.allOf[0].properties.viewer.type, - parentSchema: schema93.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate108.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema93.allOf[0].properties.owner.items.required, - parentSchema: - schema93.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate108.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema93.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate108.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema93.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema93.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate108.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema93.allOf[0].properties.owner.items.type, - parentSchema: schema93.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate108.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema93.allOf[0].properties.owner.type, - parentSchema: schema93.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate108.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema93.allOf[0].type, - parentSchema: schema93.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if (data.devices === undefined && (missing3 = 'devices')) { - validate108.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema93.allOf[1].required, - parentSchema: schema93.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('group' !== data10) { - validate108.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema93.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.devices !== undefined) { - let data11 = data.devices; - const _errs25 = errors; - if (errors === _errs25) { - if (Array.isArray(data11)) { - var valid7 = true; - const len2 = data11.length; - for (let i2 = 0; i2 < len2; i2++) { - let data12 = data11[i2]; - const _errs27 = errors; - if (errors === _errs27) { - if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { - let missing4; - if (data12.url === undefined && (missing4 = 'url')) { - validate108.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: schema93.allOf[1].properties.devices.items.required, - parentSchema: schema93.allOf[1].properties.devices.items, - data: data12, - }, - ]; - return false; - } else { - if (data12.url !== undefined) { - let data13 = data12.url; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data13 === 'string') { - if (!formats0(data13)) { - validate108.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema93.allOf[1].properties.devices.items - .properties.url, - data: data13, - }, - ]; - return false; - } - } else { - validate108.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema93.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema93.allOf[1].properties.devices.items - .properties.url, - data: data13, - }, - ]; - return false; - } - } - } - } - } - } else { - validate108.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema93.allOf[1].properties.devices.items.type, - parentSchema: schema93.allOf[1].properties.devices.items, - data: data12, - }, - ]; - return false; - } - } - var valid7 = _errs27 === errors; - if (!valid7) { - break; - } - } - } else { - validate108.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema93.allOf[1].properties.devices.type, - parentSchema: schema93.allOf[1].properties.devices, - data: data11, - }, - ]; - return false; - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate108.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema93.allOf[1].type, - parentSchema: schema93.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate108.errors = vErrors; - return errors === 0; -} -exports.validateDeviceGroupResponse = validate109; -const schema94 = { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'DeviceGroupResponse', - 'x-location': '#/components/schemas/device_group_response', - 'x-schema-type': 'response', -}; -function validate109( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate109.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema94.allOf[0].required, - parentSchema: schema94.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate109.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema94.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate109.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema94.allOf[0].properties.url.type, - parentSchema: schema94.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate109.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema94.allOf[0].properties.name.type, - parentSchema: schema94.allOf[0].properties.name, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate109.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema94.allOf[0].properties.description.type, - parentSchema: schema94.allOf[0].properties.description, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate109.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema94.allOf[0].properties.type.type, - parentSchema: schema94.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate109.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema94.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema94.allOf[0].properties.type.enum, - parentSchema: schema94.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs10 = errors; - if (typeof data4 !== 'boolean') { - validate109.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema94.allOf[0].properties.isPublic.type, - parentSchema: schema94.allOf[0].properties.isPublic, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data5)) { - var valid2 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - validate109.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema94.allOf[0].properties.viewer.items.required, - parentSchema: - schema94.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate109.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema94.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } else { - validate109.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema94.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema94.allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate109.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema94.allOf[0].properties.viewer.items.type, - parentSchema: schema94.allOf[0].properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid2 = _errs14 === errors; - if (!valid2) { - break; - } - } - } else { - validate109.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema94.allOf[0].properties.viewer.type, - parentSchema: schema94.allOf[0].properties.viewer, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs12 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data8)) { - var valid4 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - validate109.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema94.allOf[0].properties.owner.items.required, - parentSchema: - schema94.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate109.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema94.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate109.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema94.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema94.allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate109.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema94.allOf[0].properties.owner.items.type, - parentSchema: - schema94.allOf[0].properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid4 = _errs20 === errors; - if (!valid4) { - break; - } - } - } else { - validate109.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema94.allOf[0].properties.owner.type, - parentSchema: schema94.allOf[0].properties.owner, - data: data8, - }, - ]; - return false; - } - } - var valid1 = _errs18 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } - } else { - validate109.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema94.allOf[0].type, - parentSchema: schema94.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if (data.devices === undefined && (missing3 = 'devices')) { - validate109.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema94.allOf[1].required, - parentSchema: schema94.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.type !== undefined) { - let data11 = data.type; - const _errs26 = errors; - if ('group' !== data11) { - validate109.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema94.allOf[1].properties.type, - data: data11, - }, - ]; - return false; - } - var valid6 = _errs26 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.devices !== undefined) { - let data12 = data.devices; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - let missing4; - if (data13.url === undefined && (missing4 = 'url')) { - validate109.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: schema94.allOf[1].properties.devices.items.required, - parentSchema: schema94.allOf[1].properties.devices.items, - data: data13, - }, - ]; - return false; - } else { - if (data13.url !== undefined) { - let data14 = data13.url; - const _errs31 = errors; - if (errors === _errs31) { - if (errors === _errs31) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate109.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema94.allOf[1].properties.devices.items - .properties.url, - data: data14, - }, - ]; - return false; - } - } else { - validate109.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema94.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema94.allOf[1].properties.devices.items - .properties.url, - data: data14, - }, - ]; - return false; - } - } - } - } - } - } else { - validate109.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema94.allOf[1].properties.devices.items.type, - parentSchema: schema94.allOf[1].properties.devices.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate109.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema94.allOf[1].properties.devices.type, - parentSchema: schema94.allOf[1].properties.devices, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate109.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema94.allOf[1].type, - parentSchema: schema94.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs24 === errors; - } - validate109.errors = vErrors; - return errors === 0; -} -exports.validateDeviceRequest = validate110; -const schema95 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'DeviceRequest', - 'x-location': '#/components/schemas/device_request', - 'x-schema-type': 'request', -}; -function validate110( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema95.anyOf[0].allOf[0].required, - parentSchema: schema95.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs4 = errors; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.name, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err2 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.description, - data: data1, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err3 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema95.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema95.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema95.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema95.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.isPublic, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - var valid3 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - const err6 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: - schema95.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema95.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - const err7 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema95.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema95.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.viewer, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid5 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - const err11 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema95.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema95.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - const err12 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema95.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[0].allOf[0].properties.owner.items.type, - parentSchema: - schema95.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.owner, - data: data7, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema95.anyOf[0].allOf[0].type, - parentSchema: schema95.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data10) { - const err17 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema95.anyOf[0].allOf[1].properties.type, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err18 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema95.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema95.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data12)) { - var valid8 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err20 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs36 = errors; - if (typeof data15 !== 'string') { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema95.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema95.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err25 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema95.anyOf[0].allOf[1].properties.services, - data: data12, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err27 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema95.anyOf[0].allOf[1].type, - parentSchema: schema95.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid1 = _errs24 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs40 = errors; - const _errs41 = errors; - if (errors === _errs41) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err28 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema95.anyOf[1].allOf[0].required, - parentSchema: schema95.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data.name !== undefined) { - let data17 = data.name; - const _errs43 = errors; - if (typeof data17 !== 'string') { - const err29 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.name, - data: data17, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid11 = _errs43 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data18 = data.description; - const _errs45 = errors; - if (typeof data18 !== 'string') { - const err30 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.description, - data: data18, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data19 = data.type; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err31 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data19 === 'device' || - data19 === 'group' || - data19 === 'edge instantiable' || - data19 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema95.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema95.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema95.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data20 = data.isPublic; - const _errs49 = errors; - if (typeof data20 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema95.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.isPublic, - data: data20, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data21 = data.viewer; - const _errs51 = errors; - if (errors === _errs51) { - if (Array.isArray(data21)) { - var valid12 = true; - const len3 = data21.length; - for (let i3 = 0; i3 < len3; i3++) { - let data22 = data21[i3]; - const _errs53 = errors; - if (errors === _errs53) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - let missing4; - if (data22.url === undefined && (missing4 = 'url')) { - const err34 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema95.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema95.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data22.url !== undefined) { - let data23 = data22.url; - const _errs55 = errors; - if (errors === _errs55) { - if (errors === _errs55) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err35 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema95.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[1].allOf[0].properties.viewer.items.type, - parentSchema: - schema95.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid12 = _errs53 === errors; - if (!valid12) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.viewer, - data: data21, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data24 = data.owner; - const _errs57 = errors; - if (errors === _errs57) { - if (Array.isArray(data24)) { - var valid14 = true; - const len4 = data24.length; - for (let i4 = 0; i4 < len4; i4++) { - let data25 = data24[i4]; - const _errs59 = errors; - if (errors === _errs59) { - if ( - data25 && - typeof data25 == 'object' && - !Array.isArray(data25) - ) { - let missing5; - if (data25.url === undefined && (missing5 = 'url')) { - const err39 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema95.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema95.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data25.url !== undefined) { - let data26 = data25.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data26 === 'string') { - if (!formats0(data26)) { - const err40 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[1].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema95.anyOf[1].allOf[0].properties.owner - .items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema95.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid14 = _errs59 === errors; - if (!valid14) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.owner, - data: data24, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid11 = _errs57 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema95.anyOf[1].allOf[0].type, - parentSchema: schema95.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid10 = _errs41 === errors; - if (valid10) { - const _errs63 = errors; - if (errors === _errs63) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data27 = data.type; - const _errs65 = errors; - if ('device' !== data27) { - const err45 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema95.anyOf[1].allOf[1].properties.type, - data: data27, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data28 = data.experiment; - const _errs66 = errors; - if (errors === _errs66) { - if (errors === _errs66) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err46 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema95.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema95.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid16 = _errs66 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data29 = data.services; - const _errs68 = errors; - if (errors === _errs68) { - if (Array.isArray(data29)) { - var valid17 = true; - const len5 = data29.length; - for (let i5 = 0; i5 < len5; i5++) { - let data30 = data29[i5]; - const _errs70 = errors; - if (errors === _errs70) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - if (data30.serviceType !== undefined) { - let data31 = data30.serviceType; - const _errs73 = errors; - if (errors === _errs73) { - if (errors === _errs73) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err48 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[1].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema95.anyOf[1].allOf[1].properties.services.items - .properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid18 = _errs73 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceId !== undefined) { - let data32 = data30.serviceId; - const _errs75 = errors; - if (typeof data32 !== 'string') { - const err50 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[1].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema95.anyOf[1].allOf[1].properties.services.items - .properties.serviceId, - data: data32, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid18 = _errs75 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceDirection !== undefined) { - let data33 = data30.serviceDirection; - const _errs77 = errors; - if (typeof data33 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema95.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data33 === 'consumer' || - data33 === 'producer' || - data33 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema95.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema95.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema95.anyOf[1].allOf[1].properties.services.items - .properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err53 = { - instancePath: instancePath + '/services/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[1].allOf[1].properties.services.items.type, - parentSchema: - schema95.anyOf[1].allOf[1].properties.services.items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid17 = _errs70 === errors; - if (!valid17) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema95.anyOf[1].allOf[1].properties.services, - data: data29, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid16 = _errs68 === errors; - } else { - var valid16 = true; - } - } - } - } else { - const err55 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema95.anyOf[1].allOf[1].type, - parentSchema: schema95.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid10 = _errs63 === errors; - } - var _valid0 = _errs40 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs79 = errors; - const _errs80 = errors; - if (errors === _errs80) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err56 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema95.anyOf[2].allOf[0].required, - parentSchema: schema95.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data.name !== undefined) { - let data34 = data.name; - const _errs82 = errors; - if (typeof data34 !== 'string') { - const err57 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.name, - data: data34, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid20 = _errs82 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.description !== undefined) { - let data35 = data.description; - const _errs84 = errors; - if (typeof data35 !== 'string') { - const err58 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.description, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid20 = _errs84 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.type !== undefined) { - let data36 = data.type; - const _errs86 = errors; - if (typeof data36 !== 'string') { - const err59 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data36 === 'device' || - data36 === 'group' || - data36 === 'edge instantiable' || - data36 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema95.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema95.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema95.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid20 = _errs86 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.isPublic !== undefined) { - let data37 = data.isPublic; - const _errs88 = errors; - if (typeof data37 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema95.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.isPublic, - data: data37, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs88 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.viewer !== undefined) { - let data38 = data.viewer; - const _errs90 = errors; - if (errors === _errs90) { - if (Array.isArray(data38)) { - var valid21 = true; - const len6 = data38.length; - for (let i6 = 0; i6 < len6; i6++) { - let data39 = data38[i6]; - const _errs92 = errors; - if (errors === _errs92) { - if ( - data39 && - typeof data39 == 'object' && - !Array.isArray(data39) - ) { - let missing7; - if (data39.url === undefined && (missing7 = 'url')) { - const err62 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema95.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema95.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data39.url !== undefined) { - let data40 = data39.url; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err63 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[2].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema95.anyOf[2].allOf[0].properties.viewer - .items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema95.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs92 === errors; - if (!valid21) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.viewer, - data: data38, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid20 = _errs90 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.owner !== undefined) { - let data41 = data.owner; - const _errs96 = errors; - if (errors === _errs96) { - if (Array.isArray(data41)) { - var valid23 = true; - const len7 = data41.length; - for (let i7 = 0; i7 < len7; i7++) { - let data42 = data41[i7]; - const _errs98 = errors; - if (errors === _errs98) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - let missing8; - if (data42.url === undefined && (missing8 = 'url')) { - const err67 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + missing8 + "'", - schema: - schema95.anyOf[2].allOf[0].properties.owner.items - .required, - parentSchema: - schema95.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data42.url !== undefined) { - let data43 = data42.url; - const _errs100 = errors; - if (errors === _errs100) { - if (errors === _errs100) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err68 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema95.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema95.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid23 = _errs98 === errors; - if (!valid23) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.owner, - data: data41, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid20 = _errs96 === errors; - } else { - var valid20 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema95.anyOf[2].allOf[0].type, - parentSchema: schema95.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid19 = _errs80 === errors; - if (valid19) { - const _errs102 = errors; - if (errors === _errs102) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs104 = errors; - if ('edge instantiable' !== data44) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema95.anyOf[2].allOf[1].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.codeUrl !== undefined) { - let data45 = data.codeUrl; - const _errs105 = errors; - if (errors === _errs105) { - if (errors === _errs105) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err74 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema95.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema95.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.services !== undefined) { - let data46 = data.services; - const _errs107 = errors; - if (errors === _errs107) { - if (Array.isArray(data46)) { - var valid26 = true; - const len8 = data46.length; - for (let i8 = 0; i8 < len8; i8++) { - let data47 = data46[i8]; - const _errs109 = errors; - if (errors === _errs109) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - if (data47.serviceType !== undefined) { - let data48 = data47.serviceType; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema95.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceId !== undefined) { - let data49 = data47.serviceId; - const _errs114 = errors; - if (typeof data49 !== 'string') { - const err78 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[2].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema95.anyOf[2].allOf[1].properties.services.items - .properties.serviceId, - data: data49, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceDirection !== undefined) { - let data50 = data47.serviceDirection; - const _errs116 = errors; - if (typeof data50 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema95.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data50 === 'consumer' || - data50 === 'producer' || - data50 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema95.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema95.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema95.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err81 = { - instancePath: instancePath + '/services/' + i8, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[2].allOf[1].properties.services.items.type, - parentSchema: - schema95.anyOf[2].allOf[1].properties.services.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid26 = _errs109 === errors; - if (!valid26) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema95.anyOf[2].allOf[1].properties.services, - data: data46, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err83 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema95.anyOf[2].allOf[1].type, - parentSchema: schema95.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid19 = _errs102 === errors; - } - var _valid0 = _errs79 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs118 = errors; - const _errs119 = errors; - if (errors === _errs119) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err84 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema95.anyOf[3].allOf[0].required, - parentSchema: schema95.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data.name !== undefined) { - let data51 = data.name; - const _errs121 = errors; - if (typeof data51 !== 'string') { - const err85 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.name, - data: data51, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid29 = _errs121 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.description !== undefined) { - let data52 = data.description; - const _errs123 = errors; - if (typeof data52 !== 'string') { - const err86 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.description, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid29 = _errs123 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.type !== undefined) { - let data53 = data.type; - const _errs125 = errors; - if (typeof data53 !== 'string') { - const err87 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema95.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data53 === 'device' || - data53 === 'group' || - data53 === 'edge instantiable' || - data53 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema95.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema95.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema95.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid29 = _errs125 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.isPublic !== undefined) { - let data54 = data.isPublic; - const _errs127 = errors; - if (typeof data54 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema95.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.isPublic, - data: data54, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid29 = _errs127 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.viewer !== undefined) { - let data55 = data.viewer; - const _errs129 = errors; - if (errors === _errs129) { - if (Array.isArray(data55)) { - var valid30 = true; - const len9 = data55.length; - for (let i9 = 0; i9 < len9; i9++) { - let data56 = data55[i9]; - const _errs131 = errors; - if (errors === _errs131) { - if ( - data56 && - typeof data56 == 'object' && - !Array.isArray(data56) - ) { - let missing10; - if (data56.url === undefined && (missing10 = 'url')) { - const err90 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + missing10 + "'", - schema: - schema95.anyOf[3].allOf[0].properties.viewer.items - .required, - parentSchema: - schema95.anyOf[3].allOf[0].properties.viewer - .items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data56.url !== undefined) { - let data57 = data56.url; - const _errs133 = errors; - if (errors === _errs133) { - if (errors === _errs133) { - if (typeof data57 === 'string') { - if (!formats0(data57)) { - const err91 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema95.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema95.anyOf[3].allOf[0].properties.viewer.items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid30 = _errs131 === errors; - if (!valid30) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.viewer, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid29 = _errs129 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.owner !== undefined) { - let data58 = data.owner; - const _errs135 = errors; - if (errors === _errs135) { - if (Array.isArray(data58)) { - var valid32 = true; - const len10 = data58.length; - for (let i10 = 0; i10 < len10; i10++) { - let data59 = data58[i10]; - const _errs137 = errors; - if (errors === _errs137) { - if ( - data59 && - typeof data59 == 'object' && - !Array.isArray(data59) - ) { - let missing11; - if (data59.url === undefined && (missing11 = 'url')) { - const err95 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema95.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema95.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data59.url !== undefined) { - let data60 = data59.url; - const _errs139 = errors; - if (errors === _errs139) { - if (errors === _errs139) { - if (typeof data60 === 'string') { - if (!formats0(data60)) { - const err96 = { - instancePath: - instancePath + - '/owner/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + '/owner/' + i10 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema95.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[3].allOf[0].properties.owner.items - .type, - parentSchema: - schema95.anyOf[3].allOf[0].properties.owner.items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid32 = _errs137 === errors; - if (!valid32) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[3].allOf[0].properties.owner.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.owner, - data: data58, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid29 = _errs135 === errors; - } else { - var valid29 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema95.anyOf[3].allOf[0].type, - parentSchema: schema95.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid28 = _errs119 === errors; - if (valid28) { - const _errs141 = errors; - if (errors === _errs141) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err101 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema95.anyOf[3].allOf[1].required, - parentSchema: schema95.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } else { - if (data.type !== undefined) { - let data61 = data.type; - const _errs143 = errors; - if ('group' !== data61) { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema95.anyOf[3].allOf[1].properties.type, - data: data61, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data.devices !== undefined) { - let data62 = data.devices; - const _errs144 = errors; - if (errors === _errs144) { - if (Array.isArray(data62)) { - var valid35 = true; - const len11 = data62.length; - for (let i11 = 0; i11 < len11; i11++) { - let data63 = data62[i11]; - const _errs146 = errors; - if (errors === _errs146) { - if ( - data63 && - typeof data63 == 'object' && - !Array.isArray(data63) - ) { - let missing13; - if (data63.url === undefined && (missing13 = 'url')) { - const err103 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema95.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema95.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } else { - if (data63.url !== undefined) { - let data64 = data63.url; - const _errs148 = errors; - if (errors === _errs148) { - if (errors === _errs148) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err104 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema95.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } else { - const err105 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema95.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema95.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - } - } - } - } else { - const err106 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema95.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema95.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid35 = _errs146 === errors; - if (!valid35) { - break; - } - } - } else { - const err107 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema95.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema95.anyOf[3].allOf[1].properties.devices, - data: data62, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - } - } - } else { - const err108 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema95.anyOf[3].allOf[1].type, - parentSchema: schema95.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid28 = _errs141 === errors; - } - var _valid0 = _errs118 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err109 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema95.anyOf, - parentSchema: schema95, - data, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - validate110.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate110.errors = vErrors; - return errors === 0; -} -exports.validateDeviceResponse = validate111; -const schema96 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'DeviceResponse', - 'x-location': '#/components/schemas/device_response', - 'x-schema-type': 'response', -}; -function validate111( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema96.anyOf[0].allOf[0].required, - parentSchema: schema96.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - const err1 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema96.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err3 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.name, - data: data1, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err4 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.description, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs10 = errors; - if (typeof data3 !== 'string') { - const err5 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema96.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema96.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema96.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs12 = errors; - if (typeof data4 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema96.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.isPublic, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - const err8 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema96.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema96.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - const err9 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema96.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema96.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema96.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.viewer, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data8)) { - var valid5 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - const err13 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema96.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema96.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - const err14 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[0].allOf[0].properties - .owner.items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema96.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[0].allOf[0].properties.owner.items - .type, - parentSchema: - schema96.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema96.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.owner, - data: data8, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema96.anyOf[0].allOf[0].type, - parentSchema: schema96.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs28 = errors; - if ('cloud instantiable' !== data11) { - const err19 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema96.anyOf[0].allOf[1].properties.type, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err20 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema96.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema96.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data13)) { - var valid8 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs36 = errors; - if (errors === _errs36) { - if (errors === _errs36) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err24 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs40 = errors; - if (typeof data17 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema96.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema96.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid9 = _errs40 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err27 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema96.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema96.anyOf[0].allOf[1].properties.services, - data: data13, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema96.anyOf[0].allOf[1].type, - parentSchema: schema96.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid1 = _errs26 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs42 = errors; - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.url === undefined && (missing3 = 'url')) || - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema96.anyOf[1].allOf[0].required, - parentSchema: schema96.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.url !== undefined) { - let data18 = data.url; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - const err31 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema96.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.name !== undefined) { - let data19 = data.name; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err33 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.name, - data: data19, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data20 = data.description; - const _errs49 = errors; - if (typeof data20 !== 'string') { - const err34 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.description, - data: data20, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data21 = data.type; - const _errs51 = errors; - if (typeof data21 !== 'string') { - const err35 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data21 === 'device' || - data21 === 'group' || - data21 === 'edge instantiable' || - data21 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema96.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema96.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema96.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data22 = data.isPublic; - const _errs53 = errors; - if (typeof data22 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema96.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.isPublic, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid11 = _errs53 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data23 = data.viewer; - const _errs55 = errors; - if (errors === _errs55) { - if (Array.isArray(data23)) { - var valid12 = true; - const len3 = data23.length; - for (let i3 = 0; i3 < len3; i3++) { - let data24 = data23[i3]; - const _errs57 = errors; - if (errors === _errs57) { - if ( - data24 && - typeof data24 == 'object' && - !Array.isArray(data24) - ) { - let missing4; - if (data24.url === undefined && (missing4 = 'url')) { - const err38 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema96.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema96.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data24.url !== undefined) { - let data25 = data24.url; - const _errs59 = errors; - if (errors === _errs59) { - if (errors === _errs59) { - if (typeof data25 === 'string') { - if (!formats0(data25)) { - const err39 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema96.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema96.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid12 = _errs57 === errors; - if (!valid12) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema96.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.viewer, - data: data23, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid11 = _errs55 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data26 = data.owner; - const _errs61 = errors; - if (errors === _errs61) { - if (Array.isArray(data26)) { - var valid14 = true; - const len4 = data26.length; - for (let i4 = 0; i4 < len4; i4++) { - let data27 = data26[i4]; - const _errs63 = errors; - if (errors === _errs63) { - if ( - data27 && - typeof data27 == 'object' && - !Array.isArray(data27) - ) { - let missing5; - if (data27.url === undefined && (missing5 = 'url')) { - const err43 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema96.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema96.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data27.url !== undefined) { - let data28 = data27.url; - const _errs65 = errors; - if (errors === _errs65) { - if (errors === _errs65) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err44 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[1].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema96.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema96.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid14 = _errs63 === errors; - if (!valid14) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema96.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.owner, - data: data26, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid11 = _errs61 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema96.anyOf[1].allOf[0].type, - parentSchema: schema96.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid10 = _errs43 === errors; - if (valid10) { - const _errs67 = errors; - if (errors === _errs67) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data29 = data.type; - const _errs69 = errors; - if ('device' !== data29) { - const err49 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema96.anyOf[1].allOf[1].properties.type, - data: data29, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.connected !== undefined) { - let data30 = data.connected; - const _errs70 = errors; - if (typeof data30 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/connected', - schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema96.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema96.anyOf[1].allOf[1].properties.connected, - data: data30, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid16 = _errs70 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.announcedAvailability !== undefined) { - let data31 = data.announcedAvailability; - const _errs72 = errors; - if (errors === _errs72) { - if (Array.isArray(data31)) { - var valid17 = true; - const len5 = data31.length; - for (let i5 = 0; i5 < len5; i5++) { - let data32 = data31[i5]; - const _errs74 = errors; - if (errors === _errs74) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - if (data32.start !== undefined) { - let data33 = data32.start; - const _errs76 = errors; - if (errors === _errs76) { - if (errors === _errs76) { - if (typeof data33 === 'string') { - if (!formats22.validate(data33)) { - const err51 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema96.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start - .type, - parentSchema: - schema96.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid18 = _errs76 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data32.end !== undefined) { - let data34 = data32.end; - const _errs78 = errors; - if (errors === _errs78) { - if (errors === _errs78) { - if (typeof data34 === 'string') { - if (!formats22.validate(data34)) { - const err53 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema96.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end - .type, - parentSchema: - schema96.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } else { - const err55 = { - instancePath: instancePath + '/announcedAvailability/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[1].allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema96.anyOf[1].allOf[1].properties.announcedAvailability - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid17 = _errs74 === errors; - if (!valid17) { - break; - } - } - } else { - const err56 = { - instancePath: instancePath + '/announcedAvailability', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema96.anyOf[1].allOf[1].properties.announcedAvailability.type, - parentSchema: - schema96.anyOf[1].allOf[1].properties.announcedAvailability, - data: data31, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid16 = _errs72 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data35 = data.experiment; - const _errs80 = errors; - if (errors === _errs80) { - if (errors === _errs80) { - if (typeof data35 === 'string') { - if (!formats0(data35)) { - const err57 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema96.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid16 = _errs80 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data36 = data.services; - const _errs82 = errors; - if (errors === _errs82) { - if (Array.isArray(data36)) { - var valid19 = true; - const len6 = data36.length; - for (let i6 = 0; i6 < len6; i6++) { - let data37 = data36[i6]; - const _errs84 = errors; - if (errors === _errs84) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.serviceType !== undefined) { - let data38 = data37.serviceType; - const _errs87 = errors; - if (errors === _errs87) { - if (errors === _errs87) { - if (typeof data38 === 'string') { - if (!formats0(data38)) { - const err59 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema96.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid20 = _errs87 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceId !== undefined) { - let data39 = data37.serviceId; - const _errs89 = errors; - if (typeof data39 !== 'string') { - const err61 = { - instancePath: - instancePath + '/services/' + i6 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[1].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema96.anyOf[1].allOf[1].properties.services - .items.properties.serviceId, - data: data39, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs89 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceDirection !== undefined) { - let data40 = data37.serviceDirection; - const _errs91 = errors; - if (typeof data40 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema96.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data40 === 'consumer' || - data40 === 'producer' || - data40 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema96.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema96.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema96.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid20 = _errs91 === errors; - } else { - var valid20 = true; - } - } - } - } else { - const err64 = { - instancePath: instancePath + '/services/' + i6, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[1].allOf[1].properties.services.items - .type, - parentSchema: - schema96.anyOf[1].allOf[1].properties.services.items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid19 = _errs84 === errors; - if (!valid19) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema96.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema96.anyOf[1].allOf[1].properties.services, - data: data36, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid16 = _errs82 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema96.anyOf[1].allOf[1].type, - parentSchema: schema96.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid10 = _errs67 === errors; - } - var _valid0 = _errs42 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs93 = errors; - const _errs94 = errors; - if (errors === _errs94) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.url === undefined && (missing6 = 'url')) || - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err67 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema96.anyOf[2].allOf[0].required, - parentSchema: schema96.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data.url !== undefined) { - let data41 = data.url; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data41 === 'string') { - if (!formats0(data41)) { - const err68 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema96.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid22 = _errs96 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.name !== undefined) { - let data42 = data.name; - const _errs98 = errors; - if (typeof data42 !== 'string') { - const err70 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.name, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid22 = _errs98 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.description !== undefined) { - let data43 = data.description; - const _errs100 = errors; - if (typeof data43 !== 'string') { - const err71 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.description, - data: data43, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid22 = _errs100 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs102 = errors; - if (typeof data44 !== 'string') { - const err72 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data44 === 'device' || - data44 === 'group' || - data44 === 'edge instantiable' || - data44 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema96.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema96.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema96.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid22 = _errs102 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.isPublic !== undefined) { - let data45 = data.isPublic; - const _errs104 = errors; - if (typeof data45 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema96.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.isPublic, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid22 = _errs104 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.viewer !== undefined) { - let data46 = data.viewer; - const _errs106 = errors; - if (errors === _errs106) { - if (Array.isArray(data46)) { - var valid23 = true; - const len7 = data46.length; - for (let i7 = 0; i7 < len7; i7++) { - let data47 = data46[i7]; - const _errs108 = errors; - if (errors === _errs108) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - let missing7; - if (data47.url === undefined && (missing7 = 'url')) { - const err75 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema96.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema96.anyOf[2].allOf[0].properties.viewer - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data47.url !== undefined) { - let data48 = data47.url; - const _errs110 = errors; - if (errors === _errs110) { - if (errors === _errs110) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema96.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema96.anyOf[2].allOf[0].properties.viewer.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid23 = _errs108 === errors; - if (!valid23) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema96.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.viewer, - data: data46, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid22 = _errs106 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.owner !== undefined) { - let data49 = data.owner; - const _errs112 = errors; - if (errors === _errs112) { - if (Array.isArray(data49)) { - var valid25 = true; - const len8 = data49.length; - for (let i8 = 0; i8 < len8; i8++) { - let data50 = data49[i8]; - const _errs114 = errors; - if (errors === _errs114) { - if ( - data50 && - typeof data50 == 'object' && - !Array.isArray(data50) - ) { - let missing8; - if (data50.url === undefined && (missing8 = 'url')) { - const err80 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema96.anyOf[2].allOf[0].properties.owner - .items.required, - parentSchema: - schema96.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data50.url !== undefined) { - let data51 = data50.url; - const _errs116 = errors; - if (errors === _errs116) { - if (errors === _errs116) { - if (typeof data51 === 'string') { - if (!formats0(data51)) { - const err81 = { - instancePath: - instancePath + - '/owner/' + - i8 + - '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + '/owner/' + i8 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema96.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema96.anyOf[2].allOf[0].properties.owner.items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid25 = _errs114 === errors; - if (!valid25) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema96.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.owner, - data: data49, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid22 = _errs112 === errors; - } else { - var valid22 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema96.anyOf[2].allOf[0].type, - parentSchema: schema96.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid21 = _errs94 === errors; - if (valid21) { - const _errs118 = errors; - if (errors === _errs118) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data52 = data.type; - const _errs120 = errors; - if ('edge instantiable' !== data52) { - const err86 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema96.anyOf[2].allOf[1].properties.type, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.codeUrl !== undefined) { - let data53 = data.codeUrl; - const _errs121 = errors; - if (errors === _errs121) { - if (errors === _errs121) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err87 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema96.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema96.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid27 = _errs121 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.services !== undefined) { - let data54 = data.services; - const _errs123 = errors; - if (errors === _errs123) { - if (Array.isArray(data54)) { - var valid28 = true; - const len9 = data54.length; - for (let i9 = 0; i9 < len9; i9++) { - let data55 = data54[i9]; - const _errs125 = errors; - if (errors === _errs125) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - if (data55.serviceType !== undefined) { - let data56 = data55.serviceType; - const _errs128 = errors; - if (errors === _errs128) { - if (errors === _errs128) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err89 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema96.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid29 = _errs128 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceId !== undefined) { - let data57 = data55.serviceId; - const _errs130 = errors; - if (typeof data57 !== 'string') { - const err91 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[2].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema96.anyOf[2].allOf[1].properties.services.items - .properties.serviceId, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid29 = _errs130 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceDirection !== undefined) { - let data58 = data55.serviceDirection; - const _errs132 = errors; - if (typeof data58 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema96.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data58 === 'consumer' || - data58 === 'producer' || - data58 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema96.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema96.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema96.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid29 = _errs132 === errors; - } else { - var valid29 = true; - } - } - } - } else { - const err94 = { - instancePath: instancePath + '/services/' + i9, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[2].allOf[1].properties.services.items.type, - parentSchema: - schema96.anyOf[2].allOf[1].properties.services.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid28 = _errs125 === errors; - if (!valid28) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema96.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema96.anyOf[2].allOf[1].properties.services, - data: data54, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid27 = _errs123 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err96 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema96.anyOf[2].allOf[1].type, - parentSchema: schema96.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid21 = _errs118 === errors; - } - var _valid0 = _errs93 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs134 = errors; - const _errs135 = errors; - if (errors === _errs135) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.url === undefined && (missing9 = 'url')) || - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err97 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema96.anyOf[3].allOf[0].required, - parentSchema: schema96.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data.url !== undefined) { - let data59 = data.url; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data59 === 'string') { - if (!formats0(data59)) { - const err98 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema96.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema96.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid31 = _errs137 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.name !== undefined) { - let data60 = data.name; - const _errs139 = errors; - if (typeof data60 !== 'string') { - const err100 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema96.anyOf[3].allOf[0].properties.name, - data: data60, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid31 = _errs139 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.description !== undefined) { - let data61 = data.description; - const _errs141 = errors; - if (typeof data61 !== 'string') { - const err101 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema96.anyOf[3].allOf[0].properties.description, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid31 = _errs141 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.type !== undefined) { - let data62 = data.type; - const _errs143 = errors; - if (typeof data62 !== 'string') { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema96.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema96.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data62 === 'device' || - data62 === 'group' || - data62 === 'edge instantiable' || - data62 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema96.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema96.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema96.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid31 = _errs143 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.isPublic !== undefined) { - let data63 = data.isPublic; - const _errs145 = errors; - if (typeof data63 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema96.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema96.anyOf[3].allOf[0].properties.isPublic, - data: data63, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid31 = _errs145 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.viewer !== undefined) { - let data64 = data.viewer; - const _errs147 = errors; - if (errors === _errs147) { - if (Array.isArray(data64)) { - var valid32 = true; - const len10 = data64.length; - for (let i10 = 0; i10 < len10; i10++) { - let data65 = data64[i10]; - const _errs149 = errors; - if (errors === _errs149) { - if ( - data65 && - typeof data65 == 'object' && - !Array.isArray(data65) - ) { - let missing10; - if (data65.url === undefined && (missing10 = 'url')) { - const err105 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema96.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema96.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data65.url !== undefined) { - let data66 = data65.url; - const _errs151 = errors; - if (errors === _errs151) { - if (errors === _errs151) { - if (typeof data66 === 'string') { - if (!formats0(data66)) { - const err106 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema96.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema96.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid32 = _errs149 === errors; - if (!valid32) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema96.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: - schema96.anyOf[3].allOf[0].properties.viewer, - data: data64, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid31 = _errs147 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.owner !== undefined) { - let data67 = data.owner; - const _errs153 = errors; - if (errors === _errs153) { - if (Array.isArray(data67)) { - var valid34 = true; - const len11 = data67.length; - for (let i11 = 0; i11 < len11; i11++) { - let data68 = data67[i11]; - const _errs155 = errors; - if (errors === _errs155) { - if ( - data68 && - typeof data68 == 'object' && - !Array.isArray(data68) - ) { - let missing11; - if ( - data68.url === undefined && - (missing11 = 'url') - ) { - const err110 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema96.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema96.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data68.url !== undefined) { - let data69 = data68.url; - const _errs157 = errors; - if (errors === _errs157) { - if (errors === _errs157) { - if (typeof data69 === 'string') { - if (!formats0(data69)) { - const err111 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[3].allOf[0] - .properties.owner.items.properties - .url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema96.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[3].allOf[0].properties.owner - .items.type, - parentSchema: - schema96.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid34 = _errs155 === errors; - if (!valid34) { - break; - } - } - } else { - const err114 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema96.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema96.anyOf[3].allOf[0].properties.owner, - data: data67, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid31 = _errs153 === errors; - } else { - var valid31 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema96.anyOf[3].allOf[0].type, - parentSchema: schema96.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid30 = _errs135 === errors; - if (valid30) { - const _errs159 = errors; - if (errors === _errs159) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err116 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema96.anyOf[3].allOf[1].required, - parentSchema: schema96.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data.type !== undefined) { - let data70 = data.type; - const _errs161 = errors; - if ('group' !== data70) { - const err117 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema96.anyOf[3].allOf[1].properties.type, - data: data70, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data.devices !== undefined) { - let data71 = data.devices; - const _errs162 = errors; - if (errors === _errs162) { - if (Array.isArray(data71)) { - var valid37 = true; - const len12 = data71.length; - for (let i12 = 0; i12 < len12; i12++) { - let data72 = data71[i12]; - const _errs164 = errors; - if (errors === _errs164) { - if ( - data72 && - typeof data72 == 'object' && - !Array.isArray(data72) - ) { - let missing13; - if (data72.url === undefined && (missing13 = 'url')) { - const err118 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema96.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema96.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data72.url !== undefined) { - let data73 = data72.url; - const _errs166 = errors; - if (errors === _errs166) { - if (errors === _errs166) { - if (typeof data73 === 'string') { - if (!formats0(data73)) { - const err119 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema96.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema96.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema96.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema96.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema96.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid37 = _errs164 === errors; - if (!valid37) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema96.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema96.anyOf[3].allOf[1].properties.devices, - data: data71, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid36 = _errs162 === errors; - } else { - var valid36 = true; - } - } - } - } else { - const err123 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema96.anyOf[3].allOf[1].type, - parentSchema: schema96.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid30 = _errs159 === errors; - } - var _valid0 = _errs134 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err124 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema96.anyOf, - parentSchema: schema96, - data, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate111.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate111.errors = vErrors; - return errors === 0; -} -exports.validateCallbackRequest = validate112; -const schema97 = { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'CallbackRequest', - 'x-location': '#/components/schemas/callback_request', - 'x-schema-type': 'request', -}; -function validate112( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate112.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema97.required, - parentSchema: schema97, - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate112.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema97.properties.callbackType.type, - parentSchema: schema97.properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate112.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema97.type, - parentSchema: schema97, - data, - }, - ]; - return false; - } - } - validate112.errors = vErrors; - return errors === 0; -} -exports.validateCallbackResponse = validate113; -const schema98 = { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'CallbackResponse', - 'x-location': '#/components/schemas/callback_response', - 'x-schema-type': 'response', -}; -function validate113( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate113.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema98.required, - parentSchema: schema98, - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate113.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema98.properties.callbackType.type, - parentSchema: schema98.properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate113.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema98.type, - parentSchema: schema98, - data, - }, - ]; - return false; - } - } - validate113.errors = vErrors; - return errors === 0; -} -exports.validateEventCallbackRequest = validate114; -const schema99 = { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'EventCallbackRequest', - 'x-location': '#/components/schemas/event_callback_request', - 'x-schema-type': 'request', -}; -function validate114( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate114.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema99.allOf[0].required, - parentSchema: schema99.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate114.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema99.allOf[0].properties.callbackType.type, - parentSchema: schema99.allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate114.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema99.allOf[0].type, - parentSchema: schema99.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs4 = errors; - if (errors === _errs4) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate114.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema99.allOf[1].required, - parentSchema: schema99.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs6 = errors; - if (typeof data1 !== 'string') { - validate114.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema99.allOf[1].properties.callbackType.type, - parentSchema: schema99.allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate114.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: schema99.allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema99.allOf[1].properties.callbackType.enum, - parentSchema: schema99.allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate114.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema99.allOf[1].properties.eventType.type, - parentSchema: schema99.allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - } - } - } else { - validate114.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema99.allOf[1].type, - parentSchema: schema99.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs4 === errors; - } - validate114.errors = vErrors; - return errors === 0; -} -exports.validateEventCallbackResponse = validate115; -const schema100 = { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'EventCallbackResponse', - 'x-location': '#/components/schemas/event_callback_response', - 'x-schema-type': 'response', -}; -function validate115( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate115.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema100.allOf[0].required, - parentSchema: schema100.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate115.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema100.allOf[0].properties.callbackType.type, - parentSchema: schema100.allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate115.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema100.allOf[0].type, - parentSchema: schema100.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs4 = errors; - if (errors === _errs4) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate115.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema100.allOf[1].required, - parentSchema: schema100.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs6 = errors; - if (typeof data1 !== 'string') { - validate115.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema100.allOf[1].properties.callbackType.type, - parentSchema: schema100.allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate115.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: schema100.allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema100.allOf[1].properties.callbackType.enum, - parentSchema: schema100.allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate115.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema100.allOf[1].properties.eventType.type, - parentSchema: schema100.allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - } - } - } else { - validate115.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema100.allOf[1].type, - parentSchema: schema100.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs4 === errors; - } - validate115.errors = vErrors; - return errors === 0; -} -exports.validateDeviceChangedEventCallbackRequest = validate116; -const schema101 = { - title: 'Device Changed Event Callback', - allOf: [ - { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - eventType: { type: 'string', enum: ['device-changed'] }, - device: { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - }, - }, - required: ['eventType', 'device'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'DeviceChangedEventCallbackRequest', - 'x-location': '#/components/schemas/device_changed_request', - 'x-schema-type': 'request', -}; -function validate116( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate116.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema101.allOf[0].allOf[0].required, - parentSchema: schema101.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate116.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema101.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema101.allOf[0].allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate116.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema101.allOf[0].allOf[0].type, - parentSchema: schema101.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate116.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema101.allOf[0].allOf[1].required, - parentSchema: schema101.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs7 = errors; - if (typeof data1 !== 'string') { - validate116.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema101.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema101.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate116.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: - schema101.allOf[0].allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema101.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema101.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs7 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate116.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema101.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema101.allOf[0].allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate116.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema101.allOf[0].allOf[1].type, - parentSchema: schema101.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.eventType === undefined && (missing2 = 'eventType')) || - (data.device === undefined && (missing2 = 'device')) - ) { - validate116.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema101.allOf[1].required, - parentSchema: schema101.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.eventType !== undefined) { - let data3 = data.eventType; - const _errs13 = errors; - if (typeof data3 !== 'string') { - validate116.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema101.allOf[1].properties.eventType.type, - parentSchema: schema101.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - if (!(data3 === 'device-changed')) { - validate116.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/enum', - keyword: 'enum', - params: { allowedValues: schema101.allOf[1].properties.eventType.enum }, - message: 'must be equal to one of the allowed values', - schema: schema101.allOf[1].properties.eventType.enum, - parentSchema: schema101.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.device !== undefined) { - let data4 = data.device; - const _errs15 = errors; - const _errs16 = errors; - let valid5 = false; - const _errs17 = errors; - const _errs18 = errors; - if (errors === _errs18) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing3; - if ( - (data4.type === undefined && (missing3 = 'type')) || - (data4.name === undefined && (missing3 = 'name')) || - (data4.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err0 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0].required, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data4.name !== undefined) { - let data5 = data4.name; - const _errs20 = errors; - if (typeof data5 !== 'string') { - const err1 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.name.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.name, - data: data5, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid7 = _errs20 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.description !== undefined) { - let data6 = data4.description; - const _errs22 = errors; - if (typeof data6 !== 'string') { - const err2 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.description.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.description, - data: data6, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid7 = _errs22 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.type !== undefined) { - let data7 = data4.type; - const _errs24 = errors; - if (typeof data7 !== 'string') { - const err3 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type, - data: data7, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data7 === 'device' || - data7 === 'group' || - data7 === 'edge instantiable' || - data7 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type.enum, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type, - data: data7, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid7 = _errs24 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.isPublic !== undefined) { - let data8 = data4.isPublic; - const _errs26 = errors; - if (typeof data8 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.isPublic.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.isPublic, - data: data8, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.viewer !== undefined) { - let data9 = data4.viewer; - const _errs28 = errors; - if (errors === _errs28) { - if (Array.isArray(data9)) { - var valid8 = true; - const len0 = data9.length; - for (let i0 = 0; i0 < len0; i0++) { - let data10 = data9[i0]; - const _errs30 = errors; - if (errors === _errs30) { - if ( - data10 && - typeof data10 == 'object' && - !Array.isArray(data10) - ) { - let missing4; - if ( - data10.url === undefined && - (missing4 = 'url') - ) { - const err6 = { - instancePath: - instancePath + '/device/viewer/' + i0, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + - missing4 + - "'", - schema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[0].properties.viewer - .items, - data: data10, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data10.url !== undefined) { - let data11 = data10.url; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err7 = { - instancePath: - instancePath + - '/device/viewer/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.viewer.items - .properties.url, - data: data11, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + - '/device/viewer/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[0].properties - .viewer.items.properties.url, - data: data11, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: - instancePath + '/device/viewer/' + i0, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.viewer.items.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.viewer.items, - data: data10, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid8 = _errs30 === errors; - if (!valid8) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.viewer.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.viewer, - data: data9, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.owner !== undefined) { - let data12 = data4.owner; - const _errs34 = errors; - if (errors === _errs34) { - if (Array.isArray(data12)) { - var valid10 = true; - const len1 = data12.length; - for (let i1 = 0; i1 < len1; i1++) { - let data13 = data12[i1]; - const _errs36 = errors; - if (errors === _errs36) { - if ( - data13 && - typeof data13 == 'object' && - !Array.isArray(data13) - ) { - let missing5; - if ( - data13.url === undefined && - (missing5 = 'url') - ) { - const err11 = { - instancePath: - instancePath + '/device/owner/' + i1, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + - missing5 + - "'", - schema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner - .items.required, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner - .items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data13.url !== undefined) { - let data14 = data13.url; - const _errs38 = errors; - if (errors === _errs38) { - if (errors === _errs38) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err12 = { - instancePath: - instancePath + - '/device/owner/' + - i1 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.owner.items - .properties.url, - data: data14, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + - '/device/owner/' + - i1 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema101.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.owner.items - .properties.url, - data: data14, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: - instancePath + '/device/owner/' + i1, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner.items - .type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid10 = _errs36 === errors; - if (!valid10) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.owner.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.owner, - data: data12, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid7 = _errs34 === errors; - } else { - var valid7 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema101.allOf[1].properties.device.anyOf[0].allOf[0].type, - parentSchema: schema101.allOf[1].properties.device.anyOf[0].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid6 = _errs18 === errors; - if (valid6) { - const _errs40 = errors; - if (errors === _errs40) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - if (data4.type !== undefined) { - let data15 = data4.type; - const _errs42 = errors; - if ('cloud instantiable' !== data15) { - const err17 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.type, - data: data15, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid12 = _errs42 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if (data4.instantiateUrl !== undefined) { - let data16 = data4.instantiateUrl; - const _errs43 = errors; - if (errors === _errs43) { - if (errors === _errs43) { - if (typeof data16 === 'string') { - if (!formats0(data16)) { - const err18 = { - instancePath: instancePath + '/device/instantiateUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.instantiateUrl, - data: data16, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/device/instantiateUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.instantiateUrl.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.instantiateUrl, - data: data16, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid12 = _errs43 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if (data4.services !== undefined) { - let data17 = data4.services; - const _errs45 = errors; - if (errors === _errs45) { - if (Array.isArray(data17)) { - var valid13 = true; - const len2 = data17.length; - for (let i2 = 0; i2 < len2; i2++) { - let data18 = data17[i2]; - const _errs47 = errors; - if (errors === _errs47) { - if ( - data18 && - typeof data18 == 'object' && - !Array.isArray(data18) - ) { - if (data18.serviceType !== undefined) { - let data19 = data18.serviceType; - const _errs50 = errors; - if (errors === _errs50) { - if (errors === _errs50) { - if (typeof data19 === 'string') { - if (!formats0(data19)) { - const err20 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data19, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data19, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid14 = _errs50 === errors; - } else { - var valid14 = true; - } - if (valid14) { - if (data18.serviceId !== undefined) { - let data20 = data18.serviceId; - const _errs52 = errors; - if (typeof data20 !== 'string') { - const err22 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceId, - data: data20, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid14 = _errs52 === errors; - } else { - var valid14 = true; - } - if (valid14) { - if (data18.serviceDirection !== undefined) { - let data21 = data18.serviceDirection; - const _errs54 = errors; - if (typeof data21 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection, - data: data21, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data21 === 'consumer' || - data21 === 'producer' || - data21 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema101.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection - .enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection, - data: data21, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid14 = _errs54 === errors; - } else { - var valid14 = true; - } - } - } - } else { - const err25 = { - instancePath: - instancePath + '/device/services/' + i2, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device.anyOf[0] - .allOf[1].properties.services.items.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0] - .allOf[1].properties.services.items, - data: data18, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid13 = _errs47 === errors; - if (!valid13) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/device/services', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.services.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.services, - data: data17, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid12 = _errs45 === errors; - } else { - var valid12 = true; - } - } - } - } else { - const err27 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema101.allOf[1].properties.device.anyOf[0].allOf[1].type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid6 = _errs40 === errors; - } - var _valid0 = _errs17 === errors; - valid5 = valid5 || _valid0; - if (!valid5) { - const _errs56 = errors; - const _errs57 = errors; - if (errors === _errs57) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing6; - if ( - (data4.type === undefined && (missing6 = 'type')) || - (data4.name === undefined && (missing6 = 'name')) || - (data4.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err28 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0].required, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data4.name !== undefined) { - let data22 = data4.name; - const _errs59 = errors; - if (typeof data22 !== 'string') { - const err29 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.name.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.name, - data: data22, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid16 = _errs59 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.description !== undefined) { - let data23 = data4.description; - const _errs61 = errors; - if (typeof data23 !== 'string') { - const err30 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.description.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.description, - data: data23, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid16 = _errs61 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.type !== undefined) { - let data24 = data4.type; - const _errs63 = errors; - if (typeof data24 !== 'string') { - const err31 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type, - data: data24, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data24 === 'device' || - data24 === 'group' || - data24 === 'edge instantiable' || - data24 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type.enum, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type, - data: data24, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid16 = _errs63 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.isPublic !== undefined) { - let data25 = data4.isPublic; - const _errs65 = errors; - if (typeof data25 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.isPublic.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.isPublic, - data: data25, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.viewer !== undefined) { - let data26 = data4.viewer; - const _errs67 = errors; - if (errors === _errs67) { - if (Array.isArray(data26)) { - var valid17 = true; - const len3 = data26.length; - for (let i3 = 0; i3 < len3; i3++) { - let data27 = data26[i3]; - const _errs69 = errors; - if (errors === _errs69) { - if ( - data27 && - typeof data27 == 'object' && - !Array.isArray(data27) - ) { - let missing7; - if ( - data27.url === undefined && - (missing7 = 'url') - ) { - const err34 = { - instancePath: - instancePath + '/device/viewer/' + i3, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + - missing7 + - "'", - schema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer - .items.required, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer - .items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data27.url !== undefined) { - let data28 = data27.url; - const _errs71 = errors; - if (errors === _errs71) { - if (errors === _errs71) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err35 = { - instancePath: - instancePath + - '/device/viewer/' + - i3 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.viewer.items - .properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + - '/device/viewer/' + - i3 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.viewer.items - .properties.url.type, - parentSchema: - schema101.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.viewer.items - .properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: - instancePath + '/device/viewer/' + i3, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer - .items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid17 = _errs69 === errors; - if (!valid17) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.viewer.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.viewer, - data: data26, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid16 = _errs67 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.owner !== undefined) { - let data29 = data4.owner; - const _errs73 = errors; - if (errors === _errs73) { - if (Array.isArray(data29)) { - var valid19 = true; - const len4 = data29.length; - for (let i4 = 0; i4 < len4; i4++) { - let data30 = data29[i4]; - const _errs75 = errors; - if (errors === _errs75) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - let missing8; - if ( - data30.url === undefined && - (missing8 = 'url') - ) { - const err39 = { - instancePath: - instancePath + '/device/owner/' + i4, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items.required, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data30.url !== undefined) { - let data31 = data30.url; - const _errs77 = errors; - if (errors === _errs77) { - if (errors === _errs77) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err40 = { - instancePath: - instancePath + - '/device/owner/' + - i4 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.owner.items - .properties.url, - data: data31, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + - '/device/owner/' + - i4 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema101.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.owner.items - .properties.url, - data: data31, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: - instancePath + '/device/owner/' + i4, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid19 = _errs75 === errors; - if (!valid19) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.owner.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.owner, - data: data29, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid16 = _errs73 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema101.allOf[1].properties.device.anyOf[1].allOf[0].type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid15 = _errs57 === errors; - if (valid15) { - const _errs79 = errors; - if (errors === _errs79) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - if (data4.type !== undefined) { - let data32 = data4.type; - const _errs81 = errors; - if ('device' !== data32) { - const err45 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.type, - data: data32, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid21 = _errs81 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data4.experiment !== undefined) { - let data33 = data4.experiment; - const _errs82 = errors; - if (errors === _errs82) { - if (errors === _errs82) { - if (typeof data33 === 'string') { - if (!formats0(data33)) { - const err46 = { - instancePath: instancePath + '/device/experiment', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.experiment, - data: data33, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/device/experiment', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.experiment.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.experiment, - data: data33, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid21 = _errs82 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data4.services !== undefined) { - let data34 = data4.services; - const _errs84 = errors; - if (errors === _errs84) { - if (Array.isArray(data34)) { - var valid22 = true; - const len5 = data34.length; - for (let i5 = 0; i5 < len5; i5++) { - let data35 = data34[i5]; - const _errs86 = errors; - if (errors === _errs86) { - if ( - data35 && - typeof data35 == 'object' && - !Array.isArray(data35) - ) { - if (data35.serviceType !== undefined) { - let data36 = data35.serviceType; - const _errs89 = errors; - if (errors === _errs89) { - if (errors === _errs89) { - if (typeof data36 === 'string') { - if (!formats0(data36)) { - const err48 = { - instancePath: - instancePath + - '/device/services/' + - i5 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceType, - data: data36, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + - '/device/services/' + - i5 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data36, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid23 = _errs89 === errors; - } else { - var valid23 = true; - } - if (valid23) { - if (data35.serviceId !== undefined) { - let data37 = data35.serviceId; - const _errs91 = errors; - if (typeof data37 !== 'string') { - const err50 = { - instancePath: - instancePath + - '/device/services/' + - i5 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[1].properties.services - .items.properties.serviceId, - data: data37, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid23 = _errs91 === errors; - } else { - var valid23 = true; - } - if (valid23) { - if (data35.serviceDirection !== undefined) { - let data38 = data35.serviceDirection; - const _errs93 = errors; - if (typeof data38 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/device/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection - .type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data38, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data38 === 'consumer' || - data38 === 'producer' || - data38 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/device/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema101.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection - .enum, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data38, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid23 = _errs93 === errors; - } else { - var valid23 = true; - } - } - } - } else { - const err53 = { - instancePath: - instancePath + '/device/services/' + i5, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.services.items.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.services.items, - data: data35, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid22 = _errs86 === errors; - if (!valid22) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/device/services', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.services.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.services, - data: data34, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid21 = _errs84 === errors; - } else { - var valid21 = true; - } - } - } - } else { - const err55 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1].type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid15 = _errs79 === errors; - } - var _valid0 = _errs56 === errors; - valid5 = valid5 || _valid0; - if (!valid5) { - const _errs95 = errors; - const _errs96 = errors; - if (errors === _errs96) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing9; - if ( - (data4.type === undefined && (missing9 = 'type')) || - (data4.name === undefined && (missing9 = 'name')) || - (data4.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err56 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] - .required, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data4.name !== undefined) { - let data39 = data4.name; - const _errs98 = errors; - if (typeof data39 !== 'string') { - const err57 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.name.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.name, - data: data39, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid25 = _errs98 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data4.description !== undefined) { - let data40 = data4.description; - const _errs100 = errors; - if (typeof data40 !== 'string') { - const err58 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.description.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.description, - data: data40, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid25 = _errs100 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data4.type !== undefined) { - let data41 = data4.type; - const _errs102 = errors; - if (typeof data41 !== 'string') { - const err59 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.type.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.type, - data: data41, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data41 === 'device' || - data41 === 'group' || - data41 === 'edge instantiable' || - data41 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.type.enum, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.type, - data: data41, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid25 = _errs102 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data4.isPublic !== undefined) { - let data42 = data4.isPublic; - const _errs104 = errors; - if (typeof data42 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.isPublic.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.isPublic, - data: data42, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data4.viewer !== undefined) { - let data43 = data4.viewer; - const _errs106 = errors; - if (errors === _errs106) { - if (Array.isArray(data43)) { - var valid26 = true; - const len6 = data43.length; - for (let i6 = 0; i6 < len6; i6++) { - let data44 = data43[i6]; - const _errs108 = errors; - if (errors === _errs108) { - if ( - data44 && - typeof data44 == 'object' && - !Array.isArray(data44) - ) { - let missing10; - if ( - data44.url === undefined && - (missing10 = 'url') - ) { - const err62 = { - instancePath: - instancePath + '/device/viewer/' + i6, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items.required, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items, - data: data44, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data44.url !== undefined) { - let data45 = data44.url; - const _errs110 = errors; - if (errors === _errs110) { - if (errors === _errs110) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err63 = { - instancePath: - instancePath + - '/device/viewer/' + - i6 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.viewer.items - .properties.url, - data: data45, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + - '/device/viewer/' + - i6 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.viewer.items - .properties.url.type, - parentSchema: - schema101.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.viewer.items - .properties.url, - data: data45, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: - instancePath + '/device/viewer/' + i6, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items, - data: data44, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid26 = _errs108 === errors; - if (!valid26) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.viewer.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.viewer, - data: data43, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid25 = _errs106 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data4.owner !== undefined) { - let data46 = data4.owner; - const _errs112 = errors; - if (errors === _errs112) { - if (Array.isArray(data46)) { - var valid28 = true; - const len7 = data46.length; - for (let i7 = 0; i7 < len7; i7++) { - let data47 = data46[i7]; - const _errs114 = errors; - if (errors === _errs114) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - let missing11; - if ( - data47.url === undefined && - (missing11 = 'url') - ) { - const err67 = { - instancePath: - instancePath + '/device/owner/' + i7, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[0].properties.owner - .items.required, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[0].properties.owner - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data47.url !== undefined) { - let data48 = data47.url; - const _errs116 = errors; - if (errors === _errs116) { - if (errors === _errs116) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err68 = { - instancePath: - instancePath + - '/device/owner/' + - i7 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema101.allOf[1] - .properties.device - .anyOf[2].allOf[0] - .properties.owner.items - .properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + - '/device/owner/' + - i7 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema101.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.owner.items - .properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: - instancePath + '/device/owner/' + i7, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[0].properties.owner - .items.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[0].properties.owner - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid28 = _errs114 === errors; - if (!valid28) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.owner.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.owner, - data: data46, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid25 = _errs112 === errors; - } else { - var valid25 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0].type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid24 = _errs96 === errors; - if (valid24) { - const _errs118 = errors; - if (errors === _errs118) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - if (data4.type !== undefined) { - let data49 = data4.type; - const _errs120 = errors; - if ('edge instantiable' !== data49) { - const err73 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[1] - .properties.type, - data: data49, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid30 = _errs120 === errors; - } else { - var valid30 = true; - } - if (valid30) { - if (data4.codeUrl !== undefined) { - let data50 = data4.codeUrl; - const _errs121 = errors; - if (errors === _errs121) { - if (errors === _errs121) { - if (typeof data50 === 'string') { - if (!formats0(data50)) { - const err74 = { - instancePath: instancePath + '/device/codeUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.codeUrl, - data: data50, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/device/codeUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.codeUrl.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.codeUrl, - data: data50, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid30 = _errs121 === errors; - } else { - var valid30 = true; - } - if (valid30) { - if (data4.services !== undefined) { - let data51 = data4.services; - const _errs123 = errors; - if (errors === _errs123) { - if (Array.isArray(data51)) { - var valid31 = true; - const len8 = data51.length; - for (let i8 = 0; i8 < len8; i8++) { - let data52 = data51[i8]; - const _errs125 = errors; - if (errors === _errs125) { - if ( - data52 && - typeof data52 == 'object' && - !Array.isArray(data52) - ) { - if (data52.serviceType !== undefined) { - let data53 = data52.serviceType; - const _errs128 = errors; - if (errors === _errs128) { - if (errors === _errs128) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err76 = { - instancePath: - instancePath + - '/device/services/' + - i8 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceType, - data: data53, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + - '/device/services/' + - i8 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceType.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceType, - data: data53, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid32 = _errs128 === errors; - } else { - var valid32 = true; - } - if (valid32) { - if (data52.serviceId !== undefined) { - let data54 = data52.serviceId; - const _errs130 = errors; - if (typeof data54 !== 'string') { - const err78 = { - instancePath: - instancePath + - '/device/services/' + - i8 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data54, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid32 = _errs130 === errors; - } else { - var valid32 = true; - } - if (valid32) { - if (data52.serviceDirection !== undefined) { - let data55 = data52.serviceDirection; - const _errs132 = errors; - if (typeof data55 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/device/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection, - data: data55, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data55 === 'consumer' || - data55 === 'producer' || - data55 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/device/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema101.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection.enum, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection, - data: data55, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid32 = _errs132 === errors; - } else { - var valid32 = true; - } - } - } - } else { - const err81 = { - instancePath: - instancePath + '/device/services/' + i8, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services.items.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services.items, - data: data52, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid31 = _errs125 === errors; - if (!valid31) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/device/services', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services, - data: data51, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid30 = _errs123 === errors; - } else { - var valid30 = true; - } - } - } - } else { - const err83 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[1].type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid24 = _errs118 === errors; - } - var _valid0 = _errs95 === errors; - valid5 = valid5 || _valid0; - if (!valid5) { - const _errs134 = errors; - const _errs135 = errors; - if (errors === _errs135) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing12; - if ( - (data4.type === undefined && (missing12 = 'type')) || - (data4.name === undefined && (missing12 = 'name')) || - (data4.isPublic === undefined && (missing12 = 'isPublic')) - ) { - const err84 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0] - .required, - parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data4.name !== undefined) { - let data56 = data4.name; - const _errs137 = errors; - if (typeof data56 !== 'string') { - const err85 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0] - .properties.name.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0] - .properties.name, - data: data56, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid34 = _errs137 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data4.description !== undefined) { - let data57 = data4.description; - const _errs139 = errors; - if (typeof data57 !== 'string') { - const err86 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0] - .properties.description.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0] - .properties.description, - data: data57, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid34 = _errs139 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data4.type !== undefined) { - let data58 = data4.type; - const _errs141 = errors; - if (typeof data58 !== 'string') { - const err87 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type, - data: data58, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data58 === 'device' || - data58 === 'group' || - data58 === 'edge instantiable' || - data58 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema101.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema101.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type.enum, - parentSchema: - schema101.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type, - data: data58, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid34 = _errs141 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data4.isPublic !== undefined) { - let data59 = data4.isPublic; - const _errs143 = errors; - if (typeof data59 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema101.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.isPublic.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.isPublic, - data: data59, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data4.viewer !== undefined) { - let data60 = data4.viewer; - const _errs145 = errors; - if (errors === _errs145) { - if (Array.isArray(data60)) { - var valid35 = true; - const len9 = data60.length; - for (let i9 = 0; i9 < len9; i9++) { - let data61 = data60[i9]; - const _errs147 = errors; - if (errors === _errs147) { - if ( - data61 && - typeof data61 == 'object' && - !Array.isArray(data61) - ) { - let missing13; - if ( - data61.url === undefined && - (missing13 = 'url') - ) { - const err90 = { - instancePath: - instancePath + '/device/viewer/' + i9, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + - missing13 + - "'", - schema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[0].properties.viewer - .items, - data: data61, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data61.url !== undefined) { - let data62 = data61.url; - const _errs149 = errors; - if (errors === _errs149) { - if (errors === _errs149) { - if (typeof data62 === 'string') { - if (!formats0(data62)) { - const err91 = { - instancePath: - instancePath + - '/device/viewer/' + - i9 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema101.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.viewer.items - .properties.url, - data: data62, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + - '/device/viewer/' + - i9 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties - .device.anyOf[3].allOf[0] - .properties.viewer.items - .properties.url.type, - parentSchema: - schema101.allOf[1].properties - .device.anyOf[3].allOf[0] - .properties.viewer.items - .properties.url, - data: data62, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: - instancePath + '/device/viewer/' + i9, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[0].properties.viewer - .items.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[0].properties.viewer - .items, - data: data61, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid35 = _errs147 === errors; - if (!valid35) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.viewer.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.viewer, - data: data60, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid34 = _errs145 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data4.owner !== undefined) { - let data63 = data4.owner; - const _errs151 = errors; - if (errors === _errs151) { - if (Array.isArray(data63)) { - var valid37 = true; - const len10 = data63.length; - for (let i10 = 0; i10 < len10; i10++) { - let data64 = data63[i10]; - const _errs153 = errors; - if (errors === _errs153) { - if ( - data64 && - typeof data64 == 'object' && - !Array.isArray(data64) - ) { - let missing14; - if ( - data64.url === undefined && - (missing14 = 'url') - ) { - const err95 = { - instancePath: - instancePath + - '/device/owner/' + - i10, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { - missingProperty: missing14, - }, - message: - "must have required property '" + - missing14 + - "'", - schema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[0].properties - .owner.items.required, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[0].properties - .owner.items, - data: data64, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data64.url !== undefined) { - let data65 = data64.url; - const _errs155 = errors; - if (errors === _errs155) { - if (errors === _errs155) { - if (typeof data65 === 'string') { - if (!formats0(data65)) { - const err96 = { - instancePath: - instancePath + - '/device/owner/' + - i10 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema101.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.owner.items - .properties.url, - data: data65, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + - '/device/owner/' + - i10 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema101.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.owner.items - .properties.url, - data: data65, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: - instancePath + '/device/owner/' + i10, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[0].properties.owner - .items.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[0].properties.owner - .items, - data: data64, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid37 = _errs153 === errors; - if (!valid37) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[0].properties.owner, - data: data63, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid34 = _errs151 === errors; - } else { - var valid34 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0].type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid33 = _errs135 === errors; - if (valid33) { - const _errs157 = errors; - if (errors === _errs157) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing15; - if (data4.devices === undefined && (missing15 = 'devices')) { - const err101 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing15 }, - message: "must have required property '" + missing15 + "'", - schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[1] - .required, - parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } else { - if (data4.type !== undefined) { - let data66 = data4.type; - const _errs159 = errors; - if ('group' !== data66) { - const err102 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[1] - .properties.type, - data: data66, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - var valid39 = _errs159 === errors; - } else { - var valid39 = true; - } - if (valid39) { - if (data4.devices !== undefined) { - let data67 = data4.devices; - const _errs160 = errors; - if (errors === _errs160) { - if (Array.isArray(data67)) { - var valid40 = true; - const len11 = data67.length; - for (let i11 = 0; i11 < len11; i11++) { - let data68 = data67[i11]; - const _errs162 = errors; - if (errors === _errs162) { - if ( - data68 && - typeof data68 == 'object' && - !Array.isArray(data68) - ) { - let missing16; - if ( - data68.url === undefined && - (missing16 = 'url') - ) { - const err103 = { - instancePath: - instancePath + '/device/devices/' + i11, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing16 }, - message: - "must have required property '" + - missing16 + - "'", - schema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[1].properties.devices - .items.required, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[1].properties.devices - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } else { - if (data68.url !== undefined) { - let data69 = data68.url; - const _errs164 = errors; - if (errors === _errs164) { - if (errors === _errs164) { - if (typeof data69 === 'string') { - if (!formats0(data69)) { - const err104 = { - instancePath: - instancePath + - '/device/devices/' + - i11 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema101.allOf[1].properties - .device.anyOf[3].allOf[1] - .properties.devices.items - .properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } else { - const err105 = { - instancePath: - instancePath + - '/device/devices/' + - i11 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema101.allOf[1].properties - .device.anyOf[3].allOf[1] - .properties.devices.items - .properties.url.type, - parentSchema: - schema101.allOf[1].properties - .device.anyOf[3].allOf[1] - .properties.devices.items - .properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - } - } - } - } else { - const err106 = { - instancePath: - instancePath + '/device/devices/' + i11, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[1].properties.devices - .items.type, - parentSchema: - schema101.allOf[1].properties.device - .anyOf[3].allOf[1].properties.devices - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid40 = _errs162 === errors; - if (!valid40) { - break; - } - } - } else { - const err107 = { - instancePath: instancePath + '/device/devices', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema101.allOf[1].properties.device.anyOf[3] - .allOf[1].properties.devices.type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[3] - .allOf[1].properties.devices, - data: data67, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid39 = _errs160 === errors; - } else { - var valid39 = true; - } - } - } - } else { - const err108 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[1].type, - parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid33 = _errs157 === errors; - } - var _valid0 = _errs134 === errors; - valid5 = valid5 || _valid0; - } - } - } - if (!valid5) { - const err109 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema101.allOf[1].properties.device.anyOf, - parentSchema: schema101.allOf[1].properties.device, - data: data4, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - validate116.errors = vErrors; - return false; - } else { - errors = _errs16; - if (vErrors !== null) { - if (_errs16) { - vErrors.length = _errs16; - } else { - vErrors = null; - } - } - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate116.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema101.allOf[1].type, - parentSchema: schema101.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate116.errors = vErrors; - return errors === 0; -} -exports.validateDeviceChangedEventCallbackResponse = validate117; -const schema102 = { - title: 'Device Changed Event Callback', - allOf: [ - { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - eventType: { type: 'string', enum: ['device-changed'] }, - device: { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: [ - 'device', - 'group', - 'edge instantiable', - 'cloud instantiable', - ], - }, - isPublic: { - type: 'boolean', - description: - 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the user', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - }, - }, - required: ['eventType', 'device'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'DeviceChangedEventCallbackResponse', - 'x-location': '#/components/schemas/device_changed_response', - 'x-schema-type': 'response', -}; -function validate117( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate117.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema102.allOf[0].allOf[0].required, - parentSchema: schema102.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate117.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema102.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema102.allOf[0].allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate117.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema102.allOf[0].allOf[0].type, - parentSchema: schema102.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate117.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema102.allOf[0].allOf[1].required, - parentSchema: schema102.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs7 = errors; - if (typeof data1 !== 'string') { - validate117.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema102.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema102.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate117.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: - schema102.allOf[0].allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema102.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema102.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs7 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate117.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema102.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema102.allOf[0].allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate117.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema102.allOf[0].allOf[1].type, - parentSchema: schema102.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.eventType === undefined && (missing2 = 'eventType')) || - (data.device === undefined && (missing2 = 'device')) - ) { - validate117.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema102.allOf[1].required, - parentSchema: schema102.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.eventType !== undefined) { - let data3 = data.eventType; - const _errs13 = errors; - if (typeof data3 !== 'string') { - validate117.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema102.allOf[1].properties.eventType.type, - parentSchema: schema102.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - if (!(data3 === 'device-changed')) { - validate117.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/enum', - keyword: 'enum', - params: { allowedValues: schema102.allOf[1].properties.eventType.enum }, - message: 'must be equal to one of the allowed values', - schema: schema102.allOf[1].properties.eventType.enum, - parentSchema: schema102.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.device !== undefined) { - let data4 = data.device; - const _errs15 = errors; - const _errs16 = errors; - let valid5 = false; - const _errs17 = errors; - const _errs18 = errors; - if (errors === _errs18) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing3; - if ( - (data4.url === undefined && (missing3 = 'url')) || - (data4.type === undefined && (missing3 = 'type')) || - (data4.name === undefined && (missing3 = 'name')) || - (data4.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err0 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0].required, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - const err1 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.url, - data: data5, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.url.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.url, - data: data5, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid7 = _errs20 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.name !== undefined) { - let data6 = data4.name; - const _errs22 = errors; - if (typeof data6 !== 'string') { - const err3 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.name.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.name, - data: data6, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid7 = _errs22 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.description !== undefined) { - let data7 = data4.description; - const _errs24 = errors; - if (typeof data7 !== 'string') { - const err4 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.description.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.description, - data: data7, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid7 = _errs24 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.type !== undefined) { - let data8 = data4.type; - const _errs26 = errors; - if (typeof data8 !== 'string') { - const err5 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type, - data: data8, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data8 === 'device' || - data8 === 'group' || - data8 === 'edge instantiable' || - data8 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type.enum, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.type, - data: data8, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.isPublic !== undefined) { - let data9 = data4.isPublic; - const _errs28 = errors; - if (typeof data9 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.isPublic.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] - .properties.isPublic, - data: data9, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.viewer !== undefined) { - let data10 = data4.viewer; - const _errs30 = errors; - if (errors === _errs30) { - if (Array.isArray(data10)) { - var valid8 = true; - const len0 = data10.length; - for (let i0 = 0; i0 < len0; i0++) { - let data11 = data10[i0]; - const _errs32 = errors; - if (errors === _errs32) { - if ( - data11 && - typeof data11 == 'object' && - !Array.isArray(data11) - ) { - let missing4; - if ( - data11.url === undefined && - (missing4 = 'url') - ) { - const err8 = { - instancePath: - instancePath + '/device/viewer/' + i0, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + - missing4 + - "'", - schema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[0].properties.viewer - .items.required, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[0].properties.viewer - .items, - data: data11, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data11.url !== undefined) { - let data12 = data11.url; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err9 = { - instancePath: - instancePath + - '/device/viewer/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.viewer.items - .properties.url, - data: data12, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + - '/device/viewer/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.viewer.items - .properties.url.type, - parentSchema: - schema102.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.viewer.items - .properties.url, - data: data12, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: - instancePath + '/device/viewer/' + i0, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[0].properties.viewer.items - .type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[0].properties.viewer - .items, - data: data11, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid8 = _errs32 === errors; - if (!valid8) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.viewer.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.viewer, - data: data10, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid7 = _errs30 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data4.owner !== undefined) { - let data13 = data4.owner; - const _errs36 = errors; - if (errors === _errs36) { - if (Array.isArray(data13)) { - var valid10 = true; - const len1 = data13.length; - for (let i1 = 0; i1 < len1; i1++) { - let data14 = data13[i1]; - const _errs38 = errors; - if (errors === _errs38) { - if ( - data14 && - typeof data14 == 'object' && - !Array.isArray(data14) - ) { - let missing5; - if ( - data14.url === undefined && - (missing5 = 'url') - ) { - const err13 = { - instancePath: - instancePath + '/device/owner/' + i1, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + - missing5 + - "'", - schema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner - .items.required, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner - .items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data14.url !== undefined) { - let data15 = data14.url; - const _errs40 = errors; - if (errors === _errs40) { - if (errors === _errs40) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err14 = { - instancePath: - instancePath + - '/device/owner/' + - i1 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.owner.items - .properties.url, - data: data15, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + - '/device/owner/' + - i1 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema102.allOf[1].properties - .device.anyOf[0].allOf[0] - .properties.owner.items - .properties.url, - data: data15, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: - instancePath + '/device/owner/' + i1, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner - .items.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[0].properties.owner - .items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid10 = _errs38 === errors; - if (!valid10) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.owner.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0] - .allOf[0].properties.owner, - data: data13, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid7 = _errs36 === errors; - } else { - var valid7 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema102.allOf[1].properties.device.anyOf[0].allOf[0].type, - parentSchema: schema102.allOf[1].properties.device.anyOf[0].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid6 = _errs18 === errors; - if (valid6) { - const _errs42 = errors; - if (errors === _errs42) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - if (data4.type !== undefined) { - let data16 = data4.type; - const _errs44 = errors; - if ('cloud instantiable' !== data16) { - const err19 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.type, - data: data16, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid12 = _errs44 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if (data4.instantiateUrl !== undefined) { - let data17 = data4.instantiateUrl; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data17 === 'string') { - if (!formats0(data17)) { - const err20 = { - instancePath: instancePath + '/device/instantiateUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.instantiateUrl, - data: data17, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/device/instantiateUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.instantiateUrl.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.instantiateUrl, - data: data17, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid12 = _errs45 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if (data4.services !== undefined) { - let data18 = data4.services; - const _errs47 = errors; - if (errors === _errs47) { - if (Array.isArray(data18)) { - var valid13 = true; - const len2 = data18.length; - for (let i2 = 0; i2 < len2; i2++) { - let data19 = data18[i2]; - const _errs49 = errors; - if (errors === _errs49) { - if ( - data19 && - typeof data19 == 'object' && - !Array.isArray(data19) - ) { - if (data19.serviceType !== undefined) { - let data20 = data19.serviceType; - const _errs52 = errors; - if (errors === _errs52) { - if (errors === _errs52) { - if (typeof data20 === 'string') { - if (!formats0(data20)) { - const err22 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data20, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data20, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid14 = _errs52 === errors; - } else { - var valid14 = true; - } - if (valid14) { - if (data19.serviceId !== undefined) { - let data21 = data19.serviceId; - const _errs54 = errors; - if (typeof data21 !== 'string') { - const err24 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceId, - data: data21, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid14 = _errs54 === errors; - } else { - var valid14 = true; - } - if (valid14) { - if (data19.serviceDirection !== undefined) { - let data22 = data19.serviceDirection; - const _errs56 = errors; - if (typeof data22 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection, - data: data22, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data22 === 'consumer' || - data22 === 'producer' || - data22 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/device/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema102.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection - .enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection, - data: data22, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid14 = _errs56 === errors; - } else { - var valid14 = true; - } - } - } - } else { - const err27 = { - instancePath: - instancePath + '/device/services/' + i2, - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device.anyOf[0] - .allOf[1].properties.services.items.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0] - .allOf[1].properties.services.items, - data: data19, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid13 = _errs49 === errors; - if (!valid13) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/device/services', - schemaPath: - '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.services.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] - .properties.services, - data: data18, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid12 = _errs47 === errors; - } else { - var valid12 = true; - } - } - } - } else { - const err29 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema102.allOf[1].properties.device.anyOf[0].allOf[1].type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid6 = _errs42 === errors; - } - var _valid0 = _errs17 === errors; - valid5 = valid5 || _valid0; - if (!valid5) { - const _errs58 = errors; - const _errs59 = errors; - if (errors === _errs59) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing6; - if ( - (data4.url === undefined && (missing6 = 'url')) || - (data4.type === undefined && (missing6 = 'type')) || - (data4.name === undefined && (missing6 = 'name')) || - (data4.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err30 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0].required, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data4.url !== undefined) { - let data23 = data4.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err31 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.url.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid16 = _errs61 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.name !== undefined) { - let data24 = data4.name; - const _errs63 = errors; - if (typeof data24 !== 'string') { - const err33 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.name.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.name, - data: data24, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid16 = _errs63 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.description !== undefined) { - let data25 = data4.description; - const _errs65 = errors; - if (typeof data25 !== 'string') { - const err34 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.description.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.description, - data: data25, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.type !== undefined) { - let data26 = data4.type; - const _errs67 = errors; - if (typeof data26 !== 'string') { - const err35 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type, - data: data26, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data26 === 'device' || - data26 === 'group' || - data26 === 'edge instantiable' || - data26 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type.enum, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] - .properties.type, - data: data26, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid16 = _errs67 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.isPublic !== undefined) { - let data27 = data4.isPublic; - const _errs69 = errors; - if (typeof data27 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.isPublic.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.isPublic, - data: data27, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.viewer !== undefined) { - let data28 = data4.viewer; - const _errs71 = errors; - if (errors === _errs71) { - if (Array.isArray(data28)) { - var valid17 = true; - const len3 = data28.length; - for (let i3 = 0; i3 < len3; i3++) { - let data29 = data28[i3]; - const _errs73 = errors; - if (errors === _errs73) { - if ( - data29 && - typeof data29 == 'object' && - !Array.isArray(data29) - ) { - let missing7; - if ( - data29.url === undefined && - (missing7 = 'url') - ) { - const err38 = { - instancePath: - instancePath + '/device/viewer/' + i3, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + - missing7 + - "'", - schema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer - .items.required, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer - .items, - data: data29, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data29.url !== undefined) { - let data30 = data29.url; - const _errs75 = errors; - if (errors === _errs75) { - if (errors === _errs75) { - if (typeof data30 === 'string') { - if (!formats0(data30)) { - const err39 = { - instancePath: - instancePath + - '/device/viewer/' + - i3 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.viewer.items - .properties.url, - data: data30, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + - '/device/viewer/' + - i3 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.viewer.items - .properties.url.type, - parentSchema: - schema102.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.viewer.items - .properties.url, - data: data30, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: - instancePath + '/device/viewer/' + i3, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer - .items.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[0].properties.viewer - .items, - data: data29, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid17 = _errs73 === errors; - if (!valid17) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.viewer.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.viewer, - data: data28, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid16 = _errs71 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data4.owner !== undefined) { - let data31 = data4.owner; - const _errs77 = errors; - if (errors === _errs77) { - if (Array.isArray(data31)) { - var valid19 = true; - const len4 = data31.length; - for (let i4 = 0; i4 < len4; i4++) { - let data32 = data31[i4]; - const _errs79 = errors; - if (errors === _errs79) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - let missing8; - if ( - data32.url === undefined && - (missing8 = 'url') - ) { - const err43 = { - instancePath: - instancePath + '/device/owner/' + i4, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items.required, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data32.url !== undefined) { - let data33 = data32.url; - const _errs81 = errors; - if (errors === _errs81) { - if (errors === _errs81) { - if (typeof data33 === 'string') { - if (!formats0(data33)) { - const err44 = { - instancePath: - instancePath + - '/device/owner/' + - i4 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema102.allOf[1] - .properties.device - .anyOf[1].allOf[0] - .properties.owner.items - .properties.url, - data: data33, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + - '/device/owner/' + - i4 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema102.allOf[1].properties - .device.anyOf[1].allOf[0] - .properties.owner.items - .properties.url, - data: data33, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: - instancePath + '/device/owner/' + i4, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[0].properties.owner - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid19 = _errs79 === errors; - if (!valid19) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.owner.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[0].properties.owner, - data: data31, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid16 = _errs77 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema102.allOf[1].properties.device.anyOf[1].allOf[0].type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid15 = _errs59 === errors; - if (valid15) { - const _errs83 = errors; - if (errors === _errs83) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - if (data4.type !== undefined) { - let data34 = data4.type; - const _errs85 = errors; - if ('device' !== data34) { - const err49 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.type, - data: data34, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid21 = _errs85 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data4.connected !== undefined) { - let data35 = data4.connected; - const _errs86 = errors; - if (typeof data35 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/device/connected', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.connected.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.connected, - data: data35, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid21 = _errs86 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data4.announcedAvailability !== undefined) { - let data36 = data4.announcedAvailability; - const _errs88 = errors; - if (errors === _errs88) { - if (Array.isArray(data36)) { - var valid22 = true; - const len5 = data36.length; - for (let i5 = 0; i5 < len5; i5++) { - let data37 = data36[i5]; - const _errs90 = errors; - if (errors === _errs90) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.start !== undefined) { - let data38 = data37.start; - const _errs92 = errors; - if (errors === _errs92) { - if (errors === _errs92) { - if (typeof data38 === 'string') { - if (!formats22.validate(data38)) { - const err51 = { - instancePath: - instancePath + - '/device/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + - 'date-time' + - '"', - schema: 'date-time', - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.start, - data: data38, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/device/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.start.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.start, - data: data38, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid23 = _errs92 === errors; - } else { - var valid23 = true; - } - if (valid23) { - if (data37.end !== undefined) { - let data39 = data37.end; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data39 === 'string') { - if (!formats22.validate(data39)) { - const err53 = { - instancePath: - instancePath + - '/device/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + - 'date-time' + - '"', - schema: 'date-time', - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.end, - data: data39, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/device/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.end.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .announcedAvailability.items - .properties.end, - data: data39, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid23 = _errs94 === errors; - } else { - var valid23 = true; - } - } - } else { - const err55 = { - instancePath: - instancePath + - '/device/announcedAvailability/' + - i5, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.announcedAvailability - .items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid22 = _errs90 === errors; - if (!valid22) { - break; - } - } - } else { - const err56 = { - instancePath: - instancePath + '/device/announcedAvailability', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.announcedAvailability.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1] - .properties.announcedAvailability, - data: data36, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid21 = _errs88 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data4.experiment !== undefined) { - let data40 = data4.experiment; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err57 = { - instancePath: instancePath + '/device/experiment', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.experiment, - data: data40, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/device/experiment', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.experiment.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.experiment, - data: data40, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid21 = _errs96 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data4.services !== undefined) { - let data41 = data4.services; - const _errs98 = errors; - if (errors === _errs98) { - if (Array.isArray(data41)) { - var valid24 = true; - const len6 = data41.length; - for (let i6 = 0; i6 < len6; i6++) { - let data42 = data41[i6]; - const _errs100 = errors; - if (errors === _errs100) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - if (data42.serviceType !== undefined) { - let data43 = data42.serviceType; - const _errs103 = errors; - if (errors === _errs103) { - if (errors === _errs103) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err59 = { - instancePath: - instancePath + - '/device/services/' + - i6 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties - .device.anyOf[1].allOf[1] - .properties.services.items - .properties.serviceType, - data: data43, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/device/services/' + - i6 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceType.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceType, - data: data43, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid25 = _errs103 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data42.serviceId !== undefined) { - let data44 = data42.serviceId; - const _errs105 = errors; - if (typeof data44 !== 'string') { - const err61 = { - instancePath: - instancePath + - '/device/services/' + - i6 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties.serviceId - .type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceId, - data: data44, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data42.serviceDirection !== undefined) { - let data45 = data42.serviceDirection; - const _errs107 = errors; - if (typeof data45 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/device/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceDirection.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceDirection, - data: data45, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data45 === 'consumer' || - data45 === 'producer' || - data45 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/device/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema102.allOf[1].properties - .device.anyOf[1].allOf[1] - .properties.services.items - .properties.serviceDirection - .enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceDirection.enum, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties - .services.items.properties - .serviceDirection, - data: data45, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err64 = { - instancePath: - instancePath + '/device/services/' + i6, - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties.services - .items.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[1].allOf[1].properties.services - .items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid24 = _errs100 === errors; - if (!valid24) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/device/services', - schemaPath: - '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.services.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1] - .allOf[1].properties.services, - data: data41, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs98 === errors; - } else { - var valid21 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1].type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid15 = _errs83 === errors; - } - var _valid0 = _errs58 === errors; - valid5 = valid5 || _valid0; - if (!valid5) { - const _errs109 = errors; - const _errs110 = errors; - if (errors === _errs110) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing9; - if ( - (data4.url === undefined && (missing9 = 'url')) || - (data4.type === undefined && (missing9 = 'type')) || - (data4.name === undefined && (missing9 = 'name')) || - (data4.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err67 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] - .required, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data4.url !== undefined) { - let data46 = data4.url; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data46 === 'string') { - if (!formats0(data46)) { - const err68 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.url, - data: data46, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.url.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.url, - data: data46, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.name !== undefined) { - let data47 = data4.name; - const _errs114 = errors; - if (typeof data47 !== 'string') { - const err70 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.name.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.name, - data: data47, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.description !== undefined) { - let data48 = data4.description; - const _errs116 = errors; - if (typeof data48 !== 'string') { - const err71 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.description.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] - .properties.description, - data: data48, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.type !== undefined) { - let data49 = data4.type; - const _errs118 = errors; - if (typeof data49 !== 'string') { - const err72 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.type.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.type, - data: data49, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data49 === 'device' || - data49 === 'group' || - data49 === 'edge instantiable' || - data49 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.type.enum, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.type, - data: data49, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid27 = _errs118 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.isPublic !== undefined) { - let data50 = data4.isPublic; - const _errs120 = errors; - if (typeof data50 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.isPublic.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.isPublic, - data: data50, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.viewer !== undefined) { - let data51 = data4.viewer; - const _errs122 = errors; - if (errors === _errs122) { - if (Array.isArray(data51)) { - var valid28 = true; - const len7 = data51.length; - for (let i7 = 0; i7 < len7; i7++) { - let data52 = data51[i7]; - const _errs124 = errors; - if (errors === _errs124) { - if ( - data52 && - typeof data52 == 'object' && - !Array.isArray(data52) - ) { - let missing10; - if ( - data52.url === undefined && - (missing10 = 'url') - ) { - const err75 = { - instancePath: - instancePath + '/device/viewer/' + i7, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items.required, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items, - data: data52, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data52.url !== undefined) { - let data53 = data52.url; - const _errs126 = errors; - if (errors === _errs126) { - if (errors === _errs126) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err76 = { - instancePath: - instancePath + - '/device/viewer/' + - i7 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema102.allOf[1] - .properties.device - .anyOf[2].allOf[0] - .properties.viewer.items - .properties.url, - data: data53, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + - '/device/viewer/' + - i7 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.viewer.items - .properties.url.type, - parentSchema: - schema102.allOf[1].properties - .device.anyOf[2].allOf[0] - .properties.viewer.items - .properties.url, - data: data53, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: - instancePath + '/device/viewer/' + i7, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[0].properties.viewer - .items, - data: data52, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid28 = _errs124 === errors; - if (!valid28) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.viewer.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[0].properties.viewer, - data: data51, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid27 = _errs122 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data4.owner !== undefined) { - let data54 = data4.owner; - const _errs128 = errors; - if (errors === _errs128) { - if (Array.isArray(data54)) { - var valid30 = true; - const len8 = data54.length; - for (let i8 = 0; i8 < len8; i8++) { - let data55 = data54[i8]; - const _errs130 = errors; - if (errors === _errs130) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - let missing11; - if ( - data55.url === undefined && - (missing11 = 'url') - ) { - const err80 = { - instancePath: - instancePath + - '/device/owner/' + - i8, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { - missingProperty: missing11, - }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[0].properties - .owner.items.required, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[0].properties - .owner.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data55.url !== undefined) { - let data56 = data55.url; - const _errs132 = errors; - if (errors === _errs132) { - if (errors === _errs132) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err81 = { - instancePath: - instancePath + - '/device/owner/' + - i8 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema102.allOf[1] - .properties.device - .anyOf[2].allOf[0] - .properties.owner.items - .properties.url, - data: data56, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + - '/device/owner/' + - i8 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1] - .properties.device - .anyOf[2].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema102.allOf[1] - .properties.device - .anyOf[2].allOf[0] - .properties.owner.items - .properties.url, - data: data56, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: - instancePath + '/device/owner/' + i8, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[0].properties.owner - .items.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[0].properties.owner - .items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid30 = _errs130 === errors; - if (!valid30) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[0].properties.owner.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[0].properties.owner, - data: data54, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid27 = _errs128 === errors; - } else { - var valid27 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0].type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid26 = _errs110 === errors; - if (valid26) { - const _errs134 = errors; - if (errors === _errs134) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - if (data4.type !== undefined) { - let data57 = data4.type; - const _errs136 = errors; - if ('edge instantiable' !== data57) { - const err86 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[1] - .properties.type, - data: data57, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid32 = _errs136 === errors; - } else { - var valid32 = true; - } - if (valid32) { - if (data4.codeUrl !== undefined) { - let data58 = data4.codeUrl; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data58 === 'string') { - if (!formats0(data58)) { - const err87 = { - instancePath: instancePath + '/device/codeUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.codeUrl, - data: data58, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/device/codeUrl', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.codeUrl.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.codeUrl, - data: data58, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid32 = _errs137 === errors; - } else { - var valid32 = true; - } - if (valid32) { - if (data4.services !== undefined) { - let data59 = data4.services; - const _errs139 = errors; - if (errors === _errs139) { - if (Array.isArray(data59)) { - var valid33 = true; - const len9 = data59.length; - for (let i9 = 0; i9 < len9; i9++) { - let data60 = data59[i9]; - const _errs141 = errors; - if (errors === _errs141) { - if ( - data60 && - typeof data60 == 'object' && - !Array.isArray(data60) - ) { - if (data60.serviceType !== undefined) { - let data61 = data60.serviceType; - const _errs144 = errors; - if (errors === _errs144) { - if (errors === _errs144) { - if (typeof data61 === 'string') { - if (!formats0(data61)) { - const err89 = { - instancePath: - instancePath + - '/device/services/' + - i9 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceType, - data: data61, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + - '/device/services/' + - i9 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceType.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceType, - data: data61, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data60.serviceId !== undefined) { - let data62 = data60.serviceId; - const _errs146 = errors; - if (typeof data62 !== 'string') { - const err91 = { - instancePath: - instancePath + - '/device/services/' + - i9 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data62, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid34 = _errs146 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data60.serviceDirection !== undefined) { - let data63 = data60.serviceDirection; - const _errs148 = errors; - if (typeof data63 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/device/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection, - data: data63, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data63 === 'consumer' || - data63 === 'producer' || - data63 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/device/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema102.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection.enum, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[2].allOf[1].properties - .services.items.properties - .serviceDirection, - data: data63, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid34 = _errs148 === errors; - } else { - var valid34 = true; - } - } - } - } else { - const err94 = { - instancePath: - instancePath + '/device/services/' + i9, - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services.items.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services.items, - data: data60, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid33 = _errs141 === errors; - if (!valid33) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/device/services', - schemaPath: - '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2] - .allOf[1].properties.services, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid32 = _errs139 === errors; - } else { - var valid32 = true; - } - } - } - } else { - const err96 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[1].type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid26 = _errs134 === errors; - } - var _valid0 = _errs109 === errors; - valid5 = valid5 || _valid0; - if (!valid5) { - const _errs150 = errors; - const _errs151 = errors; - if (errors === _errs151) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing12; - if ( - (data4.url === undefined && (missing12 = 'url')) || - (data4.type === undefined && (missing12 = 'type')) || - (data4.name === undefined && (missing12 = 'name')) || - (data4.isPublic === undefined && (missing12 = 'isPublic')) - ) { - const err97 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0] - .required, - parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data4.url !== undefined) { - let data64 = data4.url; - const _errs153 = errors; - if (errors === _errs153) { - if (errors === _errs153) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err98 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/device/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.url.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid36 = _errs153 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.name !== undefined) { - let data65 = data4.name; - const _errs155 = errors; - if (typeof data65 !== 'string') { - const err100 = { - instancePath: instancePath + '/device/name', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0] - .properties.name.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0] - .properties.name, - data: data65, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid36 = _errs155 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.description !== undefined) { - let data66 = data4.description; - const _errs157 = errors; - if (typeof data66 !== 'string') { - const err101 = { - instancePath: instancePath + '/device/description', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.description.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.description, - data: data66, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid36 = _errs157 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.type !== undefined) { - let data67 = data4.type; - const _errs159 = errors; - if (typeof data67 !== 'string') { - const err102 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type, - data: data67, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data67 === 'device' || - data67 === 'group' || - data67 === 'edge instantiable' || - data67 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type.enum, - parentSchema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.type, - data: data67, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid36 = _errs159 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.isPublic !== undefined) { - let data68 = data4.isPublic; - const _errs161 = errors; - if (typeof data68 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/device/isPublic', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.isPublic.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[0].properties.isPublic, - data: data68, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.viewer !== undefined) { - let data69 = data4.viewer; - const _errs163 = errors; - if (errors === _errs163) { - if (Array.isArray(data69)) { - var valid37 = true; - const len10 = data69.length; - for (let i10 = 0; i10 < len10; i10++) { - let data70 = data69[i10]; - const _errs165 = errors; - if (errors === _errs165) { - if ( - data70 && - typeof data70 == 'object' && - !Array.isArray(data70) - ) { - let missing13; - if ( - data70.url === undefined && - (missing13 = 'url') - ) { - const err105 = { - instancePath: - instancePath + - '/device/viewer/' + - i10, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { - missingProperty: missing13, - }, - message: - "must have required property '" + - missing13 + - "'", - schema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[0].properties - .viewer.items.required, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[0].properties - .viewer.items, - data: data70, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data70.url !== undefined) { - let data71 = data70.url; - const _errs167 = errors; - if (errors === _errs167) { - if (errors === _errs167) { - if (typeof data71 === 'string') { - if (!formats0(data71)) { - const err106 = { - instancePath: - instancePath + - '/device/viewer/' + - i10 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema102.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.viewer.items - .properties.url, - data: data71, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/device/viewer/' + - i10 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.viewer.items - .properties.url.type, - parentSchema: - schema102.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.viewer.items - .properties.url, - data: data71, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: - instancePath + - '/device/viewer/' + - i10, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[0].properties.viewer - .items.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[0].properties.viewer - .items, - data: data70, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid37 = _errs165 === errors; - if (!valid37) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/device/viewer', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[0].properties.viewer.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[0].properties.viewer, - data: data69, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid36 = _errs163 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data4.owner !== undefined) { - let data72 = data4.owner; - const _errs169 = errors; - if (errors === _errs169) { - if (Array.isArray(data72)) { - var valid39 = true; - const len11 = data72.length; - for (let i11 = 0; i11 < len11; i11++) { - let data73 = data72[i11]; - const _errs171 = errors; - if (errors === _errs171) { - if ( - data73 && - typeof data73 == 'object' && - !Array.isArray(data73) - ) { - let missing14; - if ( - data73.url === undefined && - (missing14 = 'url') - ) { - const err110 = { - instancePath: - instancePath + - '/device/owner/' + - i11, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { - missingProperty: missing14, - }, - message: - "must have required property '" + - missing14 + - "'", - schema: - schema102.allOf[1].properties - .device.anyOf[3].allOf[0] - .properties.owner.items - .required, - parentSchema: - schema102.allOf[1].properties - .device.anyOf[3].allOf[0] - .properties.owner.items, - data: data73, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data73.url !== undefined) { - let data74 = data73.url; - const _errs173 = errors; - if (errors === _errs173) { - if (errors === _errs173) { - if ( - typeof data74 === 'string' - ) { - if (!formats0(data74)) { - const err111 = { - instancePath: - instancePath + - '/device/owner/' + - i11 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema102.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.owner - .items.properties.url, - data: data74, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/device/owner/' + - i11 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.owner.items - .properties.url.type, - parentSchema: - schema102.allOf[1] - .properties.device - .anyOf[3].allOf[0] - .properties.owner.items - .properties.url, - data: data74, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: - instancePath + - '/device/owner/' + - i11, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[0].properties - .owner.items.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[0].properties - .owner.items, - data: data73, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid39 = _errs171 === errors; - if (!valid39) { - break; - } - } - } else { - const err114 = { - instancePath: - instancePath + '/device/owner', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[0].properties.owner - .type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[0].properties.owner, - data: data72, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid36 = _errs169 === errors; - } else { - var valid36 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0].type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0], - data: data4, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid35 = _errs151 === errors; - if (valid35) { - const _errs175 = errors; - if (errors === _errs175) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing15; - if (data4.devices === undefined && (missing15 = 'devices')) { - const err116 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing15 }, - message: "must have required property '" + missing15 + "'", - schema: - schema102.allOf[1].properties.device.anyOf[3].allOf[1] - .required, - parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data4.type !== undefined) { - let data75 = data4.type; - const _errs177 = errors; - if ('group' !== data75) { - const err117 = { - instancePath: instancePath + '/device/type', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[1] - .properties.type, - data: data75, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid41 = _errs177 === errors; - } else { - var valid41 = true; - } - if (valid41) { - if (data4.devices !== undefined) { - let data76 = data4.devices; - const _errs178 = errors; - if (errors === _errs178) { - if (Array.isArray(data76)) { - var valid42 = true; - const len12 = data76.length; - for (let i12 = 0; i12 < len12; i12++) { - let data77 = data76[i12]; - const _errs180 = errors; - if (errors === _errs180) { - if ( - data77 && - typeof data77 == 'object' && - !Array.isArray(data77) - ) { - let missing16; - if ( - data77.url === undefined && - (missing16 = 'url') - ) { - const err118 = { - instancePath: - instancePath + '/device/devices/' + i12, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing16 }, - message: - "must have required property '" + - missing16 + - "'", - schema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[1].properties.devices - .items.required, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[1].properties.devices - .items, - data: data77, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data77.url !== undefined) { - let data78 = data77.url; - const _errs182 = errors; - if (errors === _errs182) { - if (errors === _errs182) { - if (typeof data78 === 'string') { - if (!formats0(data78)) { - const err119 = { - instancePath: - instancePath + - '/device/devices/' + - i12 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema102.allOf[1].properties - .device.anyOf[3].allOf[1] - .properties.devices.items - .properties.url, - data: data78, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + - '/device/devices/' + - i12 + - '/url', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema102.allOf[1].properties - .device.anyOf[3].allOf[1] - .properties.devices.items - .properties.url.type, - parentSchema: - schema102.allOf[1].properties - .device.anyOf[3].allOf[1] - .properties.devices.items - .properties.url, - data: data78, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: - instancePath + '/device/devices/' + i12, - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[1].properties.devices - .items.type, - parentSchema: - schema102.allOf[1].properties.device - .anyOf[3].allOf[1].properties.devices - .items, - data: data77, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid42 = _errs180 === errors; - if (!valid42) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/device/devices', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[1].properties.devices.type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[3] - .allOf[1].properties.devices, - data: data76, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid41 = _errs178 === errors; - } else { - var valid41 = true; - } - } - } - } else { - const err123 = { - instancePath: instancePath + '/device', - schemaPath: - '#/allOf/1/properties/device/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema102.allOf[1].properties.device.anyOf[3].allOf[1].type, - parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[1], - data: data4, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid35 = _errs175 === errors; - } - var _valid0 = _errs150 === errors; - valid5 = valid5 || _valid0; - } - } - } - if (!valid5) { - const err124 = { - instancePath: instancePath + '/device', - schemaPath: '#/allOf/1/properties/device/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema102.allOf[1].properties.device.anyOf, - parentSchema: schema102.allOf[1].properties.device, - data: data4, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate117.errors = vErrors; - return false; - } else { - errors = _errs16; - if (vErrors !== null) { - if (_errs16) { - vErrors.length = _errs16; - } else { - vErrors = null; - } - } - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate117.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema102.allOf[1].type, - parentSchema: schema102.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate117.errors = vErrors; - return errors === 0; -} -exports.validateDeviceOverviewUpdateRequest = validate118; -const schema103 = { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - 'x-standalone': true, - 'x-name': 'DeviceOverviewUpdateRequest', - 'x-location': '#/components/schemas/device_overview_update_request', - 'x-schema-type': 'request', -}; -function validate118( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate118.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema103.required, - parentSchema: schema103, - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs1 = errors; - if (typeof data0 !== 'string') { - validate118.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema103.properties.name.type, - parentSchema: schema103.properties.name, - data: data0, - }, - ]; - return false; - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs3 = errors; - if (typeof data1 !== 'string') { - validate118.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema103.properties.description.type, - parentSchema: schema103.properties.description, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs5 = errors; - if (typeof data2 !== 'string') { - validate118.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema103.properties.type.type, - parentSchema: schema103.properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate118.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema103.properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema103.properties.type.enum, - parentSchema: schema103.properties.type, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs5 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs7 = errors; - if (typeof data3 !== 'boolean') { - validate118.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema103.properties.isPublic.type, - parentSchema: schema103.properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid0 = _errs7 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs9 = errors; - if (errors === _errs9) { - if (Array.isArray(data4)) { - var valid1 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs11 = errors; - if (errors === _errs11) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate118.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: schema103.properties.viewer.items.required, - parentSchema: schema103.properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs13 = errors; - if (errors === _errs13) { - if (errors === _errs13) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate118.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema103.properties.viewer.items.properties - .url, - data: data6, - }, - ]; - return false; - } - } else { - validate118.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema103.properties.viewer.items.properties - .url.type, - parentSchema: - schema103.properties.viewer.items.properties - .url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate118.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema103.properties.viewer.items.type, - parentSchema: schema103.properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs11 === errors; - if (!valid1) { - break; - } - } - } else { - validate118.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema103.properties.viewer.type, - parentSchema: schema103.properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid0 = _errs9 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs15 = errors; - if (errors === _errs15) { - if (Array.isArray(data7)) { - var valid3 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs17 = errors; - if (errors === _errs17) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate118.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: schema103.properties.owner.items.required, - parentSchema: schema103.properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate118.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema103.properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate118.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema103.properties.owner.items.properties - .url.type, - parentSchema: - schema103.properties.owner.items.properties - .url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate118.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema103.properties.owner.items.type, - parentSchema: schema103.properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid3 = _errs17 === errors; - if (!valid3) { - break; - } - } - } else { - validate118.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema103.properties.owner.type, - parentSchema: schema103.properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid0 = _errs15 === errors; - } else { - var valid0 = true; - } - } - } - } - } - } - } - } else { - validate118.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema103.type, - parentSchema: schema103, - data, - }, - ]; - return false; - } - } - validate118.errors = vErrors; - return errors === 0; -} -exports.validateDeviceOverviewUpdateResponse = validate119; -const schema104 = { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - 'x-standalone': true, - 'x-name': 'DeviceOverviewUpdateResponse', - 'x-location': '#/components/schemas/device_overview_update_response', - 'x-schema-type': 'response', -}; -function validate119( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate119.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema104.required, - parentSchema: schema104, - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs1 = errors; - if (typeof data0 !== 'string') { - validate119.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema104.properties.name.type, - parentSchema: schema104.properties.name, - data: data0, - }, - ]; - return false; - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs3 = errors; - if (typeof data1 !== 'string') { - validate119.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema104.properties.description.type, - parentSchema: schema104.properties.description, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs5 = errors; - if (typeof data2 !== 'string') { - validate119.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema104.properties.type.type, - parentSchema: schema104.properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate119.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema104.properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema104.properties.type.enum, - parentSchema: schema104.properties.type, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs5 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs7 = errors; - if (typeof data3 !== 'boolean') { - validate119.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema104.properties.isPublic.type, - parentSchema: schema104.properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid0 = _errs7 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs9 = errors; - if (errors === _errs9) { - if (Array.isArray(data4)) { - var valid1 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs11 = errors; - if (errors === _errs11) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate119.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: schema104.properties.viewer.items.required, - parentSchema: schema104.properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs13 = errors; - if (errors === _errs13) { - if (errors === _errs13) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate119.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema104.properties.viewer.items.properties - .url, - data: data6, - }, - ]; - return false; - } - } else { - validate119.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema104.properties.viewer.items.properties - .url.type, - parentSchema: - schema104.properties.viewer.items.properties - .url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate119.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema104.properties.viewer.items.type, - parentSchema: schema104.properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs11 === errors; - if (!valid1) { - break; - } - } - } else { - validate119.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema104.properties.viewer.type, - parentSchema: schema104.properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid0 = _errs9 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs15 = errors; - if (errors === _errs15) { - if (Array.isArray(data7)) { - var valid3 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs17 = errors; - if (errors === _errs17) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate119.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: schema104.properties.owner.items.required, - parentSchema: schema104.properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate119.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema104.properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate119.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema104.properties.owner.items.properties - .url.type, - parentSchema: - schema104.properties.owner.items.properties - .url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate119.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema104.properties.owner.items.type, - parentSchema: schema104.properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid3 = _errs17 === errors; - if (!valid3) { - break; - } - } - } else { - validate119.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema104.properties.owner.type, - parentSchema: schema104.properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid0 = _errs15 === errors; - } else { - var valid0 = true; - } - } - } - } - } - } - } - } else { - validate119.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema104.type, - parentSchema: schema104, - data, - }, - ]; - return false; - } - } - validate119.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableCloudDeviceUpdateRequest = validate120; -const schema105 = { - title: 'Instantiable Cloud Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'InstantiableCloudDeviceUpdateRequest', - 'x-location': '#/components/schemas/device_cloud_instantiable_update_request', - 'x-schema-type': 'request', -}; -function validate120( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate120.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema105.allOf[0].required, - parentSchema: schema105.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate120.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema105.allOf[0].properties.name.type, - parentSchema: schema105.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate120.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema105.allOf[0].properties.description.type, - parentSchema: schema105.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate120.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema105.allOf[0].properties.type.type, - parentSchema: schema105.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate120.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema105.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema105.allOf[0].properties.type.enum, - parentSchema: schema105.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate120.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema105.allOf[0].properties.isPublic.type, - parentSchema: schema105.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate120.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema105.allOf[0].properties.viewer.items.required, - parentSchema: - schema105.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate120.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema105.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate120.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema105.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema105.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate120.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema105.allOf[0].properties.viewer.items.type, - parentSchema: schema105.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate120.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema105.allOf[0].properties.viewer.type, - parentSchema: schema105.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate120.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema105.allOf[0].properties.owner.items.required, - parentSchema: - schema105.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate120.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema105.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate120.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema105.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema105.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate120.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema105.allOf[0].properties.owner.items.type, - parentSchema: schema105.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate120.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema105.allOf[0].properties.owner.type, - parentSchema: schema105.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate120.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema105.allOf[0].type, - parentSchema: schema105.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('cloud instantiable' !== data10) { - validate120.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema105.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate120.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema105.allOf[1].properties.instantiateUrl, - data: data11, - }, - ]; - return false; - } - } else { - validate120.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema105.allOf[1].properties.instantiateUrl.type, - parentSchema: schema105.allOf[1].properties.instantiateUrl, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate120.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema105.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate120.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema105.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema105.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate120.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema105.allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema105.allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate120.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema105.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema105.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate120.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema105.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema105.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema105.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate120.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema105.allOf[1].properties.services.items.type, - parentSchema: schema105.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate120.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema105.allOf[1].properties.services.type, - parentSchema: schema105.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate120.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema105.allOf[1].type, - parentSchema: schema105.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate120.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableCloudDeviceUpdateResponse = validate121; -const schema106 = { - title: 'Instantiable Cloud Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'InstantiableCloudDeviceUpdateResponse', - 'x-location': '#/components/schemas/device_cloud_instantiable_update_response', - 'x-schema-type': 'response', -}; -function validate121( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate121.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema106.allOf[0].required, - parentSchema: schema106.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate121.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema106.allOf[0].properties.name.type, - parentSchema: schema106.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate121.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema106.allOf[0].properties.description.type, - parentSchema: schema106.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate121.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema106.allOf[0].properties.type.type, - parentSchema: schema106.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate121.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema106.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema106.allOf[0].properties.type.enum, - parentSchema: schema106.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate121.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema106.allOf[0].properties.isPublic.type, - parentSchema: schema106.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate121.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema106.allOf[0].properties.viewer.items.required, - parentSchema: - schema106.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate121.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema106.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate121.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema106.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema106.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate121.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema106.allOf[0].properties.viewer.items.type, - parentSchema: schema106.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate121.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema106.allOf[0].properties.viewer.type, - parentSchema: schema106.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate121.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema106.allOf[0].properties.owner.items.required, - parentSchema: - schema106.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate121.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema106.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate121.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema106.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema106.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate121.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema106.allOf[0].properties.owner.items.type, - parentSchema: schema106.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate121.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema106.allOf[0].properties.owner.type, - parentSchema: schema106.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate121.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema106.allOf[0].type, - parentSchema: schema106.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('cloud instantiable' !== data10) { - validate121.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema106.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate121.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema106.allOf[1].properties.instantiateUrl, - data: data11, - }, - ]; - return false; - } - } else { - validate121.errors = [ - { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema106.allOf[1].properties.instantiateUrl.type, - parentSchema: schema106.allOf[1].properties.instantiateUrl, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate121.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema106.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate121.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema106.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema106.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate121.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema106.allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema106.allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate121.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema106.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema106.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate121.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema106.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema106.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema106.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate121.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema106.allOf[1].properties.services.items.type, - parentSchema: schema106.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate121.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema106.allOf[1].properties.services.type, - parentSchema: schema106.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate121.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema106.allOf[1].type, - parentSchema: schema106.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate121.errors = vErrors; - return errors === 0; -} -exports.validateConcreteDeviceUpdateRequest = validate122; -const schema107 = { - title: 'Concrete Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'ConcreteDeviceUpdateRequest', - 'x-location': '#/components/schemas/device_concrete_update_request', - 'x-schema-type': 'request', -}; -function validate122( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate122.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema107.allOf[0].required, - parentSchema: schema107.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate122.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema107.allOf[0].properties.name.type, - parentSchema: schema107.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate122.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema107.allOf[0].properties.description.type, - parentSchema: schema107.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate122.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema107.allOf[0].properties.type.type, - parentSchema: schema107.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate122.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema107.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema107.allOf[0].properties.type.enum, - parentSchema: schema107.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate122.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema107.allOf[0].properties.isPublic.type, - parentSchema: schema107.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate122.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema107.allOf[0].properties.viewer.items.required, - parentSchema: - schema107.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate122.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema107.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate122.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema107.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema107.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate122.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema107.allOf[0].properties.viewer.items.type, - parentSchema: schema107.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate122.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema107.allOf[0].properties.viewer.type, - parentSchema: schema107.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate122.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema107.allOf[0].properties.owner.items.required, - parentSchema: - schema107.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate122.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema107.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate122.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema107.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema107.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate122.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema107.allOf[0].properties.owner.items.type, - parentSchema: schema107.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate122.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema107.allOf[0].properties.owner.type, - parentSchema: schema107.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate122.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema107.allOf[0].type, - parentSchema: schema107.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('device' !== data10) { - validate122.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema107.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.experiment !== undefined) { - let data11 = data.experiment; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate122.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema107.allOf[1].properties.experiment, - data: data11, - }, - ]; - return false; - } - } else { - validate122.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema107.allOf[1].properties.experiment.type, - parentSchema: schema107.allOf[1].properties.experiment, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate122.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema107.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate122.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema107.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema107.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate122.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema107.allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema107.allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate122.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema107.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema107.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate122.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema107.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema107.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema107.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate122.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema107.allOf[1].properties.services.items.type, - parentSchema: schema107.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate122.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema107.allOf[1].properties.services.type, - parentSchema: schema107.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate122.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema107.allOf[1].type, - parentSchema: schema107.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate122.errors = vErrors; - return errors === 0; -} -exports.validateConcreteDeviceUpdateResponse = validate123; -const schema108 = { - title: 'Concrete Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'ConcreteDeviceUpdateResponse', - 'x-location': '#/components/schemas/device_concrete_update_response', - 'x-schema-type': 'response', -}; -function validate123( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate123.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema108.allOf[0].required, - parentSchema: schema108.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate123.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema108.allOf[0].properties.name.type, - parentSchema: schema108.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate123.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema108.allOf[0].properties.description.type, - parentSchema: schema108.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate123.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema108.allOf[0].properties.type.type, - parentSchema: schema108.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate123.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema108.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema108.allOf[0].properties.type.enum, - parentSchema: schema108.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate123.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema108.allOf[0].properties.isPublic.type, - parentSchema: schema108.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate123.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema108.allOf[0].properties.viewer.items.required, - parentSchema: - schema108.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate123.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema108.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate123.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema108.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema108.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate123.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema108.allOf[0].properties.viewer.items.type, - parentSchema: schema108.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate123.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema108.allOf[0].properties.viewer.type, - parentSchema: schema108.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate123.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema108.allOf[0].properties.owner.items.required, - parentSchema: - schema108.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate123.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema108.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate123.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema108.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema108.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate123.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema108.allOf[0].properties.owner.items.type, - parentSchema: schema108.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate123.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema108.allOf[0].properties.owner.type, - parentSchema: schema108.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate123.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema108.allOf[0].type, - parentSchema: schema108.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('device' !== data10) { - validate123.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema108.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.experiment !== undefined) { - let data11 = data.experiment; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate123.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema108.allOf[1].properties.experiment, - data: data11, - }, - ]; - return false; - } - } else { - validate123.errors = [ - { - instancePath: instancePath + '/experiment', - schemaPath: '#/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema108.allOf[1].properties.experiment.type, - parentSchema: schema108.allOf[1].properties.experiment, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate123.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema108.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate123.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema108.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema108.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate123.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema108.allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema108.allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate123.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema108.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema108.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate123.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema108.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema108.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema108.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate123.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema108.allOf[1].properties.services.items.type, - parentSchema: schema108.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate123.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema108.allOf[1].properties.services.type, - parentSchema: schema108.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate123.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema108.allOf[1].type, - parentSchema: schema108.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate123.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableBrowserDeviceUpdateRequest = validate124; -const schema109 = { - title: 'Instantiable Browser Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'InstantiableBrowserDeviceUpdateRequest', - 'x-location': '#/components/schemas/device_edge_instantiable_update_request', - 'x-schema-type': 'request', -}; -function validate124( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate124.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema109.allOf[0].required, - parentSchema: schema109.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate124.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema109.allOf[0].properties.name.type, - parentSchema: schema109.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate124.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema109.allOf[0].properties.description.type, - parentSchema: schema109.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate124.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema109.allOf[0].properties.type.type, - parentSchema: schema109.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate124.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema109.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema109.allOf[0].properties.type.enum, - parentSchema: schema109.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate124.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema109.allOf[0].properties.isPublic.type, - parentSchema: schema109.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate124.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema109.allOf[0].properties.viewer.items.required, - parentSchema: - schema109.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate124.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema109.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate124.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema109.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema109.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate124.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema109.allOf[0].properties.viewer.items.type, - parentSchema: schema109.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate124.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema109.allOf[0].properties.viewer.type, - parentSchema: schema109.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate124.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema109.allOf[0].properties.owner.items.required, - parentSchema: - schema109.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate124.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema109.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate124.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema109.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema109.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate124.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema109.allOf[0].properties.owner.items.type, - parentSchema: schema109.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate124.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema109.allOf[0].properties.owner.type, - parentSchema: schema109.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate124.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema109.allOf[0].type, - parentSchema: schema109.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('edge instantiable' !== data10) { - validate124.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema109.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.codeUrl !== undefined) { - let data11 = data.codeUrl; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate124.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema109.allOf[1].properties.codeUrl, - data: data11, - }, - ]; - return false; - } - } else { - validate124.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema109.allOf[1].properties.codeUrl.type, - parentSchema: schema109.allOf[1].properties.codeUrl, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate124.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema109.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate124.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema109.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema109.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate124.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema109.allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema109.allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate124.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema109.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema109.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate124.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema109.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema109.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema109.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate124.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema109.allOf[1].properties.services.items.type, - parentSchema: schema109.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate124.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema109.allOf[1].properties.services.type, - parentSchema: schema109.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate124.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema109.allOf[1].type, - parentSchema: schema109.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate124.errors = vErrors; - return errors === 0; -} -exports.validateInstantiableBrowserDeviceUpdateResponse = validate125; -const schema110 = { - title: 'Instantiable Browser Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'InstantiableBrowserDeviceUpdateResponse', - 'x-location': '#/components/schemas/device_edge_instantiable_update_response', - 'x-schema-type': 'response', -}; -function validate125( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate125.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema110.allOf[0].required, - parentSchema: schema110.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate125.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema110.allOf[0].properties.name.type, - parentSchema: schema110.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate125.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema110.allOf[0].properties.description.type, - parentSchema: schema110.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate125.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema110.allOf[0].properties.type.type, - parentSchema: schema110.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate125.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema110.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema110.allOf[0].properties.type.enum, - parentSchema: schema110.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate125.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema110.allOf[0].properties.isPublic.type, - parentSchema: schema110.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate125.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema110.allOf[0].properties.viewer.items.required, - parentSchema: - schema110.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate125.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema110.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate125.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema110.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema110.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate125.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema110.allOf[0].properties.viewer.items.type, - parentSchema: schema110.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate125.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema110.allOf[0].properties.viewer.type, - parentSchema: schema110.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate125.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema110.allOf[0].properties.owner.items.required, - parentSchema: - schema110.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate125.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema110.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate125.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema110.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema110.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate125.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema110.allOf[0].properties.owner.items.type, - parentSchema: schema110.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate125.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema110.allOf[0].properties.owner.type, - parentSchema: schema110.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate125.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema110.allOf[0].type, - parentSchema: schema110.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('edge instantiable' !== data10) { - validate125.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema110.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.codeUrl !== undefined) { - let data11 = data.codeUrl; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate125.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema110.allOf[1].properties.codeUrl, - data: data11, - }, - ]; - return false; - } - } else { - validate125.errors = [ - { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema110.allOf[1].properties.codeUrl.type, - parentSchema: schema110.allOf[1].properties.codeUrl, - data: data11, - }, - ]; - return false; - } - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs27 = errors; - if (errors === _errs27) { - if (Array.isArray(data12)) { - var valid7 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs29 = errors; - if (errors === _errs29) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs32 = errors; - if (errors === _errs32) { - if (errors === _errs32) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - validate125.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema110.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate125.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema110.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema110.allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid8 = _errs32 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs34 = errors; - if (typeof data15 !== 'string') { - validate125.errors = [ - { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema110.allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema110.allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }, - ]; - return false; - } - var valid8 = _errs34 === errors; - } else { - var valid8 = true; - } - if (valid8) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate125.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema110.allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema110.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - validate125.errors = [ - { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema110.allOf[1].properties.services.items - .properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema110.allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema110.allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }, - ]; - return false; - } - var valid8 = _errs36 === errors; - } else { - var valid8 = true; - } - } - } - } else { - validate125.errors = [ - { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema110.allOf[1].properties.services.items.type, - parentSchema: schema110.allOf[1].properties.services.items, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - if (!valid7) { - break; - } - } - } else { - validate125.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema110.allOf[1].properties.services.type, - parentSchema: schema110.allOf[1].properties.services, - data: data12, - }, - ]; - return false; - } - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } else { - validate125.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema110.allOf[1].type, - parentSchema: schema110.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate125.errors = vErrors; - return errors === 0; -} -exports.validateDeviceGroupUpdateRequest = validate126; -const schema111 = { - title: 'Device Group Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'DeviceGroupUpdateRequest', - 'x-location': '#/components/schemas/device_group_update_request', - 'x-schema-type': 'request', -}; -function validate126( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate126.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema111.allOf[0].required, - parentSchema: schema111.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate126.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema111.allOf[0].properties.name.type, - parentSchema: schema111.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate126.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema111.allOf[0].properties.description.type, - parentSchema: schema111.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate126.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema111.allOf[0].properties.type.type, - parentSchema: schema111.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate126.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema111.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema111.allOf[0].properties.type.enum, - parentSchema: schema111.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate126.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema111.allOf[0].properties.isPublic.type, - parentSchema: schema111.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate126.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema111.allOf[0].properties.viewer.items.required, - parentSchema: - schema111.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate126.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema111.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate126.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema111.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema111.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate126.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema111.allOf[0].properties.viewer.items.type, - parentSchema: schema111.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate126.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema111.allOf[0].properties.viewer.type, - parentSchema: schema111.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate126.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema111.allOf[0].properties.owner.items.required, - parentSchema: - schema111.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate126.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema111.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate126.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema111.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema111.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate126.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema111.allOf[0].properties.owner.items.type, - parentSchema: schema111.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate126.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema111.allOf[0].properties.owner.type, - parentSchema: schema111.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate126.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema111.allOf[0].type, - parentSchema: schema111.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('group' !== data10) { - validate126.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema111.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.devices !== undefined) { - let data11 = data.devices; - const _errs25 = errors; - if (errors === _errs25) { - if (Array.isArray(data11)) { - var valid7 = true; - const len2 = data11.length; - for (let i2 = 0; i2 < len2; i2++) { - let data12 = data11[i2]; - const _errs27 = errors; - if (errors === _errs27) { - if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { - let missing3; - if (data12.url === undefined && (missing3 = 'url')) { - validate126.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema111.allOf[1].properties.devices.items.required, - parentSchema: schema111.allOf[1].properties.devices.items, - data: data12, - }, - ]; - return false; - } else { - if (data12.url !== undefined) { - let data13 = data12.url; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data13 === 'string') { - if (!formats0(data13)) { - validate126.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema111.allOf[1].properties.devices.items - .properties.url, - data: data13, - }, - ]; - return false; - } - } else { - validate126.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema111.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema111.allOf[1].properties.devices.items - .properties.url, - data: data13, - }, - ]; - return false; - } - } - } - } - } - } else { - validate126.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema111.allOf[1].properties.devices.items.type, - parentSchema: schema111.allOf[1].properties.devices.items, - data: data12, - }, - ]; - return false; - } - } - var valid7 = _errs27 === errors; - if (!valid7) { - break; - } - } - } else { - validate126.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema111.allOf[1].properties.devices.type, - parentSchema: schema111.allOf[1].properties.devices, - data: data11, - }, - ]; - return false; - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - } - } else { - validate126.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema111.allOf[1].type, - parentSchema: schema111.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate126.errors = vErrors; - return errors === 0; -} -exports.validateDeviceGroupUpdateResponse = validate127; -const schema112 = { - title: 'Device Group Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'DeviceGroupUpdateResponse', - 'x-location': '#/components/schemas/device_group_update_response', - 'x-schema-type': 'response', -}; -function validate127( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate127.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema112.allOf[0].required, - parentSchema: schema112.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs2 = errors; - if (typeof data0 !== 'string') { - validate127.errors = [ - { - instancePath: instancePath + '/name', - schemaPath: '#/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema112.allOf[0].properties.name.type, - parentSchema: schema112.allOf[0].properties.name, - data: data0, - }, - ]; - return false; - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate127.errors = [ - { - instancePath: instancePath + '/description', - schemaPath: '#/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema112.allOf[0].properties.description.type, - parentSchema: schema112.allOf[0].properties.description, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate127.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema112.allOf[0].properties.type.type, - parentSchema: schema112.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - validate127.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema112.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema112.allOf[0].properties.type.enum, - parentSchema: schema112.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs8 = errors; - if (typeof data3 !== 'boolean') { - validate127.errors = [ - { - instancePath: instancePath + '/isPublic', - schemaPath: '#/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema112.allOf[0].properties.isPublic.type, - parentSchema: schema112.allOf[0].properties.isPublic, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs8 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data4)) { - var valid2 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - validate127.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema112.allOf[0].properties.viewer.items.required, - parentSchema: - schema112.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate127.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema112.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate127.errors = [ - { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema112.allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema112.allOf[0].properties.viewer.items - .properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate127.errors = [ - { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: '#/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema112.allOf[0].properties.viewer.items.type, - parentSchema: schema112.allOf[0].properties.viewer.items, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - if (!valid2) { - break; - } - } - } else { - validate127.errors = [ - { - instancePath: instancePath + '/viewer', - schemaPath: '#/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema112.allOf[0].properties.viewer.type, - parentSchema: schema112.allOf[0].properties.viewer, - data: data4, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs16 = errors; - if (errors === _errs16) { - if (Array.isArray(data7)) { - var valid4 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs18 = errors; - if (errors === _errs18) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - validate127.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema112.allOf[0].properties.owner.items.required, - parentSchema: - schema112.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs20 = errors; - if (errors === _errs20) { - if (errors === _errs20) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate127.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema112.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } else { - validate127.errors = [ - { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema112.allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema112.allOf[0].properties.owner.items - .properties.url, - data: data9, - }, - ]; - return false; - } - } - } - } - } - } else { - validate127.errors = [ - { - instancePath: instancePath + '/owner/' + i1, - schemaPath: '#/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema112.allOf[0].properties.owner.items.type, - parentSchema: schema112.allOf[0].properties.owner.items, - data: data8, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - if (!valid4) { - break; - } - } - } else { - validate127.errors = [ - { - instancePath: instancePath + '/owner', - schemaPath: '#/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema112.allOf[0].properties.owner.type, - parentSchema: schema112.allOf[0].properties.owner, - data: data7, - }, - ]; - return false; - } - } - var valid1 = _errs16 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate127.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema112.allOf[0].type, - parentSchema: schema112.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs22 = errors; - if (errors === _errs22) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs24 = errors; - if ('group' !== data10) { - validate127.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema112.allOf[1].properties.type, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs24 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data.devices !== undefined) { - let data11 = data.devices; - const _errs25 = errors; - if (errors === _errs25) { - if (Array.isArray(data11)) { - var valid7 = true; - const len2 = data11.length; - for (let i2 = 0; i2 < len2; i2++) { - let data12 = data11[i2]; - const _errs27 = errors; - if (errors === _errs27) { - if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { - let missing3; - if (data12.url === undefined && (missing3 = 'url')) { - validate127.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema112.allOf[1].properties.devices.items.required, - parentSchema: schema112.allOf[1].properties.devices.items, - data: data12, - }, - ]; - return false; - } else { - if (data12.url !== undefined) { - let data13 = data12.url; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data13 === 'string') { - if (!formats0(data13)) { - validate127.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema112.allOf[1].properties.devices.items - .properties.url, - data: data13, - }, - ]; - return false; - } - } else { - validate127.errors = [ - { - instancePath: - instancePath + '/devices/' + i2 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema112.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema112.allOf[1].properties.devices.items - .properties.url, - data: data13, - }, - ]; - return false; - } - } - } - } - } - } else { - validate127.errors = [ - { - instancePath: instancePath + '/devices/' + i2, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema112.allOf[1].properties.devices.items.type, - parentSchema: schema112.allOf[1].properties.devices.items, - data: data12, - }, - ]; - return false; - } - } - var valid7 = _errs27 === errors; - if (!valid7) { - break; - } - } - } else { - validate127.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema112.allOf[1].properties.devices.type, - parentSchema: schema112.allOf[1].properties.devices, - data: data11, - }, - ]; - return false; - } - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - } - } else { - validate127.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema112.allOf[1].type, - parentSchema: schema112.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs22 === errors; - } - validate127.errors = vErrors; - return errors === 0; -} -exports.validateDeviceUpdateRequest = validate128; -const schema113 = { - title: 'Device Update', - anyOf: [ - { - title: 'Instantiable Cloud Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Concrete Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Instantiable Browser Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Device Group Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - }, - ], - }, - ], - 'x-standalone': true, - 'x-name': 'DeviceUpdateRequest', - 'x-location': '#/components/schemas/device_update_request', - 'x-schema-type': 'request', -}; -function validate128( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema113.anyOf[0].allOf[0].required, - parentSchema: schema113.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs4 = errors; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.name, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err2 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.description, - data: data1, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err3 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema113.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema113.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema113.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema113.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.isPublic, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - var valid3 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - const err6 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: - schema113.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema113.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - const err7 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema113.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema113.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.viewer, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid5 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - const err11 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema113.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema113.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - const err12 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema113.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[0].allOf[0].properties.owner.items.type, - parentSchema: - schema113.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.owner, - data: data7, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema113.anyOf[0].allOf[0].type, - parentSchema: schema113.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data10) { - const err17 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema113.anyOf[0].allOf[1].properties.type, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err18 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema113.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema113.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data12)) { - var valid8 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err20 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema113.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs36 = errors; - if (typeof data15 !== 'string') { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema113.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema113.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema113.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema113.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema113.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err25 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema113.anyOf[0].allOf[1].properties.services.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema113.anyOf[0].allOf[1].properties.services, - data: data12, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err27 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema113.anyOf[0].allOf[1].type, - parentSchema: schema113.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid1 = _errs24 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs40 = errors; - const _errs41 = errors; - if (errors === _errs41) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if (data.type === undefined && (missing3 = 'type')) { - const err28 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema113.anyOf[1].allOf[0].required, - parentSchema: schema113.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data.name !== undefined) { - let data17 = data.name; - const _errs43 = errors; - if (typeof data17 !== 'string') { - const err29 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.name, - data: data17, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid11 = _errs43 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data18 = data.description; - const _errs45 = errors; - if (typeof data18 !== 'string') { - const err30 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.description, - data: data18, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data19 = data.type; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err31 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data19 === 'device' || - data19 === 'group' || - data19 === 'edge instantiable' || - data19 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema113.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema113.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema113.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data20 = data.isPublic; - const _errs49 = errors; - if (typeof data20 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema113.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.isPublic, - data: data20, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data21 = data.viewer; - const _errs51 = errors; - if (errors === _errs51) { - if (Array.isArray(data21)) { - var valid12 = true; - const len3 = data21.length; - for (let i3 = 0; i3 < len3; i3++) { - let data22 = data21[i3]; - const _errs53 = errors; - if (errors === _errs53) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - let missing4; - if (data22.url === undefined && (missing4 = 'url')) { - const err34 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema113.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema113.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data22.url !== undefined) { - let data23 = data22.url; - const _errs55 = errors; - if (errors === _errs55) { - if (errors === _errs55) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err35 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema113.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema113.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid12 = _errs53 === errors; - if (!valid12) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.viewer, - data: data21, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data24 = data.owner; - const _errs57 = errors; - if (errors === _errs57) { - if (Array.isArray(data24)) { - var valid14 = true; - const len4 = data24.length; - for (let i4 = 0; i4 < len4; i4++) { - let data25 = data24[i4]; - const _errs59 = errors; - if (errors === _errs59) { - if ( - data25 && - typeof data25 == 'object' && - !Array.isArray(data25) - ) { - let missing5; - if (data25.url === undefined && (missing5 = 'url')) { - const err39 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema113.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema113.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data25.url !== undefined) { - let data26 = data25.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data26 === 'string') { - if (!formats0(data26)) { - const err40 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[1].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema113.anyOf[1].allOf[0].properties.owner - .items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema113.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid14 = _errs59 === errors; - if (!valid14) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.owner, - data: data24, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid11 = _errs57 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema113.anyOf[1].allOf[0].type, - parentSchema: schema113.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid10 = _errs41 === errors; - if (valid10) { - const _errs63 = errors; - if (errors === _errs63) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data27 = data.type; - const _errs65 = errors; - if ('device' !== data27) { - const err45 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema113.anyOf[1].allOf[1].properties.type, - data: data27, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data28 = data.experiment; - const _errs66 = errors; - if (errors === _errs66) { - if (errors === _errs66) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err46 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema113.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema113.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid16 = _errs66 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data29 = data.services; - const _errs68 = errors; - if (errors === _errs68) { - if (Array.isArray(data29)) { - var valid17 = true; - const len5 = data29.length; - for (let i5 = 0; i5 < len5; i5++) { - let data30 = data29[i5]; - const _errs70 = errors; - if (errors === _errs70) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - if (data30.serviceType !== undefined) { - let data31 = data30.serviceType; - const _errs73 = errors; - if (errors === _errs73) { - if (errors === _errs73) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err48 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema113.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid18 = _errs73 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceId !== undefined) { - let data32 = data30.serviceId; - const _errs75 = errors; - if (typeof data32 !== 'string') { - const err50 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[1].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema113.anyOf[1].allOf[1].properties.services.items - .properties.serviceId, - data: data32, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid18 = _errs75 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceDirection !== undefined) { - let data33 = data30.serviceDirection; - const _errs77 = errors; - if (typeof data33 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema113.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data33 === 'consumer' || - data33 === 'producer' || - data33 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema113.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema113.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema113.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err53 = { - instancePath: instancePath + '/services/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[1].allOf[1].properties.services.items.type, - parentSchema: - schema113.anyOf[1].allOf[1].properties.services.items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid17 = _errs70 === errors; - if (!valid17) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema113.anyOf[1].allOf[1].properties.services, - data: data29, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid16 = _errs68 === errors; - } else { - var valid16 = true; - } - } - } - } else { - const err55 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema113.anyOf[1].allOf[1].type, - parentSchema: schema113.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid10 = _errs63 === errors; - } - var _valid0 = _errs40 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs79 = errors; - const _errs80 = errors; - if (errors === _errs80) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if (data.type === undefined && (missing6 = 'type')) { - const err56 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema113.anyOf[2].allOf[0].required, - parentSchema: schema113.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data.name !== undefined) { - let data34 = data.name; - const _errs82 = errors; - if (typeof data34 !== 'string') { - const err57 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.name, - data: data34, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid20 = _errs82 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.description !== undefined) { - let data35 = data.description; - const _errs84 = errors; - if (typeof data35 !== 'string') { - const err58 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.description, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid20 = _errs84 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.type !== undefined) { - let data36 = data.type; - const _errs86 = errors; - if (typeof data36 !== 'string') { - const err59 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data36 === 'device' || - data36 === 'group' || - data36 === 'edge instantiable' || - data36 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema113.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema113.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema113.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid20 = _errs86 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.isPublic !== undefined) { - let data37 = data.isPublic; - const _errs88 = errors; - if (typeof data37 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema113.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.isPublic, - data: data37, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs88 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.viewer !== undefined) { - let data38 = data.viewer; - const _errs90 = errors; - if (errors === _errs90) { - if (Array.isArray(data38)) { - var valid21 = true; - const len6 = data38.length; - for (let i6 = 0; i6 < len6; i6++) { - let data39 = data38[i6]; - const _errs92 = errors; - if (errors === _errs92) { - if ( - data39 && - typeof data39 == 'object' && - !Array.isArray(data39) - ) { - let missing7; - if (data39.url === undefined && (missing7 = 'url')) { - const err62 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema113.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema113.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data39.url !== undefined) { - let data40 = data39.url; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err63 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema113.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema113.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs92 === errors; - if (!valid21) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.viewer, - data: data38, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid20 = _errs90 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.owner !== undefined) { - let data41 = data.owner; - const _errs96 = errors; - if (errors === _errs96) { - if (Array.isArray(data41)) { - var valid23 = true; - const len7 = data41.length; - for (let i7 = 0; i7 < len7; i7++) { - let data42 = data41[i7]; - const _errs98 = errors; - if (errors === _errs98) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - let missing8; - if (data42.url === undefined && (missing8 = 'url')) { - const err67 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + missing8 + "'", - schema: - schema113.anyOf[2].allOf[0].properties.owner.items - .required, - parentSchema: - schema113.anyOf[2].allOf[0].properties.owner - .items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data42.url !== undefined) { - let data43 = data42.url; - const _errs100 = errors; - if (errors === _errs100) { - if (errors === _errs100) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err68 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema113.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema113.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid23 = _errs98 === errors; - if (!valid23) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.owner, - data: data41, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid20 = _errs96 === errors; - } else { - var valid20 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema113.anyOf[2].allOf[0].type, - parentSchema: schema113.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid19 = _errs80 === errors; - if (valid19) { - const _errs102 = errors; - if (errors === _errs102) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs104 = errors; - if ('edge instantiable' !== data44) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema113.anyOf[2].allOf[1].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.codeUrl !== undefined) { - let data45 = data.codeUrl; - const _errs105 = errors; - if (errors === _errs105) { - if (errors === _errs105) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err74 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema113.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema113.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.services !== undefined) { - let data46 = data.services; - const _errs107 = errors; - if (errors === _errs107) { - if (Array.isArray(data46)) { - var valid26 = true; - const len8 = data46.length; - for (let i8 = 0; i8 < len8; i8++) { - let data47 = data46[i8]; - const _errs109 = errors; - if (errors === _errs109) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - if (data47.serviceType !== undefined) { - let data48 = data47.serviceType; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema113.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceId !== undefined) { - let data49 = data47.serviceId; - const _errs114 = errors; - if (typeof data49 !== 'string') { - const err78 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema113.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data49, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceDirection !== undefined) { - let data50 = data47.serviceDirection; - const _errs116 = errors; - if (typeof data50 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema113.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data50 === 'consumer' || - data50 === 'producer' || - data50 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema113.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema113.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema113.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err81 = { - instancePath: instancePath + '/services/' + i8, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema113.anyOf[2].allOf[1].properties.services.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid26 = _errs109 === errors; - if (!valid26) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema113.anyOf[2].allOf[1].properties.services, - data: data46, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err83 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema113.anyOf[2].allOf[1].type, - parentSchema: schema113.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid19 = _errs102 === errors; - } - var _valid0 = _errs79 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs118 = errors; - const _errs119 = errors; - if (errors === _errs119) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if (data.type === undefined && (missing9 = 'type')) { - const err84 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema113.anyOf[3].allOf[0].required, - parentSchema: schema113.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data.name !== undefined) { - let data51 = data.name; - const _errs121 = errors; - if (typeof data51 !== 'string') { - const err85 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema113.anyOf[3].allOf[0].properties.name, - data: data51, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid29 = _errs121 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.description !== undefined) { - let data52 = data.description; - const _errs123 = errors; - if (typeof data52 !== 'string') { - const err86 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema113.anyOf[3].allOf[0].properties.description, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid29 = _errs123 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.type !== undefined) { - let data53 = data.type; - const _errs125 = errors; - if (typeof data53 !== 'string') { - const err87 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema113.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema113.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data53 === 'device' || - data53 === 'group' || - data53 === 'edge instantiable' || - data53 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema113.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema113.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema113.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid29 = _errs125 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.isPublic !== undefined) { - let data54 = data.isPublic; - const _errs127 = errors; - if (typeof data54 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema113.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema113.anyOf[3].allOf[0].properties.isPublic, - data: data54, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid29 = _errs127 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.viewer !== undefined) { - let data55 = data.viewer; - const _errs129 = errors; - if (errors === _errs129) { - if (Array.isArray(data55)) { - var valid30 = true; - const len9 = data55.length; - for (let i9 = 0; i9 < len9; i9++) { - let data56 = data55[i9]; - const _errs131 = errors; - if (errors === _errs131) { - if ( - data56 && - typeof data56 == 'object' && - !Array.isArray(data56) - ) { - let missing10; - if (data56.url === undefined && (missing10 = 'url')) { - const err90 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + missing10 + "'", - schema: - schema113.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema113.anyOf[3].allOf[0].properties.viewer - .items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data56.url !== undefined) { - let data57 = data56.url; - const _errs133 = errors; - if (errors === _errs133) { - if (errors === _errs133) { - if (typeof data57 === 'string') { - if (!formats0(data57)) { - const err91 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema113.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema113.anyOf[3].allOf[0].properties.viewer.items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid30 = _errs131 === errors; - if (!valid30) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema113.anyOf[3].allOf[0].properties.viewer, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid29 = _errs129 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.owner !== undefined) { - let data58 = data.owner; - const _errs135 = errors; - if (errors === _errs135) { - if (Array.isArray(data58)) { - var valid32 = true; - const len10 = data58.length; - for (let i10 = 0; i10 < len10; i10++) { - let data59 = data58[i10]; - const _errs137 = errors; - if (errors === _errs137) { - if ( - data59 && - typeof data59 == 'object' && - !Array.isArray(data59) - ) { - let missing11; - if (data59.url === undefined && (missing11 = 'url')) { - const err95 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema113.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema113.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data59.url !== undefined) { - let data60 = data59.url; - const _errs139 = errors; - if (errors === _errs139) { - if (errors === _errs139) { - if (typeof data60 === 'string') { - if (!formats0(data60)) { - const err96 = { - instancePath: - instancePath + - '/owner/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + '/owner/' + i10 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema113.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[3].allOf[0].properties.owner.items - .type, - parentSchema: - schema113.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid32 = _errs137 === errors; - if (!valid32) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema113.anyOf[3].allOf[0].properties.owner, - data: data58, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid29 = _errs135 === errors; - } else { - var valid29 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema113.anyOf[3].allOf[0].type, - parentSchema: schema113.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid28 = _errs119 === errors; - if (valid28) { - const _errs141 = errors; - if (errors === _errs141) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data61 = data.type; - const _errs143 = errors; - if ('group' !== data61) { - const err101 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema113.anyOf[3].allOf[1].properties.type, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data.devices !== undefined) { - let data62 = data.devices; - const _errs144 = errors; - if (errors === _errs144) { - if (Array.isArray(data62)) { - var valid35 = true; - const len11 = data62.length; - for (let i11 = 0; i11 < len11; i11++) { - let data63 = data62[i11]; - const _errs146 = errors; - if (errors === _errs146) { - if ( - data63 && - typeof data63 == 'object' && - !Array.isArray(data63) - ) { - let missing12; - if (data63.url === undefined && (missing12 = 'url')) { - const err102 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: - "must have required property '" + missing12 + "'", - schema: - schema113.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema113.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } else { - if (data63.url !== undefined) { - let data64 = data63.url; - const _errs148 = errors; - if (errors === _errs148) { - if (errors === _errs148) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err103 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema113.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - } else { - const err104 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema113.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema113.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } - } - } - } - } else { - const err105 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema113.anyOf[3].allOf[1].properties.devices.items.type, - parentSchema: - schema113.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - var valid35 = _errs146 === errors; - if (!valid35) { - break; - } - } - } else { - const err106 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema113.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema113.anyOf[3].allOf[1].properties.devices, - data: data62, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - } - } else { - const err107 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema113.anyOf[3].allOf[1].type, - parentSchema: schema113.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid28 = _errs141 === errors; - } - var _valid0 = _errs118 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err108 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema113.anyOf, - parentSchema: schema113, - data, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - validate128.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate128.errors = vErrors; - return errors === 0; -} -exports.validateDeviceUpdateResponse = validate129; -const schema114 = { - title: 'Device Update', - anyOf: [ - { - title: 'Instantiable Cloud Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Concrete Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Instantiable Browser Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Device Group Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - }, - ], - }, - ], - 'x-standalone': true, - 'x-name': 'DeviceUpdateResponse', - 'x-location': '#/components/schemas/device_update_response', - 'x-schema-type': 'response', -}; -function validate129( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema114.anyOf[0].allOf[0].required, - parentSchema: schema114.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs4 = errors; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.name, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err2 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.description, - data: data1, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err3 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema114.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema114.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema114.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema114.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.isPublic, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - var valid3 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - const err6 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: - schema114.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema114.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - const err7 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema114.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema114.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.viewer, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid5 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - const err11 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema114.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema114.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - const err12 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema114.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[0].allOf[0].properties.owner.items.type, - parentSchema: - schema114.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.owner, - data: data7, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema114.anyOf[0].allOf[0].type, - parentSchema: schema114.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data10) { - const err17 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema114.anyOf[0].allOf[1].properties.type, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err18 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema114.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema114.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data12)) { - var valid8 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err20 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema114.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs36 = errors; - if (typeof data15 !== 'string') { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema114.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema114.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema114.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema114.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema114.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err25 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema114.anyOf[0].allOf[1].properties.services.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema114.anyOf[0].allOf[1].properties.services, - data: data12, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err27 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema114.anyOf[0].allOf[1].type, - parentSchema: schema114.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid1 = _errs24 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs40 = errors; - const _errs41 = errors; - if (errors === _errs41) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if (data.type === undefined && (missing3 = 'type')) { - const err28 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema114.anyOf[1].allOf[0].required, - parentSchema: schema114.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data.name !== undefined) { - let data17 = data.name; - const _errs43 = errors; - if (typeof data17 !== 'string') { - const err29 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.name, - data: data17, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid11 = _errs43 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data18 = data.description; - const _errs45 = errors; - if (typeof data18 !== 'string') { - const err30 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.description, - data: data18, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data19 = data.type; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err31 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data19 === 'device' || - data19 === 'group' || - data19 === 'edge instantiable' || - data19 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema114.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema114.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema114.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data20 = data.isPublic; - const _errs49 = errors; - if (typeof data20 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema114.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.isPublic, - data: data20, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data21 = data.viewer; - const _errs51 = errors; - if (errors === _errs51) { - if (Array.isArray(data21)) { - var valid12 = true; - const len3 = data21.length; - for (let i3 = 0; i3 < len3; i3++) { - let data22 = data21[i3]; - const _errs53 = errors; - if (errors === _errs53) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - let missing4; - if (data22.url === undefined && (missing4 = 'url')) { - const err34 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema114.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema114.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data22.url !== undefined) { - let data23 = data22.url; - const _errs55 = errors; - if (errors === _errs55) { - if (errors === _errs55) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err35 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema114.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema114.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid12 = _errs53 === errors; - if (!valid12) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.viewer, - data: data21, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data24 = data.owner; - const _errs57 = errors; - if (errors === _errs57) { - if (Array.isArray(data24)) { - var valid14 = true; - const len4 = data24.length; - for (let i4 = 0; i4 < len4; i4++) { - let data25 = data24[i4]; - const _errs59 = errors; - if (errors === _errs59) { - if ( - data25 && - typeof data25 == 'object' && - !Array.isArray(data25) - ) { - let missing5; - if (data25.url === undefined && (missing5 = 'url')) { - const err39 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema114.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema114.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data25.url !== undefined) { - let data26 = data25.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data26 === 'string') { - if (!formats0(data26)) { - const err40 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[1].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema114.anyOf[1].allOf[0].properties.owner - .items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema114.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid14 = _errs59 === errors; - if (!valid14) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.owner, - data: data24, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid11 = _errs57 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema114.anyOf[1].allOf[0].type, - parentSchema: schema114.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid10 = _errs41 === errors; - if (valid10) { - const _errs63 = errors; - if (errors === _errs63) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data27 = data.type; - const _errs65 = errors; - if ('device' !== data27) { - const err45 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema114.anyOf[1].allOf[1].properties.type, - data: data27, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data28 = data.experiment; - const _errs66 = errors; - if (errors === _errs66) { - if (errors === _errs66) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err46 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema114.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema114.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid16 = _errs66 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data29 = data.services; - const _errs68 = errors; - if (errors === _errs68) { - if (Array.isArray(data29)) { - var valid17 = true; - const len5 = data29.length; - for (let i5 = 0; i5 < len5; i5++) { - let data30 = data29[i5]; - const _errs70 = errors; - if (errors === _errs70) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - if (data30.serviceType !== undefined) { - let data31 = data30.serviceType; - const _errs73 = errors; - if (errors === _errs73) { - if (errors === _errs73) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err48 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema114.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid18 = _errs73 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceId !== undefined) { - let data32 = data30.serviceId; - const _errs75 = errors; - if (typeof data32 !== 'string') { - const err50 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[1].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema114.anyOf[1].allOf[1].properties.services.items - .properties.serviceId, - data: data32, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid18 = _errs75 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceDirection !== undefined) { - let data33 = data30.serviceDirection; - const _errs77 = errors; - if (typeof data33 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema114.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data33 === 'consumer' || - data33 === 'producer' || - data33 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema114.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema114.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema114.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err53 = { - instancePath: instancePath + '/services/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[1].allOf[1].properties.services.items.type, - parentSchema: - schema114.anyOf[1].allOf[1].properties.services.items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid17 = _errs70 === errors; - if (!valid17) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema114.anyOf[1].allOf[1].properties.services, - data: data29, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid16 = _errs68 === errors; - } else { - var valid16 = true; - } - } - } - } else { - const err55 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema114.anyOf[1].allOf[1].type, - parentSchema: schema114.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid10 = _errs63 === errors; - } - var _valid0 = _errs40 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs79 = errors; - const _errs80 = errors; - if (errors === _errs80) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if (data.type === undefined && (missing6 = 'type')) { - const err56 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema114.anyOf[2].allOf[0].required, - parentSchema: schema114.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data.name !== undefined) { - let data34 = data.name; - const _errs82 = errors; - if (typeof data34 !== 'string') { - const err57 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.name, - data: data34, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid20 = _errs82 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.description !== undefined) { - let data35 = data.description; - const _errs84 = errors; - if (typeof data35 !== 'string') { - const err58 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.description, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid20 = _errs84 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.type !== undefined) { - let data36 = data.type; - const _errs86 = errors; - if (typeof data36 !== 'string') { - const err59 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data36 === 'device' || - data36 === 'group' || - data36 === 'edge instantiable' || - data36 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema114.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema114.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema114.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid20 = _errs86 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.isPublic !== undefined) { - let data37 = data.isPublic; - const _errs88 = errors; - if (typeof data37 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema114.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.isPublic, - data: data37, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs88 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.viewer !== undefined) { - let data38 = data.viewer; - const _errs90 = errors; - if (errors === _errs90) { - if (Array.isArray(data38)) { - var valid21 = true; - const len6 = data38.length; - for (let i6 = 0; i6 < len6; i6++) { - let data39 = data38[i6]; - const _errs92 = errors; - if (errors === _errs92) { - if ( - data39 && - typeof data39 == 'object' && - !Array.isArray(data39) - ) { - let missing7; - if (data39.url === undefined && (missing7 = 'url')) { - const err62 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema114.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema114.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data39.url !== undefined) { - let data40 = data39.url; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err63 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema114.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema114.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs92 === errors; - if (!valid21) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.viewer, - data: data38, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid20 = _errs90 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.owner !== undefined) { - let data41 = data.owner; - const _errs96 = errors; - if (errors === _errs96) { - if (Array.isArray(data41)) { - var valid23 = true; - const len7 = data41.length; - for (let i7 = 0; i7 < len7; i7++) { - let data42 = data41[i7]; - const _errs98 = errors; - if (errors === _errs98) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - let missing8; - if (data42.url === undefined && (missing8 = 'url')) { - const err67 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + missing8 + "'", - schema: - schema114.anyOf[2].allOf[0].properties.owner.items - .required, - parentSchema: - schema114.anyOf[2].allOf[0].properties.owner - .items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data42.url !== undefined) { - let data43 = data42.url; - const _errs100 = errors; - if (errors === _errs100) { - if (errors === _errs100) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err68 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema114.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema114.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid23 = _errs98 === errors; - if (!valid23) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.owner, - data: data41, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid20 = _errs96 === errors; - } else { - var valid20 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema114.anyOf[2].allOf[0].type, - parentSchema: schema114.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid19 = _errs80 === errors; - if (valid19) { - const _errs102 = errors; - if (errors === _errs102) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs104 = errors; - if ('edge instantiable' !== data44) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema114.anyOf[2].allOf[1].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.codeUrl !== undefined) { - let data45 = data.codeUrl; - const _errs105 = errors; - if (errors === _errs105) { - if (errors === _errs105) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err74 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema114.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema114.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.services !== undefined) { - let data46 = data.services; - const _errs107 = errors; - if (errors === _errs107) { - if (Array.isArray(data46)) { - var valid26 = true; - const len8 = data46.length; - for (let i8 = 0; i8 < len8; i8++) { - let data47 = data46[i8]; - const _errs109 = errors; - if (errors === _errs109) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - if (data47.serviceType !== undefined) { - let data48 = data47.serviceType; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema114.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceId !== undefined) { - let data49 = data47.serviceId; - const _errs114 = errors; - if (typeof data49 !== 'string') { - const err78 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema114.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data49, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceDirection !== undefined) { - let data50 = data47.serviceDirection; - const _errs116 = errors; - if (typeof data50 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema114.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data50 === 'consumer' || - data50 === 'producer' || - data50 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema114.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema114.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema114.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err81 = { - instancePath: instancePath + '/services/' + i8, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema114.anyOf[2].allOf[1].properties.services.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid26 = _errs109 === errors; - if (!valid26) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema114.anyOf[2].allOf[1].properties.services, - data: data46, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err83 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema114.anyOf[2].allOf[1].type, - parentSchema: schema114.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid19 = _errs102 === errors; - } - var _valid0 = _errs79 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs118 = errors; - const _errs119 = errors; - if (errors === _errs119) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if (data.type === undefined && (missing9 = 'type')) { - const err84 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema114.anyOf[3].allOf[0].required, - parentSchema: schema114.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data.name !== undefined) { - let data51 = data.name; - const _errs121 = errors; - if (typeof data51 !== 'string') { - const err85 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema114.anyOf[3].allOf[0].properties.name, - data: data51, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid29 = _errs121 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.description !== undefined) { - let data52 = data.description; - const _errs123 = errors; - if (typeof data52 !== 'string') { - const err86 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema114.anyOf[3].allOf[0].properties.description, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid29 = _errs123 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.type !== undefined) { - let data53 = data.type; - const _errs125 = errors; - if (typeof data53 !== 'string') { - const err87 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema114.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema114.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data53 === 'device' || - data53 === 'group' || - data53 === 'edge instantiable' || - data53 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema114.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema114.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema114.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid29 = _errs125 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.isPublic !== undefined) { - let data54 = data.isPublic; - const _errs127 = errors; - if (typeof data54 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema114.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema114.anyOf[3].allOf[0].properties.isPublic, - data: data54, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid29 = _errs127 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.viewer !== undefined) { - let data55 = data.viewer; - const _errs129 = errors; - if (errors === _errs129) { - if (Array.isArray(data55)) { - var valid30 = true; - const len9 = data55.length; - for (let i9 = 0; i9 < len9; i9++) { - let data56 = data55[i9]; - const _errs131 = errors; - if (errors === _errs131) { - if ( - data56 && - typeof data56 == 'object' && - !Array.isArray(data56) - ) { - let missing10; - if (data56.url === undefined && (missing10 = 'url')) { - const err90 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + missing10 + "'", - schema: - schema114.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema114.anyOf[3].allOf[0].properties.viewer - .items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data56.url !== undefined) { - let data57 = data56.url; - const _errs133 = errors; - if (errors === _errs133) { - if (errors === _errs133) { - if (typeof data57 === 'string') { - if (!formats0(data57)) { - const err91 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema114.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema114.anyOf[3].allOf[0].properties.viewer.items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid30 = _errs131 === errors; - if (!valid30) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema114.anyOf[3].allOf[0].properties.viewer, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid29 = _errs129 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.owner !== undefined) { - let data58 = data.owner; - const _errs135 = errors; - if (errors === _errs135) { - if (Array.isArray(data58)) { - var valid32 = true; - const len10 = data58.length; - for (let i10 = 0; i10 < len10; i10++) { - let data59 = data58[i10]; - const _errs137 = errors; - if (errors === _errs137) { - if ( - data59 && - typeof data59 == 'object' && - !Array.isArray(data59) - ) { - let missing11; - if (data59.url === undefined && (missing11 = 'url')) { - const err95 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema114.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema114.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data59.url !== undefined) { - let data60 = data59.url; - const _errs139 = errors; - if (errors === _errs139) { - if (errors === _errs139) { - if (typeof data60 === 'string') { - if (!formats0(data60)) { - const err96 = { - instancePath: - instancePath + - '/owner/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + '/owner/' + i10 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema114.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[3].allOf[0].properties.owner.items - .type, - parentSchema: - schema114.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid32 = _errs137 === errors; - if (!valid32) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema114.anyOf[3].allOf[0].properties.owner, - data: data58, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid29 = _errs135 === errors; - } else { - var valid29 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema114.anyOf[3].allOf[0].type, - parentSchema: schema114.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid28 = _errs119 === errors; - if (valid28) { - const _errs141 = errors; - if (errors === _errs141) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data61 = data.type; - const _errs143 = errors; - if ('group' !== data61) { - const err101 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema114.anyOf[3].allOf[1].properties.type, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data.devices !== undefined) { - let data62 = data.devices; - const _errs144 = errors; - if (errors === _errs144) { - if (Array.isArray(data62)) { - var valid35 = true; - const len11 = data62.length; - for (let i11 = 0; i11 < len11; i11++) { - let data63 = data62[i11]; - const _errs146 = errors; - if (errors === _errs146) { - if ( - data63 && - typeof data63 == 'object' && - !Array.isArray(data63) - ) { - let missing12; - if (data63.url === undefined && (missing12 = 'url')) { - const err102 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: - "must have required property '" + missing12 + "'", - schema: - schema114.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema114.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } else { - if (data63.url !== undefined) { - let data64 = data63.url; - const _errs148 = errors; - if (errors === _errs148) { - if (errors === _errs148) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err103 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema114.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - } else { - const err104 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema114.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema114.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } - } - } - } - } else { - const err105 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema114.anyOf[3].allOf[1].properties.devices.items.type, - parentSchema: - schema114.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - var valid35 = _errs146 === errors; - if (!valid35) { - break; - } - } - } else { - const err106 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema114.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema114.anyOf[3].allOf[1].properties.devices, - data: data62, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - } - } else { - const err107 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema114.anyOf[3].allOf[1].type, - parentSchema: schema114.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid28 = _errs141 === errors; - } - var _valid0 = _errs118 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err108 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema114.anyOf, - parentSchema: schema114, - data, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - validate129.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate129.errors = vErrors; - return errors === 0; -} -exports.validateAvailabilityRuleRequest = validate130; -const schema115 = { - title: 'Availability Rule', - type: 'object', - allOf: [ - { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - { - type: 'object', - properties: { - available: { type: 'boolean' }, - repeat: { - description: - 'If specified the time slot is repeated in a fixed offset specified by the frequency', - type: 'object', - properties: { - frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, - until: { - description: 'Up to this date-time the time slot will be repeated.', - type: 'string', - format: 'date-time', - }, - count: { - description: 'How often the time slot will be repeated', - type: 'integer', - }, - }, - required: ['frequency'], - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'AvailabilityRuleRequest', - 'x-location': '#/components/schemas/availability_rule_request', - 'x-schema-type': 'request', -}; -function validate130( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (!(data && typeof data == 'object' && !Array.isArray(data))) { - validate130.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema115.type, - parentSchema: schema115, - data, - }, - ]; - return false; - } - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.start !== undefined) { - let data0 = data.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data0 === 'string') { - if (!formats22.validate(data0)) { - validate130.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/allOf/0/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema115.allOf[0].properties.start, - data: data0, - }, - ]; - return false; - } - } else { - validate130.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/allOf/0/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema115.allOf[0].properties.start.type, - parentSchema: schema115.allOf[0].properties.start, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.end !== undefined) { - let data1 = data.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate130.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/allOf/0/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema115.allOf[0].properties.end, - data: data1, - }, - ]; - return false; - } - } else { - validate130.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/allOf/0/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema115.allOf[0].properties.end.type, - parentSchema: schema115.allOf[0].properties.end, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate130.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema115.allOf[0].type, - parentSchema: schema115.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (valid0) { - const _errs7 = errors; - if (errors === _errs7) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.available !== undefined) { - let data2 = data.available; - const _errs9 = errors; - if (typeof data2 !== 'boolean') { - validate130.errors = [ - { - instancePath: instancePath + '/available', - schemaPath: '#/allOf/1/properties/available/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema115.allOf[1].properties.available.type, - parentSchema: schema115.allOf[1].properties.available, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs9 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.repeat !== undefined) { - let data3 = data.repeat; - const _errs11 = errors; - if (errors === _errs11) { - if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { - let missing0; - if (data3.frequency === undefined && (missing0 = 'frequency')) { - validate130.errors = [ - { - instancePath: instancePath + '/repeat', - schemaPath: '#/allOf/1/properties/repeat/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema115.allOf[1].properties.repeat.required, - parentSchema: schema115.allOf[1].properties.repeat, - data: data3, - }, - ]; - return false; - } else { - if (data3.frequency !== undefined) { - let data4 = data3.frequency; - const _errs13 = errors; - if (typeof data4 !== 'string') { - validate130.errors = [ - { - instancePath: instancePath + '/repeat/frequency', - schemaPath: - '#/allOf/1/properties/repeat/properties/frequency/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema115.allOf[1].properties.repeat.properties.frequency - .type, - parentSchema: - schema115.allOf[1].properties.repeat.properties.frequency, - data: data4, - }, - ]; - return false; - } - if ( - !(data4 === 'HOURLY' || data4 === 'DAILY' || data4 === 'WEEKLY') - ) { - validate130.errors = [ - { - instancePath: instancePath + '/repeat/frequency', - schemaPath: - '#/allOf/1/properties/repeat/properties/frequency/enum', - keyword: 'enum', - params: { - allowedValues: - schema115.allOf[1].properties.repeat.properties.frequency - .enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema115.allOf[1].properties.repeat.properties.frequency - .enum, - parentSchema: - schema115.allOf[1].properties.repeat.properties.frequency, - data: data4, - }, - ]; - return false; - } - var valid3 = _errs13 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.until !== undefined) { - let data5 = data3.until; - const _errs15 = errors; - if (errors === _errs15) { - if (errors === _errs15) { - if (typeof data5 === 'string') { - if (!formats22.validate(data5)) { - validate130.errors = [ - { - instancePath: instancePath + '/repeat/until', - schemaPath: - '#/allOf/1/properties/repeat/properties/until/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema115.allOf[1].properties.repeat.properties.until, - data: data5, - }, - ]; - return false; - } - } else { - validate130.errors = [ - { - instancePath: instancePath + '/repeat/until', - schemaPath: - '#/allOf/1/properties/repeat/properties/until/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema115.allOf[1].properties.repeat.properties.until - .type, - parentSchema: - schema115.allOf[1].properties.repeat.properties.until, - data: data5, - }, - ]; - return false; - } - } - } - var valid3 = _errs15 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.count !== undefined) { - let data6 = data3.count; - const _errs17 = errors; - if ( - !( - typeof data6 == 'number' && - !(data6 % 1) && - !isNaN(data6) && - isFinite(data6) - ) - ) { - validate130.errors = [ - { - instancePath: instancePath + '/repeat/count', - schemaPath: - '#/allOf/1/properties/repeat/properties/count/type', - keyword: 'type', - params: { type: 'integer' }, - message: 'must be integer', - schema: - schema115.allOf[1].properties.repeat.properties.count - .type, - parentSchema: - schema115.allOf[1].properties.repeat.properties.count, - data: data6, - }, - ]; - return false; - } - var valid3 = _errs17 === errors; - } else { - var valid3 = true; - } - } - } - } - } else { - validate130.errors = [ - { - instancePath: instancePath + '/repeat', - schemaPath: '#/allOf/1/properties/repeat/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema115.allOf[1].properties.repeat.type, - parentSchema: schema115.allOf[1].properties.repeat, - data: data3, - }, - ]; - return false; - } - } - var valid2 = _errs11 === errors; - } else { - var valid2 = true; - } - } - } else { - validate130.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema115.allOf[1].type, - parentSchema: schema115.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs7 === errors; - } - validate130.errors = vErrors; - return errors === 0; -} -exports.validateAvailabilityRuleResponse = validate131; -const schema116 = { - title: 'Availability Rule', - type: 'object', - allOf: [ - { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - { - type: 'object', - properties: { - available: { type: 'boolean' }, - repeat: { - description: - 'If specified the time slot is repeated in a fixed offset specified by the frequency', - type: 'object', - properties: { - frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, - until: { - description: 'Up to this date-time the time slot will be repeated.', - type: 'string', - format: 'date-time', - }, - count: { - description: 'How often the time slot will be repeated', - type: 'integer', - }, - }, - required: ['frequency'], - }, - }, - }, - ], - 'x-standalone': true, - 'x-name': 'AvailabilityRuleResponse', - 'x-location': '#/components/schemas/availability_rule_response', - 'x-schema-type': 'response', -}; -function validate131( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (!(data && typeof data == 'object' && !Array.isArray(data))) { - validate131.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema116.type, - parentSchema: schema116, - data, - }, - ]; - return false; - } - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.start !== undefined) { - let data0 = data.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data0 === 'string') { - if (!formats22.validate(data0)) { - validate131.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/allOf/0/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema116.allOf[0].properties.start, - data: data0, - }, - ]; - return false; - } - } else { - validate131.errors = [ - { - instancePath: instancePath + '/start', - schemaPath: '#/allOf/0/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema116.allOf[0].properties.start.type, - parentSchema: schema116.allOf[0].properties.start, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.end !== undefined) { - let data1 = data.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate131.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/allOf/0/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema116.allOf[0].properties.end, - data: data1, - }, - ]; - return false; - } - } else { - validate131.errors = [ - { - instancePath: instancePath + '/end', - schemaPath: '#/allOf/0/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema116.allOf[0].properties.end.type, - parentSchema: schema116.allOf[0].properties.end, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate131.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema116.allOf[0].type, - parentSchema: schema116.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (valid0) { - const _errs7 = errors; - if (errors === _errs7) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.available !== undefined) { - let data2 = data.available; - const _errs9 = errors; - if (typeof data2 !== 'boolean') { - validate131.errors = [ - { - instancePath: instancePath + '/available', - schemaPath: '#/allOf/1/properties/available/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema116.allOf[1].properties.available.type, - parentSchema: schema116.allOf[1].properties.available, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs9 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.repeat !== undefined) { - let data3 = data.repeat; - const _errs11 = errors; - if (errors === _errs11) { - if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { - let missing0; - if (data3.frequency === undefined && (missing0 = 'frequency')) { - validate131.errors = [ - { - instancePath: instancePath + '/repeat', - schemaPath: '#/allOf/1/properties/repeat/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema116.allOf[1].properties.repeat.required, - parentSchema: schema116.allOf[1].properties.repeat, - data: data3, - }, - ]; - return false; - } else { - if (data3.frequency !== undefined) { - let data4 = data3.frequency; - const _errs13 = errors; - if (typeof data4 !== 'string') { - validate131.errors = [ - { - instancePath: instancePath + '/repeat/frequency', - schemaPath: - '#/allOf/1/properties/repeat/properties/frequency/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema116.allOf[1].properties.repeat.properties.frequency - .type, - parentSchema: - schema116.allOf[1].properties.repeat.properties.frequency, - data: data4, - }, - ]; - return false; - } - if ( - !(data4 === 'HOURLY' || data4 === 'DAILY' || data4 === 'WEEKLY') - ) { - validate131.errors = [ - { - instancePath: instancePath + '/repeat/frequency', - schemaPath: - '#/allOf/1/properties/repeat/properties/frequency/enum', - keyword: 'enum', - params: { - allowedValues: - schema116.allOf[1].properties.repeat.properties.frequency - .enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema116.allOf[1].properties.repeat.properties.frequency - .enum, - parentSchema: - schema116.allOf[1].properties.repeat.properties.frequency, - data: data4, - }, - ]; - return false; - } - var valid3 = _errs13 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.until !== undefined) { - let data5 = data3.until; - const _errs15 = errors; - if (errors === _errs15) { - if (errors === _errs15) { - if (typeof data5 === 'string') { - if (!formats22.validate(data5)) { - validate131.errors = [ - { - instancePath: instancePath + '/repeat/until', - schemaPath: - '#/allOf/1/properties/repeat/properties/until/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema116.allOf[1].properties.repeat.properties.until, - data: data5, - }, - ]; - return false; - } - } else { - validate131.errors = [ - { - instancePath: instancePath + '/repeat/until', - schemaPath: - '#/allOf/1/properties/repeat/properties/until/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema116.allOf[1].properties.repeat.properties.until - .type, - parentSchema: - schema116.allOf[1].properties.repeat.properties.until, - data: data5, - }, - ]; - return false; - } - } - } - var valid3 = _errs15 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.count !== undefined) { - let data6 = data3.count; - const _errs17 = errors; - if ( - !( - typeof data6 == 'number' && - !(data6 % 1) && - !isNaN(data6) && - isFinite(data6) - ) - ) { - validate131.errors = [ - { - instancePath: instancePath + '/repeat/count', - schemaPath: - '#/allOf/1/properties/repeat/properties/count/type', - keyword: 'type', - params: { type: 'integer' }, - message: 'must be integer', - schema: - schema116.allOf[1].properties.repeat.properties.count - .type, - parentSchema: - schema116.allOf[1].properties.repeat.properties.count, - data: data6, - }, - ]; - return false; - } - var valid3 = _errs17 === errors; - } else { - var valid3 = true; - } - } - } - } - } else { - validate131.errors = [ - { - instancePath: instancePath + '/repeat', - schemaPath: '#/allOf/1/properties/repeat/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema116.allOf[1].properties.repeat.type, - parentSchema: schema116.allOf[1].properties.repeat, - data: data3, - }, - ]; - return false; - } - } - var valid2 = _errs11 === errors; - } else { - var valid2 = true; - } - } - } else { - validate131.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema116.allOf[1].type, - parentSchema: schema116.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs7 === errors; - } - validate131.errors = vErrors; - return errors === 0; -} -exports.validateMessageRequest = validate132; -const schema117 = { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'MessageRequest', - 'x-location': '#/components/schemas/message_request', - 'x-schema-type': 'request', -}; -function validate132( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate132.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema117.required, - parentSchema: schema117, - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate132.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema117.properties.messageType.type, - parentSchema: schema117.properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate132.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema117.type, - parentSchema: schema117, - data, - }, - ]; - return false; - } - } - validate132.errors = vErrors; - return errors === 0; -} -exports.validateMessageResponse = validate133; -const schema118 = { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'MessageResponse', - 'x-location': '#/components/schemas/message_response', - 'x-schema-type': 'response', -}; -function validate133( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate133.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema118.required, - parentSchema: schema118, - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate133.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema118.properties.messageType.type, - parentSchema: schema118.properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate133.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema118.type, - parentSchema: schema118, - data, - }, - ]; - return false; - } - } - validate133.errors = vErrors; - return errors === 0; -} -exports.validateCommandMessageRequest = validate134; -const schema119 = { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { messageType: { const: 'command' }, command: { type: 'string' } }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'CommandMessageRequest', - 'x-location': '#/components/schemas/command_message_request', - 'x-schema-type': 'request', -}; -function validate134( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate134.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema119.allOf[0].required, - parentSchema: schema119.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate134.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema119.allOf[0].properties.messageType.type, - parentSchema: schema119.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate134.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema119.allOf[0].type, - parentSchema: schema119.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - validate134.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema119.allOf[1].required, - parentSchema: schema119.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('command' !== data1) { - validate134.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema119.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate134.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema119.allOf[1].properties.command.type, - parentSchema: schema119.allOf[1].properties.command, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - } - } - } else { - validate134.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema119.allOf[1].type, - parentSchema: schema119.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate134.errors = vErrors; - return errors === 0; -} -exports.validateCommandMessageResponse = validate135; -const schema120 = { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { messageType: { const: 'command' }, command: { type: 'string' } }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'CommandMessageResponse', - 'x-location': '#/components/schemas/command_message_response', - 'x-schema-type': 'response', -}; -function validate135( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate135.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema120.allOf[0].required, - parentSchema: schema120.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate135.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema120.allOf[0].properties.messageType.type, - parentSchema: schema120.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate135.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema120.allOf[0].type, - parentSchema: schema120.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - validate135.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema120.allOf[1].required, - parentSchema: schema120.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('command' !== data1) { - validate135.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema120.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate135.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema120.allOf[1].properties.command.type, - parentSchema: schema120.allOf[1].properties.command, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - } - } - } else { - validate135.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema120.allOf[1].type, - parentSchema: schema120.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate135.errors = vErrors; - return errors === 0; -} -exports.validateServiceConfigRequest = validate136; -const schema121 = { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - 'x-standalone': true, - 'x-name': 'ServiceConfigRequest', - 'x-location': '#/components/schemas/service_config_request', - 'x-schema-type': 'request', -}; -function validate136( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.serviceType === undefined && (missing0 = 'serviceType')) || - (data.serviceId === undefined && (missing0 = 'serviceId')) || - (data.remoteServiceId === undefined && (missing0 = 'remoteServiceId')) - ) { - validate136.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema121.required, - parentSchema: schema121, - data, - }, - ]; - return false; - } else { - if (data.serviceType !== undefined) { - let data0 = data.serviceType; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate136.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema121.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } else { - validate136.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema121.properties.serviceType.type, - parentSchema: schema121.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs2 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.serviceId !== undefined) { - let data1 = data.serviceId; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate136.errors = [ - { - instancePath: instancePath + '/serviceId', - schemaPath: '#/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema121.properties.serviceId.type, - parentSchema: schema121.properties.serviceId, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs4 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.remoteServiceId !== undefined) { - let data2 = data.remoteServiceId; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate136.errors = [ - { - instancePath: instancePath + '/remoteServiceId', - schemaPath: '#/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema121.properties.remoteServiceId.type, - parentSchema: schema121.properties.remoteServiceId, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs6 === errors; - } else { - var valid0 = true; - } - } - } - } - } else { - validate136.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema121.type, - parentSchema: schema121, - data, - }, - ]; - return false; - } - } - validate136.errors = vErrors; - return errors === 0; -} -exports.validateServiceConfigResponse = validate137; -const schema122 = { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - 'x-standalone': true, - 'x-name': 'ServiceConfigResponse', - 'x-location': '#/components/schemas/service_config_response', - 'x-schema-type': 'response', -}; -function validate137( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.serviceType === undefined && (missing0 = 'serviceType')) || - (data.serviceId === undefined && (missing0 = 'serviceId')) || - (data.remoteServiceId === undefined && (missing0 = 'remoteServiceId')) - ) { - validate137.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema122.required, - parentSchema: schema122, - data, - }, - ]; - return false; - } else { - if (data.serviceType !== undefined) { - let data0 = data.serviceType; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate137.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema122.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } else { - validate137.errors = [ - { - instancePath: instancePath + '/serviceType', - schemaPath: '#/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema122.properties.serviceType.type, - parentSchema: schema122.properties.serviceType, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs2 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.serviceId !== undefined) { - let data1 = data.serviceId; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate137.errors = [ - { - instancePath: instancePath + '/serviceId', - schemaPath: '#/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema122.properties.serviceId.type, - parentSchema: schema122.properties.serviceId, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs4 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.remoteServiceId !== undefined) { - let data2 = data.remoteServiceId; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate137.errors = [ - { - instancePath: instancePath + '/remoteServiceId', - schemaPath: '#/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema122.properties.remoteServiceId.type, - parentSchema: schema122.properties.remoteServiceId, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs6 === errors; - } else { - var valid0 = true; - } - } - } - } - } else { - validate137.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema122.type, - parentSchema: schema122, - data, - }, - ]; - return false; - } - } - validate137.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionMessageRequest = validate138; -const schema123 = { - title: 'Create Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { messageType: { const: 'command' }, command: { type: 'string' } }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'createPeerconnection' }, - connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, - connectionUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - type: 'object', - required: ['serviceType', 'serviceId', 'remoteServiceId'], - title: 'Service Config', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - additionalProperties: true, - }, - }, - tiebreaker: { type: 'boolean' }, - config: { type: 'object', additionalProperties: true }, - }, - required: ['command', 'connectionType', 'connectionUrl', 'services', 'tiebreaker'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'CreatePeerconnectionMessageRequest', - 'x-location': '#/components/schemas/create_peerconnection_message_request', - 'x-schema-type': 'request', -}; -function validate138( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate138.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema123.allOf[0].allOf[0].required, - parentSchema: schema123.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate138.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema123.allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema123.allOf[0].allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate138.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema123.allOf[0].allOf[0].type, - parentSchema: schema123.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs6 = errors; - if (errors === _errs6) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - validate138.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema123.allOf[0].allOf[1].required, - parentSchema: schema123.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs8 = errors; - if ('command' !== data1) { - validate138.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema123.allOf[0].allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs8 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate138.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema123.allOf[0].allOf[1].properties.command.type, - parentSchema: schema123.allOf[0].allOf[1].properties.command, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate138.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema123.allOf[0].allOf[1].type, - parentSchema: schema123.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs6 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.command === undefined && (missing2 = 'command')) || - (data.connectionType === undefined && (missing2 = 'connectionType')) || - (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || - (data.services === undefined && (missing2 = 'services')) || - (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) - ) { - validate138.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema123.allOf[1].required, - parentSchema: schema123.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.command !== undefined) { - let data3 = data.command; - const _errs13 = errors; - if ('createPeerconnection' !== data3) { - validate138.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'createPeerconnection' }, - message: 'must be equal to constant', - schema: 'createPeerconnection', - parentSchema: schema123.allOf[1].properties.command, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.connectionType !== undefined) { - let data4 = data.connectionType; - const _errs14 = errors; - if (typeof data4 !== 'string') { - validate138.errors = [ - { - instancePath: instancePath + '/connectionType', - schemaPath: '#/allOf/1/properties/connectionType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema123.allOf[1].properties.connectionType.type, - parentSchema: schema123.allOf[1].properties.connectionType, - data: data4, - }, - ]; - return false; - } - if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { - validate138.errors = [ - { - instancePath: instancePath + '/connectionType', - schemaPath: '#/allOf/1/properties/connectionType/enum', - keyword: 'enum', - params: { - allowedValues: schema123.allOf[1].properties.connectionType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema123.allOf[1].properties.connectionType.enum, - parentSchema: schema123.allOf[1].properties.connectionType, - data: data4, - }, - ]; - return false; - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.connectionUrl !== undefined) { - let data5 = data.connectionUrl; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate138.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema123.allOf[1].properties.connectionUrl, - data: data5, - }, - ]; - return false; - } - } else { - validate138.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema123.allOf[1].properties.connectionUrl.type, - parentSchema: schema123.allOf[1].properties.connectionUrl, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.services !== undefined) { - let data6 = data.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data6)) { - var valid5 = true; - const len0 = data6.length; - for (let i0 = 0; i0 < len0; i0++) { - let data7 = data6[i0]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing3; - if ( - (data7.serviceType === undefined && - (missing3 = 'serviceType')) || - (data7.serviceId === undefined && - (missing3 = 'serviceId')) || - (data7.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate138.errors = [ - { - instancePath: instancePath + '/services/' + i0, - schemaPath: - '#/allOf/1/properties/services/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: - "must have required property '" + missing3 + "'", - schema: - schema123.allOf[1].properties.services.items.required, - parentSchema: - schema123.allOf[1].properties.services.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.serviceType !== undefined) { - let data8 = data7.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - validate138.errors = [ - { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema123.allOf[1].properties.services.items - .properties.serviceType, - data: data8, - }, - ]; - return false; - } - } else { - validate138.errors = [ - { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema123.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema123.allOf[1].properties.services.items - .properties.serviceType, - data: data8, - }, - ]; - return false; - } - } - } - var valid6 = _errs23 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data7.serviceId !== undefined) { - let data9 = data7.serviceId; - const _errs25 = errors; - if (typeof data9 !== 'string') { - validate138.errors = [ - { - instancePath: - instancePath + '/services/' + i0 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema123.allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema123.allOf[1].properties.services.items - .properties.serviceId, - data: data9, - }, - ]; - return false; - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data7.remoteServiceId !== undefined) { - let data10 = data7.remoteServiceId; - const _errs27 = errors; - if (typeof data10 !== 'string') { - validate138.errors = [ - { - instancePath: - instancePath + - '/services/' + - i0 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema123.allOf[1].properties.services.items - .properties.remoteServiceId.type, - parentSchema: - schema123.allOf[1].properties.services.items - .properties.remoteServiceId, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } - } else { - validate138.errors = [ - { - instancePath: instancePath + '/services/' + i0, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema123.allOf[1].properties.services.items.type, - parentSchema: - schema123.allOf[1].properties.services.items, - data: data7, - }, - ]; - return false; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - validate138.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema123.allOf[1].properties.services.type, - parentSchema: schema123.allOf[1].properties.services, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.tiebreaker !== undefined) { - let data11 = data.tiebreaker; - const _errs29 = errors; - if (typeof data11 !== 'boolean') { - validate138.errors = [ - { - instancePath: instancePath + '/tiebreaker', - schemaPath: '#/allOf/1/properties/tiebreaker/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema123.allOf[1].properties.tiebreaker.type, - parentSchema: schema123.allOf[1].properties.tiebreaker, - data: data11, - }, - ]; - return false; - } - var valid4 = _errs29 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.config !== undefined) { - let data12 = data.config; - const _errs31 = errors; - if (errors === _errs31) { - if ( - data12 && - typeof data12 == 'object' && - !Array.isArray(data12) - ) { - } else { - validate138.errors = [ - { - instancePath: instancePath + '/config', - schemaPath: '#/allOf/1/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema123.allOf[1].properties.config.type, - parentSchema: schema123.allOf[1].properties.config, - data: data12, - }, - ]; - return false; - } - } - var valid4 = _errs31 === errors; - } else { - var valid4 = true; - } - } - } - } - } - } - } - } else { - validate138.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema123.allOf[1].type, - parentSchema: schema123.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate138.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionMessageResponse = validate139; -const schema124 = { - title: 'Create Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { messageType: { const: 'command' }, command: { type: 'string' } }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'createPeerconnection' }, - connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, - connectionUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - type: 'object', - required: ['serviceType', 'serviceId', 'remoteServiceId'], - title: 'Service Config', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - additionalProperties: true, - }, - }, - tiebreaker: { type: 'boolean' }, - config: { type: 'object', additionalProperties: true }, - }, - required: ['command', 'connectionType', 'connectionUrl', 'services', 'tiebreaker'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'CreatePeerconnectionMessageResponse', - 'x-location': '#/components/schemas/create_peerconnection_message_response', - 'x-schema-type': 'response', -}; -function validate139( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate139.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema124.allOf[0].allOf[0].required, - parentSchema: schema124.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate139.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema124.allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema124.allOf[0].allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate139.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema124.allOf[0].allOf[0].type, - parentSchema: schema124.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs6 = errors; - if (errors === _errs6) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - validate139.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema124.allOf[0].allOf[1].required, - parentSchema: schema124.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs8 = errors; - if ('command' !== data1) { - validate139.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema124.allOf[0].allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs8 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate139.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema124.allOf[0].allOf[1].properties.command.type, - parentSchema: schema124.allOf[0].allOf[1].properties.command, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate139.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema124.allOf[0].allOf[1].type, - parentSchema: schema124.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs6 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.command === undefined && (missing2 = 'command')) || - (data.connectionType === undefined && (missing2 = 'connectionType')) || - (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || - (data.services === undefined && (missing2 = 'services')) || - (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) - ) { - validate139.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema124.allOf[1].required, - parentSchema: schema124.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.command !== undefined) { - let data3 = data.command; - const _errs13 = errors; - if ('createPeerconnection' !== data3) { - validate139.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'createPeerconnection' }, - message: 'must be equal to constant', - schema: 'createPeerconnection', - parentSchema: schema124.allOf[1].properties.command, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.connectionType !== undefined) { - let data4 = data.connectionType; - const _errs14 = errors; - if (typeof data4 !== 'string') { - validate139.errors = [ - { - instancePath: instancePath + '/connectionType', - schemaPath: '#/allOf/1/properties/connectionType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema124.allOf[1].properties.connectionType.type, - parentSchema: schema124.allOf[1].properties.connectionType, - data: data4, - }, - ]; - return false; - } - if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { - validate139.errors = [ - { - instancePath: instancePath + '/connectionType', - schemaPath: '#/allOf/1/properties/connectionType/enum', - keyword: 'enum', - params: { - allowedValues: schema124.allOf[1].properties.connectionType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema124.allOf[1].properties.connectionType.enum, - parentSchema: schema124.allOf[1].properties.connectionType, - data: data4, - }, - ]; - return false; - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.connectionUrl !== undefined) { - let data5 = data.connectionUrl; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate139.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema124.allOf[1].properties.connectionUrl, - data: data5, - }, - ]; - return false; - } - } else { - validate139.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema124.allOf[1].properties.connectionUrl.type, - parentSchema: schema124.allOf[1].properties.connectionUrl, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.services !== undefined) { - let data6 = data.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data6)) { - var valid5 = true; - const len0 = data6.length; - for (let i0 = 0; i0 < len0; i0++) { - let data7 = data6[i0]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing3; - if ( - (data7.serviceType === undefined && - (missing3 = 'serviceType')) || - (data7.serviceId === undefined && - (missing3 = 'serviceId')) || - (data7.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate139.errors = [ - { - instancePath: instancePath + '/services/' + i0, - schemaPath: - '#/allOf/1/properties/services/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: - "must have required property '" + missing3 + "'", - schema: - schema124.allOf[1].properties.services.items.required, - parentSchema: - schema124.allOf[1].properties.services.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.serviceType !== undefined) { - let data8 = data7.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - validate139.errors = [ - { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema124.allOf[1].properties.services.items - .properties.serviceType, - data: data8, - }, - ]; - return false; - } - } else { - validate139.errors = [ - { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema124.allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema124.allOf[1].properties.services.items - .properties.serviceType, - data: data8, - }, - ]; - return false; - } - } - } - var valid6 = _errs23 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data7.serviceId !== undefined) { - let data9 = data7.serviceId; - const _errs25 = errors; - if (typeof data9 !== 'string') { - validate139.errors = [ - { - instancePath: - instancePath + '/services/' + i0 + '/serviceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema124.allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema124.allOf[1].properties.services.items - .properties.serviceId, - data: data9, - }, - ]; - return false; - } - var valid6 = _errs25 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data7.remoteServiceId !== undefined) { - let data10 = data7.remoteServiceId; - const _errs27 = errors; - if (typeof data10 !== 'string') { - validate139.errors = [ - { - instancePath: - instancePath + - '/services/' + - i0 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema124.allOf[1].properties.services.items - .properties.remoteServiceId.type, - parentSchema: - schema124.allOf[1].properties.services.items - .properties.remoteServiceId, - data: data10, - }, - ]; - return false; - } - var valid6 = _errs27 === errors; - } else { - var valid6 = true; - } - } - } - } - } else { - validate139.errors = [ - { - instancePath: instancePath + '/services/' + i0, - schemaPath: '#/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema124.allOf[1].properties.services.items.type, - parentSchema: - schema124.allOf[1].properties.services.items, - data: data7, - }, - ]; - return false; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - validate139.errors = [ - { - instancePath: instancePath + '/services', - schemaPath: '#/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema124.allOf[1].properties.services.type, - parentSchema: schema124.allOf[1].properties.services, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs18 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.tiebreaker !== undefined) { - let data11 = data.tiebreaker; - const _errs29 = errors; - if (typeof data11 !== 'boolean') { - validate139.errors = [ - { - instancePath: instancePath + '/tiebreaker', - schemaPath: '#/allOf/1/properties/tiebreaker/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema124.allOf[1].properties.tiebreaker.type, - parentSchema: schema124.allOf[1].properties.tiebreaker, - data: data11, - }, - ]; - return false; - } - var valid4 = _errs29 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.config !== undefined) { - let data12 = data.config; - const _errs31 = errors; - if (errors === _errs31) { - if ( - data12 && - typeof data12 == 'object' && - !Array.isArray(data12) - ) { - } else { - validate139.errors = [ - { - instancePath: instancePath + '/config', - schemaPath: '#/allOf/1/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema124.allOf[1].properties.config.type, - parentSchema: schema124.allOf[1].properties.config, - data: data12, - }, - ]; - return false; - } - } - var valid4 = _errs31 === errors; - } else { - var valid4 = true; - } - } - } - } - } - } - } - } else { - validate139.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema124.allOf[1].type, - parentSchema: schema124.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate139.errors = vErrors; - return errors === 0; -} -exports.validateClosePeerconnectionMessageRequest = validate140; -const schema125 = { - title: 'Close Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { messageType: { const: 'command' }, command: { type: 'string' } }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'closePeerconnection' }, - connectionUrl: { type: 'string', format: 'uri' }, - }, - required: ['command', 'connectionUrl'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ClosePeerconnectionMessageRequest', - 'x-location': '#/components/schemas/close_peerconnection_message_request', - 'x-schema-type': 'request', -}; -function validate140( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate140.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema125.allOf[0].allOf[0].required, - parentSchema: schema125.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate140.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema125.allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema125.allOf[0].allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate140.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema125.allOf[0].allOf[0].type, - parentSchema: schema125.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs6 = errors; - if (errors === _errs6) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - validate140.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema125.allOf[0].allOf[1].required, - parentSchema: schema125.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs8 = errors; - if ('command' !== data1) { - validate140.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema125.allOf[0].allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs8 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate140.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema125.allOf[0].allOf[1].properties.command.type, - parentSchema: schema125.allOf[0].allOf[1].properties.command, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate140.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema125.allOf[0].allOf[1].type, - parentSchema: schema125.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs6 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.command === undefined && (missing2 = 'command')) || - (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) - ) { - validate140.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema125.allOf[1].required, - parentSchema: schema125.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.command !== undefined) { - let data3 = data.command; - const _errs13 = errors; - if ('closePeerconnection' !== data3) { - validate140.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'closePeerconnection' }, - message: 'must be equal to constant', - schema: 'closePeerconnection', - parentSchema: schema125.allOf[1].properties.command, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.connectionUrl !== undefined) { - let data4 = data.connectionUrl; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data4 === 'string') { - if (!formats0(data4)) { - validate140.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema125.allOf[1].properties.connectionUrl, - data: data4, - }, - ]; - return false; - } - } else { - validate140.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema125.allOf[1].properties.connectionUrl.type, - parentSchema: schema125.allOf[1].properties.connectionUrl, - data: data4, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate140.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema125.allOf[1].type, - parentSchema: schema125.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate140.errors = vErrors; - return errors === 0; -} -exports.validateClosePeerconnectionMessageResponse = validate141; -const schema126 = { - title: 'Close Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { messageType: { const: 'command' }, command: { type: 'string' } }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'closePeerconnection' }, - connectionUrl: { type: 'string', format: 'uri' }, - }, - required: ['command', 'connectionUrl'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ClosePeerconnectionMessageResponse', - 'x-location': '#/components/schemas/close_peerconnection_message_response', - 'x-schema-type': 'response', -}; -function validate141( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate141.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema126.allOf[0].allOf[0].required, - parentSchema: schema126.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate141.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema126.allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema126.allOf[0].allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate141.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema126.allOf[0].allOf[0].type, - parentSchema: schema126.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs6 = errors; - if (errors === _errs6) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - validate141.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema126.allOf[0].allOf[1].required, - parentSchema: schema126.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs8 = errors; - if ('command' !== data1) { - validate141.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema126.allOf[0].allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs8 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate141.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema126.allOf[0].allOf[1].properties.command.type, - parentSchema: schema126.allOf[0].allOf[1].properties.command, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate141.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema126.allOf[0].allOf[1].type, - parentSchema: schema126.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs6 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.command === undefined && (missing2 = 'command')) || - (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) - ) { - validate141.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema126.allOf[1].required, - parentSchema: schema126.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.command !== undefined) { - let data3 = data.command; - const _errs13 = errors; - if ('closePeerconnection' !== data3) { - validate141.errors = [ - { - instancePath: instancePath + '/command', - schemaPath: '#/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'closePeerconnection' }, - message: 'must be equal to constant', - schema: 'closePeerconnection', - parentSchema: schema126.allOf[1].properties.command, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.connectionUrl !== undefined) { - let data4 = data.connectionUrl; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data4 === 'string') { - if (!formats0(data4)) { - validate141.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema126.allOf[1].properties.connectionUrl, - data: data4, - }, - ]; - return false; - } - } else { - validate141.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema126.allOf[1].properties.connectionUrl.type, - parentSchema: schema126.allOf[1].properties.connectionUrl, - data: data4, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate141.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema126.allOf[1].type, - parentSchema: schema126.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate141.errors = vErrors; - return errors === 0; -} -exports.validateSignalingMessageRequest = validate142; -const schema127 = { - title: 'Signaling Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'signaling' }, - signalingType: { type: 'string' }, - connectionUrl: { type: 'string', format: 'uri' }, - content: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'signalingType', 'connectionUrl', 'content'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'SignalingMessageRequest', - 'x-location': '#/components/schemas/signaling_message_request', - 'x-schema-type': 'request', -}; -function validate142( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate142.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema127.allOf[0].required, - parentSchema: schema127.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate142.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema127.allOf[0].properties.messageType.type, - parentSchema: schema127.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate142.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema127.allOf[0].type, - parentSchema: schema127.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.signalingType === undefined && (missing1 = 'signalingType')) || - (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || - (data.content === undefined && (missing1 = 'content')) - ) { - validate142.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema127.allOf[1].required, - parentSchema: schema127.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('signaling' !== data1) { - validate142.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'signaling' }, - message: 'must be equal to constant', - schema: 'signaling', - parentSchema: schema127.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.signalingType !== undefined) { - let data2 = data.signalingType; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate142.errors = [ - { - instancePath: instancePath + '/signalingType', - schemaPath: '#/allOf/1/properties/signalingType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema127.allOf[1].properties.signalingType.type, - parentSchema: schema127.allOf[1].properties.signalingType, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.connectionUrl !== undefined) { - let data3 = data.connectionUrl; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate142.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema127.allOf[1].properties.connectionUrl, - data: data3, - }, - ]; - return false; - } - } else { - validate142.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema127.allOf[1].properties.connectionUrl.type, - parentSchema: schema127.allOf[1].properties.connectionUrl, - data: data3, - }, - ]; - return false; - } - } - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.content !== undefined) { - let data4 = data.content; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - } else { - validate142.errors = [ - { - instancePath: instancePath + '/content', - schemaPath: '#/allOf/1/properties/content/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema127.allOf[1].properties.content.type, - parentSchema: schema127.allOf[1].properties.content, - data: data4, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } else { - validate142.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema127.allOf[1].type, - parentSchema: schema127.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate142.errors = vErrors; - return errors === 0; -} -exports.validateSignalingMessageResponse = validate143; -const schema128 = { - title: 'Signaling Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'signaling' }, - signalingType: { type: 'string' }, - connectionUrl: { type: 'string', format: 'uri' }, - content: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'signalingType', 'connectionUrl', 'content'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'SignalingMessageResponse', - 'x-location': '#/components/schemas/signaling_message_response', - 'x-schema-type': 'response', -}; -function validate143( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate143.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema128.allOf[0].required, - parentSchema: schema128.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate143.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema128.allOf[0].properties.messageType.type, - parentSchema: schema128.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate143.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema128.allOf[0].type, - parentSchema: schema128.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.signalingType === undefined && (missing1 = 'signalingType')) || - (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || - (data.content === undefined && (missing1 = 'content')) - ) { - validate143.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema128.allOf[1].required, - parentSchema: schema128.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('signaling' !== data1) { - validate143.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'signaling' }, - message: 'must be equal to constant', - schema: 'signaling', - parentSchema: schema128.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.signalingType !== undefined) { - let data2 = data.signalingType; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate143.errors = [ - { - instancePath: instancePath + '/signalingType', - schemaPath: '#/allOf/1/properties/signalingType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema128.allOf[1].properties.signalingType.type, - parentSchema: schema128.allOf[1].properties.signalingType, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.connectionUrl !== undefined) { - let data3 = data.connectionUrl; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate143.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema128.allOf[1].properties.connectionUrl, - data: data3, - }, - ]; - return false; - } - } else { - validate143.errors = [ - { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema128.allOf[1].properties.connectionUrl.type, - parentSchema: schema128.allOf[1].properties.connectionUrl, - data: data3, - }, - ]; - return false; - } - } - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.content !== undefined) { - let data4 = data.content; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - } else { - validate143.errors = [ - { - instancePath: instancePath + '/content', - schemaPath: '#/allOf/1/properties/content/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema128.allOf[1].properties.content.type, - parentSchema: schema128.allOf[1].properties.content, - data: data4, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } else { - validate143.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema128.allOf[1].type, - parentSchema: schema128.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate143.errors = vErrors; - return errors === 0; -} -exports.validateConfigurationMessageRequest = validate144; -const schema129 = { - title: 'Configuration Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'configuration' }, - configuration: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'configuration'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ConfigurationMessageRequest', - 'x-location': '#/components/schemas/configuration_message_request', - 'x-schema-type': 'request', -}; -function validate144( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate144.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema129.allOf[0].required, - parentSchema: schema129.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate144.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema129.allOf[0].properties.messageType.type, - parentSchema: schema129.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate144.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema129.allOf[0].type, - parentSchema: schema129.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.configuration === undefined && (missing1 = 'configuration')) - ) { - validate144.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema129.allOf[1].required, - parentSchema: schema129.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('configuration' !== data1) { - validate144.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'configuration' }, - message: 'must be equal to constant', - schema: 'configuration', - parentSchema: schema129.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.configuration !== undefined) { - let data2 = data.configuration; - const _errs8 = errors; - if (errors === _errs8) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - } else { - validate144.errors = [ - { - instancePath: instancePath + '/configuration', - schemaPath: '#/allOf/1/properties/configuration/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema129.allOf[1].properties.configuration.type, - parentSchema: schema129.allOf[1].properties.configuration, - data: data2, - }, - ]; - return false; - } - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - } - } - } else { - validate144.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema129.allOf[1].type, - parentSchema: schema129.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate144.errors = vErrors; - return errors === 0; -} -exports.validateConfigurationMessageResponse = validate145; -const schema130 = { - title: 'Configuration Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'configuration' }, - configuration: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'configuration'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ConfigurationMessageResponse', - 'x-location': '#/components/schemas/configuration_message_response', - 'x-schema-type': 'response', -}; -function validate145( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate145.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema130.allOf[0].required, - parentSchema: schema130.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate145.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema130.allOf[0].properties.messageType.type, - parentSchema: schema130.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate145.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema130.allOf[0].type, - parentSchema: schema130.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.configuration === undefined && (missing1 = 'configuration')) - ) { - validate145.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema130.allOf[1].required, - parentSchema: schema130.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('configuration' !== data1) { - validate145.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'configuration' }, - message: 'must be equal to constant', - schema: 'configuration', - parentSchema: schema130.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.configuration !== undefined) { - let data2 = data.configuration; - const _errs8 = errors; - if (errors === _errs8) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - } else { - validate145.errors = [ - { - instancePath: instancePath + '/configuration', - schemaPath: '#/allOf/1/properties/configuration/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema130.allOf[1].properties.configuration.type, - parentSchema: schema130.allOf[1].properties.configuration, - data: data2, - }, - ]; - return false; - } - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - } - } - } else { - validate145.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema130.allOf[1].type, - parentSchema: schema130.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate145.errors = vErrors; - return errors === 0; -} -exports.validateExperimentStatusChangedMessageRequest = validate146; -const schema131 = { - title: 'Experiment Status Changed Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'experiment-status-changed' }, - status: { type: 'string' }, - message: { type: 'string' }, - }, - required: ['messageType', 'status'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ExperimentStatusChangedMessageRequest', - 'x-location': '#/components/schemas/experiment_status_changed_message_request', - 'x-schema-type': 'request', -}; -function validate146( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate146.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema131.allOf[0].required, - parentSchema: schema131.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate146.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema131.allOf[0].properties.messageType.type, - parentSchema: schema131.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate146.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema131.allOf[0].type, - parentSchema: schema131.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.status === undefined && (missing1 = 'status')) - ) { - validate146.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema131.allOf[1].required, - parentSchema: schema131.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('experiment-status-changed' !== data1) { - validate146.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'experiment-status-changed' }, - message: 'must be equal to constant', - schema: 'experiment-status-changed', - parentSchema: schema131.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate146.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/1/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema131.allOf[1].properties.status.type, - parentSchema: schema131.allOf[1].properties.status, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.message !== undefined) { - let data3 = data.message; - const _errs10 = errors; - if (typeof data3 !== 'string') { - validate146.errors = [ - { - instancePath: instancePath + '/message', - schemaPath: '#/allOf/1/properties/message/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema131.allOf[1].properties.message.type, - parentSchema: schema131.allOf[1].properties.message, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate146.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema131.allOf[1].type, - parentSchema: schema131.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate146.errors = vErrors; - return errors === 0; -} -exports.validateExperimentStatusChangedMessageResponse = validate147; -const schema132 = { - title: 'Experiment Status Changed Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'experiment-status-changed' }, - status: { type: 'string' }, - message: { type: 'string' }, - }, - required: ['messageType', 'status'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'ExperimentStatusChangedMessageResponse', - 'x-location': '#/components/schemas/experiment_status_changed_message_response', - 'x-schema-type': 'response', -}; -function validate147( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate147.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema132.allOf[0].required, - parentSchema: schema132.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate147.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema132.allOf[0].properties.messageType.type, - parentSchema: schema132.allOf[0].properties.messageType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate147.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema132.allOf[0].type, - parentSchema: schema132.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.status === undefined && (missing1 = 'status')) - ) { - validate147.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema132.allOf[1].required, - parentSchema: schema132.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('experiment-status-changed' !== data1) { - validate147.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'experiment-status-changed' }, - message: 'must be equal to constant', - schema: 'experiment-status-changed', - parentSchema: schema132.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate147.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/1/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema132.allOf[1].properties.status.type, - parentSchema: schema132.allOf[1].properties.status, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.message !== undefined) { - let data3 = data.message; - const _errs10 = errors; - if (typeof data3 !== 'string') { - validate147.errors = [ - { - instancePath: instancePath + '/message', - schemaPath: '#/allOf/1/properties/message/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema132.allOf[1].properties.message.type, - parentSchema: schema132.allOf[1].properties.message, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate147.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema132.allOf[1].type, - parentSchema: schema132.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } - validate147.errors = vErrors; - return errors === 0; -} -exports.validateConnectionStatusRequest = validate148; -const schema133 = { - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - 'x-standalone': true, - 'x-name': 'ConnectionStatusRequest', - 'x-location': '#/components/schemas/peerconnection_status_request', - 'x-schema-type': 'request', -}; -function validate148( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate148.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema133.type, - parentSchema: schema133, - data, - }, - ]; - return false; - } - if ( - !( - data === 'new' || - data === 'connecting' || - data === 'connected' || - data === 'disconnected' || - data === 'failed' || - data === 'closed' - ) - ) { - validate148.errors = [ - { - instancePath, - schemaPath: '#/enum', - keyword: 'enum', - params: { allowedValues: schema133.enum }, - message: 'must be equal to one of the allowed values', - schema: schema133.enum, - parentSchema: schema133, - data, - }, - ]; - return false; - } - validate148.errors = vErrors; - return errors === 0; -} -exports.validateConnectionStatusResponse = validate149; -const schema134 = { - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - 'x-standalone': true, - 'x-name': 'ConnectionStatusResponse', - 'x-location': '#/components/schemas/peerconnection_status_response', - 'x-schema-type': 'response', -}; -function validate149( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate149.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema134.type, - parentSchema: schema134, - data, - }, - ]; - return false; - } - if ( - !( - data === 'new' || - data === 'connecting' || - data === 'connected' || - data === 'disconnected' || - data === 'failed' || - data === 'closed' - ) - ) { - validate149.errors = [ - { - instancePath, - schemaPath: '#/enum', - keyword: 'enum', - params: { allowedValues: schema134.enum }, - message: 'must be equal to one of the allowed values', - schema: schema134.enum, - parentSchema: schema134, - data, - }, - ]; - return false; - } - validate149.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionCommonRequest = validate150; -const schema135 = { - type: 'object', - title: 'Peerconnection Common', - properties: { - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - }, - required: ['type'], - 'x-standalone': true, - 'x-name': 'PeerconnectionCommonRequest', - 'x-location': '#/components/schemas/peerconnection_common_request', - 'x-schema-type': 'request', -}; -function validate150( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate150.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema135.required, - parentSchema: schema135, - data, - }, - ]; - return false; - } else { - if (data.type !== undefined) { - let data0 = data.type; - if (typeof data0 !== 'string') { - validate150.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema135.properties.type.type, - parentSchema: schema135.properties.type, - data: data0, - }, - ]; - return false; - } - if (!(data0 === 'local' || data0 === 'webrtc')) { - validate150.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema135.properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema135.properties.type.enum, - parentSchema: schema135.properties.type, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate150.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema135.type, - parentSchema: schema135, - data, - }, - ]; - return false; - } - } - validate150.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionCommonResponse = validate151; -const schema136 = { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - 'x-standalone': true, - 'x-name': 'PeerconnectionCommonResponse', - 'x-location': '#/components/schemas/peerconnection_common_response', - 'x-schema-type': 'response', -}; -function validate151( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate151.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema136.required, - parentSchema: schema136, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate151.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema136.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate151.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema136.properties.url.type, - parentSchema: schema136.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs3 = errors; - if (typeof data1 !== 'string') { - validate151.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema136.properties.type.type, - parentSchema: schema136.properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate151.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema136.properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema136.properties.type.enum, - parentSchema: schema136.properties.type, - data: data1, - }, - ]; - return false; - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs5 = errors; - if (typeof data2 !== 'string') { - validate151.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema136.properties.status.type, - parentSchema: schema136.properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate151.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema136.properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema136.properties.status.enum, - parentSchema: schema136.properties.status, - data: data2, - }, - ]; - return false; - } - var valid0 = _errs5 === errors; - } else { - var valid0 = true; - } - } - } - } - } else { - validate151.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema136.type, - parentSchema: schema136, - data, - }, - ]; - return false; - } - } - validate151.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionOverviewRequest = validate152; -const schema137 = { - title: 'Peerconnection Overview', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-standalone': true, - 'x-name': 'PeerconnectionOverviewRequest', - 'x-location': '#/components/schemas/peerconnection_overview_request', - 'x-schema-type': 'request', -}; -function validate152( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate152.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema137.allOf[0].required, - parentSchema: schema137.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.type !== undefined) { - let data0 = data.type; - if (typeof data0 !== 'string') { - validate152.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema137.allOf[0].properties.type.type, - parentSchema: schema137.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - if (!(data0 === 'local' || data0 === 'webrtc')) { - validate152.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema137.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema137.allOf[0].properties.type.enum, - parentSchema: schema137.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate152.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema137.allOf[0].type, - parentSchema: schema137.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs4 = errors; - if (errors === _errs4) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate152.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema137.allOf[1].required, - parentSchema: schema137.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data1 = data.devices; - const _errs6 = errors; - if (errors === _errs6) { - if (Array.isArray(data1)) { - if (data1.length > 2) { - validate152.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema137.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - if (data1.length < 2) { - validate152.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema137.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; - const _errs8 = errors; - if (errors === _errs8) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - let missing2; - if (data2.url === undefined && (missing2 = 'url')) { - validate152.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema137.allOf[1].properties.devices.items.required, - parentSchema: schema137.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } else { - if (data2.url !== undefined) { - let data3 = data2.url; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate152.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema137.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } else { - validate152.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema137.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema137.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } - } - } - } - } else { - validate152.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema137.allOf[1].properties.devices.items.type, - parentSchema: schema137.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } - } - var valid3 = _errs8 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate152.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema137.allOf[1].properties.devices.type, - parentSchema: schema137.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } - } - } - } - } else { - validate152.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema137.allOf[1].type, - parentSchema: schema137.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs4 === errors; - } - validate152.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionOverviewResponse = validate153; -const schema138 = { - title: 'Peerconnection Overview', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-standalone': true, - 'x-name': 'PeerconnectionOverviewResponse', - 'x-location': '#/components/schemas/peerconnection_overview_response', - 'x-schema-type': 'response', -}; -function validate153( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate153.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema138.allOf[0].required, - parentSchema: schema138.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate153.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema138.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate153.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema138.allOf[0].properties.url.type, - parentSchema: schema138.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate153.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema138.allOf[0].properties.type.type, - parentSchema: schema138.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate153.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema138.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema138.allOf[0].properties.type.enum, - parentSchema: schema138.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate153.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema138.allOf[0].properties.status.type, - parentSchema: schema138.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate153.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema138.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema138.allOf[0].properties.status.enum, - parentSchema: schema138.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate153.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema138.allOf[0].type, - parentSchema: schema138.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate153.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema138.allOf[1].required, - parentSchema: schema138.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate153.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema138.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate153.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema138.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate153.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema138.allOf[1].properties.devices.items.required, - parentSchema: schema138.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate153.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema138.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate153.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema138.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema138.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - } - } - } else { - validate153.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema138.allOf[1].properties.devices.items.type, - parentSchema: schema138.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate153.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema138.allOf[1].properties.devices.type, - parentSchema: schema138.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate153.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema138.allOf[1].type, - parentSchema: schema138.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate153.errors = vErrors; - return errors === 0; -} -exports.validateConfiguredDeviceReferenceRequest = validate154; -const schema139 = { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - 'x-standalone': true, - 'x-name': 'ConfiguredDeviceReferenceRequest', - 'x-location': '#/components/schemas/configured_device_reference_request', - 'x-schema-type': 'request', -}; -function validate154( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.url === undefined && (missing0 = 'url')) { - validate154.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema139.required, - parentSchema: schema139, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate154.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema139.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate154.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema139.properties.url.type, - parentSchema: schema139.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.config !== undefined) { - let data1 = data.config; - const _errs3 = errors; - if (errors === _errs3) { - if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { - if (data1.services !== undefined) { - let data2 = data1.services; - const _errs5 = errors; - if (errors === _errs5) { - if (Array.isArray(data2)) { - var valid2 = true; - const len0 = data2.length; - for (let i0 = 0; i0 < len0; i0++) { - let data3 = data2[i0]; - const _errs7 = errors; - if (errors === _errs7) { - if ( - data3 && - typeof data3 == 'object' && - !Array.isArray(data3) - ) { - let missing1; - if ( - (data3.serviceType === undefined && - (missing1 = 'serviceType')) || - (data3.serviceId === undefined && - (missing1 = 'serviceId')) || - (data3.remoteServiceId === undefined && - (missing1 = 'remoteServiceId')) - ) { - validate154.errors = [ - { - instancePath: instancePath + '/config/services/' + i0, - schemaPath: - '#/properties/config/properties/services/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema139.properties.config.properties.services.items - .required, - parentSchema: - schema139.properties.config.properties.services.items, - data: data3, - }, - ]; - return false; - } else { - if (data3.serviceType !== undefined) { - let data4 = data3.serviceType; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data4 === 'string') { - if (!formats0(data4)) { - validate154.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/serviceType', - schemaPath: - '#/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema139.properties.config.properties - .services.items.properties.serviceType, - data: data4, - }, - ]; - return false; - } - } else { - validate154.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/serviceType', - schemaPath: - '#/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema139.properties.config.properties - .services.items.properties.serviceType.type, - parentSchema: - schema139.properties.config.properties - .services.items.properties.serviceType, - data: data4, - }, - ]; - return false; - } - } - } - var valid3 = _errs10 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.serviceId !== undefined) { - let data5 = data3.serviceId; - const _errs12 = errors; - if (typeof data5 !== 'string') { - validate154.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/serviceId', - schemaPath: - '#/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema139.properties.config.properties.services - .items.properties.serviceId.type, - parentSchema: - schema139.properties.config.properties.services - .items.properties.serviceId, - data: data5, - }, - ]; - return false; - } - var valid3 = _errs12 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.remoteServiceId !== undefined) { - let data6 = data3.remoteServiceId; - const _errs14 = errors; - if (typeof data6 !== 'string') { - validate154.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/remoteServiceId', - schemaPath: - '#/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema139.properties.config.properties - .services.items.properties.remoteServiceId - .type, - parentSchema: - schema139.properties.config.properties - .services.items.properties.remoteServiceId, - data: data6, - }, - ]; - return false; - } - var valid3 = _errs14 === errors; - } else { - var valid3 = true; - } - } - } - } - } else { - validate154.errors = [ - { - instancePath: instancePath + '/config/services/' + i0, - schemaPath: - '#/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema139.properties.config.properties.services.items - .type, - parentSchema: - schema139.properties.config.properties.services.items, - data: data3, - }, - ]; - return false; - } - } - var valid2 = _errs7 === errors; - if (!valid2) { - break; - } - } - } else { - validate154.errors = [ - { - instancePath: instancePath + '/config/services', - schemaPath: '#/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema139.properties.config.properties.services.type, - parentSchema: schema139.properties.config.properties.services, - data: data2, - }, - ]; - return false; - } - } - } - } else { - validate154.errors = [ - { - instancePath: instancePath + '/config', - schemaPath: '#/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema139.properties.config.type, - parentSchema: schema139.properties.config, - data: data1, - }, - ]; - return false; - } - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - } - } - } else { - validate154.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema139.type, - parentSchema: schema139, - data, - }, - ]; - return false; - } - } - validate154.errors = vErrors; - return errors === 0; -} -exports.validateConfiguredDeviceReferenceResponse = validate155; -const schema140 = { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - 'x-standalone': true, - 'x-name': 'ConfiguredDeviceReferenceResponse', - 'x-location': '#/components/schemas/configured_device_reference_response', - 'x-schema-type': 'response', -}; -function validate155( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.url === undefined && (missing0 = 'url')) { - validate155.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema140.required, - parentSchema: schema140, - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs1 = errors; - if (errors === _errs1) { - if (errors === _errs1) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate155.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema140.properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate155.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema140.properties.url.type, - parentSchema: schema140.properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.config !== undefined) { - let data1 = data.config; - const _errs3 = errors; - if (errors === _errs3) { - if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { - if (data1.services !== undefined) { - let data2 = data1.services; - const _errs5 = errors; - if (errors === _errs5) { - if (Array.isArray(data2)) { - var valid2 = true; - const len0 = data2.length; - for (let i0 = 0; i0 < len0; i0++) { - let data3 = data2[i0]; - const _errs7 = errors; - if (errors === _errs7) { - if ( - data3 && - typeof data3 == 'object' && - !Array.isArray(data3) - ) { - let missing1; - if ( - (data3.serviceType === undefined && - (missing1 = 'serviceType')) || - (data3.serviceId === undefined && - (missing1 = 'serviceId')) || - (data3.remoteServiceId === undefined && - (missing1 = 'remoteServiceId')) - ) { - validate155.errors = [ - { - instancePath: instancePath + '/config/services/' + i0, - schemaPath: - '#/properties/config/properties/services/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema140.properties.config.properties.services.items - .required, - parentSchema: - schema140.properties.config.properties.services.items, - data: data3, - }, - ]; - return false; - } else { - if (data3.serviceType !== undefined) { - let data4 = data3.serviceType; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data4 === 'string') { - if (!formats0(data4)) { - validate155.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/serviceType', - schemaPath: - '#/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema140.properties.config.properties - .services.items.properties.serviceType, - data: data4, - }, - ]; - return false; - } - } else { - validate155.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/serviceType', - schemaPath: - '#/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema140.properties.config.properties - .services.items.properties.serviceType.type, - parentSchema: - schema140.properties.config.properties - .services.items.properties.serviceType, - data: data4, - }, - ]; - return false; - } - } - } - var valid3 = _errs10 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.serviceId !== undefined) { - let data5 = data3.serviceId; - const _errs12 = errors; - if (typeof data5 !== 'string') { - validate155.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/serviceId', - schemaPath: - '#/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema140.properties.config.properties.services - .items.properties.serviceId.type, - parentSchema: - schema140.properties.config.properties.services - .items.properties.serviceId, - data: data5, - }, - ]; - return false; - } - var valid3 = _errs12 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data3.remoteServiceId !== undefined) { - let data6 = data3.remoteServiceId; - const _errs14 = errors; - if (typeof data6 !== 'string') { - validate155.errors = [ - { - instancePath: - instancePath + - '/config/services/' + - i0 + - '/remoteServiceId', - schemaPath: - '#/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema140.properties.config.properties - .services.items.properties.remoteServiceId - .type, - parentSchema: - schema140.properties.config.properties - .services.items.properties.remoteServiceId, - data: data6, - }, - ]; - return false; - } - var valid3 = _errs14 === errors; - } else { - var valid3 = true; - } - } - } - } - } else { - validate155.errors = [ - { - instancePath: instancePath + '/config/services/' + i0, - schemaPath: - '#/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema140.properties.config.properties.services.items - .type, - parentSchema: - schema140.properties.config.properties.services.items, - data: data3, - }, - ]; - return false; - } - } - var valid2 = _errs7 === errors; - if (!valid2) { - break; - } - } - } else { - validate155.errors = [ - { - instancePath: instancePath + '/config/services', - schemaPath: '#/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema140.properties.config.properties.services.type, - parentSchema: schema140.properties.config.properties.services, - data: data2, - }, - ]; - return false; - } - } - } - } else { - validate155.errors = [ - { - instancePath: instancePath + '/config', - schemaPath: '#/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema140.properties.config.type, - parentSchema: schema140.properties.config, - data: data1, - }, - ]; - return false; - } - } - var valid0 = _errs3 === errors; - } else { - var valid0 = true; - } - } - } - } else { - validate155.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema140.type, - parentSchema: schema140, - data, - }, - ]; - return false; - } - } - validate155.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionRequest = validate156; -const schema141 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'PeerconnectionRequest', - 'x-location': '#/components/schemas/peerconnection_request', - 'x-schema-type': 'request', -}; -function validate156( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate156.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema141.allOf[0].required, - parentSchema: schema141.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.type !== undefined) { - let data0 = data.type; - if (typeof data0 !== 'string') { - validate156.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema141.allOf[0].properties.type.type, - parentSchema: schema141.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - if (!(data0 === 'local' || data0 === 'webrtc')) { - validate156.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema141.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema141.allOf[0].properties.type.enum, - parentSchema: schema141.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate156.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema141.allOf[0].type, - parentSchema: schema141.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs4 = errors; - if (errors === _errs4) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate156.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema141.allOf[1].required, - parentSchema: schema141.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data1 = data.devices; - const _errs6 = errors; - if (errors === _errs6) { - if (Array.isArray(data1)) { - if (data1.length > 2) { - validate156.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema141.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - if (data1.length < 2) { - validate156.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema141.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; - const _errs8 = errors; - if (errors === _errs8) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - let missing2; - if (data2.url === undefined && (missing2 = 'url')) { - validate156.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema141.allOf[1].properties.devices.items.required, - parentSchema: schema141.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } else { - if (data2.url !== undefined) { - let data3 = data2.url; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate156.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema141.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } else { - validate156.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema141.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema141.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } - } - var valid4 = _errs10 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data2.config !== undefined) { - let data4 = data2.config; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data4 && - typeof data4 == 'object' && - !Array.isArray(data4) - ) { - if (data4.services !== undefined) { - let data5 = data4.services; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid6 = true; - const len1 = data5.length; - for (let i1 = 0; i1 < len1; i1++) { - let data6 = data5[i1]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing3; - if ( - (data6.serviceType === undefined && - (missing3 = 'serviceType')) || - (data6.serviceId === undefined && - (missing3 = 'serviceId')) || - (data6.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate156.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema141.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema141.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.serviceType !== undefined) { - let data7 = data6.serviceType; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate156.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema141.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data7, - }, - ]; - return false; - } - } else { - validate156.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema141.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema141.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data7, - }, - ]; - return false; - } - } - } - var valid7 = _errs19 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data6.serviceId !== undefined) { - let data8 = data6.serviceId; - const _errs21 = errors; - if (typeof data8 !== 'string') { - validate156.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema141.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId - .type, - parentSchema: - schema141.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId, - data: data8, - }, - ]; - return false; - } - var valid7 = _errs21 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data6.remoteServiceId !== - undefined - ) { - let data9 = data6.remoteServiceId; - const _errs23 = errors; - if (typeof data9 !== 'string') { - validate156.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema141.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema141.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data9, - }, - ]; - return false; - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate156.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema141.allOf[1].properties - .devices.items.properties.config - .properties.services.items.type, - parentSchema: - schema141.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data6, - }, - ]; - return false; - } - } - var valid6 = _errs16 === errors; - if (!valid6) { - break; - } - } - } else { - validate156.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema141.allOf[1].properties.devices - .items.properties.config.properties - .services.type, - parentSchema: - schema141.allOf[1].properties.devices - .items.properties.config.properties - .services, - data: data5, - }, - ]; - return false; - } - } - } - } else { - validate156.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema141.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema141.allOf[1].properties.devices.items - .properties.config, - data: data4, - }, - ]; - return false; - } - } - var valid4 = _errs12 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate156.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema141.allOf[1].properties.devices.items.type, - parentSchema: schema141.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } - } - var valid3 = _errs8 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate156.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema141.allOf[1].properties.devices.type, - parentSchema: schema141.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } - } - } - } - } else { - validate156.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema141.allOf[1].type, - parentSchema: schema141.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs4 === errors; - } - validate156.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionResponse = validate157; -const schema142 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'PeerconnectionResponse', - 'x-location': '#/components/schemas/peerconnection_response', - 'x-schema-type': 'response', -}; -function validate157( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate157.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema142.allOf[0].required, - parentSchema: schema142.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate157.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema142.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate157.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema142.allOf[0].properties.url.type, - parentSchema: schema142.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate157.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema142.allOf[0].properties.type.type, - parentSchema: schema142.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate157.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema142.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema142.allOf[0].properties.type.enum, - parentSchema: schema142.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate157.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema142.allOf[0].properties.status.type, - parentSchema: schema142.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate157.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema142.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema142.allOf[0].properties.status.enum, - parentSchema: schema142.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate157.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema142.allOf[0].type, - parentSchema: schema142.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate157.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema142.allOf[1].required, - parentSchema: schema142.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate157.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema142.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate157.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema142.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate157.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema142.allOf[1].properties.devices.items.required, - parentSchema: schema142.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate157.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema142.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate157.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema142.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema142.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.config !== undefined) { - let data6 = data4.config; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - if (data6.services !== undefined) { - let data7 = data6.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid6 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing3; - if ( - (data8.serviceType === undefined && - (missing3 = 'serviceType')) || - (data8.serviceId === undefined && - (missing3 = 'serviceId')) || - (data8.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate157.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema142.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema142.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.serviceType !== undefined) { - let data9 = data8.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate157.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema142.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } else { - validate157.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema142.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema142.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data8.serviceId !== undefined) { - let data10 = data8.serviceId; - const _errs25 = errors; - if (typeof data10 !== 'string') { - validate157.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema142.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId - .type, - parentSchema: - schema142.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId, - data: data10, - }, - ]; - return false; - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data8.remoteServiceId !== - undefined - ) { - let data11 = - data8.remoteServiceId; - const _errs27 = errors; - if (typeof data11 !== 'string') { - validate157.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema142.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema142.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data11, - }, - ]; - return false; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate157.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema142.allOf[1].properties - .devices.items.properties.config - .properties.services.items.type, - parentSchema: - schema142.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } - } - var valid6 = _errs20 === errors; - if (!valid6) { - break; - } - } - } else { - validate157.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema142.allOf[1].properties.devices - .items.properties.config.properties - .services.type, - parentSchema: - schema142.allOf[1].properties.devices - .items.properties.config.properties - .services, - data: data7, - }, - ]; - return false; - } - } - } - } else { - validate157.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema142.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema142.allOf[1].properties.devices.items - .properties.config, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate157.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema142.allOf[1].properties.devices.items.type, - parentSchema: schema142.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate157.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema142.allOf[1].properties.devices.type, - parentSchema: schema142.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate157.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema142.allOf[1].type, - parentSchema: schema142.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate157.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionClosedEventCallbackRequest = validate158; -const schema143 = { - title: 'Peerconnection Closed Event Callback', - allOf: [ - { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - eventType: { type: 'string', enum: ['peerconnection-closed'] }, - peerconnection: { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - }, - required: ['eventType', 'peerconnection'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'PeerconnectionClosedEventCallbackRequest', - 'x-location': '#/components/schemas/peerconnection_closed_request', - 'x-schema-type': 'request', -}; -function validate158( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate158.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema143.allOf[0].allOf[0].required, - parentSchema: schema143.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate158.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema143.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema143.allOf[0].allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate158.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema143.allOf[0].allOf[0].type, - parentSchema: schema143.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate158.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema143.allOf[0].allOf[1].required, - parentSchema: schema143.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs7 = errors; - if (typeof data1 !== 'string') { - validate158.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema143.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema143.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate158.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: - schema143.allOf[0].allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema143.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema143.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs7 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate158.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema143.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema143.allOf[0].allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate158.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema143.allOf[0].allOf[1].type, - parentSchema: schema143.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.eventType === undefined && (missing2 = 'eventType')) || - (data.peerconnection === undefined && (missing2 = 'peerconnection')) - ) { - validate158.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema143.allOf[1].required, - parentSchema: schema143.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.eventType !== undefined) { - let data3 = data.eventType; - const _errs13 = errors; - if (typeof data3 !== 'string') { - validate158.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema143.allOf[1].properties.eventType.type, - parentSchema: schema143.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - if (!(data3 === 'peerconnection-closed')) { - validate158.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/enum', - keyword: 'enum', - params: { allowedValues: schema143.allOf[1].properties.eventType.enum }, - message: 'must be equal to one of the allowed values', - schema: schema143.allOf[1].properties.eventType.enum, - parentSchema: schema143.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.peerconnection !== undefined) { - let data4 = data.peerconnection; - const _errs15 = errors; - const _errs16 = errors; - if (errors === _errs16) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing3; - if (data4.type === undefined && (missing3 = 'type')) { - validate158.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema143.allOf[1].properties.peerconnection.allOf[0].required, - parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } else { - if (data4.type !== undefined) { - let data5 = data4.type; - if (typeof data5 !== 'string') { - validate158.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema143.allOf[1].properties.peerconnection.allOf[0] - .properties.type.type, - parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data5, - }, - ]; - return false; - } - if (!(data5 === 'local' || data5 === 'webrtc')) { - validate158.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema143.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema143.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data5, - }, - ]; - return false; - } - } - } - } else { - validate158.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema143.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema143.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs16 === errors; - if (valid5) { - const _errs20 = errors; - if (errors === _errs20) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing4; - if (data4.devices === undefined && (missing4 = 'devices')) { - validate158.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: - schema143.allOf[1].properties.peerconnection.allOf[1] - .required, - parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } else { - if (data4.devices !== undefined) { - let data6 = data4.devices; - const _errs22 = errors; - if (errors === _errs22) { - if (Array.isArray(data6)) { - if (data6.length > 2) { - validate158.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data6, - }, - ]; - return false; - } else { - if (data6.length < 2) { - validate158.errors = [ - { - instancePath: - instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: - schema143.allOf[1].properties.peerconnection - .allOf[1].properties.devices, - data: data6, - }, - ]; - return false; - } else { - var valid8 = true; - const len0 = data6.length; - for (let i0 = 0; i0 < len0; i0++) { - let data7 = data6[i0]; - const _errs24 = errors; - if (errors === _errs24) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing5; - if (data7.url === undefined && (missing5 = 'url')) { - validate158.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + - missing5 + - "'", - schema: - schema143.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items - .required, - parentSchema: - schema143.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.url !== undefined) { - let data8 = data7.url; - const _errs26 = errors; - if (errors === _errs26) { - if (errors === _errs26) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - validate158.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema143.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data8, - }, - ]; - return false; - } - } else { - validate158.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema143.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url.type, - parentSchema: - schema143.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data8, - }, - ]; - return false; - } - } - } - var valid9 = _errs26 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data7.config !== undefined) { - let data9 = data7.config; - const _errs28 = errors; - if (errors === _errs28) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - if (data9.services !== undefined) { - let data10 = data9.services; - const _errs30 = errors; - if (errors === _errs30) { - if (Array.isArray(data10)) { - var valid11 = true; - const len1 = data10.length; - for (let i1 = 0; i1 < len1; i1++) { - let data11 = data10[i1]; - const _errs32 = errors; - if (errors === _errs32) { - if ( - data11 && - typeof data11 == 'object' && - !Array.isArray(data11) - ) { - let missing6; - if ( - (data11.serviceType === - undefined && - (missing6 = - 'serviceType')) || - (data11.serviceId === - undefined && - (missing6 = - 'serviceId')) || - (data11.remoteServiceId === - undefined && - (missing6 = - 'remoteServiceId')) - ) { - validate158.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: - missing6, - }, - message: - "must have required property '" + - missing6 + - "'", - schema: - schema143.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.required, - parentSchema: - schema143.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data11, - }, - ]; - return false; - } else { - if ( - data11.serviceType !== - undefined - ) { - let data12 = - data11.serviceType; - const _errs35 = errors; - if (errors === _errs35) { - if ( - errors === _errs35 - ) { - if ( - typeof data12 === - 'string' - ) { - if ( - !formats0(data12) - ) { - validate158.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: - 'format', - params: { - format: - 'uri', - }, - message: - 'must match format "' + - 'uri' + - '"', - schema: - 'uri', - parentSchema: - schema143 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data12, - }, - ]; - return false; - } - } else { - validate158.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema143 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType - .type, - parentSchema: - schema143 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data12, - }, - ]; - return false; - } - } - } - var valid12 = - _errs35 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data11.serviceId !== - undefined - ) { - let data13 = - data11.serviceId; - const _errs37 = errors; - if ( - typeof data13 !== - 'string' - ) { - validate158.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema143 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId - .type, - parentSchema: - schema143 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId, - data: data13, - }, - ]; - return false; - } - var valid12 = - _errs37 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data11.remoteServiceId !== - undefined - ) { - let data14 = - data11.remoteServiceId; - const _errs39 = - errors; - if ( - typeof data14 !== - 'string' - ) { - validate158.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema143 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId - .type, - parentSchema: - schema143 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId, - data: data14, - }, - ]; - return false; - } - var valid12 = - _errs39 === errors; - } else { - var valid12 = true; - } - } - } - } - } else { - validate158.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { - type: 'object', - }, - message: 'must be object', - schema: - schema143.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.type, - parentSchema: - schema143.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data11, - }, - ]; - return false; - } - } - var valid11 = _errs32 === errors; - if (!valid11) { - break; - } - } - } else { - validate158.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema143.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services.type, - parentSchema: - schema143.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services, - data: data10, - }, - ]; - return false; - } - } - } - } else { - validate158.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema143.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config.type, - parentSchema: - schema143.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config, - data: data9, - }, - ]; - return false; - } - } - var valid9 = _errs28 === errors; - } else { - var valid9 = true; - } - } - } - } else { - validate158.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema143.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items.type, - parentSchema: - schema143.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data7, - }, - ]; - return false; - } - } - var valid8 = _errs24 === errors; - if (!valid8) { - break; - } - } - } - } - } else { - validate158.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema143.allOf[1].properties.peerconnection.allOf[1] - .properties.devices.type, - parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data6, - }, - ]; - return false; - } - } - } - } - } else { - validate158.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema143.allOf[1].properties.peerconnection.allOf[1].type, - parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs20 === errors; - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate158.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema143.allOf[1].type, - parentSchema: schema143.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate158.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionClosedEventCallbackResponse = validate159; -const schema144 = { - title: 'Peerconnection Closed Event Callback', - allOf: [ - { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - eventType: { type: 'string', enum: ['peerconnection-closed'] }, - peerconnection: { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: [ - 'new', - 'connecting', - 'connected', - 'disconnected', - 'failed', - 'closed', - ], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - }, - required: ['eventType', 'peerconnection'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'PeerconnectionClosedEventCallbackResponse', - 'x-location': '#/components/schemas/peerconnection_closed_response', - 'x-schema-type': 'response', -}; -function validate159( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate159.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema144.allOf[0].allOf[0].required, - parentSchema: schema144.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate159.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema144.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema144.allOf[0].allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate159.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema144.allOf[0].allOf[0].type, - parentSchema: schema144.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate159.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema144.allOf[0].allOf[1].required, - parentSchema: schema144.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs7 = errors; - if (typeof data1 !== 'string') { - validate159.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema144.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema144.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate159.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: - schema144.allOf[0].allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema144.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema144.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs7 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate159.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema144.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema144.allOf[0].allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate159.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema144.allOf[0].allOf[1].type, - parentSchema: schema144.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.eventType === undefined && (missing2 = 'eventType')) || - (data.peerconnection === undefined && (missing2 = 'peerconnection')) - ) { - validate159.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema144.allOf[1].required, - parentSchema: schema144.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.eventType !== undefined) { - let data3 = data.eventType; - const _errs13 = errors; - if (typeof data3 !== 'string') { - validate159.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema144.allOf[1].properties.eventType.type, - parentSchema: schema144.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - if (!(data3 === 'peerconnection-closed')) { - validate159.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/enum', - keyword: 'enum', - params: { allowedValues: schema144.allOf[1].properties.eventType.enum }, - message: 'must be equal to one of the allowed values', - schema: schema144.allOf[1].properties.eventType.enum, - parentSchema: schema144.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.peerconnection !== undefined) { - let data4 = data.peerconnection; - const _errs15 = errors; - const _errs16 = errors; - if (errors === _errs16) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing3; - if ( - (data4.url === undefined && (missing3 = 'url')) || - (data4.type === undefined && (missing3 = 'type')) || - (data4.status === undefined && (missing3 = 'status')) - ) { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema144.allOf[1].properties.peerconnection.allOf[0].required, - parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.url.type, - parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid6 = _errs18 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data4.type !== undefined) { - let data6 = data4.type; - const _errs20 = errors; - if (typeof data6 !== 'string') { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.type.type, - parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data6, - }, - ]; - return false; - } - if (!(data6 === 'local' || data6 === 'webrtc')) { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data6, - }, - ]; - return false; - } - var valid6 = _errs20 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data4.status !== undefined) { - let data7 = data4.status; - const _errs22 = errors; - if (typeof data7 !== 'string') { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection/status', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.status.type, - parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.status, - data: data7, - }, - ]; - return false; - } - if ( - !( - data7 === 'new' || - data7 === 'connecting' || - data7 === 'connected' || - data7 === 'disconnected' || - data7 === 'failed' || - data7 === 'closed' - ) - ) { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection/status', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', - keyword: 'enum', - params: { - allowedValues: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.status.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.status.enum, - parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] - .properties.status, - data: data7, - }, - ]; - return false; - } - var valid6 = _errs22 === errors; - } else { - var valid6 = true; - } - } - } - } - } else { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema144.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema144.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs16 === errors; - if (valid5) { - const _errs24 = errors; - if (errors === _errs24) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing4; - if (data4.devices === undefined && (missing4 = 'devices')) { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: - schema144.allOf[1].properties.peerconnection.allOf[1] - .required, - parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } else { - if (data4.devices !== undefined) { - let data8 = data4.devices; - const _errs26 = errors; - if (errors === _errs26) { - if (Array.isArray(data8)) { - if (data8.length > 2) { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data8, - }, - ]; - return false; - } else { - if (data8.length < 2) { - validate159.errors = [ - { - instancePath: - instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: - schema144.allOf[1].properties.peerconnection - .allOf[1].properties.devices, - data: data8, - }, - ]; - return false; - } else { - var valid8 = true; - const len0 = data8.length; - for (let i0 = 0; i0 < len0; i0++) { - let data9 = data8[i0]; - const _errs28 = errors; - if (errors === _errs28) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing5; - if (data9.url === undefined && (missing5 = 'url')) { - validate159.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + - missing5 + - "'", - schema: - schema144.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items - .required, - parentSchema: - schema144.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs30 = errors; - if (errors === _errs30) { - if (errors === _errs30) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate159.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema144.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate159.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema144.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url.type, - parentSchema: - schema144.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - var valid9 = _errs30 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data9.config !== undefined) { - let data11 = data9.config; - const _errs32 = errors; - if (errors === _errs32) { - if ( - data11 && - typeof data11 == 'object' && - !Array.isArray(data11) - ) { - if (data11.services !== undefined) { - let data12 = data11.services; - const _errs34 = errors; - if (errors === _errs34) { - if (Array.isArray(data12)) { - var valid11 = true; - const len1 = data12.length; - for (let i1 = 0; i1 < len1; i1++) { - let data13 = data12[i1]; - const _errs36 = errors; - if (errors === _errs36) { - if ( - data13 && - typeof data13 == 'object' && - !Array.isArray(data13) - ) { - let missing6; - if ( - (data13.serviceType === - undefined && - (missing6 = - 'serviceType')) || - (data13.serviceId === - undefined && - (missing6 = - 'serviceId')) || - (data13.remoteServiceId === - undefined && - (missing6 = - 'remoteServiceId')) - ) { - validate159.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: - missing6, - }, - message: - "must have required property '" + - missing6 + - "'", - schema: - schema144.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.required, - parentSchema: - schema144.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data13, - }, - ]; - return false; - } else { - if ( - data13.serviceType !== - undefined - ) { - let data14 = - data13.serviceType; - const _errs39 = errors; - if (errors === _errs39) { - if ( - errors === _errs39 - ) { - if ( - typeof data14 === - 'string' - ) { - if ( - !formats0(data14) - ) { - validate159.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: - 'format', - params: { - format: - 'uri', - }, - message: - 'must match format "' + - 'uri' + - '"', - schema: - 'uri', - parentSchema: - schema144 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate159.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema144 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType - .type, - parentSchema: - schema144 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid12 = - _errs39 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data13.serviceId !== - undefined - ) { - let data15 = - data13.serviceId; - const _errs41 = errors; - if ( - typeof data15 !== - 'string' - ) { - validate159.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema144 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId - .type, - parentSchema: - schema144 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId, - data: data15, - }, - ]; - return false; - } - var valid12 = - _errs41 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data13.remoteServiceId !== - undefined - ) { - let data16 = - data13.remoteServiceId; - const _errs43 = - errors; - if ( - typeof data16 !== - 'string' - ) { - validate159.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema144 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId - .type, - parentSchema: - schema144 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId, - data: data16, - }, - ]; - return false; - } - var valid12 = - _errs43 === errors; - } else { - var valid12 = true; - } - } - } - } - } else { - validate159.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { - type: 'object', - }, - message: 'must be object', - schema: - schema144.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.type, - parentSchema: - schema144.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data13, - }, - ]; - return false; - } - } - var valid11 = _errs36 === errors; - if (!valid11) { - break; - } - } - } else { - validate159.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema144.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services.type, - parentSchema: - schema144.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services, - data: data12, - }, - ]; - return false; - } - } - } - } else { - validate159.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema144.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config.type, - parentSchema: - schema144.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config, - data: data11, - }, - ]; - return false; - } - } - var valid9 = _errs32 === errors; - } else { - var valid9 = true; - } - } - } - } else { - validate159.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema144.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items.type, - parentSchema: - schema144.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data9, - }, - ]; - return false; - } - } - var valid8 = _errs28 === errors; - if (!valid8) { - break; - } - } - } - } - } else { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema144.allOf[1].properties.peerconnection.allOf[1] - .properties.devices.type, - parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data8, - }, - ]; - return false; - } - } - } - } - } else { - validate159.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema144.allOf[1].properties.peerconnection.allOf[1].type, - parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs24 === errors; - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate159.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema144.allOf[1].type, - parentSchema: schema144.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate159.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionStatusChangedEventCallbackRequest = validate160; -const schema145 = { - title: 'Peerconnection Status Changed Event Callback', - allOf: [ - { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - eventType: { type: 'string', enum: ['peerconnection-status-changed'] }, - peerconnection: { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - }, - required: ['eventType', 'peerconnection'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'PeerconnectionStatusChangedEventCallbackRequest', - 'x-location': '#/components/schemas/peerconnection_status_changed_request', - 'x-schema-type': 'request', -}; -function validate160( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate160.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema145.allOf[0].allOf[0].required, - parentSchema: schema145.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate160.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema145.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema145.allOf[0].allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate160.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema145.allOf[0].allOf[0].type, - parentSchema: schema145.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate160.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema145.allOf[0].allOf[1].required, - parentSchema: schema145.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs7 = errors; - if (typeof data1 !== 'string') { - validate160.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema145.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema145.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate160.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: - schema145.allOf[0].allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema145.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema145.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs7 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate160.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema145.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema145.allOf[0].allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate160.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema145.allOf[0].allOf[1].type, - parentSchema: schema145.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.eventType === undefined && (missing2 = 'eventType')) || - (data.peerconnection === undefined && (missing2 = 'peerconnection')) - ) { - validate160.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema145.allOf[1].required, - parentSchema: schema145.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.eventType !== undefined) { - let data3 = data.eventType; - const _errs13 = errors; - if (typeof data3 !== 'string') { - validate160.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema145.allOf[1].properties.eventType.type, - parentSchema: schema145.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - if (!(data3 === 'peerconnection-status-changed')) { - validate160.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/enum', - keyword: 'enum', - params: { allowedValues: schema145.allOf[1].properties.eventType.enum }, - message: 'must be equal to one of the allowed values', - schema: schema145.allOf[1].properties.eventType.enum, - parentSchema: schema145.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.peerconnection !== undefined) { - let data4 = data.peerconnection; - const _errs15 = errors; - const _errs16 = errors; - if (errors === _errs16) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing3; - if (data4.type === undefined && (missing3 = 'type')) { - validate160.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema145.allOf[1].properties.peerconnection.allOf[0].required, - parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } else { - if (data4.type !== undefined) { - let data5 = data4.type; - if (typeof data5 !== 'string') { - validate160.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema145.allOf[1].properties.peerconnection.allOf[0] - .properties.type.type, - parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data5, - }, - ]; - return false; - } - if (!(data5 === 'local' || data5 === 'webrtc')) { - validate160.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema145.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema145.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data5, - }, - ]; - return false; - } - } - } - } else { - validate160.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema145.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema145.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs16 === errors; - if (valid5) { - const _errs20 = errors; - if (errors === _errs20) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing4; - if (data4.devices === undefined && (missing4 = 'devices')) { - validate160.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: - schema145.allOf[1].properties.peerconnection.allOf[1] - .required, - parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } else { - if (data4.devices !== undefined) { - let data6 = data4.devices; - const _errs22 = errors; - if (errors === _errs22) { - if (Array.isArray(data6)) { - if (data6.length > 2) { - validate160.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data6, - }, - ]; - return false; - } else { - if (data6.length < 2) { - validate160.errors = [ - { - instancePath: - instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: - schema145.allOf[1].properties.peerconnection - .allOf[1].properties.devices, - data: data6, - }, - ]; - return false; - } else { - var valid8 = true; - const len0 = data6.length; - for (let i0 = 0; i0 < len0; i0++) { - let data7 = data6[i0]; - const _errs24 = errors; - if (errors === _errs24) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing5; - if (data7.url === undefined && (missing5 = 'url')) { - validate160.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + - missing5 + - "'", - schema: - schema145.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items - .required, - parentSchema: - schema145.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.url !== undefined) { - let data8 = data7.url; - const _errs26 = errors; - if (errors === _errs26) { - if (errors === _errs26) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - validate160.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema145.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data8, - }, - ]; - return false; - } - } else { - validate160.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema145.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url.type, - parentSchema: - schema145.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data8, - }, - ]; - return false; - } - } - } - var valid9 = _errs26 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data7.config !== undefined) { - let data9 = data7.config; - const _errs28 = errors; - if (errors === _errs28) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - if (data9.services !== undefined) { - let data10 = data9.services; - const _errs30 = errors; - if (errors === _errs30) { - if (Array.isArray(data10)) { - var valid11 = true; - const len1 = data10.length; - for (let i1 = 0; i1 < len1; i1++) { - let data11 = data10[i1]; - const _errs32 = errors; - if (errors === _errs32) { - if ( - data11 && - typeof data11 == 'object' && - !Array.isArray(data11) - ) { - let missing6; - if ( - (data11.serviceType === - undefined && - (missing6 = - 'serviceType')) || - (data11.serviceId === - undefined && - (missing6 = - 'serviceId')) || - (data11.remoteServiceId === - undefined && - (missing6 = - 'remoteServiceId')) - ) { - validate160.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: - missing6, - }, - message: - "must have required property '" + - missing6 + - "'", - schema: - schema145.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.required, - parentSchema: - schema145.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data11, - }, - ]; - return false; - } else { - if ( - data11.serviceType !== - undefined - ) { - let data12 = - data11.serviceType; - const _errs35 = errors; - if (errors === _errs35) { - if ( - errors === _errs35 - ) { - if ( - typeof data12 === - 'string' - ) { - if ( - !formats0(data12) - ) { - validate160.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: - 'format', - params: { - format: - 'uri', - }, - message: - 'must match format "' + - 'uri' + - '"', - schema: - 'uri', - parentSchema: - schema145 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data12, - }, - ]; - return false; - } - } else { - validate160.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema145 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType - .type, - parentSchema: - schema145 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data12, - }, - ]; - return false; - } - } - } - var valid12 = - _errs35 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data11.serviceId !== - undefined - ) { - let data13 = - data11.serviceId; - const _errs37 = errors; - if ( - typeof data13 !== - 'string' - ) { - validate160.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema145 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId - .type, - parentSchema: - schema145 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId, - data: data13, - }, - ]; - return false; - } - var valid12 = - _errs37 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data11.remoteServiceId !== - undefined - ) { - let data14 = - data11.remoteServiceId; - const _errs39 = - errors; - if ( - typeof data14 !== - 'string' - ) { - validate160.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema145 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId - .type, - parentSchema: - schema145 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId, - data: data14, - }, - ]; - return false; - } - var valid12 = - _errs39 === errors; - } else { - var valid12 = true; - } - } - } - } - } else { - validate160.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { - type: 'object', - }, - message: 'must be object', - schema: - schema145.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.type, - parentSchema: - schema145.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data11, - }, - ]; - return false; - } - } - var valid11 = _errs32 === errors; - if (!valid11) { - break; - } - } - } else { - validate160.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema145.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services.type, - parentSchema: - schema145.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services, - data: data10, - }, - ]; - return false; - } - } - } - } else { - validate160.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema145.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config.type, - parentSchema: - schema145.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config, - data: data9, - }, - ]; - return false; - } - } - var valid9 = _errs28 === errors; - } else { - var valid9 = true; - } - } - } - } else { - validate160.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema145.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items.type, - parentSchema: - schema145.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data7, - }, - ]; - return false; - } - } - var valid8 = _errs24 === errors; - if (!valid8) { - break; - } - } - } - } - } else { - validate160.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema145.allOf[1].properties.peerconnection.allOf[1] - .properties.devices.type, - parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data6, - }, - ]; - return false; - } - } - } - } - } else { - validate160.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema145.allOf[1].properties.peerconnection.allOf[1].type, - parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs20 === errors; - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate160.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema145.allOf[1].type, - parentSchema: schema145.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate160.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionStatusChangedEventCallbackResponse = validate161; -const schema146 = { - title: 'Peerconnection Status Changed Event Callback', - allOf: [ - { - title: 'Event Callback', - allOf: [ - { - title: 'Callback', - type: 'object', - properties: { callbackType: { type: 'string' } }, - required: ['callbackType'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - callbackType: { type: 'string', enum: ['event'] }, - eventType: { type: 'string' }, - }, - required: ['callbackType', 'eventType'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - eventType: { type: 'string', enum: ['peerconnection-status-changed'] }, - peerconnection: { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: [ - 'new', - 'connecting', - 'connected', - 'disconnected', - 'failed', - 'closed', - ], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - }, - required: ['eventType', 'peerconnection'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'PeerconnectionStatusChangedEventCallbackResponse', - 'x-location': '#/components/schemas/peerconnection_status_changed_response', - 'x-schema-type': 'response', -}; -function validate161( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - const _errs1 = errors; - if (errors === _errs1) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate161.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema146.allOf[0].allOf[0].required, - parentSchema: schema146.allOf[0].allOf[0], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data0 = data.callbackType; - if (typeof data0 !== 'string') { - validate161.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema146.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema146.allOf[0].allOf[0].properties.callbackType, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate161.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema146.allOf[0].allOf[0].type, - parentSchema: schema146.allOf[0].allOf[0], - data, - }, - ]; - return false; - } - } - var valid1 = _errs1 === errors; - if (valid1) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.callbackType === undefined && (missing1 = 'callbackType')) || - (data.eventType === undefined && (missing1 = 'eventType')) - ) { - validate161.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema146.allOf[0].allOf[1].required, - parentSchema: schema146.allOf[0].allOf[1], - data, - }, - ]; - return false; - } else { - if (data.callbackType !== undefined) { - let data1 = data.callbackType; - const _errs7 = errors; - if (typeof data1 !== 'string') { - validate161.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema146.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema146.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'event')) { - validate161.errors = [ - { - instancePath: instancePath + '/callbackType', - schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', - keyword: 'enum', - params: { - allowedValues: - schema146.allOf[0].allOf[1].properties.callbackType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema146.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema146.allOf[0].allOf[1].properties.callbackType, - data: data1, - }, - ]; - return false; - } - var valid3 = _errs7 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data.eventType !== undefined) { - let data2 = data.eventType; - const _errs9 = errors; - if (typeof data2 !== 'string') { - validate161.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema146.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema146.allOf[0].allOf[1].properties.eventType, - data: data2, - }, - ]; - return false; - } - var valid3 = _errs9 === errors; - } else { - var valid3 = true; - } - } - } - } else { - validate161.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema146.allOf[0].allOf[1].type, - parentSchema: schema146.allOf[0].allOf[1], - data, - }, - ]; - return false; - } - } - var valid1 = _errs5 === errors; - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs11 = errors; - if (errors === _errs11) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.eventType === undefined && (missing2 = 'eventType')) || - (data.peerconnection === undefined && (missing2 = 'peerconnection')) - ) { - validate161.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema146.allOf[1].required, - parentSchema: schema146.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.eventType !== undefined) { - let data3 = data.eventType; - const _errs13 = errors; - if (typeof data3 !== 'string') { - validate161.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema146.allOf[1].properties.eventType.type, - parentSchema: schema146.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - if (!(data3 === 'peerconnection-status-changed')) { - validate161.errors = [ - { - instancePath: instancePath + '/eventType', - schemaPath: '#/allOf/1/properties/eventType/enum', - keyword: 'enum', - params: { allowedValues: schema146.allOf[1].properties.eventType.enum }, - message: 'must be equal to one of the allowed values', - schema: schema146.allOf[1].properties.eventType.enum, - parentSchema: schema146.allOf[1].properties.eventType, - data: data3, - }, - ]; - return false; - } - var valid4 = _errs13 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.peerconnection !== undefined) { - let data4 = data.peerconnection; - const _errs15 = errors; - const _errs16 = errors; - if (errors === _errs16) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing3; - if ( - (data4.url === undefined && (missing3 = 'url')) || - (data4.type === undefined && (missing3 = 'type')) || - (data4.status === undefined && (missing3 = 'status')) - ) { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema146.allOf[1].properties.peerconnection.allOf[0].required, - parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.url.type, - parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid6 = _errs18 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data4.type !== undefined) { - let data6 = data4.type; - const _errs20 = errors; - if (typeof data6 !== 'string') { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.type.type, - parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data6, - }, - ]; - return false; - } - if (!(data6 === 'local' || data6 === 'webrtc')) { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection/type', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.type.enum, - parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.type, - data: data6, - }, - ]; - return false; - } - var valid6 = _errs20 === errors; - } else { - var valid6 = true; - } - if (valid6) { - if (data4.status !== undefined) { - let data7 = data4.status; - const _errs22 = errors; - if (typeof data7 !== 'string') { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection/status', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.status.type, - parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.status, - data: data7, - }, - ]; - return false; - } - if ( - !( - data7 === 'new' || - data7 === 'connecting' || - data7 === 'connected' || - data7 === 'disconnected' || - data7 === 'failed' || - data7 === 'closed' - ) - ) { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection/status', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', - keyword: 'enum', - params: { - allowedValues: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.status.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.status.enum, - parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] - .properties.status, - data: data7, - }, - ]; - return false; - } - var valid6 = _errs22 === errors; - } else { - var valid6 = true; - } - } - } - } - } else { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema146.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema146.allOf[1].properties.peerconnection.allOf[0], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs16 === errors; - if (valid5) { - const _errs24 = errors; - if (errors === _errs24) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing4; - if (data4.devices === undefined && (missing4 = 'devices')) { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: - schema146.allOf[1].properties.peerconnection.allOf[1] - .required, - parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } else { - if (data4.devices !== undefined) { - let data8 = data4.devices; - const _errs26 = errors; - if (errors === _errs26) { - if (Array.isArray(data8)) { - if (data8.length > 2) { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data8, - }, - ]; - return false; - } else { - if (data8.length < 2) { - validate161.errors = [ - { - instancePath: - instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: - schema146.allOf[1].properties.peerconnection - .allOf[1].properties.devices, - data: data8, - }, - ]; - return false; - } else { - var valid8 = true; - const len0 = data8.length; - for (let i0 = 0; i0 < len0; i0++) { - let data9 = data8[i0]; - const _errs28 = errors; - if (errors === _errs28) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing5; - if (data9.url === undefined && (missing5 = 'url')) { - validate161.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + - missing5 + - "'", - schema: - schema146.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items - .required, - parentSchema: - schema146.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs30 = errors; - if (errors === _errs30) { - if (errors === _errs30) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate161.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema146.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate161.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/url', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema146.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url.type, - parentSchema: - schema146.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - var valid9 = _errs30 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data9.config !== undefined) { - let data11 = data9.config; - const _errs32 = errors; - if (errors === _errs32) { - if ( - data11 && - typeof data11 == 'object' && - !Array.isArray(data11) - ) { - if (data11.services !== undefined) { - let data12 = data11.services; - const _errs34 = errors; - if (errors === _errs34) { - if (Array.isArray(data12)) { - var valid11 = true; - const len1 = data12.length; - for (let i1 = 0; i1 < len1; i1++) { - let data13 = data12[i1]; - const _errs36 = errors; - if (errors === _errs36) { - if ( - data13 && - typeof data13 == 'object' && - !Array.isArray(data13) - ) { - let missing6; - if ( - (data13.serviceType === - undefined && - (missing6 = - 'serviceType')) || - (data13.serviceId === - undefined && - (missing6 = - 'serviceId')) || - (data13.remoteServiceId === - undefined && - (missing6 = - 'remoteServiceId')) - ) { - validate161.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: - missing6, - }, - message: - "must have required property '" + - missing6 + - "'", - schema: - schema146.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.required, - parentSchema: - schema146.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data13, - }, - ]; - return false; - } else { - if ( - data13.serviceType !== - undefined - ) { - let data14 = - data13.serviceType; - const _errs39 = errors; - if (errors === _errs39) { - if ( - errors === _errs39 - ) { - if ( - typeof data14 === - 'string' - ) { - if ( - !formats0(data14) - ) { - validate161.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: - 'format', - params: { - format: - 'uri', - }, - message: - 'must match format "' + - 'uri' + - '"', - schema: - 'uri', - parentSchema: - schema146 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data14, - }, - ]; - return false; - } - } else { - validate161.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema146 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType - .type, - parentSchema: - schema146 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .serviceType, - data: data14, - }, - ]; - return false; - } - } - } - var valid12 = - _errs39 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data13.serviceId !== - undefined - ) { - let data15 = - data13.serviceId; - const _errs41 = errors; - if ( - typeof data15 !== - 'string' - ) { - validate161.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema146 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId - .type, - parentSchema: - schema146 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices.items - .properties - .config - .properties - .services - .items - .properties - .serviceId, - data: data15, - }, - ]; - return false; - } - var valid12 = - _errs41 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if ( - data13.remoteServiceId !== - undefined - ) { - let data16 = - data13.remoteServiceId; - const _errs43 = - errors; - if ( - typeof data16 !== - 'string' - ) { - validate161.errors = - [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: - 'type', - params: { - type: 'string', - }, - message: - 'must be string', - schema: - schema146 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId - .type, - parentSchema: - schema146 - .allOf[1] - .properties - .peerconnection - .allOf[1] - .properties - .devices - .items - .properties - .config - .properties - .services - .items - .properties - .remoteServiceId, - data: data16, - }, - ]; - return false; - } - var valid12 = - _errs43 === errors; - } else { - var valid12 = true; - } - } - } - } - } else { - validate161.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { - type: 'object', - }, - message: 'must be object', - schema: - schema146.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items.type, - parentSchema: - schema146.allOf[1] - .properties - .peerconnection - .allOf[1].properties - .devices.items - .properties.config - .properties.services - .items, - data: data13, - }, - ]; - return false; - } - } - var valid11 = _errs36 === errors; - if (!valid11) { - break; - } - } - } else { - validate161.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema146.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services.type, - parentSchema: - schema146.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config - .properties.services, - data: data12, - }, - ]; - return false; - } - } - } - } else { - validate161.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0 + - '/config', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema146.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config.type, - parentSchema: - schema146.allOf[1].properties - .peerconnection.allOf[1] - .properties.devices.items - .properties.config, - data: data11, - }, - ]; - return false; - } - } - var valid9 = _errs32 === errors; - } else { - var valid9 = true; - } - } - } - } else { - validate161.errors = [ - { - instancePath: - instancePath + - '/peerconnection/devices/' + - i0, - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema146.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items.type, - parentSchema: - schema146.allOf[1].properties.peerconnection - .allOf[1].properties.devices.items, - data: data9, - }, - ]; - return false; - } - } - var valid8 = _errs28 === errors; - if (!valid8) { - break; - } - } - } - } - } else { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection/devices', - schemaPath: - '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema146.allOf[1].properties.peerconnection.allOf[1] - .properties.devices.type, - parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[1] - .properties.devices, - data: data8, - }, - ]; - return false; - } - } - } - } - } else { - validate161.errors = [ - { - instancePath: instancePath + '/peerconnection', - schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema146.allOf[1].properties.peerconnection.allOf[1].type, - parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[1], - data: data4, - }, - ]; - return false; - } - } - var valid5 = _errs24 === errors; - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate161.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema146.allOf[1].type, - parentSchema: schema146.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs11 === errors; - } - validate161.errors = vErrors; - return errors === 0; -} -exports.validateChangedUrlRequest = validate162; -const schema147 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'ChangedUrlRequest', - 'x-location': '#/components/parameters/device_changed_url/schema_request', - 'x-schema-type': 'request', -}; -function validate162( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate162.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema147, - data, - }, - ]; - return false; - } - } else { - validate162.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema147.type, - parentSchema: schema147, - data, - }, - ]; - return false; - } - } - } - validate162.errors = vErrors; - return errors === 0; -} -exports.validateChangedUrlResponse = validate163; -const schema148 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'ChangedUrlResponse', - 'x-location': '#/components/parameters/device_changed_url/schema_response', - 'x-schema-type': 'response', -}; -function validate163( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate163.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema148, - data, - }, - ]; - return false; - } - } else { - validate163.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema148.type, - parentSchema: schema148, - data, - }, - ]; - return false; - } - } - } - validate163.errors = vErrors; - return errors === 0; -} -exports.validateDeviceIdRequest = validate164; -const schema149 = { - type: 'string', - format: 'uuid', - 'x-standalone': false, - 'x-name': 'DeviceIdRequest', - 'x-location': '#/components/parameters/device_id/schema_request', - 'x-schema-type': 'request', -}; -function validate164( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats258.test(data)) { - validate164.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uuid' }, - message: 'must match format "' + 'uuid' + '"', - schema: 'uuid', - parentSchema: schema149, - data, - }, - ]; - return false; - } - } else { - validate164.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema149.type, - parentSchema: schema149, - data, - }, - ]; - return false; - } - } - } - validate164.errors = vErrors; - return errors === 0; -} -exports.validateDeviceIdResponse = validate165; -const schema150 = { - type: 'string', - format: 'uuid', - 'x-standalone': false, - 'x-name': 'DeviceIdResponse', - 'x-location': '#/components/parameters/device_id/schema_response', - 'x-schema-type': 'response', -}; -function validate165( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats258.test(data)) { - validate165.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uuid' }, - message: 'must match format "' + 'uuid' + '"', - schema: 'uuid', - parentSchema: schema150, - data, - }, - ]; - return false; - } - } else { - validate165.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema150.type, - parentSchema: schema150, - data, - }, - ]; - return false; - } - } - } - validate165.errors = vErrors; - return errors === 0; -} -exports.validateFlatGroupRequest = validate166; -const schema151 = { - type: 'boolean', - default: false, - 'x-standalone': false, - 'x-name': 'FlatGroupRequest', - 'x-location': '#/components/parameters/flat_group/schema_request', - 'x-schema-type': 'request', -}; -function validate166( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'boolean') { - validate166.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema151.type, - parentSchema: schema151, - data, - }, - ]; - return false; - } - validate166.errors = vErrors; - return errors === 0; -} -exports.validateFlatGroupResponse = validate167; -const schema152 = { - type: 'boolean', - default: false, - 'x-standalone': false, - 'x-name': 'FlatGroupResponse', - 'x-location': '#/components/parameters/flat_group/schema_response', - 'x-schema-type': 'response', -}; -function validate167( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'boolean') { - validate167.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema152.type, - parentSchema: schema152, - data, - }, - ]; - return false; - } - validate167.errors = vErrors; - return errors === 0; -} -exports.validateStartTimeRequest = validate168; -const schema153 = { - type: 'string', - format: 'date-time', - 'x-standalone': false, - 'x-name': 'StartTimeRequest', - 'x-location': '#/components/parameters/start_time/schema_request', - 'x-schema-type': 'request', -}; -function validate168( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats22.validate(data)) { - validate168.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema153, - data, - }, - ]; - return false; - } - } else { - validate168.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema153.type, - parentSchema: schema153, - data, - }, - ]; - return false; - } - } - } - validate168.errors = vErrors; - return errors === 0; -} -exports.validateStartTimeResponse = validate169; -const schema154 = { - type: 'string', - format: 'date-time', - 'x-standalone': false, - 'x-name': 'StartTimeResponse', - 'x-location': '#/components/parameters/start_time/schema_response', - 'x-schema-type': 'response', -}; -function validate169( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats22.validate(data)) { - validate169.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema154, - data, - }, - ]; - return false; - } - } else { - validate169.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema154.type, - parentSchema: schema154, - data, - }, - ]; - return false; - } - } - } - validate169.errors = vErrors; - return errors === 0; -} -exports.validateEndTimeRequest = validate170; -const schema155 = { - type: 'string', - format: 'date-time', - 'x-standalone': false, - 'x-name': 'EndTimeRequest', - 'x-location': '#/components/parameters/end_time/schema_request', - 'x-schema-type': 'request', -}; -function validate170( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats22.validate(data)) { - validate170.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema155, - data, - }, - ]; - return false; - } - } else { - validate170.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema155.type, - parentSchema: schema155, - data, - }, - ]; - return false; - } - } - } - validate170.errors = vErrors; - return errors === 0; -} -exports.validateEndTimeResponse = validate171; -const schema156 = { - type: 'string', - format: 'date-time', - 'x-standalone': false, - 'x-name': 'EndTimeResponse', - 'x-location': '#/components/parameters/end_time/schema_response', - 'x-schema-type': 'response', -}; -function validate171( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats22.validate(data)) { - validate171.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema156, - data, - }, - ]; - return false; - } - } else { - validate171.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema156.type, - parentSchema: schema156, - data, - }, - ]; - return false; - } - } - } - validate171.errors = vErrors; - return errors === 0; -} -exports.validateClosedUrlRequest = validate172; -const schema157 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'ClosedUrlRequest', - 'x-location': '#/components/parameters/closed_url/schema_request', - 'x-schema-type': 'request', -}; -function validate172( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate172.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema157, - data, - }, - ]; - return false; - } - } else { - validate172.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema157.type, - parentSchema: schema157, - data, - }, - ]; - return false; - } - } - } - validate172.errors = vErrors; - return errors === 0; -} -exports.validateClosedUrlResponse = validate173; -const schema158 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'ClosedUrlResponse', - 'x-location': '#/components/parameters/closed_url/schema_response', - 'x-schema-type': 'response', -}; -function validate173( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate173.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema158, - data, - }, - ]; - return false; - } - } else { - validate173.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema158.type, - parentSchema: schema158, - data, - }, - ]; - return false; - } - } - } - validate173.errors = vErrors; - return errors === 0; -} -exports.validateStatusChangedUrlRequest = validate174; -const schema159 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'StatusChangedUrlRequest', - 'x-location': '#/components/parameters/status_changed_url/schema_request', - 'x-schema-type': 'request', -}; -function validate174( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate174.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema159, - data, - }, - ]; - return false; - } - } else { - validate174.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema159.type, - parentSchema: schema159, - data, - }, - ]; - return false; - } - } - } - validate174.errors = vErrors; - return errors === 0; -} -exports.validateStatusChangedUrlResponse = validate175; -const schema160 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'StatusChangedUrlResponse', - 'x-location': '#/components/parameters/status_changed_url/schema_response', - 'x-schema-type': 'response', -}; -function validate175( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate175.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema160, - data, - }, - ]; - return false; - } - } else { - validate175.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema160.type, - parentSchema: schema160, - data, - }, - ]; - return false; - } - } - } - validate175.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionIdRequest = validate176; -const schema161 = { - type: 'string', - format: 'uuid', - 'x-standalone': false, - 'x-name': 'PeerconnectionIdRequest', - 'x-location': '#/components/parameters/peerconnection_id/schema_request', - 'x-schema-type': 'request', -}; -function validate176( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats258.test(data)) { - validate176.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uuid' }, - message: 'must match format "' + 'uuid' + '"', - schema: 'uuid', - parentSchema: schema161, - data, - }, - ]; - return false; - } - } else { - validate176.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema161.type, - parentSchema: schema161, - data, - }, - ]; - return false; - } - } - } - validate176.errors = vErrors; - return errors === 0; -} -exports.validatePeerconnectionIdResponse = validate177; -const schema162 = { - type: 'string', - format: 'uuid', - 'x-standalone': false, - 'x-name': 'PeerconnectionIdResponse', - 'x-location': '#/components/parameters/peerconnection_id/schema_response', - 'x-schema-type': 'response', -}; -function validate177( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats258.test(data)) { - validate177.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uuid' }, - message: 'must match format "' + 'uuid' + '"', - schema: 'uuid', - parentSchema: schema162, - data, - }, - ]; - return false; - } - } else { - validate177.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema162.type, - parentSchema: schema162, - data, - }, - ]; - return false; - } - } - } - validate177.errors = vErrors; - return errors === 0; -} -exports.validateDeviceUrlRequest = validate178; -const schema163 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'DeviceUrlRequest', - 'x-location': '#/components/parameters/device_url/schema_request', - 'x-schema-type': 'request', -}; -function validate178( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate178.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema163, - data, - }, - ]; - return false; - } - } else { - validate178.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema163.type, - parentSchema: schema163, - data, - }, - ]; - return false; - } - } - } - validate178.errors = vErrors; - return errors === 0; -} -exports.validateDeviceUrlResponse = validate179; -const schema164 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'DeviceUrlResponse', - 'x-location': '#/components/parameters/device_url/schema_response', - 'x-schema-type': 'response', -}; -function validate179( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate179.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema164, - data, - }, - ]; - return false; - } - } else { - validate179.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema164.type, - parentSchema: schema164, - data, - }, - ]; - return false; - } - } - } - validate179.errors = vErrors; - return errors === 0; -} -exports.validateListDevicesResponse200Request = validate180; -const schema165 = { - type: 'array', - items: { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - 'x-standalone': false, - 'x-name': 'listDevicesResponse200Request', - 'x-location': - '#/paths//devices/get/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate180( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if ( - (data0.type === undefined && (missing0 = 'type')) || - (data0.name === undefined && (missing0 = 'name')) || - (data0.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate180.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema165.items.required, - parentSchema: schema165.items, - data: data0, - }, - ]; - return false; - } else { - if (data0.name !== undefined) { - let data1 = data0.name; - const _errs3 = errors; - if (typeof data1 !== 'string') { - validate180.errors = [ - { - instancePath: instancePath + '/' + i0 + '/name', - schemaPath: '#/items/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema165.items.properties.name.type, - parentSchema: schema165.items.properties.name, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.description !== undefined) { - let data2 = data0.description; - const _errs5 = errors; - if (typeof data2 !== 'string') { - validate180.errors = [ - { - instancePath: instancePath + '/' + i0 + '/description', - schemaPath: '#/items/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema165.items.properties.description.type, - parentSchema: schema165.items.properties.description, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.type !== undefined) { - let data3 = data0.type; - const _errs7 = errors; - if (typeof data3 !== 'string') { - validate180.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema165.items.properties.type.type, - parentSchema: schema165.items.properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate180.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema165.items.properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema165.items.properties.type.enum, - parentSchema: schema165.items.properties.type, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs7 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.isPublic !== undefined) { - let data4 = data0.isPublic; - const _errs9 = errors; - if (typeof data4 !== 'boolean') { - validate180.errors = [ - { - instancePath: instancePath + '/' + i0 + '/isPublic', - schemaPath: '#/items/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema165.items.properties.isPublic.type, - parentSchema: schema165.items.properties.isPublic, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs9 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.viewer !== undefined) { - let data5 = data0.viewer; - const _errs11 = errors; - if (errors === _errs11) { - if (Array.isArray(data5)) { - var valid2 = true; - const len1 = data5.length; - for (let i1 = 0; i1 < len1; i1++) { - let data6 = data5[i1]; - const _errs13 = errors; - if (errors === _errs13) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - validate180.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/viewer/' + i1, - schemaPath: - '#/items/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + - missing1 + - "'", - schema: - schema165.items.properties.viewer.items - .required, - parentSchema: - schema165.items.properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs15 = errors; - if (errors === _errs15) { - if (errors === _errs15) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate180.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/viewer/' + - i1 + - '/url', - schemaPath: - '#/items/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema165.items.properties.viewer - .items.properties.url, - data: data7, - }, - ]; - return false; - } - } else { - validate180.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/viewer/' + - i1 + - '/url', - schemaPath: - '#/items/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema165.items.properties.viewer.items - .properties.url.type, - parentSchema: - schema165.items.properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate180.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/viewer/' + i1, - schemaPath: '#/items/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema165.items.properties.viewer.items.type, - parentSchema: - schema165.items.properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid2 = _errs13 === errors; - if (!valid2) { - break; - } - } - } else { - validate180.errors = [ - { - instancePath: instancePath + '/' + i0 + '/viewer', - schemaPath: '#/items/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema165.items.properties.viewer.type, - parentSchema: schema165.items.properties.viewer, - data: data5, - }, - ]; - return false; - } - } - var valid1 = _errs11 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.owner !== undefined) { - let data8 = data0.owner; - const _errs17 = errors; - if (errors === _errs17) { - if (Array.isArray(data8)) { - var valid4 = true; - const len2 = data8.length; - for (let i2 = 0; i2 < len2; i2++) { - let data9 = data8[i2]; - const _errs19 = errors; - if (errors === _errs19) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - validate180.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/owner/' + i2, - schemaPath: - '#/items/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + - missing2 + - "'", - schema: - schema165.items.properties.owner.items - .required, - parentSchema: - schema165.items.properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs21 = errors; - if (errors === _errs21) { - if (errors === _errs21) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate180.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/owner/' + - i2 + - '/url', - schemaPath: - '#/items/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema165.items.properties.owner - .items.properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate180.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/owner/' + - i2 + - '/url', - schemaPath: - '#/items/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema165.items.properties.owner.items - .properties.url.type, - parentSchema: - schema165.items.properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate180.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/owner/' + i2, - schemaPath: '#/items/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema165.items.properties.owner.items.type, - parentSchema: - schema165.items.properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid4 = _errs19 === errors; - if (!valid4) { - break; - } - } - } else { - validate180.errors = [ - { - instancePath: instancePath + '/' + i0 + '/owner', - schemaPath: '#/items/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema165.items.properties.owner.type, - parentSchema: schema165.items.properties.owner, - data: data8, - }, - ]; - return false; - } - } - var valid1 = _errs17 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } else { - validate180.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema165.items.type, - parentSchema: schema165.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate180.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema165.type, - parentSchema: schema165, - data, - }, - ]; - return false; - } - } - validate180.errors = vErrors; - return errors === 0; -} -exports.validateListDevicesResponse200Response = validate181; -const schema166 = { - type: 'array', - items: { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - 'x-standalone': false, - 'x-name': 'listDevicesResponse200Response', - 'x-location': - '#/paths//devices/get/responses/200/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate181( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if ( - (data0.url === undefined && (missing0 = 'url')) || - (data0.type === undefined && (missing0 = 'type')) || - (data0.name === undefined && (missing0 = 'name')) || - (data0.isPublic === undefined && (missing0 = 'isPublic')) - ) { - validate181.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema166.items.required, - parentSchema: schema166.items, - data: data0, - }, - ]; - return false; - } else { - if (data0.url !== undefined) { - let data1 = data0.url; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats0(data1)) { - validate181.errors = [ - { - instancePath: instancePath + '/' + i0 + '/url', - schemaPath: '#/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema166.items.properties.url, - data: data1, - }, - ]; - return false; - } - } else { - validate181.errors = [ - { - instancePath: instancePath + '/' + i0 + '/url', - schemaPath: '#/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema166.items.properties.url.type, - parentSchema: schema166.items.properties.url, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.name !== undefined) { - let data2 = data0.name; - const _errs5 = errors; - if (typeof data2 !== 'string') { - validate181.errors = [ - { - instancePath: instancePath + '/' + i0 + '/name', - schemaPath: '#/items/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema166.items.properties.name.type, - parentSchema: schema166.items.properties.name, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.description !== undefined) { - let data3 = data0.description; - const _errs7 = errors; - if (typeof data3 !== 'string') { - validate181.errors = [ - { - instancePath: instancePath + '/' + i0 + '/description', - schemaPath: '#/items/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema166.items.properties.description.type, - parentSchema: schema166.items.properties.description, - data: data3, - }, - ]; - return false; - } - var valid1 = _errs7 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.type !== undefined) { - let data4 = data0.type; - const _errs9 = errors; - if (typeof data4 !== 'string') { - validate181.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema166.items.properties.type.type, - parentSchema: schema166.items.properties.type, - data: data4, - }, - ]; - return false; - } - if ( - !( - data4 === 'device' || - data4 === 'group' || - data4 === 'edge instantiable' || - data4 === 'cloud instantiable' - ) - ) { - validate181.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema166.items.properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema166.items.properties.type.enum, - parentSchema: schema166.items.properties.type, - data: data4, - }, - ]; - return false; - } - var valid1 = _errs9 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.isPublic !== undefined) { - let data5 = data0.isPublic; - const _errs11 = errors; - if (typeof data5 !== 'boolean') { - validate181.errors = [ - { - instancePath: instancePath + '/' + i0 + '/isPublic', - schemaPath: '#/items/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema166.items.properties.isPublic.type, - parentSchema: schema166.items.properties.isPublic, - data: data5, - }, - ]; - return false; - } - var valid1 = _errs11 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.viewer !== undefined) { - let data6 = data0.viewer; - const _errs13 = errors; - if (errors === _errs13) { - if (Array.isArray(data6)) { - var valid2 = true; - const len1 = data6.length; - for (let i1 = 0; i1 < len1; i1++) { - let data7 = data6[i1]; - const _errs15 = errors; - if (errors === _errs15) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing1; - if (data7.url === undefined && (missing1 = 'url')) { - validate181.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/viewer/' + i1, - schemaPath: - '#/items/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + - missing1 + - "'", - schema: - schema166.items.properties.viewer.items - .required, - parentSchema: - schema166.items.properties.viewer.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.url !== undefined) { - let data8 = data7.url; - const _errs17 = errors; - if (errors === _errs17) { - if (errors === _errs17) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - validate181.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/viewer/' + - i1 + - '/url', - schemaPath: - '#/items/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema166.items.properties.viewer - .items.properties.url, - data: data8, - }, - ]; - return false; - } - } else { - validate181.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/viewer/' + - i1 + - '/url', - schemaPath: - '#/items/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema166.items.properties.viewer - .items.properties.url.type, - parentSchema: - schema166.items.properties.viewer - .items.properties.url, - data: data8, - }, - ]; - return false; - } - } - } - } - } - } else { - validate181.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/viewer/' + i1, - schemaPath: - '#/items/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema166.items.properties.viewer.items.type, - parentSchema: - schema166.items.properties.viewer.items, - data: data7, - }, - ]; - return false; - } - } - var valid2 = _errs15 === errors; - if (!valid2) { - break; - } - } - } else { - validate181.errors = [ - { - instancePath: instancePath + '/' + i0 + '/viewer', - schemaPath: '#/items/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema166.items.properties.viewer.type, - parentSchema: schema166.items.properties.viewer, - data: data6, - }, - ]; - return false; - } - } - var valid1 = _errs13 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.owner !== undefined) { - let data9 = data0.owner; - const _errs19 = errors; - if (errors === _errs19) { - if (Array.isArray(data9)) { - var valid4 = true; - const len2 = data9.length; - for (let i2 = 0; i2 < len2; i2++) { - let data10 = data9[i2]; - const _errs21 = errors; - if (errors === _errs21) { - if ( - data10 && - typeof data10 == 'object' && - !Array.isArray(data10) - ) { - let missing2; - if ( - data10.url === undefined && - (missing2 = 'url') - ) { - validate181.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/owner/' + i2, - schemaPath: - '#/items/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + - missing2 + - "'", - schema: - schema166.items.properties.owner.items - .required, - parentSchema: - schema166.items.properties.owner.items, - data: data10, - }, - ]; - return false; - } else { - if (data10.url !== undefined) { - let data11 = data10.url; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate181.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/owner/' + - i2 + - '/url', - schemaPath: - '#/items/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema166.items.properties.owner - .items.properties.url, - data: data11, - }, - ]; - return false; - } - } else { - validate181.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/owner/' + - i2 + - '/url', - schemaPath: - '#/items/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema166.items.properties.owner - .items.properties.url.type, - parentSchema: - schema166.items.properties.owner - .items.properties.url, - data: data11, - }, - ]; - return false; - } - } - } - } - } - } else { - validate181.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/owner/' + i2, - schemaPath: - '#/items/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema166.items.properties.owner.items.type, - parentSchema: - schema166.items.properties.owner.items, - data: data10, - }, - ]; - return false; - } - } - var valid4 = _errs21 === errors; - if (!valid4) { - break; - } - } - } else { - validate181.errors = [ - { - instancePath: instancePath + '/' + i0 + '/owner', - schemaPath: '#/items/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema166.items.properties.owner.type, - parentSchema: schema166.items.properties.owner, - data: data9, - }, - ]; - return false; - } - } - var valid1 = _errs19 === errors; - } else { - var valid1 = true; - } - } - } - } - } - } - } - } - } else { - validate181.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema166.items.type, - parentSchema: schema166.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate181.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema166.type, - parentSchema: schema166, - data, - }, - ]; - return false; - } - } - validate181.errors = vErrors; - return errors === 0; -} -exports.validateCreateDeviceBodyRequest = validate182; -const schema167 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createDeviceBodyRequest', - 'x-location': - '#/paths//devices/post/requestBody/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate182( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema167.anyOf[0].allOf[0].required, - parentSchema: schema167.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs4 = errors; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.name, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err2 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.description, - data: data1, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err3 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema167.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema167.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema167.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema167.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.isPublic, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - var valid3 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - const err6 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: - schema167.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema167.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - const err7 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema167.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema167.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.viewer, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid5 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - const err11 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema167.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema167.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - const err12 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema167.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[0].allOf[0].properties.owner.items.type, - parentSchema: - schema167.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.owner, - data: data7, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema167.anyOf[0].allOf[0].type, - parentSchema: schema167.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data10) { - const err17 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema167.anyOf[0].allOf[1].properties.type, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err18 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema167.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema167.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data12)) { - var valid8 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err20 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema167.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs36 = errors; - if (typeof data15 !== 'string') { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema167.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema167.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema167.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema167.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema167.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err25 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema167.anyOf[0].allOf[1].properties.services.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema167.anyOf[0].allOf[1].properties.services, - data: data12, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err27 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema167.anyOf[0].allOf[1].type, - parentSchema: schema167.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid1 = _errs24 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs40 = errors; - const _errs41 = errors; - if (errors === _errs41) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err28 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema167.anyOf[1].allOf[0].required, - parentSchema: schema167.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data.name !== undefined) { - let data17 = data.name; - const _errs43 = errors; - if (typeof data17 !== 'string') { - const err29 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.name, - data: data17, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid11 = _errs43 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data18 = data.description; - const _errs45 = errors; - if (typeof data18 !== 'string') { - const err30 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.description, - data: data18, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data19 = data.type; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err31 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data19 === 'device' || - data19 === 'group' || - data19 === 'edge instantiable' || - data19 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema167.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema167.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema167.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data20 = data.isPublic; - const _errs49 = errors; - if (typeof data20 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema167.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.isPublic, - data: data20, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data21 = data.viewer; - const _errs51 = errors; - if (errors === _errs51) { - if (Array.isArray(data21)) { - var valid12 = true; - const len3 = data21.length; - for (let i3 = 0; i3 < len3; i3++) { - let data22 = data21[i3]; - const _errs53 = errors; - if (errors === _errs53) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - let missing4; - if (data22.url === undefined && (missing4 = 'url')) { - const err34 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema167.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema167.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data22.url !== undefined) { - let data23 = data22.url; - const _errs55 = errors; - if (errors === _errs55) { - if (errors === _errs55) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err35 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema167.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema167.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid12 = _errs53 === errors; - if (!valid12) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.viewer, - data: data21, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data24 = data.owner; - const _errs57 = errors; - if (errors === _errs57) { - if (Array.isArray(data24)) { - var valid14 = true; - const len4 = data24.length; - for (let i4 = 0; i4 < len4; i4++) { - let data25 = data24[i4]; - const _errs59 = errors; - if (errors === _errs59) { - if ( - data25 && - typeof data25 == 'object' && - !Array.isArray(data25) - ) { - let missing5; - if (data25.url === undefined && (missing5 = 'url')) { - const err39 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema167.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema167.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data25.url !== undefined) { - let data26 = data25.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data26 === 'string') { - if (!formats0(data26)) { - const err40 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[1].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema167.anyOf[1].allOf[0].properties.owner - .items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema167.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid14 = _errs59 === errors; - if (!valid14) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.owner, - data: data24, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid11 = _errs57 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema167.anyOf[1].allOf[0].type, - parentSchema: schema167.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid10 = _errs41 === errors; - if (valid10) { - const _errs63 = errors; - if (errors === _errs63) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data27 = data.type; - const _errs65 = errors; - if ('device' !== data27) { - const err45 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema167.anyOf[1].allOf[1].properties.type, - data: data27, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data28 = data.experiment; - const _errs66 = errors; - if (errors === _errs66) { - if (errors === _errs66) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err46 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema167.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema167.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid16 = _errs66 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data29 = data.services; - const _errs68 = errors; - if (errors === _errs68) { - if (Array.isArray(data29)) { - var valid17 = true; - const len5 = data29.length; - for (let i5 = 0; i5 < len5; i5++) { - let data30 = data29[i5]; - const _errs70 = errors; - if (errors === _errs70) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - if (data30.serviceType !== undefined) { - let data31 = data30.serviceType; - const _errs73 = errors; - if (errors === _errs73) { - if (errors === _errs73) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err48 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema167.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid18 = _errs73 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceId !== undefined) { - let data32 = data30.serviceId; - const _errs75 = errors; - if (typeof data32 !== 'string') { - const err50 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[1].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema167.anyOf[1].allOf[1].properties.services.items - .properties.serviceId, - data: data32, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid18 = _errs75 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceDirection !== undefined) { - let data33 = data30.serviceDirection; - const _errs77 = errors; - if (typeof data33 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema167.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data33 === 'consumer' || - data33 === 'producer' || - data33 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema167.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema167.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema167.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err53 = { - instancePath: instancePath + '/services/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[1].allOf[1].properties.services.items.type, - parentSchema: - schema167.anyOf[1].allOf[1].properties.services.items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid17 = _errs70 === errors; - if (!valid17) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema167.anyOf[1].allOf[1].properties.services, - data: data29, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid16 = _errs68 === errors; - } else { - var valid16 = true; - } - } - } - } else { - const err55 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema167.anyOf[1].allOf[1].type, - parentSchema: schema167.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid10 = _errs63 === errors; - } - var _valid0 = _errs40 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs79 = errors; - const _errs80 = errors; - if (errors === _errs80) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err56 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema167.anyOf[2].allOf[0].required, - parentSchema: schema167.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data.name !== undefined) { - let data34 = data.name; - const _errs82 = errors; - if (typeof data34 !== 'string') { - const err57 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.name, - data: data34, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid20 = _errs82 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.description !== undefined) { - let data35 = data.description; - const _errs84 = errors; - if (typeof data35 !== 'string') { - const err58 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.description, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid20 = _errs84 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.type !== undefined) { - let data36 = data.type; - const _errs86 = errors; - if (typeof data36 !== 'string') { - const err59 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data36 === 'device' || - data36 === 'group' || - data36 === 'edge instantiable' || - data36 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema167.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema167.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema167.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid20 = _errs86 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.isPublic !== undefined) { - let data37 = data.isPublic; - const _errs88 = errors; - if (typeof data37 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema167.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.isPublic, - data: data37, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs88 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.viewer !== undefined) { - let data38 = data.viewer; - const _errs90 = errors; - if (errors === _errs90) { - if (Array.isArray(data38)) { - var valid21 = true; - const len6 = data38.length; - for (let i6 = 0; i6 < len6; i6++) { - let data39 = data38[i6]; - const _errs92 = errors; - if (errors === _errs92) { - if ( - data39 && - typeof data39 == 'object' && - !Array.isArray(data39) - ) { - let missing7; - if (data39.url === undefined && (missing7 = 'url')) { - const err62 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema167.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema167.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data39.url !== undefined) { - let data40 = data39.url; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err63 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema167.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema167.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs92 === errors; - if (!valid21) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.viewer, - data: data38, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid20 = _errs90 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.owner !== undefined) { - let data41 = data.owner; - const _errs96 = errors; - if (errors === _errs96) { - if (Array.isArray(data41)) { - var valid23 = true; - const len7 = data41.length; - for (let i7 = 0; i7 < len7; i7++) { - let data42 = data41[i7]; - const _errs98 = errors; - if (errors === _errs98) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - let missing8; - if (data42.url === undefined && (missing8 = 'url')) { - const err67 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + missing8 + "'", - schema: - schema167.anyOf[2].allOf[0].properties.owner.items - .required, - parentSchema: - schema167.anyOf[2].allOf[0].properties.owner - .items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data42.url !== undefined) { - let data43 = data42.url; - const _errs100 = errors; - if (errors === _errs100) { - if (errors === _errs100) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err68 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema167.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema167.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid23 = _errs98 === errors; - if (!valid23) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.owner, - data: data41, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid20 = _errs96 === errors; - } else { - var valid20 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema167.anyOf[2].allOf[0].type, - parentSchema: schema167.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid19 = _errs80 === errors; - if (valid19) { - const _errs102 = errors; - if (errors === _errs102) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs104 = errors; - if ('edge instantiable' !== data44) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema167.anyOf[2].allOf[1].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.codeUrl !== undefined) { - let data45 = data.codeUrl; - const _errs105 = errors; - if (errors === _errs105) { - if (errors === _errs105) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err74 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema167.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema167.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.services !== undefined) { - let data46 = data.services; - const _errs107 = errors; - if (errors === _errs107) { - if (Array.isArray(data46)) { - var valid26 = true; - const len8 = data46.length; - for (let i8 = 0; i8 < len8; i8++) { - let data47 = data46[i8]; - const _errs109 = errors; - if (errors === _errs109) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - if (data47.serviceType !== undefined) { - let data48 = data47.serviceType; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema167.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceId !== undefined) { - let data49 = data47.serviceId; - const _errs114 = errors; - if (typeof data49 !== 'string') { - const err78 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema167.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data49, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceDirection !== undefined) { - let data50 = data47.serviceDirection; - const _errs116 = errors; - if (typeof data50 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema167.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data50 === 'consumer' || - data50 === 'producer' || - data50 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema167.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema167.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema167.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err81 = { - instancePath: instancePath + '/services/' + i8, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema167.anyOf[2].allOf[1].properties.services.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid26 = _errs109 === errors; - if (!valid26) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema167.anyOf[2].allOf[1].properties.services, - data: data46, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err83 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema167.anyOf[2].allOf[1].type, - parentSchema: schema167.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid19 = _errs102 === errors; - } - var _valid0 = _errs79 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs118 = errors; - const _errs119 = errors; - if (errors === _errs119) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err84 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema167.anyOf[3].allOf[0].required, - parentSchema: schema167.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data.name !== undefined) { - let data51 = data.name; - const _errs121 = errors; - if (typeof data51 !== 'string') { - const err85 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema167.anyOf[3].allOf[0].properties.name, - data: data51, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid29 = _errs121 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.description !== undefined) { - let data52 = data.description; - const _errs123 = errors; - if (typeof data52 !== 'string') { - const err86 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema167.anyOf[3].allOf[0].properties.description, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid29 = _errs123 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.type !== undefined) { - let data53 = data.type; - const _errs125 = errors; - if (typeof data53 !== 'string') { - const err87 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema167.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema167.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data53 === 'device' || - data53 === 'group' || - data53 === 'edge instantiable' || - data53 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema167.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema167.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema167.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid29 = _errs125 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.isPublic !== undefined) { - let data54 = data.isPublic; - const _errs127 = errors; - if (typeof data54 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema167.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema167.anyOf[3].allOf[0].properties.isPublic, - data: data54, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid29 = _errs127 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.viewer !== undefined) { - let data55 = data.viewer; - const _errs129 = errors; - if (errors === _errs129) { - if (Array.isArray(data55)) { - var valid30 = true; - const len9 = data55.length; - for (let i9 = 0; i9 < len9; i9++) { - let data56 = data55[i9]; - const _errs131 = errors; - if (errors === _errs131) { - if ( - data56 && - typeof data56 == 'object' && - !Array.isArray(data56) - ) { - let missing10; - if (data56.url === undefined && (missing10 = 'url')) { - const err90 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + missing10 + "'", - schema: - schema167.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema167.anyOf[3].allOf[0].properties.viewer - .items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data56.url !== undefined) { - let data57 = data56.url; - const _errs133 = errors; - if (errors === _errs133) { - if (errors === _errs133) { - if (typeof data57 === 'string') { - if (!formats0(data57)) { - const err91 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema167.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema167.anyOf[3].allOf[0].properties.viewer.items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid30 = _errs131 === errors; - if (!valid30) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema167.anyOf[3].allOf[0].properties.viewer, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid29 = _errs129 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.owner !== undefined) { - let data58 = data.owner; - const _errs135 = errors; - if (errors === _errs135) { - if (Array.isArray(data58)) { - var valid32 = true; - const len10 = data58.length; - for (let i10 = 0; i10 < len10; i10++) { - let data59 = data58[i10]; - const _errs137 = errors; - if (errors === _errs137) { - if ( - data59 && - typeof data59 == 'object' && - !Array.isArray(data59) - ) { - let missing11; - if (data59.url === undefined && (missing11 = 'url')) { - const err95 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema167.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema167.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data59.url !== undefined) { - let data60 = data59.url; - const _errs139 = errors; - if (errors === _errs139) { - if (errors === _errs139) { - if (typeof data60 === 'string') { - if (!formats0(data60)) { - const err96 = { - instancePath: - instancePath + - '/owner/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + '/owner/' + i10 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema167.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[3].allOf[0].properties.owner.items - .type, - parentSchema: - schema167.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid32 = _errs137 === errors; - if (!valid32) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema167.anyOf[3].allOf[0].properties.owner, - data: data58, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid29 = _errs135 === errors; - } else { - var valid29 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema167.anyOf[3].allOf[0].type, - parentSchema: schema167.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid28 = _errs119 === errors; - if (valid28) { - const _errs141 = errors; - if (errors === _errs141) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err101 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema167.anyOf[3].allOf[1].required, - parentSchema: schema167.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } else { - if (data.type !== undefined) { - let data61 = data.type; - const _errs143 = errors; - if ('group' !== data61) { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema167.anyOf[3].allOf[1].properties.type, - data: data61, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data.devices !== undefined) { - let data62 = data.devices; - const _errs144 = errors; - if (errors === _errs144) { - if (Array.isArray(data62)) { - var valid35 = true; - const len11 = data62.length; - for (let i11 = 0; i11 < len11; i11++) { - let data63 = data62[i11]; - const _errs146 = errors; - if (errors === _errs146) { - if ( - data63 && - typeof data63 == 'object' && - !Array.isArray(data63) - ) { - let missing13; - if (data63.url === undefined && (missing13 = 'url')) { - const err103 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema167.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema167.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } else { - if (data63.url !== undefined) { - let data64 = data63.url; - const _errs148 = errors; - if (errors === _errs148) { - if (errors === _errs148) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err104 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema167.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } else { - const err105 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema167.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema167.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - } - } - } - } else { - const err106 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema167.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema167.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid35 = _errs146 === errors; - if (!valid35) { - break; - } - } - } else { - const err107 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema167.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema167.anyOf[3].allOf[1].properties.devices, - data: data62, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - } - } - } else { - const err108 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema167.anyOf[3].allOf[1].type, - parentSchema: schema167.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid28 = _errs141 === errors; - } - var _valid0 = _errs118 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err109 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema167.anyOf, - parentSchema: schema167, - data, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - validate182.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate182.errors = vErrors; - return errors === 0; -} -exports.validateCreateDeviceBodyResponse = validate183; -const schema168 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createDeviceBodyResponse', - 'x-location': - '#/paths//devices/post/requestBody/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate183( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema168.anyOf[0].allOf[0].required, - parentSchema: schema168.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - const err1 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema168.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err3 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.name, - data: data1, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err4 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.description, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs10 = errors; - if (typeof data3 !== 'string') { - const err5 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema168.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema168.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema168.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs12 = errors; - if (typeof data4 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema168.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.isPublic, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - const err8 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema168.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema168.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - const err9 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[0].allOf[0].properties - .viewer.items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema168.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[0].allOf[0].properties.viewer.items - .type, - parentSchema: - schema168.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema168.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.viewer, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data8)) { - var valid5 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - const err13 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema168.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema168.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - const err14 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[0].allOf[0].properties - .owner.items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema168.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[0].allOf[0].properties.owner.items - .type, - parentSchema: - schema168.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema168.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.owner, - data: data8, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema168.anyOf[0].allOf[0].type, - parentSchema: schema168.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs28 = errors; - if ('cloud instantiable' !== data11) { - const err19 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema168.anyOf[0].allOf[1].properties.type, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err20 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema168.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema168.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data13)) { - var valid8 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs36 = errors; - if (errors === _errs36) { - if (errors === _errs36) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema168.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err24 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema168.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs40 = errors; - if (typeof data17 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema168.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema168.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema168.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema168.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid9 = _errs40 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err27 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema168.anyOf[0].allOf[1].properties.services.items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema168.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema168.anyOf[0].allOf[1].properties.services, - data: data13, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema168.anyOf[0].allOf[1].type, - parentSchema: schema168.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid1 = _errs26 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs42 = errors; - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.url === undefined && (missing3 = 'url')) || - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema168.anyOf[1].allOf[0].required, - parentSchema: schema168.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.url !== undefined) { - let data18 = data.url; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - const err31 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema168.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.name !== undefined) { - let data19 = data.name; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err33 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.name, - data: data19, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data20 = data.description; - const _errs49 = errors; - if (typeof data20 !== 'string') { - const err34 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.description, - data: data20, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data21 = data.type; - const _errs51 = errors; - if (typeof data21 !== 'string') { - const err35 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data21 === 'device' || - data21 === 'group' || - data21 === 'edge instantiable' || - data21 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema168.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema168.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema168.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data22 = data.isPublic; - const _errs53 = errors; - if (typeof data22 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema168.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.isPublic, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid11 = _errs53 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data23 = data.viewer; - const _errs55 = errors; - if (errors === _errs55) { - if (Array.isArray(data23)) { - var valid12 = true; - const len3 = data23.length; - for (let i3 = 0; i3 < len3; i3++) { - let data24 = data23[i3]; - const _errs57 = errors; - if (errors === _errs57) { - if ( - data24 && - typeof data24 == 'object' && - !Array.isArray(data24) - ) { - let missing4; - if (data24.url === undefined && (missing4 = 'url')) { - const err38 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema168.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema168.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data24.url !== undefined) { - let data25 = data24.url; - const _errs59 = errors; - if (errors === _errs59) { - if (errors === _errs59) { - if (typeof data25 === 'string') { - if (!formats0(data25)) { - const err39 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[1].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema168.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema168.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid12 = _errs57 === errors; - if (!valid12) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema168.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.viewer, - data: data23, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid11 = _errs55 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data26 = data.owner; - const _errs61 = errors; - if (errors === _errs61) { - if (Array.isArray(data26)) { - var valid14 = true; - const len4 = data26.length; - for (let i4 = 0; i4 < len4; i4++) { - let data27 = data26[i4]; - const _errs63 = errors; - if (errors === _errs63) { - if ( - data27 && - typeof data27 == 'object' && - !Array.isArray(data27) - ) { - let missing5; - if (data27.url === undefined && (missing5 = 'url')) { - const err43 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema168.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema168.anyOf[1].allOf[0].properties.owner - .items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data27.url !== undefined) { - let data28 = data27.url; - const _errs65 = errors; - if (errors === _errs65) { - if (errors === _errs65) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err44 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[1].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema168.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema168.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid14 = _errs63 === errors; - if (!valid14) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema168.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.owner, - data: data26, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid11 = _errs61 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema168.anyOf[1].allOf[0].type, - parentSchema: schema168.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid10 = _errs43 === errors; - if (valid10) { - const _errs67 = errors; - if (errors === _errs67) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data29 = data.type; - const _errs69 = errors; - if ('device' !== data29) { - const err49 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema168.anyOf[1].allOf[1].properties.type, - data: data29, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.connected !== undefined) { - let data30 = data.connected; - const _errs70 = errors; - if (typeof data30 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/connected', - schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema168.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema168.anyOf[1].allOf[1].properties.connected, - data: data30, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid16 = _errs70 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.announcedAvailability !== undefined) { - let data31 = data.announcedAvailability; - const _errs72 = errors; - if (errors === _errs72) { - if (Array.isArray(data31)) { - var valid17 = true; - const len5 = data31.length; - for (let i5 = 0; i5 < len5; i5++) { - let data32 = data31[i5]; - const _errs74 = errors; - if (errors === _errs74) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - if (data32.start !== undefined) { - let data33 = data32.start; - const _errs76 = errors; - if (errors === _errs76) { - if (errors === _errs76) { - if (typeof data33 === 'string') { - if (!formats22.validate(data33)) { - const err51 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema168.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start - .type, - parentSchema: - schema168.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid18 = _errs76 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data32.end !== undefined) { - let data34 = data32.end; - const _errs78 = errors; - if (errors === _errs78) { - if (errors === _errs78) { - if (typeof data34 === 'string') { - if (!formats22.validate(data34)) { - const err53 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema168.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end - .type, - parentSchema: - schema168.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } else { - const err55 = { - instancePath: instancePath + '/announcedAvailability/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[1].allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema168.anyOf[1].allOf[1].properties.announcedAvailability - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid17 = _errs74 === errors; - if (!valid17) { - break; - } - } - } else { - const err56 = { - instancePath: instancePath + '/announcedAvailability', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema168.anyOf[1].allOf[1].properties.announcedAvailability.type, - parentSchema: - schema168.anyOf[1].allOf[1].properties.announcedAvailability, - data: data31, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid16 = _errs72 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data35 = data.experiment; - const _errs80 = errors; - if (errors === _errs80) { - if (errors === _errs80) { - if (typeof data35 === 'string') { - if (!formats0(data35)) { - const err57 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema168.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid16 = _errs80 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data36 = data.services; - const _errs82 = errors; - if (errors === _errs82) { - if (Array.isArray(data36)) { - var valid19 = true; - const len6 = data36.length; - for (let i6 = 0; i6 < len6; i6++) { - let data37 = data36[i6]; - const _errs84 = errors; - if (errors === _errs84) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.serviceType !== undefined) { - let data38 = data37.serviceType; - const _errs87 = errors; - if (errors === _errs87) { - if (errors === _errs87) { - if (typeof data38 === 'string') { - if (!formats0(data38)) { - const err59 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[1].allOf[1].properties - .services.items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema168.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid20 = _errs87 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceId !== undefined) { - let data39 = data37.serviceId; - const _errs89 = errors; - if (typeof data39 !== 'string') { - const err61 = { - instancePath: - instancePath + '/services/' + i6 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[1].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema168.anyOf[1].allOf[1].properties.services - .items.properties.serviceId, - data: data39, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs89 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceDirection !== undefined) { - let data40 = data37.serviceDirection; - const _errs91 = errors; - if (typeof data40 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema168.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data40 === 'consumer' || - data40 === 'producer' || - data40 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema168.anyOf[1].allOf[1].properties - .services.items.properties.serviceDirection - .enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema168.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema168.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid20 = _errs91 === errors; - } else { - var valid20 = true; - } - } - } - } else { - const err64 = { - instancePath: instancePath + '/services/' + i6, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[1].allOf[1].properties.services.items - .type, - parentSchema: - schema168.anyOf[1].allOf[1].properties.services.items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid19 = _errs84 === errors; - if (!valid19) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema168.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema168.anyOf[1].allOf[1].properties.services, - data: data36, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid16 = _errs82 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema168.anyOf[1].allOf[1].type, - parentSchema: schema168.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid10 = _errs67 === errors; - } - var _valid0 = _errs42 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs93 = errors; - const _errs94 = errors; - if (errors === _errs94) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.url === undefined && (missing6 = 'url')) || - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err67 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema168.anyOf[2].allOf[0].required, - parentSchema: schema168.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data.url !== undefined) { - let data41 = data.url; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data41 === 'string') { - if (!formats0(data41)) { - const err68 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema168.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid22 = _errs96 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.name !== undefined) { - let data42 = data.name; - const _errs98 = errors; - if (typeof data42 !== 'string') { - const err70 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.name, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid22 = _errs98 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.description !== undefined) { - let data43 = data.description; - const _errs100 = errors; - if (typeof data43 !== 'string') { - const err71 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.description, - data: data43, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid22 = _errs100 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs102 = errors; - if (typeof data44 !== 'string') { - const err72 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data44 === 'device' || - data44 === 'group' || - data44 === 'edge instantiable' || - data44 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema168.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema168.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema168.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid22 = _errs102 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.isPublic !== undefined) { - let data45 = data.isPublic; - const _errs104 = errors; - if (typeof data45 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema168.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.isPublic, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid22 = _errs104 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.viewer !== undefined) { - let data46 = data.viewer; - const _errs106 = errors; - if (errors === _errs106) { - if (Array.isArray(data46)) { - var valid23 = true; - const len7 = data46.length; - for (let i7 = 0; i7 < len7; i7++) { - let data47 = data46[i7]; - const _errs108 = errors; - if (errors === _errs108) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - let missing7; - if (data47.url === undefined && (missing7 = 'url')) { - const err75 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema168.anyOf[2].allOf[0].properties.viewer - .items.required, - parentSchema: - schema168.anyOf[2].allOf[0].properties.viewer - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data47.url !== undefined) { - let data48 = data47.url; - const _errs110 = errors; - if (errors === _errs110) { - if (errors === _errs110) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema168.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema168.anyOf[2].allOf[0].properties.viewer.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid23 = _errs108 === errors; - if (!valid23) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema168.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.viewer, - data: data46, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid22 = _errs106 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.owner !== undefined) { - let data49 = data.owner; - const _errs112 = errors; - if (errors === _errs112) { - if (Array.isArray(data49)) { - var valid25 = true; - const len8 = data49.length; - for (let i8 = 0; i8 < len8; i8++) { - let data50 = data49[i8]; - const _errs114 = errors; - if (errors === _errs114) { - if ( - data50 && - typeof data50 == 'object' && - !Array.isArray(data50) - ) { - let missing8; - if (data50.url === undefined && (missing8 = 'url')) { - const err80 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema168.anyOf[2].allOf[0].properties.owner - .items.required, - parentSchema: - schema168.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data50.url !== undefined) { - let data51 = data50.url; - const _errs116 = errors; - if (errors === _errs116) { - if (errors === _errs116) { - if (typeof data51 === 'string') { - if (!formats0(data51)) { - const err81 = { - instancePath: - instancePath + - '/owner/' + - i8 + - '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + '/owner/' + i8 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema168.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema168.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid25 = _errs114 === errors; - if (!valid25) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema168.anyOf[2].allOf[0].properties.owner.type, - parentSchema: - schema168.anyOf[2].allOf[0].properties.owner, - data: data49, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid22 = _errs112 === errors; - } else { - var valid22 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema168.anyOf[2].allOf[0].type, - parentSchema: schema168.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid21 = _errs94 === errors; - if (valid21) { - const _errs118 = errors; - if (errors === _errs118) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data52 = data.type; - const _errs120 = errors; - if ('edge instantiable' !== data52) { - const err86 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema168.anyOf[2].allOf[1].properties.type, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.codeUrl !== undefined) { - let data53 = data.codeUrl; - const _errs121 = errors; - if (errors === _errs121) { - if (errors === _errs121) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err87 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema168.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema168.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid27 = _errs121 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.services !== undefined) { - let data54 = data.services; - const _errs123 = errors; - if (errors === _errs123) { - if (Array.isArray(data54)) { - var valid28 = true; - const len9 = data54.length; - for (let i9 = 0; i9 < len9; i9++) { - let data55 = data54[i9]; - const _errs125 = errors; - if (errors === _errs125) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - if (data55.serviceType !== undefined) { - let data56 = data55.serviceType; - const _errs128 = errors; - if (errors === _errs128) { - if (errors === _errs128) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err89 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema168.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid29 = _errs128 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceId !== undefined) { - let data57 = data55.serviceId; - const _errs130 = errors; - if (typeof data57 !== 'string') { - const err91 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema168.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid29 = _errs130 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceDirection !== undefined) { - let data58 = data55.serviceDirection; - const _errs132 = errors; - if (typeof data58 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema168.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data58 === 'consumer' || - data58 === 'producer' || - data58 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema168.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema168.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema168.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid29 = _errs132 === errors; - } else { - var valid29 = true; - } - } - } - } else { - const err94 = { - instancePath: instancePath + '/services/' + i9, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema168.anyOf[2].allOf[1].properties.services.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid28 = _errs125 === errors; - if (!valid28) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema168.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema168.anyOf[2].allOf[1].properties.services, - data: data54, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid27 = _errs123 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err96 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema168.anyOf[2].allOf[1].type, - parentSchema: schema168.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid21 = _errs118 === errors; - } - var _valid0 = _errs93 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs134 = errors; - const _errs135 = errors; - if (errors === _errs135) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.url === undefined && (missing9 = 'url')) || - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err97 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema168.anyOf[3].allOf[0].required, - parentSchema: schema168.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data.url !== undefined) { - let data59 = data.url; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data59 === 'string') { - if (!formats0(data59)) { - const err98 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema168.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema168.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid31 = _errs137 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.name !== undefined) { - let data60 = data.name; - const _errs139 = errors; - if (typeof data60 !== 'string') { - const err100 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema168.anyOf[3].allOf[0].properties.name, - data: data60, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid31 = _errs139 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.description !== undefined) { - let data61 = data.description; - const _errs141 = errors; - if (typeof data61 !== 'string') { - const err101 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema168.anyOf[3].allOf[0].properties.description, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid31 = _errs141 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.type !== undefined) { - let data62 = data.type; - const _errs143 = errors; - if (typeof data62 !== 'string') { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema168.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema168.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data62 === 'device' || - data62 === 'group' || - data62 === 'edge instantiable' || - data62 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema168.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema168.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema168.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid31 = _errs143 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.isPublic !== undefined) { - let data63 = data.isPublic; - const _errs145 = errors; - if (typeof data63 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema168.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema168.anyOf[3].allOf[0].properties.isPublic, - data: data63, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid31 = _errs145 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.viewer !== undefined) { - let data64 = data.viewer; - const _errs147 = errors; - if (errors === _errs147) { - if (Array.isArray(data64)) { - var valid32 = true; - const len10 = data64.length; - for (let i10 = 0; i10 < len10; i10++) { - let data65 = data64[i10]; - const _errs149 = errors; - if (errors === _errs149) { - if ( - data65 && - typeof data65 == 'object' && - !Array.isArray(data65) - ) { - let missing10; - if (data65.url === undefined && (missing10 = 'url')) { - const err105 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema168.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema168.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data65.url !== undefined) { - let data66 = data65.url; - const _errs151 = errors; - if (errors === _errs151) { - if (errors === _errs151) { - if (typeof data66 === 'string') { - if (!formats0(data66)) { - const err106 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema168.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[3].allOf[0].properties.viewer - .items.type, - parentSchema: - schema168.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid32 = _errs149 === errors; - if (!valid32) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema168.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: - schema168.anyOf[3].allOf[0].properties.viewer, - data: data64, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid31 = _errs147 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.owner !== undefined) { - let data67 = data.owner; - const _errs153 = errors; - if (errors === _errs153) { - if (Array.isArray(data67)) { - var valid34 = true; - const len11 = data67.length; - for (let i11 = 0; i11 < len11; i11++) { - let data68 = data67[i11]; - const _errs155 = errors; - if (errors === _errs155) { - if ( - data68 && - typeof data68 == 'object' && - !Array.isArray(data68) - ) { - let missing11; - if ( - data68.url === undefined && - (missing11 = 'url') - ) { - const err110 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema168.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema168.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data68.url !== undefined) { - let data69 = data68.url; - const _errs157 = errors; - if (errors === _errs157) { - if (errors === _errs157) { - if (typeof data69 === 'string') { - if (!formats0(data69)) { - const err111 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[3].allOf[0] - .properties.owner.items.properties - .url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema168.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[3].allOf[0].properties.owner - .items.type, - parentSchema: - schema168.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid34 = _errs155 === errors; - if (!valid34) { - break; - } - } - } else { - const err114 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema168.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema168.anyOf[3].allOf[0].properties.owner, - data: data67, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid31 = _errs153 === errors; - } else { - var valid31 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema168.anyOf[3].allOf[0].type, - parentSchema: schema168.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid30 = _errs135 === errors; - if (valid30) { - const _errs159 = errors; - if (errors === _errs159) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err116 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema168.anyOf[3].allOf[1].required, - parentSchema: schema168.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data.type !== undefined) { - let data70 = data.type; - const _errs161 = errors; - if ('group' !== data70) { - const err117 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema168.anyOf[3].allOf[1].properties.type, - data: data70, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data.devices !== undefined) { - let data71 = data.devices; - const _errs162 = errors; - if (errors === _errs162) { - if (Array.isArray(data71)) { - var valid37 = true; - const len12 = data71.length; - for (let i12 = 0; i12 < len12; i12++) { - let data72 = data71[i12]; - const _errs164 = errors; - if (errors === _errs164) { - if ( - data72 && - typeof data72 == 'object' && - !Array.isArray(data72) - ) { - let missing13; - if (data72.url === undefined && (missing13 = 'url')) { - const err118 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema168.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema168.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data72.url !== undefined) { - let data73 = data72.url; - const _errs166 = errors; - if (errors === _errs166) { - if (errors === _errs166) { - if (typeof data73 === 'string') { - if (!formats0(data73)) { - const err119 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema168.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema168.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema168.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema168.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema168.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid37 = _errs164 === errors; - if (!valid37) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema168.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema168.anyOf[3].allOf[1].properties.devices, - data: data71, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid36 = _errs162 === errors; - } else { - var valid36 = true; - } - } - } - } else { - const err123 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema168.anyOf[3].allOf[1].type, - parentSchema: schema168.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid30 = _errs159 === errors; - } - var _valid0 = _errs134 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err124 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema168.anyOf, - parentSchema: schema168, - data, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate183.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate183.errors = vErrors; - return errors === 0; -} -exports.validateCreateDeviceResponse201Request = validate184; -const schema169 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createDeviceResponse201Request', - 'x-location': - '#/paths//devices/post/responses/201/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate184( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema169.anyOf[0].allOf[0].required, - parentSchema: schema169.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs4 = errors; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.name, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err2 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.description, - data: data1, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err3 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema169.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema169.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema169.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema169.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.isPublic, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - var valid3 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - const err6 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: - schema169.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema169.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - const err7 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema169.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema169.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.viewer, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid5 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - const err11 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema169.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema169.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - const err12 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema169.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[0].allOf[0].properties.owner.items.type, - parentSchema: - schema169.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.owner, - data: data7, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema169.anyOf[0].allOf[0].type, - parentSchema: schema169.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data10) { - const err17 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema169.anyOf[0].allOf[1].properties.type, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err18 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema169.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema169.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data12)) { - var valid8 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err20 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema169.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs36 = errors; - if (typeof data15 !== 'string') { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema169.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema169.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema169.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema169.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema169.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err25 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema169.anyOf[0].allOf[1].properties.services.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema169.anyOf[0].allOf[1].properties.services, - data: data12, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err27 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema169.anyOf[0].allOf[1].type, - parentSchema: schema169.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid1 = _errs24 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs40 = errors; - const _errs41 = errors; - if (errors === _errs41) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err28 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema169.anyOf[1].allOf[0].required, - parentSchema: schema169.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data.name !== undefined) { - let data17 = data.name; - const _errs43 = errors; - if (typeof data17 !== 'string') { - const err29 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.name, - data: data17, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid11 = _errs43 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data18 = data.description; - const _errs45 = errors; - if (typeof data18 !== 'string') { - const err30 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.description, - data: data18, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data19 = data.type; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err31 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data19 === 'device' || - data19 === 'group' || - data19 === 'edge instantiable' || - data19 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema169.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema169.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema169.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data20 = data.isPublic; - const _errs49 = errors; - if (typeof data20 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema169.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.isPublic, - data: data20, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data21 = data.viewer; - const _errs51 = errors; - if (errors === _errs51) { - if (Array.isArray(data21)) { - var valid12 = true; - const len3 = data21.length; - for (let i3 = 0; i3 < len3; i3++) { - let data22 = data21[i3]; - const _errs53 = errors; - if (errors === _errs53) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - let missing4; - if (data22.url === undefined && (missing4 = 'url')) { - const err34 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema169.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema169.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data22.url !== undefined) { - let data23 = data22.url; - const _errs55 = errors; - if (errors === _errs55) { - if (errors === _errs55) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err35 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema169.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema169.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid12 = _errs53 === errors; - if (!valid12) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.viewer, - data: data21, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data24 = data.owner; - const _errs57 = errors; - if (errors === _errs57) { - if (Array.isArray(data24)) { - var valid14 = true; - const len4 = data24.length; - for (let i4 = 0; i4 < len4; i4++) { - let data25 = data24[i4]; - const _errs59 = errors; - if (errors === _errs59) { - if ( - data25 && - typeof data25 == 'object' && - !Array.isArray(data25) - ) { - let missing5; - if (data25.url === undefined && (missing5 = 'url')) { - const err39 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema169.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema169.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data25.url !== undefined) { - let data26 = data25.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data26 === 'string') { - if (!formats0(data26)) { - const err40 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[1].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema169.anyOf[1].allOf[0].properties.owner - .items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema169.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid14 = _errs59 === errors; - if (!valid14) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.owner, - data: data24, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid11 = _errs57 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema169.anyOf[1].allOf[0].type, - parentSchema: schema169.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid10 = _errs41 === errors; - if (valid10) { - const _errs63 = errors; - if (errors === _errs63) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data27 = data.type; - const _errs65 = errors; - if ('device' !== data27) { - const err45 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema169.anyOf[1].allOf[1].properties.type, - data: data27, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data28 = data.experiment; - const _errs66 = errors; - if (errors === _errs66) { - if (errors === _errs66) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err46 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema169.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema169.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid16 = _errs66 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data29 = data.services; - const _errs68 = errors; - if (errors === _errs68) { - if (Array.isArray(data29)) { - var valid17 = true; - const len5 = data29.length; - for (let i5 = 0; i5 < len5; i5++) { - let data30 = data29[i5]; - const _errs70 = errors; - if (errors === _errs70) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - if (data30.serviceType !== undefined) { - let data31 = data30.serviceType; - const _errs73 = errors; - if (errors === _errs73) { - if (errors === _errs73) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err48 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema169.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid18 = _errs73 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceId !== undefined) { - let data32 = data30.serviceId; - const _errs75 = errors; - if (typeof data32 !== 'string') { - const err50 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[1].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema169.anyOf[1].allOf[1].properties.services.items - .properties.serviceId, - data: data32, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid18 = _errs75 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceDirection !== undefined) { - let data33 = data30.serviceDirection; - const _errs77 = errors; - if (typeof data33 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema169.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data33 === 'consumer' || - data33 === 'producer' || - data33 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema169.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema169.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema169.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err53 = { - instancePath: instancePath + '/services/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[1].allOf[1].properties.services.items.type, - parentSchema: - schema169.anyOf[1].allOf[1].properties.services.items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid17 = _errs70 === errors; - if (!valid17) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema169.anyOf[1].allOf[1].properties.services, - data: data29, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid16 = _errs68 === errors; - } else { - var valid16 = true; - } - } - } - } else { - const err55 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema169.anyOf[1].allOf[1].type, - parentSchema: schema169.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid10 = _errs63 === errors; - } - var _valid0 = _errs40 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs79 = errors; - const _errs80 = errors; - if (errors === _errs80) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err56 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema169.anyOf[2].allOf[0].required, - parentSchema: schema169.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data.name !== undefined) { - let data34 = data.name; - const _errs82 = errors; - if (typeof data34 !== 'string') { - const err57 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.name, - data: data34, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid20 = _errs82 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.description !== undefined) { - let data35 = data.description; - const _errs84 = errors; - if (typeof data35 !== 'string') { - const err58 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.description, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid20 = _errs84 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.type !== undefined) { - let data36 = data.type; - const _errs86 = errors; - if (typeof data36 !== 'string') { - const err59 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data36 === 'device' || - data36 === 'group' || - data36 === 'edge instantiable' || - data36 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema169.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema169.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema169.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid20 = _errs86 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.isPublic !== undefined) { - let data37 = data.isPublic; - const _errs88 = errors; - if (typeof data37 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema169.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.isPublic, - data: data37, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs88 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.viewer !== undefined) { - let data38 = data.viewer; - const _errs90 = errors; - if (errors === _errs90) { - if (Array.isArray(data38)) { - var valid21 = true; - const len6 = data38.length; - for (let i6 = 0; i6 < len6; i6++) { - let data39 = data38[i6]; - const _errs92 = errors; - if (errors === _errs92) { - if ( - data39 && - typeof data39 == 'object' && - !Array.isArray(data39) - ) { - let missing7; - if (data39.url === undefined && (missing7 = 'url')) { - const err62 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema169.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema169.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data39.url !== undefined) { - let data40 = data39.url; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err63 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema169.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema169.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs92 === errors; - if (!valid21) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.viewer, - data: data38, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid20 = _errs90 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.owner !== undefined) { - let data41 = data.owner; - const _errs96 = errors; - if (errors === _errs96) { - if (Array.isArray(data41)) { - var valid23 = true; - const len7 = data41.length; - for (let i7 = 0; i7 < len7; i7++) { - let data42 = data41[i7]; - const _errs98 = errors; - if (errors === _errs98) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - let missing8; - if (data42.url === undefined && (missing8 = 'url')) { - const err67 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + missing8 + "'", - schema: - schema169.anyOf[2].allOf[0].properties.owner.items - .required, - parentSchema: - schema169.anyOf[2].allOf[0].properties.owner - .items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data42.url !== undefined) { - let data43 = data42.url; - const _errs100 = errors; - if (errors === _errs100) { - if (errors === _errs100) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err68 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema169.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema169.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid23 = _errs98 === errors; - if (!valid23) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.owner, - data: data41, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid20 = _errs96 === errors; - } else { - var valid20 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema169.anyOf[2].allOf[0].type, - parentSchema: schema169.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid19 = _errs80 === errors; - if (valid19) { - const _errs102 = errors; - if (errors === _errs102) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs104 = errors; - if ('edge instantiable' !== data44) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema169.anyOf[2].allOf[1].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.codeUrl !== undefined) { - let data45 = data.codeUrl; - const _errs105 = errors; - if (errors === _errs105) { - if (errors === _errs105) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err74 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema169.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema169.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.services !== undefined) { - let data46 = data.services; - const _errs107 = errors; - if (errors === _errs107) { - if (Array.isArray(data46)) { - var valid26 = true; - const len8 = data46.length; - for (let i8 = 0; i8 < len8; i8++) { - let data47 = data46[i8]; - const _errs109 = errors; - if (errors === _errs109) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - if (data47.serviceType !== undefined) { - let data48 = data47.serviceType; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema169.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceId !== undefined) { - let data49 = data47.serviceId; - const _errs114 = errors; - if (typeof data49 !== 'string') { - const err78 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema169.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data49, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceDirection !== undefined) { - let data50 = data47.serviceDirection; - const _errs116 = errors; - if (typeof data50 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema169.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data50 === 'consumer' || - data50 === 'producer' || - data50 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema169.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema169.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema169.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err81 = { - instancePath: instancePath + '/services/' + i8, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema169.anyOf[2].allOf[1].properties.services.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid26 = _errs109 === errors; - if (!valid26) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema169.anyOf[2].allOf[1].properties.services, - data: data46, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err83 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema169.anyOf[2].allOf[1].type, - parentSchema: schema169.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid19 = _errs102 === errors; - } - var _valid0 = _errs79 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs118 = errors; - const _errs119 = errors; - if (errors === _errs119) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err84 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema169.anyOf[3].allOf[0].required, - parentSchema: schema169.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data.name !== undefined) { - let data51 = data.name; - const _errs121 = errors; - if (typeof data51 !== 'string') { - const err85 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema169.anyOf[3].allOf[0].properties.name, - data: data51, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid29 = _errs121 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.description !== undefined) { - let data52 = data.description; - const _errs123 = errors; - if (typeof data52 !== 'string') { - const err86 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema169.anyOf[3].allOf[0].properties.description, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid29 = _errs123 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.type !== undefined) { - let data53 = data.type; - const _errs125 = errors; - if (typeof data53 !== 'string') { - const err87 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema169.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema169.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data53 === 'device' || - data53 === 'group' || - data53 === 'edge instantiable' || - data53 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema169.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema169.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema169.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid29 = _errs125 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.isPublic !== undefined) { - let data54 = data.isPublic; - const _errs127 = errors; - if (typeof data54 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema169.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema169.anyOf[3].allOf[0].properties.isPublic, - data: data54, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid29 = _errs127 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.viewer !== undefined) { - let data55 = data.viewer; - const _errs129 = errors; - if (errors === _errs129) { - if (Array.isArray(data55)) { - var valid30 = true; - const len9 = data55.length; - for (let i9 = 0; i9 < len9; i9++) { - let data56 = data55[i9]; - const _errs131 = errors; - if (errors === _errs131) { - if ( - data56 && - typeof data56 == 'object' && - !Array.isArray(data56) - ) { - let missing10; - if (data56.url === undefined && (missing10 = 'url')) { - const err90 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + missing10 + "'", - schema: - schema169.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema169.anyOf[3].allOf[0].properties.viewer - .items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data56.url !== undefined) { - let data57 = data56.url; - const _errs133 = errors; - if (errors === _errs133) { - if (errors === _errs133) { - if (typeof data57 === 'string') { - if (!formats0(data57)) { - const err91 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema169.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema169.anyOf[3].allOf[0].properties.viewer.items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid30 = _errs131 === errors; - if (!valid30) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema169.anyOf[3].allOf[0].properties.viewer, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid29 = _errs129 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.owner !== undefined) { - let data58 = data.owner; - const _errs135 = errors; - if (errors === _errs135) { - if (Array.isArray(data58)) { - var valid32 = true; - const len10 = data58.length; - for (let i10 = 0; i10 < len10; i10++) { - let data59 = data58[i10]; - const _errs137 = errors; - if (errors === _errs137) { - if ( - data59 && - typeof data59 == 'object' && - !Array.isArray(data59) - ) { - let missing11; - if (data59.url === undefined && (missing11 = 'url')) { - const err95 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema169.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema169.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data59.url !== undefined) { - let data60 = data59.url; - const _errs139 = errors; - if (errors === _errs139) { - if (errors === _errs139) { - if (typeof data60 === 'string') { - if (!formats0(data60)) { - const err96 = { - instancePath: - instancePath + - '/owner/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + '/owner/' + i10 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema169.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[3].allOf[0].properties.owner.items - .type, - parentSchema: - schema169.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid32 = _errs137 === errors; - if (!valid32) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema169.anyOf[3].allOf[0].properties.owner, - data: data58, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid29 = _errs135 === errors; - } else { - var valid29 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema169.anyOf[3].allOf[0].type, - parentSchema: schema169.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid28 = _errs119 === errors; - if (valid28) { - const _errs141 = errors; - if (errors === _errs141) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err101 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema169.anyOf[3].allOf[1].required, - parentSchema: schema169.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } else { - if (data.type !== undefined) { - let data61 = data.type; - const _errs143 = errors; - if ('group' !== data61) { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema169.anyOf[3].allOf[1].properties.type, - data: data61, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data.devices !== undefined) { - let data62 = data.devices; - const _errs144 = errors; - if (errors === _errs144) { - if (Array.isArray(data62)) { - var valid35 = true; - const len11 = data62.length; - for (let i11 = 0; i11 < len11; i11++) { - let data63 = data62[i11]; - const _errs146 = errors; - if (errors === _errs146) { - if ( - data63 && - typeof data63 == 'object' && - !Array.isArray(data63) - ) { - let missing13; - if (data63.url === undefined && (missing13 = 'url')) { - const err103 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema169.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema169.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } else { - if (data63.url !== undefined) { - let data64 = data63.url; - const _errs148 = errors; - if (errors === _errs148) { - if (errors === _errs148) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err104 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema169.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } else { - const err105 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema169.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema169.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - } - } - } - } else { - const err106 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema169.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema169.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid35 = _errs146 === errors; - if (!valid35) { - break; - } - } - } else { - const err107 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema169.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema169.anyOf[3].allOf[1].properties.devices, - data: data62, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - } - } - } else { - const err108 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema169.anyOf[3].allOf[1].type, - parentSchema: schema169.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid28 = _errs141 === errors; - } - var _valid0 = _errs118 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err109 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema169.anyOf, - parentSchema: schema169, - data, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - validate184.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate184.errors = vErrors; - return errors === 0; -} -exports.validateCreateDeviceResponse201Response = validate185; -const schema170 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createDeviceResponse201Response', - 'x-location': - '#/paths//devices/post/responses/201/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate185( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema170.anyOf[0].allOf[0].required, - parentSchema: schema170.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - const err1 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema170.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err3 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.name, - data: data1, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err4 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.description, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs10 = errors; - if (typeof data3 !== 'string') { - const err5 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema170.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema170.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema170.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs12 = errors; - if (typeof data4 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema170.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.isPublic, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - const err8 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema170.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema170.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - const err9 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[0].allOf[0].properties - .viewer.items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema170.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[0].allOf[0].properties.viewer.items - .type, - parentSchema: - schema170.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema170.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.viewer, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data8)) { - var valid5 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - const err13 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema170.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema170.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - const err14 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[0].allOf[0].properties - .owner.items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema170.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[0].allOf[0].properties.owner.items - .type, - parentSchema: - schema170.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema170.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.owner, - data: data8, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema170.anyOf[0].allOf[0].type, - parentSchema: schema170.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs28 = errors; - if ('cloud instantiable' !== data11) { - const err19 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema170.anyOf[0].allOf[1].properties.type, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err20 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema170.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema170.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data13)) { - var valid8 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs36 = errors; - if (errors === _errs36) { - if (errors === _errs36) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema170.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err24 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema170.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs40 = errors; - if (typeof data17 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema170.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema170.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema170.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema170.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid9 = _errs40 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err27 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema170.anyOf[0].allOf[1].properties.services.items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema170.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema170.anyOf[0].allOf[1].properties.services, - data: data13, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema170.anyOf[0].allOf[1].type, - parentSchema: schema170.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid1 = _errs26 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs42 = errors; - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.url === undefined && (missing3 = 'url')) || - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema170.anyOf[1].allOf[0].required, - parentSchema: schema170.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.url !== undefined) { - let data18 = data.url; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - const err31 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema170.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.name !== undefined) { - let data19 = data.name; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err33 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.name, - data: data19, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data20 = data.description; - const _errs49 = errors; - if (typeof data20 !== 'string') { - const err34 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.description, - data: data20, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data21 = data.type; - const _errs51 = errors; - if (typeof data21 !== 'string') { - const err35 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data21 === 'device' || - data21 === 'group' || - data21 === 'edge instantiable' || - data21 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema170.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema170.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema170.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data22 = data.isPublic; - const _errs53 = errors; - if (typeof data22 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema170.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.isPublic, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid11 = _errs53 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data23 = data.viewer; - const _errs55 = errors; - if (errors === _errs55) { - if (Array.isArray(data23)) { - var valid12 = true; - const len3 = data23.length; - for (let i3 = 0; i3 < len3; i3++) { - let data24 = data23[i3]; - const _errs57 = errors; - if (errors === _errs57) { - if ( - data24 && - typeof data24 == 'object' && - !Array.isArray(data24) - ) { - let missing4; - if (data24.url === undefined && (missing4 = 'url')) { - const err38 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema170.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema170.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data24.url !== undefined) { - let data25 = data24.url; - const _errs59 = errors; - if (errors === _errs59) { - if (errors === _errs59) { - if (typeof data25 === 'string') { - if (!formats0(data25)) { - const err39 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[1].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema170.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema170.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid12 = _errs57 === errors; - if (!valid12) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema170.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.viewer, - data: data23, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid11 = _errs55 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data26 = data.owner; - const _errs61 = errors; - if (errors === _errs61) { - if (Array.isArray(data26)) { - var valid14 = true; - const len4 = data26.length; - for (let i4 = 0; i4 < len4; i4++) { - let data27 = data26[i4]; - const _errs63 = errors; - if (errors === _errs63) { - if ( - data27 && - typeof data27 == 'object' && - !Array.isArray(data27) - ) { - let missing5; - if (data27.url === undefined && (missing5 = 'url')) { - const err43 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema170.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema170.anyOf[1].allOf[0].properties.owner - .items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data27.url !== undefined) { - let data28 = data27.url; - const _errs65 = errors; - if (errors === _errs65) { - if (errors === _errs65) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err44 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[1].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema170.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema170.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid14 = _errs63 === errors; - if (!valid14) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema170.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.owner, - data: data26, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid11 = _errs61 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema170.anyOf[1].allOf[0].type, - parentSchema: schema170.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid10 = _errs43 === errors; - if (valid10) { - const _errs67 = errors; - if (errors === _errs67) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data29 = data.type; - const _errs69 = errors; - if ('device' !== data29) { - const err49 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema170.anyOf[1].allOf[1].properties.type, - data: data29, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.connected !== undefined) { - let data30 = data.connected; - const _errs70 = errors; - if (typeof data30 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/connected', - schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema170.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema170.anyOf[1].allOf[1].properties.connected, - data: data30, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid16 = _errs70 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.announcedAvailability !== undefined) { - let data31 = data.announcedAvailability; - const _errs72 = errors; - if (errors === _errs72) { - if (Array.isArray(data31)) { - var valid17 = true; - const len5 = data31.length; - for (let i5 = 0; i5 < len5; i5++) { - let data32 = data31[i5]; - const _errs74 = errors; - if (errors === _errs74) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - if (data32.start !== undefined) { - let data33 = data32.start; - const _errs76 = errors; - if (errors === _errs76) { - if (errors === _errs76) { - if (typeof data33 === 'string') { - if (!formats22.validate(data33)) { - const err51 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema170.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start - .type, - parentSchema: - schema170.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid18 = _errs76 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data32.end !== undefined) { - let data34 = data32.end; - const _errs78 = errors; - if (errors === _errs78) { - if (errors === _errs78) { - if (typeof data34 === 'string') { - if (!formats22.validate(data34)) { - const err53 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema170.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end - .type, - parentSchema: - schema170.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } else { - const err55 = { - instancePath: instancePath + '/announcedAvailability/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[1].allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema170.anyOf[1].allOf[1].properties.announcedAvailability - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid17 = _errs74 === errors; - if (!valid17) { - break; - } - } - } else { - const err56 = { - instancePath: instancePath + '/announcedAvailability', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema170.anyOf[1].allOf[1].properties.announcedAvailability.type, - parentSchema: - schema170.anyOf[1].allOf[1].properties.announcedAvailability, - data: data31, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid16 = _errs72 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data35 = data.experiment; - const _errs80 = errors; - if (errors === _errs80) { - if (errors === _errs80) { - if (typeof data35 === 'string') { - if (!formats0(data35)) { - const err57 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema170.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid16 = _errs80 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data36 = data.services; - const _errs82 = errors; - if (errors === _errs82) { - if (Array.isArray(data36)) { - var valid19 = true; - const len6 = data36.length; - for (let i6 = 0; i6 < len6; i6++) { - let data37 = data36[i6]; - const _errs84 = errors; - if (errors === _errs84) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.serviceType !== undefined) { - let data38 = data37.serviceType; - const _errs87 = errors; - if (errors === _errs87) { - if (errors === _errs87) { - if (typeof data38 === 'string') { - if (!formats0(data38)) { - const err59 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[1].allOf[1].properties - .services.items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema170.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid20 = _errs87 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceId !== undefined) { - let data39 = data37.serviceId; - const _errs89 = errors; - if (typeof data39 !== 'string') { - const err61 = { - instancePath: - instancePath + '/services/' + i6 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[1].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema170.anyOf[1].allOf[1].properties.services - .items.properties.serviceId, - data: data39, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs89 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceDirection !== undefined) { - let data40 = data37.serviceDirection; - const _errs91 = errors; - if (typeof data40 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema170.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data40 === 'consumer' || - data40 === 'producer' || - data40 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema170.anyOf[1].allOf[1].properties - .services.items.properties.serviceDirection - .enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema170.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema170.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid20 = _errs91 === errors; - } else { - var valid20 = true; - } - } - } - } else { - const err64 = { - instancePath: instancePath + '/services/' + i6, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[1].allOf[1].properties.services.items - .type, - parentSchema: - schema170.anyOf[1].allOf[1].properties.services.items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid19 = _errs84 === errors; - if (!valid19) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema170.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema170.anyOf[1].allOf[1].properties.services, - data: data36, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid16 = _errs82 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema170.anyOf[1].allOf[1].type, - parentSchema: schema170.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid10 = _errs67 === errors; - } - var _valid0 = _errs42 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs93 = errors; - const _errs94 = errors; - if (errors === _errs94) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.url === undefined && (missing6 = 'url')) || - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err67 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema170.anyOf[2].allOf[0].required, - parentSchema: schema170.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data.url !== undefined) { - let data41 = data.url; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data41 === 'string') { - if (!formats0(data41)) { - const err68 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema170.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid22 = _errs96 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.name !== undefined) { - let data42 = data.name; - const _errs98 = errors; - if (typeof data42 !== 'string') { - const err70 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.name, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid22 = _errs98 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.description !== undefined) { - let data43 = data.description; - const _errs100 = errors; - if (typeof data43 !== 'string') { - const err71 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.description, - data: data43, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid22 = _errs100 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs102 = errors; - if (typeof data44 !== 'string') { - const err72 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data44 === 'device' || - data44 === 'group' || - data44 === 'edge instantiable' || - data44 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema170.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema170.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema170.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid22 = _errs102 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.isPublic !== undefined) { - let data45 = data.isPublic; - const _errs104 = errors; - if (typeof data45 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema170.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.isPublic, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid22 = _errs104 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.viewer !== undefined) { - let data46 = data.viewer; - const _errs106 = errors; - if (errors === _errs106) { - if (Array.isArray(data46)) { - var valid23 = true; - const len7 = data46.length; - for (let i7 = 0; i7 < len7; i7++) { - let data47 = data46[i7]; - const _errs108 = errors; - if (errors === _errs108) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - let missing7; - if (data47.url === undefined && (missing7 = 'url')) { - const err75 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema170.anyOf[2].allOf[0].properties.viewer - .items.required, - parentSchema: - schema170.anyOf[2].allOf[0].properties.viewer - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data47.url !== undefined) { - let data48 = data47.url; - const _errs110 = errors; - if (errors === _errs110) { - if (errors === _errs110) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema170.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema170.anyOf[2].allOf[0].properties.viewer.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid23 = _errs108 === errors; - if (!valid23) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema170.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.viewer, - data: data46, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid22 = _errs106 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.owner !== undefined) { - let data49 = data.owner; - const _errs112 = errors; - if (errors === _errs112) { - if (Array.isArray(data49)) { - var valid25 = true; - const len8 = data49.length; - for (let i8 = 0; i8 < len8; i8++) { - let data50 = data49[i8]; - const _errs114 = errors; - if (errors === _errs114) { - if ( - data50 && - typeof data50 == 'object' && - !Array.isArray(data50) - ) { - let missing8; - if (data50.url === undefined && (missing8 = 'url')) { - const err80 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema170.anyOf[2].allOf[0].properties.owner - .items.required, - parentSchema: - schema170.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data50.url !== undefined) { - let data51 = data50.url; - const _errs116 = errors; - if (errors === _errs116) { - if (errors === _errs116) { - if (typeof data51 === 'string') { - if (!formats0(data51)) { - const err81 = { - instancePath: - instancePath + - '/owner/' + - i8 + - '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + '/owner/' + i8 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema170.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema170.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid25 = _errs114 === errors; - if (!valid25) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema170.anyOf[2].allOf[0].properties.owner.type, - parentSchema: - schema170.anyOf[2].allOf[0].properties.owner, - data: data49, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid22 = _errs112 === errors; - } else { - var valid22 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema170.anyOf[2].allOf[0].type, - parentSchema: schema170.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid21 = _errs94 === errors; - if (valid21) { - const _errs118 = errors; - if (errors === _errs118) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data52 = data.type; - const _errs120 = errors; - if ('edge instantiable' !== data52) { - const err86 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema170.anyOf[2].allOf[1].properties.type, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.codeUrl !== undefined) { - let data53 = data.codeUrl; - const _errs121 = errors; - if (errors === _errs121) { - if (errors === _errs121) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err87 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema170.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema170.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid27 = _errs121 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.services !== undefined) { - let data54 = data.services; - const _errs123 = errors; - if (errors === _errs123) { - if (Array.isArray(data54)) { - var valid28 = true; - const len9 = data54.length; - for (let i9 = 0; i9 < len9; i9++) { - let data55 = data54[i9]; - const _errs125 = errors; - if (errors === _errs125) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - if (data55.serviceType !== undefined) { - let data56 = data55.serviceType; - const _errs128 = errors; - if (errors === _errs128) { - if (errors === _errs128) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err89 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema170.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid29 = _errs128 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceId !== undefined) { - let data57 = data55.serviceId; - const _errs130 = errors; - if (typeof data57 !== 'string') { - const err91 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema170.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid29 = _errs130 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceDirection !== undefined) { - let data58 = data55.serviceDirection; - const _errs132 = errors; - if (typeof data58 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema170.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data58 === 'consumer' || - data58 === 'producer' || - data58 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema170.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema170.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema170.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid29 = _errs132 === errors; - } else { - var valid29 = true; - } - } - } - } else { - const err94 = { - instancePath: instancePath + '/services/' + i9, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema170.anyOf[2].allOf[1].properties.services.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid28 = _errs125 === errors; - if (!valid28) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema170.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema170.anyOf[2].allOf[1].properties.services, - data: data54, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid27 = _errs123 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err96 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema170.anyOf[2].allOf[1].type, - parentSchema: schema170.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid21 = _errs118 === errors; - } - var _valid0 = _errs93 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs134 = errors; - const _errs135 = errors; - if (errors === _errs135) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.url === undefined && (missing9 = 'url')) || - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err97 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema170.anyOf[3].allOf[0].required, - parentSchema: schema170.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data.url !== undefined) { - let data59 = data.url; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data59 === 'string') { - if (!formats0(data59)) { - const err98 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema170.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema170.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid31 = _errs137 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.name !== undefined) { - let data60 = data.name; - const _errs139 = errors; - if (typeof data60 !== 'string') { - const err100 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema170.anyOf[3].allOf[0].properties.name, - data: data60, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid31 = _errs139 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.description !== undefined) { - let data61 = data.description; - const _errs141 = errors; - if (typeof data61 !== 'string') { - const err101 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema170.anyOf[3].allOf[0].properties.description, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid31 = _errs141 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.type !== undefined) { - let data62 = data.type; - const _errs143 = errors; - if (typeof data62 !== 'string') { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema170.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema170.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data62 === 'device' || - data62 === 'group' || - data62 === 'edge instantiable' || - data62 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema170.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema170.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema170.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid31 = _errs143 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.isPublic !== undefined) { - let data63 = data.isPublic; - const _errs145 = errors; - if (typeof data63 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema170.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema170.anyOf[3].allOf[0].properties.isPublic, - data: data63, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid31 = _errs145 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.viewer !== undefined) { - let data64 = data.viewer; - const _errs147 = errors; - if (errors === _errs147) { - if (Array.isArray(data64)) { - var valid32 = true; - const len10 = data64.length; - for (let i10 = 0; i10 < len10; i10++) { - let data65 = data64[i10]; - const _errs149 = errors; - if (errors === _errs149) { - if ( - data65 && - typeof data65 == 'object' && - !Array.isArray(data65) - ) { - let missing10; - if (data65.url === undefined && (missing10 = 'url')) { - const err105 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema170.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema170.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data65.url !== undefined) { - let data66 = data65.url; - const _errs151 = errors; - if (errors === _errs151) { - if (errors === _errs151) { - if (typeof data66 === 'string') { - if (!formats0(data66)) { - const err106 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema170.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[3].allOf[0].properties.viewer - .items.type, - parentSchema: - schema170.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid32 = _errs149 === errors; - if (!valid32) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema170.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: - schema170.anyOf[3].allOf[0].properties.viewer, - data: data64, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid31 = _errs147 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.owner !== undefined) { - let data67 = data.owner; - const _errs153 = errors; - if (errors === _errs153) { - if (Array.isArray(data67)) { - var valid34 = true; - const len11 = data67.length; - for (let i11 = 0; i11 < len11; i11++) { - let data68 = data67[i11]; - const _errs155 = errors; - if (errors === _errs155) { - if ( - data68 && - typeof data68 == 'object' && - !Array.isArray(data68) - ) { - let missing11; - if ( - data68.url === undefined && - (missing11 = 'url') - ) { - const err110 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema170.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema170.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data68.url !== undefined) { - let data69 = data68.url; - const _errs157 = errors; - if (errors === _errs157) { - if (errors === _errs157) { - if (typeof data69 === 'string') { - if (!formats0(data69)) { - const err111 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[3].allOf[0] - .properties.owner.items.properties - .url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema170.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[3].allOf[0].properties.owner - .items.type, - parentSchema: - schema170.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid34 = _errs155 === errors; - if (!valid34) { - break; - } - } - } else { - const err114 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema170.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema170.anyOf[3].allOf[0].properties.owner, - data: data67, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid31 = _errs153 === errors; - } else { - var valid31 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema170.anyOf[3].allOf[0].type, - parentSchema: schema170.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid30 = _errs135 === errors; - if (valid30) { - const _errs159 = errors; - if (errors === _errs159) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err116 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema170.anyOf[3].allOf[1].required, - parentSchema: schema170.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data.type !== undefined) { - let data70 = data.type; - const _errs161 = errors; - if ('group' !== data70) { - const err117 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema170.anyOf[3].allOf[1].properties.type, - data: data70, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data.devices !== undefined) { - let data71 = data.devices; - const _errs162 = errors; - if (errors === _errs162) { - if (Array.isArray(data71)) { - var valid37 = true; - const len12 = data71.length; - for (let i12 = 0; i12 < len12; i12++) { - let data72 = data71[i12]; - const _errs164 = errors; - if (errors === _errs164) { - if ( - data72 && - typeof data72 == 'object' && - !Array.isArray(data72) - ) { - let missing13; - if (data72.url === undefined && (missing13 = 'url')) { - const err118 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema170.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema170.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data72.url !== undefined) { - let data73 = data72.url; - const _errs166 = errors; - if (errors === _errs166) { - if (errors === _errs166) { - if (typeof data73 === 'string') { - if (!formats0(data73)) { - const err119 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema170.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema170.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema170.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema170.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema170.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid37 = _errs164 === errors; - if (!valid37) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema170.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema170.anyOf[3].allOf[1].properties.devices, - data: data71, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid36 = _errs162 === errors; - } else { - var valid36 = true; - } - } - } - } else { - const err123 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema170.anyOf[3].allOf[1].type, - parentSchema: schema170.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid30 = _errs159 === errors; - } - var _valid0 = _errs134 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err124 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema170.anyOf, - parentSchema: schema170, - data, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate185.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate185.errors = vErrors; - return errors === 0; -} -exports.validateGetDeviceResponse200Request = validate186; -const schema171 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'getDeviceResponse200Request', - 'x-location': - '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate186( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema171.anyOf[0].allOf[0].required, - parentSchema: schema171.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs4 = errors; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.name, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err2 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.description, - data: data1, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err3 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema171.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema171.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema171.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema171.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.isPublic, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - var valid3 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - const err6 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: - schema171.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema171.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - const err7 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema171.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema171.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.viewer, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid5 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - const err11 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema171.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema171.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - const err12 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema171.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[0].allOf[0].properties.owner.items.type, - parentSchema: - schema171.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.owner, - data: data7, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema171.anyOf[0].allOf[0].type, - parentSchema: schema171.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data10) { - const err17 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema171.anyOf[0].allOf[1].properties.type, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err18 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema171.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema171.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data12)) { - var valid8 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err20 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema171.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs36 = errors; - if (typeof data15 !== 'string') { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema171.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema171.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema171.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema171.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema171.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err25 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema171.anyOf[0].allOf[1].properties.services.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema171.anyOf[0].allOf[1].properties.services, - data: data12, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err27 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema171.anyOf[0].allOf[1].type, - parentSchema: schema171.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid1 = _errs24 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs40 = errors; - const _errs41 = errors; - if (errors === _errs41) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err28 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema171.anyOf[1].allOf[0].required, - parentSchema: schema171.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data.name !== undefined) { - let data17 = data.name; - const _errs43 = errors; - if (typeof data17 !== 'string') { - const err29 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.name, - data: data17, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid11 = _errs43 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data18 = data.description; - const _errs45 = errors; - if (typeof data18 !== 'string') { - const err30 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.description, - data: data18, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data19 = data.type; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err31 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data19 === 'device' || - data19 === 'group' || - data19 === 'edge instantiable' || - data19 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema171.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema171.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema171.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data20 = data.isPublic; - const _errs49 = errors; - if (typeof data20 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema171.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.isPublic, - data: data20, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data21 = data.viewer; - const _errs51 = errors; - if (errors === _errs51) { - if (Array.isArray(data21)) { - var valid12 = true; - const len3 = data21.length; - for (let i3 = 0; i3 < len3; i3++) { - let data22 = data21[i3]; - const _errs53 = errors; - if (errors === _errs53) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - let missing4; - if (data22.url === undefined && (missing4 = 'url')) { - const err34 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema171.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema171.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data22.url !== undefined) { - let data23 = data22.url; - const _errs55 = errors; - if (errors === _errs55) { - if (errors === _errs55) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err35 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema171.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema171.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid12 = _errs53 === errors; - if (!valid12) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.viewer, - data: data21, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data24 = data.owner; - const _errs57 = errors; - if (errors === _errs57) { - if (Array.isArray(data24)) { - var valid14 = true; - const len4 = data24.length; - for (let i4 = 0; i4 < len4; i4++) { - let data25 = data24[i4]; - const _errs59 = errors; - if (errors === _errs59) { - if ( - data25 && - typeof data25 == 'object' && - !Array.isArray(data25) - ) { - let missing5; - if (data25.url === undefined && (missing5 = 'url')) { - const err39 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema171.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema171.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data25.url !== undefined) { - let data26 = data25.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data26 === 'string') { - if (!formats0(data26)) { - const err40 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[1].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema171.anyOf[1].allOf[0].properties.owner - .items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema171.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid14 = _errs59 === errors; - if (!valid14) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.owner, - data: data24, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid11 = _errs57 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema171.anyOf[1].allOf[0].type, - parentSchema: schema171.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid10 = _errs41 === errors; - if (valid10) { - const _errs63 = errors; - if (errors === _errs63) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data27 = data.type; - const _errs65 = errors; - if ('device' !== data27) { - const err45 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema171.anyOf[1].allOf[1].properties.type, - data: data27, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data28 = data.experiment; - const _errs66 = errors; - if (errors === _errs66) { - if (errors === _errs66) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err46 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema171.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema171.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid16 = _errs66 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data29 = data.services; - const _errs68 = errors; - if (errors === _errs68) { - if (Array.isArray(data29)) { - var valid17 = true; - const len5 = data29.length; - for (let i5 = 0; i5 < len5; i5++) { - let data30 = data29[i5]; - const _errs70 = errors; - if (errors === _errs70) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - if (data30.serviceType !== undefined) { - let data31 = data30.serviceType; - const _errs73 = errors; - if (errors === _errs73) { - if (errors === _errs73) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err48 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema171.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid18 = _errs73 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceId !== undefined) { - let data32 = data30.serviceId; - const _errs75 = errors; - if (typeof data32 !== 'string') { - const err50 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[1].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema171.anyOf[1].allOf[1].properties.services.items - .properties.serviceId, - data: data32, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid18 = _errs75 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceDirection !== undefined) { - let data33 = data30.serviceDirection; - const _errs77 = errors; - if (typeof data33 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema171.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data33 === 'consumer' || - data33 === 'producer' || - data33 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema171.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema171.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema171.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err53 = { - instancePath: instancePath + '/services/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[1].allOf[1].properties.services.items.type, - parentSchema: - schema171.anyOf[1].allOf[1].properties.services.items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid17 = _errs70 === errors; - if (!valid17) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema171.anyOf[1].allOf[1].properties.services, - data: data29, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid16 = _errs68 === errors; - } else { - var valid16 = true; - } - } - } - } else { - const err55 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema171.anyOf[1].allOf[1].type, - parentSchema: schema171.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid10 = _errs63 === errors; - } - var _valid0 = _errs40 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs79 = errors; - const _errs80 = errors; - if (errors === _errs80) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err56 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema171.anyOf[2].allOf[0].required, - parentSchema: schema171.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data.name !== undefined) { - let data34 = data.name; - const _errs82 = errors; - if (typeof data34 !== 'string') { - const err57 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.name, - data: data34, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid20 = _errs82 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.description !== undefined) { - let data35 = data.description; - const _errs84 = errors; - if (typeof data35 !== 'string') { - const err58 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.description, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid20 = _errs84 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.type !== undefined) { - let data36 = data.type; - const _errs86 = errors; - if (typeof data36 !== 'string') { - const err59 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data36 === 'device' || - data36 === 'group' || - data36 === 'edge instantiable' || - data36 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema171.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema171.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema171.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid20 = _errs86 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.isPublic !== undefined) { - let data37 = data.isPublic; - const _errs88 = errors; - if (typeof data37 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema171.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.isPublic, - data: data37, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs88 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.viewer !== undefined) { - let data38 = data.viewer; - const _errs90 = errors; - if (errors === _errs90) { - if (Array.isArray(data38)) { - var valid21 = true; - const len6 = data38.length; - for (let i6 = 0; i6 < len6; i6++) { - let data39 = data38[i6]; - const _errs92 = errors; - if (errors === _errs92) { - if ( - data39 && - typeof data39 == 'object' && - !Array.isArray(data39) - ) { - let missing7; - if (data39.url === undefined && (missing7 = 'url')) { - const err62 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema171.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema171.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data39.url !== undefined) { - let data40 = data39.url; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err63 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema171.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema171.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs92 === errors; - if (!valid21) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.viewer, - data: data38, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid20 = _errs90 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.owner !== undefined) { - let data41 = data.owner; - const _errs96 = errors; - if (errors === _errs96) { - if (Array.isArray(data41)) { - var valid23 = true; - const len7 = data41.length; - for (let i7 = 0; i7 < len7; i7++) { - let data42 = data41[i7]; - const _errs98 = errors; - if (errors === _errs98) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - let missing8; - if (data42.url === undefined && (missing8 = 'url')) { - const err67 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + missing8 + "'", - schema: - schema171.anyOf[2].allOf[0].properties.owner.items - .required, - parentSchema: - schema171.anyOf[2].allOf[0].properties.owner - .items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data42.url !== undefined) { - let data43 = data42.url; - const _errs100 = errors; - if (errors === _errs100) { - if (errors === _errs100) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err68 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema171.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema171.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid23 = _errs98 === errors; - if (!valid23) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.owner, - data: data41, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid20 = _errs96 === errors; - } else { - var valid20 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema171.anyOf[2].allOf[0].type, - parentSchema: schema171.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid19 = _errs80 === errors; - if (valid19) { - const _errs102 = errors; - if (errors === _errs102) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs104 = errors; - if ('edge instantiable' !== data44) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema171.anyOf[2].allOf[1].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.codeUrl !== undefined) { - let data45 = data.codeUrl; - const _errs105 = errors; - if (errors === _errs105) { - if (errors === _errs105) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err74 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema171.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema171.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.services !== undefined) { - let data46 = data.services; - const _errs107 = errors; - if (errors === _errs107) { - if (Array.isArray(data46)) { - var valid26 = true; - const len8 = data46.length; - for (let i8 = 0; i8 < len8; i8++) { - let data47 = data46[i8]; - const _errs109 = errors; - if (errors === _errs109) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - if (data47.serviceType !== undefined) { - let data48 = data47.serviceType; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema171.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceId !== undefined) { - let data49 = data47.serviceId; - const _errs114 = errors; - if (typeof data49 !== 'string') { - const err78 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema171.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data49, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceDirection !== undefined) { - let data50 = data47.serviceDirection; - const _errs116 = errors; - if (typeof data50 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema171.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data50 === 'consumer' || - data50 === 'producer' || - data50 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema171.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema171.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema171.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err81 = { - instancePath: instancePath + '/services/' + i8, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema171.anyOf[2].allOf[1].properties.services.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid26 = _errs109 === errors; - if (!valid26) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema171.anyOf[2].allOf[1].properties.services, - data: data46, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err83 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema171.anyOf[2].allOf[1].type, - parentSchema: schema171.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid19 = _errs102 === errors; - } - var _valid0 = _errs79 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs118 = errors; - const _errs119 = errors; - if (errors === _errs119) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err84 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema171.anyOf[3].allOf[0].required, - parentSchema: schema171.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data.name !== undefined) { - let data51 = data.name; - const _errs121 = errors; - if (typeof data51 !== 'string') { - const err85 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema171.anyOf[3].allOf[0].properties.name, - data: data51, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid29 = _errs121 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.description !== undefined) { - let data52 = data.description; - const _errs123 = errors; - if (typeof data52 !== 'string') { - const err86 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema171.anyOf[3].allOf[0].properties.description, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid29 = _errs123 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.type !== undefined) { - let data53 = data.type; - const _errs125 = errors; - if (typeof data53 !== 'string') { - const err87 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema171.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema171.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data53 === 'device' || - data53 === 'group' || - data53 === 'edge instantiable' || - data53 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema171.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema171.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema171.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid29 = _errs125 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.isPublic !== undefined) { - let data54 = data.isPublic; - const _errs127 = errors; - if (typeof data54 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema171.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema171.anyOf[3].allOf[0].properties.isPublic, - data: data54, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid29 = _errs127 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.viewer !== undefined) { - let data55 = data.viewer; - const _errs129 = errors; - if (errors === _errs129) { - if (Array.isArray(data55)) { - var valid30 = true; - const len9 = data55.length; - for (let i9 = 0; i9 < len9; i9++) { - let data56 = data55[i9]; - const _errs131 = errors; - if (errors === _errs131) { - if ( - data56 && - typeof data56 == 'object' && - !Array.isArray(data56) - ) { - let missing10; - if (data56.url === undefined && (missing10 = 'url')) { - const err90 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + missing10 + "'", - schema: - schema171.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema171.anyOf[3].allOf[0].properties.viewer - .items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data56.url !== undefined) { - let data57 = data56.url; - const _errs133 = errors; - if (errors === _errs133) { - if (errors === _errs133) { - if (typeof data57 === 'string') { - if (!formats0(data57)) { - const err91 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema171.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema171.anyOf[3].allOf[0].properties.viewer.items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid30 = _errs131 === errors; - if (!valid30) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema171.anyOf[3].allOf[0].properties.viewer, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid29 = _errs129 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.owner !== undefined) { - let data58 = data.owner; - const _errs135 = errors; - if (errors === _errs135) { - if (Array.isArray(data58)) { - var valid32 = true; - const len10 = data58.length; - for (let i10 = 0; i10 < len10; i10++) { - let data59 = data58[i10]; - const _errs137 = errors; - if (errors === _errs137) { - if ( - data59 && - typeof data59 == 'object' && - !Array.isArray(data59) - ) { - let missing11; - if (data59.url === undefined && (missing11 = 'url')) { - const err95 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema171.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema171.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data59.url !== undefined) { - let data60 = data59.url; - const _errs139 = errors; - if (errors === _errs139) { - if (errors === _errs139) { - if (typeof data60 === 'string') { - if (!formats0(data60)) { - const err96 = { - instancePath: - instancePath + - '/owner/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + '/owner/' + i10 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema171.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[3].allOf[0].properties.owner.items - .type, - parentSchema: - schema171.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid32 = _errs137 === errors; - if (!valid32) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema171.anyOf[3].allOf[0].properties.owner, - data: data58, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid29 = _errs135 === errors; - } else { - var valid29 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema171.anyOf[3].allOf[0].type, - parentSchema: schema171.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid28 = _errs119 === errors; - if (valid28) { - const _errs141 = errors; - if (errors === _errs141) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err101 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema171.anyOf[3].allOf[1].required, - parentSchema: schema171.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } else { - if (data.type !== undefined) { - let data61 = data.type; - const _errs143 = errors; - if ('group' !== data61) { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema171.anyOf[3].allOf[1].properties.type, - data: data61, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data.devices !== undefined) { - let data62 = data.devices; - const _errs144 = errors; - if (errors === _errs144) { - if (Array.isArray(data62)) { - var valid35 = true; - const len11 = data62.length; - for (let i11 = 0; i11 < len11; i11++) { - let data63 = data62[i11]; - const _errs146 = errors; - if (errors === _errs146) { - if ( - data63 && - typeof data63 == 'object' && - !Array.isArray(data63) - ) { - let missing13; - if (data63.url === undefined && (missing13 = 'url')) { - const err103 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema171.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema171.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } else { - if (data63.url !== undefined) { - let data64 = data63.url; - const _errs148 = errors; - if (errors === _errs148) { - if (errors === _errs148) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err104 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema171.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } else { - const err105 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema171.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema171.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - } - } - } - } else { - const err106 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema171.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema171.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid35 = _errs146 === errors; - if (!valid35) { - break; - } - } - } else { - const err107 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema171.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema171.anyOf[3].allOf[1].properties.devices, - data: data62, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - } - } - } else { - const err108 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema171.anyOf[3].allOf[1].type, - parentSchema: schema171.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid28 = _errs141 === errors; - } - var _valid0 = _errs118 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err109 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema171.anyOf, - parentSchema: schema171, - data, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - validate186.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate186.errors = vErrors; - return errors === 0; -} -exports.validateGetDeviceResponse200Response = validate187; -const schema172 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'getDeviceResponse200Response', - 'x-location': - '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate187( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema172.anyOf[0].allOf[0].required, - parentSchema: schema172.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - const err1 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema172.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err3 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.name, - data: data1, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err4 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.description, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs10 = errors; - if (typeof data3 !== 'string') { - const err5 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema172.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema172.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema172.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs12 = errors; - if (typeof data4 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema172.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.isPublic, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - const err8 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema172.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema172.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - const err9 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[0].allOf[0].properties - .viewer.items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema172.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[0].allOf[0].properties.viewer.items - .type, - parentSchema: - schema172.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema172.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.viewer, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data8)) { - var valid5 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - const err13 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema172.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema172.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - const err14 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[0].allOf[0].properties - .owner.items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema172.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[0].allOf[0].properties.owner.items - .type, - parentSchema: - schema172.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema172.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.owner, - data: data8, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema172.anyOf[0].allOf[0].type, - parentSchema: schema172.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs28 = errors; - if ('cloud instantiable' !== data11) { - const err19 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema172.anyOf[0].allOf[1].properties.type, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err20 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema172.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema172.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data13)) { - var valid8 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs36 = errors; - if (errors === _errs36) { - if (errors === _errs36) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema172.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err24 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema172.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs40 = errors; - if (typeof data17 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema172.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema172.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema172.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema172.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid9 = _errs40 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err27 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema172.anyOf[0].allOf[1].properties.services.items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema172.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema172.anyOf[0].allOf[1].properties.services, - data: data13, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema172.anyOf[0].allOf[1].type, - parentSchema: schema172.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid1 = _errs26 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs42 = errors; - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.url === undefined && (missing3 = 'url')) || - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema172.anyOf[1].allOf[0].required, - parentSchema: schema172.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.url !== undefined) { - let data18 = data.url; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - const err31 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema172.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.name !== undefined) { - let data19 = data.name; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err33 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.name, - data: data19, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data20 = data.description; - const _errs49 = errors; - if (typeof data20 !== 'string') { - const err34 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.description, - data: data20, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data21 = data.type; - const _errs51 = errors; - if (typeof data21 !== 'string') { - const err35 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data21 === 'device' || - data21 === 'group' || - data21 === 'edge instantiable' || - data21 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema172.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema172.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema172.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data22 = data.isPublic; - const _errs53 = errors; - if (typeof data22 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema172.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.isPublic, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid11 = _errs53 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data23 = data.viewer; - const _errs55 = errors; - if (errors === _errs55) { - if (Array.isArray(data23)) { - var valid12 = true; - const len3 = data23.length; - for (let i3 = 0; i3 < len3; i3++) { - let data24 = data23[i3]; - const _errs57 = errors; - if (errors === _errs57) { - if ( - data24 && - typeof data24 == 'object' && - !Array.isArray(data24) - ) { - let missing4; - if (data24.url === undefined && (missing4 = 'url')) { - const err38 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema172.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema172.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data24.url !== undefined) { - let data25 = data24.url; - const _errs59 = errors; - if (errors === _errs59) { - if (errors === _errs59) { - if (typeof data25 === 'string') { - if (!formats0(data25)) { - const err39 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[1].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema172.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema172.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid12 = _errs57 === errors; - if (!valid12) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema172.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.viewer, - data: data23, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid11 = _errs55 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data26 = data.owner; - const _errs61 = errors; - if (errors === _errs61) { - if (Array.isArray(data26)) { - var valid14 = true; - const len4 = data26.length; - for (let i4 = 0; i4 < len4; i4++) { - let data27 = data26[i4]; - const _errs63 = errors; - if (errors === _errs63) { - if ( - data27 && - typeof data27 == 'object' && - !Array.isArray(data27) - ) { - let missing5; - if (data27.url === undefined && (missing5 = 'url')) { - const err43 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema172.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema172.anyOf[1].allOf[0].properties.owner - .items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data27.url !== undefined) { - let data28 = data27.url; - const _errs65 = errors; - if (errors === _errs65) { - if (errors === _errs65) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err44 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[1].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema172.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema172.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid14 = _errs63 === errors; - if (!valid14) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema172.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.owner, - data: data26, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid11 = _errs61 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema172.anyOf[1].allOf[0].type, - parentSchema: schema172.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid10 = _errs43 === errors; - if (valid10) { - const _errs67 = errors; - if (errors === _errs67) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data29 = data.type; - const _errs69 = errors; - if ('device' !== data29) { - const err49 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema172.anyOf[1].allOf[1].properties.type, - data: data29, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.connected !== undefined) { - let data30 = data.connected; - const _errs70 = errors; - if (typeof data30 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/connected', - schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema172.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema172.anyOf[1].allOf[1].properties.connected, - data: data30, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid16 = _errs70 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.announcedAvailability !== undefined) { - let data31 = data.announcedAvailability; - const _errs72 = errors; - if (errors === _errs72) { - if (Array.isArray(data31)) { - var valid17 = true; - const len5 = data31.length; - for (let i5 = 0; i5 < len5; i5++) { - let data32 = data31[i5]; - const _errs74 = errors; - if (errors === _errs74) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - if (data32.start !== undefined) { - let data33 = data32.start; - const _errs76 = errors; - if (errors === _errs76) { - if (errors === _errs76) { - if (typeof data33 === 'string') { - if (!formats22.validate(data33)) { - const err51 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema172.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start - .type, - parentSchema: - schema172.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid18 = _errs76 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data32.end !== undefined) { - let data34 = data32.end; - const _errs78 = errors; - if (errors === _errs78) { - if (errors === _errs78) { - if (typeof data34 === 'string') { - if (!formats22.validate(data34)) { - const err53 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema172.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end - .type, - parentSchema: - schema172.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } else { - const err55 = { - instancePath: instancePath + '/announcedAvailability/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[1].allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema172.anyOf[1].allOf[1].properties.announcedAvailability - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid17 = _errs74 === errors; - if (!valid17) { - break; - } - } - } else { - const err56 = { - instancePath: instancePath + '/announcedAvailability', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema172.anyOf[1].allOf[1].properties.announcedAvailability.type, - parentSchema: - schema172.anyOf[1].allOf[1].properties.announcedAvailability, - data: data31, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid16 = _errs72 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data35 = data.experiment; - const _errs80 = errors; - if (errors === _errs80) { - if (errors === _errs80) { - if (typeof data35 === 'string') { - if (!formats0(data35)) { - const err57 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema172.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid16 = _errs80 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data36 = data.services; - const _errs82 = errors; - if (errors === _errs82) { - if (Array.isArray(data36)) { - var valid19 = true; - const len6 = data36.length; - for (let i6 = 0; i6 < len6; i6++) { - let data37 = data36[i6]; - const _errs84 = errors; - if (errors === _errs84) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.serviceType !== undefined) { - let data38 = data37.serviceType; - const _errs87 = errors; - if (errors === _errs87) { - if (errors === _errs87) { - if (typeof data38 === 'string') { - if (!formats0(data38)) { - const err59 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[1].allOf[1].properties - .services.items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema172.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid20 = _errs87 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceId !== undefined) { - let data39 = data37.serviceId; - const _errs89 = errors; - if (typeof data39 !== 'string') { - const err61 = { - instancePath: - instancePath + '/services/' + i6 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[1].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema172.anyOf[1].allOf[1].properties.services - .items.properties.serviceId, - data: data39, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs89 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceDirection !== undefined) { - let data40 = data37.serviceDirection; - const _errs91 = errors; - if (typeof data40 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema172.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data40 === 'consumer' || - data40 === 'producer' || - data40 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema172.anyOf[1].allOf[1].properties - .services.items.properties.serviceDirection - .enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema172.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema172.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid20 = _errs91 === errors; - } else { - var valid20 = true; - } - } - } - } else { - const err64 = { - instancePath: instancePath + '/services/' + i6, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[1].allOf[1].properties.services.items - .type, - parentSchema: - schema172.anyOf[1].allOf[1].properties.services.items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid19 = _errs84 === errors; - if (!valid19) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema172.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema172.anyOf[1].allOf[1].properties.services, - data: data36, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid16 = _errs82 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema172.anyOf[1].allOf[1].type, - parentSchema: schema172.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid10 = _errs67 === errors; - } - var _valid0 = _errs42 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs93 = errors; - const _errs94 = errors; - if (errors === _errs94) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.url === undefined && (missing6 = 'url')) || - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err67 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema172.anyOf[2].allOf[0].required, - parentSchema: schema172.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data.url !== undefined) { - let data41 = data.url; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data41 === 'string') { - if (!formats0(data41)) { - const err68 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema172.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid22 = _errs96 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.name !== undefined) { - let data42 = data.name; - const _errs98 = errors; - if (typeof data42 !== 'string') { - const err70 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.name, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid22 = _errs98 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.description !== undefined) { - let data43 = data.description; - const _errs100 = errors; - if (typeof data43 !== 'string') { - const err71 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.description, - data: data43, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid22 = _errs100 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs102 = errors; - if (typeof data44 !== 'string') { - const err72 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data44 === 'device' || - data44 === 'group' || - data44 === 'edge instantiable' || - data44 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema172.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema172.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema172.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid22 = _errs102 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.isPublic !== undefined) { - let data45 = data.isPublic; - const _errs104 = errors; - if (typeof data45 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema172.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.isPublic, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid22 = _errs104 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.viewer !== undefined) { - let data46 = data.viewer; - const _errs106 = errors; - if (errors === _errs106) { - if (Array.isArray(data46)) { - var valid23 = true; - const len7 = data46.length; - for (let i7 = 0; i7 < len7; i7++) { - let data47 = data46[i7]; - const _errs108 = errors; - if (errors === _errs108) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - let missing7; - if (data47.url === undefined && (missing7 = 'url')) { - const err75 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema172.anyOf[2].allOf[0].properties.viewer - .items.required, - parentSchema: - schema172.anyOf[2].allOf[0].properties.viewer - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data47.url !== undefined) { - let data48 = data47.url; - const _errs110 = errors; - if (errors === _errs110) { - if (errors === _errs110) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema172.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema172.anyOf[2].allOf[0].properties.viewer.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid23 = _errs108 === errors; - if (!valid23) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema172.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.viewer, - data: data46, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid22 = _errs106 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.owner !== undefined) { - let data49 = data.owner; - const _errs112 = errors; - if (errors === _errs112) { - if (Array.isArray(data49)) { - var valid25 = true; - const len8 = data49.length; - for (let i8 = 0; i8 < len8; i8++) { - let data50 = data49[i8]; - const _errs114 = errors; - if (errors === _errs114) { - if ( - data50 && - typeof data50 == 'object' && - !Array.isArray(data50) - ) { - let missing8; - if (data50.url === undefined && (missing8 = 'url')) { - const err80 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema172.anyOf[2].allOf[0].properties.owner - .items.required, - parentSchema: - schema172.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data50.url !== undefined) { - let data51 = data50.url; - const _errs116 = errors; - if (errors === _errs116) { - if (errors === _errs116) { - if (typeof data51 === 'string') { - if (!formats0(data51)) { - const err81 = { - instancePath: - instancePath + - '/owner/' + - i8 + - '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + '/owner/' + i8 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema172.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema172.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid25 = _errs114 === errors; - if (!valid25) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema172.anyOf[2].allOf[0].properties.owner.type, - parentSchema: - schema172.anyOf[2].allOf[0].properties.owner, - data: data49, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid22 = _errs112 === errors; - } else { - var valid22 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema172.anyOf[2].allOf[0].type, - parentSchema: schema172.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid21 = _errs94 === errors; - if (valid21) { - const _errs118 = errors; - if (errors === _errs118) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data52 = data.type; - const _errs120 = errors; - if ('edge instantiable' !== data52) { - const err86 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema172.anyOf[2].allOf[1].properties.type, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.codeUrl !== undefined) { - let data53 = data.codeUrl; - const _errs121 = errors; - if (errors === _errs121) { - if (errors === _errs121) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err87 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema172.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema172.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid27 = _errs121 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.services !== undefined) { - let data54 = data.services; - const _errs123 = errors; - if (errors === _errs123) { - if (Array.isArray(data54)) { - var valid28 = true; - const len9 = data54.length; - for (let i9 = 0; i9 < len9; i9++) { - let data55 = data54[i9]; - const _errs125 = errors; - if (errors === _errs125) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - if (data55.serviceType !== undefined) { - let data56 = data55.serviceType; - const _errs128 = errors; - if (errors === _errs128) { - if (errors === _errs128) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err89 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema172.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid29 = _errs128 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceId !== undefined) { - let data57 = data55.serviceId; - const _errs130 = errors; - if (typeof data57 !== 'string') { - const err91 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema172.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid29 = _errs130 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceDirection !== undefined) { - let data58 = data55.serviceDirection; - const _errs132 = errors; - if (typeof data58 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema172.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data58 === 'consumer' || - data58 === 'producer' || - data58 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema172.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema172.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema172.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid29 = _errs132 === errors; - } else { - var valid29 = true; - } - } - } - } else { - const err94 = { - instancePath: instancePath + '/services/' + i9, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema172.anyOf[2].allOf[1].properties.services.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid28 = _errs125 === errors; - if (!valid28) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema172.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema172.anyOf[2].allOf[1].properties.services, - data: data54, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid27 = _errs123 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err96 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema172.anyOf[2].allOf[1].type, - parentSchema: schema172.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid21 = _errs118 === errors; - } - var _valid0 = _errs93 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs134 = errors; - const _errs135 = errors; - if (errors === _errs135) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.url === undefined && (missing9 = 'url')) || - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err97 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema172.anyOf[3].allOf[0].required, - parentSchema: schema172.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data.url !== undefined) { - let data59 = data.url; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data59 === 'string') { - if (!formats0(data59)) { - const err98 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema172.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema172.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid31 = _errs137 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.name !== undefined) { - let data60 = data.name; - const _errs139 = errors; - if (typeof data60 !== 'string') { - const err100 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema172.anyOf[3].allOf[0].properties.name, - data: data60, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid31 = _errs139 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.description !== undefined) { - let data61 = data.description; - const _errs141 = errors; - if (typeof data61 !== 'string') { - const err101 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema172.anyOf[3].allOf[0].properties.description, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid31 = _errs141 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.type !== undefined) { - let data62 = data.type; - const _errs143 = errors; - if (typeof data62 !== 'string') { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema172.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema172.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data62 === 'device' || - data62 === 'group' || - data62 === 'edge instantiable' || - data62 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema172.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema172.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema172.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid31 = _errs143 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.isPublic !== undefined) { - let data63 = data.isPublic; - const _errs145 = errors; - if (typeof data63 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema172.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema172.anyOf[3].allOf[0].properties.isPublic, - data: data63, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid31 = _errs145 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.viewer !== undefined) { - let data64 = data.viewer; - const _errs147 = errors; - if (errors === _errs147) { - if (Array.isArray(data64)) { - var valid32 = true; - const len10 = data64.length; - for (let i10 = 0; i10 < len10; i10++) { - let data65 = data64[i10]; - const _errs149 = errors; - if (errors === _errs149) { - if ( - data65 && - typeof data65 == 'object' && - !Array.isArray(data65) - ) { - let missing10; - if (data65.url === undefined && (missing10 = 'url')) { - const err105 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema172.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema172.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data65.url !== undefined) { - let data66 = data65.url; - const _errs151 = errors; - if (errors === _errs151) { - if (errors === _errs151) { - if (typeof data66 === 'string') { - if (!formats0(data66)) { - const err106 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema172.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[3].allOf[0].properties.viewer - .items.type, - parentSchema: - schema172.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid32 = _errs149 === errors; - if (!valid32) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema172.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: - schema172.anyOf[3].allOf[0].properties.viewer, - data: data64, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid31 = _errs147 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.owner !== undefined) { - let data67 = data.owner; - const _errs153 = errors; - if (errors === _errs153) { - if (Array.isArray(data67)) { - var valid34 = true; - const len11 = data67.length; - for (let i11 = 0; i11 < len11; i11++) { - let data68 = data67[i11]; - const _errs155 = errors; - if (errors === _errs155) { - if ( - data68 && - typeof data68 == 'object' && - !Array.isArray(data68) - ) { - let missing11; - if ( - data68.url === undefined && - (missing11 = 'url') - ) { - const err110 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema172.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema172.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data68.url !== undefined) { - let data69 = data68.url; - const _errs157 = errors; - if (errors === _errs157) { - if (errors === _errs157) { - if (typeof data69 === 'string') { - if (!formats0(data69)) { - const err111 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[3].allOf[0] - .properties.owner.items.properties - .url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema172.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[3].allOf[0].properties.owner - .items.type, - parentSchema: - schema172.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid34 = _errs155 === errors; - if (!valid34) { - break; - } - } - } else { - const err114 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema172.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema172.anyOf[3].allOf[0].properties.owner, - data: data67, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid31 = _errs153 === errors; - } else { - var valid31 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema172.anyOf[3].allOf[0].type, - parentSchema: schema172.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid30 = _errs135 === errors; - if (valid30) { - const _errs159 = errors; - if (errors === _errs159) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err116 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema172.anyOf[3].allOf[1].required, - parentSchema: schema172.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data.type !== undefined) { - let data70 = data.type; - const _errs161 = errors; - if ('group' !== data70) { - const err117 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema172.anyOf[3].allOf[1].properties.type, - data: data70, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data.devices !== undefined) { - let data71 = data.devices; - const _errs162 = errors; - if (errors === _errs162) { - if (Array.isArray(data71)) { - var valid37 = true; - const len12 = data71.length; - for (let i12 = 0; i12 < len12; i12++) { - let data72 = data71[i12]; - const _errs164 = errors; - if (errors === _errs164) { - if ( - data72 && - typeof data72 == 'object' && - !Array.isArray(data72) - ) { - let missing13; - if (data72.url === undefined && (missing13 = 'url')) { - const err118 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema172.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema172.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data72.url !== undefined) { - let data73 = data72.url; - const _errs166 = errors; - if (errors === _errs166) { - if (errors === _errs166) { - if (typeof data73 === 'string') { - if (!formats0(data73)) { - const err119 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema172.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema172.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema172.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema172.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema172.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid37 = _errs164 === errors; - if (!valid37) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema172.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema172.anyOf[3].allOf[1].properties.devices, - data: data71, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid36 = _errs162 === errors; - } else { - var valid36 = true; - } - } - } - } else { - const err123 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema172.anyOf[3].allOf[1].type, - parentSchema: schema172.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid30 = _errs159 === errors; - } - var _valid0 = _errs134 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err124 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema172.anyOf, - parentSchema: schema172, - data, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate187.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate187.errors = vErrors; - return errors === 0; -} -exports.validateUpdateDeviceBodyRequest = validate188; -const schema173 = { - title: 'Device Update', - anyOf: [ - { - title: 'Instantiable Cloud Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Concrete Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Instantiable Browser Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Device Group Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - }, - ], - }, - ], - 'x-standalone': false, - 'x-name': 'updateDeviceBodyRequest', - 'x-location': - '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate188( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema173.anyOf[0].allOf[0].required, - parentSchema: schema173.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs4 = errors; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.name, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err2 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.description, - data: data1, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err3 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema173.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema173.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema173.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema173.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.isPublic, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - var valid3 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - const err6 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: - schema173.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema173.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - const err7 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema173.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema173.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.viewer, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid5 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - const err11 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema173.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema173.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - const err12 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema173.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[0].allOf[0].properties.owner.items.type, - parentSchema: - schema173.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.owner, - data: data7, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema173.anyOf[0].allOf[0].type, - parentSchema: schema173.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data10) { - const err17 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema173.anyOf[0].allOf[1].properties.type, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err18 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema173.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema173.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data12)) { - var valid8 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err20 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema173.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs36 = errors; - if (typeof data15 !== 'string') { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema173.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema173.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema173.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema173.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema173.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err25 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema173.anyOf[0].allOf[1].properties.services.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema173.anyOf[0].allOf[1].properties.services, - data: data12, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err27 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema173.anyOf[0].allOf[1].type, - parentSchema: schema173.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid1 = _errs24 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs40 = errors; - const _errs41 = errors; - if (errors === _errs41) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if (data.type === undefined && (missing3 = 'type')) { - const err28 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema173.anyOf[1].allOf[0].required, - parentSchema: schema173.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data.name !== undefined) { - let data17 = data.name; - const _errs43 = errors; - if (typeof data17 !== 'string') { - const err29 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.name, - data: data17, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid11 = _errs43 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data18 = data.description; - const _errs45 = errors; - if (typeof data18 !== 'string') { - const err30 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.description, - data: data18, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data19 = data.type; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err31 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data19 === 'device' || - data19 === 'group' || - data19 === 'edge instantiable' || - data19 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema173.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema173.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema173.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data20 = data.isPublic; - const _errs49 = errors; - if (typeof data20 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema173.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.isPublic, - data: data20, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data21 = data.viewer; - const _errs51 = errors; - if (errors === _errs51) { - if (Array.isArray(data21)) { - var valid12 = true; - const len3 = data21.length; - for (let i3 = 0; i3 < len3; i3++) { - let data22 = data21[i3]; - const _errs53 = errors; - if (errors === _errs53) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - let missing4; - if (data22.url === undefined && (missing4 = 'url')) { - const err34 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema173.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema173.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data22.url !== undefined) { - let data23 = data22.url; - const _errs55 = errors; - if (errors === _errs55) { - if (errors === _errs55) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err35 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema173.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema173.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid12 = _errs53 === errors; - if (!valid12) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.viewer, - data: data21, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data24 = data.owner; - const _errs57 = errors; - if (errors === _errs57) { - if (Array.isArray(data24)) { - var valid14 = true; - const len4 = data24.length; - for (let i4 = 0; i4 < len4; i4++) { - let data25 = data24[i4]; - const _errs59 = errors; - if (errors === _errs59) { - if ( - data25 && - typeof data25 == 'object' && - !Array.isArray(data25) - ) { - let missing5; - if (data25.url === undefined && (missing5 = 'url')) { - const err39 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema173.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema173.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data25.url !== undefined) { - let data26 = data25.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data26 === 'string') { - if (!formats0(data26)) { - const err40 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[1].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema173.anyOf[1].allOf[0].properties.owner - .items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema173.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid14 = _errs59 === errors; - if (!valid14) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.owner, - data: data24, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid11 = _errs57 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema173.anyOf[1].allOf[0].type, - parentSchema: schema173.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid10 = _errs41 === errors; - if (valid10) { - const _errs63 = errors; - if (errors === _errs63) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data27 = data.type; - const _errs65 = errors; - if ('device' !== data27) { - const err45 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema173.anyOf[1].allOf[1].properties.type, - data: data27, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data28 = data.experiment; - const _errs66 = errors; - if (errors === _errs66) { - if (errors === _errs66) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err46 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema173.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema173.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid16 = _errs66 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data29 = data.services; - const _errs68 = errors; - if (errors === _errs68) { - if (Array.isArray(data29)) { - var valid17 = true; - const len5 = data29.length; - for (let i5 = 0; i5 < len5; i5++) { - let data30 = data29[i5]; - const _errs70 = errors; - if (errors === _errs70) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - if (data30.serviceType !== undefined) { - let data31 = data30.serviceType; - const _errs73 = errors; - if (errors === _errs73) { - if (errors === _errs73) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err48 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema173.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid18 = _errs73 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceId !== undefined) { - let data32 = data30.serviceId; - const _errs75 = errors; - if (typeof data32 !== 'string') { - const err50 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[1].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema173.anyOf[1].allOf[1].properties.services.items - .properties.serviceId, - data: data32, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid18 = _errs75 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceDirection !== undefined) { - let data33 = data30.serviceDirection; - const _errs77 = errors; - if (typeof data33 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema173.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data33 === 'consumer' || - data33 === 'producer' || - data33 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema173.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema173.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema173.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err53 = { - instancePath: instancePath + '/services/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[1].allOf[1].properties.services.items.type, - parentSchema: - schema173.anyOf[1].allOf[1].properties.services.items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid17 = _errs70 === errors; - if (!valid17) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema173.anyOf[1].allOf[1].properties.services, - data: data29, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid16 = _errs68 === errors; - } else { - var valid16 = true; - } - } - } - } else { - const err55 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema173.anyOf[1].allOf[1].type, - parentSchema: schema173.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid10 = _errs63 === errors; - } - var _valid0 = _errs40 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs79 = errors; - const _errs80 = errors; - if (errors === _errs80) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if (data.type === undefined && (missing6 = 'type')) { - const err56 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema173.anyOf[2].allOf[0].required, - parentSchema: schema173.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data.name !== undefined) { - let data34 = data.name; - const _errs82 = errors; - if (typeof data34 !== 'string') { - const err57 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.name, - data: data34, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid20 = _errs82 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.description !== undefined) { - let data35 = data.description; - const _errs84 = errors; - if (typeof data35 !== 'string') { - const err58 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.description, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid20 = _errs84 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.type !== undefined) { - let data36 = data.type; - const _errs86 = errors; - if (typeof data36 !== 'string') { - const err59 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data36 === 'device' || - data36 === 'group' || - data36 === 'edge instantiable' || - data36 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema173.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema173.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema173.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid20 = _errs86 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.isPublic !== undefined) { - let data37 = data.isPublic; - const _errs88 = errors; - if (typeof data37 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema173.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.isPublic, - data: data37, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs88 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.viewer !== undefined) { - let data38 = data.viewer; - const _errs90 = errors; - if (errors === _errs90) { - if (Array.isArray(data38)) { - var valid21 = true; - const len6 = data38.length; - for (let i6 = 0; i6 < len6; i6++) { - let data39 = data38[i6]; - const _errs92 = errors; - if (errors === _errs92) { - if ( - data39 && - typeof data39 == 'object' && - !Array.isArray(data39) - ) { - let missing7; - if (data39.url === undefined && (missing7 = 'url')) { - const err62 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema173.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema173.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data39.url !== undefined) { - let data40 = data39.url; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err63 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema173.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema173.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs92 === errors; - if (!valid21) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.viewer, - data: data38, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid20 = _errs90 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.owner !== undefined) { - let data41 = data.owner; - const _errs96 = errors; - if (errors === _errs96) { - if (Array.isArray(data41)) { - var valid23 = true; - const len7 = data41.length; - for (let i7 = 0; i7 < len7; i7++) { - let data42 = data41[i7]; - const _errs98 = errors; - if (errors === _errs98) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - let missing8; - if (data42.url === undefined && (missing8 = 'url')) { - const err67 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + missing8 + "'", - schema: - schema173.anyOf[2].allOf[0].properties.owner.items - .required, - parentSchema: - schema173.anyOf[2].allOf[0].properties.owner - .items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data42.url !== undefined) { - let data43 = data42.url; - const _errs100 = errors; - if (errors === _errs100) { - if (errors === _errs100) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err68 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema173.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema173.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid23 = _errs98 === errors; - if (!valid23) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.owner, - data: data41, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid20 = _errs96 === errors; - } else { - var valid20 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema173.anyOf[2].allOf[0].type, - parentSchema: schema173.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid19 = _errs80 === errors; - if (valid19) { - const _errs102 = errors; - if (errors === _errs102) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs104 = errors; - if ('edge instantiable' !== data44) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema173.anyOf[2].allOf[1].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.codeUrl !== undefined) { - let data45 = data.codeUrl; - const _errs105 = errors; - if (errors === _errs105) { - if (errors === _errs105) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err74 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema173.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema173.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.services !== undefined) { - let data46 = data.services; - const _errs107 = errors; - if (errors === _errs107) { - if (Array.isArray(data46)) { - var valid26 = true; - const len8 = data46.length; - for (let i8 = 0; i8 < len8; i8++) { - let data47 = data46[i8]; - const _errs109 = errors; - if (errors === _errs109) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - if (data47.serviceType !== undefined) { - let data48 = data47.serviceType; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema173.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceId !== undefined) { - let data49 = data47.serviceId; - const _errs114 = errors; - if (typeof data49 !== 'string') { - const err78 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema173.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data49, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceDirection !== undefined) { - let data50 = data47.serviceDirection; - const _errs116 = errors; - if (typeof data50 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema173.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data50 === 'consumer' || - data50 === 'producer' || - data50 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema173.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema173.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema173.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err81 = { - instancePath: instancePath + '/services/' + i8, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema173.anyOf[2].allOf[1].properties.services.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid26 = _errs109 === errors; - if (!valid26) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema173.anyOf[2].allOf[1].properties.services, - data: data46, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err83 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema173.anyOf[2].allOf[1].type, - parentSchema: schema173.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid19 = _errs102 === errors; - } - var _valid0 = _errs79 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs118 = errors; - const _errs119 = errors; - if (errors === _errs119) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if (data.type === undefined && (missing9 = 'type')) { - const err84 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema173.anyOf[3].allOf[0].required, - parentSchema: schema173.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data.name !== undefined) { - let data51 = data.name; - const _errs121 = errors; - if (typeof data51 !== 'string') { - const err85 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema173.anyOf[3].allOf[0].properties.name, - data: data51, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid29 = _errs121 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.description !== undefined) { - let data52 = data.description; - const _errs123 = errors; - if (typeof data52 !== 'string') { - const err86 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema173.anyOf[3].allOf[0].properties.description, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid29 = _errs123 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.type !== undefined) { - let data53 = data.type; - const _errs125 = errors; - if (typeof data53 !== 'string') { - const err87 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema173.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema173.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data53 === 'device' || - data53 === 'group' || - data53 === 'edge instantiable' || - data53 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema173.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema173.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema173.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid29 = _errs125 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.isPublic !== undefined) { - let data54 = data.isPublic; - const _errs127 = errors; - if (typeof data54 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema173.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema173.anyOf[3].allOf[0].properties.isPublic, - data: data54, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid29 = _errs127 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.viewer !== undefined) { - let data55 = data.viewer; - const _errs129 = errors; - if (errors === _errs129) { - if (Array.isArray(data55)) { - var valid30 = true; - const len9 = data55.length; - for (let i9 = 0; i9 < len9; i9++) { - let data56 = data55[i9]; - const _errs131 = errors; - if (errors === _errs131) { - if ( - data56 && - typeof data56 == 'object' && - !Array.isArray(data56) - ) { - let missing10; - if (data56.url === undefined && (missing10 = 'url')) { - const err90 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + missing10 + "'", - schema: - schema173.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema173.anyOf[3].allOf[0].properties.viewer - .items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data56.url !== undefined) { - let data57 = data56.url; - const _errs133 = errors; - if (errors === _errs133) { - if (errors === _errs133) { - if (typeof data57 === 'string') { - if (!formats0(data57)) { - const err91 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema173.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema173.anyOf[3].allOf[0].properties.viewer.items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid30 = _errs131 === errors; - if (!valid30) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema173.anyOf[3].allOf[0].properties.viewer, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid29 = _errs129 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.owner !== undefined) { - let data58 = data.owner; - const _errs135 = errors; - if (errors === _errs135) { - if (Array.isArray(data58)) { - var valid32 = true; - const len10 = data58.length; - for (let i10 = 0; i10 < len10; i10++) { - let data59 = data58[i10]; - const _errs137 = errors; - if (errors === _errs137) { - if ( - data59 && - typeof data59 == 'object' && - !Array.isArray(data59) - ) { - let missing11; - if (data59.url === undefined && (missing11 = 'url')) { - const err95 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema173.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema173.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data59.url !== undefined) { - let data60 = data59.url; - const _errs139 = errors; - if (errors === _errs139) { - if (errors === _errs139) { - if (typeof data60 === 'string') { - if (!formats0(data60)) { - const err96 = { - instancePath: - instancePath + - '/owner/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + '/owner/' + i10 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema173.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[3].allOf[0].properties.owner.items - .type, - parentSchema: - schema173.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid32 = _errs137 === errors; - if (!valid32) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema173.anyOf[3].allOf[0].properties.owner, - data: data58, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid29 = _errs135 === errors; - } else { - var valid29 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema173.anyOf[3].allOf[0].type, - parentSchema: schema173.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid28 = _errs119 === errors; - if (valid28) { - const _errs141 = errors; - if (errors === _errs141) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data61 = data.type; - const _errs143 = errors; - if ('group' !== data61) { - const err101 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema173.anyOf[3].allOf[1].properties.type, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data.devices !== undefined) { - let data62 = data.devices; - const _errs144 = errors; - if (errors === _errs144) { - if (Array.isArray(data62)) { - var valid35 = true; - const len11 = data62.length; - for (let i11 = 0; i11 < len11; i11++) { - let data63 = data62[i11]; - const _errs146 = errors; - if (errors === _errs146) { - if ( - data63 && - typeof data63 == 'object' && - !Array.isArray(data63) - ) { - let missing12; - if (data63.url === undefined && (missing12 = 'url')) { - const err102 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: - "must have required property '" + missing12 + "'", - schema: - schema173.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema173.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } else { - if (data63.url !== undefined) { - let data64 = data63.url; - const _errs148 = errors; - if (errors === _errs148) { - if (errors === _errs148) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err103 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema173.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - } else { - const err104 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema173.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema173.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } - } - } - } - } else { - const err105 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema173.anyOf[3].allOf[1].properties.devices.items.type, - parentSchema: - schema173.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - var valid35 = _errs146 === errors; - if (!valid35) { - break; - } - } - } else { - const err106 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema173.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema173.anyOf[3].allOf[1].properties.devices, - data: data62, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - } - } else { - const err107 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema173.anyOf[3].allOf[1].type, - parentSchema: schema173.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid28 = _errs141 === errors; - } - var _valid0 = _errs118 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err108 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema173.anyOf, - parentSchema: schema173, - data, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - validate188.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate188.errors = vErrors; - return errors === 0; -} -exports.validateUpdateDeviceBodyResponse = validate189; -const schema174 = { - title: 'Device Update', - anyOf: [ - { - title: 'Instantiable Cloud Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Concrete Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Instantiable Browser Device Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - }, - { - title: 'Device Group Update', - allOf: [ - { - title: 'Device Overview Update', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - }, - ], - }, - ], - 'x-standalone': false, - 'x-name': 'updateDeviceBodyResponse', - 'x-location': - '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate189( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema174.anyOf[0].allOf[0].required, - parentSchema: schema174.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs4 = errors; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.name, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err2 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.description, - data: data1, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err3 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema174.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema174.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema174.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema174.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.isPublic, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - var valid3 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - const err6 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: - schema174.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema174.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - const err7 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema174.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema174.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.viewer, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid5 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - const err11 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema174.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema174.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - const err12 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema174.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[0].allOf[0].properties.owner.items.type, - parentSchema: - schema174.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.owner, - data: data7, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema174.anyOf[0].allOf[0].type, - parentSchema: schema174.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data10) { - const err17 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema174.anyOf[0].allOf[1].properties.type, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err18 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema174.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema174.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data12)) { - var valid8 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err20 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema174.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs36 = errors; - if (typeof data15 !== 'string') { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema174.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema174.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema174.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema174.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema174.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err25 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema174.anyOf[0].allOf[1].properties.services.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema174.anyOf[0].allOf[1].properties.services, - data: data12, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err27 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema174.anyOf[0].allOf[1].type, - parentSchema: schema174.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid1 = _errs24 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs40 = errors; - const _errs41 = errors; - if (errors === _errs41) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if (data.type === undefined && (missing3 = 'type')) { - const err28 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema174.anyOf[1].allOf[0].required, - parentSchema: schema174.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data.name !== undefined) { - let data17 = data.name; - const _errs43 = errors; - if (typeof data17 !== 'string') { - const err29 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.name, - data: data17, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid11 = _errs43 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data18 = data.description; - const _errs45 = errors; - if (typeof data18 !== 'string') { - const err30 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.description, - data: data18, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data19 = data.type; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err31 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data19 === 'device' || - data19 === 'group' || - data19 === 'edge instantiable' || - data19 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema174.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema174.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema174.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data20 = data.isPublic; - const _errs49 = errors; - if (typeof data20 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema174.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.isPublic, - data: data20, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data21 = data.viewer; - const _errs51 = errors; - if (errors === _errs51) { - if (Array.isArray(data21)) { - var valid12 = true; - const len3 = data21.length; - for (let i3 = 0; i3 < len3; i3++) { - let data22 = data21[i3]; - const _errs53 = errors; - if (errors === _errs53) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - let missing4; - if (data22.url === undefined && (missing4 = 'url')) { - const err34 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema174.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema174.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data22.url !== undefined) { - let data23 = data22.url; - const _errs55 = errors; - if (errors === _errs55) { - if (errors === _errs55) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err35 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema174.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema174.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid12 = _errs53 === errors; - if (!valid12) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.viewer, - data: data21, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data24 = data.owner; - const _errs57 = errors; - if (errors === _errs57) { - if (Array.isArray(data24)) { - var valid14 = true; - const len4 = data24.length; - for (let i4 = 0; i4 < len4; i4++) { - let data25 = data24[i4]; - const _errs59 = errors; - if (errors === _errs59) { - if ( - data25 && - typeof data25 == 'object' && - !Array.isArray(data25) - ) { - let missing5; - if (data25.url === undefined && (missing5 = 'url')) { - const err39 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema174.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema174.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data25.url !== undefined) { - let data26 = data25.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data26 === 'string') { - if (!formats0(data26)) { - const err40 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[1].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema174.anyOf[1].allOf[0].properties.owner - .items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema174.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid14 = _errs59 === errors; - if (!valid14) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.owner, - data: data24, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid11 = _errs57 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema174.anyOf[1].allOf[0].type, - parentSchema: schema174.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid10 = _errs41 === errors; - if (valid10) { - const _errs63 = errors; - if (errors === _errs63) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data27 = data.type; - const _errs65 = errors; - if ('device' !== data27) { - const err45 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema174.anyOf[1].allOf[1].properties.type, - data: data27, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data28 = data.experiment; - const _errs66 = errors; - if (errors === _errs66) { - if (errors === _errs66) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err46 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema174.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema174.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid16 = _errs66 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data29 = data.services; - const _errs68 = errors; - if (errors === _errs68) { - if (Array.isArray(data29)) { - var valid17 = true; - const len5 = data29.length; - for (let i5 = 0; i5 < len5; i5++) { - let data30 = data29[i5]; - const _errs70 = errors; - if (errors === _errs70) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - if (data30.serviceType !== undefined) { - let data31 = data30.serviceType; - const _errs73 = errors; - if (errors === _errs73) { - if (errors === _errs73) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err48 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema174.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid18 = _errs73 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceId !== undefined) { - let data32 = data30.serviceId; - const _errs75 = errors; - if (typeof data32 !== 'string') { - const err50 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[1].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema174.anyOf[1].allOf[1].properties.services.items - .properties.serviceId, - data: data32, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid18 = _errs75 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceDirection !== undefined) { - let data33 = data30.serviceDirection; - const _errs77 = errors; - if (typeof data33 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema174.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data33 === 'consumer' || - data33 === 'producer' || - data33 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema174.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema174.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema174.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err53 = { - instancePath: instancePath + '/services/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[1].allOf[1].properties.services.items.type, - parentSchema: - schema174.anyOf[1].allOf[1].properties.services.items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid17 = _errs70 === errors; - if (!valid17) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema174.anyOf[1].allOf[1].properties.services, - data: data29, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid16 = _errs68 === errors; - } else { - var valid16 = true; - } - } - } - } else { - const err55 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema174.anyOf[1].allOf[1].type, - parentSchema: schema174.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid10 = _errs63 === errors; - } - var _valid0 = _errs40 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs79 = errors; - const _errs80 = errors; - if (errors === _errs80) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if (data.type === undefined && (missing6 = 'type')) { - const err56 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema174.anyOf[2].allOf[0].required, - parentSchema: schema174.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data.name !== undefined) { - let data34 = data.name; - const _errs82 = errors; - if (typeof data34 !== 'string') { - const err57 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.name, - data: data34, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid20 = _errs82 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.description !== undefined) { - let data35 = data.description; - const _errs84 = errors; - if (typeof data35 !== 'string') { - const err58 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.description, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid20 = _errs84 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.type !== undefined) { - let data36 = data.type; - const _errs86 = errors; - if (typeof data36 !== 'string') { - const err59 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data36 === 'device' || - data36 === 'group' || - data36 === 'edge instantiable' || - data36 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema174.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema174.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema174.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid20 = _errs86 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.isPublic !== undefined) { - let data37 = data.isPublic; - const _errs88 = errors; - if (typeof data37 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema174.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.isPublic, - data: data37, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs88 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.viewer !== undefined) { - let data38 = data.viewer; - const _errs90 = errors; - if (errors === _errs90) { - if (Array.isArray(data38)) { - var valid21 = true; - const len6 = data38.length; - for (let i6 = 0; i6 < len6; i6++) { - let data39 = data38[i6]; - const _errs92 = errors; - if (errors === _errs92) { - if ( - data39 && - typeof data39 == 'object' && - !Array.isArray(data39) - ) { - let missing7; - if (data39.url === undefined && (missing7 = 'url')) { - const err62 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema174.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema174.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data39.url !== undefined) { - let data40 = data39.url; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err63 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema174.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema174.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs92 === errors; - if (!valid21) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.viewer, - data: data38, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid20 = _errs90 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.owner !== undefined) { - let data41 = data.owner; - const _errs96 = errors; - if (errors === _errs96) { - if (Array.isArray(data41)) { - var valid23 = true; - const len7 = data41.length; - for (let i7 = 0; i7 < len7; i7++) { - let data42 = data41[i7]; - const _errs98 = errors; - if (errors === _errs98) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - let missing8; - if (data42.url === undefined && (missing8 = 'url')) { - const err67 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + missing8 + "'", - schema: - schema174.anyOf[2].allOf[0].properties.owner.items - .required, - parentSchema: - schema174.anyOf[2].allOf[0].properties.owner - .items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data42.url !== undefined) { - let data43 = data42.url; - const _errs100 = errors; - if (errors === _errs100) { - if (errors === _errs100) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err68 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema174.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema174.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid23 = _errs98 === errors; - if (!valid23) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.owner, - data: data41, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid20 = _errs96 === errors; - } else { - var valid20 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema174.anyOf[2].allOf[0].type, - parentSchema: schema174.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid19 = _errs80 === errors; - if (valid19) { - const _errs102 = errors; - if (errors === _errs102) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs104 = errors; - if ('edge instantiable' !== data44) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema174.anyOf[2].allOf[1].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.codeUrl !== undefined) { - let data45 = data.codeUrl; - const _errs105 = errors; - if (errors === _errs105) { - if (errors === _errs105) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err74 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema174.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema174.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.services !== undefined) { - let data46 = data.services; - const _errs107 = errors; - if (errors === _errs107) { - if (Array.isArray(data46)) { - var valid26 = true; - const len8 = data46.length; - for (let i8 = 0; i8 < len8; i8++) { - let data47 = data46[i8]; - const _errs109 = errors; - if (errors === _errs109) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - if (data47.serviceType !== undefined) { - let data48 = data47.serviceType; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema174.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceId !== undefined) { - let data49 = data47.serviceId; - const _errs114 = errors; - if (typeof data49 !== 'string') { - const err78 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema174.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data49, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceDirection !== undefined) { - let data50 = data47.serviceDirection; - const _errs116 = errors; - if (typeof data50 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema174.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data50 === 'consumer' || - data50 === 'producer' || - data50 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema174.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema174.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema174.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err81 = { - instancePath: instancePath + '/services/' + i8, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema174.anyOf[2].allOf[1].properties.services.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid26 = _errs109 === errors; - if (!valid26) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema174.anyOf[2].allOf[1].properties.services, - data: data46, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err83 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema174.anyOf[2].allOf[1].type, - parentSchema: schema174.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid19 = _errs102 === errors; - } - var _valid0 = _errs79 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs118 = errors; - const _errs119 = errors; - if (errors === _errs119) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if (data.type === undefined && (missing9 = 'type')) { - const err84 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema174.anyOf[3].allOf[0].required, - parentSchema: schema174.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data.name !== undefined) { - let data51 = data.name; - const _errs121 = errors; - if (typeof data51 !== 'string') { - const err85 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema174.anyOf[3].allOf[0].properties.name, - data: data51, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid29 = _errs121 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.description !== undefined) { - let data52 = data.description; - const _errs123 = errors; - if (typeof data52 !== 'string') { - const err86 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema174.anyOf[3].allOf[0].properties.description, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid29 = _errs123 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.type !== undefined) { - let data53 = data.type; - const _errs125 = errors; - if (typeof data53 !== 'string') { - const err87 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema174.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema174.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data53 === 'device' || - data53 === 'group' || - data53 === 'edge instantiable' || - data53 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema174.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema174.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema174.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid29 = _errs125 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.isPublic !== undefined) { - let data54 = data.isPublic; - const _errs127 = errors; - if (typeof data54 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema174.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema174.anyOf[3].allOf[0].properties.isPublic, - data: data54, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid29 = _errs127 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.viewer !== undefined) { - let data55 = data.viewer; - const _errs129 = errors; - if (errors === _errs129) { - if (Array.isArray(data55)) { - var valid30 = true; - const len9 = data55.length; - for (let i9 = 0; i9 < len9; i9++) { - let data56 = data55[i9]; - const _errs131 = errors; - if (errors === _errs131) { - if ( - data56 && - typeof data56 == 'object' && - !Array.isArray(data56) - ) { - let missing10; - if (data56.url === undefined && (missing10 = 'url')) { - const err90 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + missing10 + "'", - schema: - schema174.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema174.anyOf[3].allOf[0].properties.viewer - .items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data56.url !== undefined) { - let data57 = data56.url; - const _errs133 = errors; - if (errors === _errs133) { - if (errors === _errs133) { - if (typeof data57 === 'string') { - if (!formats0(data57)) { - const err91 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema174.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema174.anyOf[3].allOf[0].properties.viewer.items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid30 = _errs131 === errors; - if (!valid30) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema174.anyOf[3].allOf[0].properties.viewer, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid29 = _errs129 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.owner !== undefined) { - let data58 = data.owner; - const _errs135 = errors; - if (errors === _errs135) { - if (Array.isArray(data58)) { - var valid32 = true; - const len10 = data58.length; - for (let i10 = 0; i10 < len10; i10++) { - let data59 = data58[i10]; - const _errs137 = errors; - if (errors === _errs137) { - if ( - data59 && - typeof data59 == 'object' && - !Array.isArray(data59) - ) { - let missing11; - if (data59.url === undefined && (missing11 = 'url')) { - const err95 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema174.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema174.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data59.url !== undefined) { - let data60 = data59.url; - const _errs139 = errors; - if (errors === _errs139) { - if (errors === _errs139) { - if (typeof data60 === 'string') { - if (!formats0(data60)) { - const err96 = { - instancePath: - instancePath + - '/owner/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + '/owner/' + i10 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema174.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[3].allOf[0].properties.owner.items - .type, - parentSchema: - schema174.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid32 = _errs137 === errors; - if (!valid32) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema174.anyOf[3].allOf[0].properties.owner, - data: data58, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid29 = _errs135 === errors; - } else { - var valid29 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema174.anyOf[3].allOf[0].type, - parentSchema: schema174.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid28 = _errs119 === errors; - if (valid28) { - const _errs141 = errors; - if (errors === _errs141) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data61 = data.type; - const _errs143 = errors; - if ('group' !== data61) { - const err101 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema174.anyOf[3].allOf[1].properties.type, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data.devices !== undefined) { - let data62 = data.devices; - const _errs144 = errors; - if (errors === _errs144) { - if (Array.isArray(data62)) { - var valid35 = true; - const len11 = data62.length; - for (let i11 = 0; i11 < len11; i11++) { - let data63 = data62[i11]; - const _errs146 = errors; - if (errors === _errs146) { - if ( - data63 && - typeof data63 == 'object' && - !Array.isArray(data63) - ) { - let missing12; - if (data63.url === undefined && (missing12 = 'url')) { - const err102 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: - "must have required property '" + missing12 + "'", - schema: - schema174.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema174.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } else { - if (data63.url !== undefined) { - let data64 = data63.url; - const _errs148 = errors; - if (errors === _errs148) { - if (errors === _errs148) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err103 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema174.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - } else { - const err104 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema174.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema174.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } - } - } - } - } else { - const err105 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema174.anyOf[3].allOf[1].properties.devices.items.type, - parentSchema: - schema174.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - var valid35 = _errs146 === errors; - if (!valid35) { - break; - } - } - } else { - const err106 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema174.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema174.anyOf[3].allOf[1].properties.devices, - data: data62, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - } - } else { - const err107 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema174.anyOf[3].allOf[1].type, - parentSchema: schema174.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid28 = _errs141 === errors; - } - var _valid0 = _errs118 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err108 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema174.anyOf, - parentSchema: schema174, - data, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - validate189.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate189.errors = vErrors; - return errors === 0; -} -exports.validateUpdateDeviceResponse200Request = validate190; -const schema175 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'updateDeviceResponse200Request', - 'x-location': - '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate190( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema175.anyOf[0].allOf[0].required, - parentSchema: schema175.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.name !== undefined) { - let data0 = data.name; - const _errs4 = errors; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.name, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data1 = data.description; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err2 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.description, - data: data1, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data2 = data.type; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err3 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - if ( - !( - data2 === 'device' || - data2 === 'group' || - data2 === 'edge instantiable' || - data2 === 'cloud instantiable' - ) - ) { - const err4 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema175.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema175.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema175.anyOf[0].allOf[0].properties.type, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data3 = data.isPublic; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - const err5 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema175.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.isPublic, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data4 = data.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - var valid3 = true; - const len0 = data4.length; - for (let i0 = 0; i0 < len0; i0++) { - let data5 = data4[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing1; - if (data5.url === undefined && (missing1 = 'url')) { - const err6 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: - schema175.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema175.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - const err7 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } else { - const err8 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema175.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - } - } - } - } - } else { - const err9 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[0].allOf[0].properties.viewer.items.type, - parentSchema: - schema175.anyOf[0].allOf[0].properties.viewer.items, - data: data5, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - const err10 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.viewer, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data7 = data.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid5 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing2; - if (data8.url === undefined && (missing2 = 'url')) { - const err11 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema175.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema175.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } else { - if (data8.url !== undefined) { - let data9 = data8.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - const err12 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } else { - const err13 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema175.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } - } - } - } - } - } else { - const err14 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[0].allOf[0].properties.owner.items.type, - parentSchema: - schema175.anyOf[0].allOf[0].properties.owner.items, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - const err15 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.owner, - data: data7, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - const err16 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema175.anyOf[0].allOf[0].type, - parentSchema: schema175.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data10 = data.type; - const _errs26 = errors; - if ('cloud instantiable' !== data10) { - const err17 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema175.anyOf[0].allOf[1].properties.type, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data11 = data.instantiateUrl; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - const err18 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema175.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } else { - const err19 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema175.anyOf[0].allOf[1].properties.instantiateUrl, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data12 = data.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data12)) { - var valid8 = true; - const len2 = data12.length; - for (let i2 = 0; i2 < len2; i2++) { - let data13 = data12[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { - if (data13.serviceType !== undefined) { - let data14 = data13.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data14 === 'string') { - if (!formats0(data14)) { - const err20 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema175.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceId !== undefined) { - let data15 = data13.serviceId; - const _errs36 = errors; - if (typeof data15 !== 'string') { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema175.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data13.serviceDirection !== undefined) { - let data16 = data13.serviceDirection; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err23 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema175.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - if ( - !( - data16 === 'consumer' || - data16 === 'producer' || - data16 === 'prosumer' - ) - ) { - const err24 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema175.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema175.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema175.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err25 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema175.anyOf[0].allOf[1].properties.services.items, - data: data13, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - const err26 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema175.anyOf[0].allOf[1].properties.services, - data: data12, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err27 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema175.anyOf[0].allOf[1].type, - parentSchema: schema175.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid1 = _errs24 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs40 = errors; - const _errs41 = errors; - if (errors === _errs41) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err28 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema175.anyOf[1].allOf[0].required, - parentSchema: schema175.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } else { - if (data.name !== undefined) { - let data17 = data.name; - const _errs43 = errors; - if (typeof data17 !== 'string') { - const err29 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.name, - data: data17, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - var valid11 = _errs43 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data18 = data.description; - const _errs45 = errors; - if (typeof data18 !== 'string') { - const err30 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.description, - data: data18, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data19 = data.type; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err31 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - if ( - !( - data19 === 'device' || - data19 === 'group' || - data19 === 'edge instantiable' || - data19 === 'cloud instantiable' - ) - ) { - const err32 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema175.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema175.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema175.anyOf[1].allOf[0].properties.type, - data: data19, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data20 = data.isPublic; - const _errs49 = errors; - if (typeof data20 !== 'boolean') { - const err33 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema175.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.isPublic, - data: data20, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data21 = data.viewer; - const _errs51 = errors; - if (errors === _errs51) { - if (Array.isArray(data21)) { - var valid12 = true; - const len3 = data21.length; - for (let i3 = 0; i3 < len3; i3++) { - let data22 = data21[i3]; - const _errs53 = errors; - if (errors === _errs53) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - let missing4; - if (data22.url === undefined && (missing4 = 'url')) { - const err34 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema175.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema175.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } else { - if (data22.url !== undefined) { - let data23 = data22.url; - const _errs55 = errors; - if (errors === _errs55) { - if (errors === _errs55) { - if (typeof data23 === 'string') { - if (!formats0(data23)) { - const err35 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - } else { - const err36 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[1].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema175.anyOf[1].allOf[0].properties.viewer - .items.properties.url, - data: data23, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } - } - } else { - const err37 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema175.anyOf[1].allOf[0].properties.viewer.items, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid12 = _errs53 === errors; - if (!valid12) { - break; - } - } - } else { - const err38 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.viewer, - data: data21, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data24 = data.owner; - const _errs57 = errors; - if (errors === _errs57) { - if (Array.isArray(data24)) { - var valid14 = true; - const len4 = data24.length; - for (let i4 = 0; i4 < len4; i4++) { - let data25 = data24[i4]; - const _errs59 = errors; - if (errors === _errs59) { - if ( - data25 && - typeof data25 == 'object' && - !Array.isArray(data25) - ) { - let missing5; - if (data25.url === undefined && (missing5 = 'url')) { - const err39 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema175.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema175.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } else { - if (data25.url !== undefined) { - let data26 = data25.url; - const _errs61 = errors; - if (errors === _errs61) { - if (errors === _errs61) { - if (typeof data26 === 'string') { - if (!formats0(data26)) { - const err40 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } else { - const err41 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[1].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema175.anyOf[1].allOf[0].properties.owner - .items.properties.url, - data: data26, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - } - } - } - } else { - const err42 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema175.anyOf[1].allOf[0].properties.owner.items, - data: data25, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid14 = _errs59 === errors; - if (!valid14) { - break; - } - } - } else { - const err43 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.owner, - data: data24, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid11 = _errs57 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema175.anyOf[1].allOf[0].type, - parentSchema: schema175.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid10 = _errs41 === errors; - if (valid10) { - const _errs63 = errors; - if (errors === _errs63) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data27 = data.type; - const _errs65 = errors; - if ('device' !== data27) { - const err45 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema175.anyOf[1].allOf[1].properties.type, - data: data27, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - var valid16 = _errs65 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data28 = data.experiment; - const _errs66 = errors; - if (errors === _errs66) { - if (errors === _errs66) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err46 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema175.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } else { - const err47 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema175.anyOf[1].allOf[1].properties.experiment, - data: data28, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - } - var valid16 = _errs66 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data29 = data.services; - const _errs68 = errors; - if (errors === _errs68) { - if (Array.isArray(data29)) { - var valid17 = true; - const len5 = data29.length; - for (let i5 = 0; i5 < len5; i5++) { - let data30 = data29[i5]; - const _errs70 = errors; - if (errors === _errs70) { - if ( - data30 && - typeof data30 == 'object' && - !Array.isArray(data30) - ) { - if (data30.serviceType !== undefined) { - let data31 = data30.serviceType; - const _errs73 = errors; - if (errors === _errs73) { - if (errors === _errs73) { - if (typeof data31 === 'string') { - if (!formats0(data31)) { - const err48 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } else { - const err49 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema175.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data31, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - } - } - var valid18 = _errs73 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceId !== undefined) { - let data32 = data30.serviceId; - const _errs75 = errors; - if (typeof data32 !== 'string') { - const err50 = { - instancePath: - instancePath + '/services/' + i5 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[1].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema175.anyOf[1].allOf[1].properties.services.items - .properties.serviceId, - data: data32, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid18 = _errs75 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data30.serviceDirection !== undefined) { - let data33 = data30.serviceDirection; - const _errs77 = errors; - if (typeof data33 !== 'string') { - const err51 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema175.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - if ( - !( - data33 === 'consumer' || - data33 === 'producer' || - data33 === 'prosumer' - ) - ) { - const err52 = { - instancePath: - instancePath + - '/services/' + - i5 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema175.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema175.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema175.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err53 = { - instancePath: instancePath + '/services/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[1].allOf[1].properties.services.items.type, - parentSchema: - schema175.anyOf[1].allOf[1].properties.services.items, - data: data30, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - var valid17 = _errs70 === errors; - if (!valid17) { - break; - } - } - } else { - const err54 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema175.anyOf[1].allOf[1].properties.services, - data: data29, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid16 = _errs68 === errors; - } else { - var valid16 = true; - } - } - } - } else { - const err55 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema175.anyOf[1].allOf[1].type, - parentSchema: schema175.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid10 = _errs63 === errors; - } - var _valid0 = _errs40 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs79 = errors; - const _errs80 = errors; - if (errors === _errs80) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err56 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema175.anyOf[2].allOf[0].required, - parentSchema: schema175.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } else { - if (data.name !== undefined) { - let data34 = data.name; - const _errs82 = errors; - if (typeof data34 !== 'string') { - const err57 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.name, - data: data34, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid20 = _errs82 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.description !== undefined) { - let data35 = data.description; - const _errs84 = errors; - if (typeof data35 !== 'string') { - const err58 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.description, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid20 = _errs84 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.type !== undefined) { - let data36 = data.type; - const _errs86 = errors; - if (typeof data36 !== 'string') { - const err59 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - if ( - !( - data36 === 'device' || - data36 === 'group' || - data36 === 'edge instantiable' || - data36 === 'cloud instantiable' - ) - ) { - const err60 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema175.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema175.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema175.anyOf[2].allOf[0].properties.type, - data: data36, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - var valid20 = _errs86 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.isPublic !== undefined) { - let data37 = data.isPublic; - const _errs88 = errors; - if (typeof data37 !== 'boolean') { - const err61 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema175.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.isPublic, - data: data37, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs88 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.viewer !== undefined) { - let data38 = data.viewer; - const _errs90 = errors; - if (errors === _errs90) { - if (Array.isArray(data38)) { - var valid21 = true; - const len6 = data38.length; - for (let i6 = 0; i6 < len6; i6++) { - let data39 = data38[i6]; - const _errs92 = errors; - if (errors === _errs92) { - if ( - data39 && - typeof data39 == 'object' && - !Array.isArray(data39) - ) { - let missing7; - if (data39.url === undefined && (missing7 = 'url')) { - const err62 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema175.anyOf[2].allOf[0].properties.viewer.items - .required, - parentSchema: - schema175.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } else { - if (data39.url !== undefined) { - let data40 = data39.url; - const _errs94 = errors; - if (errors === _errs94) { - if (errors === _errs94) { - if (typeof data40 === 'string') { - if (!formats0(data40)) { - const err63 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - } else { - const err64 = { - instancePath: - instancePath + '/viewer/' + i6 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema175.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data40, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - } - } - } - } else { - const err65 = { - instancePath: instancePath + '/viewer/' + i6, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema175.anyOf[2].allOf[0].properties.viewer.items, - data: data39, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid21 = _errs92 === errors; - if (!valid21) { - break; - } - } - } else { - const err66 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.viewer, - data: data38, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid20 = _errs90 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data.owner !== undefined) { - let data41 = data.owner; - const _errs96 = errors; - if (errors === _errs96) { - if (Array.isArray(data41)) { - var valid23 = true; - const len7 = data41.length; - for (let i7 = 0; i7 < len7; i7++) { - let data42 = data41[i7]; - const _errs98 = errors; - if (errors === _errs98) { - if ( - data42 && - typeof data42 == 'object' && - !Array.isArray(data42) - ) { - let missing8; - if (data42.url === undefined && (missing8 = 'url')) { - const err67 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + missing8 + "'", - schema: - schema175.anyOf[2].allOf[0].properties.owner.items - .required, - parentSchema: - schema175.anyOf[2].allOf[0].properties.owner - .items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data42.url !== undefined) { - let data43 = data42.url; - const _errs100 = errors; - if (errors === _errs100) { - if (errors === _errs100) { - if (typeof data43 === 'string') { - if (!formats0(data43)) { - const err68 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: - instancePath + '/owner/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema175.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data43, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - } - } - } else { - const err70 = { - instancePath: instancePath + '/owner/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema175.anyOf[2].allOf[0].properties.owner.items, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - } - var valid23 = _errs98 === errors; - if (!valid23) { - break; - } - } - } else { - const err71 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.owner, - data: data41, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - } - var valid20 = _errs96 === errors; - } else { - var valid20 = true; - } - } - } - } - } - } - } - } else { - const err72 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema175.anyOf[2].allOf[0].type, - parentSchema: schema175.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - } - var valid19 = _errs80 === errors; - if (valid19) { - const _errs102 = errors; - if (errors === _errs102) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs104 = errors; - if ('edge instantiable' !== data44) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema175.anyOf[2].allOf[1].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid25 = _errs104 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.codeUrl !== undefined) { - let data45 = data.codeUrl; - const _errs105 = errors; - if (errors === _errs105) { - if (errors === _errs105) { - if (typeof data45 === 'string') { - if (!formats0(data45)) { - const err74 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema175.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - } else { - const err75 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema175.anyOf[2].allOf[1].properties.codeUrl, - data: data45, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } - } - } - var valid25 = _errs105 === errors; - } else { - var valid25 = true; - } - if (valid25) { - if (data.services !== undefined) { - let data46 = data.services; - const _errs107 = errors; - if (errors === _errs107) { - if (Array.isArray(data46)) { - var valid26 = true; - const len8 = data46.length; - for (let i8 = 0; i8 < len8; i8++) { - let data47 = data46[i8]; - const _errs109 = errors; - if (errors === _errs109) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - if (data47.serviceType !== undefined) { - let data48 = data47.serviceType; - const _errs112 = errors; - if (errors === _errs112) { - if (errors === _errs112) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema175.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - var valid27 = _errs112 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceId !== undefined) { - let data49 = data47.serviceId; - const _errs114 = errors; - if (typeof data49 !== 'string') { - const err78 = { - instancePath: - instancePath + '/services/' + i8 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema175.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data49, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - var valid27 = _errs114 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data47.serviceDirection !== undefined) { - let data50 = data47.serviceDirection; - const _errs116 = errors; - if (typeof data50 !== 'string') { - const err79 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema175.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - if ( - !( - data50 === 'consumer' || - data50 === 'producer' || - data50 === 'prosumer' - ) - ) { - const err80 = { - instancePath: - instancePath + - '/services/' + - i8 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema175.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema175.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema175.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } - var valid27 = _errs116 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err81 = { - instancePath: instancePath + '/services/' + i8, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema175.anyOf[2].allOf[1].properties.services.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } - var valid26 = _errs109 === errors; - if (!valid26) { - break; - } - } - } else { - const err82 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema175.anyOf[2].allOf[1].properties.services, - data: data46, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - var valid25 = _errs107 === errors; - } else { - var valid25 = true; - } - } - } - } else { - const err83 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema175.anyOf[2].allOf[1].type, - parentSchema: schema175.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid19 = _errs102 === errors; - } - var _valid0 = _errs79 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs118 = errors; - const _errs119 = errors; - if (errors === _errs119) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err84 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema175.anyOf[3].allOf[0].required, - parentSchema: schema175.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } else { - if (data.name !== undefined) { - let data51 = data.name; - const _errs121 = errors; - if (typeof data51 !== 'string') { - const err85 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema175.anyOf[3].allOf[0].properties.name, - data: data51, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - var valid29 = _errs121 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.description !== undefined) { - let data52 = data.description; - const _errs123 = errors; - if (typeof data52 !== 'string') { - const err86 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema175.anyOf[3].allOf[0].properties.description, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid29 = _errs123 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.type !== undefined) { - let data53 = data.type; - const _errs125 = errors; - if (typeof data53 !== 'string') { - const err87 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema175.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema175.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - if ( - !( - data53 === 'device' || - data53 === 'group' || - data53 === 'edge instantiable' || - data53 === 'cloud instantiable' - ) - ) { - const err88 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema175.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema175.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema175.anyOf[3].allOf[0].properties.type, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - var valid29 = _errs125 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.isPublic !== undefined) { - let data54 = data.isPublic; - const _errs127 = errors; - if (typeof data54 !== 'boolean') { - const err89 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema175.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema175.anyOf[3].allOf[0].properties.isPublic, - data: data54, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - var valid29 = _errs127 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.viewer !== undefined) { - let data55 = data.viewer; - const _errs129 = errors; - if (errors === _errs129) { - if (Array.isArray(data55)) { - var valid30 = true; - const len9 = data55.length; - for (let i9 = 0; i9 < len9; i9++) { - let data56 = data55[i9]; - const _errs131 = errors; - if (errors === _errs131) { - if ( - data56 && - typeof data56 == 'object' && - !Array.isArray(data56) - ) { - let missing10; - if (data56.url === undefined && (missing10 = 'url')) { - const err90 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + missing10 + "'", - schema: - schema175.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema175.anyOf[3].allOf[0].properties.viewer - .items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } else { - if (data56.url !== undefined) { - let data57 = data56.url; - const _errs133 = errors; - if (errors === _errs133) { - if (errors === _errs133) { - if (typeof data57 === 'string') { - if (!formats0(data57)) { - const err91 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - } else { - const err92 = { - instancePath: - instancePath + '/viewer/' + i9 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema175.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data57, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - } - } - } - } - } else { - const err93 = { - instancePath: instancePath + '/viewer/' + i9, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[3].allOf[0].properties.viewer.items - .type, - parentSchema: - schema175.anyOf[3].allOf[0].properties.viewer.items, - data: data56, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - } - var valid30 = _errs131 === errors; - if (!valid30) { - break; - } - } - } else { - const err94 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema175.anyOf[3].allOf[0].properties.viewer, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid29 = _errs129 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data.owner !== undefined) { - let data58 = data.owner; - const _errs135 = errors; - if (errors === _errs135) { - if (Array.isArray(data58)) { - var valid32 = true; - const len10 = data58.length; - for (let i10 = 0; i10 < len10; i10++) { - let data59 = data58[i10]; - const _errs137 = errors; - if (errors === _errs137) { - if ( - data59 && - typeof data59 == 'object' && - !Array.isArray(data59) - ) { - let missing11; - if (data59.url === undefined && (missing11 = 'url')) { - const err95 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema175.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema175.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } else { - if (data59.url !== undefined) { - let data60 = data59.url; - const _errs139 = errors; - if (errors === _errs139) { - if (errors === _errs139) { - if (typeof data60 === 'string') { - if (!formats0(data60)) { - const err96 = { - instancePath: - instancePath + - '/owner/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } else { - const err97 = { - instancePath: - instancePath + '/owner/' + i10 + '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema175.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data60, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } - } - } - } - } - } else { - const err98 = { - instancePath: instancePath + '/owner/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[3].allOf[0].properties.owner.items - .type, - parentSchema: - schema175.anyOf[3].allOf[0].properties.owner - .items, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } - var valid32 = _errs137 === errors; - if (!valid32) { - break; - } - } - } else { - const err99 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema175.anyOf[3].allOf[0].properties.owner, - data: data58, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - var valid29 = _errs135 === errors; - } else { - var valid29 = true; - } - } - } - } - } - } - } - } else { - const err100 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema175.anyOf[3].allOf[0].type, - parentSchema: schema175.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - } - var valid28 = _errs119 === errors; - if (valid28) { - const _errs141 = errors; - if (errors === _errs141) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err101 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema175.anyOf[3].allOf[1].required, - parentSchema: schema175.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } else { - if (data.type !== undefined) { - let data61 = data.type; - const _errs143 = errors; - if ('group' !== data61) { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema175.anyOf[3].allOf[1].properties.type, - data: data61, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - var valid34 = _errs143 === errors; - } else { - var valid34 = true; - } - if (valid34) { - if (data.devices !== undefined) { - let data62 = data.devices; - const _errs144 = errors; - if (errors === _errs144) { - if (Array.isArray(data62)) { - var valid35 = true; - const len11 = data62.length; - for (let i11 = 0; i11 < len11; i11++) { - let data63 = data62[i11]; - const _errs146 = errors; - if (errors === _errs146) { - if ( - data63 && - typeof data63 == 'object' && - !Array.isArray(data63) - ) { - let missing13; - if (data63.url === undefined && (missing13 = 'url')) { - const err103 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema175.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema175.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } else { - if (data63.url !== undefined) { - let data64 = data63.url; - const _errs148 = errors; - if (errors === _errs148) { - if (errors === _errs148) { - if (typeof data64 === 'string') { - if (!formats0(data64)) { - const err104 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema175.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - } else { - const err105 = { - instancePath: - instancePath + '/devices/' + i11 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema175.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema175.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data64, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } - } - } - } - } - } else { - const err106 = { - instancePath: instancePath + '/devices/' + i11, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema175.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema175.anyOf[3].allOf[1].properties.devices.items, - data: data63, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } - var valid35 = _errs146 === errors; - if (!valid35) { - break; - } - } - } else { - const err107 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema175.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema175.anyOf[3].allOf[1].properties.devices, - data: data62, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - var valid34 = _errs144 === errors; - } else { - var valid34 = true; - } - } - } - } else { - const err108 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema175.anyOf[3].allOf[1].type, - parentSchema: schema175.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid28 = _errs141 === errors; - } - var _valid0 = _errs118 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err109 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema175.anyOf, - parentSchema: schema175, - data, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - validate190.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate190.errors = vErrors; - return errors === 0; -} -exports.validateUpdateDeviceResponse200Response = validate191; -const schema176 = { - title: 'Device', - anyOf: [ - { - title: 'Instantiable Cloud Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'cloud instantiable' }, - instantiateUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Instantiable Browser Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'edge instantiable' }, - codeUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - { - title: 'Device Group', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'group' }, - devices: { - type: 'array', - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'updateDeviceResponse200Response', - 'x-location': - '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate191( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.name === undefined && (missing0 = 'name')) || - (data.isPublic === undefined && (missing0 = 'isPublic')) - ) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema176.anyOf[0].allOf[0].required, - parentSchema: schema176.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - const err1 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema176.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } else { - const err2 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/0/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.url, - data: data0, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.name !== undefined) { - let data1 = data.name; - const _errs6 = errors; - if (typeof data1 !== 'string') { - const err3 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/0/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.name, - data: data1, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.description !== undefined) { - let data2 = data.description; - const _errs8 = errors; - if (typeof data2 !== 'string') { - const err4 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/0/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.description, - data: data2, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.type !== undefined) { - let data3 = data.type; - const _errs10 = errors; - if (typeof data3 !== 'string') { - const err5 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - const err6 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema176.anyOf[0].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema176.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema176.anyOf[0].allOf[0].properties.type, - data: data3, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.isPublic !== undefined) { - let data4 = data.isPublic; - const _errs12 = errors; - if (typeof data4 !== 'boolean') { - const err7 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema176.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.isPublic, - data: data4, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.viewer !== undefined) { - let data5 = data.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing1; - if (data6.url === undefined && (missing1 = 'url')) { - const err8 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: - "must have required property '" + missing1 + "'", - schema: - schema176.anyOf[0].allOf[0].properties.viewer.items - .required, - parentSchema: - schema176.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - const err9 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[0].allOf[0].properties - .viewer.items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - } else { - const err10 = { - instancePath: - instancePath + '/viewer/' + i0 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[0].allOf[0].properties.viewer - .items.properties.url.type, - parentSchema: - schema176.anyOf[0].allOf[0].properties.viewer - .items.properties.url, - data: data7, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - } - } - } - } - } else { - const err11 = { - instancePath: instancePath + '/viewer/' + i0, - schemaPath: - '#/anyOf/0/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[0].allOf[0].properties.viewer.items - .type, - parentSchema: - schema176.anyOf[0].allOf[0].properties.viewer.items, - data: data6, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - const err12 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema176.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.viewer, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.owner !== undefined) { - let data8 = data.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data8)) { - var valid5 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing2; - if (data9.url === undefined && (missing2 = 'url')) { - const err13 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema176.anyOf[0].allOf[0].properties.owner.items - .required, - parentSchema: - schema176.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - const err14 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[0].allOf[0].properties - .owner.items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + '/owner/' + i1 + '/url', - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[0].allOf[0].properties.owner - .items.properties.url.type, - parentSchema: - schema176.anyOf[0].allOf[0].properties.owner - .items.properties.url, - data: data10, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - } - } - } else { - const err16 = { - instancePath: instancePath + '/owner/' + i1, - schemaPath: - '#/anyOf/0/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[0].allOf[0].properties.owner.items - .type, - parentSchema: - schema176.anyOf[0].allOf[0].properties.owner.items, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - const err17 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema176.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.owner, - data: data8, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - const err18 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema176.anyOf[0].allOf[0].type, - parentSchema: schema176.anyOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data11 = data.type; - const _errs28 = errors; - if ('cloud instantiable' !== data11) { - const err19 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/0/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'cloud instantiable' }, - message: 'must be equal to constant', - schema: 'cloud instantiable', - parentSchema: schema176.anyOf[0].allOf[1].properties.type, - data: data11, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.instantiateUrl !== undefined) { - let data12 = data.instantiateUrl; - const _errs29 = errors; - if (errors === _errs29) { - if (errors === _errs29) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - const err20 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema176.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - } else { - const err21 = { - instancePath: instancePath + '/instantiateUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema176.anyOf[0].allOf[1].properties.instantiateUrl, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data.services !== undefined) { - let data13 = data.services; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data13)) { - var valid8 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs36 = errors; - if (errors === _errs36) { - if (errors === _errs36) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - const err22 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } else { - const err23 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[0].allOf[1].properties.services.items - .properties.serviceType.type, - parentSchema: - schema176.anyOf[0].allOf[1].properties.services.items - .properties.serviceType, - data: data15, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } - } - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs38 = errors; - if (typeof data16 !== 'string') { - const err24 = { - instancePath: - instancePath + '/services/' + i2 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[0].allOf[1].properties.services.items - .properties.serviceId.type, - parentSchema: - schema176.anyOf[0].allOf[1].properties.services.items - .properties.serviceId, - data: data16, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs40 = errors; - if (typeof data17 !== 'string') { - const err25 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.type, - parentSchema: - schema176.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - const err26 = { - instancePath: - instancePath + - '/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema176.anyOf[0].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema176.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection.enum, - parentSchema: - schema176.anyOf[0].allOf[1].properties.services.items - .properties.serviceDirection, - data: data17, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } - var valid9 = _errs40 === errors; - } else { - var valid9 = true; - } - } - } - } else { - const err27 = { - instancePath: instancePath + '/services/' + i2, - schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[0].allOf[1].properties.services.items.type, - parentSchema: - schema176.anyOf[0].allOf[1].properties.services.items, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - const err28 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema176.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema176.anyOf[0].allOf[1].properties.services, - data: data13, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema176.anyOf[0].allOf[1].type, - parentSchema: schema176.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid1 = _errs26 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs42 = errors; - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing3; - if ( - (data.url === undefined && (missing3 = 'url')) || - (data.type === undefined && (missing3 = 'type')) || - (data.name === undefined && (missing3 = 'name')) || - (data.isPublic === undefined && (missing3 = 'isPublic')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: schema176.anyOf[1].allOf[0].required, - parentSchema: schema176.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.url !== undefined) { - let data18 = data.url; - const _errs45 = errors; - if (errors === _errs45) { - if (errors === _errs45) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - const err31 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema176.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - } else { - const err32 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/1/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.url, - data: data18, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.name !== undefined) { - let data19 = data.name; - const _errs47 = errors; - if (typeof data19 !== 'string') { - const err33 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/1/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.name, - data: data19, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - var valid11 = _errs47 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.description !== undefined) { - let data20 = data.description; - const _errs49 = errors; - if (typeof data20 !== 'string') { - const err34 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/1/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.description, - data: data20, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - var valid11 = _errs49 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.type !== undefined) { - let data21 = data.type; - const _errs51 = errors; - if (typeof data21 !== 'string') { - const err35 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } - if ( - !( - data21 === 'device' || - data21 === 'group' || - data21 === 'edge instantiable' || - data21 === 'cloud instantiable' - ) - ) { - const err36 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema176.anyOf[1].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema176.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema176.anyOf[1].allOf[0].properties.type, - data: data21, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - var valid11 = _errs51 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.isPublic !== undefined) { - let data22 = data.isPublic; - const _errs53 = errors; - if (typeof data22 !== 'boolean') { - const err37 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema176.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.isPublic, - data: data22, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - var valid11 = _errs53 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.viewer !== undefined) { - let data23 = data.viewer; - const _errs55 = errors; - if (errors === _errs55) { - if (Array.isArray(data23)) { - var valid12 = true; - const len3 = data23.length; - for (let i3 = 0; i3 < len3; i3++) { - let data24 = data23[i3]; - const _errs57 = errors; - if (errors === _errs57) { - if ( - data24 && - typeof data24 == 'object' && - !Array.isArray(data24) - ) { - let missing4; - if (data24.url === undefined && (missing4 = 'url')) { - const err38 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: - "must have required property '" + missing4 + "'", - schema: - schema176.anyOf[1].allOf[0].properties.viewer.items - .required, - parentSchema: - schema176.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data24.url !== undefined) { - let data25 = data24.url; - const _errs59 = errors; - if (errors === _errs59) { - if (errors === _errs59) { - if (typeof data25 === 'string') { - if (!formats0(data25)) { - const err39 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - } else { - const err40 = { - instancePath: - instancePath + '/viewer/' + i3 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[1].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema176.anyOf[1].allOf[0].properties - .viewer.items.properties.url, - data: data25, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - } - } - } - } - } else { - const err41 = { - instancePath: instancePath + '/viewer/' + i3, - schemaPath: - '#/anyOf/1/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[1].allOf[0].properties.viewer.items - .type, - parentSchema: - schema176.anyOf[1].allOf[0].properties.viewer.items, - data: data24, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } - var valid12 = _errs57 === errors; - if (!valid12) { - break; - } - } - } else { - const err42 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema176.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.viewer, - data: data23, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - var valid11 = _errs55 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.owner !== undefined) { - let data26 = data.owner; - const _errs61 = errors; - if (errors === _errs61) { - if (Array.isArray(data26)) { - var valid14 = true; - const len4 = data26.length; - for (let i4 = 0; i4 < len4; i4++) { - let data27 = data26[i4]; - const _errs63 = errors; - if (errors === _errs63) { - if ( - data27 && - typeof data27 == 'object' && - !Array.isArray(data27) - ) { - let missing5; - if (data27.url === undefined && (missing5 = 'url')) { - const err43 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: - "must have required property '" + missing5 + "'", - schema: - schema176.anyOf[1].allOf[0].properties.owner.items - .required, - parentSchema: - schema176.anyOf[1].allOf[0].properties.owner - .items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } else { - if (data27.url !== undefined) { - let data28 = data27.url; - const _errs65 = errors; - if (errors === _errs65) { - if (errors === _errs65) { - if (typeof data28 === 'string') { - if (!formats0(data28)) { - const err44 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } else { - const err45 = { - instancePath: - instancePath + '/owner/' + i4 + '/url', - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[1].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema176.anyOf[1].allOf[0].properties - .owner.items.properties.url, - data: data28, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } - } - } - } - } - } else { - const err46 = { - instancePath: instancePath + '/owner/' + i4, - schemaPath: - '#/anyOf/1/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[1].allOf[0].properties.owner.items - .type, - parentSchema: - schema176.anyOf[1].allOf[0].properties.owner.items, - data: data27, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - var valid14 = _errs63 === errors; - if (!valid14) { - break; - } - } - } else { - const err47 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema176.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.owner, - data: data26, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid11 = _errs61 === errors; - } else { - var valid11 = true; - } - } - } - } - } - } - } - } - } else { - const err48 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema176.anyOf[1].allOf[0].type, - parentSchema: schema176.anyOf[1].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } - } - var valid10 = _errs43 === errors; - if (valid10) { - const _errs67 = errors; - if (errors === _errs67) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data29 = data.type; - const _errs69 = errors; - if ('device' !== data29) { - const err49 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/1/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: schema176.anyOf[1].allOf[1].properties.type, - data: data29, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid16 = _errs69 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.connected !== undefined) { - let data30 = data.connected; - const _errs70 = errors; - if (typeof data30 !== 'boolean') { - const err50 = { - instancePath: instancePath + '/connected', - schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema176.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema176.anyOf[1].allOf[1].properties.connected, - data: data30, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - var valid16 = _errs70 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.announcedAvailability !== undefined) { - let data31 = data.announcedAvailability; - const _errs72 = errors; - if (errors === _errs72) { - if (Array.isArray(data31)) { - var valid17 = true; - const len5 = data31.length; - for (let i5 = 0; i5 < len5; i5++) { - let data32 = data31[i5]; - const _errs74 = errors; - if (errors === _errs74) { - if ( - data32 && - typeof data32 == 'object' && - !Array.isArray(data32) - ) { - if (data32.start !== undefined) { - let data33 = data32.start; - const _errs76 = errors; - if (errors === _errs76) { - if (errors === _errs76) { - if (typeof data33 === 'string') { - if (!formats22.validate(data33)) { - const err51 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema176.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } else { - const err52 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/start', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start - .type, - parentSchema: - schema176.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.start, - data: data33, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } - } - } - var valid18 = _errs76 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data32.end !== undefined) { - let data34 = data32.end; - const _errs78 = errors; - if (errors === _errs78) { - if (errors === _errs78) { - if (typeof data34 === 'string') { - if (!formats22.validate(data34)) { - const err53 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema176.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } else { - const err54 = { - instancePath: - instancePath + - '/announcedAvailability/' + - i5 + - '/end', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end - .type, - parentSchema: - schema176.anyOf[1].allOf[1].properties - .announcedAvailability.items.properties.end, - data: data34, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } else { - const err55 = { - instancePath: instancePath + '/announcedAvailability/' + i5, - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[1].allOf[1].properties.announcedAvailability - .items.type, - parentSchema: - schema176.anyOf[1].allOf[1].properties.announcedAvailability - .items, - data: data32, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } - } - var valid17 = _errs74 === errors; - if (!valid17) { - break; - } - } - } else { - const err56 = { - instancePath: instancePath + '/announcedAvailability', - schemaPath: - '#/anyOf/1/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema176.anyOf[1].allOf[1].properties.announcedAvailability.type, - parentSchema: - schema176.anyOf[1].allOf[1].properties.announcedAvailability, - data: data31, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - } - var valid16 = _errs72 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.experiment !== undefined) { - let data35 = data.experiment; - const _errs80 = errors; - if (errors === _errs80) { - if (errors === _errs80) { - if (typeof data35 === 'string') { - if (!formats0(data35)) { - const err57 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - } else { - const err58 = { - instancePath: instancePath + '/experiment', - schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema176.anyOf[1].allOf[1].properties.experiment, - data: data35, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - } - } - var valid16 = _errs80 === errors; - } else { - var valid16 = true; - } - if (valid16) { - if (data.services !== undefined) { - let data36 = data.services; - const _errs82 = errors; - if (errors === _errs82) { - if (Array.isArray(data36)) { - var valid19 = true; - const len6 = data36.length; - for (let i6 = 0; i6 < len6; i6++) { - let data37 = data36[i6]; - const _errs84 = errors; - if (errors === _errs84) { - if ( - data37 && - typeof data37 == 'object' && - !Array.isArray(data37) - ) { - if (data37.serviceType !== undefined) { - let data38 = data37.serviceType; - const _errs87 = errors; - if (errors === _errs87) { - if (errors === _errs87) { - if (typeof data38 === 'string') { - if (!formats0(data38)) { - const err59 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[1].allOf[1].properties - .services.items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } else { - const err60 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceType', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[1].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema176.anyOf[1].allOf[1].properties.services - .items.properties.serviceType, - data: data38, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - } - } - } - var valid20 = _errs87 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceId !== undefined) { - let data39 = data37.serviceId; - const _errs89 = errors; - if (typeof data39 !== 'string') { - const err61 = { - instancePath: - instancePath + '/services/' + i6 + '/serviceId', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[1].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema176.anyOf[1].allOf[1].properties.services - .items.properties.serviceId, - data: data39, - }; - if (vErrors === null) { - vErrors = [err61]; - } else { - vErrors.push(err61); - } - errors++; - } - var valid20 = _errs89 === errors; - } else { - var valid20 = true; - } - if (valid20) { - if (data37.serviceDirection !== undefined) { - let data40 = data37.serviceDirection; - const _errs91 = errors; - if (typeof data40 !== 'string') { - const err62 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema176.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err62]; - } else { - vErrors.push(err62); - } - errors++; - } - if ( - !( - data40 === 'consumer' || - data40 === 'producer' || - data40 === 'prosumer' - ) - ) { - const err63 = { - instancePath: - instancePath + - '/services/' + - i6 + - '/serviceDirection', - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema176.anyOf[1].allOf[1].properties - .services.items.properties.serviceDirection - .enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema176.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema176.anyOf[1].allOf[1].properties.services - .items.properties.serviceDirection, - data: data40, - }; - if (vErrors === null) { - vErrors = [err63]; - } else { - vErrors.push(err63); - } - errors++; - } - var valid20 = _errs91 === errors; - } else { - var valid20 = true; - } - } - } - } else { - const err64 = { - instancePath: instancePath + '/services/' + i6, - schemaPath: - '#/anyOf/1/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[1].allOf[1].properties.services.items - .type, - parentSchema: - schema176.anyOf[1].allOf[1].properties.services.items, - data: data37, - }; - if (vErrors === null) { - vErrors = [err64]; - } else { - vErrors.push(err64); - } - errors++; - } - } - var valid19 = _errs84 === errors; - if (!valid19) { - break; - } - } - } else { - const err65 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/1/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema176.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema176.anyOf[1].allOf[1].properties.services, - data: data36, - }; - if (vErrors === null) { - vErrors = [err65]; - } else { - vErrors.push(err65); - } - errors++; - } - } - var valid16 = _errs82 === errors; - } else { - var valid16 = true; - } - } - } - } - } - } else { - const err66 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema176.anyOf[1].allOf[1].type, - parentSchema: schema176.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err66]; - } else { - vErrors.push(err66); - } - errors++; - } - } - var valid10 = _errs67 === errors; - } - var _valid0 = _errs42 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs93 = errors; - const _errs94 = errors; - if (errors === _errs94) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.url === undefined && (missing6 = 'url')) || - (data.type === undefined && (missing6 = 'type')) || - (data.name === undefined && (missing6 = 'name')) || - (data.isPublic === undefined && (missing6 = 'isPublic')) - ) { - const err67 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema176.anyOf[2].allOf[0].required, - parentSchema: schema176.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err67]; - } else { - vErrors.push(err67); - } - errors++; - } else { - if (data.url !== undefined) { - let data41 = data.url; - const _errs96 = errors; - if (errors === _errs96) { - if (errors === _errs96) { - if (typeof data41 === 'string') { - if (!formats0(data41)) { - const err68 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema176.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err68]; - } else { - vErrors.push(err68); - } - errors++; - } - } else { - const err69 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/2/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.url, - data: data41, - }; - if (vErrors === null) { - vErrors = [err69]; - } else { - vErrors.push(err69); - } - errors++; - } - } - } - var valid22 = _errs96 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.name !== undefined) { - let data42 = data.name; - const _errs98 = errors; - if (typeof data42 !== 'string') { - const err70 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/2/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.name, - data: data42, - }; - if (vErrors === null) { - vErrors = [err70]; - } else { - vErrors.push(err70); - } - errors++; - } - var valid22 = _errs98 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.description !== undefined) { - let data43 = data.description; - const _errs100 = errors; - if (typeof data43 !== 'string') { - const err71 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/2/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.description, - data: data43, - }; - if (vErrors === null) { - vErrors = [err71]; - } else { - vErrors.push(err71); - } - errors++; - } - var valid22 = _errs100 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.type !== undefined) { - let data44 = data.type; - const _errs102 = errors; - if (typeof data44 !== 'string') { - const err72 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err72]; - } else { - vErrors.push(err72); - } - errors++; - } - if ( - !( - data44 === 'device' || - data44 === 'group' || - data44 === 'edge instantiable' || - data44 === 'cloud instantiable' - ) - ) { - const err73 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema176.anyOf[2].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema176.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema176.anyOf[2].allOf[0].properties.type, - data: data44, - }; - if (vErrors === null) { - vErrors = [err73]; - } else { - vErrors.push(err73); - } - errors++; - } - var valid22 = _errs102 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.isPublic !== undefined) { - let data45 = data.isPublic; - const _errs104 = errors; - if (typeof data45 !== 'boolean') { - const err74 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema176.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.isPublic, - data: data45, - }; - if (vErrors === null) { - vErrors = [err74]; - } else { - vErrors.push(err74); - } - errors++; - } - var valid22 = _errs104 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.viewer !== undefined) { - let data46 = data.viewer; - const _errs106 = errors; - if (errors === _errs106) { - if (Array.isArray(data46)) { - var valid23 = true; - const len7 = data46.length; - for (let i7 = 0; i7 < len7; i7++) { - let data47 = data46[i7]; - const _errs108 = errors; - if (errors === _errs108) { - if ( - data47 && - typeof data47 == 'object' && - !Array.isArray(data47) - ) { - let missing7; - if (data47.url === undefined && (missing7 = 'url')) { - const err75 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: - "must have required property '" + missing7 + "'", - schema: - schema176.anyOf[2].allOf[0].properties.viewer - .items.required, - parentSchema: - schema176.anyOf[2].allOf[0].properties.viewer - .items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err75]; - } else { - vErrors.push(err75); - } - errors++; - } else { - if (data47.url !== undefined) { - let data48 = data47.url; - const _errs110 = errors; - if (errors === _errs110) { - if (errors === _errs110) { - if (typeof data48 === 'string') { - if (!formats0(data48)) { - const err76 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err76]; - } else { - vErrors.push(err76); - } - errors++; - } - } else { - const err77 = { - instancePath: - instancePath + '/viewer/' + i7 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[2].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema176.anyOf[2].allOf[0].properties - .viewer.items.properties.url, - data: data48, - }; - if (vErrors === null) { - vErrors = [err77]; - } else { - vErrors.push(err77); - } - errors++; - } - } - } - } - } - } else { - const err78 = { - instancePath: instancePath + '/viewer/' + i7, - schemaPath: - '#/anyOf/2/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[2].allOf[0].properties.viewer.items - .type, - parentSchema: - schema176.anyOf[2].allOf[0].properties.viewer.items, - data: data47, - }; - if (vErrors === null) { - vErrors = [err78]; - } else { - vErrors.push(err78); - } - errors++; - } - } - var valid23 = _errs108 === errors; - if (!valid23) { - break; - } - } - } else { - const err79 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema176.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.viewer, - data: data46, - }; - if (vErrors === null) { - vErrors = [err79]; - } else { - vErrors.push(err79); - } - errors++; - } - } - var valid22 = _errs106 === errors; - } else { - var valid22 = true; - } - if (valid22) { - if (data.owner !== undefined) { - let data49 = data.owner; - const _errs112 = errors; - if (errors === _errs112) { - if (Array.isArray(data49)) { - var valid25 = true; - const len8 = data49.length; - for (let i8 = 0; i8 < len8; i8++) { - let data50 = data49[i8]; - const _errs114 = errors; - if (errors === _errs114) { - if ( - data50 && - typeof data50 == 'object' && - !Array.isArray(data50) - ) { - let missing8; - if (data50.url === undefined && (missing8 = 'url')) { - const err80 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: - "must have required property '" + - missing8 + - "'", - schema: - schema176.anyOf[2].allOf[0].properties.owner - .items.required, - parentSchema: - schema176.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err80]; - } else { - vErrors.push(err80); - } - errors++; - } else { - if (data50.url !== undefined) { - let data51 = data50.url; - const _errs116 = errors; - if (errors === _errs116) { - if (errors === _errs116) { - if (typeof data51 === 'string') { - if (!formats0(data51)) { - const err81 = { - instancePath: - instancePath + - '/owner/' + - i8 + - '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err81]; - } else { - vErrors.push(err81); - } - errors++; - } - } else { - const err82 = { - instancePath: - instancePath + '/owner/' + i8 + '/url', - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[2].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema176.anyOf[2].allOf[0].properties - .owner.items.properties.url, - data: data51, - }; - if (vErrors === null) { - vErrors = [err82]; - } else { - vErrors.push(err82); - } - errors++; - } - } - } - } - } - } else { - const err83 = { - instancePath: instancePath + '/owner/' + i8, - schemaPath: - '#/anyOf/2/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[2].allOf[0].properties.owner.items - .type, - parentSchema: - schema176.anyOf[2].allOf[0].properties.owner - .items, - data: data50, - }; - if (vErrors === null) { - vErrors = [err83]; - } else { - vErrors.push(err83); - } - errors++; - } - } - var valid25 = _errs114 === errors; - if (!valid25) { - break; - } - } - } else { - const err84 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema176.anyOf[2].allOf[0].properties.owner.type, - parentSchema: - schema176.anyOf[2].allOf[0].properties.owner, - data: data49, - }; - if (vErrors === null) { - vErrors = [err84]; - } else { - vErrors.push(err84); - } - errors++; - } - } - var valid22 = _errs112 === errors; - } else { - var valid22 = true; - } - } - } - } - } - } - } - } - } else { - const err85 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema176.anyOf[2].allOf[0].type, - parentSchema: schema176.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err85]; - } else { - vErrors.push(err85); - } - errors++; - } - } - var valid21 = _errs94 === errors; - if (valid21) { - const _errs118 = errors; - if (errors === _errs118) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - if (data.type !== undefined) { - let data52 = data.type; - const _errs120 = errors; - if ('edge instantiable' !== data52) { - const err86 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/2/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'edge instantiable' }, - message: 'must be equal to constant', - schema: 'edge instantiable', - parentSchema: schema176.anyOf[2].allOf[1].properties.type, - data: data52, - }; - if (vErrors === null) { - vErrors = [err86]; - } else { - vErrors.push(err86); - } - errors++; - } - var valid27 = _errs120 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.codeUrl !== undefined) { - let data53 = data.codeUrl; - const _errs121 = errors; - if (errors === _errs121) { - if (errors === _errs121) { - if (typeof data53 === 'string') { - if (!formats0(data53)) { - const err87 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema176.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err87]; - } else { - vErrors.push(err87); - } - errors++; - } - } else { - const err88 = { - instancePath: instancePath + '/codeUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema176.anyOf[2].allOf[1].properties.codeUrl, - data: data53, - }; - if (vErrors === null) { - vErrors = [err88]; - } else { - vErrors.push(err88); - } - errors++; - } - } - } - var valid27 = _errs121 === errors; - } else { - var valid27 = true; - } - if (valid27) { - if (data.services !== undefined) { - let data54 = data.services; - const _errs123 = errors; - if (errors === _errs123) { - if (Array.isArray(data54)) { - var valid28 = true; - const len9 = data54.length; - for (let i9 = 0; i9 < len9; i9++) { - let data55 = data54[i9]; - const _errs125 = errors; - if (errors === _errs125) { - if ( - data55 && - typeof data55 == 'object' && - !Array.isArray(data55) - ) { - if (data55.serviceType !== undefined) { - let data56 = data55.serviceType; - const _errs128 = errors; - if (errors === _errs128) { - if (errors === _errs128) { - if (typeof data56 === 'string') { - if (!formats0(data56)) { - const err89 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err89]; - } else { - vErrors.push(err89); - } - errors++; - } - } else { - const err90 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceType', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[2].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema176.anyOf[2].allOf[1].properties.services - .items.properties.serviceType, - data: data56, - }; - if (vErrors === null) { - vErrors = [err90]; - } else { - vErrors.push(err90); - } - errors++; - } - } - } - var valid29 = _errs128 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceId !== undefined) { - let data57 = data55.serviceId; - const _errs130 = errors; - if (typeof data57 !== 'string') { - const err91 = { - instancePath: - instancePath + '/services/' + i9 + '/serviceId', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[2].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema176.anyOf[2].allOf[1].properties.services - .items.properties.serviceId, - data: data57, - }; - if (vErrors === null) { - vErrors = [err91]; - } else { - vErrors.push(err91); - } - errors++; - } - var valid29 = _errs130 === errors; - } else { - var valid29 = true; - } - if (valid29) { - if (data55.serviceDirection !== undefined) { - let data58 = data55.serviceDirection; - const _errs132 = errors; - if (typeof data58 !== 'string') { - const err92 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.type, - parentSchema: - schema176.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err92]; - } else { - vErrors.push(err92); - } - errors++; - } - if ( - !( - data58 === 'consumer' || - data58 === 'producer' || - data58 === 'prosumer' - ) - ) { - const err93 = { - instancePath: - instancePath + - '/services/' + - i9 + - '/serviceDirection', - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema176.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema176.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection.enum, - parentSchema: - schema176.anyOf[2].allOf[1].properties.services - .items.properties.serviceDirection, - data: data58, - }; - if (vErrors === null) { - vErrors = [err93]; - } else { - vErrors.push(err93); - } - errors++; - } - var valid29 = _errs132 === errors; - } else { - var valid29 = true; - } - } - } - } else { - const err94 = { - instancePath: instancePath + '/services/' + i9, - schemaPath: - '#/anyOf/2/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[2].allOf[1].properties.services.items - .type, - parentSchema: - schema176.anyOf[2].allOf[1].properties.services.items, - data: data55, - }; - if (vErrors === null) { - vErrors = [err94]; - } else { - vErrors.push(err94); - } - errors++; - } - } - var valid28 = _errs125 === errors; - if (!valid28) { - break; - } - } - } else { - const err95 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/2/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema176.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema176.anyOf[2].allOf[1].properties.services, - data: data54, - }; - if (vErrors === null) { - vErrors = [err95]; - } else { - vErrors.push(err95); - } - errors++; - } - } - var valid27 = _errs123 === errors; - } else { - var valid27 = true; - } - } - } - } else { - const err96 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema176.anyOf[2].allOf[1].type, - parentSchema: schema176.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err96]; - } else { - vErrors.push(err96); - } - errors++; - } - } - var valid21 = _errs118 === errors; - } - var _valid0 = _errs93 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs134 = errors; - const _errs135 = errors; - if (errors === _errs135) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if ( - (data.url === undefined && (missing9 = 'url')) || - (data.type === undefined && (missing9 = 'type')) || - (data.name === undefined && (missing9 = 'name')) || - (data.isPublic === undefined && (missing9 = 'isPublic')) - ) { - const err97 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema176.anyOf[3].allOf[0].required, - parentSchema: schema176.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err97]; - } else { - vErrors.push(err97); - } - errors++; - } else { - if (data.url !== undefined) { - let data59 = data.url; - const _errs137 = errors; - if (errors === _errs137) { - if (errors === _errs137) { - if (typeof data59 === 'string') { - if (!formats0(data59)) { - const err98 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema176.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err98]; - } else { - vErrors.push(err98); - } - errors++; - } - } else { - const err99 = { - instancePath: instancePath + '/url', - schemaPath: '#/anyOf/3/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema176.anyOf[3].allOf[0].properties.url, - data: data59, - }; - if (vErrors === null) { - vErrors = [err99]; - } else { - vErrors.push(err99); - } - errors++; - } - } - } - var valid31 = _errs137 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.name !== undefined) { - let data60 = data.name; - const _errs139 = errors; - if (typeof data60 !== 'string') { - const err100 = { - instancePath: instancePath + '/name', - schemaPath: '#/anyOf/3/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema176.anyOf[3].allOf[0].properties.name, - data: data60, - }; - if (vErrors === null) { - vErrors = [err100]; - } else { - vErrors.push(err100); - } - errors++; - } - var valid31 = _errs139 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.description !== undefined) { - let data61 = data.description; - const _errs141 = errors; - if (typeof data61 !== 'string') { - const err101 = { - instancePath: instancePath + '/description', - schemaPath: '#/anyOf/3/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema176.anyOf[3].allOf[0].properties.description, - data: data61, - }; - if (vErrors === null) { - vErrors = [err101]; - } else { - vErrors.push(err101); - } - errors++; - } - var valid31 = _errs141 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.type !== undefined) { - let data62 = data.type; - const _errs143 = errors; - if (typeof data62 !== 'string') { - const err102 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema176.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema176.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err102]; - } else { - vErrors.push(err102); - } - errors++; - } - if ( - !( - data62 === 'device' || - data62 === 'group' || - data62 === 'edge instantiable' || - data62 === 'cloud instantiable' - ) - ) { - const err103 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema176.anyOf[3].allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema176.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema176.anyOf[3].allOf[0].properties.type, - data: data62, - }; - if (vErrors === null) { - vErrors = [err103]; - } else { - vErrors.push(err103); - } - errors++; - } - var valid31 = _errs143 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.isPublic !== undefined) { - let data63 = data.isPublic; - const _errs145 = errors; - if (typeof data63 !== 'boolean') { - const err104 = { - instancePath: instancePath + '/isPublic', - schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema176.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema176.anyOf[3].allOf[0].properties.isPublic, - data: data63, - }; - if (vErrors === null) { - vErrors = [err104]; - } else { - vErrors.push(err104); - } - errors++; - } - var valid31 = _errs145 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.viewer !== undefined) { - let data64 = data.viewer; - const _errs147 = errors; - if (errors === _errs147) { - if (Array.isArray(data64)) { - var valid32 = true; - const len10 = data64.length; - for (let i10 = 0; i10 < len10; i10++) { - let data65 = data64[i10]; - const _errs149 = errors; - if (errors === _errs149) { - if ( - data65 && - typeof data65 == 'object' && - !Array.isArray(data65) - ) { - let missing10; - if (data65.url === undefined && (missing10 = 'url')) { - const err105 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: - "must have required property '" + - missing10 + - "'", - schema: - schema176.anyOf[3].allOf[0].properties.viewer - .items.required, - parentSchema: - schema176.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err105]; - } else { - vErrors.push(err105); - } - errors++; - } else { - if (data65.url !== undefined) { - let data66 = data65.url; - const _errs151 = errors; - if (errors === _errs151) { - if (errors === _errs151) { - if (typeof data66 === 'string') { - if (!formats0(data66)) { - const err106 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err106]; - } else { - vErrors.push(err106); - } - errors++; - } - } else { - const err107 = { - instancePath: - instancePath + - '/viewer/' + - i10 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[3].allOf[0].properties - .viewer.items.properties.url.type, - parentSchema: - schema176.anyOf[3].allOf[0].properties - .viewer.items.properties.url, - data: data66, - }; - if (vErrors === null) { - vErrors = [err107]; - } else { - vErrors.push(err107); - } - errors++; - } - } - } - } - } - } else { - const err108 = { - instancePath: instancePath + '/viewer/' + i10, - schemaPath: - '#/anyOf/3/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[3].allOf[0].properties.viewer - .items.type, - parentSchema: - schema176.anyOf[3].allOf[0].properties.viewer - .items, - data: data65, - }; - if (vErrors === null) { - vErrors = [err108]; - } else { - vErrors.push(err108); - } - errors++; - } - } - var valid32 = _errs149 === errors; - if (!valid32) { - break; - } - } - } else { - const err109 = { - instancePath: instancePath + '/viewer', - schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema176.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: - schema176.anyOf[3].allOf[0].properties.viewer, - data: data64, - }; - if (vErrors === null) { - vErrors = [err109]; - } else { - vErrors.push(err109); - } - errors++; - } - } - var valid31 = _errs147 === errors; - } else { - var valid31 = true; - } - if (valid31) { - if (data.owner !== undefined) { - let data67 = data.owner; - const _errs153 = errors; - if (errors === _errs153) { - if (Array.isArray(data67)) { - var valid34 = true; - const len11 = data67.length; - for (let i11 = 0; i11 < len11; i11++) { - let data68 = data67[i11]; - const _errs155 = errors; - if (errors === _errs155) { - if ( - data68 && - typeof data68 == 'object' && - !Array.isArray(data68) - ) { - let missing11; - if ( - data68.url === undefined && - (missing11 = 'url') - ) { - const err110 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: - "must have required property '" + - missing11 + - "'", - schema: - schema176.anyOf[3].allOf[0].properties.owner - .items.required, - parentSchema: - schema176.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err110]; - } else { - vErrors.push(err110); - } - errors++; - } else { - if (data68.url !== undefined) { - let data69 = data68.url; - const _errs157 = errors; - if (errors === _errs157) { - if (errors === _errs157) { - if (typeof data69 === 'string') { - if (!formats0(data69)) { - const err111 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[3].allOf[0] - .properties.owner.items.properties - .url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err111]; - } else { - vErrors.push(err111); - } - errors++; - } - } else { - const err112 = { - instancePath: - instancePath + - '/owner/' + - i11 + - '/url', - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[3].allOf[0].properties - .owner.items.properties.url.type, - parentSchema: - schema176.anyOf[3].allOf[0].properties - .owner.items.properties.url, - data: data69, - }; - if (vErrors === null) { - vErrors = [err112]; - } else { - vErrors.push(err112); - } - errors++; - } - } - } - } - } - } else { - const err113 = { - instancePath: instancePath + '/owner/' + i11, - schemaPath: - '#/anyOf/3/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[3].allOf[0].properties.owner - .items.type, - parentSchema: - schema176.anyOf[3].allOf[0].properties.owner - .items, - data: data68, - }; - if (vErrors === null) { - vErrors = [err113]; - } else { - vErrors.push(err113); - } - errors++; - } - } - var valid34 = _errs155 === errors; - if (!valid34) { - break; - } - } - } else { - const err114 = { - instancePath: instancePath + '/owner', - schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema176.anyOf[3].allOf[0].properties.owner.type, - parentSchema: - schema176.anyOf[3].allOf[0].properties.owner, - data: data67, - }; - if (vErrors === null) { - vErrors = [err114]; - } else { - vErrors.push(err114); - } - errors++; - } - } - var valid31 = _errs153 === errors; - } else { - var valid31 = true; - } - } - } - } - } - } - } - } - } else { - const err115 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema176.anyOf[3].allOf[0].type, - parentSchema: schema176.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err115]; - } else { - vErrors.push(err115); - } - errors++; - } - } - var valid30 = _errs135 === errors; - if (valid30) { - const _errs159 = errors; - if (errors === _errs159) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if (data.devices === undefined && (missing12 = 'devices')) { - const err116 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema176.anyOf[3].allOf[1].required, - parentSchema: schema176.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err116]; - } else { - vErrors.push(err116); - } - errors++; - } else { - if (data.type !== undefined) { - let data70 = data.type; - const _errs161 = errors; - if ('group' !== data70) { - const err117 = { - instancePath: instancePath + '/type', - schemaPath: '#/anyOf/3/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'group' }, - message: 'must be equal to constant', - schema: 'group', - parentSchema: schema176.anyOf[3].allOf[1].properties.type, - data: data70, - }; - if (vErrors === null) { - vErrors = [err117]; - } else { - vErrors.push(err117); - } - errors++; - } - var valid36 = _errs161 === errors; - } else { - var valid36 = true; - } - if (valid36) { - if (data.devices !== undefined) { - let data71 = data.devices; - const _errs162 = errors; - if (errors === _errs162) { - if (Array.isArray(data71)) { - var valid37 = true; - const len12 = data71.length; - for (let i12 = 0; i12 < len12; i12++) { - let data72 = data71[i12]; - const _errs164 = errors; - if (errors === _errs164) { - if ( - data72 && - typeof data72 == 'object' && - !Array.isArray(data72) - ) { - let missing13; - if (data72.url === undefined && (missing13 = 'url')) { - const err118 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing13 }, - message: - "must have required property '" + missing13 + "'", - schema: - schema176.anyOf[3].allOf[1].properties.devices.items - .required, - parentSchema: - schema176.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err118]; - } else { - vErrors.push(err118); - } - errors++; - } else { - if (data72.url !== undefined) { - let data73 = data72.url; - const _errs166 = errors; - if (errors === _errs166) { - if (errors === _errs166) { - if (typeof data73 === 'string') { - if (!formats0(data73)) { - const err119 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema176.anyOf[3].allOf[1].properties - .devices.items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err119]; - } else { - vErrors.push(err119); - } - errors++; - } - } else { - const err120 = { - instancePath: - instancePath + '/devices/' + i12 + '/url', - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema176.anyOf[3].allOf[1].properties.devices - .items.properties.url.type, - parentSchema: - schema176.anyOf[3].allOf[1].properties.devices - .items.properties.url, - data: data73, - }; - if (vErrors === null) { - vErrors = [err120]; - } else { - vErrors.push(err120); - } - errors++; - } - } - } - } - } - } else { - const err121 = { - instancePath: instancePath + '/devices/' + i12, - schemaPath: - '#/anyOf/3/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema176.anyOf[3].allOf[1].properties.devices.items - .type, - parentSchema: - schema176.anyOf[3].allOf[1].properties.devices.items, - data: data72, - }; - if (vErrors === null) { - vErrors = [err121]; - } else { - vErrors.push(err121); - } - errors++; - } - } - var valid37 = _errs164 === errors; - if (!valid37) { - break; - } - } - } else { - const err122 = { - instancePath: instancePath + '/devices', - schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema176.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema176.anyOf[3].allOf[1].properties.devices, - data: data71, - }; - if (vErrors === null) { - vErrors = [err122]; - } else { - vErrors.push(err122); - } - errors++; - } - } - var valid36 = _errs162 === errors; - } else { - var valid36 = true; - } - } - } - } else { - const err123 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema176.anyOf[3].allOf[1].type, - parentSchema: schema176.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err123]; - } else { - vErrors.push(err123); - } - errors++; - } - } - var valid30 = _errs159 === errors; - } - var _valid0 = _errs134 === errors; - valid0 = valid0 || _valid0; - } - } - } - if (!valid0) { - const err124 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema176.anyOf, - parentSchema: schema176, - data, - }; - if (vErrors === null) { - vErrors = [err124]; - } else { - vErrors.push(err124); - } - errors++; - validate191.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate191.errors = vErrors; - return errors === 0; -} -exports.validateInstantiateDeviceResponse201Request = validate192; -const schema177 = { - type: 'object', - properties: { - instance: { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - deviceToken: { type: 'string' }, - }, - required: ['instance', 'deviceToken'], - 'x-standalone': false, - 'x-name': 'instantiateDeviceResponse201Request', - 'x-location': - '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate192( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.instance === undefined && (missing0 = 'instance')) || - (data.deviceToken === undefined && (missing0 = 'deviceToken')) - ) { - validate192.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema177.required, - parentSchema: schema177, - data, - }, - ]; - return false; - } else { - if (data.instance !== undefined) { - let data0 = data.instance; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing1; - if ( - (data0.type === undefined && (missing1 = 'type')) || - (data0.name === undefined && (missing1 = 'name')) || - (data0.isPublic === undefined && (missing1 = 'isPublic')) - ) { - validate192.errors = [ - { - instancePath: instancePath + '/instance', - schemaPath: '#/properties/instance/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema177.properties.instance.allOf[0].required, - parentSchema: schema177.properties.instance.allOf[0], - data: data0, - }, - ]; - return false; - } else { - if (data0.name !== undefined) { - let data1 = data0.name; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate192.errors = [ - { - instancePath: instancePath + '/instance/name', - schemaPath: '#/properties/instance/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema177.properties.instance.allOf[0].properties.name.type, - parentSchema: - schema177.properties.instance.allOf[0].properties.name, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.description !== undefined) { - let data2 = data0.description; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate192.errors = [ - { - instancePath: instancePath + '/instance/description', - schemaPath: - '#/properties/instance/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema177.properties.instance.allOf[0].properties.description - .type, - parentSchema: - schema177.properties.instance.allOf[0].properties.description, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.type !== undefined) { - let data3 = data0.type; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate192.errors = [ - { - instancePath: instancePath + '/instance/type', - schemaPath: - '#/properties/instance/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema177.properties.instance.allOf[0].properties.type.type, - parentSchema: - schema177.properties.instance.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'device' || - data3 === 'group' || - data3 === 'edge instantiable' || - data3 === 'cloud instantiable' - ) - ) { - validate192.errors = [ - { - instancePath: instancePath + '/instance/type', - schemaPath: - '#/properties/instance/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema177.properties.instance.allOf[0].properties.type - .enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema177.properties.instance.allOf[0].properties.type.enum, - parentSchema: - schema177.properties.instance.allOf[0].properties.type, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.isPublic !== undefined) { - let data4 = data0.isPublic; - const _errs10 = errors; - if (typeof data4 !== 'boolean') { - validate192.errors = [ - { - instancePath: instancePath + '/instance/isPublic', - schemaPath: - '#/properties/instance/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema177.properties.instance.allOf[0].properties.isPublic - .type, - parentSchema: - schema177.properties.instance.allOf[0].properties - .isPublic, - data: data4, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.viewer !== undefined) { - let data5 = data0.viewer; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data5)) { - var valid3 = true; - const len0 = data5.length; - for (let i0 = 0; i0 < len0; i0++) { - let data6 = data5[i0]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing2; - if (data6.url === undefined && (missing2 = 'url')) { - validate192.errors = [ - { - instancePath: - instancePath + '/instance/viewer/' + i0, - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + - missing2 + - "'", - schema: - schema177.properties.instance.allOf[0] - .properties.viewer.items.required, - parentSchema: - schema177.properties.instance.allOf[0] - .properties.viewer.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.url !== undefined) { - let data7 = data6.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate192.errors = [ - { - instancePath: - instancePath + - '/instance/viewer/' + - i0 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema177.properties.instance - .allOf[0].properties.viewer.items - .properties.url, - data: data7, - }, - ]; - return false; - } - } else { - validate192.errors = [ - { - instancePath: - instancePath + - '/instance/viewer/' + - i0 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema177.properties.instance.allOf[0] - .properties.viewer.items.properties - .url.type, - parentSchema: - schema177.properties.instance.allOf[0] - .properties.viewer.items.properties - .url, - data: data7, - }, - ]; - return false; - } - } - } - } - } - } else { - validate192.errors = [ - { - instancePath: - instancePath + '/instance/viewer/' + i0, - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema177.properties.instance.allOf[0] - .properties.viewer.items.type, - parentSchema: - schema177.properties.instance.allOf[0] - .properties.viewer.items, - data: data6, - }, - ]; - return false; - } - } - var valid3 = _errs14 === errors; - if (!valid3) { - break; - } - } - } else { - validate192.errors = [ - { - instancePath: instancePath + '/instance/viewer', - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema177.properties.instance.allOf[0].properties - .viewer.type, - parentSchema: - schema177.properties.instance.allOf[0].properties - .viewer, - data: data5, - }, - ]; - return false; - } - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.owner !== undefined) { - let data8 = data0.owner; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data8)) { - var valid5 = true; - const len1 = data8.length; - for (let i1 = 0; i1 < len1; i1++) { - let data9 = data8[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data9 && - typeof data9 == 'object' && - !Array.isArray(data9) - ) { - let missing3; - if (data9.url === undefined && (missing3 = 'url')) { - validate192.errors = [ - { - instancePath: - instancePath + '/instance/owner/' + i1, - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema177.properties.instance.allOf[0] - .properties.owner.items.required, - parentSchema: - schema177.properties.instance.allOf[0] - .properties.owner.items, - data: data9, - }, - ]; - return false; - } else { - if (data9.url !== undefined) { - let data10 = data9.url; - const _errs22 = errors; - if (errors === _errs22) { - if (errors === _errs22) { - if (typeof data10 === 'string') { - if (!formats0(data10)) { - validate192.errors = [ - { - instancePath: - instancePath + - '/instance/owner/' + - i1 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema177.properties.instance - .allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } else { - validate192.errors = [ - { - instancePath: - instancePath + - '/instance/owner/' + - i1 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema177.properties.instance - .allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema177.properties.instance - .allOf[0].properties.owner.items - .properties.url, - data: data10, - }, - ]; - return false; - } - } - } - } - } - } else { - validate192.errors = [ - { - instancePath: - instancePath + '/instance/owner/' + i1, - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema177.properties.instance.allOf[0] - .properties.owner.items.type, - parentSchema: - schema177.properties.instance.allOf[0] - .properties.owner.items, - data: data9, - }, - ]; - return false; - } - } - var valid5 = _errs20 === errors; - if (!valid5) { - break; - } - } - } else { - validate192.errors = [ - { - instancePath: instancePath + '/instance/owner', - schemaPath: - '#/properties/instance/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema177.properties.instance.allOf[0].properties - .owner.type, - parentSchema: - schema177.properties.instance.allOf[0].properties - .owner, - data: data8, - }, - ]; - return false; - } - } - var valid2 = _errs18 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } else { - validate192.errors = [ - { - instancePath: instancePath + '/instance', - schemaPath: '#/properties/instance/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema177.properties.instance.allOf[0].type, - parentSchema: schema177.properties.instance.allOf[0], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs24 = errors; - if (errors === _errs24) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.type !== undefined) { - let data11 = data0.type; - const _errs26 = errors; - if ('device' !== data11) { - validate192.errors = [ - { - instancePath: instancePath + '/instance/type', - schemaPath: '#/properties/instance/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: - schema177.properties.instance.allOf[1].properties.type, - data: data11, - }, - ]; - return false; - } - var valid7 = _errs26 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data0.experiment !== undefined) { - let data12 = data0.experiment; - const _errs27 = errors; - if (errors === _errs27) { - if (errors === _errs27) { - if (typeof data12 === 'string') { - if (!formats0(data12)) { - validate192.errors = [ - { - instancePath: instancePath + '/instance/experiment', - schemaPath: - '#/properties/instance/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema177.properties.instance.allOf[1].properties - .experiment, - data: data12, - }, - ]; - return false; - } - } else { - validate192.errors = [ - { - instancePath: instancePath + '/instance/experiment', - schemaPath: - '#/properties/instance/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema177.properties.instance.allOf[1].properties - .experiment.type, - parentSchema: - schema177.properties.instance.allOf[1].properties - .experiment, - data: data12, - }, - ]; - return false; - } - } - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data0.services !== undefined) { - let data13 = data0.services; - const _errs29 = errors; - if (errors === _errs29) { - if (Array.isArray(data13)) { - var valid8 = true; - const len2 = data13.length; - for (let i2 = 0; i2 < len2; i2++) { - let data14 = data13[i2]; - const _errs31 = errors; - if (errors === _errs31) { - if ( - data14 && - typeof data14 == 'object' && - !Array.isArray(data14) - ) { - if (data14.serviceType !== undefined) { - let data15 = data14.serviceType; - const _errs34 = errors; - if (errors === _errs34) { - if (errors === _errs34) { - if (typeof data15 === 'string') { - if (!formats0(data15)) { - validate192.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i2 + - '/serviceType', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema177.properties.instance.allOf[1] - .properties.services.items.properties - .serviceType, - data: data15, - }, - ]; - return false; - } - } else { - validate192.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i2 + - '/serviceType', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema177.properties.instance.allOf[1] - .properties.services.items.properties - .serviceType.type, - parentSchema: - schema177.properties.instance.allOf[1] - .properties.services.items.properties - .serviceType, - data: data15, - }, - ]; - return false; - } - } - } - var valid9 = _errs34 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceId !== undefined) { - let data16 = data14.serviceId; - const _errs36 = errors; - if (typeof data16 !== 'string') { - validate192.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i2 + - '/serviceId', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema177.properties.instance.allOf[1] - .properties.services.items.properties - .serviceId.type, - parentSchema: - schema177.properties.instance.allOf[1] - .properties.services.items.properties - .serviceId, - data: data16, - }, - ]; - return false; - } - var valid9 = _errs36 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data14.serviceDirection !== undefined) { - let data17 = data14.serviceDirection; - const _errs38 = errors; - if (typeof data17 !== 'string') { - validate192.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema177.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection.type, - parentSchema: - schema177.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection, - data: data17, - }, - ]; - return false; - } - if ( - !( - data17 === 'consumer' || - data17 === 'producer' || - data17 === 'prosumer' - ) - ) { - validate192.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i2 + - '/serviceDirection', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema177.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema177.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection.enum, - parentSchema: - schema177.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection, - data: data17, - }, - ]; - return false; - } - var valid9 = _errs38 === errors; - } else { - var valid9 = true; - } - } - } - } else { - validate192.errors = [ - { - instancePath: - instancePath + '/instance/services/' + i2, - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema177.properties.instance.allOf[1].properties - .services.items.type, - parentSchema: - schema177.properties.instance.allOf[1].properties - .services.items, - data: data14, - }, - ]; - return false; - } - } - var valid8 = _errs31 === errors; - if (!valid8) { - break; - } - } - } else { - validate192.errors = [ - { - instancePath: instancePath + '/instance/services', - schemaPath: - '#/properties/instance/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema177.properties.instance.allOf[1].properties.services - .type, - parentSchema: - schema177.properties.instance.allOf[1].properties - .services, - data: data13, - }, - ]; - return false; - } - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } else { - validate192.errors = [ - { - instancePath: instancePath + '/instance', - schemaPath: '#/properties/instance/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema177.properties.instance.allOf[1].type, - parentSchema: schema177.properties.instance.allOf[1], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs24 === errors; - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.deviceToken !== undefined) { - let data18 = data.deviceToken; - const _errs40 = errors; - if (typeof data18 !== 'string') { - validate192.errors = [ - { - instancePath: instancePath + '/deviceToken', - schemaPath: '#/properties/deviceToken/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema177.properties.deviceToken.type, - parentSchema: schema177.properties.deviceToken, - data: data18, - }, - ]; - return false; - } - var valid0 = _errs40 === errors; - } else { - var valid0 = true; - } - } - } - } else { - validate192.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema177.type, - parentSchema: schema177, - data, - }, - ]; - return false; - } - } - validate192.errors = vErrors; - return errors === 0; -} -exports.validateInstantiateDeviceResponse201Response = validate193; -const schema178 = { - type: 'object', - properties: { - instance: { - title: 'Concrete Device', - allOf: [ - { - title: 'Device Overview', - type: 'object', - properties: { - url: { - type: 'string', - description: 'URL of the device', - format: 'uri', - readOnly: true, - }, - name: { type: 'string', description: 'Name of the device' }, - description: { - type: 'string', - description: 'Extended description of the device, features, etc.', - }, - type: { - type: 'string', - description: 'Type of the device', - enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], - }, - isPublic: { - type: 'boolean', - description: 'If true, the device may be seen and used by every user.', - }, - viewer: { - type: 'array', - description: 'List of users who can view the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - owner: { - type: 'array', - description: 'List of users who own the device', - items: { - title: 'User Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the user', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['url', 'type', 'name', 'isPublic'], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - type: { const: 'device' }, - connected: { - description: - 'If true, the device is connected to the service and can be used.\n', - type: 'boolean', - readOnly: true, - }, - announcedAvailability: { - readOnly: true, - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - }, - experiment: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - title: 'Service Description', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - serviceDirection: { - type: 'string', - enum: ['consumer', 'producer', 'prosumer'], - }, - }, - additionalProperties: true, - }, - }, - }, - }, - ], - 'x-typeguard': true, - }, - deviceToken: { type: 'string' }, - }, - required: ['instance', 'deviceToken'], - 'x-standalone': false, - 'x-name': 'instantiateDeviceResponse201Response', - 'x-location': - '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate193( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.instance === undefined && (missing0 = 'instance')) || - (data.deviceToken === undefined && (missing0 = 'deviceToken')) - ) { - validate193.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema178.required, - parentSchema: schema178, - data, - }, - ]; - return false; - } else { - if (data.instance !== undefined) { - let data0 = data.instance; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing1; - if ( - (data0.url === undefined && (missing1 = 'url')) || - (data0.type === undefined && (missing1 = 'type')) || - (data0.name === undefined && (missing1 = 'name')) || - (data0.isPublic === undefined && (missing1 = 'isPublic')) - ) { - validate193.errors = [ - { - instancePath: instancePath + '/instance', - schemaPath: '#/properties/instance/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema178.properties.instance.allOf[0].required, - parentSchema: schema178.properties.instance.allOf[0], - data: data0, - }, - ]; - return false; - } else { - if (data0.url !== undefined) { - let data1 = data0.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data1 === 'string') { - if (!formats0(data1)) { - validate193.errors = [ - { - instancePath: instancePath + '/instance/url', - schemaPath: - '#/properties/instance/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema178.properties.instance.allOf[0].properties.url, - data: data1, - }, - ]; - return false; - } - } else { - validate193.errors = [ - { - instancePath: instancePath + '/instance/url', - schemaPath: - '#/properties/instance/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance.allOf[0].properties.url.type, - parentSchema: - schema178.properties.instance.allOf[0].properties.url, - data: data1, - }, - ]; - return false; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.name !== undefined) { - let data2 = data0.name; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate193.errors = [ - { - instancePath: instancePath + '/instance/name', - schemaPath: - '#/properties/instance/allOf/0/properties/name/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance.allOf[0].properties.name.type, - parentSchema: - schema178.properties.instance.allOf[0].properties.name, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.description !== undefined) { - let data3 = data0.description; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate193.errors = [ - { - instancePath: instancePath + '/instance/description', - schemaPath: - '#/properties/instance/allOf/0/properties/description/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance.allOf[0].properties - .description.type, - parentSchema: - schema178.properties.instance.allOf[0].properties - .description, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.type !== undefined) { - let data4 = data0.type; - const _errs10 = errors; - if (typeof data4 !== 'string') { - validate193.errors = [ - { - instancePath: instancePath + '/instance/type', - schemaPath: - '#/properties/instance/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance.allOf[0].properties.type - .type, - parentSchema: - schema178.properties.instance.allOf[0].properties.type, - data: data4, - }, - ]; - return false; - } - if ( - !( - data4 === 'device' || - data4 === 'group' || - data4 === 'edge instantiable' || - data4 === 'cloud instantiable' - ) - ) { - validate193.errors = [ - { - instancePath: instancePath + '/instance/type', - schemaPath: - '#/properties/instance/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: - schema178.properties.instance.allOf[0].properties.type - .enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema178.properties.instance.allOf[0].properties.type - .enum, - parentSchema: - schema178.properties.instance.allOf[0].properties.type, - data: data4, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.isPublic !== undefined) { - let data5 = data0.isPublic; - const _errs12 = errors; - if (typeof data5 !== 'boolean') { - validate193.errors = [ - { - instancePath: instancePath + '/instance/isPublic', - schemaPath: - '#/properties/instance/allOf/0/properties/isPublic/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema178.properties.instance.allOf[0].properties - .isPublic.type, - parentSchema: - schema178.properties.instance.allOf[0].properties - .isPublic, - data: data5, - }, - ]; - return false; - } - var valid2 = _errs12 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.viewer !== undefined) { - let data6 = data0.viewer; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data6)) { - var valid3 = true; - const len0 = data6.length; - for (let i0 = 0; i0 < len0; i0++) { - let data7 = data6[i0]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing2; - if (data7.url === undefined && (missing2 = 'url')) { - validate193.errors = [ - { - instancePath: - instancePath + '/instance/viewer/' + i0, - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + - missing2 + - "'", - schema: - schema178.properties.instance.allOf[0] - .properties.viewer.items.required, - parentSchema: - schema178.properties.instance.allOf[0] - .properties.viewer.items, - data: data7, - }, - ]; - return false; - } else { - if (data7.url !== undefined) { - let data8 = data7.url; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/viewer/' + - i0 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema178.properties.instance - .allOf[0].properties.viewer - .items.properties.url, - data: data8, - }, - ]; - return false; - } - } else { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/viewer/' + - i0 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance - .allOf[0].properties.viewer.items - .properties.url.type, - parentSchema: - schema178.properties.instance - .allOf[0].properties.viewer.items - .properties.url, - data: data8, - }, - ]; - return false; - } - } - } - } - } - } else { - validate193.errors = [ - { - instancePath: - instancePath + '/instance/viewer/' + i0, - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema178.properties.instance.allOf[0] - .properties.viewer.items.type, - parentSchema: - schema178.properties.instance.allOf[0] - .properties.viewer.items, - data: data7, - }, - ]; - return false; - } - } - var valid3 = _errs16 === errors; - if (!valid3) { - break; - } - } - } else { - validate193.errors = [ - { - instancePath: instancePath + '/instance/viewer', - schemaPath: - '#/properties/instance/allOf/0/properties/viewer/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema178.properties.instance.allOf[0].properties - .viewer.type, - parentSchema: - schema178.properties.instance.allOf[0].properties - .viewer, - data: data6, - }, - ]; - return false; - } - } - var valid2 = _errs14 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.owner !== undefined) { - let data9 = data0.owner; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data9)) { - var valid5 = true; - const len1 = data9.length; - for (let i1 = 0; i1 < len1; i1++) { - let data10 = data9[i1]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data10 && - typeof data10 == 'object' && - !Array.isArray(data10) - ) { - let missing3; - if ( - data10.url === undefined && - (missing3 = 'url') - ) { - validate193.errors = [ - { - instancePath: - instancePath + '/instance/owner/' + i1, - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema178.properties.instance.allOf[0] - .properties.owner.items.required, - parentSchema: - schema178.properties.instance.allOf[0] - .properties.owner.items, - data: data10, - }, - ]; - return false; - } else { - if (data10.url !== undefined) { - let data11 = data10.url; - const _errs24 = errors; - if (errors === _errs24) { - if (errors === _errs24) { - if (typeof data11 === 'string') { - if (!formats0(data11)) { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/owner/' + - i1 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema178.properties.instance - .allOf[0].properties.owner - .items.properties.url, - data: data11, - }, - ]; - return false; - } - } else { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/owner/' + - i1 + - '/url', - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance - .allOf[0].properties.owner.items - .properties.url.type, - parentSchema: - schema178.properties.instance - .allOf[0].properties.owner.items - .properties.url, - data: data11, - }, - ]; - return false; - } - } - } - } - } - } else { - validate193.errors = [ - { - instancePath: - instancePath + '/instance/owner/' + i1, - schemaPath: - '#/properties/instance/allOf/0/properties/owner/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema178.properties.instance.allOf[0] - .properties.owner.items.type, - parentSchema: - schema178.properties.instance.allOf[0] - .properties.owner.items, - data: data10, - }, - ]; - return false; - } - } - var valid5 = _errs22 === errors; - if (!valid5) { - break; - } - } - } else { - validate193.errors = [ - { - instancePath: instancePath + '/instance/owner', - schemaPath: - '#/properties/instance/allOf/0/properties/owner/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema178.properties.instance.allOf[0].properties - .owner.type, - parentSchema: - schema178.properties.instance.allOf[0].properties - .owner, - data: data9, - }, - ]; - return false; - } - } - var valid2 = _errs20 === errors; - } else { - var valid2 = true; - } - } - } - } - } - } - } - } - } else { - validate193.errors = [ - { - instancePath: instancePath + '/instance', - schemaPath: '#/properties/instance/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema178.properties.instance.allOf[0].type, - parentSchema: schema178.properties.instance.allOf[0], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs26 = errors; - if (errors === _errs26) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.type !== undefined) { - let data12 = data0.type; - const _errs28 = errors; - if ('device' !== data12) { - validate193.errors = [ - { - instancePath: instancePath + '/instance/type', - schemaPath: '#/properties/instance/allOf/1/properties/type/const', - keyword: 'const', - params: { allowedValue: 'device' }, - message: 'must be equal to constant', - schema: 'device', - parentSchema: - schema178.properties.instance.allOf[1].properties.type, - data: data12, - }, - ]; - return false; - } - var valid7 = _errs28 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data0.connected !== undefined) { - let data13 = data0.connected; - const _errs29 = errors; - if (typeof data13 !== 'boolean') { - validate193.errors = [ - { - instancePath: instancePath + '/instance/connected', - schemaPath: - '#/properties/instance/allOf/1/properties/connected/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: - schema178.properties.instance.allOf[1].properties.connected - .type, - parentSchema: - schema178.properties.instance.allOf[1].properties.connected, - data: data13, - }, - ]; - return false; - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data0.announcedAvailability !== undefined) { - let data14 = data0.announcedAvailability; - const _errs31 = errors; - if (errors === _errs31) { - if (Array.isArray(data14)) { - var valid8 = true; - const len2 = data14.length; - for (let i2 = 0; i2 < len2; i2++) { - let data15 = data14[i2]; - const _errs33 = errors; - if (errors === _errs33) { - if ( - data15 && - typeof data15 == 'object' && - !Array.isArray(data15) - ) { - if (data15.start !== undefined) { - let data16 = data15.start; - const _errs35 = errors; - if (errors === _errs35) { - if (errors === _errs35) { - if (typeof data16 === 'string') { - if (!formats22.validate(data16)) { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/announcedAvailability/' + - i2 + - '/start', - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema178.properties.instance.allOf[1] - .properties.announcedAvailability.items - .properties.start, - data: data16, - }, - ]; - return false; - } - } else { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/announcedAvailability/' + - i2 + - '/start', - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance.allOf[1] - .properties.announcedAvailability.items - .properties.start.type, - parentSchema: - schema178.properties.instance.allOf[1] - .properties.announcedAvailability.items - .properties.start, - data: data16, - }, - ]; - return false; - } - } - } - var valid9 = _errs35 === errors; - } else { - var valid9 = true; - } - if (valid9) { - if (data15.end !== undefined) { - let data17 = data15.end; - const _errs37 = errors; - if (errors === _errs37) { - if (errors === _errs37) { - if (typeof data17 === 'string') { - if (!formats22.validate(data17)) { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/announcedAvailability/' + - i2 + - '/end', - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + - 'date-time' + - '"', - schema: 'date-time', - parentSchema: - schema178.properties.instance.allOf[1] - .properties.announcedAvailability - .items.properties.end, - data: data17, - }, - ]; - return false; - } - } else { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/announcedAvailability/' + - i2 + - '/end', - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance.allOf[1] - .properties.announcedAvailability.items - .properties.end.type, - parentSchema: - schema178.properties.instance.allOf[1] - .properties.announcedAvailability.items - .properties.end, - data: data17, - }, - ]; - return false; - } - } - } - var valid9 = _errs37 === errors; - } else { - var valid9 = true; - } - } - } else { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/announcedAvailability/' + - i2, - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema178.properties.instance.allOf[1].properties - .announcedAvailability.items.type, - parentSchema: - schema178.properties.instance.allOf[1].properties - .announcedAvailability.items, - data: data15, - }, - ]; - return false; - } - } - var valid8 = _errs33 === errors; - if (!valid8) { - break; - } - } - } else { - validate193.errors = [ - { - instancePath: - instancePath + '/instance/announcedAvailability', - schemaPath: - '#/properties/instance/allOf/1/properties/announcedAvailability/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema178.properties.instance.allOf[1].properties - .announcedAvailability.type, - parentSchema: - schema178.properties.instance.allOf[1].properties - .announcedAvailability, - data: data14, - }, - ]; - return false; - } - } - var valid7 = _errs31 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data0.experiment !== undefined) { - let data18 = data0.experiment; - const _errs39 = errors; - if (errors === _errs39) { - if (errors === _errs39) { - if (typeof data18 === 'string') { - if (!formats0(data18)) { - validate193.errors = [ - { - instancePath: instancePath + '/instance/experiment', - schemaPath: - '#/properties/instance/allOf/1/properties/experiment/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema178.properties.instance.allOf[1].properties - .experiment, - data: data18, - }, - ]; - return false; - } - } else { - validate193.errors = [ - { - instancePath: instancePath + '/instance/experiment', - schemaPath: - '#/properties/instance/allOf/1/properties/experiment/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance.allOf[1].properties - .experiment.type, - parentSchema: - schema178.properties.instance.allOf[1].properties - .experiment, - data: data18, - }, - ]; - return false; - } - } - } - var valid7 = _errs39 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data0.services !== undefined) { - let data19 = data0.services; - const _errs41 = errors; - if (errors === _errs41) { - if (Array.isArray(data19)) { - var valid10 = true; - const len3 = data19.length; - for (let i3 = 0; i3 < len3; i3++) { - let data20 = data19[i3]; - const _errs43 = errors; - if (errors === _errs43) { - if ( - data20 && - typeof data20 == 'object' && - !Array.isArray(data20) - ) { - if (data20.serviceType !== undefined) { - let data21 = data20.serviceType; - const _errs46 = errors; - if (errors === _errs46) { - if (errors === _errs46) { - if (typeof data21 === 'string') { - if (!formats0(data21)) { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i3 + - '/serviceType', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema178.properties.instance.allOf[1] - .properties.services.items - .properties.serviceType, - data: data21, - }, - ]; - return false; - } - } else { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i3 + - '/serviceType', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance.allOf[1] - .properties.services.items.properties - .serviceType.type, - parentSchema: - schema178.properties.instance.allOf[1] - .properties.services.items.properties - .serviceType, - data: data21, - }, - ]; - return false; - } - } - } - var valid11 = _errs46 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data20.serviceId !== undefined) { - let data22 = data20.serviceId; - const _errs48 = errors; - if (typeof data22 !== 'string') { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i3 + - '/serviceId', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance.allOf[1] - .properties.services.items.properties - .serviceId.type, - parentSchema: - schema178.properties.instance.allOf[1] - .properties.services.items.properties - .serviceId, - data: data22, - }, - ]; - return false; - } - var valid11 = _errs48 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data20.serviceDirection !== undefined) { - let data23 = data20.serviceDirection; - const _errs50 = errors; - if (typeof data23 !== 'string') { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i3 + - '/serviceDirection', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema178.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection.type, - parentSchema: - schema178.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection, - data: data23, - }, - ]; - return false; - } - if ( - !( - data23 === 'consumer' || - data23 === 'producer' || - data23 === 'prosumer' - ) - ) { - validate193.errors = [ - { - instancePath: - instancePath + - '/instance/services/' + - i3 + - '/serviceDirection', - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/enum', - keyword: 'enum', - params: { - allowedValues: - schema178.properties.instance.allOf[1] - .properties.services.items - .properties.serviceDirection.enum, - }, - message: - 'must be equal to one of the allowed values', - schema: - schema178.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection.enum, - parentSchema: - schema178.properties.instance.allOf[1] - .properties.services.items.properties - .serviceDirection, - data: data23, - }, - ]; - return false; - } - var valid11 = _errs50 === errors; - } else { - var valid11 = true; - } - } - } - } else { - validate193.errors = [ - { - instancePath: - instancePath + '/instance/services/' + i3, - schemaPath: - '#/properties/instance/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema178.properties.instance.allOf[1] - .properties.services.items.type, - parentSchema: - schema178.properties.instance.allOf[1] - .properties.services.items, - data: data20, - }, - ]; - return false; - } - } - var valid10 = _errs43 === errors; - if (!valid10) { - break; - } - } - } else { - validate193.errors = [ - { - instancePath: instancePath + '/instance/services', - schemaPath: - '#/properties/instance/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema178.properties.instance.allOf[1].properties - .services.type, - parentSchema: - schema178.properties.instance.allOf[1].properties - .services, - data: data19, - }, - ]; - return false; - } - } - var valid7 = _errs41 === errors; - } else { - var valid7 = true; - } - } - } - } - } - } else { - validate193.errors = [ - { - instancePath: instancePath + '/instance', - schemaPath: '#/properties/instance/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema178.properties.instance.allOf[1].type, - parentSchema: schema178.properties.instance.allOf[1], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs26 === errors; - } - var valid0 = _errs1 === errors; - } else { - var valid0 = true; - } - if (valid0) { - if (data.deviceToken !== undefined) { - let data24 = data.deviceToken; - const _errs52 = errors; - if (typeof data24 !== 'string') { - validate193.errors = [ - { - instancePath: instancePath + '/deviceToken', - schemaPath: '#/properties/deviceToken/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema178.properties.deviceToken.type, - parentSchema: schema178.properties.deviceToken, - data: data24, - }, - ]; - return false; - } - var valid0 = _errs52 === errors; - } else { - var valid0 = true; - } - } - } - } else { - validate193.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema178.type, - parentSchema: schema178, - data, - }, - ]; - return false; - } - } - validate193.errors = vErrors; - return errors === 0; -} -exports.validateGetDeviceAvailabilityResponse200Request = validate194; -const schema179 = { - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - 'x-standalone': false, - 'x-name': 'getDeviceAvailabilityResponse200Request', - 'x-location': - '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate194( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate194.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema179.items.properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate194.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema179.items.properties.start.type, - parentSchema: schema179.items.properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate194.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema179.items.properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate194.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema179.items.properties.end.type, - parentSchema: schema179.items.properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate194.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema179.items.type, - parentSchema: schema179.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate194.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema179.type, - parentSchema: schema179, - data, - }, - ]; - return false; - } - } - validate194.errors = vErrors; - return errors === 0; -} -exports.validateGetDeviceAvailabilityResponse200Response = validate195; -const schema180 = { - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - 'x-standalone': false, - 'x-name': 'getDeviceAvailabilityResponse200Response', - 'x-location': - '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate195( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate195.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema180.items.properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate195.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema180.items.properties.start.type, - parentSchema: schema180.items.properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate195.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema180.items.properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate195.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema180.items.properties.end.type, - parentSchema: schema180.items.properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate195.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema180.items.type, - parentSchema: schema180.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate195.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema180.type, - parentSchema: schema180, - data, - }, - ]; - return false; - } - } - validate195.errors = vErrors; - return errors === 0; -} -exports.validateAddDeviceAvailabilityRulesBodyRequest = validate196; -const schema181 = { - title: 'Availability Rules', - description: 'The availability rule to be applied.', - type: 'array', - items: { - title: 'Availability Rule', - type: 'object', - allOf: [ - { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - { - type: 'object', - properties: { - available: { type: 'boolean' }, - repeat: { - description: - 'If specified the time slot is repeated in a fixed offset specified by the frequency', - type: 'object', - properties: { - frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, - until: { - description: 'Up to this date-time the time slot will be repeated.', - type: 'string', - format: 'date-time', - }, - count: { - description: 'How often the time slot will be repeated', - type: 'integer', - }, - }, - required: ['frequency'], - }, - }, - }, - ], - }, - 'x-standalone': false, - 'x-name': 'addDeviceAvailabilityRulesBodyRequest', - 'x-location': - '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate196( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { - validate196.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema181.items.type, - parentSchema: schema181.items, - data: data0, - }, - ]; - return false; - } - const _errs3 = errors; - if (errors === _errs3) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate196.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/allOf/0/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema181.items.allOf[0].properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate196.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/allOf/0/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema181.items.allOf[0].properties.start.type, - parentSchema: schema181.items.allOf[0].properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid2 = _errs5 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs7 = errors; - if (errors === _errs7) { - if (errors === _errs7) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate196.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/allOf/0/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema181.items.allOf[0].properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate196.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/allOf/0/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema181.items.allOf[0].properties.end.type, - parentSchema: schema181.items.allOf[0].properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - } - } else { - validate196.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema181.items.allOf[0].type, - parentSchema: schema181.items.allOf[0], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs3 === errors; - if (valid1) { - const _errs9 = errors; - if (errors === _errs9) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.available !== undefined) { - let data3 = data0.available; - const _errs11 = errors; - if (typeof data3 !== 'boolean') { - validate196.errors = [ - { - instancePath: instancePath + '/' + i0 + '/available', - schemaPath: '#/items/allOf/1/properties/available/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema181.items.allOf[1].properties.available.type, - parentSchema: schema181.items.allOf[1].properties.available, - data: data3, - }, - ]; - return false; - } - var valid3 = _errs11 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data0.repeat !== undefined) { - let data4 = data0.repeat; - const _errs13 = errors; - if (errors === _errs13) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing0; - if (data4.frequency === undefined && (missing0 = 'frequency')) { - validate196.errors = [ - { - instancePath: instancePath + '/' + i0 + '/repeat', - schemaPath: '#/items/allOf/1/properties/repeat/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema181.items.allOf[1].properties.repeat.required, - parentSchema: schema181.items.allOf[1].properties.repeat, - data: data4, - }, - ]; - return false; - } else { - if (data4.frequency !== undefined) { - let data5 = data4.frequency; - const _errs15 = errors; - if (typeof data5 !== 'string') { - validate196.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/frequency', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/frequency/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema181.items.allOf[1].properties.repeat.properties - .frequency.type, - parentSchema: - schema181.items.allOf[1].properties.repeat.properties - .frequency, - data: data5, - }, - ]; - return false; - } - if ( - !( - data5 === 'HOURLY' || - data5 === 'DAILY' || - data5 === 'WEEKLY' - ) - ) { - validate196.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/frequency', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/frequency/enum', - keyword: 'enum', - params: { - allowedValues: - schema181.items.allOf[1].properties.repeat.properties - .frequency.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema181.items.allOf[1].properties.repeat.properties - .frequency.enum, - parentSchema: - schema181.items.allOf[1].properties.repeat.properties - .frequency, - data: data5, - }, - ]; - return false; - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.until !== undefined) { - let data6 = data4.until; - const _errs17 = errors; - if (errors === _errs17) { - if (errors === _errs17) { - if (typeof data6 === 'string') { - if (!formats22.validate(data6)) { - validate196.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/until', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/until/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema181.items.allOf[1].properties.repeat - .properties.until, - data: data6, - }, - ]; - return false; - } - } else { - validate196.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/until', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/until/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema181.items.allOf[1].properties.repeat - .properties.until.type, - parentSchema: - schema181.items.allOf[1].properties.repeat - .properties.until, - data: data6, - }, - ]; - return false; - } - } - } - var valid4 = _errs17 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.count !== undefined) { - let data7 = data4.count; - const _errs19 = errors; - if ( - !( - typeof data7 == 'number' && - !(data7 % 1) && - !isNaN(data7) && - isFinite(data7) - ) - ) { - validate196.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/count', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/count/type', - keyword: 'type', - params: { type: 'integer' }, - message: 'must be integer', - schema: - schema181.items.allOf[1].properties.repeat - .properties.count.type, - parentSchema: - schema181.items.allOf[1].properties.repeat - .properties.count, - data: data7, - }, - ]; - return false; - } - var valid4 = _errs19 === errors; - } else { - var valid4 = true; - } - } - } - } - } else { - validate196.errors = [ - { - instancePath: instancePath + '/' + i0 + '/repeat', - schemaPath: '#/items/allOf/1/properties/repeat/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema181.items.allOf[1].properties.repeat.type, - parentSchema: schema181.items.allOf[1].properties.repeat, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs13 === errors; - } else { - var valid3 = true; - } - } - } else { - validate196.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema181.items.allOf[1].type, - parentSchema: schema181.items.allOf[1], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs9 === errors; - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate196.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema181.type, - parentSchema: schema181, - data, - }, - ]; - return false; - } - } - validate196.errors = vErrors; - return errors === 0; -} -exports.validateAddDeviceAvailabilityRulesBodyResponse = validate197; -const schema182 = { - title: 'Availability Rules', - description: 'The availability rule to be applied.', - type: 'array', - items: { - title: 'Availability Rule', - type: 'object', - allOf: [ - { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - { - type: 'object', - properties: { - available: { type: 'boolean' }, - repeat: { - description: - 'If specified the time slot is repeated in a fixed offset specified by the frequency', - type: 'object', - properties: { - frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, - until: { - description: 'Up to this date-time the time slot will be repeated.', - type: 'string', - format: 'date-time', - }, - count: { - description: 'How often the time slot will be repeated', - type: 'integer', - }, - }, - required: ['frequency'], - }, - }, - }, - ], - }, - 'x-standalone': false, - 'x-name': 'addDeviceAvailabilityRulesBodyResponse', - 'x-location': - '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate197( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { - validate197.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema182.items.type, - parentSchema: schema182.items, - data: data0, - }, - ]; - return false; - } - const _errs3 = errors; - if (errors === _errs3) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate197.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/allOf/0/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema182.items.allOf[0].properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate197.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/allOf/0/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema182.items.allOf[0].properties.start.type, - parentSchema: schema182.items.allOf[0].properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid2 = _errs5 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs7 = errors; - if (errors === _errs7) { - if (errors === _errs7) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate197.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/allOf/0/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema182.items.allOf[0].properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate197.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/allOf/0/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema182.items.allOf[0].properties.end.type, - parentSchema: schema182.items.allOf[0].properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - } - } else { - validate197.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema182.items.allOf[0].type, - parentSchema: schema182.items.allOf[0], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs3 === errors; - if (valid1) { - const _errs9 = errors; - if (errors === _errs9) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.available !== undefined) { - let data3 = data0.available; - const _errs11 = errors; - if (typeof data3 !== 'boolean') { - validate197.errors = [ - { - instancePath: instancePath + '/' + i0 + '/available', - schemaPath: '#/items/allOf/1/properties/available/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema182.items.allOf[1].properties.available.type, - parentSchema: schema182.items.allOf[1].properties.available, - data: data3, - }, - ]; - return false; - } - var valid3 = _errs11 === errors; - } else { - var valid3 = true; - } - if (valid3) { - if (data0.repeat !== undefined) { - let data4 = data0.repeat; - const _errs13 = errors; - if (errors === _errs13) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing0; - if (data4.frequency === undefined && (missing0 = 'frequency')) { - validate197.errors = [ - { - instancePath: instancePath + '/' + i0 + '/repeat', - schemaPath: '#/items/allOf/1/properties/repeat/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema182.items.allOf[1].properties.repeat.required, - parentSchema: schema182.items.allOf[1].properties.repeat, - data: data4, - }, - ]; - return false; - } else { - if (data4.frequency !== undefined) { - let data5 = data4.frequency; - const _errs15 = errors; - if (typeof data5 !== 'string') { - validate197.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/frequency', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/frequency/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema182.items.allOf[1].properties.repeat.properties - .frequency.type, - parentSchema: - schema182.items.allOf[1].properties.repeat.properties - .frequency, - data: data5, - }, - ]; - return false; - } - if ( - !( - data5 === 'HOURLY' || - data5 === 'DAILY' || - data5 === 'WEEKLY' - ) - ) { - validate197.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/frequency', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/frequency/enum', - keyword: 'enum', - params: { - allowedValues: - schema182.items.allOf[1].properties.repeat.properties - .frequency.enum, - }, - message: 'must be equal to one of the allowed values', - schema: - schema182.items.allOf[1].properties.repeat.properties - .frequency.enum, - parentSchema: - schema182.items.allOf[1].properties.repeat.properties - .frequency, - data: data5, - }, - ]; - return false; - } - var valid4 = _errs15 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.until !== undefined) { - let data6 = data4.until; - const _errs17 = errors; - if (errors === _errs17) { - if (errors === _errs17) { - if (typeof data6 === 'string') { - if (!formats22.validate(data6)) { - validate197.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/until', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/until/format', - keyword: 'format', - params: { format: 'date-time' }, - message: - 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: - schema182.items.allOf[1].properties.repeat - .properties.until, - data: data6, - }, - ]; - return false; - } - } else { - validate197.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/until', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/until/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema182.items.allOf[1].properties.repeat - .properties.until.type, - parentSchema: - schema182.items.allOf[1].properties.repeat - .properties.until, - data: data6, - }, - ]; - return false; - } - } - } - var valid4 = _errs17 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.count !== undefined) { - let data7 = data4.count; - const _errs19 = errors; - if ( - !( - typeof data7 == 'number' && - !(data7 % 1) && - !isNaN(data7) && - isFinite(data7) - ) - ) { - validate197.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/repeat/count', - schemaPath: - '#/items/allOf/1/properties/repeat/properties/count/type', - keyword: 'type', - params: { type: 'integer' }, - message: 'must be integer', - schema: - schema182.items.allOf[1].properties.repeat - .properties.count.type, - parentSchema: - schema182.items.allOf[1].properties.repeat - .properties.count, - data: data7, - }, - ]; - return false; - } - var valid4 = _errs19 === errors; - } else { - var valid4 = true; - } - } - } - } - } else { - validate197.errors = [ - { - instancePath: instancePath + '/' + i0 + '/repeat', - schemaPath: '#/items/allOf/1/properties/repeat/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema182.items.allOf[1].properties.repeat.type, - parentSchema: schema182.items.allOf[1].properties.repeat, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs13 === errors; - } else { - var valid3 = true; - } - } - } else { - validate197.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema182.items.allOf[1].type, - parentSchema: schema182.items.allOf[1], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs9 === errors; - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate197.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema182.type, - parentSchema: schema182, - data, - }, - ]; - return false; - } - } - validate197.errors = vErrors; - return errors === 0; -} -exports.validateAddDeviceAvailabilityRulesResponse200Request = validate198; -const schema183 = { - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - 'x-standalone': false, - 'x-name': 'addDeviceAvailabilityRulesResponse200Request', - 'x-location': - '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate198( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate198.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema183.items.properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate198.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema183.items.properties.start.type, - parentSchema: schema183.items.properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate198.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema183.items.properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate198.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema183.items.properties.end.type, - parentSchema: schema183.items.properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate198.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema183.items.type, - parentSchema: schema183.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate198.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema183.type, - parentSchema: schema183, - data, - }, - ]; - return false; - } - } - validate198.errors = vErrors; - return errors === 0; -} -exports.validateAddDeviceAvailabilityRulesResponse200Response = validate199; -const schema184 = { - title: 'Availability', - description: - 'A list of time slots that the maintainer of the device announced it is available\n', - type: 'array', - items: { - title: 'Time Slot', - type: 'object', - properties: { - start: { type: 'string', format: 'date-time' }, - end: { type: 'string', format: 'date-time' }, - }, - }, - 'x-standalone': false, - 'x-name': 'addDeviceAvailabilityRulesResponse200Response', - 'x-location': - '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate199( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - if (errors === _errs1) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - if (data0.start !== undefined) { - let data1 = data0.start; - const _errs3 = errors; - if (errors === _errs3) { - if (errors === _errs3) { - if (typeof data1 === 'string') { - if (!formats22.validate(data1)) { - validate199.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema184.items.properties.start, - data: data1, - }, - ]; - return false; - } - } else { - validate199.errors = [ - { - instancePath: instancePath + '/' + i0 + '/start', - schemaPath: '#/items/properties/start/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema184.items.properties.start.type, - parentSchema: schema184.items.properties.start, - data: data1, - }, - ]; - return false; - } - } - } - var valid1 = _errs3 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data0.end !== undefined) { - let data2 = data0.end; - const _errs5 = errors; - if (errors === _errs5) { - if (errors === _errs5) { - if (typeof data2 === 'string') { - if (!formats22.validate(data2)) { - validate199.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/format', - keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema184.items.properties.end, - data: data2, - }, - ]; - return false; - } - } else { - validate199.errors = [ - { - instancePath: instancePath + '/' + i0 + '/end', - schemaPath: '#/items/properties/end/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema184.items.properties.end.type, - parentSchema: schema184.items.properties.end, - data: data2, - }, - ]; - return false; - } - } - } - var valid1 = _errs5 === errors; - } else { - var valid1 = true; - } - } - } else { - validate199.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema184.items.type, - parentSchema: schema184.items, - data: data0, - }, - ]; - return false; - } - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate199.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema184.type, - parentSchema: schema184, - data, - }, - ]; - return false; - } - } - validate199.errors = vErrors; - return errors === 0; -} -exports.validateCreateWebsocketTokenResponse200Request = validate200; -const schema185 = { - type: 'string', - 'x-standalone': false, - 'x-name': 'createWebsocketTokenResponse200Request', - 'x-location': - '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate200( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate200.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema185.type, - parentSchema: schema185, - data, - }, - ]; - return false; - } - validate200.errors = vErrors; - return errors === 0; -} -exports.validateCreateWebsocketTokenResponse200Response = validate201; -const schema186 = { - type: 'string', - 'x-standalone': false, - 'x-name': 'createWebsocketTokenResponse200Response', - 'x-location': - '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate201( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'string') { - validate201.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema186.type, - parentSchema: schema186, - data, - }, - ]; - return false; - } - validate201.errors = vErrors; - return errors === 0; -} -exports.validateSendSignalingMessageBodyRequest = validate202; -const schema187 = { - title: 'Sig Message', - anyOf: [ - { - title: 'Create Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'command' }, - command: { type: 'string' }, - }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'createPeerconnection' }, - connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, - connectionUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - type: 'object', - required: ['serviceType', 'serviceId', 'remoteServiceId'], - title: 'Service Config', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - additionalProperties: true, - }, - }, - tiebreaker: { type: 'boolean' }, - config: { type: 'object', additionalProperties: true }, - }, - required: [ - 'command', - 'connectionType', - 'connectionUrl', - 'services', - 'tiebreaker', - ], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Close Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'command' }, - command: { type: 'string' }, - }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'closePeerconnection' }, - connectionUrl: { type: 'string', format: 'uri' }, - }, - required: ['command', 'connectionUrl'], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Signaling Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'signaling' }, - signalingType: { type: 'string' }, - connectionUrl: { type: 'string', format: 'uri' }, - content: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'signalingType', 'connectionUrl', 'content'], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Configuration Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'configuration' }, - configuration: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'configuration'], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Experiment Status Changed Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'experiment-status-changed' }, - status: { type: 'string' }, - message: { type: 'string' }, - }, - required: ['messageType', 'status'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-standalone': false, - 'x-name': 'sendSignalingMessageBodyRequest', - 'x-location': - '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate202( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - const _errs3 = errors; - if (errors === _errs3) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema187.anyOf[0].allOf[0].allOf[0].required, - parentSchema: schema187.anyOf[0].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/0/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[0].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema187.anyOf[0].allOf[0].allOf[0].properties.messageType, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } - } - } else { - const err2 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[0].allOf[0].allOf[0].type, - parentSchema: schema187.anyOf[0].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - var valid2 = _errs3 === errors; - if (valid2) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - const err3 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema187.anyOf[0].allOf[0].allOf[1].required, - parentSchema: schema187.anyOf[0].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs10 = errors; - if ('command' !== data1) { - const err4 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema187.anyOf[0].allOf[0].allOf[1].properties.messageType, - data: data1, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid4 = _errs10 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs11 = errors; - if (typeof data2 !== 'string') { - const err5 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[0].allOf[0].allOf[1].properties.command.type, - parentSchema: schema187.anyOf[0].allOf[0].allOf[1].properties.command, - data: data2, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid4 = _errs11 === errors; - } else { - var valid4 = true; - } - } - } - } else { - const err6 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[0].allOf[0].allOf[1].type, - parentSchema: schema187.anyOf[0].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - } - var valid2 = _errs8 === errors; - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs13 = errors; - if (errors === _errs13) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.command === undefined && (missing2 = 'command')) || - (data.connectionType === undefined && (missing2 = 'connectionType')) || - (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || - (data.services === undefined && (missing2 = 'services')) || - (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) - ) { - const err7 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema187.anyOf[0].allOf[1].required, - parentSchema: schema187.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } else { - if (data.command !== undefined) { - let data3 = data.command; - const _errs15 = errors; - if ('createPeerconnection' !== data3) { - const err8 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/0/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'createPeerconnection' }, - message: 'must be equal to constant', - schema: 'createPeerconnection', - parentSchema: schema187.anyOf[0].allOf[1].properties.command, - data: data3, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - var valid5 = _errs15 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.connectionType !== undefined) { - let data4 = data.connectionType; - const _errs16 = errors; - if (typeof data4 !== 'string') { - const err9 = { - instancePath: instancePath + '/connectionType', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[0].allOf[1].properties.connectionType.type, - parentSchema: schema187.anyOf[0].allOf[1].properties.connectionType, - data: data4, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { - const err10 = { - instancePath: instancePath + '/connectionType', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/enum', - keyword: 'enum', - params: { - allowedValues: - schema187.anyOf[0].allOf[1].properties.connectionType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema187.anyOf[0].allOf[1].properties.connectionType.enum, - parentSchema: schema187.anyOf[0].allOf[1].properties.connectionType, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - var valid5 = _errs16 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.connectionUrl !== undefined) { - let data5 = data.connectionUrl; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - const err11 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema187.anyOf[0].allOf[1].properties.connectionUrl, - data: data5, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } else { - const err12 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[0].allOf[1].properties.connectionUrl.type, - parentSchema: - schema187.anyOf[0].allOf[1].properties.connectionUrl, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - } - var valid5 = _errs18 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.services !== undefined) { - let data6 = data.services; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data6)) { - var valid6 = true; - const len0 = data6.length; - for (let i0 = 0; i0 < len0; i0++) { - let data7 = data6[i0]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing3; - if ( - (data7.serviceType === undefined && - (missing3 = 'serviceType')) || - (data7.serviceId === undefined && - (missing3 = 'serviceId')) || - (data7.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - const err13 = { - instancePath: instancePath + '/services/' + i0, - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema187.anyOf[0].allOf[1].properties.services.items - .required, - parentSchema: - schema187.anyOf[0].allOf[1].properties.services.items, - data: data7, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data7.serviceType !== undefined) { - let data8 = data7.serviceType; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - const err14 = { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema187.anyOf[0].allOf[1].properties - .services.items.properties.serviceType, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema187.anyOf[0].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema187.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data8, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data7.serviceId !== undefined) { - let data9 = data7.serviceId; - const _errs27 = errors; - if (typeof data9 !== 'string') { - const err16 = { - instancePath: - instancePath + '/services/' + i0 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema187.anyOf[0].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema187.anyOf[0].allOf[1].properties.services - .items.properties.serviceId, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data7.remoteServiceId !== undefined) { - let data10 = data7.remoteServiceId; - const _errs29 = errors; - if (typeof data10 !== 'string') { - const err17 = { - instancePath: - instancePath + - '/services/' + - i0 + - '/remoteServiceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema187.anyOf[0].allOf[1].properties.services - .items.properties.remoteServiceId.type, - parentSchema: - schema187.anyOf[0].allOf[1].properties.services - .items.properties.remoteServiceId, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - const err18 = { - instancePath: instancePath + '/services/' + i0, - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema187.anyOf[0].allOf[1].properties.services.items - .type, - parentSchema: - schema187.anyOf[0].allOf[1].properties.services.items, - data: data7, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid6 = _errs22 === errors; - if (!valid6) { - break; - } - } - } else { - const err19 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema187.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema187.anyOf[0].allOf[1].properties.services, - data: data6, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - var valid5 = _errs20 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.tiebreaker !== undefined) { - let data11 = data.tiebreaker; - const _errs31 = errors; - if (typeof data11 !== 'boolean') { - const err20 = { - instancePath: instancePath + '/tiebreaker', - schemaPath: '#/anyOf/0/allOf/1/properties/tiebreaker/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema187.anyOf[0].allOf[1].properties.tiebreaker.type, - parentSchema: schema187.anyOf[0].allOf[1].properties.tiebreaker, - data: data11, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - var valid5 = _errs31 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.config !== undefined) { - let data12 = data.config; - const _errs33 = errors; - if (errors === _errs33) { - if ( - data12 && - typeof data12 == 'object' && - !Array.isArray(data12) - ) { - } else { - const err21 = { - instancePath: instancePath + '/config', - schemaPath: '#/anyOf/0/allOf/1/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[0].allOf[1].properties.config.type, - parentSchema: schema187.anyOf[0].allOf[1].properties.config, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - var valid5 = _errs33 === errors; - } else { - var valid5 = true; - } - } - } - } - } - } - } - } else { - const err22 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[0].allOf[1].type, - parentSchema: schema187.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } - var valid1 = _errs13 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs36 = errors; - const _errs37 = errors; - const _errs38 = errors; - if (errors === _errs38) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing4; - if (data.messageType === undefined && (missing4 = 'messageType')) { - const err23 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: schema187.anyOf[1].allOf[0].allOf[0].required, - parentSchema: schema187.anyOf[1].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data13 = data.messageType; - if (typeof data13 !== 'string') { - const err24 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/1/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[1].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema187.anyOf[1].allOf[0].allOf[0].properties.messageType, - data: data13, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - } - } - } else { - const err25 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[1].allOf[0].allOf[0].type, - parentSchema: schema187.anyOf[1].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid9 = _errs38 === errors; - if (valid9) { - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing5; - if ( - (data.messageType === undefined && (missing5 = 'messageType')) || - (data.command === undefined && (missing5 = 'command')) - ) { - const err26 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: "must have required property '" + missing5 + "'", - schema: schema187.anyOf[1].allOf[0].allOf[1].required, - parentSchema: schema187.anyOf[1].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data14 = data.messageType; - const _errs45 = errors; - if ('command' !== data14) { - const err27 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: - schema187.anyOf[1].allOf[0].allOf[1].properties.messageType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.command !== undefined) { - let data15 = data.command; - const _errs46 = errors; - if (typeof data15 !== 'string') { - const err28 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[1].allOf[0].allOf[1].properties.command.type, - parentSchema: schema187.anyOf[1].allOf[0].allOf[1].properties.command, - data: data15, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - var valid11 = _errs46 === errors; - } else { - var valid11 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[1].allOf[0].allOf[1].type, - parentSchema: schema187.anyOf[1].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid9 = _errs43 === errors; - } - var valid8 = _errs37 === errors; - if (valid8) { - const _errs48 = errors; - if (errors === _errs48) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.command === undefined && (missing6 = 'command')) || - (data.connectionUrl === undefined && (missing6 = 'connectionUrl')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema187.anyOf[1].allOf[1].required, - parentSchema: schema187.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.command !== undefined) { - let data16 = data.command; - const _errs50 = errors; - if ('closePeerconnection' !== data16) { - const err31 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/1/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'closePeerconnection' }, - message: 'must be equal to constant', - schema: 'closePeerconnection', - parentSchema: schema187.anyOf[1].allOf[1].properties.command, - data: data16, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - var valid12 = _errs50 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if (data.connectionUrl !== undefined) { - let data17 = data.connectionUrl; - const _errs51 = errors; - if (errors === _errs51) { - if (errors === _errs51) { - if (typeof data17 === 'string') { - if (!formats0(data17)) { - const err32 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema187.anyOf[1].allOf[1].properties.connectionUrl, - data: data17, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } else { - const err33 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[1].allOf[1].properties.connectionUrl.type, - parentSchema: - schema187.anyOf[1].allOf[1].properties.connectionUrl, - data: data17, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - } - } - var valid12 = _errs51 === errors; - } else { - var valid12 = true; - } - } - } - } else { - const err34 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[1].allOf[1].type, - parentSchema: schema187.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - } - var valid8 = _errs48 === errors; - } - var _valid0 = _errs36 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs53 = errors; - const _errs54 = errors; - if (errors === _errs54) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing7; - if (data.messageType === undefined && (missing7 = 'messageType')) { - const err35 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: "must have required property '" + missing7 + "'", - schema: schema187.anyOf[2].allOf[0].required, - parentSchema: schema187.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data18 = data.messageType; - if (typeof data18 !== 'string') { - const err36 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/2/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[2].allOf[0].properties.messageType.type, - parentSchema: schema187.anyOf[2].allOf[0].properties.messageType, - data: data18, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } else { - const err37 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[2].allOf[0].type, - parentSchema: schema187.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid13 = _errs54 === errors; - if (valid13) { - const _errs59 = errors; - if (errors === _errs59) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing8; - if ( - (data.messageType === undefined && (missing8 = 'messageType')) || - (data.signalingType === undefined && (missing8 = 'signalingType')) || - (data.connectionUrl === undefined && (missing8 = 'connectionUrl')) || - (data.content === undefined && (missing8 = 'content')) - ) { - const err38 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: "must have required property '" + missing8 + "'", - schema: schema187.anyOf[2].allOf[1].required, - parentSchema: schema187.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data19 = data.messageType; - const _errs61 = errors; - if ('signaling' !== data19) { - const err39 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/2/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'signaling' }, - message: 'must be equal to constant', - schema: 'signaling', - parentSchema: schema187.anyOf[2].allOf[1].properties.messageType, - data: data19, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - var valid15 = _errs61 === errors; - } else { - var valid15 = true; - } - if (valid15) { - if (data.signalingType !== undefined) { - let data20 = data.signalingType; - const _errs62 = errors; - if (typeof data20 !== 'string') { - const err40 = { - instancePath: instancePath + '/signalingType', - schemaPath: '#/anyOf/2/allOf/1/properties/signalingType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[2].allOf[1].properties.signalingType.type, - parentSchema: schema187.anyOf[2].allOf[1].properties.signalingType, - data: data20, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - var valid15 = _errs62 === errors; - } else { - var valid15 = true; - } - if (valid15) { - if (data.connectionUrl !== undefined) { - let data21 = data.connectionUrl; - const _errs64 = errors; - if (errors === _errs64) { - if (errors === _errs64) { - if (typeof data21 === 'string') { - if (!formats0(data21)) { - const err41 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: - '#/anyOf/2/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema187.anyOf[2].allOf[1].properties.connectionUrl, - data: data21, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } else { - const err42 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema187.anyOf[2].allOf[1].properties.connectionUrl.type, - parentSchema: - schema187.anyOf[2].allOf[1].properties.connectionUrl, - data: data21, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - } - var valid15 = _errs64 === errors; - } else { - var valid15 = true; - } - if (valid15) { - if (data.content !== undefined) { - let data22 = data.content; - const _errs66 = errors; - if (errors === _errs66) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - } else { - const err43 = { - instancePath: instancePath + '/content', - schemaPath: '#/anyOf/2/allOf/1/properties/content/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[2].allOf[1].properties.content.type, - parentSchema: schema187.anyOf[2].allOf[1].properties.content, - data: data22, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid15 = _errs66 === errors; - } else { - var valid15 = true; - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[2].allOf[1].type, - parentSchema: schema187.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid13 = _errs59 === errors; - } - var _valid0 = _errs53 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs69 = errors; - const _errs70 = errors; - if (errors === _errs70) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if (data.messageType === undefined && (missing9 = 'messageType')) { - const err45 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema187.anyOf[3].allOf[0].required, - parentSchema: schema187.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data23 = data.messageType; - if (typeof data23 !== 'string') { - const err46 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/3/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[3].allOf[0].properties.messageType.type, - parentSchema: schema187.anyOf[3].allOf[0].properties.messageType, - data: data23, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - } - } else { - const err47 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[3].allOf[0].type, - parentSchema: schema187.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid16 = _errs70 === errors; - if (valid16) { - const _errs75 = errors; - if (errors === _errs75) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing10; - if ( - (data.messageType === undefined && (missing10 = 'messageType')) || - (data.configuration === undefined && (missing10 = 'configuration')) - ) { - const err48 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: "must have required property '" + missing10 + "'", - schema: schema187.anyOf[3].allOf[1].required, - parentSchema: schema187.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data24 = data.messageType; - const _errs77 = errors; - if ('configuration' !== data24) { - const err49 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/3/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'configuration' }, - message: 'must be equal to constant', - schema: 'configuration', - parentSchema: schema187.anyOf[3].allOf[1].properties.messageType, - data: data24, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data.configuration !== undefined) { - let data25 = data.configuration; - const _errs78 = errors; - if (errors === _errs78) { - if (data25 && typeof data25 == 'object' && !Array.isArray(data25)) { - } else { - const err50 = { - instancePath: instancePath + '/configuration', - schemaPath: '#/anyOf/3/allOf/1/properties/configuration/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema187.anyOf[3].allOf[1].properties.configuration.type, - parentSchema: - schema187.anyOf[3].allOf[1].properties.configuration, - data: data25, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err51 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[3].allOf[1].type, - parentSchema: schema187.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } - var valid16 = _errs75 === errors; - } - var _valid0 = _errs69 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs81 = errors; - const _errs82 = errors; - if (errors === _errs82) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing11; - if (data.messageType === undefined && (missing11 = 'messageType')) { - const err52 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: "must have required property '" + missing11 + "'", - schema: schema187.anyOf[4].allOf[0].required, - parentSchema: schema187.anyOf[4].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data26 = data.messageType; - if (typeof data26 !== 'string') { - const err53 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/4/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[4].allOf[0].properties.messageType.type, - parentSchema: schema187.anyOf[4].allOf[0].properties.messageType, - data: data26, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - } - } else { - const err54 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[4].allOf[0].type, - parentSchema: schema187.anyOf[4].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid19 = _errs82 === errors; - if (valid19) { - const _errs87 = errors; - if (errors === _errs87) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if ( - (data.messageType === undefined && (missing12 = 'messageType')) || - (data.status === undefined && (missing12 = 'status')) - ) { - const err55 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema187.anyOf[4].allOf[1].required, - parentSchema: schema187.anyOf[4].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data27 = data.messageType; - const _errs89 = errors; - if ('experiment-status-changed' !== data27) { - const err56 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/4/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'experiment-status-changed' }, - message: 'must be equal to constant', - schema: 'experiment-status-changed', - parentSchema: schema187.anyOf[4].allOf[1].properties.messageType, - data: data27, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - var valid21 = _errs89 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data.status !== undefined) { - let data28 = data.status; - const _errs90 = errors; - if (typeof data28 !== 'string') { - const err57 = { - instancePath: instancePath + '/status', - schemaPath: '#/anyOf/4/allOf/1/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[4].allOf[1].properties.status.type, - parentSchema: schema187.anyOf[4].allOf[1].properties.status, - data: data28, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid21 = _errs90 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data.message !== undefined) { - let data29 = data.message; - const _errs92 = errors; - if (typeof data29 !== 'string') { - const err58 = { - instancePath: instancePath + '/message', - schemaPath: '#/anyOf/4/allOf/1/properties/message/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema187.anyOf[4].allOf[1].properties.message.type, - parentSchema: schema187.anyOf[4].allOf[1].properties.message, - data: data29, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid21 = _errs92 === errors; - } else { - var valid21 = true; - } - } - } - } - } else { - const err59 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema187.anyOf[4].allOf[1].type, - parentSchema: schema187.anyOf[4].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } - var valid19 = _errs87 === errors; - } - var _valid0 = _errs81 === errors; - valid0 = valid0 || _valid0; - } - } - } - } - if (!valid0) { - const err60 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema187.anyOf, - parentSchema: schema187, - data, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - validate202.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate202.errors = vErrors; - return errors === 0; -} -exports.validateSendSignalingMessageBodyResponse = validate203; -const schema188 = { - title: 'Sig Message', - anyOf: [ - { - title: 'Create Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'command' }, - command: { type: 'string' }, - }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'createPeerconnection' }, - connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, - connectionUrl: { type: 'string', format: 'uri' }, - services: { - type: 'array', - items: { - type: 'object', - required: ['serviceType', 'serviceId', 'remoteServiceId'], - title: 'Service Config', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - additionalProperties: true, - }, - }, - tiebreaker: { type: 'boolean' }, - config: { type: 'object', additionalProperties: true }, - }, - required: [ - 'command', - 'connectionType', - 'connectionUrl', - 'services', - 'tiebreaker', - ], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Close Peerconnection Message', - allOf: [ - { - title: 'Command Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'command' }, - command: { type: 'string' }, - }, - required: ['messageType', 'command'], - }, - ], - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - command: { const: 'closePeerconnection' }, - connectionUrl: { type: 'string', format: 'uri' }, - }, - required: ['command', 'connectionUrl'], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Signaling Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'signaling' }, - signalingType: { type: 'string' }, - connectionUrl: { type: 'string', format: 'uri' }, - content: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'signalingType', 'connectionUrl', 'content'], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Configuration Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'configuration' }, - configuration: { type: 'object', additionalProperties: true }, - }, - required: ['messageType', 'configuration'], - }, - ], - 'x-typeguard': true, - }, - { - title: 'Experiment Status Changed Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'experiment-status-changed' }, - status: { type: 'string' }, - message: { type: 'string' }, - }, - required: ['messageType', 'status'], - }, - ], - 'x-typeguard': true, - }, - ], - 'x-standalone': false, - 'x-name': 'sendSignalingMessageBodyResponse', - 'x-location': - '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate203( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - let valid0 = false; - const _errs1 = errors; - const _errs2 = errors; - const _errs3 = errors; - if (errors === _errs3) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - const err0 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema188.anyOf[0].allOf[0].allOf[0].required, - parentSchema: schema188.anyOf[0].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - const err1 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/0/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[0].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema188.anyOf[0].allOf[0].allOf[0].properties.messageType, - data: data0, - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } - } - } else { - const err2 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[0].allOf[0].allOf[0].type, - parentSchema: schema188.anyOf[0].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - var valid2 = _errs3 === errors; - if (valid2) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if ( - (data.messageType === undefined && (missing1 = 'messageType')) || - (data.command === undefined && (missing1 = 'command')) - ) { - const err3 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema188.anyOf[0].allOf[0].allOf[1].required, - parentSchema: schema188.anyOf[0].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs10 = errors; - if ('command' !== data1) { - const err4 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: schema188.anyOf[0].allOf[0].allOf[1].properties.messageType, - data: data1, - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - var valid4 = _errs10 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data.command !== undefined) { - let data2 = data.command; - const _errs11 = errors; - if (typeof data2 !== 'string') { - const err5 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[0].allOf[0].allOf[1].properties.command.type, - parentSchema: schema188.anyOf[0].allOf[0].allOf[1].properties.command, - data: data2, - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - var valid4 = _errs11 === errors; - } else { - var valid4 = true; - } - } - } - } else { - const err6 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[0].allOf[0].allOf[1].type, - parentSchema: schema188.anyOf[0].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - } - var valid2 = _errs8 === errors; - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs13 = errors; - if (errors === _errs13) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing2; - if ( - (data.command === undefined && (missing2 = 'command')) || - (data.connectionType === undefined && (missing2 = 'connectionType')) || - (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || - (data.services === undefined && (missing2 = 'services')) || - (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) - ) { - const err7 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: schema188.anyOf[0].allOf[1].required, - parentSchema: schema188.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } else { - if (data.command !== undefined) { - let data3 = data.command; - const _errs15 = errors; - if ('createPeerconnection' !== data3) { - const err8 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/0/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'createPeerconnection' }, - message: 'must be equal to constant', - schema: 'createPeerconnection', - parentSchema: schema188.anyOf[0].allOf[1].properties.command, - data: data3, - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - var valid5 = _errs15 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.connectionType !== undefined) { - let data4 = data.connectionType; - const _errs16 = errors; - if (typeof data4 !== 'string') { - const err9 = { - instancePath: instancePath + '/connectionType', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[0].allOf[1].properties.connectionType.type, - parentSchema: schema188.anyOf[0].allOf[1].properties.connectionType, - data: data4, - }; - if (vErrors === null) { - vErrors = [err9]; - } else { - vErrors.push(err9); - } - errors++; - } - if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { - const err10 = { - instancePath: instancePath + '/connectionType', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/enum', - keyword: 'enum', - params: { - allowedValues: - schema188.anyOf[0].allOf[1].properties.connectionType.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema188.anyOf[0].allOf[1].properties.connectionType.enum, - parentSchema: schema188.anyOf[0].allOf[1].properties.connectionType, - data: data4, - }; - if (vErrors === null) { - vErrors = [err10]; - } else { - vErrors.push(err10); - } - errors++; - } - var valid5 = _errs16 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.connectionUrl !== undefined) { - let data5 = data.connectionUrl; - const _errs18 = errors; - if (errors === _errs18) { - if (errors === _errs18) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - const err11 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema188.anyOf[0].allOf[1].properties.connectionUrl, - data: data5, - }; - if (vErrors === null) { - vErrors = [err11]; - } else { - vErrors.push(err11); - } - errors++; - } - } else { - const err12 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[0].allOf[1].properties.connectionUrl.type, - parentSchema: - schema188.anyOf[0].allOf[1].properties.connectionUrl, - data: data5, - }; - if (vErrors === null) { - vErrors = [err12]; - } else { - vErrors.push(err12); - } - errors++; - } - } - } - var valid5 = _errs18 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.services !== undefined) { - let data6 = data.services; - const _errs20 = errors; - if (errors === _errs20) { - if (Array.isArray(data6)) { - var valid6 = true; - const len0 = data6.length; - for (let i0 = 0; i0 < len0; i0++) { - let data7 = data6[i0]; - const _errs22 = errors; - if (errors === _errs22) { - if ( - data7 && - typeof data7 == 'object' && - !Array.isArray(data7) - ) { - let missing3; - if ( - (data7.serviceType === undefined && - (missing3 = 'serviceType')) || - (data7.serviceId === undefined && - (missing3 = 'serviceId')) || - (data7.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - const err13 = { - instancePath: instancePath + '/services/' + i0, - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/required', - keyword: 'required', - params: { missingProperty: missing3 }, - message: "must have required property '" + missing3 + "'", - schema: - schema188.anyOf[0].allOf[1].properties.services.items - .required, - parentSchema: - schema188.anyOf[0].allOf[1].properties.services.items, - data: data7, - }; - if (vErrors === null) { - vErrors = [err13]; - } else { - vErrors.push(err13); - } - errors++; - } else { - if (data7.serviceType !== undefined) { - let data8 = data7.serviceType; - const _errs25 = errors; - if (errors === _errs25) { - if (errors === _errs25) { - if (typeof data8 === 'string') { - if (!formats0(data8)) { - const err14 = { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema188.anyOf[0].allOf[1].properties - .services.items.properties.serviceType, - data: data8, - }; - if (vErrors === null) { - vErrors = [err14]; - } else { - vErrors.push(err14); - } - errors++; - } - } else { - const err15 = { - instancePath: - instancePath + - '/services/' + - i0 + - '/serviceType', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema188.anyOf[0].allOf[1].properties.services - .items.properties.serviceType.type, - parentSchema: - schema188.anyOf[0].allOf[1].properties.services - .items.properties.serviceType, - data: data8, - }; - if (vErrors === null) { - vErrors = [err15]; - } else { - vErrors.push(err15); - } - errors++; - } - } - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data7.serviceId !== undefined) { - let data9 = data7.serviceId; - const _errs27 = errors; - if (typeof data9 !== 'string') { - const err16 = { - instancePath: - instancePath + '/services/' + i0 + '/serviceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema188.anyOf[0].allOf[1].properties.services - .items.properties.serviceId.type, - parentSchema: - schema188.anyOf[0].allOf[1].properties.services - .items.properties.serviceId, - data: data9, - }; - if (vErrors === null) { - vErrors = [err16]; - } else { - vErrors.push(err16); - } - errors++; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data7.remoteServiceId !== undefined) { - let data10 = data7.remoteServiceId; - const _errs29 = errors; - if (typeof data10 !== 'string') { - const err17 = { - instancePath: - instancePath + - '/services/' + - i0 + - '/remoteServiceId', - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema188.anyOf[0].allOf[1].properties.services - .items.properties.remoteServiceId.type, - parentSchema: - schema188.anyOf[0].allOf[1].properties.services - .items.properties.remoteServiceId, - data: data10, - }; - if (vErrors === null) { - vErrors = [err17]; - } else { - vErrors.push(err17); - } - errors++; - } - var valid7 = _errs29 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - const err18 = { - instancePath: instancePath + '/services/' + i0, - schemaPath: - '#/anyOf/0/allOf/1/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema188.anyOf[0].allOf[1].properties.services.items - .type, - parentSchema: - schema188.anyOf[0].allOf[1].properties.services.items, - data: data7, - }; - if (vErrors === null) { - vErrors = [err18]; - } else { - vErrors.push(err18); - } - errors++; - } - } - var valid6 = _errs22 === errors; - if (!valid6) { - break; - } - } - } else { - const err19 = { - instancePath: instancePath + '/services', - schemaPath: '#/anyOf/0/allOf/1/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema188.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema188.anyOf[0].allOf[1].properties.services, - data: data6, - }; - if (vErrors === null) { - vErrors = [err19]; - } else { - vErrors.push(err19); - } - errors++; - } - } - var valid5 = _errs20 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.tiebreaker !== undefined) { - let data11 = data.tiebreaker; - const _errs31 = errors; - if (typeof data11 !== 'boolean') { - const err20 = { - instancePath: instancePath + '/tiebreaker', - schemaPath: '#/anyOf/0/allOf/1/properties/tiebreaker/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema188.anyOf[0].allOf[1].properties.tiebreaker.type, - parentSchema: schema188.anyOf[0].allOf[1].properties.tiebreaker, - data: data11, - }; - if (vErrors === null) { - vErrors = [err20]; - } else { - vErrors.push(err20); - } - errors++; - } - var valid5 = _errs31 === errors; - } else { - var valid5 = true; - } - if (valid5) { - if (data.config !== undefined) { - let data12 = data.config; - const _errs33 = errors; - if (errors === _errs33) { - if ( - data12 && - typeof data12 == 'object' && - !Array.isArray(data12) - ) { - } else { - const err21 = { - instancePath: instancePath + '/config', - schemaPath: '#/anyOf/0/allOf/1/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[0].allOf[1].properties.config.type, - parentSchema: schema188.anyOf[0].allOf[1].properties.config, - data: data12, - }; - if (vErrors === null) { - vErrors = [err21]; - } else { - vErrors.push(err21); - } - errors++; - } - } - var valid5 = _errs33 === errors; - } else { - var valid5 = true; - } - } - } - } - } - } - } - } else { - const err22 = { - instancePath, - schemaPath: '#/anyOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[0].allOf[1].type, - parentSchema: schema188.anyOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err22]; - } else { - vErrors.push(err22); - } - errors++; - } - } - var valid1 = _errs13 === errors; - } - var _valid0 = _errs1 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs36 = errors; - const _errs37 = errors; - const _errs38 = errors; - if (errors === _errs38) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing4; - if (data.messageType === undefined && (missing4 = 'messageType')) { - const err23 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing4 }, - message: "must have required property '" + missing4 + "'", - schema: schema188.anyOf[1].allOf[0].allOf[0].required, - parentSchema: schema188.anyOf[1].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err23]; - } else { - vErrors.push(err23); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data13 = data.messageType; - if (typeof data13 !== 'string') { - const err24 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/1/allOf/0/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[1].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema188.anyOf[1].allOf[0].allOf[0].properties.messageType, - data: data13, - }; - if (vErrors === null) { - vErrors = [err24]; - } else { - vErrors.push(err24); - } - errors++; - } - } - } - } else { - const err25 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[1].allOf[0].allOf[0].type, - parentSchema: schema188.anyOf[1].allOf[0].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err25]; - } else { - vErrors.push(err25); - } - errors++; - } - } - var valid9 = _errs38 === errors; - if (valid9) { - const _errs43 = errors; - if (errors === _errs43) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing5; - if ( - (data.messageType === undefined && (missing5 = 'messageType')) || - (data.command === undefined && (missing5 = 'command')) - ) { - const err26 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing5 }, - message: "must have required property '" + missing5 + "'", - schema: schema188.anyOf[1].allOf[0].allOf[1].required, - parentSchema: schema188.anyOf[1].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err26]; - } else { - vErrors.push(err26); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data14 = data.messageType; - const _errs45 = errors; - if ('command' !== data14) { - const err27 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'command' }, - message: 'must be equal to constant', - schema: 'command', - parentSchema: - schema188.anyOf[1].allOf[0].allOf[1].properties.messageType, - data: data14, - }; - if (vErrors === null) { - vErrors = [err27]; - } else { - vErrors.push(err27); - } - errors++; - } - var valid11 = _errs45 === errors; - } else { - var valid11 = true; - } - if (valid11) { - if (data.command !== undefined) { - let data15 = data.command; - const _errs46 = errors; - if (typeof data15 !== 'string') { - const err28 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/command/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[1].allOf[0].allOf[1].properties.command.type, - parentSchema: schema188.anyOf[1].allOf[0].allOf[1].properties.command, - data: data15, - }; - if (vErrors === null) { - vErrors = [err28]; - } else { - vErrors.push(err28); - } - errors++; - } - var valid11 = _errs46 === errors; - } else { - var valid11 = true; - } - } - } - } else { - const err29 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/0/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[1].allOf[0].allOf[1].type, - parentSchema: schema188.anyOf[1].allOf[0].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err29]; - } else { - vErrors.push(err29); - } - errors++; - } - } - var valid9 = _errs43 === errors; - } - var valid8 = _errs37 === errors; - if (valid8) { - const _errs48 = errors; - if (errors === _errs48) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing6; - if ( - (data.command === undefined && (missing6 = 'command')) || - (data.connectionUrl === undefined && (missing6 = 'connectionUrl')) - ) { - const err30 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing6 }, - message: "must have required property '" + missing6 + "'", - schema: schema188.anyOf[1].allOf[1].required, - parentSchema: schema188.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err30]; - } else { - vErrors.push(err30); - } - errors++; - } else { - if (data.command !== undefined) { - let data16 = data.command; - const _errs50 = errors; - if ('closePeerconnection' !== data16) { - const err31 = { - instancePath: instancePath + '/command', - schemaPath: '#/anyOf/1/allOf/1/properties/command/const', - keyword: 'const', - params: { allowedValue: 'closePeerconnection' }, - message: 'must be equal to constant', - schema: 'closePeerconnection', - parentSchema: schema188.anyOf[1].allOf[1].properties.command, - data: data16, - }; - if (vErrors === null) { - vErrors = [err31]; - } else { - vErrors.push(err31); - } - errors++; - } - var valid12 = _errs50 === errors; - } else { - var valid12 = true; - } - if (valid12) { - if (data.connectionUrl !== undefined) { - let data17 = data.connectionUrl; - const _errs51 = errors; - if (errors === _errs51) { - if (errors === _errs51) { - if (typeof data17 === 'string') { - if (!formats0(data17)) { - const err32 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema188.anyOf[1].allOf[1].properties.connectionUrl, - data: data17, - }; - if (vErrors === null) { - vErrors = [err32]; - } else { - vErrors.push(err32); - } - errors++; - } - } else { - const err33 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[1].allOf[1].properties.connectionUrl.type, - parentSchema: - schema188.anyOf[1].allOf[1].properties.connectionUrl, - data: data17, - }; - if (vErrors === null) { - vErrors = [err33]; - } else { - vErrors.push(err33); - } - errors++; - } - } - } - var valid12 = _errs51 === errors; - } else { - var valid12 = true; - } - } - } - } else { - const err34 = { - instancePath, - schemaPath: '#/anyOf/1/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[1].allOf[1].type, - parentSchema: schema188.anyOf[1].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err34]; - } else { - vErrors.push(err34); - } - errors++; - } - } - var valid8 = _errs48 === errors; - } - var _valid0 = _errs36 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs53 = errors; - const _errs54 = errors; - if (errors === _errs54) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing7; - if (data.messageType === undefined && (missing7 = 'messageType')) { - const err35 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing7 }, - message: "must have required property '" + missing7 + "'", - schema: schema188.anyOf[2].allOf[0].required, - parentSchema: schema188.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err35]; - } else { - vErrors.push(err35); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data18 = data.messageType; - if (typeof data18 !== 'string') { - const err36 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/2/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[2].allOf[0].properties.messageType.type, - parentSchema: schema188.anyOf[2].allOf[0].properties.messageType, - data: data18, - }; - if (vErrors === null) { - vErrors = [err36]; - } else { - vErrors.push(err36); - } - errors++; - } - } - } - } else { - const err37 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[2].allOf[0].type, - parentSchema: schema188.anyOf[2].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err37]; - } else { - vErrors.push(err37); - } - errors++; - } - } - var valid13 = _errs54 === errors; - if (valid13) { - const _errs59 = errors; - if (errors === _errs59) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing8; - if ( - (data.messageType === undefined && (missing8 = 'messageType')) || - (data.signalingType === undefined && (missing8 = 'signalingType')) || - (data.connectionUrl === undefined && (missing8 = 'connectionUrl')) || - (data.content === undefined && (missing8 = 'content')) - ) { - const err38 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing8 }, - message: "must have required property '" + missing8 + "'", - schema: schema188.anyOf[2].allOf[1].required, - parentSchema: schema188.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err38]; - } else { - vErrors.push(err38); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data19 = data.messageType; - const _errs61 = errors; - if ('signaling' !== data19) { - const err39 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/2/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'signaling' }, - message: 'must be equal to constant', - schema: 'signaling', - parentSchema: schema188.anyOf[2].allOf[1].properties.messageType, - data: data19, - }; - if (vErrors === null) { - vErrors = [err39]; - } else { - vErrors.push(err39); - } - errors++; - } - var valid15 = _errs61 === errors; - } else { - var valid15 = true; - } - if (valid15) { - if (data.signalingType !== undefined) { - let data20 = data.signalingType; - const _errs62 = errors; - if (typeof data20 !== 'string') { - const err40 = { - instancePath: instancePath + '/signalingType', - schemaPath: '#/anyOf/2/allOf/1/properties/signalingType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[2].allOf[1].properties.signalingType.type, - parentSchema: schema188.anyOf[2].allOf[1].properties.signalingType, - data: data20, - }; - if (vErrors === null) { - vErrors = [err40]; - } else { - vErrors.push(err40); - } - errors++; - } - var valid15 = _errs62 === errors; - } else { - var valid15 = true; - } - if (valid15) { - if (data.connectionUrl !== undefined) { - let data21 = data.connectionUrl; - const _errs64 = errors; - if (errors === _errs64) { - if (errors === _errs64) { - if (typeof data21 === 'string') { - if (!formats0(data21)) { - const err41 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: - '#/anyOf/2/allOf/1/properties/connectionUrl/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema188.anyOf[2].allOf[1].properties.connectionUrl, - data: data21, - }; - if (vErrors === null) { - vErrors = [err41]; - } else { - vErrors.push(err41); - } - errors++; - } - } else { - const err42 = { - instancePath: instancePath + '/connectionUrl', - schemaPath: '#/anyOf/2/allOf/1/properties/connectionUrl/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema188.anyOf[2].allOf[1].properties.connectionUrl.type, - parentSchema: - schema188.anyOf[2].allOf[1].properties.connectionUrl, - data: data21, - }; - if (vErrors === null) { - vErrors = [err42]; - } else { - vErrors.push(err42); - } - errors++; - } - } - } - var valid15 = _errs64 === errors; - } else { - var valid15 = true; - } - if (valid15) { - if (data.content !== undefined) { - let data22 = data.content; - const _errs66 = errors; - if (errors === _errs66) { - if ( - data22 && - typeof data22 == 'object' && - !Array.isArray(data22) - ) { - } else { - const err43 = { - instancePath: instancePath + '/content', - schemaPath: '#/anyOf/2/allOf/1/properties/content/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[2].allOf[1].properties.content.type, - parentSchema: schema188.anyOf[2].allOf[1].properties.content, - data: data22, - }; - if (vErrors === null) { - vErrors = [err43]; - } else { - vErrors.push(err43); - } - errors++; - } - } - var valid15 = _errs66 === errors; - } else { - var valid15 = true; - } - } - } - } - } - } else { - const err44 = { - instancePath, - schemaPath: '#/anyOf/2/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[2].allOf[1].type, - parentSchema: schema188.anyOf[2].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err44]; - } else { - vErrors.push(err44); - } - errors++; - } - } - var valid13 = _errs59 === errors; - } - var _valid0 = _errs53 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs69 = errors; - const _errs70 = errors; - if (errors === _errs70) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing9; - if (data.messageType === undefined && (missing9 = 'messageType')) { - const err45 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing9 }, - message: "must have required property '" + missing9 + "'", - schema: schema188.anyOf[3].allOf[0].required, - parentSchema: schema188.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err45]; - } else { - vErrors.push(err45); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data23 = data.messageType; - if (typeof data23 !== 'string') { - const err46 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/3/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[3].allOf[0].properties.messageType.type, - parentSchema: schema188.anyOf[3].allOf[0].properties.messageType, - data: data23, - }; - if (vErrors === null) { - vErrors = [err46]; - } else { - vErrors.push(err46); - } - errors++; - } - } - } - } else { - const err47 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[3].allOf[0].type, - parentSchema: schema188.anyOf[3].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err47]; - } else { - vErrors.push(err47); - } - errors++; - } - } - var valid16 = _errs70 === errors; - if (valid16) { - const _errs75 = errors; - if (errors === _errs75) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing10; - if ( - (data.messageType === undefined && (missing10 = 'messageType')) || - (data.configuration === undefined && (missing10 = 'configuration')) - ) { - const err48 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing10 }, - message: "must have required property '" + missing10 + "'", - schema: schema188.anyOf[3].allOf[1].required, - parentSchema: schema188.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err48]; - } else { - vErrors.push(err48); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data24 = data.messageType; - const _errs77 = errors; - if ('configuration' !== data24) { - const err49 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/3/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'configuration' }, - message: 'must be equal to constant', - schema: 'configuration', - parentSchema: schema188.anyOf[3].allOf[1].properties.messageType, - data: data24, - }; - if (vErrors === null) { - vErrors = [err49]; - } else { - vErrors.push(err49); - } - errors++; - } - var valid18 = _errs77 === errors; - } else { - var valid18 = true; - } - if (valid18) { - if (data.configuration !== undefined) { - let data25 = data.configuration; - const _errs78 = errors; - if (errors === _errs78) { - if (data25 && typeof data25 == 'object' && !Array.isArray(data25)) { - } else { - const err50 = { - instancePath: instancePath + '/configuration', - schemaPath: '#/anyOf/3/allOf/1/properties/configuration/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema188.anyOf[3].allOf[1].properties.configuration.type, - parentSchema: - schema188.anyOf[3].allOf[1].properties.configuration, - data: data25, - }; - if (vErrors === null) { - vErrors = [err50]; - } else { - vErrors.push(err50); - } - errors++; - } - } - var valid18 = _errs78 === errors; - } else { - var valid18 = true; - } - } - } - } else { - const err51 = { - instancePath, - schemaPath: '#/anyOf/3/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[3].allOf[1].type, - parentSchema: schema188.anyOf[3].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err51]; - } else { - vErrors.push(err51); - } - errors++; - } - } - var valid16 = _errs75 === errors; - } - var _valid0 = _errs69 === errors; - valid0 = valid0 || _valid0; - if (!valid0) { - const _errs81 = errors; - const _errs82 = errors; - if (errors === _errs82) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing11; - if (data.messageType === undefined && (missing11 = 'messageType')) { - const err52 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing11 }, - message: "must have required property '" + missing11 + "'", - schema: schema188.anyOf[4].allOf[0].required, - parentSchema: schema188.anyOf[4].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err52]; - } else { - vErrors.push(err52); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data26 = data.messageType; - if (typeof data26 !== 'string') { - const err53 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/4/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[4].allOf[0].properties.messageType.type, - parentSchema: schema188.anyOf[4].allOf[0].properties.messageType, - data: data26, - }; - if (vErrors === null) { - vErrors = [err53]; - } else { - vErrors.push(err53); - } - errors++; - } - } - } - } else { - const err54 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[4].allOf[0].type, - parentSchema: schema188.anyOf[4].allOf[0], - data, - }; - if (vErrors === null) { - vErrors = [err54]; - } else { - vErrors.push(err54); - } - errors++; - } - } - var valid19 = _errs82 === errors; - if (valid19) { - const _errs87 = errors; - if (errors === _errs87) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing12; - if ( - (data.messageType === undefined && (missing12 = 'messageType')) || - (data.status === undefined && (missing12 = 'status')) - ) { - const err55 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing12 }, - message: "must have required property '" + missing12 + "'", - schema: schema188.anyOf[4].allOf[1].required, - parentSchema: schema188.anyOf[4].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err55]; - } else { - vErrors.push(err55); - } - errors++; - } else { - if (data.messageType !== undefined) { - let data27 = data.messageType; - const _errs89 = errors; - if ('experiment-status-changed' !== data27) { - const err56 = { - instancePath: instancePath + '/messageType', - schemaPath: '#/anyOf/4/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'experiment-status-changed' }, - message: 'must be equal to constant', - schema: 'experiment-status-changed', - parentSchema: schema188.anyOf[4].allOf[1].properties.messageType, - data: data27, - }; - if (vErrors === null) { - vErrors = [err56]; - } else { - vErrors.push(err56); - } - errors++; - } - var valid21 = _errs89 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data.status !== undefined) { - let data28 = data.status; - const _errs90 = errors; - if (typeof data28 !== 'string') { - const err57 = { - instancePath: instancePath + '/status', - schemaPath: '#/anyOf/4/allOf/1/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[4].allOf[1].properties.status.type, - parentSchema: schema188.anyOf[4].allOf[1].properties.status, - data: data28, - }; - if (vErrors === null) { - vErrors = [err57]; - } else { - vErrors.push(err57); - } - errors++; - } - var valid21 = _errs90 === errors; - } else { - var valid21 = true; - } - if (valid21) { - if (data.message !== undefined) { - let data29 = data.message; - const _errs92 = errors; - if (typeof data29 !== 'string') { - const err58 = { - instancePath: instancePath + '/message', - schemaPath: '#/anyOf/4/allOf/1/properties/message/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema188.anyOf[4].allOf[1].properties.message.type, - parentSchema: schema188.anyOf[4].allOf[1].properties.message, - data: data29, - }; - if (vErrors === null) { - vErrors = [err58]; - } else { - vErrors.push(err58); - } - errors++; - } - var valid21 = _errs92 === errors; - } else { - var valid21 = true; - } - } - } - } - } else { - const err59 = { - instancePath, - schemaPath: '#/anyOf/4/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema188.anyOf[4].allOf[1].type, - parentSchema: schema188.anyOf[4].allOf[1], - data, - }; - if (vErrors === null) { - vErrors = [err59]; - } else { - vErrors.push(err59); - } - errors++; - } - } - var valid19 = _errs87 === errors; - } - var _valid0 = _errs81 === errors; - valid0 = valid0 || _valid0; - } - } - } - } - if (!valid0) { - const err60 = { - instancePath, - schemaPath: '#/anyOf', - keyword: 'anyOf', - params: {}, - message: 'must match a schema in anyOf', - schema: schema188.anyOf, - parentSchema: schema188, - data, - }; - if (vErrors === null) { - vErrors = [err60]; - } else { - vErrors.push(err60); - } - errors++; - validate203.errors = vErrors; - return false; - } else { - errors = _errs0; - if (vErrors !== null) { - if (_errs0) { - vErrors.length = _errs0; - } else { - vErrors = null; - } - } - } - validate203.errors = vErrors; - return errors === 0; -} -exports.validateListPeerconnectionsResponse200Request = validate204; -const schema189 = { - type: 'array', - items: { - title: 'Peerconnection Overview', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - }, - 'x-standalone': false, - 'x-name': 'listPeerconnectionsResponse200Request', - 'x-location': - '#/paths//peerconnections/get/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate204( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if (data0.type === undefined && (missing0 = 'type')) { - validate204.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema189.items.allOf[0].required, - parentSchema: schema189.items.allOf[0], - data: data0, - }, - ]; - return false; - } else { - if (data0.type !== undefined) { - let data1 = data0.type; - if (typeof data1 !== 'string') { - validate204.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema189.items.allOf[0].properties.type.type, - parentSchema: schema189.items.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate204.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema189.items.allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema189.items.allOf[0].properties.type.enum, - parentSchema: schema189.items.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - } - } - } else { - validate204.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema189.items.allOf[0].type, - parentSchema: schema189.items.allOf[0], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs6 = errors; - if (errors === _errs6) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing1; - if (data0.devices === undefined && (missing1 = 'devices')) { - validate204.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema189.items.allOf[1].required, - parentSchema: schema189.items.allOf[1], - data: data0, - }, - ]; - return false; - } else { - if (data0.devices !== undefined) { - let data2 = data0.devices; - const _errs8 = errors; - if (errors === _errs8) { - if (Array.isArray(data2)) { - if (data2.length > 2) { - validate204.errors = [ - { - instancePath: instancePath + '/' + i0 + '/devices', - schemaPath: '#/items/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema189.items.allOf[1].properties.devices, - data: data2, - }, - ]; - return false; - } else { - if (data2.length < 2) { - validate204.errors = [ - { - instancePath: instancePath + '/' + i0 + '/devices', - schemaPath: '#/items/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema189.items.allOf[1].properties.devices, - data: data2, - }, - ]; - return false; - } else { - var valid4 = true; - const len1 = data2.length; - for (let i1 = 0; i1 < len1; i1++) { - let data3 = data2[i1]; - const _errs10 = errors; - if (errors === _errs10) { - if ( - data3 && - typeof data3 == 'object' && - !Array.isArray(data3) - ) { - let missing2; - if (data3.url === undefined && (missing2 = 'url')) { - validate204.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/devices/' + i1, - schemaPath: - '#/items/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema189.items.allOf[1].properties.devices.items - .required, - parentSchema: - schema189.items.allOf[1].properties.devices.items, - data: data3, - }, - ]; - return false; - } else { - if (data3.url !== undefined) { - let data4 = data3.url; - const _errs12 = errors; - if (errors === _errs12) { - if (errors === _errs12) { - if (typeof data4 === 'string') { - if (!formats0(data4)) { - validate204.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/devices/' + - i1 + - '/url', - schemaPath: - '#/items/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema189.items.allOf[1].properties - .devices.items.properties.url, - data: data4, - }, - ]; - return false; - } - } else { - validate204.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/devices/' + - i1 + - '/url', - schemaPath: - '#/items/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema189.items.allOf[1].properties - .devices.items.properties.url.type, - parentSchema: - schema189.items.allOf[1].properties - .devices.items.properties.url, - data: data4, - }, - ]; - return false; - } - } - } - } - } - } else { - validate204.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/devices/' + i1, - schemaPath: - '#/items/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema189.items.allOf[1].properties.devices.items - .type, - parentSchema: - schema189.items.allOf[1].properties.devices.items, - data: data3, - }, - ]; - return false; - } - } - var valid4 = _errs10 === errors; - if (!valid4) { - break; - } - } - } - } - } else { - validate204.errors = [ - { - instancePath: instancePath + '/' + i0 + '/devices', - schemaPath: '#/items/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema189.items.allOf[1].properties.devices.type, - parentSchema: schema189.items.allOf[1].properties.devices, - data: data2, - }, - ]; - return false; - } - } - } - } - } else { - validate204.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema189.items.allOf[1].type, - parentSchema: schema189.items.allOf[1], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs6 === errors; - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate204.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema189.type, - parentSchema: schema189, - data, - }, - ]; - return false; - } - } - validate204.errors = vErrors; - return errors === 0; -} -exports.validateListPeerconnectionsResponse200Response = validate205; -const schema190 = { - type: 'array', - items: { - title: 'Peerconnection Overview', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - }, - 'x-standalone': false, - 'x-name': 'listPeerconnectionsResponse200Response', - 'x-location': - '#/paths//peerconnections/get/responses/200/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate205( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (Array.isArray(data)) { - var valid0 = true; - const len0 = data.length; - for (let i0 = 0; i0 < len0; i0++) { - let data0 = data[i0]; - const _errs1 = errors; - const _errs2 = errors; - if (errors === _errs2) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing0; - if ( - (data0.url === undefined && (missing0 = 'url')) || - (data0.type === undefined && (missing0 = 'type')) || - (data0.status === undefined && (missing0 = 'status')) - ) { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema190.items.allOf[0].required, - parentSchema: schema190.items.allOf[0], - data: data0, - }, - ]; - return false; - } else { - if (data0.url !== undefined) { - let data1 = data0.url; - const _errs4 = errors; - if (errors === _errs4) { - if (errors === _errs4) { - if (typeof data1 === 'string') { - if (!formats0(data1)) { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0 + '/url', - schemaPath: '#/items/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema190.items.allOf[0].properties.url, - data: data1, - }, - ]; - return false; - } - } else { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0 + '/url', - schemaPath: '#/items/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema190.items.allOf[0].properties.url.type, - parentSchema: schema190.items.allOf[0].properties.url, - data: data1, - }, - ]; - return false; - } - } - } - var valid2 = _errs4 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.type !== undefined) { - let data2 = data0.type; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema190.items.allOf[0].properties.type.type, - parentSchema: schema190.items.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - if (!(data2 === 'local' || data2 === 'webrtc')) { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0 + '/type', - schemaPath: '#/items/allOf/0/properties/type/enum', - keyword: 'enum', - params: { - allowedValues: schema190.items.allOf[0].properties.type.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema190.items.allOf[0].properties.type.enum, - parentSchema: schema190.items.allOf[0].properties.type, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs6 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data0.status !== undefined) { - let data3 = data0.status; - const _errs8 = errors; - if (typeof data3 !== 'string') { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0 + '/status', - schemaPath: '#/items/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema190.items.allOf[0].properties.status.type, - parentSchema: schema190.items.allOf[0].properties.status, - data: data3, - }, - ]; - return false; - } - if ( - !( - data3 === 'new' || - data3 === 'connecting' || - data3 === 'connected' || - data3 === 'disconnected' || - data3 === 'failed' || - data3 === 'closed' - ) - ) { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0 + '/status', - schemaPath: '#/items/allOf/0/properties/status/enum', - keyword: 'enum', - params: { - allowedValues: - schema190.items.allOf[0].properties.status.enum, - }, - message: 'must be equal to one of the allowed values', - schema: schema190.items.allOf[0].properties.status.enum, - parentSchema: schema190.items.allOf[0].properties.status, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema190.items.allOf[0].type, - parentSchema: schema190.items.allOf[0], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs2 === errors; - if (valid1) { - const _errs10 = errors; - if (errors === _errs10) { - if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { - let missing1; - if (data0.devices === undefined && (missing1 = 'devices')) { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema190.items.allOf[1].required, - parentSchema: schema190.items.allOf[1], - data: data0, - }, - ]; - return false; - } else { - if (data0.devices !== undefined) { - let data4 = data0.devices; - const _errs12 = errors; - if (errors === _errs12) { - if (Array.isArray(data4)) { - if (data4.length > 2) { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0 + '/devices', - schemaPath: '#/items/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema190.items.allOf[1].properties.devices, - data: data4, - }, - ]; - return false; - } else { - if (data4.length < 2) { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0 + '/devices', - schemaPath: '#/items/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema190.items.allOf[1].properties.devices, - data: data4, - }, - ]; - return false; - } else { - var valid4 = true; - const len1 = data4.length; - for (let i1 = 0; i1 < len1; i1++) { - let data5 = data4[i1]; - const _errs14 = errors; - if (errors === _errs14) { - if ( - data5 && - typeof data5 == 'object' && - !Array.isArray(data5) - ) { - let missing2; - if (data5.url === undefined && (missing2 = 'url')) { - validate205.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/devices/' + i1, - schemaPath: - '#/items/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: - "must have required property '" + missing2 + "'", - schema: - schema190.items.allOf[1].properties.devices.items - .required, - parentSchema: - schema190.items.allOf[1].properties.devices.items, - data: data5, - }, - ]; - return false; - } else { - if (data5.url !== undefined) { - let data6 = data5.url; - const _errs16 = errors; - if (errors === _errs16) { - if (errors === _errs16) { - if (typeof data6 === 'string') { - if (!formats0(data6)) { - validate205.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/devices/' + - i1 + - '/url', - schemaPath: - '#/items/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema190.items.allOf[1].properties - .devices.items.properties.url, - data: data6, - }, - ]; - return false; - } - } else { - validate205.errors = [ - { - instancePath: - instancePath + - '/' + - i0 + - '/devices/' + - i1 + - '/url', - schemaPath: - '#/items/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema190.items.allOf[1].properties - .devices.items.properties.url.type, - parentSchema: - schema190.items.allOf[1].properties - .devices.items.properties.url, - data: data6, - }, - ]; - return false; - } - } - } - } - } - } else { - validate205.errors = [ - { - instancePath: - instancePath + '/' + i0 + '/devices/' + i1, - schemaPath: - '#/items/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema190.items.allOf[1].properties.devices.items - .type, - parentSchema: - schema190.items.allOf[1].properties.devices.items, - data: data5, - }, - ]; - return false; - } - } - var valid4 = _errs14 === errors; - if (!valid4) { - break; - } - } - } - } - } else { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0 + '/devices', - schemaPath: '#/items/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema190.items.allOf[1].properties.devices.type, - parentSchema: schema190.items.allOf[1].properties.devices, - data: data4, - }, - ]; - return false; - } - } - } - } - } else { - validate205.errors = [ - { - instancePath: instancePath + '/' + i0, - schemaPath: '#/items/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema190.items.allOf[1].type, - parentSchema: schema190.items.allOf[1], - data: data0, - }, - ]; - return false; - } - } - var valid1 = _errs10 === errors; - } - var valid0 = _errs1 === errors; - if (!valid0) { - break; - } - } - } else { - validate205.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema190.type, - parentSchema: schema190, - data, - }, - ]; - return false; - } - } - validate205.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionBodyRequest = validate206; -const schema191 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createPeerconnectionBodyRequest', - 'x-location': - '#/paths//peerconnections/post/requestBody/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate206( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate206.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema191.allOf[0].required, - parentSchema: schema191.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.type !== undefined) { - let data0 = data.type; - if (typeof data0 !== 'string') { - validate206.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema191.allOf[0].properties.type.type, - parentSchema: schema191.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - if (!(data0 === 'local' || data0 === 'webrtc')) { - validate206.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema191.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema191.allOf[0].properties.type.enum, - parentSchema: schema191.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate206.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema191.allOf[0].type, - parentSchema: schema191.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs4 = errors; - if (errors === _errs4) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate206.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema191.allOf[1].required, - parentSchema: schema191.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data1 = data.devices; - const _errs6 = errors; - if (errors === _errs6) { - if (Array.isArray(data1)) { - if (data1.length > 2) { - validate206.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema191.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - if (data1.length < 2) { - validate206.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema191.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; - const _errs8 = errors; - if (errors === _errs8) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - let missing2; - if (data2.url === undefined && (missing2 = 'url')) { - validate206.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema191.allOf[1].properties.devices.items.required, - parentSchema: schema191.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } else { - if (data2.url !== undefined) { - let data3 = data2.url; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate206.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema191.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } else { - validate206.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema191.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema191.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } - } - var valid4 = _errs10 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data2.config !== undefined) { - let data4 = data2.config; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data4 && - typeof data4 == 'object' && - !Array.isArray(data4) - ) { - if (data4.services !== undefined) { - let data5 = data4.services; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid6 = true; - const len1 = data5.length; - for (let i1 = 0; i1 < len1; i1++) { - let data6 = data5[i1]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing3; - if ( - (data6.serviceType === undefined && - (missing3 = 'serviceType')) || - (data6.serviceId === undefined && - (missing3 = 'serviceId')) || - (data6.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate206.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema191.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema191.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.serviceType !== undefined) { - let data7 = data6.serviceType; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate206.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema191.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data7, - }, - ]; - return false; - } - } else { - validate206.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema191.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema191.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data7, - }, - ]; - return false; - } - } - } - var valid7 = _errs19 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data6.serviceId !== undefined) { - let data8 = data6.serviceId; - const _errs21 = errors; - if (typeof data8 !== 'string') { - validate206.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema191.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId - .type, - parentSchema: - schema191.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId, - data: data8, - }, - ]; - return false; - } - var valid7 = _errs21 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data6.remoteServiceId !== - undefined - ) { - let data9 = data6.remoteServiceId; - const _errs23 = errors; - if (typeof data9 !== 'string') { - validate206.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema191.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema191.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data9, - }, - ]; - return false; - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate206.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema191.allOf[1].properties - .devices.items.properties.config - .properties.services.items.type, - parentSchema: - schema191.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data6, - }, - ]; - return false; - } - } - var valid6 = _errs16 === errors; - if (!valid6) { - break; - } - } - } else { - validate206.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema191.allOf[1].properties.devices - .items.properties.config.properties - .services.type, - parentSchema: - schema191.allOf[1].properties.devices - .items.properties.config.properties - .services, - data: data5, - }, - ]; - return false; - } - } - } - } else { - validate206.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema191.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema191.allOf[1].properties.devices.items - .properties.config, - data: data4, - }, - ]; - return false; - } - } - var valid4 = _errs12 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate206.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema191.allOf[1].properties.devices.items.type, - parentSchema: schema191.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } - } - var valid3 = _errs8 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate206.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema191.allOf[1].properties.devices.type, - parentSchema: schema191.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } - } - } - } - } else { - validate206.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema191.allOf[1].type, - parentSchema: schema191.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs4 === errors; - } - validate206.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionBodyResponse = validate207; -const schema192 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createPeerconnectionBodyResponse', - 'x-location': - '#/paths//peerconnections/post/requestBody/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate207( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate207.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema192.allOf[0].required, - parentSchema: schema192.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate207.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema192.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate207.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema192.allOf[0].properties.url.type, - parentSchema: schema192.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate207.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema192.allOf[0].properties.type.type, - parentSchema: schema192.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate207.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema192.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema192.allOf[0].properties.type.enum, - parentSchema: schema192.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate207.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema192.allOf[0].properties.status.type, - parentSchema: schema192.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate207.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema192.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema192.allOf[0].properties.status.enum, - parentSchema: schema192.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate207.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema192.allOf[0].type, - parentSchema: schema192.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate207.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema192.allOf[1].required, - parentSchema: schema192.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate207.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema192.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate207.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema192.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate207.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema192.allOf[1].properties.devices.items.required, - parentSchema: schema192.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate207.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema192.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate207.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema192.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema192.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.config !== undefined) { - let data6 = data4.config; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - if (data6.services !== undefined) { - let data7 = data6.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid6 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing3; - if ( - (data8.serviceType === undefined && - (missing3 = 'serviceType')) || - (data8.serviceId === undefined && - (missing3 = 'serviceId')) || - (data8.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate207.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema192.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema192.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.serviceType !== undefined) { - let data9 = data8.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate207.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema192.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } else { - validate207.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema192.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema192.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data8.serviceId !== undefined) { - let data10 = data8.serviceId; - const _errs25 = errors; - if (typeof data10 !== 'string') { - validate207.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema192.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId - .type, - parentSchema: - schema192.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId, - data: data10, - }, - ]; - return false; - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data8.remoteServiceId !== - undefined - ) { - let data11 = - data8.remoteServiceId; - const _errs27 = errors; - if (typeof data11 !== 'string') { - validate207.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema192.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema192.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data11, - }, - ]; - return false; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate207.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema192.allOf[1].properties - .devices.items.properties.config - .properties.services.items.type, - parentSchema: - schema192.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } - } - var valid6 = _errs20 === errors; - if (!valid6) { - break; - } - } - } else { - validate207.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema192.allOf[1].properties.devices - .items.properties.config.properties - .services.type, - parentSchema: - schema192.allOf[1].properties.devices - .items.properties.config.properties - .services, - data: data7, - }, - ]; - return false; - } - } - } - } else { - validate207.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema192.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema192.allOf[1].properties.devices.items - .properties.config, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate207.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema192.allOf[1].properties.devices.items.type, - parentSchema: schema192.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate207.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema192.allOf[1].properties.devices.type, - parentSchema: schema192.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate207.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema192.allOf[1].type, - parentSchema: schema192.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate207.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionResponse201Request = validate208; -const schema193 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createPeerconnectionResponse201Request', - 'x-location': - '#/paths//peerconnections/post/responses/201/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate208( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate208.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema193.allOf[0].required, - parentSchema: schema193.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.type !== undefined) { - let data0 = data.type; - if (typeof data0 !== 'string') { - validate208.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema193.allOf[0].properties.type.type, - parentSchema: schema193.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - if (!(data0 === 'local' || data0 === 'webrtc')) { - validate208.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema193.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema193.allOf[0].properties.type.enum, - parentSchema: schema193.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate208.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema193.allOf[0].type, - parentSchema: schema193.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs4 = errors; - if (errors === _errs4) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate208.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema193.allOf[1].required, - parentSchema: schema193.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data1 = data.devices; - const _errs6 = errors; - if (errors === _errs6) { - if (Array.isArray(data1)) { - if (data1.length > 2) { - validate208.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema193.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - if (data1.length < 2) { - validate208.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema193.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; - const _errs8 = errors; - if (errors === _errs8) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - let missing2; - if (data2.url === undefined && (missing2 = 'url')) { - validate208.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema193.allOf[1].properties.devices.items.required, - parentSchema: schema193.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } else { - if (data2.url !== undefined) { - let data3 = data2.url; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate208.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema193.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } else { - validate208.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema193.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema193.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } - } - var valid4 = _errs10 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data2.config !== undefined) { - let data4 = data2.config; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data4 && - typeof data4 == 'object' && - !Array.isArray(data4) - ) { - if (data4.services !== undefined) { - let data5 = data4.services; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid6 = true; - const len1 = data5.length; - for (let i1 = 0; i1 < len1; i1++) { - let data6 = data5[i1]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing3; - if ( - (data6.serviceType === undefined && - (missing3 = 'serviceType')) || - (data6.serviceId === undefined && - (missing3 = 'serviceId')) || - (data6.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate208.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema193.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema193.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.serviceType !== undefined) { - let data7 = data6.serviceType; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate208.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema193.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data7, - }, - ]; - return false; - } - } else { - validate208.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema193.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema193.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data7, - }, - ]; - return false; - } - } - } - var valid7 = _errs19 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data6.serviceId !== undefined) { - let data8 = data6.serviceId; - const _errs21 = errors; - if (typeof data8 !== 'string') { - validate208.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema193.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId - .type, - parentSchema: - schema193.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId, - data: data8, - }, - ]; - return false; - } - var valid7 = _errs21 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data6.remoteServiceId !== - undefined - ) { - let data9 = data6.remoteServiceId; - const _errs23 = errors; - if (typeof data9 !== 'string') { - validate208.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema193.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema193.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data9, - }, - ]; - return false; - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate208.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema193.allOf[1].properties - .devices.items.properties.config - .properties.services.items.type, - parentSchema: - schema193.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data6, - }, - ]; - return false; - } - } - var valid6 = _errs16 === errors; - if (!valid6) { - break; - } - } - } else { - validate208.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema193.allOf[1].properties.devices - .items.properties.config.properties - .services.type, - parentSchema: - schema193.allOf[1].properties.devices - .items.properties.config.properties - .services, - data: data5, - }, - ]; - return false; - } - } - } - } else { - validate208.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema193.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema193.allOf[1].properties.devices.items - .properties.config, - data: data4, - }, - ]; - return false; - } - } - var valid4 = _errs12 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate208.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema193.allOf[1].properties.devices.items.type, - parentSchema: schema193.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } - } - var valid3 = _errs8 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate208.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema193.allOf[1].properties.devices.type, - parentSchema: schema193.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } - } - } - } - } else { - validate208.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema193.allOf[1].type, - parentSchema: schema193.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs4 === errors; - } - validate208.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionResponse201Response = validate209; -const schema194 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createPeerconnectionResponse201Response', - 'x-location': - '#/paths//peerconnections/post/responses/201/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate209( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate209.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema194.allOf[0].required, - parentSchema: schema194.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate209.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema194.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate209.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema194.allOf[0].properties.url.type, - parentSchema: schema194.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate209.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema194.allOf[0].properties.type.type, - parentSchema: schema194.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate209.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema194.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema194.allOf[0].properties.type.enum, - parentSchema: schema194.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate209.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema194.allOf[0].properties.status.type, - parentSchema: schema194.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate209.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema194.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema194.allOf[0].properties.status.enum, - parentSchema: schema194.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate209.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema194.allOf[0].type, - parentSchema: schema194.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate209.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema194.allOf[1].required, - parentSchema: schema194.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate209.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema194.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate209.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema194.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate209.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema194.allOf[1].properties.devices.items.required, - parentSchema: schema194.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate209.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema194.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate209.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema194.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema194.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.config !== undefined) { - let data6 = data4.config; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - if (data6.services !== undefined) { - let data7 = data6.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid6 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing3; - if ( - (data8.serviceType === undefined && - (missing3 = 'serviceType')) || - (data8.serviceId === undefined && - (missing3 = 'serviceId')) || - (data8.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate209.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema194.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema194.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.serviceType !== undefined) { - let data9 = data8.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate209.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema194.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } else { - validate209.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema194.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema194.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data8.serviceId !== undefined) { - let data10 = data8.serviceId; - const _errs25 = errors; - if (typeof data10 !== 'string') { - validate209.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema194.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId - .type, - parentSchema: - schema194.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId, - data: data10, - }, - ]; - return false; - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data8.remoteServiceId !== - undefined - ) { - let data11 = - data8.remoteServiceId; - const _errs27 = errors; - if (typeof data11 !== 'string') { - validate209.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema194.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema194.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data11, - }, - ]; - return false; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate209.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema194.allOf[1].properties - .devices.items.properties.config - .properties.services.items.type, - parentSchema: - schema194.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } - } - var valid6 = _errs20 === errors; - if (!valid6) { - break; - } - } - } else { - validate209.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema194.allOf[1].properties.devices - .items.properties.config.properties - .services.type, - parentSchema: - schema194.allOf[1].properties.devices - .items.properties.config.properties - .services, - data: data7, - }, - ]; - return false; - } - } - } - } else { - validate209.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema194.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema194.allOf[1].properties.devices.items - .properties.config, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate209.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema194.allOf[1].properties.devices.items.type, - parentSchema: schema194.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate209.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema194.allOf[1].properties.devices.type, - parentSchema: schema194.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate209.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema194.allOf[1].type, - parentSchema: schema194.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate209.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionResponse202Request = validate210; -const schema195 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createPeerconnectionResponse202Request', - 'x-location': - '#/paths//peerconnections/post/responses/202/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate210( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate210.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema195.allOf[0].required, - parentSchema: schema195.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.type !== undefined) { - let data0 = data.type; - if (typeof data0 !== 'string') { - validate210.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema195.allOf[0].properties.type.type, - parentSchema: schema195.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - if (!(data0 === 'local' || data0 === 'webrtc')) { - validate210.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema195.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema195.allOf[0].properties.type.enum, - parentSchema: schema195.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate210.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema195.allOf[0].type, - parentSchema: schema195.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs4 = errors; - if (errors === _errs4) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate210.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema195.allOf[1].required, - parentSchema: schema195.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data1 = data.devices; - const _errs6 = errors; - if (errors === _errs6) { - if (Array.isArray(data1)) { - if (data1.length > 2) { - validate210.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema195.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - if (data1.length < 2) { - validate210.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema195.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; - const _errs8 = errors; - if (errors === _errs8) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - let missing2; - if (data2.url === undefined && (missing2 = 'url')) { - validate210.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema195.allOf[1].properties.devices.items.required, - parentSchema: schema195.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } else { - if (data2.url !== undefined) { - let data3 = data2.url; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate210.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema195.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } else { - validate210.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema195.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema195.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } - } - var valid4 = _errs10 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data2.config !== undefined) { - let data4 = data2.config; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data4 && - typeof data4 == 'object' && - !Array.isArray(data4) - ) { - if (data4.services !== undefined) { - let data5 = data4.services; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid6 = true; - const len1 = data5.length; - for (let i1 = 0; i1 < len1; i1++) { - let data6 = data5[i1]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing3; - if ( - (data6.serviceType === undefined && - (missing3 = 'serviceType')) || - (data6.serviceId === undefined && - (missing3 = 'serviceId')) || - (data6.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate210.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema195.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema195.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.serviceType !== undefined) { - let data7 = data6.serviceType; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate210.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema195.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data7, - }, - ]; - return false; - } - } else { - validate210.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema195.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema195.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data7, - }, - ]; - return false; - } - } - } - var valid7 = _errs19 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data6.serviceId !== undefined) { - let data8 = data6.serviceId; - const _errs21 = errors; - if (typeof data8 !== 'string') { - validate210.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema195.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId - .type, - parentSchema: - schema195.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId, - data: data8, - }, - ]; - return false; - } - var valid7 = _errs21 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data6.remoteServiceId !== - undefined - ) { - let data9 = data6.remoteServiceId; - const _errs23 = errors; - if (typeof data9 !== 'string') { - validate210.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema195.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema195.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data9, - }, - ]; - return false; - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate210.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema195.allOf[1].properties - .devices.items.properties.config - .properties.services.items.type, - parentSchema: - schema195.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data6, - }, - ]; - return false; - } - } - var valid6 = _errs16 === errors; - if (!valid6) { - break; - } - } - } else { - validate210.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema195.allOf[1].properties.devices - .items.properties.config.properties - .services.type, - parentSchema: - schema195.allOf[1].properties.devices - .items.properties.config.properties - .services, - data: data5, - }, - ]; - return false; - } - } - } - } else { - validate210.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema195.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema195.allOf[1].properties.devices.items - .properties.config, - data: data4, - }, - ]; - return false; - } - } - var valid4 = _errs12 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate210.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema195.allOf[1].properties.devices.items.type, - parentSchema: schema195.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } - } - var valid3 = _errs8 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate210.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema195.allOf[1].properties.devices.type, - parentSchema: schema195.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } - } - } - } - } else { - validate210.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema195.allOf[1].type, - parentSchema: schema195.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs4 === errors; - } - validate210.errors = vErrors; - return errors === 0; -} -exports.validateCreatePeerconnectionResponse202Response = validate211; -const schema196 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'createPeerconnectionResponse202Response', - 'x-location': - '#/paths//peerconnections/post/responses/202/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate211( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate211.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema196.allOf[0].required, - parentSchema: schema196.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate211.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema196.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate211.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema196.allOf[0].properties.url.type, - parentSchema: schema196.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate211.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema196.allOf[0].properties.type.type, - parentSchema: schema196.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate211.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema196.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema196.allOf[0].properties.type.enum, - parentSchema: schema196.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate211.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema196.allOf[0].properties.status.type, - parentSchema: schema196.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate211.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema196.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema196.allOf[0].properties.status.enum, - parentSchema: schema196.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate211.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema196.allOf[0].type, - parentSchema: schema196.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate211.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema196.allOf[1].required, - parentSchema: schema196.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate211.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema196.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate211.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema196.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate211.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema196.allOf[1].properties.devices.items.required, - parentSchema: schema196.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate211.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema196.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate211.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema196.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema196.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.config !== undefined) { - let data6 = data4.config; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - if (data6.services !== undefined) { - let data7 = data6.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid6 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing3; - if ( - (data8.serviceType === undefined && - (missing3 = 'serviceType')) || - (data8.serviceId === undefined && - (missing3 = 'serviceId')) || - (data8.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate211.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema196.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema196.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.serviceType !== undefined) { - let data9 = data8.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate211.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema196.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } else { - validate211.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema196.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema196.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data8.serviceId !== undefined) { - let data10 = data8.serviceId; - const _errs25 = errors; - if (typeof data10 !== 'string') { - validate211.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema196.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId - .type, - parentSchema: - schema196.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId, - data: data10, - }, - ]; - return false; - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data8.remoteServiceId !== - undefined - ) { - let data11 = - data8.remoteServiceId; - const _errs27 = errors; - if (typeof data11 !== 'string') { - validate211.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema196.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema196.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data11, - }, - ]; - return false; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate211.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema196.allOf[1].properties - .devices.items.properties.config - .properties.services.items.type, - parentSchema: - schema196.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } - } - var valid6 = _errs20 === errors; - if (!valid6) { - break; - } - } - } else { - validate211.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema196.allOf[1].properties.devices - .items.properties.config.properties - .services.type, - parentSchema: - schema196.allOf[1].properties.devices - .items.properties.config.properties - .services, - data: data7, - }, - ]; - return false; - } - } - } - } else { - validate211.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema196.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema196.allOf[1].properties.devices.items - .properties.config, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate211.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema196.allOf[1].properties.devices.items.type, - parentSchema: schema196.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate211.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema196.allOf[1].properties.devices.type, - parentSchema: schema196.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate211.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema196.allOf[1].type, - parentSchema: schema196.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate211.errors = vErrors; - return errors === 0; -} -exports.validateGetPeerconnectionResponse200Request = validate212; -const schema197 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - }, - required: ['type'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'getPeerconnectionResponse200Request', - 'x-location': - '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate212( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.type === undefined && (missing0 = 'type')) { - validate212.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema197.allOf[0].required, - parentSchema: schema197.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.type !== undefined) { - let data0 = data.type; - if (typeof data0 !== 'string') { - validate212.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema197.allOf[0].properties.type.type, - parentSchema: schema197.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - if (!(data0 === 'local' || data0 === 'webrtc')) { - validate212.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema197.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema197.allOf[0].properties.type.enum, - parentSchema: schema197.allOf[0].properties.type, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate212.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema197.allOf[0].type, - parentSchema: schema197.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs4 = errors; - if (errors === _errs4) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate212.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema197.allOf[1].required, - parentSchema: schema197.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data1 = data.devices; - const _errs6 = errors; - if (errors === _errs6) { - if (Array.isArray(data1)) { - if (data1.length > 2) { - validate212.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema197.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - if (data1.length < 2) { - validate212.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema197.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data1.length; - for (let i0 = 0; i0 < len0; i0++) { - let data2 = data1[i0]; - const _errs8 = errors; - if (errors === _errs8) { - if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { - let missing2; - if (data2.url === undefined && (missing2 = 'url')) { - validate212.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema197.allOf[1].properties.devices.items.required, - parentSchema: schema197.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } else { - if (data2.url !== undefined) { - let data3 = data2.url; - const _errs10 = errors; - if (errors === _errs10) { - if (errors === _errs10) { - if (typeof data3 === 'string') { - if (!formats0(data3)) { - validate212.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema197.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } else { - validate212.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema197.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema197.allOf[1].properties.devices.items - .properties.url, - data: data3, - }, - ]; - return false; - } - } - } - var valid4 = _errs10 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data2.config !== undefined) { - let data4 = data2.config; - const _errs12 = errors; - if (errors === _errs12) { - if ( - data4 && - typeof data4 == 'object' && - !Array.isArray(data4) - ) { - if (data4.services !== undefined) { - let data5 = data4.services; - const _errs14 = errors; - if (errors === _errs14) { - if (Array.isArray(data5)) { - var valid6 = true; - const len1 = data5.length; - for (let i1 = 0; i1 < len1; i1++) { - let data6 = data5[i1]; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - let missing3; - if ( - (data6.serviceType === undefined && - (missing3 = 'serviceType')) || - (data6.serviceId === undefined && - (missing3 = 'serviceId')) || - (data6.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate212.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema197.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema197.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data6, - }, - ]; - return false; - } else { - if (data6.serviceType !== undefined) { - let data7 = data6.serviceType; - const _errs19 = errors; - if (errors === _errs19) { - if (errors === _errs19) { - if (typeof data7 === 'string') { - if (!formats0(data7)) { - validate212.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema197.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data7, - }, - ]; - return false; - } - } else { - validate212.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema197.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema197.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data7, - }, - ]; - return false; - } - } - } - var valid7 = _errs19 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data6.serviceId !== undefined) { - let data8 = data6.serviceId; - const _errs21 = errors; - if (typeof data8 !== 'string') { - validate212.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema197.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId - .type, - parentSchema: - schema197.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId, - data: data8, - }, - ]; - return false; - } - var valid7 = _errs21 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data6.remoteServiceId !== - undefined - ) { - let data9 = data6.remoteServiceId; - const _errs23 = errors; - if (typeof data9 !== 'string') { - validate212.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema197.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema197.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data9, - }, - ]; - return false; - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate212.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema197.allOf[1].properties - .devices.items.properties.config - .properties.services.items.type, - parentSchema: - schema197.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data6, - }, - ]; - return false; - } - } - var valid6 = _errs16 === errors; - if (!valid6) { - break; - } - } - } else { - validate212.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema197.allOf[1].properties.devices - .items.properties.config.properties - .services.type, - parentSchema: - schema197.allOf[1].properties.devices - .items.properties.config.properties - .services, - data: data5, - }, - ]; - return false; - } - } - } - } else { - validate212.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema197.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema197.allOf[1].properties.devices.items - .properties.config, - data: data4, - }, - ]; - return false; - } - } - var valid4 = _errs12 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate212.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema197.allOf[1].properties.devices.items.type, - parentSchema: schema197.allOf[1].properties.devices.items, - data: data2, - }, - ]; - return false; - } - } - var valid3 = _errs8 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate212.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema197.allOf[1].properties.devices.type, - parentSchema: schema197.allOf[1].properties.devices, - data: data1, - }, - ]; - return false; - } - } - } - } - } else { - validate212.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema197.allOf[1].type, - parentSchema: schema197.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs4 === errors; - } - validate212.errors = vErrors; - return errors === 0; -} -exports.validateGetPeerconnectionResponse200Response = validate213; -const schema198 = { - title: 'Peerconnection', - allOf: [ - { - type: 'object', - title: 'Peerconnection Common', - properties: { - url: { - type: 'string', - description: 'URL of the peerconnection', - format: 'uri', - readOnly: true, - }, - type: { - type: 'string', - description: 'Type of the peerconnection', - enum: ['local', 'webrtc'], - }, - status: { - readOnly: true, - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['url', 'type', 'status'], - }, - { - type: 'object', - properties: { - devices: { - type: 'array', - minItems: 2, - maxItems: 2, - items: { - title: 'Configured Device Reference', - type: 'object', - properties: { - url: { type: 'string', description: 'URL of the device', format: 'uri' }, - config: { - type: 'object', - properties: { - services: { - type: 'array', - items: { - title: 'Service Config', - type: 'object', - properties: { - serviceType: { type: 'string', format: 'uri' }, - serviceId: { type: 'string' }, - remoteServiceId: { type: 'string' }, - }, - required: ['serviceType', 'serviceId', 'remoteServiceId'], - additionalProperties: true, - }, - }, - }, - }, - }, - required: ['url'], - }, - }, - }, - required: ['devices'], - }, - ], - 'x-typeguard': true, - 'x-standalone': false, - 'x-name': 'getPeerconnectionResponse200Response', - 'x-location': - '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate213( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if ( - (data.url === undefined && (missing0 = 'url')) || - (data.type === undefined && (missing0 = 'type')) || - (data.status === undefined && (missing0 = 'status')) - ) { - validate213.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema198.allOf[0].required, - parentSchema: schema198.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.url !== undefined) { - let data0 = data.url; - const _errs2 = errors; - if (errors === _errs2) { - if (errors === _errs2) { - if (typeof data0 === 'string') { - if (!formats0(data0)) { - validate213.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema198.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } else { - validate213.errors = [ - { - instancePath: instancePath + '/url', - schemaPath: '#/allOf/0/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema198.allOf[0].properties.url.type, - parentSchema: schema198.allOf[0].properties.url, - data: data0, - }, - ]; - return false; - } - } - } - var valid1 = _errs2 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.type !== undefined) { - let data1 = data.type; - const _errs4 = errors; - if (typeof data1 !== 'string') { - validate213.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema198.allOf[0].properties.type.type, - parentSchema: schema198.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - if (!(data1 === 'local' || data1 === 'webrtc')) { - validate213.errors = [ - { - instancePath: instancePath + '/type', - schemaPath: '#/allOf/0/properties/type/enum', - keyword: 'enum', - params: { allowedValues: schema198.allOf[0].properties.type.enum }, - message: 'must be equal to one of the allowed values', - schema: schema198.allOf[0].properties.type.enum, - parentSchema: schema198.allOf[0].properties.type, - data: data1, - }, - ]; - return false; - } - var valid1 = _errs4 === errors; - } else { - var valid1 = true; - } - if (valid1) { - if (data.status !== undefined) { - let data2 = data.status; - const _errs6 = errors; - if (typeof data2 !== 'string') { - validate213.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema198.allOf[0].properties.status.type, - parentSchema: schema198.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - if ( - !( - data2 === 'new' || - data2 === 'connecting' || - data2 === 'connected' || - data2 === 'disconnected' || - data2 === 'failed' || - data2 === 'closed' - ) - ) { - validate213.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/allOf/0/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema198.allOf[0].properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema198.allOf[0].properties.status.enum, - parentSchema: schema198.allOf[0].properties.status, - data: data2, - }, - ]; - return false; - } - var valid1 = _errs6 === errors; - } else { - var valid1 = true; - } - } - } - } - } else { - validate213.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema198.allOf[0].type, - parentSchema: schema198.allOf[0], - data, - }, - ]; - return false; - } - } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs8 = errors; - if (errors === _errs8) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.devices === undefined && (missing1 = 'devices')) { - validate213.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema198.allOf[1].required, - parentSchema: schema198.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.devices !== undefined) { - let data3 = data.devices; - const _errs10 = errors; - if (errors === _errs10) { - if (Array.isArray(data3)) { - if (data3.length > 2) { - validate213.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/maxItems', - keyword: 'maxItems', - params: { limit: 2 }, - message: 'must NOT have more than 2 items', - schema: 2, - parentSchema: schema198.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - if (data3.length < 2) { - validate213.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/minItems', - keyword: 'minItems', - params: { limit: 2 }, - message: 'must NOT have fewer than 2 items', - schema: 2, - parentSchema: schema198.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } else { - var valid3 = true; - const len0 = data3.length; - for (let i0 = 0; i0 < len0; i0++) { - let data4 = data3[i0]; - const _errs12 = errors; - if (errors === _errs12) { - if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { - let missing2; - if (data4.url === undefined && (missing2 = 'url')) { - validate213.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/required', - keyword: 'required', - params: { missingProperty: missing2 }, - message: "must have required property '" + missing2 + "'", - schema: - schema198.allOf[1].properties.devices.items.required, - parentSchema: schema198.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } else { - if (data4.url !== undefined) { - let data5 = data4.url; - const _errs14 = errors; - if (errors === _errs14) { - if (errors === _errs14) { - if (typeof data5 === 'string') { - if (!formats0(data5)) { - validate213.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: - schema198.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } else { - validate213.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/url', - schemaPath: - '#/allOf/1/properties/devices/items/properties/url/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema198.allOf[1].properties.devices.items - .properties.url.type, - parentSchema: - schema198.allOf[1].properties.devices.items - .properties.url, - data: data5, - }, - ]; - return false; - } - } - } - var valid4 = _errs14 === errors; - } else { - var valid4 = true; - } - if (valid4) { - if (data4.config !== undefined) { - let data6 = data4.config; - const _errs16 = errors; - if (errors === _errs16) { - if ( - data6 && - typeof data6 == 'object' && - !Array.isArray(data6) - ) { - if (data6.services !== undefined) { - let data7 = data6.services; - const _errs18 = errors; - if (errors === _errs18) { - if (Array.isArray(data7)) { - var valid6 = true; - const len1 = data7.length; - for (let i1 = 0; i1 < len1; i1++) { - let data8 = data7[i1]; - const _errs20 = errors; - if (errors === _errs20) { - if ( - data8 && - typeof data8 == 'object' && - !Array.isArray(data8) - ) { - let missing3; - if ( - (data8.serviceType === undefined && - (missing3 = 'serviceType')) || - (data8.serviceId === undefined && - (missing3 = 'serviceId')) || - (data8.remoteServiceId === undefined && - (missing3 = 'remoteServiceId')) - ) { - validate213.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', - keyword: 'required', - params: { - missingProperty: missing3, - }, - message: - "must have required property '" + - missing3 + - "'", - schema: - schema198.allOf[1].properties - .devices.items.properties.config - .properties.services.items - .required, - parentSchema: - schema198.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } else { - if (data8.serviceType !== undefined) { - let data9 = data8.serviceType; - const _errs23 = errors; - if (errors === _errs23) { - if (errors === _errs23) { - if (typeof data9 === 'string') { - if (!formats0(data9)) { - validate213.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', - keyword: 'format', - params: { format: 'uri' }, - message: - 'must match format "' + - 'uri' + - '"', - schema: 'uri', - parentSchema: - schema198.allOf[1] - .properties.devices - .items.properties - .config.properties - .services.items - .properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } else { - validate213.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceType', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema198.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType.type, - parentSchema: - schema198.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .serviceType, - data: data9, - }, - ]; - return false; - } - } - } - var valid7 = _errs23 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if (data8.serviceId !== undefined) { - let data10 = data8.serviceId; - const _errs25 = errors; - if (typeof data10 !== 'string') { - validate213.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/serviceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema198.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId - .type, - parentSchema: - schema198.allOf[1] - .properties.devices.items - .properties.config - .properties.services.items - .properties.serviceId, - data: data10, - }, - ]; - return false; - } - var valid7 = _errs25 === errors; - } else { - var valid7 = true; - } - if (valid7) { - if ( - data8.remoteServiceId !== - undefined - ) { - let data11 = - data8.remoteServiceId; - const _errs27 = errors; - if (typeof data11 !== 'string') { - validate213.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1 + - '/remoteServiceId', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: - schema198.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId.type, - parentSchema: - schema198.allOf[1] - .properties.devices - .items.properties.config - .properties.services - .items.properties - .remoteServiceId, - data: data11, - }, - ]; - return false; - } - var valid7 = _errs27 === errors; - } else { - var valid7 = true; - } - } - } - } - } else { - validate213.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services/' + - i1, - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema198.allOf[1].properties - .devices.items.properties.config - .properties.services.items.type, - parentSchema: - schema198.allOf[1].properties - .devices.items.properties.config - .properties.services.items, - data: data8, - }, - ]; - return false; - } - } - var valid6 = _errs20 === errors; - if (!valid6) { - break; - } - } - } else { - validate213.errors = [ - { - instancePath: - instancePath + - '/devices/' + - i0 + - '/config/services', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/properties/services/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: - schema198.allOf[1].properties.devices - .items.properties.config.properties - .services.type, - parentSchema: - schema198.allOf[1].properties.devices - .items.properties.config.properties - .services, - data: data7, - }, - ]; - return false; - } - } - } - } else { - validate213.errors = [ - { - instancePath: - instancePath + '/devices/' + i0 + '/config', - schemaPath: - '#/allOf/1/properties/devices/items/properties/config/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: - schema198.allOf[1].properties.devices.items - .properties.config.type, - parentSchema: - schema198.allOf[1].properties.devices.items - .properties.config, - data: data6, - }, - ]; - return false; - } - } - var valid4 = _errs16 === errors; - } else { - var valid4 = true; - } - } - } - } else { - validate213.errors = [ - { - instancePath: instancePath + '/devices/' + i0, - schemaPath: '#/allOf/1/properties/devices/items/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema198.allOf[1].properties.devices.items.type, - parentSchema: schema198.allOf[1].properties.devices.items, - data: data4, - }, - ]; - return false; - } - } - var valid3 = _errs12 === errors; - if (!valid3) { - break; - } - } - } - } - } else { - validate213.errors = [ - { - instancePath: instancePath + '/devices', - schemaPath: '#/allOf/1/properties/devices/type', - keyword: 'type', - params: { type: 'array' }, - message: 'must be array', - schema: schema198.allOf[1].properties.devices.type, - parentSchema: schema198.allOf[1].properties.devices, - data: data3, - }, - ]; - return false; - } - } - } - } - } else { - validate213.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema198.allOf[1].type, - parentSchema: schema198.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs8 === errors; - } - validate213.errors = vErrors; - return errors === 0; -} -exports.validatePatchPeerconnectionDeviceStatusBodyRequest = validate214; -const schema199 = { - type: 'object', - properties: { - status: { - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['status'], - 'x-standalone': false, - 'x-name': 'patchPeerconnectionDeviceStatusBodyRequest', - 'x-location': - '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema_request', - 'x-schema-type': 'request', -}; -function validate214( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.status === undefined && (missing0 = 'status')) { - validate214.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema199.required, - parentSchema: schema199, - data, - }, - ]; - return false; - } else { - if (data.status !== undefined) { - let data0 = data.status; - if (typeof data0 !== 'string') { - validate214.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema199.properties.status.type, - parentSchema: schema199.properties.status, - data: data0, - }, - ]; - return false; - } - if ( - !( - data0 === 'new' || - data0 === 'connecting' || - data0 === 'connected' || - data0 === 'disconnected' || - data0 === 'failed' || - data0 === 'closed' - ) - ) { - validate214.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema199.properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema199.properties.status.enum, - parentSchema: schema199.properties.status, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate214.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema199.type, - parentSchema: schema199, - data, - }, - ]; - return false; - } - } - validate214.errors = vErrors; - return errors === 0; -} -exports.validatePatchPeerconnectionDeviceStatusBodyResponse = validate215; -const schema200 = { - type: 'object', - properties: { - status: { - title: 'Connection Status', - type: 'string', - description: 'The status of the peerconnection.', - enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], - }, - }, - required: ['status'], - 'x-standalone': false, - 'x-name': 'patchPeerconnectionDeviceStatusBodyResponse', - 'x-location': - '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema_response', - 'x-schema-type': 'response', -}; -function validate215( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.status === undefined && (missing0 = 'status')) { - validate215.errors = [ - { - instancePath, - schemaPath: '#/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema200.required, - parentSchema: schema200, - data, - }, - ]; - return false; - } else { - if (data.status !== undefined) { - let data0 = data.status; - if (typeof data0 !== 'string') { - validate215.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/properties/status/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema200.properties.status.type, - parentSchema: schema200.properties.status, - data: data0, - }, - ]; - return false; - } - if ( - !( - data0 === 'new' || - data0 === 'connecting' || - data0 === 'connected' || - data0 === 'disconnected' || - data0 === 'failed' || - data0 === 'closed' - ) - ) { - validate215.errors = [ - { - instancePath: instancePath + '/status', - schemaPath: '#/properties/status/enum', - keyword: 'enum', - params: { allowedValues: schema200.properties.status.enum }, - message: 'must be equal to one of the allowed values', - schema: schema200.properties.status.enum, - parentSchema: schema200.properties.status, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate215.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema200.type, - parentSchema: schema200, - data, - }, - ]; - return false; - } - } - validate215.errors = vErrors; - return errors === 0; -} +"use strict";exports.validateAuthenticationMessage = validate21;const schema6 = {"title":"Authentication Message","allOf":[{"title":"Message","type":"object","properties":{"messageType":{"type":"string"}},"required":["messageType"],"additionalProperties":true,"x-typeguard":true},{"type":"object","properties":{"messageType":{"const":"authenticate"},"token":{"type":"string"},"authenticated":{"type":"boolean"}},"required":["messageType"]}],"x-typeguard":true,"x-standalone":true,"x-name":"AuthenticationMessage","x-location":"#/components/schemas/authentication_message","x-schema-type":"all"};function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;if(errors === _errs0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.messageType === undefined) && (missing0 = "messageType")){validate21.errors = [{instancePath,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'",schema:schema6.allOf[0].required,parentSchema:schema6.allOf[0],data}];return false;}else {if(data.messageType !== undefined){let data0 = data.messageType;if(typeof data0 !== "string"){validate21.errors = [{instancePath:instancePath+"/messageType",schemaPath:"#/allOf/0/properties/messageType/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema6.allOf[0].properties.messageType.type,parentSchema:schema6.allOf[0].properties.messageType,data:data0}];return false;}}}}else {validate21.errors = [{instancePath,schemaPath:"#/allOf/0/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema6.allOf[0].type,parentSchema:schema6.allOf[0],data}];return false;}}var valid0 = _errs0 === errors;if(valid0){const _errs5 = errors;if(errors === _errs5){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.messageType === undefined) && (missing1 = "messageType")){validate21.errors = [{instancePath,schemaPath:"#/allOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'",schema:schema6.allOf[1].required,parentSchema:schema6.allOf[1],data}];return false;}else {if(data.messageType !== undefined){let data1 = data.messageType;const _errs7 = errors;if("authenticate" !== data1){validate21.errors = [{instancePath:instancePath+"/messageType",schemaPath:"#/allOf/1/properties/messageType/const",keyword:"const",params:{allowedValue: "authenticate"},message:"must be equal to constant",schema:"authenticate",parentSchema:schema6.allOf[1].properties.messageType,data:data1}];return false;}var valid2 = _errs7 === errors;}else {var valid2 = true;}if(valid2){if(data.token !== undefined){let data2 = data.token;const _errs8 = errors;if(typeof data2 !== "string"){validate21.errors = [{instancePath:instancePath+"/token",schemaPath:"#/allOf/1/properties/token/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema6.allOf[1].properties.token.type,parentSchema:schema6.allOf[1].properties.token,data:data2}];return false;}var valid2 = _errs8 === errors;}else {var valid2 = true;}if(valid2){if(data.authenticated !== undefined){let data3 = data.authenticated;const _errs10 = errors;if(typeof data3 !== "boolean"){validate21.errors = [{instancePath:instancePath+"/authenticated",schemaPath:"#/allOf/1/properties/authenticated/type",keyword:"type",params:{type: "boolean"},message:"must be boolean",schema:schema6.allOf[1].properties.authenticated.type,parentSchema:schema6.allOf[1].properties.authenticated,data:data3}];return false;}var valid2 = _errs10 === errors;}else {var valid2 = true;}}}}}else {validate21.errors = [{instancePath,schemaPath:"#/allOf/1/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema6.allOf[1].type,parentSchema:schema6.allOf[1],data}];return false;}}var valid0 = _errs5 === errors;}validate21.errors = vErrors;return errors === 0;}exports.validateConnectionStateChangedMessage = validate22;const schema7 = {"title":"Connection State Changed Message","allOf":[{"title":"Message","type":"object","properties":{"messageType":{"type":"string"}},"required":["messageType"],"additionalProperties":true,"x-typeguard":true},{"type":"object","properties":{"messageType":{"const":"connection-state-changed"},"connectionUrl":{"type":"string","format":"uri"},"status":{"title":"Connection Status","type":"string","description":"The status of the peerconnection.","enum":["new","connecting","connected","disconnected","failed","closed"]}},"required":["connectionUrl","status"]}],"x-typeguard":true,"x-standalone":true,"x-name":"ConnectionStateChangedMessage","x-location":"#/components/schemas/connection_state_changed_message","x-schema-type":"all"};const formats0 = require("ajv-formats/dist/formats").fullFormats.uri;function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;if(errors === _errs0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.messageType === undefined) && (missing0 = "messageType")){validate22.errors = [{instancePath,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'",schema:schema7.allOf[0].required,parentSchema:schema7.allOf[0],data}];return false;}else {if(data.messageType !== undefined){let data0 = data.messageType;if(typeof data0 !== "string"){validate22.errors = [{instancePath:instancePath+"/messageType",schemaPath:"#/allOf/0/properties/messageType/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema7.allOf[0].properties.messageType.type,parentSchema:schema7.allOf[0].properties.messageType,data:data0}];return false;}}}}else {validate22.errors = [{instancePath,schemaPath:"#/allOf/0/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema7.allOf[0].type,parentSchema:schema7.allOf[0],data}];return false;}}var valid0 = _errs0 === errors;if(valid0){const _errs5 = errors;if(errors === _errs5){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if(((data.connectionUrl === undefined) && (missing1 = "connectionUrl")) || ((data.status === undefined) && (missing1 = "status"))){validate22.errors = [{instancePath,schemaPath:"#/allOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'",schema:schema7.allOf[1].required,parentSchema:schema7.allOf[1],data}];return false;}else {if(data.messageType !== undefined){let data1 = data.messageType;const _errs7 = errors;if("connection-state-changed" !== data1){validate22.errors = [{instancePath:instancePath+"/messageType",schemaPath:"#/allOf/1/properties/messageType/const",keyword:"const",params:{allowedValue: "connection-state-changed"},message:"must be equal to constant",schema:"connection-state-changed",parentSchema:schema7.allOf[1].properties.messageType,data:data1}];return false;}var valid2 = _errs7 === errors;}else {var valid2 = true;}if(valid2){if(data.connectionUrl !== undefined){let data2 = data.connectionUrl;const _errs8 = errors;if(errors === _errs8){if(errors === _errs8){if(typeof data2 === "string"){if(!(formats0(data2))){validate22.errors = [{instancePath:instancePath+"/connectionUrl",schemaPath:"#/allOf/1/properties/connectionUrl/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\"",schema:"uri",parentSchema:schema7.allOf[1].properties.connectionUrl,data:data2}];return false;}}else {validate22.errors = [{instancePath:instancePath+"/connectionUrl",schemaPath:"#/allOf/1/properties/connectionUrl/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema7.allOf[1].properties.connectionUrl.type,parentSchema:schema7.allOf[1].properties.connectionUrl,data:data2}];return false;}}}var valid2 = _errs8 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){let data3 = data.status;const _errs10 = errors;if(typeof data3 !== "string"){validate22.errors = [{instancePath:instancePath+"/status",schemaPath:"#/allOf/1/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema7.allOf[1].properties.status.type,parentSchema:schema7.allOf[1].properties.status,data:data3}];return false;}if(!((((((data3 === "new") || (data3 === "connecting")) || (data3 === "connected")) || (data3 === "disconnected")) || (data3 === "failed")) || (data3 === "closed"))){validate22.errors = [{instancePath:instancePath+"/status",schemaPath:"#/allOf/1/properties/status/enum",keyword:"enum",params:{allowedValues: schema7.allOf[1].properties.status.enum},message:"must be equal to one of the allowed values",schema:schema7.allOf[1].properties.status.enum,parentSchema:schema7.allOf[1].properties.status,data:data3}];return false;}var valid2 = _errs10 === errors;}else {var valid2 = true;}}}}}else {validate22.errors = [{instancePath,schemaPath:"#/allOf/1/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema7.allOf[1].type,parentSchema:schema7.allOf[1],data}];return false;}}var valid0 = _errs5 === errors;}validate22.errors = vErrors;return errors === 0;}exports.validateUserReference = validate23;const schema8 = {"title":"User Reference","type":"object","properties":{"url":{"type":"string","description":"URL of the user","format":"uri"}},"required":["url"],"x-standalone":true,"x-name":"UserReference","x-location":"#/components/schemas/user_reference","x-schema-type":"all"};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.url === undefined) && (missing0 = "url")){validate23.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'",schema:schema8.required,parentSchema:schema8,data}];return false;}else {if(data.url !== undefined){let data0 = data.url;const _errs1 = errors;if(errors === _errs1){if(errors === _errs1){if(typeof data0 === "string"){if(!(formats0(data0))){validate23.errors = [{instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\"",schema:"uri",parentSchema:schema8.properties.url,data:data0}];return false;}}else {validate23.errors = [{instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema8.properties.url.type,parentSchema:schema8.properties.url,data:data0}];return false;}}}}}}else {validate23.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema8.type,parentSchema:schema8,data}];return false;}}validate23.errors = vErrors;return errors === 0;}exports.validateDeviceOverview = validate24;const schema9 = {"title":"Device Overview","type":"object","properties":{"url":{"type":"string","description":"URL of the device","format":"uri","readOnly":true},"name":{"type":"string","description":"Name of the device"},"description":{"type":"string","description":"Extended description of the device, features, etc."},"type":{"type":"string","description":"Type of the device","enum":["device","group","edge instantiable","cloud instantiable"]},"isPublic":{"type":"boolean","description":"If true, the device may be seen and used by every user."},"viewer":{"type":"array","description":"List of users who can view the device","items":{"title":"User Reference","type":"object","properties":{"url":{"type":"string","description":"URL of the user","format":"uri"}},"required":["url"]}},"owner":{"type":"array","description":"List of users who own the device","items":{"title":"User Reference","type":"object","properties":{"url":{"type":"string","description":"URL of the user","format":"uri"}},"required":["url"]}}},"required":["url","type","name","isPublic"],"x-typeguard":true,"x-standalone":true,"x-name":"DeviceOverview","x-location":"#/components/schemas/device_overview","x-schema-type":"all"};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.url === undefined) && (missing0 = "url")) || ((data.type === undefined) && (missing0 = "type"))) || ((data.name === undefined) && (missing0 = "name"))) || ((data.isPublic === undefined) && (missing0 = "isPublic"))){validate24.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'",schema:schema9.required,parentSchema:schema9,data}];return false;}else {if(data.url !== undefined){let data0 = data.url;const _errs1 = errors;if(errors === _errs1){if(errors === _errs1){if(typeof data0 === "string"){if(!(formats0(data0))){validate24.errors = [{instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\"",schema:"uri",parentSchema:schema9.properties.url,data:data0}];return false;}}else {validate24.errors = [{instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema9.properties.url.type,parentSchema:schema9.properties.url,data:data0}];return false;}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.name !== undefined){let data1 = data.name;const _errs3 = errors;if(typeof data1 !== "string"){validate24.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema9.properties.name.type,parentSchema:schema9.properties.name,data:data1}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.description !== undefined){let data2 = data.description;const _errs5 = errors;if(typeof data2 !== "string"){validate24.errors = [{instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema9.properties.description.type,parentSchema:schema9.properties.description,data:data2}];return false;}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.type !== undefined){let data3 = data.type;const _errs7 = errors;if(typeof data3 !== "string"){validate24.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema9.properties.type.type,parentSchema:schema9.properties.type,data:data3}];return false;}if(!((((data3 === "device") || (data3 === "group")) || (data3 === "edge instantiable")) || (data3 === "cloud instantiable"))){validate24.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues: schema9.properties.type.enum},message:"must be equal to one of the allowed values",schema:schema9.properties.type.enum,parentSchema:schema9.properties.type,data:data3}];return false;}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.isPublic !== undefined){let data4 = data.isPublic;const _errs9 = errors;if(typeof data4 !== "boolean"){validate24.errors = [{instancePath:instancePath+"/isPublic",schemaPath:"#/properties/isPublic/type",keyword:"type",params:{type: "boolean"},message:"must be boolean",schema:schema9.properties.isPublic.type,parentSchema:schema9.properties.isPublic,data:data4}];return false;}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.viewer !== undefined){let data5 = data.viewer;const _errs11 = errors;if(errors === _errs11){if(Array.isArray(data5)){var valid1 = true;const len0 = data5.length;for(let i0=0; i0 2){validate54.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema39.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate54.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema39.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate56.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema41.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate56.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema41.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate57.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema42.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {if(data8.length < 2){validate57.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema42.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {var valid8 = true;const len0 = data8.length;for(let i0=0; i0 2){validate58.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema43.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {if(data8.length < 2){validate58.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema43.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {var valid8 = true;const len0 = data8.length;for(let i0=0; i0 2){validate80.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema65.items.allOf[1].properties.devices,data:data4}];return false;}else {if(data4.length < 2){validate80.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema65.items.allOf[1].properties.devices,data:data4}];return false;}else {var valid4 = true;const len1 = data4.length;for(let i1=0; i1 2){validate81.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema66.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate81.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema66.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate82.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema67.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate82.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema67.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate83.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema68.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate83.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema68.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate84.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema69.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate84.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema69.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate152.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema137.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate152.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema137.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate153.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema138.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate153.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema138.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate156.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema141.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate156.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema141.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate157.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema142.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate157.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema142.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate158.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema143.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data6}];return false;}else {if(data6.length < 2){validate158.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema143.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data6}];return false;}else {var valid8 = true;const len0 = data6.length;for(let i0=0; i0 2){validate159.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema144.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {if(data8.length < 2){validate159.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema144.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {var valid8 = true;const len0 = data8.length;for(let i0=0; i0 2){validate160.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema145.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data6}];return false;}else {if(data6.length < 2){validate160.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema145.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data6}];return false;}else {var valid8 = true;const len0 = data6.length;for(let i0=0; i0 2){validate161.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema146.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {if(data8.length < 2){validate161.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema146.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {var valid8 = true;const len0 = data8.length;for(let i0=0; i0 2){validate204.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema189.items.allOf[1].properties.devices,data:data2}];return false;}else {if(data2.length < 2){validate204.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema189.items.allOf[1].properties.devices,data:data2}];return false;}else {var valid4 = true;const len1 = data2.length;for(let i1=0; i1 2){validate205.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema190.items.allOf[1].properties.devices,data:data4}];return false;}else {if(data4.length < 2){validate205.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema190.items.allOf[1].properties.devices,data:data4}];return false;}else {var valid4 = true;const len1 = data4.length;for(let i1=0; i1 2){validate206.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema191.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate206.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema191.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate207.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema192.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate207.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema192.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate208.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema193.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate208.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema193.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate209.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema194.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate209.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema194.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate210.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema195.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate210.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema195.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate211.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema196.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate211.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema196.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate212.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema197.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate212.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema197.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate213.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema198.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate213.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema198.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0(object: unknown): AuthenticationMessage; +export declare function validateAuthenticationMessage( + object: unknown +): AuthenticationMessage -export declare function validateConnectionStateChangedMessage< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConnectionStateChangedMessage; +export declare function validateConnectionStateChangedMessage( + object: unknown +): ConnectionStateChangedMessage export declare function validateUserReference( - object: unknown, -): UserReference; + object: unknown +): UserReference export declare function validateDeviceOverview( - object: unknown, -): DeviceOverview; + object: unknown +): DeviceOverview -export declare function validateServiceDescription< - T extends 'request' | 'response' | 'all', ->(object: unknown): ServiceDescription; +export declare function validateServiceDescription( + object: unknown +): ServiceDescription -export declare function validateInstantiableCloudDevice< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableCloudDevice; +export declare function validateInstantiableCloudDevice( + object: unknown +): InstantiableCloudDevice export declare function validateTimeSlot( - object: unknown, -): TimeSlot; + object: unknown +): TimeSlot export declare function validateAvailability( - object: unknown, -): Availability; + object: unknown +): Availability export declare function validateConcreteDevice( - object: unknown, -): ConcreteDevice; + object: unknown +): ConcreteDevice -export declare function validateInstantiableBrowserDevice< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableBrowserDevice; +export declare function validateInstantiableBrowserDevice( + object: unknown +): InstantiableBrowserDevice export declare function validateDeviceReference( - object: unknown, -): DeviceReference; + object: unknown +): DeviceReference export declare function validateDeviceGroup( - object: unknown, -): DeviceGroup; + object: unknown +): DeviceGroup export declare function validateDevice( - object: unknown, -): Device; + object: unknown +): Device export declare function validateCallback( - object: unknown, -): Callback; + object: unknown +): Callback export declare function validateEventCallback( - object: unknown, -): EventCallback; + object: unknown +): EventCallback -export declare function validateDeviceChangedEventCallback< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceChangedEventCallback; +export declare function validateDeviceChangedEventCallback( + object: unknown +): DeviceChangedEventCallback -export declare function validateDeviceOverviewUpdate< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceOverviewUpdate; +export declare function validateDeviceOverviewUpdate( + object: unknown +): DeviceOverviewUpdate -export declare function validateInstantiableCloudDeviceUpdate< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableCloudDeviceUpdate; +export declare function validateInstantiableCloudDeviceUpdate( + object: unknown +): InstantiableCloudDeviceUpdate -export declare function validateConcreteDeviceUpdate< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConcreteDeviceUpdate; +export declare function validateConcreteDeviceUpdate( + object: unknown +): ConcreteDeviceUpdate -export declare function validateInstantiableBrowserDeviceUpdate< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableBrowserDeviceUpdate; +export declare function validateInstantiableBrowserDeviceUpdate( + object: unknown +): InstantiableBrowserDeviceUpdate -export declare function validateDeviceGroupUpdate< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceGroupUpdate; +export declare function validateDeviceGroupUpdate( + object: unknown +): DeviceGroupUpdate export declare function validateDeviceUpdate( - object: unknown, -): DeviceUpdate; + object: unknown +): DeviceUpdate -export declare function validateAvailabilityRule< - T extends 'request' | 'response' | 'all', ->(object: unknown): AvailabilityRule; +export declare function validateAvailabilityRule( + object: unknown +): AvailabilityRule export declare function validateMessage( - object: unknown, -): Message; + object: unknown +): Message export declare function validateCommandMessage( - object: unknown, -): CommandMessage; + object: unknown +): CommandMessage export declare function validateServiceConfig( - object: unknown, -): ServiceConfig; + object: unknown +): ServiceConfig -export declare function validateCreatePeerconnectionMessage< - T extends 'request' | 'response' | 'all', ->(object: unknown): CreatePeerconnectionMessage; +export declare function validateCreatePeerconnectionMessage( + object: unknown +): CreatePeerconnectionMessage -export declare function validateClosePeerconnectionMessage< - T extends 'request' | 'response' | 'all', ->(object: unknown): ClosePeerconnectionMessage; +export declare function validateClosePeerconnectionMessage( + object: unknown +): ClosePeerconnectionMessage -export declare function validateSignalingMessage< - T extends 'request' | 'response' | 'all', ->(object: unknown): SignalingMessage; +export declare function validateSignalingMessage( + object: unknown +): SignalingMessage -export declare function validateConfigurationMessage< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConfigurationMessage; +export declare function validateConfigurationMessage( + object: unknown +): ConfigurationMessage -export declare function validateExperimentStatusChangedMessage< - T extends 'request' | 'response' | 'all', ->(object: unknown): ExperimentStatusChangedMessage; +export declare function validateExperimentStatusChangedMessage( + object: unknown +): ExperimentStatusChangedMessage -export declare function validateConnectionStatus< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConnectionStatus; +export declare function validateConnectionStatus( + object: unknown +): ConnectionStatus -export declare function validatePeerconnectionCommon< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionCommon; +export declare function validatePeerconnectionCommon( + object: unknown +): PeerconnectionCommon -export declare function validatePeerconnectionOverview< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionOverview; +export declare function validatePeerconnectionOverview( + object: unknown +): PeerconnectionOverview -export declare function validateConfiguredDeviceReference< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConfiguredDeviceReference; +export declare function validateConfiguredDeviceReference( + object: unknown +): ConfiguredDeviceReference export declare function validatePeerconnection( - object: unknown, -): Peerconnection; + object: unknown +): Peerconnection -export declare function validatePeerconnectionClosedEventCallback< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionClosedEventCallback; +export declare function validatePeerconnectionClosedEventCallback( + object: unknown +): PeerconnectionClosedEventCallback -export declare function validatePeerconnectionStatusChangedEventCallback< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionStatusChangedEventCallback; +export declare function validatePeerconnectionStatusChangedEventCallback( + object: unknown +): PeerconnectionStatusChangedEventCallback export declare function validateChangedUrl( - object: unknown, -): ChangedUrl; + object: unknown +): ChangedUrl export declare function validateDeviceId( - object: unknown, -): DeviceId; + object: unknown +): DeviceId export declare function validateFlatGroup( - object: unknown, -): FlatGroup; + object: unknown +): FlatGroup export declare function validateStartTime( - object: unknown, -): StartTime; + object: unknown +): StartTime export declare function validateEndTime( - object: unknown, -): EndTime; + object: unknown +): EndTime export declare function validateClosedUrl( - object: unknown, -): ClosedUrl; + object: unknown +): ClosedUrl -export declare function validateStatusChangedUrl< - T extends 'request' | 'response' | 'all', ->(object: unknown): StatusChangedUrl; +export declare function validateStatusChangedUrl( + object: unknown +): StatusChangedUrl -export declare function validatePeerconnectionId< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionId; +export declare function validatePeerconnectionId( + object: unknown +): PeerconnectionId export declare function validateDeviceUrl( - object: unknown, -): DeviceUrl; + object: unknown +): DeviceUrl -export declare function validateListDevicesResponse200< - T extends 'request' | 'response' | 'all', ->(object: unknown): listDevicesResponse200; +export declare function validateListDevicesResponse200( + object: unknown +): listDevicesResponse200 -export declare function validateCreateDeviceBody< - T extends 'request' | 'response' | 'all', ->(object: unknown): createDeviceBody; +export declare function validateCreateDeviceBody( + object: unknown +): createDeviceBody -export declare function validateCreateDeviceResponse201< - T extends 'request' | 'response' | 'all', ->(object: unknown): createDeviceResponse201; +export declare function validateCreateDeviceResponse201( + object: unknown +): createDeviceResponse201 -export declare function validateGetDeviceResponse200< - T extends 'request' | 'response' | 'all', ->(object: unknown): getDeviceResponse200; +export declare function validateGetDeviceResponse200( + object: unknown +): getDeviceResponse200 -export declare function validateUpdateDeviceBody< - T extends 'request' | 'response' | 'all', ->(object: unknown): updateDeviceBody; +export declare function validateUpdateDeviceBody( + object: unknown +): updateDeviceBody -export declare function validateUpdateDeviceResponse200< - T extends 'request' | 'response' | 'all', ->(object: unknown): updateDeviceResponse200; +export declare function validateUpdateDeviceResponse200( + object: unknown +): updateDeviceResponse200 -export declare function validateInstantiateDeviceResponse201< - T extends 'request' | 'response' | 'all', ->(object: unknown): instantiateDeviceResponse201; +export declare function validateInstantiateDeviceResponse201( + object: unknown +): instantiateDeviceResponse201 -export declare function validateGetDeviceAvailabilityResponse200< - T extends 'request' | 'response' | 'all', ->(object: unknown): getDeviceAvailabilityResponse200; +export declare function validateGetDeviceAvailabilityResponse200( + object: unknown +): getDeviceAvailabilityResponse200 -export declare function validateAddDeviceAvailabilityRulesBody< - T extends 'request' | 'response' | 'all', ->(object: unknown): addDeviceAvailabilityRulesBody; +export declare function validateAddDeviceAvailabilityRulesBody( + object: unknown +): addDeviceAvailabilityRulesBody -export declare function validateAddDeviceAvailabilityRulesResponse200< - T extends 'request' | 'response' | 'all', ->(object: unknown): addDeviceAvailabilityRulesResponse200; +export declare function validateAddDeviceAvailabilityRulesResponse200( + object: unknown +): addDeviceAvailabilityRulesResponse200 -export declare function validateCreateWebsocketTokenResponse200< - T extends 'request' | 'response' | 'all', ->(object: unknown): createWebsocketTokenResponse200; +export declare function validateCreateWebsocketTokenResponse200( + object: unknown +): createWebsocketTokenResponse200 -export declare function validateSendSignalingMessageBody< - T extends 'request' | 'response' | 'all', ->(object: unknown): sendSignalingMessageBody; +export declare function validateSendSignalingMessageBody( + object: unknown +): sendSignalingMessageBody -export declare function validateListPeerconnectionsResponse200< - T extends 'request' | 'response' | 'all', ->(object: unknown): listPeerconnectionsResponse200; +export declare function validateListPeerconnectionsResponse200( + object: unknown +): listPeerconnectionsResponse200 -export declare function validateCreatePeerconnectionBody< - T extends 'request' | 'response' | 'all', ->(object: unknown): createPeerconnectionBody; +export declare function validateCreatePeerconnectionBody( + object: unknown +): createPeerconnectionBody -export declare function validateCreatePeerconnectionResponse201< - T extends 'request' | 'response' | 'all', ->(object: unknown): createPeerconnectionResponse201; +export declare function validateCreatePeerconnectionResponse201( + object: unknown +): createPeerconnectionResponse201 -export declare function validateCreatePeerconnectionResponse202< - T extends 'request' | 'response' | 'all', ->(object: unknown): createPeerconnectionResponse202; +export declare function validateCreatePeerconnectionResponse202( + object: unknown +): createPeerconnectionResponse202 -export declare function validateGetPeerconnectionResponse200< - T extends 'request' | 'response' | 'all', ->(object: unknown): getPeerconnectionResponse200; +export declare function validateGetPeerconnectionResponse200( + object: unknown +): getPeerconnectionResponse200 -export declare function validatePatchPeerconnectionDeviceStatusBody< - T extends 'request' | 'response' | 'all', ->(object: unknown): patchPeerconnectionDeviceStatusBody; +export declare function validatePatchPeerconnectionDeviceStatusBody( + object: unknown +): patchPeerconnectionDeviceStatusBody -export declare function validateAuthenticationMessageRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): AuthenticationMessageRequest; +export declare function validateAuthenticationMessageRequest( + object: unknown +): AuthenticationMessageRequest -export declare function validateAuthenticationMessageResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): AuthenticationMessageResponse; +export declare function validateAuthenticationMessageResponse( + object: unknown +): AuthenticationMessageResponse -export declare function validateConnectionStateChangedMessageRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConnectionStateChangedMessageRequest; +export declare function validateConnectionStateChangedMessageRequest( + object: unknown +): ConnectionStateChangedMessageRequest -export declare function validateConnectionStateChangedMessageResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConnectionStateChangedMessageResponse; +export declare function validateConnectionStateChangedMessageResponse( + object: unknown +): ConnectionStateChangedMessageResponse -export declare function validateUserReferenceRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): UserReferenceRequest; +export declare function validateUserReferenceRequest( + object: unknown +): UserReferenceRequest -export declare function validateUserReferenceResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): UserReferenceResponse; +export declare function validateUserReferenceResponse( + object: unknown +): UserReferenceResponse -export declare function validateDeviceOverviewRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceOverviewRequest; +export declare function validateDeviceOverviewRequest( + object: unknown +): DeviceOverviewRequest -export declare function validateDeviceOverviewResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceOverviewResponse; +export declare function validateDeviceOverviewResponse( + object: unknown +): DeviceOverviewResponse -export declare function validateServiceDescriptionRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ServiceDescriptionRequest; +export declare function validateServiceDescriptionRequest( + object: unknown +): ServiceDescriptionRequest -export declare function validateServiceDescriptionResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ServiceDescriptionResponse; +export declare function validateServiceDescriptionResponse( + object: unknown +): ServiceDescriptionResponse -export declare function validateInstantiableCloudDeviceRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableCloudDeviceRequest; +export declare function validateInstantiableCloudDeviceRequest( + object: unknown +): InstantiableCloudDeviceRequest -export declare function validateInstantiableCloudDeviceResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableCloudDeviceResponse; +export declare function validateInstantiableCloudDeviceResponse( + object: unknown +): InstantiableCloudDeviceResponse export declare function validateTimeSlotRequest( - object: unknown, -): TimeSlotRequest; + object: unknown +): TimeSlotRequest -export declare function validateTimeSlotResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): TimeSlotResponse; +export declare function validateTimeSlotResponse( + object: unknown +): TimeSlotResponse -export declare function validateAvailabilityRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): AvailabilityRequest; +export declare function validateAvailabilityRequest( + object: unknown +): AvailabilityRequest -export declare function validateAvailabilityResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): AvailabilityResponse; +export declare function validateAvailabilityResponse( + object: unknown +): AvailabilityResponse -export declare function validateConcreteDeviceRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConcreteDeviceRequest; +export declare function validateConcreteDeviceRequest( + object: unknown +): ConcreteDeviceRequest -export declare function validateConcreteDeviceResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConcreteDeviceResponse; +export declare function validateConcreteDeviceResponse( + object: unknown +): ConcreteDeviceResponse -export declare function validateInstantiableBrowserDeviceRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableBrowserDeviceRequest; +export declare function validateInstantiableBrowserDeviceRequest( + object: unknown +): InstantiableBrowserDeviceRequest -export declare function validateInstantiableBrowserDeviceResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableBrowserDeviceResponse; +export declare function validateInstantiableBrowserDeviceResponse( + object: unknown +): InstantiableBrowserDeviceResponse -export declare function validateDeviceReferenceRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceReferenceRequest; +export declare function validateDeviceReferenceRequest( + object: unknown +): DeviceReferenceRequest -export declare function validateDeviceReferenceResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceReferenceResponse; +export declare function validateDeviceReferenceResponse( + object: unknown +): DeviceReferenceResponse -export declare function validateDeviceGroupRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceGroupRequest; +export declare function validateDeviceGroupRequest( + object: unknown +): DeviceGroupRequest -export declare function validateDeviceGroupResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceGroupResponse; +export declare function validateDeviceGroupResponse( + object: unknown +): DeviceGroupResponse export declare function validateDeviceRequest( - object: unknown, -): DeviceRequest; + object: unknown +): DeviceRequest export declare function validateDeviceResponse( - object: unknown, -): DeviceResponse; + object: unknown +): DeviceResponse export declare function validateCallbackRequest( - object: unknown, -): CallbackRequest; + object: unknown +): CallbackRequest -export declare function validateCallbackResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): CallbackResponse; +export declare function validateCallbackResponse( + object: unknown +): CallbackResponse -export declare function validateEventCallbackRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): EventCallbackRequest; +export declare function validateEventCallbackRequest( + object: unknown +): EventCallbackRequest -export declare function validateEventCallbackResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): EventCallbackResponse; +export declare function validateEventCallbackResponse( + object: unknown +): EventCallbackResponse -export declare function validateDeviceChangedEventCallbackRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceChangedEventCallbackRequest; +export declare function validateDeviceChangedEventCallbackRequest( + object: unknown +): DeviceChangedEventCallbackRequest -export declare function validateDeviceChangedEventCallbackResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceChangedEventCallbackResponse; +export declare function validateDeviceChangedEventCallbackResponse( + object: unknown +): DeviceChangedEventCallbackResponse -export declare function validateDeviceOverviewUpdateRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceOverviewUpdateRequest; +export declare function validateDeviceOverviewUpdateRequest( + object: unknown +): DeviceOverviewUpdateRequest -export declare function validateDeviceOverviewUpdateResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceOverviewUpdateResponse; +export declare function validateDeviceOverviewUpdateResponse( + object: unknown +): DeviceOverviewUpdateResponse -export declare function validateInstantiableCloudDeviceUpdateRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableCloudDeviceUpdateRequest; +export declare function validateInstantiableCloudDeviceUpdateRequest( + object: unknown +): InstantiableCloudDeviceUpdateRequest -export declare function validateInstantiableCloudDeviceUpdateResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableCloudDeviceUpdateResponse; +export declare function validateInstantiableCloudDeviceUpdateResponse( + object: unknown +): InstantiableCloudDeviceUpdateResponse -export declare function validateConcreteDeviceUpdateRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConcreteDeviceUpdateRequest; +export declare function validateConcreteDeviceUpdateRequest( + object: unknown +): ConcreteDeviceUpdateRequest -export declare function validateConcreteDeviceUpdateResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConcreteDeviceUpdateResponse; +export declare function validateConcreteDeviceUpdateResponse( + object: unknown +): ConcreteDeviceUpdateResponse -export declare function validateInstantiableBrowserDeviceUpdateRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableBrowserDeviceUpdateRequest; +export declare function validateInstantiableBrowserDeviceUpdateRequest( + object: unknown +): InstantiableBrowserDeviceUpdateRequest -export declare function validateInstantiableBrowserDeviceUpdateResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): InstantiableBrowserDeviceUpdateResponse; +export declare function validateInstantiableBrowserDeviceUpdateResponse( + object: unknown +): InstantiableBrowserDeviceUpdateResponse -export declare function validateDeviceGroupUpdateRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceGroupUpdateRequest; +export declare function validateDeviceGroupUpdateRequest( + object: unknown +): DeviceGroupUpdateRequest -export declare function validateDeviceGroupUpdateResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceGroupUpdateResponse; +export declare function validateDeviceGroupUpdateResponse( + object: unknown +): DeviceGroupUpdateResponse -export declare function validateDeviceUpdateRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceUpdateRequest; +export declare function validateDeviceUpdateRequest( + object: unknown +): DeviceUpdateRequest -export declare function validateDeviceUpdateResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceUpdateResponse; +export declare function validateDeviceUpdateResponse( + object: unknown +): DeviceUpdateResponse -export declare function validateAvailabilityRuleRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): AvailabilityRuleRequest; +export declare function validateAvailabilityRuleRequest( + object: unknown +): AvailabilityRuleRequest -export declare function validateAvailabilityRuleResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): AvailabilityRuleResponse; +export declare function validateAvailabilityRuleResponse( + object: unknown +): AvailabilityRuleResponse export declare function validateMessageRequest( - object: unknown, -): MessageRequest; + object: unknown +): MessageRequest export declare function validateMessageResponse( - object: unknown, -): MessageResponse; + object: unknown +): MessageResponse -export declare function validateCommandMessageRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): CommandMessageRequest; +export declare function validateCommandMessageRequest( + object: unknown +): CommandMessageRequest -export declare function validateCommandMessageResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): CommandMessageResponse; +export declare function validateCommandMessageResponse( + object: unknown +): CommandMessageResponse -export declare function validateServiceConfigRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ServiceConfigRequest; +export declare function validateServiceConfigRequest( + object: unknown +): ServiceConfigRequest -export declare function validateServiceConfigResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ServiceConfigResponse; +export declare function validateServiceConfigResponse( + object: unknown +): ServiceConfigResponse -export declare function validateCreatePeerconnectionMessageRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): CreatePeerconnectionMessageRequest; +export declare function validateCreatePeerconnectionMessageRequest( + object: unknown +): CreatePeerconnectionMessageRequest -export declare function validateCreatePeerconnectionMessageResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): CreatePeerconnectionMessageResponse; +export declare function validateCreatePeerconnectionMessageResponse( + object: unknown +): CreatePeerconnectionMessageResponse -export declare function validateClosePeerconnectionMessageRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ClosePeerconnectionMessageRequest; +export declare function validateClosePeerconnectionMessageRequest( + object: unknown +): ClosePeerconnectionMessageRequest -export declare function validateClosePeerconnectionMessageResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ClosePeerconnectionMessageResponse; +export declare function validateClosePeerconnectionMessageResponse( + object: unknown +): ClosePeerconnectionMessageResponse -export declare function validateSignalingMessageRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): SignalingMessageRequest; +export declare function validateSignalingMessageRequest( + object: unknown +): SignalingMessageRequest -export declare function validateSignalingMessageResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): SignalingMessageResponse; +export declare function validateSignalingMessageResponse( + object: unknown +): SignalingMessageResponse -export declare function validateConfigurationMessageRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConfigurationMessageRequest; +export declare function validateConfigurationMessageRequest( + object: unknown +): ConfigurationMessageRequest -export declare function validateConfigurationMessageResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConfigurationMessageResponse; +export declare function validateConfigurationMessageResponse( + object: unknown +): ConfigurationMessageResponse -export declare function validateExperimentStatusChangedMessageRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ExperimentStatusChangedMessageRequest; +export declare function validateExperimentStatusChangedMessageRequest( + object: unknown +): ExperimentStatusChangedMessageRequest -export declare function validateExperimentStatusChangedMessageResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ExperimentStatusChangedMessageResponse; +export declare function validateExperimentStatusChangedMessageResponse( + object: unknown +): ExperimentStatusChangedMessageResponse -export declare function validateConnectionStatusRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConnectionStatusRequest; +export declare function validateConnectionStatusRequest( + object: unknown +): ConnectionStatusRequest -export declare function validateConnectionStatusResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConnectionStatusResponse; +export declare function validateConnectionStatusResponse( + object: unknown +): ConnectionStatusResponse -export declare function validatePeerconnectionCommonRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionCommonRequest; +export declare function validatePeerconnectionCommonRequest( + object: unknown +): PeerconnectionCommonRequest -export declare function validatePeerconnectionCommonResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionCommonResponse; +export declare function validatePeerconnectionCommonResponse( + object: unknown +): PeerconnectionCommonResponse -export declare function validatePeerconnectionOverviewRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionOverviewRequest; +export declare function validatePeerconnectionOverviewRequest( + object: unknown +): PeerconnectionOverviewRequest -export declare function validatePeerconnectionOverviewResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionOverviewResponse; +export declare function validatePeerconnectionOverviewResponse( + object: unknown +): PeerconnectionOverviewResponse -export declare function validateConfiguredDeviceReferenceRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConfiguredDeviceReferenceRequest; +export declare function validateConfiguredDeviceReferenceRequest( + object: unknown +): ConfiguredDeviceReferenceRequest -export declare function validateConfiguredDeviceReferenceResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ConfiguredDeviceReferenceResponse; +export declare function validateConfiguredDeviceReferenceResponse( + object: unknown +): ConfiguredDeviceReferenceResponse -export declare function validatePeerconnectionRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionRequest; +export declare function validatePeerconnectionRequest( + object: unknown +): PeerconnectionRequest -export declare function validatePeerconnectionResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionResponse; +export declare function validatePeerconnectionResponse( + object: unknown +): PeerconnectionResponse -export declare function validatePeerconnectionClosedEventCallbackRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionClosedEventCallbackRequest; +export declare function validatePeerconnectionClosedEventCallbackRequest( + object: unknown +): PeerconnectionClosedEventCallbackRequest -export declare function validatePeerconnectionClosedEventCallbackResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionClosedEventCallbackResponse; +export declare function validatePeerconnectionClosedEventCallbackResponse( + object: unknown +): PeerconnectionClosedEventCallbackResponse -export declare function validatePeerconnectionStatusChangedEventCallbackRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionStatusChangedEventCallbackRequest; +export declare function validatePeerconnectionStatusChangedEventCallbackRequest( + object: unknown +): PeerconnectionStatusChangedEventCallbackRequest -export declare function validatePeerconnectionStatusChangedEventCallbackResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionStatusChangedEventCallbackResponse; +export declare function validatePeerconnectionStatusChangedEventCallbackResponse( + object: unknown +): PeerconnectionStatusChangedEventCallbackResponse -export declare function validateChangedUrlRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ChangedUrlRequest; +export declare function validateChangedUrlRequest( + object: unknown +): ChangedUrlRequest -export declare function validateChangedUrlResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ChangedUrlResponse; +export declare function validateChangedUrlResponse( + object: unknown +): ChangedUrlResponse export declare function validateDeviceIdRequest( - object: unknown, -): DeviceIdRequest; + object: unknown +): DeviceIdRequest -export declare function validateDeviceIdResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceIdResponse; +export declare function validateDeviceIdResponse( + object: unknown +): DeviceIdResponse -export declare function validateFlatGroupRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): FlatGroupRequest; +export declare function validateFlatGroupRequest( + object: unknown +): FlatGroupRequest -export declare function validateFlatGroupResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): FlatGroupResponse; +export declare function validateFlatGroupResponse( + object: unknown +): FlatGroupResponse -export declare function validateStartTimeRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): StartTimeRequest; +export declare function validateStartTimeRequest( + object: unknown +): StartTimeRequest -export declare function validateStartTimeResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): StartTimeResponse; +export declare function validateStartTimeResponse( + object: unknown +): StartTimeResponse export declare function validateEndTimeRequest( - object: unknown, -): EndTimeRequest; + object: unknown +): EndTimeRequest export declare function validateEndTimeResponse( - object: unknown, -): EndTimeResponse; + object: unknown +): EndTimeResponse -export declare function validateClosedUrlRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): ClosedUrlRequest; +export declare function validateClosedUrlRequest( + object: unknown +): ClosedUrlRequest -export declare function validateClosedUrlResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): ClosedUrlResponse; +export declare function validateClosedUrlResponse( + object: unknown +): ClosedUrlResponse -export declare function validateStatusChangedUrlRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): StatusChangedUrlRequest; +export declare function validateStatusChangedUrlRequest( + object: unknown +): StatusChangedUrlRequest -export declare function validateStatusChangedUrlResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): StatusChangedUrlResponse; +export declare function validateStatusChangedUrlResponse( + object: unknown +): StatusChangedUrlResponse -export declare function validatePeerconnectionIdRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionIdRequest; +export declare function validatePeerconnectionIdRequest( + object: unknown +): PeerconnectionIdRequest -export declare function validatePeerconnectionIdResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): PeerconnectionIdResponse; +export declare function validatePeerconnectionIdResponse( + object: unknown +): PeerconnectionIdResponse -export declare function validateDeviceUrlRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceUrlRequest; +export declare function validateDeviceUrlRequest( + object: unknown +): DeviceUrlRequest -export declare function validateDeviceUrlResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): DeviceUrlResponse; +export declare function validateDeviceUrlResponse( + object: unknown +): DeviceUrlResponse -export declare function validateListDevicesResponse200Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): listDevicesResponse200Request; +export declare function validateListDevicesResponse200Request( + object: unknown +): listDevicesResponse200Request -export declare function validateListDevicesResponse200Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): listDevicesResponse200Response; +export declare function validateListDevicesResponse200Response( + object: unknown +): listDevicesResponse200Response -export declare function validateCreateDeviceBodyRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): createDeviceBodyRequest; +export declare function validateCreateDeviceBodyRequest( + object: unknown +): createDeviceBodyRequest -export declare function validateCreateDeviceBodyResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): createDeviceBodyResponse; +export declare function validateCreateDeviceBodyResponse( + object: unknown +): createDeviceBodyResponse -export declare function validateCreateDeviceResponse201Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): createDeviceResponse201Request; +export declare function validateCreateDeviceResponse201Request( + object: unknown +): createDeviceResponse201Request -export declare function validateCreateDeviceResponse201Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): createDeviceResponse201Response; +export declare function validateCreateDeviceResponse201Response( + object: unknown +): createDeviceResponse201Response -export declare function validateGetDeviceResponse200Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): getDeviceResponse200Request; +export declare function validateGetDeviceResponse200Request( + object: unknown +): getDeviceResponse200Request -export declare function validateGetDeviceResponse200Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): getDeviceResponse200Response; +export declare function validateGetDeviceResponse200Response( + object: unknown +): getDeviceResponse200Response -export declare function validateUpdateDeviceBodyRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): updateDeviceBodyRequest; +export declare function validateUpdateDeviceBodyRequest( + object: unknown +): updateDeviceBodyRequest -export declare function validateUpdateDeviceBodyResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): updateDeviceBodyResponse; +export declare function validateUpdateDeviceBodyResponse( + object: unknown +): updateDeviceBodyResponse -export declare function validateUpdateDeviceResponse200Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): updateDeviceResponse200Request; +export declare function validateUpdateDeviceResponse200Request( + object: unknown +): updateDeviceResponse200Request -export declare function validateUpdateDeviceResponse200Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): updateDeviceResponse200Response; +export declare function validateUpdateDeviceResponse200Response( + object: unknown +): updateDeviceResponse200Response -export declare function validateInstantiateDeviceResponse201Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): instantiateDeviceResponse201Request; +export declare function validateInstantiateDeviceResponse201Request( + object: unknown +): instantiateDeviceResponse201Request -export declare function validateInstantiateDeviceResponse201Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): instantiateDeviceResponse201Response; +export declare function validateInstantiateDeviceResponse201Response( + object: unknown +): instantiateDeviceResponse201Response -export declare function validateGetDeviceAvailabilityResponse200Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): getDeviceAvailabilityResponse200Request; +export declare function validateGetDeviceAvailabilityResponse200Request( + object: unknown +): getDeviceAvailabilityResponse200Request -export declare function validateGetDeviceAvailabilityResponse200Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): getDeviceAvailabilityResponse200Response; +export declare function validateGetDeviceAvailabilityResponse200Response( + object: unknown +): getDeviceAvailabilityResponse200Response -export declare function validateAddDeviceAvailabilityRulesBodyRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): addDeviceAvailabilityRulesBodyRequest; +export declare function validateAddDeviceAvailabilityRulesBodyRequest( + object: unknown +): addDeviceAvailabilityRulesBodyRequest -export declare function validateAddDeviceAvailabilityRulesBodyResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): addDeviceAvailabilityRulesBodyResponse; +export declare function validateAddDeviceAvailabilityRulesBodyResponse( + object: unknown +): addDeviceAvailabilityRulesBodyResponse -export declare function validateAddDeviceAvailabilityRulesResponse200Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): addDeviceAvailabilityRulesResponse200Request; +export declare function validateAddDeviceAvailabilityRulesResponse200Request( + object: unknown +): addDeviceAvailabilityRulesResponse200Request -export declare function validateAddDeviceAvailabilityRulesResponse200Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): addDeviceAvailabilityRulesResponse200Response; +export declare function validateAddDeviceAvailabilityRulesResponse200Response( + object: unknown +): addDeviceAvailabilityRulesResponse200Response -export declare function validateCreateWebsocketTokenResponse200Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): createWebsocketTokenResponse200Request; +export declare function validateCreateWebsocketTokenResponse200Request( + object: unknown +): createWebsocketTokenResponse200Request -export declare function validateCreateWebsocketTokenResponse200Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): createWebsocketTokenResponse200Response; +export declare function validateCreateWebsocketTokenResponse200Response( + object: unknown +): createWebsocketTokenResponse200Response -export declare function validateSendSignalingMessageBodyRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): sendSignalingMessageBodyRequest; +export declare function validateSendSignalingMessageBodyRequest( + object: unknown +): sendSignalingMessageBodyRequest -export declare function validateSendSignalingMessageBodyResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): sendSignalingMessageBodyResponse; +export declare function validateSendSignalingMessageBodyResponse( + object: unknown +): sendSignalingMessageBodyResponse -export declare function validateListPeerconnectionsResponse200Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): listPeerconnectionsResponse200Request; +export declare function validateListPeerconnectionsResponse200Request( + object: unknown +): listPeerconnectionsResponse200Request -export declare function validateListPeerconnectionsResponse200Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): listPeerconnectionsResponse200Response; +export declare function validateListPeerconnectionsResponse200Response( + object: unknown +): listPeerconnectionsResponse200Response -export declare function validateCreatePeerconnectionBodyRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): createPeerconnectionBodyRequest; +export declare function validateCreatePeerconnectionBodyRequest( + object: unknown +): createPeerconnectionBodyRequest -export declare function validateCreatePeerconnectionBodyResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): createPeerconnectionBodyResponse; +export declare function validateCreatePeerconnectionBodyResponse( + object: unknown +): createPeerconnectionBodyResponse -export declare function validateCreatePeerconnectionResponse201Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): createPeerconnectionResponse201Request; +export declare function validateCreatePeerconnectionResponse201Request( + object: unknown +): createPeerconnectionResponse201Request -export declare function validateCreatePeerconnectionResponse201Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): createPeerconnectionResponse201Response; +export declare function validateCreatePeerconnectionResponse201Response( + object: unknown +): createPeerconnectionResponse201Response -export declare function validateCreatePeerconnectionResponse202Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): createPeerconnectionResponse202Request; +export declare function validateCreatePeerconnectionResponse202Request( + object: unknown +): createPeerconnectionResponse202Request -export declare function validateCreatePeerconnectionResponse202Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): createPeerconnectionResponse202Response; +export declare function validateCreatePeerconnectionResponse202Response( + object: unknown +): createPeerconnectionResponse202Response -export declare function validateGetPeerconnectionResponse200Request< - T extends 'request' | 'response' | 'all', ->(object: unknown): getPeerconnectionResponse200Request; +export declare function validateGetPeerconnectionResponse200Request( + object: unknown +): getPeerconnectionResponse200Request -export declare function validateGetPeerconnectionResponse200Response< - T extends 'request' | 'response' | 'all', ->(object: unknown): getPeerconnectionResponse200Response; +export declare function validateGetPeerconnectionResponse200Response( + object: unknown +): getPeerconnectionResponse200Response -export declare function validatePatchPeerconnectionDeviceStatusBodyRequest< - T extends 'request' | 'response' | 'all', ->(object: unknown): patchPeerconnectionDeviceStatusBodyRequest; +export declare function validatePatchPeerconnectionDeviceStatusBodyRequest( + object: unknown +): patchPeerconnectionDeviceStatusBodyRequest + +export declare function validatePatchPeerconnectionDeviceStatusBodyResponse( + object: unknown +): patchPeerconnectionDeviceStatusBodyResponse -export declare function validatePatchPeerconnectionDeviceStatusBodyResponse< - T extends 'request' | 'response' | 'all', ->(object: unknown): patchPeerconnectionDeviceStatusBodyResponse; diff --git a/services/booking/src/common/src/clients/device/client.ts b/services/booking/src/common/src/clients/device/client.ts index 19211284..c644f942 100644 --- a/services/booking/src/common/src/clients/device/client.ts +++ b/services/booking/src/common/src/clients/device/client.ts @@ -5,28 +5,28 @@ */ /* eslint-disable @typescript-eslint/no-unused-vars */ - /* eslint-disable @typescript-eslint/ban-ts-comment */ -import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; + +import fetch, { RequestInfo, RequestInit, Response } from "node-fetch"; import * as RequestValidation from './requestValidation.js'; import * as Signatures from './signatures.js'; import * as Types from './types.js'; // @ts-ignore -import { type Require } from './types.js'; +import { type Require } from "./types.js" /** * This error class should be used if an error occurs during validation of a request/response. * @category Errors */ export class ValidationError extends Error { - public errors: unknown; + public errors: unknown - constructor(message: string, errors: unknown) { - super(message); - this.name = 'ValidationError'; - this.errors = errors; - } + constructor(message: string, errors: unknown) { + super(message) + this.name = "ValidationError" + this.errors = errors + } } /** @@ -34,25 +34,25 @@ export class ValidationError extends Error { * @category Errors */ export class FetchError extends Error { - constructor(message: string) { - super(message); - this.name = 'FetchError'; - } + constructor(message: string) { + super(message) + this.name = "FetchError" + } } /** - * This error class should be used if the response of the server has a status + * This error class should be used if the response of the server has a status * greater than or equal to 400. This error should contain the validated response. * @category Errors */ export class UnsuccessfulRequestError extends Error { - public response: Types.ResponseData; + public response: Types.ResponseData - constructor(message: string, response: Types.ResponseData) { - super(message); - this.response = response; - this.name = 'UnsuccessfulRequestError'; - } + constructor(message: string, response: Types.ResponseData) { + super(message) + this.response = response + this.name = 'UnsuccessfulRequestError' + } } /** @@ -60,24 +60,24 @@ export class UnsuccessfulRequestError extends Error { * @category Errors */ export class InvalidUrlError extends Error { - constructor(message: string) { - super(message); - this.name = 'InvalidUrlError'; - } + constructor(message: string) { + super(message) + this.name = 'InvalidUrlError' + } } /** * This function attempts to parse a Response as ResponseData. */ async function parseResponse(response: Response): Promise { - let text = null; - try { - text = await response.text(); - const json = JSON.parse(text); - return { status: response.status, body: json }; - } catch { - return { status: response.status, body: text }; - } + let text = null + try { + text = await response.text() + const json = JSON.parse(text) + return { status: response.status, body: json } + } catch { + return { status: response.status, body: text } + } } /** @@ -86,15 +86,15 @@ async function parseResponse(response: Response): Promise { * @returns True if the string is a valid http url. */ function isValidHttpUrl(string: string) { - let url; + let url - try { - url = new URL(string); - } catch (_) { - return false; - } + try { + url = new URL(string) + } catch (_) { + return false + } - return url.protocol === 'http:' || url.protocol === 'https:'; + return url.protocol === 'http:' || url.protocol === 'https:' } /** @@ -108,13 +108,15 @@ function isValidHttpUrl(string: string) { * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; - const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); - const matches = url.match(regex); + const parameterRegex = '([a-zA-Z0-9-:]+)' + const regex = new RegExp( + endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$' + ) + const matches = url.match(regex) - if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint'); + if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint') - return matches.slice(1); + return matches.slice(1) } /** @@ -130,10 +132,8 @@ function parsePathParameters(url: string, endpoint: string): string[] { function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError( - `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, - ); + if (!(url).startsWith(baseUrl)) + throw new InvalidUrlError(`Provided url "${url}" does not start with the provided base url "${baseUrl}"`); const pathParameters = parsePathParameters(url, endpoint); let extendedBaseUrl = baseUrl + endpoint; @@ -143,9 +143,7 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { }); if (url !== extendedBaseUrl) - throw new InvalidUrlError( - `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, - ); + throw new InvalidUrlError(`Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`); return pathParameters; } @@ -163,7 +161,7 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { * @returns The url with the appended endpoint. */ function appendToUrl(url: string, endpoint: string) { - return url.endsWith('/') ? `${url.slice(0, -1)}${endpoint}` : `${url}${endpoint}`; + return url.endsWith('/') ? `${url.slice(0, -1)}${endpoint}` : `${url}${endpoint}` } /** @@ -171,1438 +169,1245 @@ function appendToUrl(url: string, endpoint: string) { * @category Client */ export class Client { - public readonly baseUrl: string; - public readonly serviceUrl: string; - public accessToken: string; - private fixedHeaders: [string, string][]; - private fetch = async (url: RequestInfo | URL, init: RequestInit) => { - let raw_response; - const parsedUrl = new URL(url.toString()); - try { - if ( - parsedUrl.toString().startsWith(this.baseUrl) || - parsedUrl.toString().startsWith(this.serviceUrl) - ) { - raw_response = await fetch(url, init); - } else { - raw_response = await fetch( - appendToUrl( - this.baseUrl, - '/proxy?' + new URLSearchParams([['URL', url.toString()]]).toString(), - ), - init, - ); - } - } catch (error) { - if (error instanceof Error) { - throw new FetchError(error.message); - } else if (typeof error === 'string') { - throw new FetchError(error); - } else { - throw new FetchError('Something went wrong while trying to fetch the request'); - } - } - return await parseResponse(raw_response); - }; - - /** - * @category Constructors - */ - constructor( - baseUrl: string, - options: { - serviceUrl?: string; - accessToken?: string; - fixedHeaders?: [string, string][]; - }, - ) { - this.baseUrl = new URL(baseUrl).toString().slice(0, -1); - this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); - this.accessToken = options.accessToken ?? ''; - this.fixedHeaders = options.fixedHeaders ?? []; - } - - /** - * List devices - * - * @param options.url - * Url of the to be used. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The list of all devices. - */ - public async listDevices(options?: { - headers?: [string, string][]; - url?: string; - }): Promise { - const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); - console.log('trying to fetch url:', url); - - if (!RequestValidation.validateListDevicesInput()) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateListDevicesInput as Types.FunctionWithErrors).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }, - ); - - if (!RequestValidation.validateListDevicesOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateListDevicesOutput as Types.FunctionWithErrors).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * Create a new device - * - * @param device - * The device to be created. - * @param options.changedUrl - * **An URL that will be called once the device changes.** - * - * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed - * as long as every callback resolves with a successful status code. - * - * If the callback fails the url MIGHT not be called in the future. - * - * There can be multiple callbacks registered with the same device. - * @param options.url - * Url of the to be used. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The device was created. A JSON representation of the new device is returned. - */ - public async createDevice( - device: Types.Device<'request'>, - options?: { - headers?: [string, string][]; - changedUrl?: string; - url?: string; - }, - ): Promise { - const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); - console.log('trying to fetch url:', url); - - const body = device; - - const parameters = { - changedUrl: options?.changedUrl, + public readonly baseUrl: string; + public readonly serviceUrl: string; + public accessToken: string; + private fixedHeaders: [string, string][] + private fetch = async (url: RequestInfo | URL, init: RequestInit) => { + let raw_response; + const parsedUrl = new URL(url.toString()) + try { + if ( + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) + ) { + raw_response = await fetch(url, init); + } else { + raw_response = await fetch( + appendToUrl( + this.baseUrl, + '/proxy?' + new URLSearchParams([['URL', url.toString()]]).toString(), + ), + init, + ); + } + } catch (error) { + if (error instanceof Error) { + throw new FetchError(error.message); + } else if (typeof error === 'string') { + throw new FetchError(error); + } else { + throw new FetchError('Something went wrong while trying to fetch the request'); + } + } + return await parseResponse(raw_response); }; - const query: [string, string][] = []; - - if (parameters['changedUrl']) - query.push(['changedUrl', parameters['changedUrl'].toString()]); - - if (!RequestValidation.validateCreateDeviceInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateCreateDeviceInput as Types.FunctionWithErrors).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }, - ); - - if (!RequestValidation.validateCreateDeviceOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateCreateDeviceOutput as Types.FunctionWithErrors).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * View a registered device - * - * @param url - * Url of the resource to be accessed. - * @param options.flat_group - * If true the returned device group will only contain concrete devices. I.e. any subgroups will be flattend. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the device. - */ - public async getDevice( - url: string, - options?: { - headers?: [string, string][]; - flat_group?: boolean; - }, - ): Promise { - const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); - console.log('trying to fetch url:', url); - - const parameters = { - device_id: device_id, - flat_group: options?.flat_group, - }; + /** + * @category Constructors + */ + constructor( + baseUrl: string, + options: { serviceUrl?: string; accessToken?: string, fixedHeaders?: [string, string][] }, + ) { + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); + this.accessToken = options.accessToken ?? ''; + this.fixedHeaders = options.fixedHeaders ?? []; + } - const query: [string, string][] = []; - - if (parameters['flat_group']) - query.push(['flat_group', parameters['flat_group'].toString()]); - - if (!RequestValidation.validateGetDeviceInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateGetDeviceInput as Types.FunctionWithErrors).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }, - ); - - if (!RequestValidation.validateGetDeviceOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateGetDeviceOutput as Types.FunctionWithErrors).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * Update an existing device - * - * @param url - * Url of the resource to be accessed. - * @param deviceUpdate - * Updated device. - * @param options.changedUrl - * **An URL that will be called once the device changes.** - * - * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed - * as long as every callback resolves with a successful status code. - * - * If the callback fails the url MIGHT not be called in the future. - * - * There can be multiple callbacks registered with the same device. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the changed device. - */ - public async updateDevice( - url: string, - deviceUpdate: Types.DeviceUpdate<'request'> | undefined, - options?: { - headers?: [string, string][]; - changedUrl?: string; - }, - ): Promise { - const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); - console.log('trying to fetch url:', url); - - const body = deviceUpdate; - - const parameters = { - device_id: device_id, - changedUrl: options?.changedUrl, - }; + /** + * List devices + * + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The list of all devices. + */ + public async listDevices( + options?: { + headers?: [string, string][],url?: string}): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, "/devices") + console.log("trying to fetch url:", url); + + + + + + if (!RequestValidation.validateListDevicesInput()) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateListDevicesInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { + method: "GET", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ] + }) + + if (!RequestValidation.validateListDevicesOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateListDevicesOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + + return response.body + } - const query: [string, string][] = []; - - if (parameters['changedUrl']) - query.push(['changedUrl', parameters['changedUrl'].toString()]); - - if (!RequestValidation.validateUpdateDeviceInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateUpdateDeviceInput as Types.FunctionWithErrors).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - { - method: 'PATCH', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }, - ); - - if (!RequestValidation.validateUpdateDeviceOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateUpdateDeviceOutput as Types.FunctionWithErrors).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * Delete a registered device - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The device was deleted. - */ - public async deleteDevice( - url: string, - options?: { - headers?: [string, string][]; - }, - ): Promise { - const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); - console.log('trying to fetch url:', url); - - const parameters = { - device_id: device_id, - }; + /** + * Create a new device + * + * @param device + * The device to be created. + * @param options.changedUrl + * **An URL that will be called once the device changes.** + * + * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed + * as long as every callback resolves with a successful status code. + * + * If the callback fails the url MIGHT not be called in the future. + * + * There can be multiple callbacks registered with the same device. + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The device was created. A JSON representation of the new device is returned. + */ + public async createDevice(device: Types.Device<"request">, + options?: { + headers?: [string, string][],changedUrl?: string,url?: string}): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, "/devices") + console.log("trying to fetch url:", url); + + const body = device + + + const parameters = { + changedUrl: options?.changedUrl, + } + + const query: [string,string][] = [] + + if (parameters["changedUrl"]) + query.push(["changedUrl", parameters["changedUrl"].toString()]) + + if (!RequestValidation.validateCreateDeviceInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateCreateDeviceInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + method: "POST", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ], + body: JSON.stringify(body) + }) + + if (!RequestValidation.validateCreateDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateCreateDeviceOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + + return response.body + } - if (!RequestValidation.validateDeleteDeviceInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateDeleteDeviceInput as Types.FunctionWithErrors).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }, - ); - - if (!RequestValidation.validateDeleteDeviceOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateDeleteDeviceOutput as Types.FunctionWithErrors).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - } - - /** - * Instantiate a cloud instantiable device - * - * @param url - * Url of the resource to be accessed. - * @param options.changedUrl - * **An URL that will be called once the device changes.** - * - * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed - * as long as every callback resolves with a successful status code. - * - * If the callback fails the url MIGHT not be called in the future. - * - * There can be multiple callbacks registered with the same device. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the created instance. - */ - public async instantiateDevice( - url: string, - options?: { - headers?: [string, string][]; - changedUrl?: string; - }, - ): Promise { - const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); - console.log('trying to fetch url:', url); - - const parameters = { - device_id: device_id, - changedUrl: options?.changedUrl, - }; + /** + * View a registered device + * + * @param url + * Url of the resource to be accessed. + * @param options.flat_group + * If true the returned device group will only contain concrete devices. I.e. any subgroups will be flattend. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the device. + */ + public async getDevice(url: string, + options?: { + headers?: [string, string][],flat_group?: boolean,}): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}') + console.log("trying to fetch url:", url); + + + + + const parameters = { + device_id: device_id, + flat_group: options?.flat_group, + } + + const query: [string,string][] = [] + + if (parameters["flat_group"]) + query.push(["flat_group", parameters["flat_group"].toString()]) + + if (!RequestValidation.validateGetDeviceInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateGetDeviceInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + method: "GET", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ] + }) + + if (!RequestValidation.validateGetDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateGetDeviceOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + + return response.body + } - const query: [string, string][] = []; - - if (parameters['changedUrl']) - query.push(['changedUrl', parameters['changedUrl'].toString()]); - - if (!RequestValidation.validateInstantiateDeviceInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validateInstantiateDeviceInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }, - ); - - if (!RequestValidation.validateInstantiateDeviceOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateInstantiateDeviceOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * Get the availability of a device - * - * @param url - * Url of the resource to be accessed. - * @param options.startTime - * Start time of the requested availability - * @param options.endTime - * End time of the requested availability - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the availability of the device. - */ - public async getDeviceAvailability( - url: string, - options?: { - headers?: [string, string][]; - startTime?: string; - endTime?: string; - }, - ): Promise { - const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/availability', - ); - console.log('trying to fetch url:', url); - - const parameters = { - device_id: device_id, - startTime: options?.startTime, - endTime: options?.endTime, - }; + /** + * Update an existing device + * + * @param url + * Url of the resource to be accessed. + * @param deviceUpdate + * Updated device. + * @param options.changedUrl + * **An URL that will be called once the device changes.** + * + * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed + * as long as every callback resolves with a successful status code. + * + * If the callback fails the url MIGHT not be called in the future. + * + * There can be multiple callbacks registered with the same device. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the changed device. + */ + public async updateDevice(url: string,deviceUpdate: Types.DeviceUpdate<"request"> | undefined, + options?: { + headers?: [string, string][],changedUrl?: string,}): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}') + console.log("trying to fetch url:", url); + + const body = deviceUpdate + + + const parameters = { + device_id: device_id, + changedUrl: options?.changedUrl, + } + + const query: [string,string][] = [] + + if (parameters["changedUrl"]) + query.push(["changedUrl", parameters["changedUrl"].toString()]) + + if (!RequestValidation.validateUpdateDeviceInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateUpdateDeviceInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + method: "PATCH", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ], + body: JSON.stringify(body) + }) + + if (!RequestValidation.validateUpdateDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateUpdateDeviceOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + + return response.body + } - const query: [string, string][] = []; - - if (parameters['startTime']) - query.push(['startTime', parameters['startTime'].toString()]); - - if (parameters['endTime']) query.push(['endTime', parameters['endTime'].toString()]); - - if (!RequestValidation.validateGetDeviceAvailabilityInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validateGetDeviceAvailabilityInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }, - ); - - if (!RequestValidation.validateGetDeviceAvailabilityOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateGetDeviceAvailabilityOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * Delete the availability rules of a device - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The availability rules of the device were deleted successfully. - */ - public async deleteDeviceAvailabilityRules( - url: string, - options?: { - headers?: [string, string][]; - }, - ): Promise { - const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/availability', - ); - console.log('trying to fetch url:', url); - - const parameters = { - device_id: device_id, - }; + /** + * Delete a registered device + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The device was deleted. + */ + public async deleteDevice(url: string, + options?: { + headers?: [string, string][],}): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}') + console.log("trying to fetch url:", url); + + + + + const parameters = { + device_id: device_id, + } + + if (!RequestValidation.validateDeleteDeviceInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateDeleteDeviceInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { + method: "DELETE", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ] + }) + + if (!RequestValidation.validateDeleteDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateDeleteDeviceOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + } - if (!RequestValidation.validateDeleteDeviceAvailabilityRulesInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validateDeleteDeviceAvailabilityRulesInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }, - ); - - if (!RequestValidation.validateDeleteDeviceAvailabilityRulesOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateDeleteDeviceAvailabilityRulesOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - } - - /** - * Add availability rules for a device - * - * @param url - * Url of the resource to be accessed. - * @param availabilityRules - * The availability rules to be applied. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the changed availability. - */ - public async addDeviceAvailabilityRules( - url: string, - availabilityRules: Types.AvailabilityRule<'request'>[] | undefined, - options?: { - headers?: [string, string][]; - }, - ): Promise { - const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/availability', - ); - console.log('trying to fetch url:', url); - - const body = availabilityRules; - - const parameters = { - device_id: device_id, - }; + /** + * Instantiate a cloud instantiable device + * + * @param url + * Url of the resource to be accessed. + * @param options.changedUrl + * **An URL that will be called once the device changes.** + * + * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed + * as long as every callback resolves with a successful status code. + * + * If the callback fails the url MIGHT not be called in the future. + * + * There can be multiple callbacks registered with the same device. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the created instance. + */ + public async instantiateDevice(url: string, + options?: { + headers?: [string, string][],changedUrl?: string,}): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}') + console.log("trying to fetch url:", url); + + + + + const parameters = { + device_id: device_id, + changedUrl: options?.changedUrl, + } + + const query: [string,string][] = [] + + if (parameters["changedUrl"]) + query.push(["changedUrl", parameters["changedUrl"].toString()]) + + if (!RequestValidation.validateInstantiateDeviceInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateInstantiateDeviceInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + method: "POST", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ] + }) + + if (!RequestValidation.validateInstantiateDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateInstantiateDeviceOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + + return response.body + } - if (!RequestValidation.validateAddDeviceAvailabilityRulesInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validateAddDeviceAvailabilityRulesInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }, - ); - - if (!RequestValidation.validateAddDeviceAvailabilityRulesOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateAddDeviceAvailabilityRulesOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * Create new websocket token for device - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The newly generated websocket token for the device. - */ - public async createWebsocketToken( - url: string, - options?: { - headers?: [string, string][]; - }, - ): Promise { - const urlSuffix = '/devices/{}/websocket'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/websocket', - ); - console.log('trying to fetch url:', url); - - const parameters = { - device_id: device_id, - }; + /** + * Get the availability of a device + * + * @param url + * Url of the resource to be accessed. + * @param options.startTime + * Start time of the requested availability + * @param options.endTime + * End time of the requested availability + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the availability of the device. + */ + public async getDeviceAvailability(url: string, + options?: { + headers?: [string, string][],startTime?: string,endTime?: string,}): Promise { + const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}/availability') + console.log("trying to fetch url:", url); + + + + + const parameters = { + device_id: device_id, + startTime: options?.startTime, + endTime: options?.endTime, + } + + const query: [string,string][] = [] + + if (parameters["startTime"]) + query.push(["startTime", parameters["startTime"].toString()]) + + if (parameters["endTime"]) + query.push(["endTime", parameters["endTime"].toString()]) + + if (!RequestValidation.validateGetDeviceAvailabilityInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateGetDeviceAvailabilityInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + method: "GET", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ] + }) + + if (!RequestValidation.validateGetDeviceAvailabilityOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateGetDeviceAvailabilityOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + + return response.body + } - if (!RequestValidation.validateCreateWebsocketTokenInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validateCreateWebsocketTokenInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }, - ); - - if (!RequestValidation.validateCreateWebsocketTokenOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateCreateWebsocketTokenOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * Send signaling message to device - * - * @param url - * Url of the resource to be accessed. - * @param sigMessage - * The signaling message to be sent. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The signaling message was delivered successfully. - */ - public async sendSignalingMessage( - url: string, - sigMessage: - | Types.CreatePeerconnectionMessage<'request'> - | Types.ClosePeerconnectionMessage<'request'> - | Types.SignalingMessage<'request'> - | Types.ConfigurationMessage<'request'> - | Types.ExperimentStatusChangedMessage<'request'>, - options?: { - headers?: [string, string][]; - }, - ): Promise { - const urlSuffix = '/devices/{}/signaling'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/signaling', - ); - console.log('trying to fetch url:', url); - - const body = sigMessage; - - const parameters = { - device_id: device_id, - }; + /** + * Delete the availability rules of a device + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The availability rules of the device were deleted successfully. + */ + public async deleteDeviceAvailabilityRules(url: string, + options?: { + headers?: [string, string][],}): Promise { + const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}/availability') + console.log("trying to fetch url:", url); + + + + + const parameters = { + device_id: device_id, + } + + if (!RequestValidation.validateDeleteDeviceAvailabilityRulesInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateDeleteDeviceAvailabilityRulesInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { + method: "DELETE", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ] + }) + + if (!RequestValidation.validateDeleteDeviceAvailabilityRulesOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateDeleteDeviceAvailabilityRulesOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + } - if (!RequestValidation.validateSendSignalingMessageInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validateSendSignalingMessageInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }, - ); - - if (!RequestValidation.validateSendSignalingMessageOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateSendSignalingMessageOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - } - - /** - * List Peer Connection - * - * @param options.url - * Url of the to be used. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The list of all peerconnections. - */ - public async listPeerconnections(options?: { - headers?: [string, string][]; - url?: string; - }): Promise { - const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); - console.log('trying to fetch url:', url); - - if (!RequestValidation.validateListPeerconnectionsInput()) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validateListPeerconnectionsInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }, - ); - - if (!RequestValidation.validateListPeerconnectionsOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateListPeerconnectionsOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * Create a new Peer Connection - * - * @param peerconnection - * The peerconnection to be created. - * @param options.closedUrl - * An URL that will be called once the peer connection is closed. - * @param options.statusChangedUrl - * An URL that will be called if the status of the peerconnection changes. - * @param options.url - * Url of the to be used. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * 201: The peerconnection was created. A JSON representation of the new peer connection is returned. - * 202: The device service will attempt to create the peerconnection as soon as possible. - */ - public async createPeerconnection( - peerconnection: Types.Peerconnection<'request'>, - options?: { - headers?: [string, string][]; - closedUrl?: string; - statusChangedUrl?: string; - url?: string; - }, - ): Promise { - const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); - console.log('trying to fetch url:', url); - - const body = peerconnection; - - const parameters = { - closedUrl: options?.closedUrl, - statusChangedUrl: options?.statusChangedUrl, - }; + /** + * Add availability rules for a device + * + * @param url + * Url of the resource to be accessed. + * @param availabilityRules + * The availability rules to be applied. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the changed availability. + */ + public async addDeviceAvailabilityRules(url: string,availabilityRules: Types.AvailabilityRule<"request">[] | undefined, + options?: { + headers?: [string, string][],}): Promise { + const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}/availability') + console.log("trying to fetch url:", url); + + const body = availabilityRules + + + const parameters = { + device_id: device_id, + } + + if (!RequestValidation.validateAddDeviceAvailabilityRulesInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateAddDeviceAvailabilityRulesInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { + method: "POST", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ], + body: JSON.stringify(body) + }) + + if (!RequestValidation.validateAddDeviceAvailabilityRulesOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateAddDeviceAvailabilityRulesOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + + return response.body + } - const query: [string, string][] = []; - - if (parameters['closedUrl']) - query.push(['closedUrl', parameters['closedUrl'].toString()]); - - if (parameters['statusChangedUrl']) - query.push(['statusChangedUrl', parameters['statusChangedUrl'].toString()]); - - if (!RequestValidation.validateCreatePeerconnectionInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validateCreatePeerconnectionInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - { - method: 'POST', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }, - ); - - if (!RequestValidation.validateCreatePeerconnectionOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateCreatePeerconnectionOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * View a peer connection - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the device peer connection. - */ - public async getPeerconnection( - url: string, - options?: { - headers?: [string, string][]; - }, - ): Promise { - const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [peerconnection_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/peerconnections/{}', - ); - console.log('trying to fetch url:', url); - - const parameters = { - peerconnection_id: peerconnection_id, - }; + /** + * Create new websocket token for device + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The newly generated websocket token for the device. + */ + public async createWebsocketToken(url: string, + options?: { + headers?: [string, string][],}): Promise { + const urlSuffix = '/devices/{}/websocket'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}/websocket') + console.log("trying to fetch url:", url); + + + + + const parameters = { + device_id: device_id, + } + + if (!RequestValidation.validateCreateWebsocketTokenInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateCreateWebsocketTokenInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { + method: "POST", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ] + }) + + if (!RequestValidation.validateCreateWebsocketTokenOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateCreateWebsocketTokenOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + + return response.body + } - if (!RequestValidation.validateGetPeerconnectionInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validateGetPeerconnectionInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - { - method: 'GET', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }, - ); - - if (!RequestValidation.validateGetPeerconnectionOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateGetPeerconnectionOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - - return response.body; - } - - /** - * Delete a peer connection - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * 202: The peerconnection will be deleted as soon as it's closed. - * 204: The peerconnection was deleted successfully. - */ - public async deletePeerconnection( - url: string, - options?: { - headers?: [string, string][]; - }, - ): Promise { - const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [peerconnection_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/peerconnections/{}', - ); - console.log('trying to fetch url:', url); - - const parameters = { - peerconnection_id: peerconnection_id, - }; + /** + * Send signaling message to device + * + * @param url + * Url of the resource to be accessed. + * @param sigMessage + * The signaling message to be sent. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The signaling message was delivered successfully. + */ + public async sendSignalingMessage(url: string,sigMessage: Types.CreatePeerconnectionMessage<"request"> | Types.ClosePeerconnectionMessage<"request"> | Types.SignalingMessage<"request"> | Types.ConfigurationMessage<"request"> | Types.ExperimentStatusChangedMessage<"request">, + options?: { + headers?: [string, string][],}): Promise { + const urlSuffix = '/devices/{}/signaling'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}/signaling') + console.log("trying to fetch url:", url); + + const body = sigMessage + + + const parameters = { + device_id: device_id, + } + + if (!RequestValidation.validateSendSignalingMessageInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateSendSignalingMessageInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { + method: "POST", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ], + body: JSON.stringify(body) + }) + + if (!RequestValidation.validateSendSignalingMessageOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateSendSignalingMessageOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + } - if (!RequestValidation.validateDeletePeerconnectionInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validateDeletePeerconnectionInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl), - { - method: 'DELETE', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - }, - ); - - if (!RequestValidation.validateDeletePeerconnectionOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validateDeletePeerconnectionOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - } - - /** - * Sets the peerconnection status of a single device. - * - * @param url - * Url of the resource to be accessed. - * @param body - * The JSON Representation of the device peer connection. - * @param device_url - * URL of the device - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * OK. - */ - public async patchPeerconnectionDeviceStatus( - url: string, - body: { - /** - * The status of the peerconnection. - */ - status: Types.ConnectionStatus<'request'>; - [k: string]: unknown; - }, - device_url: string, - options?: { - headers?: [string, string][]; - }, - ): Promise { - const urlSuffix = '/peerconnections/{}/device_status'.split('{}').at(-1) ?? ''; - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [peerconnection_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/peerconnections/{}/device_status', - ); - console.log('trying to fetch url:', url); - - const parameters = { - peerconnection_id: peerconnection_id, - device_url: device_url, - }; + /** + * List Peer Connection + * + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The list of all peerconnections. + */ + public async listPeerconnections( + options?: { + headers?: [string, string][],url?: string}): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, "/peerconnections") + console.log("trying to fetch url:", url); + + + + + + if (!RequestValidation.validateListPeerconnectionsInput()) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateListPeerconnectionsInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { + method: "GET", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ] + }) + + if (!RequestValidation.validateListPeerconnectionsOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateListPeerconnectionsOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + + return response.body + } - const query: [string, string][] = []; - - if (parameters['device_url']) - query.push(['device_url', parameters['device_url'].toString()]); - - if (!RequestValidation.validatePatchPeerconnectionDeviceStatusInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - ( - RequestValidation.validatePatchPeerconnectionDeviceStatusInput as Types.FunctionWithErrors - ).errors, - ); - - const authorization: string = `Bearer ${this.accessToken}`; - - console.log( - 'trying to fetch url:', - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - ); - const response = await this.fetch( - new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + - '?' + - new URLSearchParams(query), - { - method: 'PATCH', - headers: [ - ['Content-Type', 'application/json'], - ['Authorization', authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []), - ], - body: JSON.stringify(body), - }, - ); - - if (!RequestValidation.validatePatchPeerconnectionDeviceStatusOutput(response)) - throw new ValidationError( - 'Response validation failed!', - ( - RequestValidation.validatePatchPeerconnectionDeviceStatusOutput as Types.FunctionWithErrors - ).errors, - ); - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response, - ); - } -} + /** + * Create a new Peer Connection + * + * @param peerconnection + * The peerconnection to be created. + * @param options.closedUrl + * An URL that will be called once the peer connection is closed. + * @param options.statusChangedUrl + * An URL that will be called if the status of the peerconnection changes. + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * 201: The peerconnection was created. A JSON representation of the new peer connection is returned. + * 202: The device service will attempt to create the peerconnection as soon as possible. + */ + public async createPeerconnection(peerconnection: Types.Peerconnection<"request">, + options?: { + headers?: [string, string][],closedUrl?: string,statusChangedUrl?: string,url?: string}): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, "/peerconnections") + console.log("trying to fetch url:", url); + + const body = peerconnection + + + const parameters = { + closedUrl: options?.closedUrl, + statusChangedUrl: options?.statusChangedUrl, + } + + const query: [string,string][] = [] + + if (parameters["closedUrl"]) + query.push(["closedUrl", parameters["closedUrl"].toString()]) + + if (parameters["statusChangedUrl"]) + query.push(["statusChangedUrl", parameters["statusChangedUrl"].toString()]) + + if (!RequestValidation.validateCreatePeerconnectionInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateCreatePeerconnectionInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + method: "POST", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ], + body: JSON.stringify(body) + }) + + if (!RequestValidation.validateCreatePeerconnectionOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateCreatePeerconnectionOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + + return response.body + } + + /** + * View a peer connection + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the device peer connection. + */ + public async getPeerconnection(url: string, + options?: { + headers?: [string, string][],}): Promise { + const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [peerconnection_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/peerconnections/{}') + console.log("trying to fetch url:", url); + + + + + const parameters = { + peerconnection_id: peerconnection_id, + } + + if (!RequestValidation.validateGetPeerconnectionInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateGetPeerconnectionInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { + method: "GET", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ] + }) + + if (!RequestValidation.validateGetPeerconnectionOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateGetPeerconnectionOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + + return response.body + } + + /** + * Delete a peer connection + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * 202: The peerconnection will be deleted as soon as it's closed. + * 204: The peerconnection was deleted successfully. + */ + public async deletePeerconnection(url: string, + options?: { + headers?: [string, string][],}): Promise { + const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [peerconnection_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/peerconnections/{}') + console.log("trying to fetch url:", url); + + + + + const parameters = { + peerconnection_id: peerconnection_id, + } + + if (!RequestValidation.validateDeletePeerconnectionInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateDeletePeerconnectionInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { + method: "DELETE", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ] + }) + + if (!RequestValidation.validateDeletePeerconnectionOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateDeletePeerconnectionOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + } + + /** + * Sets the peerconnection status of a single device. + * + * @param url + * Url of the resource to be accessed. + * @param body + * The JSON Representation of the device peer connection. + * @param device_url + * URL of the device + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * OK. + */ + public async patchPeerconnectionDeviceStatus(url: string,body: { + /** + * The status of the peerconnection. + */ + status: Types.ConnectionStatus<"request"> + [k: string]: unknown +},device_url: string, + options?: { + headers?: [string, string][],}): Promise { + const urlSuffix = '/peerconnections/{}/device_status'.split('{}').at(-1) ?? '' + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) + const [peerconnection_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/peerconnections/{}/device_status') + console.log("trying to fetch url:", url); + + + + + const parameters = { + peerconnection_id: peerconnection_id, + device_url: device_url, + } + + const query: [string,string][] = [] + + if (parameters["device_url"]) + query.push(["device_url", parameters["device_url"].toString()]) + + if (!RequestValidation.validatePatchPeerconnectionDeviceStatusInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validatePatchPeerconnectionDeviceStatusInput as Types.FunctionWithErrors).errors + ) + + const authorization: string = `Bearer ${this.accessToken}` + + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + method: "PATCH", + headers: [ + ["Content-Type", "application/json"], + ["Authorization", authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []) + ], + body: JSON.stringify(body) + }) + + if (!RequestValidation.validatePatchPeerconnectionDeviceStatusOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validatePatchPeerconnectionDeviceStatusOutput as Types.FunctionWithErrors).errors + ) + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response + ) + + + } + + +} \ No newline at end of file diff --git a/services/booking/src/common/src/clients/device/requestValidation.ts b/services/booking/src/common/src/clients/device/requestValidation.ts index 13992cce..9f29fb6b 100644 --- a/services/booking/src/common/src/clients/device/requestValidation.ts +++ b/services/booking/src/common/src/clients/device/requestValidation.ts @@ -3,1134 +3,1091 @@ * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, * and run openapi-codegeneration to regenerate this file. */ -import * as BasicValidation from './basicValidation.cjs'; -import * as Signatures from './signatures.js'; -import { FunctionWithErrors, ResponseData } from './types.js'; +import { FunctionWithErrors, ResponseData } from "./types.js" +import * as Signatures from "./signatures.js" + +import * as BasicValidation from "./basicValidation.cjs" /** * This function validates the inputs to listDevices() */ export function validateListDevicesInput() { - return true; + return true } /** * This function validates the outputs of listDevices() */ -export function validateListDevicesOutput( - response: ResponseData, -): response is Signatures.ListDevicesResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateListDevicesOutput(response: ResponseData): response is Signatures.ListDevicesResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 200) { - if (!BasicValidation.validateListDevicesResponse200Response(response.body)) { - (validateListDevicesOutput as FunctionWithErrors).errors = ( - BasicValidation.validateListDevicesResponse200Response as FunctionWithErrors - ).errors; - return false; - } + + if (response.status === 200) { + if (!BasicValidation.validateListDevicesResponse200Response(response.body)) { + (validateListDevicesOutput as FunctionWithErrors).errors = (BasicValidation.validateListDevicesResponse200Response as FunctionWithErrors).errors + return false + } - return true; - } + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateListDevicesOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateListDevicesOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to createDevice() */ -export function validateCreateDeviceInput( - parameters: Signatures.CreateDeviceParameters, - body: Signatures.CreateDeviceBody, -) { - if (parameters) { - if ( - !BasicValidation.validateChangedUrlRequest(parameters['changedUrl']) && - parameters['changedUrl'] !== undefined - ) { - (validateCreateDeviceInput as FunctionWithErrors).errors = ( - BasicValidation.validateChangedUrlRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - if (parameters !== undefined) { - return false; - } - } - - if (!BasicValidation.validateCreateDeviceBodyRequest(body)) { - (validateCreateDeviceInput as FunctionWithErrors).errors = ( - BasicValidation.validateCreateDeviceBodyRequest as FunctionWithErrors - ).errors; - return false; - } - - return true; +export function validateCreateDeviceInput(parameters: Signatures.CreateDeviceParameters, body: Signatures.CreateDeviceBody) { + if (parameters) { + if ( + !BasicValidation.validateChangedUrlRequest(parameters["changedUrl"]) + && parameters['changedUrl'] !== undefined + ) { + (validateCreateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateChangedUrlRequest as FunctionWithErrors).errors + return false + } + } else { + if (parameters !== undefined) { + return false + } + } + + if (!BasicValidation.validateCreateDeviceBodyRequest(body)) { + (validateCreateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateCreateDeviceBodyRequest as FunctionWithErrors).errors + return false + } + + return true } /** * This function validates the outputs of createDevice() */ -export function validateCreateDeviceOutput( - response: ResponseData, -): response is Signatures.CreateDeviceResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateCreateDeviceOutput(response: ResponseData): response is Signatures.CreateDeviceResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 201) { - if (!BasicValidation.validateCreateDeviceResponse201Response(response.body)) { - (validateCreateDeviceOutput as FunctionWithErrors).errors = ( - BasicValidation.validateCreateDeviceResponse201Response as FunctionWithErrors - ).errors; - return false; - } + + if (response.status === 201) { + if (!BasicValidation.validateCreateDeviceResponse201Response(response.body)) { + (validateCreateDeviceOutput as FunctionWithErrors).errors = (BasicValidation.validateCreateDeviceResponse201Response as FunctionWithErrors).errors + return false + } - return true; - } + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateCreateDeviceOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateCreateDeviceOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to getDevice() */ export function validateGetDeviceInput(parameters: Signatures.GetDeviceParameters) { - if (parameters) { - if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { - (validateGetDeviceInput as FunctionWithErrors).errors = ( - BasicValidation.validateDeviceIdRequest as FunctionWithErrors - ).errors; - return false; - } - if ( - !BasicValidation.validateFlatGroupRequest(parameters['flat_group']) && - parameters['flat_group'] !== undefined - ) { - (validateGetDeviceInput as FunctionWithErrors).errors = ( - BasicValidation.validateFlatGroupRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - return true; + if (parameters) { + if ( + !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) + ) { + (validateGetDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors + return false + } + if ( + !BasicValidation.validateFlatGroupRequest(parameters["flat_group"]) + && parameters['flat_group'] !== undefined + ) { + (validateGetDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateFlatGroupRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + return true } /** * This function validates the outputs of getDevice() */ -export function validateGetDeviceOutput( - response: ResponseData, -): response is Signatures.GetDeviceResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateGetDeviceOutput(response: ResponseData): response is Signatures.GetDeviceResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 200) { - if (!BasicValidation.validateGetDeviceResponse200Response(response.body)) { - (validateGetDeviceOutput as FunctionWithErrors).errors = ( - BasicValidation.validateGetDeviceResponse200Response as FunctionWithErrors - ).errors; - return false; - } + + if (response.status === 200) { + if (!BasicValidation.validateGetDeviceResponse200Response(response.body)) { + (validateGetDeviceOutput as FunctionWithErrors).errors = (BasicValidation.validateGetDeviceResponse200Response as FunctionWithErrors).errors + return false + } - return true; - } + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateGetDeviceOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateGetDeviceOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to updateDevice() */ -export function validateUpdateDeviceInput( - parameters: Signatures.UpdateDeviceParameters, - body: Signatures.UpdateDeviceBody, -) { - if (parameters) { - if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { - (validateUpdateDeviceInput as FunctionWithErrors).errors = ( - BasicValidation.validateDeviceIdRequest as FunctionWithErrors - ).errors; - return false; - } - if ( - !BasicValidation.validateChangedUrlRequest(parameters['changedUrl']) && - parameters['changedUrl'] !== undefined - ) { - (validateUpdateDeviceInput as FunctionWithErrors).errors = ( - BasicValidation.validateChangedUrlRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - if (body === undefined) { - return true; - } - - if (!BasicValidation.validateUpdateDeviceBodyRequest(body)) { - (validateUpdateDeviceInput as FunctionWithErrors).errors = ( - BasicValidation.validateUpdateDeviceBodyRequest as FunctionWithErrors - ).errors; - return false; - } - - return true; +export function validateUpdateDeviceInput(parameters: Signatures.UpdateDeviceParameters, body: Signatures.UpdateDeviceBody) { + if (parameters) { + if ( + !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) + ) { + (validateUpdateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors + return false + } + if ( + !BasicValidation.validateChangedUrlRequest(parameters["changedUrl"]) + && parameters['changedUrl'] !== undefined + ) { + (validateUpdateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateChangedUrlRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + if (body === undefined) { + return true + } + + if (!BasicValidation.validateUpdateDeviceBodyRequest(body)) { + (validateUpdateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateUpdateDeviceBodyRequest as FunctionWithErrors).errors + return false + } + + return true } /** * This function validates the outputs of updateDevice() */ -export function validateUpdateDeviceOutput( - response: ResponseData, -): response is Signatures.UpdateDeviceResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateUpdateDeviceOutput(response: ResponseData): response is Signatures.UpdateDeviceResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 200) { - if (!BasicValidation.validateUpdateDeviceResponse200Response(response.body)) { - (validateUpdateDeviceOutput as FunctionWithErrors).errors = ( - BasicValidation.validateUpdateDeviceResponse200Response as FunctionWithErrors - ).errors; - return false; - } + + if (response.status === 200) { + if (!BasicValidation.validateUpdateDeviceResponse200Response(response.body)) { + (validateUpdateDeviceOutput as FunctionWithErrors).errors = (BasicValidation.validateUpdateDeviceResponse200Response as FunctionWithErrors).errors + return false + } - return true; - } + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateUpdateDeviceOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateUpdateDeviceOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to deleteDevice() */ export function validateDeleteDeviceInput(parameters: Signatures.DeleteDeviceParameters) { - if (parameters) { - if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { - (validateDeleteDeviceInput as FunctionWithErrors).errors = ( - BasicValidation.validateDeviceIdRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - return true; + if (parameters) { + if ( + !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) + ) { + (validateDeleteDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + return true } /** * This function validates the outputs of deleteDevice() */ -export function validateDeleteDeviceOutput( - response: ResponseData, -): response is Signatures.DeleteDeviceResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateDeleteDeviceOutput(response: ResponseData): response is Signatures.DeleteDeviceResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 204) { - return true; - } + + if (response.status === 204) { + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateDeleteDeviceOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateDeleteDeviceOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to instantiateDevice() */ -export function validateInstantiateDeviceInput( - parameters: Signatures.InstantiateDeviceParameters, -) { - if (parameters) { - if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { - (validateInstantiateDeviceInput as FunctionWithErrors).errors = ( - BasicValidation.validateDeviceIdRequest as FunctionWithErrors - ).errors; - return false; - } - if ( - !BasicValidation.validateChangedUrlRequest(parameters['changedUrl']) && - parameters['changedUrl'] !== undefined - ) { - (validateInstantiateDeviceInput as FunctionWithErrors).errors = ( - BasicValidation.validateChangedUrlRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - return true; +export function validateInstantiateDeviceInput(parameters: Signatures.InstantiateDeviceParameters) { + if (parameters) { + if ( + !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) + ) { + (validateInstantiateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors + return false + } + if ( + !BasicValidation.validateChangedUrlRequest(parameters["changedUrl"]) + && parameters['changedUrl'] !== undefined + ) { + (validateInstantiateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateChangedUrlRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + return true } /** * This function validates the outputs of instantiateDevice() */ -export function validateInstantiateDeviceOutput( - response: ResponseData, -): response is Signatures.InstantiateDeviceResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateInstantiateDeviceOutput(response: ResponseData): response is Signatures.InstantiateDeviceResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 201) { - if (!BasicValidation.validateInstantiateDeviceResponse201Response(response.body)) { - (validateInstantiateDeviceOutput as FunctionWithErrors).errors = ( - BasicValidation.validateInstantiateDeviceResponse201Response as FunctionWithErrors - ).errors; - return false; - } + + if (response.status === 201) { + if (!BasicValidation.validateInstantiateDeviceResponse201Response(response.body)) { + (validateInstantiateDeviceOutput as FunctionWithErrors).errors = (BasicValidation.validateInstantiateDeviceResponse201Response as FunctionWithErrors).errors + return false + } - return true; - } + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateInstantiateDeviceOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateInstantiateDeviceOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to getDeviceAvailability() */ -export function validateGetDeviceAvailabilityInput( - parameters: Signatures.GetDeviceAvailabilityParameters, -) { - if (parameters) { - if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { - (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = ( - BasicValidation.validateDeviceIdRequest as FunctionWithErrors - ).errors; - return false; - } - if ( - !BasicValidation.validateStartTimeRequest(parameters['startTime']) && - parameters['startTime'] !== undefined - ) { - (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = ( - BasicValidation.validateStartTimeRequest as FunctionWithErrors - ).errors; - return false; - } - if ( - !BasicValidation.validateEndTimeRequest(parameters['endTime']) && - parameters['endTime'] !== undefined - ) { - (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = ( - BasicValidation.validateEndTimeRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - return true; +export function validateGetDeviceAvailabilityInput(parameters: Signatures.GetDeviceAvailabilityParameters) { + if (parameters) { + if ( + !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) + ) { + (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors + return false + } + if ( + !BasicValidation.validateStartTimeRequest(parameters["startTime"]) + && parameters['startTime'] !== undefined + ) { + (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = (BasicValidation.validateStartTimeRequest as FunctionWithErrors).errors + return false + } + if ( + !BasicValidation.validateEndTimeRequest(parameters["endTime"]) + && parameters['endTime'] !== undefined + ) { + (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = (BasicValidation.validateEndTimeRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + return true } /** * This function validates the outputs of getDeviceAvailability() */ -export function validateGetDeviceAvailabilityOutput( - response: ResponseData, -): response is Signatures.GetDeviceAvailabilityResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateGetDeviceAvailabilityOutput(response: ResponseData): response is Signatures.GetDeviceAvailabilityResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 200) { - if ( - !BasicValidation.validateGetDeviceAvailabilityResponse200Response(response.body) - ) { - (validateGetDeviceAvailabilityOutput as FunctionWithErrors).errors = ( - BasicValidation.validateGetDeviceAvailabilityResponse200Response as FunctionWithErrors - ).errors; - return false; - } + + if (response.status === 200) { + if (!BasicValidation.validateGetDeviceAvailabilityResponse200Response(response.body)) { + (validateGetDeviceAvailabilityOutput as FunctionWithErrors).errors = (BasicValidation.validateGetDeviceAvailabilityResponse200Response as FunctionWithErrors).errors + return false + } - return true; - } + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateGetDeviceAvailabilityOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateGetDeviceAvailabilityOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to deleteDeviceAvailabilityRules() */ -export function validateDeleteDeviceAvailabilityRulesInput( - parameters: Signatures.DeleteDeviceAvailabilityRulesParameters, -) { - if (parameters) { - if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { - (validateDeleteDeviceAvailabilityRulesInput as FunctionWithErrors).errors = ( - BasicValidation.validateDeviceIdRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - return true; +export function validateDeleteDeviceAvailabilityRulesInput(parameters: Signatures.DeleteDeviceAvailabilityRulesParameters) { + if (parameters) { + if ( + !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) + ) { + (validateDeleteDeviceAvailabilityRulesInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + return true } /** * This function validates the outputs of deleteDeviceAvailabilityRules() */ -export function validateDeleteDeviceAvailabilityRulesOutput( - response: ResponseData, -): response is Signatures.DeleteDeviceAvailabilityRulesResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateDeleteDeviceAvailabilityRulesOutput(response: ResponseData): response is Signatures.DeleteDeviceAvailabilityRulesResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 204) { - return true; - } + + if (response.status === 204) { + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateDeleteDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateDeleteDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to addDeviceAvailabilityRules() */ -export function validateAddDeviceAvailabilityRulesInput( - parameters: Signatures.AddDeviceAvailabilityRulesParameters, - body: Signatures.AddDeviceAvailabilityRulesBody, -) { - if (parameters) { - if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { - (validateAddDeviceAvailabilityRulesInput as FunctionWithErrors).errors = ( - BasicValidation.validateDeviceIdRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - if (body === undefined) { - return true; - } - - if (!BasicValidation.validateAddDeviceAvailabilityRulesBodyRequest(body)) { - (validateAddDeviceAvailabilityRulesInput as FunctionWithErrors).errors = ( - BasicValidation.validateAddDeviceAvailabilityRulesBodyRequest as FunctionWithErrors - ).errors; - return false; - } - - return true; +export function validateAddDeviceAvailabilityRulesInput(parameters: Signatures.AddDeviceAvailabilityRulesParameters, body: Signatures.AddDeviceAvailabilityRulesBody) { + if (parameters) { + if ( + !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) + ) { + (validateAddDeviceAvailabilityRulesInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + if (body === undefined) { + return true + } + + if (!BasicValidation.validateAddDeviceAvailabilityRulesBodyRequest(body)) { + (validateAddDeviceAvailabilityRulesInput as FunctionWithErrors).errors = (BasicValidation.validateAddDeviceAvailabilityRulesBodyRequest as FunctionWithErrors).errors + return false + } + + return true } /** * This function validates the outputs of addDeviceAvailabilityRules() */ -export function validateAddDeviceAvailabilityRulesOutput( - response: ResponseData, -): response is Signatures.AddDeviceAvailabilityRulesResponse { - if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 200) { - if ( - !BasicValidation.validateAddDeviceAvailabilityRulesResponse200Response( - response.body, - ) - ) { - (validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = ( - BasicValidation.validateAddDeviceAvailabilityRulesResponse200Response as FunctionWithErrors - ).errors; - return false; - } - - return true; - } - - if (response.status === 400) { - return true; - } - - if (response.status === 401) { - return true; - } - - if (response.status === 403) { - return true; - } - - if (response.status === 404) { - return true; - } - - if (response.status === 500) { - return true; - } - - (validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; - - return false; +export function validateAddDeviceAvailabilityRulesOutput(response: ResponseData): response is Signatures.AddDeviceAvailabilityRulesResponse { + if (response.status < 100 || response.status >= 600) return false + + + if (response.status === 200) { + if (!BasicValidation.validateAddDeviceAvailabilityRulesResponse200Response(response.body)) { + (validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = (BasicValidation.validateAddDeviceAvailabilityRulesResponse200Response as FunctionWithErrors).errors + return false + } + + return true + } + + + if (response.status === 400) { + return true + } + + + if (response.status === 401) { + return true + } + + + if (response.status === 403) { + return true + } + + + if (response.status === 404) { + return true + } + + + if (response.status === 500) { + return true + } + + (validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + + return false } /** * This function validates the inputs to createWebsocketToken() */ -export function validateCreateWebsocketTokenInput( - parameters: Signatures.CreateWebsocketTokenParameters, -) { - if (parameters) { - if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { - (validateCreateWebsocketTokenInput as FunctionWithErrors).errors = ( - BasicValidation.validateDeviceIdRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - return true; +export function validateCreateWebsocketTokenInput(parameters: Signatures.CreateWebsocketTokenParameters) { + if (parameters) { + if ( + !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) + ) { + (validateCreateWebsocketTokenInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + return true } /** * This function validates the outputs of createWebsocketToken() */ -export function validateCreateWebsocketTokenOutput( - response: ResponseData, -): response is Signatures.CreateWebsocketTokenResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateCreateWebsocketTokenOutput(response: ResponseData): response is Signatures.CreateWebsocketTokenResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 200) { - if (!BasicValidation.validateCreateWebsocketTokenResponse200Response(response.body)) { - (validateCreateWebsocketTokenOutput as FunctionWithErrors).errors = ( - BasicValidation.validateCreateWebsocketTokenResponse200Response as FunctionWithErrors - ).errors; - return false; - } + + if (response.status === 200) { + if (!BasicValidation.validateCreateWebsocketTokenResponse200Response(response.body)) { + (validateCreateWebsocketTokenOutput as FunctionWithErrors).errors = (BasicValidation.validateCreateWebsocketTokenResponse200Response as FunctionWithErrors).errors + return false + } - return true; - } + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateCreateWebsocketTokenOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateCreateWebsocketTokenOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to sendSignalingMessage() */ -export function validateSendSignalingMessageInput( - parameters: Signatures.SendSignalingMessageParameters, - body: Signatures.SendSignalingMessageBody, -) { - if (parameters) { - if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { - (validateSendSignalingMessageInput as FunctionWithErrors).errors = ( - BasicValidation.validateDeviceIdRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - if (!BasicValidation.validateSendSignalingMessageBodyRequest(body)) { - (validateSendSignalingMessageInput as FunctionWithErrors).errors = ( - BasicValidation.validateSendSignalingMessageBodyRequest as FunctionWithErrors - ).errors; - return false; - } - - return true; +export function validateSendSignalingMessageInput(parameters: Signatures.SendSignalingMessageParameters, body: Signatures.SendSignalingMessageBody) { + if (parameters) { + if ( + !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) + ) { + (validateSendSignalingMessageInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + if (!BasicValidation.validateSendSignalingMessageBodyRequest(body)) { + (validateSendSignalingMessageInput as FunctionWithErrors).errors = (BasicValidation.validateSendSignalingMessageBodyRequest as FunctionWithErrors).errors + return false + } + + return true } /** * This function validates the outputs of sendSignalingMessage() */ -export function validateSendSignalingMessageOutput( - response: ResponseData, -): response is Signatures.SendSignalingMessageResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateSendSignalingMessageOutput(response: ResponseData): response is Signatures.SendSignalingMessageResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 200) { - return true; - } + + if (response.status === 200) { + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateSendSignalingMessageOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateSendSignalingMessageOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to listPeerconnections() */ export function validateListPeerconnectionsInput() { - return true; + return true } /** * This function validates the outputs of listPeerconnections() */ -export function validateListPeerconnectionsOutput( - response: ResponseData, -): response is Signatures.ListPeerconnectionsResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateListPeerconnectionsOutput(response: ResponseData): response is Signatures.ListPeerconnectionsResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 200) { - if (!BasicValidation.validateListPeerconnectionsResponse200Response(response.body)) { - (validateListPeerconnectionsOutput as FunctionWithErrors).errors = ( - BasicValidation.validateListPeerconnectionsResponse200Response as FunctionWithErrors - ).errors; - return false; - } + + if (response.status === 200) { + if (!BasicValidation.validateListPeerconnectionsResponse200Response(response.body)) { + (validateListPeerconnectionsOutput as FunctionWithErrors).errors = (BasicValidation.validateListPeerconnectionsResponse200Response as FunctionWithErrors).errors + return false + } - return true; - } + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateListPeerconnectionsOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateListPeerconnectionsOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to createPeerconnection() */ -export function validateCreatePeerconnectionInput( - parameters: Signatures.CreatePeerconnectionParameters, - body: Signatures.CreatePeerconnectionBody, -) { - if (parameters) { - if ( - !BasicValidation.validateClosedUrlRequest(parameters['closedUrl']) && - parameters['closedUrl'] !== undefined - ) { - (validateCreatePeerconnectionInput as FunctionWithErrors).errors = ( - BasicValidation.validateClosedUrlRequest as FunctionWithErrors - ).errors; - return false; - } - if ( - !BasicValidation.validateStatusChangedUrlRequest(parameters['statusChangedUrl']) && - parameters['statusChangedUrl'] !== undefined - ) { - (validateCreatePeerconnectionInput as FunctionWithErrors).errors = ( - BasicValidation.validateStatusChangedUrlRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - if (parameters !== undefined) { - return false; - } - } - - if (!BasicValidation.validateCreatePeerconnectionBodyRequest(body)) { - (validateCreatePeerconnectionInput as FunctionWithErrors).errors = ( - BasicValidation.validateCreatePeerconnectionBodyRequest as FunctionWithErrors - ).errors; - return false; - } - - return true; +export function validateCreatePeerconnectionInput(parameters: Signatures.CreatePeerconnectionParameters, body: Signatures.CreatePeerconnectionBody) { + if (parameters) { + if ( + !BasicValidation.validateClosedUrlRequest(parameters["closedUrl"]) + && parameters['closedUrl'] !== undefined + ) { + (validateCreatePeerconnectionInput as FunctionWithErrors).errors = (BasicValidation.validateClosedUrlRequest as FunctionWithErrors).errors + return false + } + if ( + !BasicValidation.validateStatusChangedUrlRequest(parameters["statusChangedUrl"]) + && parameters['statusChangedUrl'] !== undefined + ) { + (validateCreatePeerconnectionInput as FunctionWithErrors).errors = (BasicValidation.validateStatusChangedUrlRequest as FunctionWithErrors).errors + return false + } + } else { + if (parameters !== undefined) { + return false + } + } + + if (!BasicValidation.validateCreatePeerconnectionBodyRequest(body)) { + (validateCreatePeerconnectionInput as FunctionWithErrors).errors = (BasicValidation.validateCreatePeerconnectionBodyRequest as FunctionWithErrors).errors + return false + } + + return true } /** * This function validates the outputs of createPeerconnection() */ -export function validateCreatePeerconnectionOutput( - response: ResponseData, -): response is Signatures.CreatePeerconnectionResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateCreatePeerconnectionOutput(response: ResponseData): response is Signatures.CreatePeerconnectionResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 201) { - if (!BasicValidation.validateCreatePeerconnectionResponse201Response(response.body)) { - (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = ( - BasicValidation.validateCreatePeerconnectionResponse201Response as FunctionWithErrors - ).errors; - return false; + + if (response.status === 201) { + if (!BasicValidation.validateCreatePeerconnectionResponse201Response(response.body)) { + (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = (BasicValidation.validateCreatePeerconnectionResponse201Response as FunctionWithErrors).errors + return false + } + + return true } - return true; - } + + if (response.status === 202) { + if (!BasicValidation.validateCreatePeerconnectionResponse202Response(response.body)) { + (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = (BasicValidation.validateCreatePeerconnectionResponse202Response as FunctionWithErrors).errors + return false + } - if (response.status === 202) { - if (!BasicValidation.validateCreatePeerconnectionResponse202Response(response.body)) { - (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = ( - BasicValidation.validateCreatePeerconnectionResponse202Response as FunctionWithErrors - ).errors; - return false; + return true } - return true; - } - - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to getPeerconnection() */ -export function validateGetPeerconnectionInput( - parameters: Signatures.GetPeerconnectionParameters, -) { - if (parameters) { - if ( - !BasicValidation.validatePeerconnectionIdRequest(parameters['peerconnection_id']) - ) { - (validateGetPeerconnectionInput as FunctionWithErrors).errors = ( - BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - return true; +export function validateGetPeerconnectionInput(parameters: Signatures.GetPeerconnectionParameters) { + if (parameters) { + if ( + !BasicValidation.validatePeerconnectionIdRequest(parameters["peerconnection_id"]) + ) { + (validateGetPeerconnectionInput as FunctionWithErrors).errors = (BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + return true } /** * This function validates the outputs of getPeerconnection() */ -export function validateGetPeerconnectionOutput( - response: ResponseData, -): response is Signatures.GetPeerconnectionResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateGetPeerconnectionOutput(response: ResponseData): response is Signatures.GetPeerconnectionResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 200) { - if (!BasicValidation.validateGetPeerconnectionResponse200Response(response.body)) { - (validateGetPeerconnectionOutput as FunctionWithErrors).errors = ( - BasicValidation.validateGetPeerconnectionResponse200Response as FunctionWithErrors - ).errors; - return false; - } + + if (response.status === 200) { + if (!BasicValidation.validateGetPeerconnectionResponse200Response(response.body)) { + (validateGetPeerconnectionOutput as FunctionWithErrors).errors = (BasicValidation.validateGetPeerconnectionResponse200Response as FunctionWithErrors).errors + return false + } - return true; - } + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateGetPeerconnectionOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateGetPeerconnectionOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to deletePeerconnection() */ -export function validateDeletePeerconnectionInput( - parameters: Signatures.DeletePeerconnectionParameters, -) { - if (parameters) { - if ( - !BasicValidation.validatePeerconnectionIdRequest(parameters['peerconnection_id']) - ) { - (validateDeletePeerconnectionInput as FunctionWithErrors).errors = ( - BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - return true; +export function validateDeletePeerconnectionInput(parameters: Signatures.DeletePeerconnectionParameters) { + if (parameters) { + if ( + !BasicValidation.validatePeerconnectionIdRequest(parameters["peerconnection_id"]) + ) { + (validateDeletePeerconnectionInput as FunctionWithErrors).errors = (BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + return true } /** * This function validates the outputs of deletePeerconnection() */ -export function validateDeletePeerconnectionOutput( - response: ResponseData, -): response is Signatures.DeletePeerconnectionResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validateDeletePeerconnectionOutput(response: ResponseData): response is Signatures.DeletePeerconnectionResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 202) { - return true; - } + + if (response.status === 202) { + return true + } - if (response.status === 204) { - return true; - } + + if (response.status === 204) { + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validateDeletePeerconnectionOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validateDeletePeerconnectionOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } /** * This function validates the inputs to patchPeerconnectionDeviceStatus() */ -export function validatePatchPeerconnectionDeviceStatusInput( - parameters: Signatures.PatchPeerconnectionDeviceStatusParameters, - body: Signatures.PatchPeerconnectionDeviceStatusBody, -) { - if (parameters) { - if ( - !BasicValidation.validatePeerconnectionIdRequest(parameters['peerconnection_id']) - ) { - (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = ( - BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors - ).errors; - return false; - } - if (!BasicValidation.validateDeviceUrlRequest(parameters['device_url'])) { - (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = ( - BasicValidation.validateDeviceUrlRequest as FunctionWithErrors - ).errors; - return false; - } - } else { - return false; - } - - if (!BasicValidation.validatePatchPeerconnectionDeviceStatusBodyRequest(body)) { - (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = ( - BasicValidation.validatePatchPeerconnectionDeviceStatusBodyRequest as FunctionWithErrors - ).errors; - return false; - } - - return true; +export function validatePatchPeerconnectionDeviceStatusInput(parameters: Signatures.PatchPeerconnectionDeviceStatusParameters, body: Signatures.PatchPeerconnectionDeviceStatusBody) { + if (parameters) { + if ( + !BasicValidation.validatePeerconnectionIdRequest(parameters["peerconnection_id"]) + ) { + (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = (BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors).errors + return false + } + if ( + !BasicValidation.validateDeviceUrlRequest(parameters["device_url"]) + ) { + (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceUrlRequest as FunctionWithErrors).errors + return false + } + } else { + return false + } + + if (!BasicValidation.validatePatchPeerconnectionDeviceStatusBodyRequest(body)) { + (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = (BasicValidation.validatePatchPeerconnectionDeviceStatusBodyRequest as FunctionWithErrors).errors + return false + } + + return true } /** * This function validates the outputs of patchPeerconnectionDeviceStatus() */ -export function validatePatchPeerconnectionDeviceStatusOutput( - response: ResponseData, -): response is Signatures.PatchPeerconnectionDeviceStatusResponse { - if (response.status < 100 || response.status >= 600) return false; +export function validatePatchPeerconnectionDeviceStatusOutput(response: ResponseData): response is Signatures.PatchPeerconnectionDeviceStatusResponse { + if (response.status < 100 || response.status >= 600) return false - if (response.status === 204) { - return true; - } + + if (response.status === 204) { + return true + } - if (response.status === 400) { - return true; - } + + if (response.status === 400) { + return true + } - if (response.status === 401) { - return true; - } + + if (response.status === 401) { + return true + } - if (response.status === 403) { - return true; - } + + if (response.status === 403) { + return true + } - if (response.status === 404) { - return true; - } + + if (response.status === 404) { + return true + } - if (response.status === 500) { - return true; - } + + if (response.status === 500) { + return true + } - (validatePatchPeerconnectionDeviceStatusOutput as FunctionWithErrors).errors = - `Response status ${response.status} is unexpected`; + (validatePatchPeerconnectionDeviceStatusOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - return false; + return false } diff --git a/services/booking/src/common/src/clients/device/signatures.ts b/services/booking/src/common/src/clients/device/signatures.ts index 259b337f..4b7c8577 100644 --- a/services/booking/src/common/src/clients/device/signatures.ts +++ b/services/booking/src/common/src/clients/device/signatures.ts @@ -5,45 +5,40 @@ */ /* eslint-disable @typescript-eslint/no-unused-vars */ - /* eslint-disable @typescript-eslint/ban-ts-comment */ -import * as Types from './types.js'; + +import * as Types from "./types.js" // @ts-ignore -import { type Require } from './types.js'; +import { type Require } from "./types.js" /** * Typing for all possible responses to the request made by listDevices() * @category listDevices() */ -export type ListDevicesResponse = ListDevicesSuccessResponse | ListDevicesErrorResponse; +export type ListDevicesResponse = ListDevicesSuccessResponse | ListDevicesErrorResponse /** * Typing for all successful responses to the request made by listDevices() * @category listDevices() */ -export type ListDevicesSuccessResponse = ListDevicesResponse200; +export type ListDevicesSuccessResponse = ListDevicesResponse200 /** * Typing for all error responses to the request made by listDevices() * @category listDevices() */ -export type ListDevicesErrorResponse = - | ListDevicesResponse400 - | ListDevicesResponse401 - | ListDevicesResponse403 - | ListDevicesResponse404 - | ListDevicesResponse500; +export type ListDevicesErrorResponse = ListDevicesResponse400 | ListDevicesResponse401 | ListDevicesResponse403 | ListDevicesResponse404 | ListDevicesResponse500 /** * Typing for a response with status 200 to the request made by listDevices() * @category listDevices() */ export interface ListDevicesResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body: Types.DeviceOverview<'response'>[]; + status: 200 + headers?: { + [k: string]: string | undefined + } + body: Types.DeviceOverview<"response">[] } /** @@ -51,11 +46,11 @@ export interface ListDevicesResponse200 extends Types.SuccessResponse { * @category listDevices() */ export interface ListDevicesResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -63,11 +58,11 @@ export interface ListDevicesResponse400 extends Types.ErrorResponse { * @category listDevices() */ export interface ListDevicesResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -75,11 +70,11 @@ export interface ListDevicesResponse401 extends Types.ErrorResponse { * @category listDevices() */ export interface ListDevicesResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -87,11 +82,11 @@ export interface ListDevicesResponse403 extends Types.ErrorResponse { * @category listDevices() */ export interface ListDevicesResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -99,11 +94,11 @@ export interface ListDevicesResponse404 extends Types.ErrorResponse { * @category listDevices() */ export interface ListDevicesResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -111,50 +106,43 @@ export interface ListDevicesResponse500 extends Types.ErrorResponse { * @category createDevice() */ export type CreateDeviceParameters = { - changedUrl?: string; -}; + "changedUrl"?: string, +} /** * Typing for the body of the request made by createDevice() * @category createDevice() */ -export type CreateDeviceBody = Types.Device<'request'>; +export type CreateDeviceBody = Types.Device<"request"> /** * Typing for all possible responses to the request made by createDevice() * @category createDevice() */ -export type CreateDeviceResponse = - | CreateDeviceSuccessResponse - | CreateDeviceErrorResponse; +export type CreateDeviceResponse = CreateDeviceSuccessResponse | CreateDeviceErrorResponse /** * Typing for all successful responses to the request made by createDevice() * @category createDevice() */ -export type CreateDeviceSuccessResponse = CreateDeviceResponse201; +export type CreateDeviceSuccessResponse = CreateDeviceResponse201 /** * Typing for all error responses to the request made by createDevice() * @category createDevice() */ -export type CreateDeviceErrorResponse = - | CreateDeviceResponse400 - | CreateDeviceResponse401 - | CreateDeviceResponse403 - | CreateDeviceResponse404 - | CreateDeviceResponse500; +export type CreateDeviceErrorResponse = CreateDeviceResponse400 | CreateDeviceResponse401 | CreateDeviceResponse403 | CreateDeviceResponse404 | CreateDeviceResponse500 /** * Typing for a response with status 201 to the request made by createDevice() * @category createDevice() */ export interface CreateDeviceResponse201 extends Types.SuccessResponse { - status: 201; - headers?: { - [k: string]: string | undefined; - }; - body: Types.Device<'response'>; + status: 201 + headers?: { + [k: string]: string | undefined + } + body: Types.Device<"response"> } /** @@ -162,11 +150,11 @@ export interface CreateDeviceResponse201 extends Types.SuccessResponse { * @category createDevice() */ export interface CreateDeviceResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -174,11 +162,11 @@ export interface CreateDeviceResponse400 extends Types.ErrorResponse { * @category createDevice() */ export interface CreateDeviceResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -186,11 +174,11 @@ export interface CreateDeviceResponse401 extends Types.ErrorResponse { * @category createDevice() */ export interface CreateDeviceResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -198,11 +186,11 @@ export interface CreateDeviceResponse403 extends Types.ErrorResponse { * @category createDevice() */ export interface CreateDeviceResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -210,11 +198,11 @@ export interface CreateDeviceResponse404 extends Types.ErrorResponse { * @category createDevice() */ export interface CreateDeviceResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -222,43 +210,38 @@ export interface CreateDeviceResponse500 extends Types.ErrorResponse { * @category getDevice() */ export type GetDeviceParameters = { - device_id: string; - flat_group?: boolean; -}; + "device_id": string, + "flat_group"?: boolean, +} /** * Typing for all possible responses to the request made by getDevice() * @category getDevice() */ -export type GetDeviceResponse = GetDeviceSuccessResponse | GetDeviceErrorResponse; +export type GetDeviceResponse = GetDeviceSuccessResponse | GetDeviceErrorResponse /** * Typing for all successful responses to the request made by getDevice() * @category getDevice() */ -export type GetDeviceSuccessResponse = GetDeviceResponse200; +export type GetDeviceSuccessResponse = GetDeviceResponse200 /** * Typing for all error responses to the request made by getDevice() * @category getDevice() */ -export type GetDeviceErrorResponse = - | GetDeviceResponse400 - | GetDeviceResponse401 - | GetDeviceResponse403 - | GetDeviceResponse404 - | GetDeviceResponse500; +export type GetDeviceErrorResponse = GetDeviceResponse400 | GetDeviceResponse401 | GetDeviceResponse403 | GetDeviceResponse404 | GetDeviceResponse500 /** * Typing for a response with status 200 to the request made by getDevice() * @category getDevice() */ export interface GetDeviceResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body: Types.Device<'response'>; + status: 200 + headers?: { + [k: string]: string | undefined + } + body: Types.Device<"response"> } /** @@ -266,11 +249,11 @@ export interface GetDeviceResponse200 extends Types.SuccessResponse { * @category getDevice() */ export interface GetDeviceResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -278,11 +261,11 @@ export interface GetDeviceResponse400 extends Types.ErrorResponse { * @category getDevice() */ export interface GetDeviceResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -290,11 +273,11 @@ export interface GetDeviceResponse401 extends Types.ErrorResponse { * @category getDevice() */ export interface GetDeviceResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -302,11 +285,11 @@ export interface GetDeviceResponse403 extends Types.ErrorResponse { * @category getDevice() */ export interface GetDeviceResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -314,11 +297,11 @@ export interface GetDeviceResponse404 extends Types.ErrorResponse { * @category getDevice() */ export interface GetDeviceResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -326,51 +309,44 @@ export interface GetDeviceResponse500 extends Types.ErrorResponse { * @category updateDevice() */ export type UpdateDeviceParameters = { - device_id: string; - changedUrl?: string; -}; + "device_id": string, + "changedUrl"?: string, +} /** * Typing for the body of the request made by updateDevice() * @category updateDevice() */ -export type UpdateDeviceBody = Types.DeviceUpdate<'request'> | undefined; +export type UpdateDeviceBody = Types.DeviceUpdate<"request"> | undefined /** * Typing for all possible responses to the request made by updateDevice() * @category updateDevice() */ -export type UpdateDeviceResponse = - | UpdateDeviceSuccessResponse - | UpdateDeviceErrorResponse; +export type UpdateDeviceResponse = UpdateDeviceSuccessResponse | UpdateDeviceErrorResponse /** * Typing for all successful responses to the request made by updateDevice() * @category updateDevice() */ -export type UpdateDeviceSuccessResponse = UpdateDeviceResponse200; +export type UpdateDeviceSuccessResponse = UpdateDeviceResponse200 /** * Typing for all error responses to the request made by updateDevice() * @category updateDevice() */ -export type UpdateDeviceErrorResponse = - | UpdateDeviceResponse400 - | UpdateDeviceResponse401 - | UpdateDeviceResponse403 - | UpdateDeviceResponse404 - | UpdateDeviceResponse500; +export type UpdateDeviceErrorResponse = UpdateDeviceResponse400 | UpdateDeviceResponse401 | UpdateDeviceResponse403 | UpdateDeviceResponse404 | UpdateDeviceResponse500 /** * Typing for a response with status 200 to the request made by updateDevice() * @category updateDevice() */ export interface UpdateDeviceResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body: Types.Device<'response'>; + status: 200 + headers?: { + [k: string]: string | undefined + } + body: Types.Device<"response"> } /** @@ -378,11 +354,11 @@ export interface UpdateDeviceResponse200 extends Types.SuccessResponse { * @category updateDevice() */ export interface UpdateDeviceResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -390,11 +366,11 @@ export interface UpdateDeviceResponse400 extends Types.ErrorResponse { * @category updateDevice() */ export interface UpdateDeviceResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -402,11 +378,11 @@ export interface UpdateDeviceResponse401 extends Types.ErrorResponse { * @category updateDevice() */ export interface UpdateDeviceResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -414,11 +390,11 @@ export interface UpdateDeviceResponse403 extends Types.ErrorResponse { * @category updateDevice() */ export interface UpdateDeviceResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -426,11 +402,11 @@ export interface UpdateDeviceResponse404 extends Types.ErrorResponse { * @category updateDevice() */ export interface UpdateDeviceResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -438,44 +414,37 @@ export interface UpdateDeviceResponse500 extends Types.ErrorResponse { * @category deleteDevice() */ export type DeleteDeviceParameters = { - device_id: string; -}; + "device_id": string, +} /** * Typing for all possible responses to the request made by deleteDevice() * @category deleteDevice() */ -export type DeleteDeviceResponse = - | DeleteDeviceSuccessResponse - | DeleteDeviceErrorResponse; +export type DeleteDeviceResponse = DeleteDeviceSuccessResponse | DeleteDeviceErrorResponse /** * Typing for all successful responses to the request made by deleteDevice() * @category deleteDevice() */ -export type DeleteDeviceSuccessResponse = DeleteDeviceResponse204; +export type DeleteDeviceSuccessResponse = DeleteDeviceResponse204 /** * Typing for all error responses to the request made by deleteDevice() * @category deleteDevice() */ -export type DeleteDeviceErrorResponse = - | DeleteDeviceResponse400 - | DeleteDeviceResponse401 - | DeleteDeviceResponse403 - | DeleteDeviceResponse404 - | DeleteDeviceResponse500; +export type DeleteDeviceErrorResponse = DeleteDeviceResponse400 | DeleteDeviceResponse401 | DeleteDeviceResponse403 | DeleteDeviceResponse404 | DeleteDeviceResponse500 /** * Typing for a response with status 204 to the request made by deleteDevice() * @category deleteDevice() */ export interface DeleteDeviceResponse204 extends Types.SuccessResponse { - status: 204; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 204 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -483,11 +452,11 @@ export interface DeleteDeviceResponse204 extends Types.SuccessResponse { * @category deleteDevice() */ export interface DeleteDeviceResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -495,11 +464,11 @@ export interface DeleteDeviceResponse400 extends Types.ErrorResponse { * @category deleteDevice() */ export interface DeleteDeviceResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -507,11 +476,11 @@ export interface DeleteDeviceResponse401 extends Types.ErrorResponse { * @category deleteDevice() */ export interface DeleteDeviceResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -519,11 +488,11 @@ export interface DeleteDeviceResponse403 extends Types.ErrorResponse { * @category deleteDevice() */ export interface DeleteDeviceResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -531,11 +500,11 @@ export interface DeleteDeviceResponse404 extends Types.ErrorResponse { * @category deleteDevice() */ export interface DeleteDeviceResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -543,49 +512,42 @@ export interface DeleteDeviceResponse500 extends Types.ErrorResponse { * @category instantiateDevice() */ export type InstantiateDeviceParameters = { - device_id: string; - changedUrl?: string; -}; + "device_id": string, + "changedUrl"?: string, +} /** * Typing for all possible responses to the request made by instantiateDevice() * @category instantiateDevice() */ -export type InstantiateDeviceResponse = - | InstantiateDeviceSuccessResponse - | InstantiateDeviceErrorResponse; +export type InstantiateDeviceResponse = InstantiateDeviceSuccessResponse | InstantiateDeviceErrorResponse /** * Typing for all successful responses to the request made by instantiateDevice() * @category instantiateDevice() */ -export type InstantiateDeviceSuccessResponse = InstantiateDeviceResponse201; +export type InstantiateDeviceSuccessResponse = InstantiateDeviceResponse201 /** * Typing for all error responses to the request made by instantiateDevice() * @category instantiateDevice() */ -export type InstantiateDeviceErrorResponse = - | InstantiateDeviceResponse400 - | InstantiateDeviceResponse401 - | InstantiateDeviceResponse403 - | InstantiateDeviceResponse404 - | InstantiateDeviceResponse500; +export type InstantiateDeviceErrorResponse = InstantiateDeviceResponse400 | InstantiateDeviceResponse401 | InstantiateDeviceResponse403 | InstantiateDeviceResponse404 | InstantiateDeviceResponse500 /** * Typing for a response with status 201 to the request made by instantiateDevice() * @category instantiateDevice() */ export interface InstantiateDeviceResponse201 extends Types.SuccessResponse { - status: 201; - headers?: { - [k: string]: string | undefined; - }; - body: { - instance: Types.ConcreteDevice<'response'>; - deviceToken: string; - [k: string]: unknown; - }; + status: 201 + headers?: { + [k: string]: string | undefined + } + body: { + instance: Types.ConcreteDevice<"response"> + deviceToken: string + [k: string]: unknown + } } /** @@ -593,11 +555,11 @@ export interface InstantiateDeviceResponse201 extends Types.SuccessResponse { * @category instantiateDevice() */ export interface InstantiateDeviceResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -605,11 +567,11 @@ export interface InstantiateDeviceResponse400 extends Types.ErrorResponse { * @category instantiateDevice() */ export interface InstantiateDeviceResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -617,11 +579,11 @@ export interface InstantiateDeviceResponse401 extends Types.ErrorResponse { * @category instantiateDevice() */ export interface InstantiateDeviceResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -629,11 +591,11 @@ export interface InstantiateDeviceResponse403 extends Types.ErrorResponse { * @category instantiateDevice() */ export interface InstantiateDeviceResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -641,11 +603,11 @@ export interface InstantiateDeviceResponse404 extends Types.ErrorResponse { * @category instantiateDevice() */ export interface InstantiateDeviceResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -653,46 +615,39 @@ export interface InstantiateDeviceResponse500 extends Types.ErrorResponse { * @category getDeviceAvailability() */ export type GetDeviceAvailabilityParameters = { - device_id: string; - startTime?: string; - endTime?: string; -}; + "device_id": string, + "startTime"?: string, + "endTime"?: string, +} /** * Typing for all possible responses to the request made by getDeviceAvailability() * @category getDeviceAvailability() */ -export type GetDeviceAvailabilityResponse = - | GetDeviceAvailabilitySuccessResponse - | GetDeviceAvailabilityErrorResponse; +export type GetDeviceAvailabilityResponse = GetDeviceAvailabilitySuccessResponse | GetDeviceAvailabilityErrorResponse /** * Typing for all successful responses to the request made by getDeviceAvailability() * @category getDeviceAvailability() */ -export type GetDeviceAvailabilitySuccessResponse = GetDeviceAvailabilityResponse200; +export type GetDeviceAvailabilitySuccessResponse = GetDeviceAvailabilityResponse200 /** * Typing for all error responses to the request made by getDeviceAvailability() * @category getDeviceAvailability() */ -export type GetDeviceAvailabilityErrorResponse = - | GetDeviceAvailabilityResponse400 - | GetDeviceAvailabilityResponse401 - | GetDeviceAvailabilityResponse403 - | GetDeviceAvailabilityResponse404 - | GetDeviceAvailabilityResponse500; +export type GetDeviceAvailabilityErrorResponse = GetDeviceAvailabilityResponse400 | GetDeviceAvailabilityResponse401 | GetDeviceAvailabilityResponse403 | GetDeviceAvailabilityResponse404 | GetDeviceAvailabilityResponse500 /** * Typing for a response with status 200 to the request made by getDeviceAvailability() * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body: Types.Availability<'response'>; + status: 200 + headers?: { + [k: string]: string | undefined + } + body: Types.Availability<"response"> } /** @@ -700,11 +655,11 @@ export interface GetDeviceAvailabilityResponse200 extends Types.SuccessResponse * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -712,11 +667,11 @@ export interface GetDeviceAvailabilityResponse400 extends Types.ErrorResponse { * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -724,11 +679,11 @@ export interface GetDeviceAvailabilityResponse401 extends Types.ErrorResponse { * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -736,11 +691,11 @@ export interface GetDeviceAvailabilityResponse403 extends Types.ErrorResponse { * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -748,11 +703,11 @@ export interface GetDeviceAvailabilityResponse404 extends Types.ErrorResponse { * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -760,45 +715,37 @@ export interface GetDeviceAvailabilityResponse500 extends Types.ErrorResponse { * @category deleteDeviceAvailabilityRules() */ export type DeleteDeviceAvailabilityRulesParameters = { - device_id: string; -}; + "device_id": string, +} /** * Typing for all possible responses to the request made by deleteDeviceAvailabilityRules() * @category deleteDeviceAvailabilityRules() */ -export type DeleteDeviceAvailabilityRulesResponse = - | DeleteDeviceAvailabilityRulesSuccessResponse - | DeleteDeviceAvailabilityRulesErrorResponse; +export type DeleteDeviceAvailabilityRulesResponse = DeleteDeviceAvailabilityRulesSuccessResponse | DeleteDeviceAvailabilityRulesErrorResponse /** * Typing for all successful responses to the request made by deleteDeviceAvailabilityRules() * @category deleteDeviceAvailabilityRules() */ -export type DeleteDeviceAvailabilityRulesSuccessResponse = - DeleteDeviceAvailabilityRulesResponse204; +export type DeleteDeviceAvailabilityRulesSuccessResponse = DeleteDeviceAvailabilityRulesResponse204 /** * Typing for all error responses to the request made by deleteDeviceAvailabilityRules() * @category deleteDeviceAvailabilityRules() */ -export type DeleteDeviceAvailabilityRulesErrorResponse = - | DeleteDeviceAvailabilityRulesResponse400 - | DeleteDeviceAvailabilityRulesResponse401 - | DeleteDeviceAvailabilityRulesResponse403 - | DeleteDeviceAvailabilityRulesResponse404 - | DeleteDeviceAvailabilityRulesResponse500; +export type DeleteDeviceAvailabilityRulesErrorResponse = DeleteDeviceAvailabilityRulesResponse400 | DeleteDeviceAvailabilityRulesResponse401 | DeleteDeviceAvailabilityRulesResponse403 | DeleteDeviceAvailabilityRulesResponse404 | DeleteDeviceAvailabilityRulesResponse500 /** * Typing for a response with status 204 to the request made by deleteDeviceAvailabilityRules() * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse204 extends Types.SuccessResponse { - status: 204; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 204 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -806,11 +753,11 @@ export interface DeleteDeviceAvailabilityRulesResponse204 extends Types.SuccessR * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -818,11 +765,11 @@ export interface DeleteDeviceAvailabilityRulesResponse400 extends Types.ErrorRes * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -830,11 +777,11 @@ export interface DeleteDeviceAvailabilityRulesResponse401 extends Types.ErrorRes * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -842,11 +789,11 @@ export interface DeleteDeviceAvailabilityRulesResponse403 extends Types.ErrorRes * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -854,11 +801,11 @@ export interface DeleteDeviceAvailabilityRulesResponse404 extends Types.ErrorRes * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -866,53 +813,43 @@ export interface DeleteDeviceAvailabilityRulesResponse500 extends Types.ErrorRes * @category addDeviceAvailabilityRules() */ export type AddDeviceAvailabilityRulesParameters = { - device_id: string; -}; + "device_id": string, +} /** * Typing for the body of the request made by addDeviceAvailabilityRules() * @category addDeviceAvailabilityRules() */ -export type AddDeviceAvailabilityRulesBody = - | Types.AvailabilityRule<'request'>[] - | undefined; +export type AddDeviceAvailabilityRulesBody = Types.AvailabilityRule<"request">[] | undefined /** * Typing for all possible responses to the request made by addDeviceAvailabilityRules() * @category addDeviceAvailabilityRules() */ -export type AddDeviceAvailabilityRulesResponse = - | AddDeviceAvailabilityRulesSuccessResponse - | AddDeviceAvailabilityRulesErrorResponse; +export type AddDeviceAvailabilityRulesResponse = AddDeviceAvailabilityRulesSuccessResponse | AddDeviceAvailabilityRulesErrorResponse /** * Typing for all successful responses to the request made by addDeviceAvailabilityRules() * @category addDeviceAvailabilityRules() */ -export type AddDeviceAvailabilityRulesSuccessResponse = - AddDeviceAvailabilityRulesResponse200; +export type AddDeviceAvailabilityRulesSuccessResponse = AddDeviceAvailabilityRulesResponse200 /** * Typing for all error responses to the request made by addDeviceAvailabilityRules() * @category addDeviceAvailabilityRules() */ -export type AddDeviceAvailabilityRulesErrorResponse = - | AddDeviceAvailabilityRulesResponse400 - | AddDeviceAvailabilityRulesResponse401 - | AddDeviceAvailabilityRulesResponse403 - | AddDeviceAvailabilityRulesResponse404 - | AddDeviceAvailabilityRulesResponse500; +export type AddDeviceAvailabilityRulesErrorResponse = AddDeviceAvailabilityRulesResponse400 | AddDeviceAvailabilityRulesResponse401 | AddDeviceAvailabilityRulesResponse403 | AddDeviceAvailabilityRulesResponse404 | AddDeviceAvailabilityRulesResponse500 /** * Typing for a response with status 200 to the request made by addDeviceAvailabilityRules() * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body: Types.Availability<'response'>; + status: 200 + headers?: { + [k: string]: string | undefined + } + body: Types.Availability<"response"> } /** @@ -920,11 +857,11 @@ export interface AddDeviceAvailabilityRulesResponse200 extends Types.SuccessResp * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -932,11 +869,11 @@ export interface AddDeviceAvailabilityRulesResponse400 extends Types.ErrorRespon * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -944,11 +881,11 @@ export interface AddDeviceAvailabilityRulesResponse401 extends Types.ErrorRespon * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -956,11 +893,11 @@ export interface AddDeviceAvailabilityRulesResponse403 extends Types.ErrorRespon * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -968,11 +905,11 @@ export interface AddDeviceAvailabilityRulesResponse404 extends Types.ErrorRespon * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -980,44 +917,37 @@ export interface AddDeviceAvailabilityRulesResponse500 extends Types.ErrorRespon * @category createWebsocketToken() */ export type CreateWebsocketTokenParameters = { - device_id: string; -}; + "device_id": string, +} /** * Typing for all possible responses to the request made by createWebsocketToken() * @category createWebsocketToken() */ -export type CreateWebsocketTokenResponse = - | CreateWebsocketTokenSuccessResponse - | CreateWebsocketTokenErrorResponse; +export type CreateWebsocketTokenResponse = CreateWebsocketTokenSuccessResponse | CreateWebsocketTokenErrorResponse /** * Typing for all successful responses to the request made by createWebsocketToken() * @category createWebsocketToken() */ -export type CreateWebsocketTokenSuccessResponse = CreateWebsocketTokenResponse200; +export type CreateWebsocketTokenSuccessResponse = CreateWebsocketTokenResponse200 /** * Typing for all error responses to the request made by createWebsocketToken() * @category createWebsocketToken() */ -export type CreateWebsocketTokenErrorResponse = - | CreateWebsocketTokenResponse400 - | CreateWebsocketTokenResponse401 - | CreateWebsocketTokenResponse403 - | CreateWebsocketTokenResponse404 - | CreateWebsocketTokenResponse500; +export type CreateWebsocketTokenErrorResponse = CreateWebsocketTokenResponse400 | CreateWebsocketTokenResponse401 | CreateWebsocketTokenResponse403 | CreateWebsocketTokenResponse404 | CreateWebsocketTokenResponse500 /** * Typing for a response with status 200 to the request made by createWebsocketToken() * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body: string; + status: 200 + headers?: { + [k: string]: string | undefined + } + body: string } /** @@ -1025,11 +955,11 @@ export interface CreateWebsocketTokenResponse200 extends Types.SuccessResponse { * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1037,11 +967,11 @@ export interface CreateWebsocketTokenResponse400 extends Types.ErrorResponse { * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1049,11 +979,11 @@ export interface CreateWebsocketTokenResponse401 extends Types.ErrorResponse { * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1061,11 +991,11 @@ export interface CreateWebsocketTokenResponse403 extends Types.ErrorResponse { * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1073,11 +1003,11 @@ export interface CreateWebsocketTokenResponse404 extends Types.ErrorResponse { * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1085,55 +1015,43 @@ export interface CreateWebsocketTokenResponse500 extends Types.ErrorResponse { * @category sendSignalingMessage() */ export type SendSignalingMessageParameters = { - device_id: string; -}; + "device_id": string, +} /** * Typing for the body of the request made by sendSignalingMessage() * @category sendSignalingMessage() */ -export type SendSignalingMessageBody = - | Types.CreatePeerconnectionMessage<'request'> - | Types.ClosePeerconnectionMessage<'request'> - | Types.SignalingMessage<'request'> - | Types.ConfigurationMessage<'request'> - | Types.ExperimentStatusChangedMessage<'request'>; +export type SendSignalingMessageBody = Types.CreatePeerconnectionMessage<"request"> | Types.ClosePeerconnectionMessage<"request"> | Types.SignalingMessage<"request"> | Types.ConfigurationMessage<"request"> | Types.ExperimentStatusChangedMessage<"request"> /** * Typing for all possible responses to the request made by sendSignalingMessage() * @category sendSignalingMessage() */ -export type SendSignalingMessageResponse = - | SendSignalingMessageSuccessResponse - | SendSignalingMessageErrorResponse; +export type SendSignalingMessageResponse = SendSignalingMessageSuccessResponse | SendSignalingMessageErrorResponse /** * Typing for all successful responses to the request made by sendSignalingMessage() * @category sendSignalingMessage() */ -export type SendSignalingMessageSuccessResponse = SendSignalingMessageResponse200; +export type SendSignalingMessageSuccessResponse = SendSignalingMessageResponse200 /** * Typing for all error responses to the request made by sendSignalingMessage() * @category sendSignalingMessage() */ -export type SendSignalingMessageErrorResponse = - | SendSignalingMessageResponse400 - | SendSignalingMessageResponse401 - | SendSignalingMessageResponse403 - | SendSignalingMessageResponse404 - | SendSignalingMessageResponse500; +export type SendSignalingMessageErrorResponse = SendSignalingMessageResponse400 | SendSignalingMessageResponse401 | SendSignalingMessageResponse403 | SendSignalingMessageResponse404 | SendSignalingMessageResponse500 /** * Typing for a response with status 200 to the request made by sendSignalingMessage() * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 200 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1141,11 +1059,11 @@ export interface SendSignalingMessageResponse200 extends Types.SuccessResponse { * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1153,11 +1071,11 @@ export interface SendSignalingMessageResponse400 extends Types.ErrorResponse { * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1165,11 +1083,11 @@ export interface SendSignalingMessageResponse401 extends Types.ErrorResponse { * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1177,11 +1095,11 @@ export interface SendSignalingMessageResponse403 extends Types.ErrorResponse { * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1189,48 +1107,41 @@ export interface SendSignalingMessageResponse404 extends Types.ErrorResponse { * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** * Typing for all possible responses to the request made by listPeerconnections() * @category listPeerconnections() */ -export type ListPeerconnectionsResponse = - | ListPeerconnectionsSuccessResponse - | ListPeerconnectionsErrorResponse; +export type ListPeerconnectionsResponse = ListPeerconnectionsSuccessResponse | ListPeerconnectionsErrorResponse /** * Typing for all successful responses to the request made by listPeerconnections() * @category listPeerconnections() */ -export type ListPeerconnectionsSuccessResponse = ListPeerconnectionsResponse200; +export type ListPeerconnectionsSuccessResponse = ListPeerconnectionsResponse200 /** * Typing for all error responses to the request made by listPeerconnections() * @category listPeerconnections() */ -export type ListPeerconnectionsErrorResponse = - | ListPeerconnectionsResponse400 - | ListPeerconnectionsResponse401 - | ListPeerconnectionsResponse403 - | ListPeerconnectionsResponse404 - | ListPeerconnectionsResponse500; +export type ListPeerconnectionsErrorResponse = ListPeerconnectionsResponse400 | ListPeerconnectionsResponse401 | ListPeerconnectionsResponse403 | ListPeerconnectionsResponse404 | ListPeerconnectionsResponse500 /** * Typing for a response with status 200 to the request made by listPeerconnections() * @category listPeerconnections() */ export interface ListPeerconnectionsResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body: Types.PeerconnectionOverview<'response'>[]; + status: 200 + headers?: { + [k: string]: string | undefined + } + body: Types.PeerconnectionOverview<"response">[] } /** @@ -1238,11 +1149,11 @@ export interface ListPeerconnectionsResponse200 extends Types.SuccessResponse { * @category listPeerconnections() */ export interface ListPeerconnectionsResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1250,11 +1161,11 @@ export interface ListPeerconnectionsResponse400 extends Types.ErrorResponse { * @category listPeerconnections() */ export interface ListPeerconnectionsResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1262,11 +1173,11 @@ export interface ListPeerconnectionsResponse401 extends Types.ErrorResponse { * @category listPeerconnections() */ export interface ListPeerconnectionsResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1274,11 +1185,11 @@ export interface ListPeerconnectionsResponse403 extends Types.ErrorResponse { * @category listPeerconnections() */ export interface ListPeerconnectionsResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1286,11 +1197,11 @@ export interface ListPeerconnectionsResponse404 extends Types.ErrorResponse { * @category listPeerconnections() */ export interface ListPeerconnectionsResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1298,53 +1209,44 @@ export interface ListPeerconnectionsResponse500 extends Types.ErrorResponse { * @category createPeerconnection() */ export type CreatePeerconnectionParameters = { - closedUrl?: string; - statusChangedUrl?: string; -}; + "closedUrl"?: string, + "statusChangedUrl"?: string, +} /** * Typing for the body of the request made by createPeerconnection() * @category createPeerconnection() */ -export type CreatePeerconnectionBody = Types.Peerconnection<'request'>; +export type CreatePeerconnectionBody = Types.Peerconnection<"request"> /** * Typing for all possible responses to the request made by createPeerconnection() * @category createPeerconnection() */ -export type CreatePeerconnectionResponse = - | CreatePeerconnectionSuccessResponse - | CreatePeerconnectionErrorResponse; +export type CreatePeerconnectionResponse = CreatePeerconnectionSuccessResponse | CreatePeerconnectionErrorResponse /** * Typing for all successful responses to the request made by createPeerconnection() * @category createPeerconnection() */ -export type CreatePeerconnectionSuccessResponse = - | CreatePeerconnectionResponse201 - | CreatePeerconnectionResponse202; +export type CreatePeerconnectionSuccessResponse = CreatePeerconnectionResponse201 | CreatePeerconnectionResponse202 /** * Typing for all error responses to the request made by createPeerconnection() * @category createPeerconnection() */ -export type CreatePeerconnectionErrorResponse = - | CreatePeerconnectionResponse400 - | CreatePeerconnectionResponse401 - | CreatePeerconnectionResponse403 - | CreatePeerconnectionResponse404 - | CreatePeerconnectionResponse500; +export type CreatePeerconnectionErrorResponse = CreatePeerconnectionResponse400 | CreatePeerconnectionResponse401 | CreatePeerconnectionResponse403 | CreatePeerconnectionResponse404 | CreatePeerconnectionResponse500 /** * Typing for a response with status 201 to the request made by createPeerconnection() * @category createPeerconnection() */ export interface CreatePeerconnectionResponse201 extends Types.SuccessResponse { - status: 201; - headers?: { - [k: string]: string | undefined; - }; - body: Types.Peerconnection<'response'>; + status: 201 + headers?: { + [k: string]: string | undefined + } + body: Types.Peerconnection<"response"> } /** @@ -1352,11 +1254,11 @@ export interface CreatePeerconnectionResponse201 extends Types.SuccessResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse202 extends Types.SuccessResponse { - status: 202; - headers?: { - [k: string]: string | undefined; - }; - body: Types.Peerconnection<'response'>; + status: 202 + headers?: { + [k: string]: string | undefined + } + body: Types.Peerconnection<"response"> } /** @@ -1364,11 +1266,11 @@ export interface CreatePeerconnectionResponse202 extends Types.SuccessResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1376,11 +1278,11 @@ export interface CreatePeerconnectionResponse400 extends Types.ErrorResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1388,11 +1290,11 @@ export interface CreatePeerconnectionResponse401 extends Types.ErrorResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1400,11 +1302,11 @@ export interface CreatePeerconnectionResponse403 extends Types.ErrorResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1412,11 +1314,11 @@ export interface CreatePeerconnectionResponse404 extends Types.ErrorResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1424,44 +1326,37 @@ export interface CreatePeerconnectionResponse500 extends Types.ErrorResponse { * @category getPeerconnection() */ export type GetPeerconnectionParameters = { - peerconnection_id: string; -}; + "peerconnection_id": string, +} /** * Typing for all possible responses to the request made by getPeerconnection() * @category getPeerconnection() */ -export type GetPeerconnectionResponse = - | GetPeerconnectionSuccessResponse - | GetPeerconnectionErrorResponse; +export type GetPeerconnectionResponse = GetPeerconnectionSuccessResponse | GetPeerconnectionErrorResponse /** * Typing for all successful responses to the request made by getPeerconnection() * @category getPeerconnection() */ -export type GetPeerconnectionSuccessResponse = GetPeerconnectionResponse200; +export type GetPeerconnectionSuccessResponse = GetPeerconnectionResponse200 /** * Typing for all error responses to the request made by getPeerconnection() * @category getPeerconnection() */ -export type GetPeerconnectionErrorResponse = - | GetPeerconnectionResponse400 - | GetPeerconnectionResponse401 - | GetPeerconnectionResponse403 - | GetPeerconnectionResponse404 - | GetPeerconnectionResponse500; +export type GetPeerconnectionErrorResponse = GetPeerconnectionResponse400 | GetPeerconnectionResponse401 | GetPeerconnectionResponse403 | GetPeerconnectionResponse404 | GetPeerconnectionResponse500 /** * Typing for a response with status 200 to the request made by getPeerconnection() * @category getPeerconnection() */ export interface GetPeerconnectionResponse200 extends Types.SuccessResponse { - status: 200; - headers?: { - [k: string]: string | undefined; - }; - body: Types.Peerconnection<'response'>; + status: 200 + headers?: { + [k: string]: string | undefined + } + body: Types.Peerconnection<"response"> } /** @@ -1469,11 +1364,11 @@ export interface GetPeerconnectionResponse200 extends Types.SuccessResponse { * @category getPeerconnection() */ export interface GetPeerconnectionResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1481,11 +1376,11 @@ export interface GetPeerconnectionResponse400 extends Types.ErrorResponse { * @category getPeerconnection() */ export interface GetPeerconnectionResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1493,11 +1388,11 @@ export interface GetPeerconnectionResponse401 extends Types.ErrorResponse { * @category getPeerconnection() */ export interface GetPeerconnectionResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1505,11 +1400,11 @@ export interface GetPeerconnectionResponse403 extends Types.ErrorResponse { * @category getPeerconnection() */ export interface GetPeerconnectionResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1517,11 +1412,11 @@ export interface GetPeerconnectionResponse404 extends Types.ErrorResponse { * @category getPeerconnection() */ export interface GetPeerconnectionResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1529,46 +1424,37 @@ export interface GetPeerconnectionResponse500 extends Types.ErrorResponse { * @category deletePeerconnection() */ export type DeletePeerconnectionParameters = { - peerconnection_id: string; -}; + "peerconnection_id": string, +} /** * Typing for all possible responses to the request made by deletePeerconnection() * @category deletePeerconnection() */ -export type DeletePeerconnectionResponse = - | DeletePeerconnectionSuccessResponse - | DeletePeerconnectionErrorResponse; +export type DeletePeerconnectionResponse = DeletePeerconnectionSuccessResponse | DeletePeerconnectionErrorResponse /** * Typing for all successful responses to the request made by deletePeerconnection() * @category deletePeerconnection() */ -export type DeletePeerconnectionSuccessResponse = - | DeletePeerconnectionResponse202 - | DeletePeerconnectionResponse204; +export type DeletePeerconnectionSuccessResponse = DeletePeerconnectionResponse202 | DeletePeerconnectionResponse204 /** * Typing for all error responses to the request made by deletePeerconnection() * @category deletePeerconnection() */ -export type DeletePeerconnectionErrorResponse = - | DeletePeerconnectionResponse400 - | DeletePeerconnectionResponse401 - | DeletePeerconnectionResponse403 - | DeletePeerconnectionResponse404 - | DeletePeerconnectionResponse500; +export type DeletePeerconnectionErrorResponse = DeletePeerconnectionResponse400 | DeletePeerconnectionResponse401 | DeletePeerconnectionResponse403 | DeletePeerconnectionResponse404 | DeletePeerconnectionResponse500 /** * Typing for a response with status 202 to the request made by deletePeerconnection() * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse202 extends Types.SuccessResponse { - status: 202; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 202 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1576,11 +1462,11 @@ export interface DeletePeerconnectionResponse202 extends Types.SuccessResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse204 extends Types.SuccessResponse { - status: 204; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 204 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1588,11 +1474,11 @@ export interface DeletePeerconnectionResponse204 extends Types.SuccessResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1600,11 +1486,11 @@ export interface DeletePeerconnectionResponse400 extends Types.ErrorResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1612,11 +1498,11 @@ export interface DeletePeerconnectionResponse401 extends Types.ErrorResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1624,11 +1510,11 @@ export interface DeletePeerconnectionResponse403 extends Types.ErrorResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1636,11 +1522,11 @@ export interface DeletePeerconnectionResponse404 extends Types.ErrorResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1648,59 +1534,50 @@ export interface DeletePeerconnectionResponse500 extends Types.ErrorResponse { * @category patchPeerconnectionDeviceStatus() */ export type PatchPeerconnectionDeviceStatusParameters = { - peerconnection_id: string; - device_url: string; -}; + "peerconnection_id": string, + "device_url": string, +} /** * Typing for the body of the request made by patchPeerconnectionDeviceStatus() * @category patchPeerconnectionDeviceStatus() */ export type PatchPeerconnectionDeviceStatusBody = { - /** - * The status of the peerconnection. - */ - status: Types.ConnectionStatus<'request'>; - [k: string]: unknown; -}; + /** + * The status of the peerconnection. + */ + status: Types.ConnectionStatus<"request"> + [k: string]: unknown + } /** * Typing for all possible responses to the request made by patchPeerconnectionDeviceStatus() * @category patchPeerconnectionDeviceStatus() */ -export type PatchPeerconnectionDeviceStatusResponse = - | PatchPeerconnectionDeviceStatusSuccessResponse - | PatchPeerconnectionDeviceStatusErrorResponse; +export type PatchPeerconnectionDeviceStatusResponse = PatchPeerconnectionDeviceStatusSuccessResponse | PatchPeerconnectionDeviceStatusErrorResponse /** * Typing for all successful responses to the request made by patchPeerconnectionDeviceStatus() * @category patchPeerconnectionDeviceStatus() */ -export type PatchPeerconnectionDeviceStatusSuccessResponse = - PatchPeerconnectionDeviceStatusResponse204; +export type PatchPeerconnectionDeviceStatusSuccessResponse = PatchPeerconnectionDeviceStatusResponse204 /** * Typing for all error responses to the request made by patchPeerconnectionDeviceStatus() * @category patchPeerconnectionDeviceStatus() */ -export type PatchPeerconnectionDeviceStatusErrorResponse = - | PatchPeerconnectionDeviceStatusResponse400 - | PatchPeerconnectionDeviceStatusResponse401 - | PatchPeerconnectionDeviceStatusResponse403 - | PatchPeerconnectionDeviceStatusResponse404 - | PatchPeerconnectionDeviceStatusResponse500; +export type PatchPeerconnectionDeviceStatusErrorResponse = PatchPeerconnectionDeviceStatusResponse400 | PatchPeerconnectionDeviceStatusResponse401 | PatchPeerconnectionDeviceStatusResponse403 | PatchPeerconnectionDeviceStatusResponse404 | PatchPeerconnectionDeviceStatusResponse500 /** * Typing for a response with status 204 to the request made by patchPeerconnectionDeviceStatus() * @category patchPeerconnectionDeviceStatus() */ -export interface PatchPeerconnectionDeviceStatusResponse204 - extends Types.SuccessResponse { - status: 204; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; +export interface PatchPeerconnectionDeviceStatusResponse204 extends Types.SuccessResponse { + status: 204 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1708,11 +1585,11 @@ export interface PatchPeerconnectionDeviceStatusResponse204 * @category patchPeerconnectionDeviceStatus() */ export interface PatchPeerconnectionDeviceStatusResponse400 extends Types.ErrorResponse { - status: 400; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 400 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1720,11 +1597,11 @@ export interface PatchPeerconnectionDeviceStatusResponse400 extends Types.ErrorR * @category patchPeerconnectionDeviceStatus() */ export interface PatchPeerconnectionDeviceStatusResponse401 extends Types.ErrorResponse { - status: 401; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 401 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1732,11 +1609,11 @@ export interface PatchPeerconnectionDeviceStatusResponse401 extends Types.ErrorR * @category patchPeerconnectionDeviceStatus() */ export interface PatchPeerconnectionDeviceStatusResponse403 extends Types.ErrorResponse { - status: 403; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 403 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1744,11 +1621,11 @@ export interface PatchPeerconnectionDeviceStatusResponse403 extends Types.ErrorR * @category patchPeerconnectionDeviceStatus() */ export interface PatchPeerconnectionDeviceStatusResponse404 extends Types.ErrorResponse { - status: 404; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; + status: 404 + headers?: { + [k: string]: string | undefined + } + body?: undefined } /** @@ -1756,9 +1633,9 @@ export interface PatchPeerconnectionDeviceStatusResponse404 extends Types.ErrorR * @category patchPeerconnectionDeviceStatus() */ export interface PatchPeerconnectionDeviceStatusResponse500 extends Types.ErrorResponse { - status: 500; - headers?: { - [k: string]: string | undefined; - }; - body?: undefined; -} + status: 500 + headers?: { + [k: string]: string | undefined + } + body?: undefined +} \ No newline at end of file diff --git a/services/booking/src/common/src/clients/device/types.ts b/services/booking/src/common/src/clients/device/types.ts index b309e029..13cd46e1 100644 --- a/services/booking/src/common/src/clients/device/types.ts +++ b/services/booking/src/common/src/clients/device/types.ts @@ -3,3803 +3,3723 @@ * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, * and run openapi-codegeneration to regenerate this file. */ -import * as BasicValidation from './basicValidation.cjs'; +import * as BasicValidation from "./basicValidation.cjs" /** * @internal */ export interface FunctionWithErrors { - (...args: unknown[]): unknown; - errors?: unknown; + (...args: unknown[]): unknown + errors?: unknown } /** * @internal */ export interface RequestInfo { - method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'OPTIONS' | 'PATCH' | 'HEAD'; - body?: string; - headers?: [string, string][]; + method?: "GET" | "POST" | "PUT" | "DELETE" | "TRACE" | "OPTIONS" | "PATCH" | "HEAD" + body?: string + headers?: [string, string][] } /** * @internal */ -export type FetchFunction = ( - url: string, - info?: RequestInfo, -) => Promise | ResponseData; +export type FetchFunction = (url: string, info?: RequestInfo) => Promise | ResponseData export interface ResponseData { - status: number; - headers?: { - [key: string]: string | undefined; - }; - body?: unknown; + status: number, + headers?: { + [key: string]: string | undefined + }, + body?: unknown } export interface SuccessResponse extends ResponseData { - success?: true; + success?: true } export interface ErrorResponse extends ResponseData { - success?: false; + success?: false } /** * @internal */ export function isSuccessResponse(response: ResponseData): response is SuccessResponse { - return response.status < 400; + return response.status < 400 } /** * @internal */ export function isErrorResponse(response: ResponseData): response is ErrorResponse { - return response.status >= 400; + return response.status >= 400 } /** * This type allows to pick the required properties of another type. */ export type Require = Partial & { - [Property in Key]-?: Type[Property]; -}; + [Property in Key]-?: Type[Property] +} export type SizedTuple< - T, - MIN extends number | undefined = undefined, - MAX extends number | undefined = undefined, + T, + MIN extends number | undefined = undefined, + MAX extends number | undefined = undefined > = MIN extends number - ? MAX extends number - ? _SizedTuple> - : TupleObject> & T[] - : MAX extends number + ? MAX extends number + ? _SizedTuple> + : TupleObject> & T[] + : MAX extends number ? _SizedTuple, true> : T[]; -type _SizedTuple = ARR extends [ - infer HEAD extends number, - ...infer TAIL extends number[], -] - ? Tuple | _SizedTuple - : never; +type _SizedTuple< + T, + ARR extends number[], + Z extends boolean = false +> = ARR extends [infer HEAD extends number, ...infer TAIL extends number[]] + ? Tuple | _SizedTuple + : never; type Tuple = _Tuple< - T, - NumericRangeTuple + T, + NumericRangeTuple >; type _Tuple = N extends [ - infer HEAD, - ...infer TAIL extends number[], + infer HEAD, + ...infer TAIL extends number[] ] - ? HEAD extends 0 - ? [] | _Tuple - : [T, ..._Tuple] - : []; + ? HEAD extends 0 + ? [] | _Tuple + : [T, ..._Tuple] + : []; type TupleObject = N extends [ - infer HEAD extends number, - ...infer TAIL extends number[], + infer HEAD extends number, + ...infer TAIL extends number[] ] - ? TAIL extends [] - ? Record - : { [P in HEAD]: T } & TupleObject - : Record; + ? TAIL extends [] + ? Record + : { [P in HEAD]: T } & TupleObject + : Record; export type NumericRange< - START extends number, - END extends number, - ARR extends unknown[] = [], - ACC extends number = never, + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number = never > = ARR['length'] extends END - ? ACC | START | END - : NumericRange< - START, - END, - [...ARR, 1], - ARR[START] extends undefined ? ACC : ACC | ARR['length'] - >; + ? ACC | START | END + : NumericRange< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : ACC | ARR['length'] + >; type NumericRangeTuple< - START extends number, - END extends number, - ARR extends unknown[] = [], - ACC extends number[] = [], + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number[] = [] > = ARR['length'] extends END - ? [START, ...ACC, END] - : NumericRangeTuple< - START, - END, - [...ARR, 1], - ARR[START] extends undefined ? ACC : [...ACC, ARR['length']] - >; - -export type AuthenticationMessage = - T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'authenticate'; - token?: string; - authenticated?: boolean; - [k: string]: unknown; - } - : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'authenticate'; - token?: string; - authenticated?: boolean; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'authenticate'; - token?: string; - authenticated?: boolean; - [k: string]: unknown; - } - : never; - -export type ConnectionStateChangedMessage< - T extends 'request' | 'response' | 'all' = 'all', -> = T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType?: 'connection-state-changed'; - connectionUrl: string; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - [k: string]: unknown; - } - : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType?: 'connection-state-changed'; - connectionUrl: string; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType?: 'connection-state-changed'; - connectionUrl: string; - /** - * The status of the peerconnection. - */ - status: - | 'new' - | 'connecting' - | 'connected' - | 'disconnected' - | 'failed' - | 'closed'; - [k: string]: unknown; - } - : never; - -export type UserReference = - T extends 'all' - ? { - /** - * URL of the user - */ - url: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * URL of the user - */ - url: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the user - */ - url: string; - [k: string]: unknown; - } - : never; - -export type DeviceOverview = - T extends 'all' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } - : never; - -export type ServiceDescription = - T extends 'all' - ? { - serviceType?: string; - serviceId?: string; - serviceDirection?: 'consumer' | 'producer' | 'prosumer'; - [k: string]: unknown; - } - : T extends 'request' - ? { - serviceType?: string; - serviceId?: string; - serviceDirection?: 'consumer' | 'producer' | 'prosumer'; - [k: string]: unknown; - } - : T extends 'response' - ? { - serviceType?: string; - serviceId?: string; - serviceDirection?: 'consumer' | 'producer' | 'prosumer'; - [k: string]: unknown; - } - : never; - -export type InstantiableCloudDevice = - T extends 'all' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - } - : never; - -export type TimeSlot = T extends 'all' - ? { - start?: string; - end?: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - start?: string; - end?: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - start?: string; - end?: string; - [k: string]: unknown; - } - : never; + ? [START, ...ACC, END] + : NumericRangeTuple< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : [...ACC, ARR['length']] + >; + + + export type AuthenticationMessage = T extends "all" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "authenticate" + token?: string + authenticated?: boolean + [k: string]: unknown +} + : T extends "request" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "authenticate" + token?: string + authenticated?: boolean + [k: string]: unknown +} + : T extends "response" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "authenticate" + token?: string + authenticated?: boolean + [k: string]: unknown +} + : never + + + + export type ConnectionStateChangedMessage = T extends "all" + ? { + messageType: string + [k: string]: unknown +} & { + messageType?: "connection-state-changed" + connectionUrl: string + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown +} + : T extends "request" + ? { + messageType: string + [k: string]: unknown +} & { + messageType?: "connection-state-changed" + connectionUrl: string + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown +} + : T extends "response" + ? { + messageType: string + [k: string]: unknown +} & { + messageType?: "connection-state-changed" + connectionUrl: string + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown +} + : never + -/** + + export type UserReference = T extends "all" + ? { + /** + * URL of the user + */ + url: string + [k: string]: unknown +} + : T extends "request" + ? { + /** + * URL of the user + */ + url: string + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the user + */ + url: string + [k: string]: unknown +} + : never + + + + export type DeviceOverview = T extends "all" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} + : never + + + + export type ServiceDescription = T extends "all" + ? { + serviceType?: string + serviceId?: string + serviceDirection?: "consumer" | "producer" | "prosumer" + [k: string]: unknown +} + : T extends "request" + ? { + serviceType?: string + serviceId?: string + serviceDirection?: "consumer" | "producer" | "prosumer" + [k: string]: unknown +} + : T extends "response" + ? { + serviceType?: string + serviceId?: string + serviceDirection?: "consumer" | "producer" | "prosumer" + [k: string]: unknown +} + : never + + + + export type InstantiableCloudDevice = T extends "all" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} + : never + + + + export type TimeSlot = T extends "all" + ? { + start?: string + end?: string + [k: string]: unknown +} + : T extends "request" + ? { + start?: string + end?: string + [k: string]: unknown +} + : T extends "response" + ? { + start?: string + end?: string + [k: string]: unknown +} + : never + + + + /** * A list of time slots that the maintainer of the device announced it is available - * + * */ -export type Availability = - T extends 'all' - ? TimeSlot[] - : T extends 'request' - ? TimeSlot<'request'>[] - : T extends 'response' - ? TimeSlot<'response'>[] - : never; - -export type ConcreteDevice = - T extends 'all' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'device'; - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean; - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot[]; - experiment?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean; - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot<'response'>[]; - experiment?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - } - : never; - -export type InstantiableBrowserDevice = - T extends 'all' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - } - : never; - -export type DeviceReference = - T extends 'all' - ? { - /** - * URL of the device - */ - url: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * URL of the device - */ - url: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - [k: string]: unknown; - } - : never; - -export type DeviceGroup = - T extends 'all' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference<'response'>[]; - [k: string]: unknown; - } - : never; - -export type Device = T extends 'all' - ? - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'device'; - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean; - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot[]; - experiment?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference[]; - [k: string]: unknown; - }) - : T extends 'request' - ? - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference<'request'>[]; - [k: string]: unknown; - }) - : T extends 'response' - ? - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean; - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot<'response'>[]; - experiment?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference<'response'>[]; - [k: string]: unknown; - }) - : never; - -export type Callback = T extends 'all' - ? { - callbackType: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - callbackType: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - callbackType: string; - [k: string]: unknown; - } - : never; - -export type EventCallback = - T extends 'all' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } - : never; - -export type DeviceChangedEventCallback = - T extends 'all' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'device-changed'; - device: - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'device'; - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean; - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot[]; - experiment?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference[]; - [k: string]: unknown; - }); - [k: string]: unknown; - } - : T extends 'request' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'device-changed'; - device: - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference<'request'>[]; - [k: string]: unknown; - }); - [k: string]: unknown; - } - : T extends 'response' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'device-changed'; - device: - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean; - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot<'response'>[]; - experiment?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference<'response'>[]; - [k: string]: unknown; - }); - [k: string]: unknown; - } - : never; - -export type DeviceOverviewUpdate = - T extends 'all' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } - : never; - -export type InstantiableCloudDeviceUpdate< - T extends 'request' | 'response' | 'all' = 'all', -> = T extends 'all' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - } - : never; - -export type ConcreteDeviceUpdate = - T extends 'all' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - } - : never; - -export type InstantiableBrowserDeviceUpdate< - T extends 'request' | 'response' | 'all' = 'all', -> = T extends 'all' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - } - : never; - -export type DeviceGroupUpdate = - T extends 'all' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices?: DeviceReference[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices?: DeviceReference<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices?: DeviceReference<'response'>[]; - [k: string]: unknown; - } - : never; - -export type DeviceUpdate = - T extends 'all' - ? - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices?: DeviceReference[]; - [k: string]: unknown; - }) - : T extends 'request' - ? - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices?: DeviceReference<'request'>[]; - [k: string]: unknown; - }) - : T extends 'response' - ? - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices?: DeviceReference<'response'>[]; - [k: string]: unknown; - }) - : never; - -export type AvailabilityRule = - T extends 'all' - ? { - start?: string; - end?: string; - [k: string]: unknown; - } & { - available?: boolean; - /** - * If specified the time slot is repeated in a fixed offset specified by the frequency - */ - repeat?: { - frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; - /** - * Up to this date-time the time slot will be repeated. - */ - until?: string; - /** - * How often the time slot will be repeated - */ - count?: number; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'request' - ? { - start?: string; - end?: string; - [k: string]: unknown; - } & { - available?: boolean; - /** - * If specified the time slot is repeated in a fixed offset specified by the frequency - */ - repeat?: { - frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; - /** - * Up to this date-time the time slot will be repeated. - */ - until?: string; - /** - * How often the time slot will be repeated - */ - count?: number; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - start?: string; - end?: string; - [k: string]: unknown; - } & { - available?: boolean; - /** - * If specified the time slot is repeated in a fixed offset specified by the frequency - */ - repeat?: { - frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; - /** - * Up to this date-time the time slot will be repeated. - */ - until?: string; - /** - * How often the time slot will be repeated - */ - count?: number; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; - -export type Message = T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } - : never; - -export type CommandMessage = - T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } - : never; - -export type ServiceConfig = - T extends 'all' - ? { - serviceType: string; - serviceId: string; - remoteServiceId: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - serviceType: string; - serviceId: string; - remoteServiceId: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - serviceType: string; - serviceId: string; - remoteServiceId: string; - [k: string]: unknown; - } - : never; - -export type CreatePeerconnectionMessage< - T extends 'request' | 'response' | 'all' = 'all', -> = T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } & { - command: 'createPeerconnection'; - connectionType: 'webrtc' | 'websocket' | 'local'; - connectionUrl: string; - services: ServiceConfig[]; - tiebreaker: boolean; - config?: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } & { - command: 'createPeerconnection'; - connectionType: 'webrtc' | 'websocket' | 'local'; - connectionUrl: string; - services: ServiceConfig<'request'>[]; - tiebreaker: boolean; - config?: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } & { - command: 'createPeerconnection'; - connectionType: 'webrtc' | 'websocket' | 'local'; - connectionUrl: string; - services: ServiceConfig<'response'>[]; - tiebreaker: boolean; - config?: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; - -export type ClosePeerconnectionMessage = - T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } & { - command: 'closePeerconnection'; - connectionUrl: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } & { - command: 'closePeerconnection'; - connectionUrl: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } & { - command: 'closePeerconnection'; - connectionUrl: string; - [k: string]: unknown; - } - : never; - -export type SignalingMessage = - T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'signaling'; - signalingType: string; - connectionUrl: string; - content: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'signaling'; - signalingType: string; - connectionUrl: string; - content: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'signaling'; - signalingType: string; - connectionUrl: string; - content: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; - -export type ConfigurationMessage = - T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'configuration'; - configuration: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'configuration'; - configuration: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'configuration'; - configuration: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; - -export type ExperimentStatusChangedMessage< - T extends 'request' | 'response' | 'all' = 'all', -> = T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'experiment-status-changed'; - status: string; - message?: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'experiment-status-changed'; - status: string; - message?: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'experiment-status-changed'; - status: string; - message?: string; - [k: string]: unknown; - } - : never; +export type Availability = T extends "all" + ? TimeSlot[] + : T extends "request" + ? TimeSlot<"request">[] + : T extends "response" + ? TimeSlot<"response">[] + : never + + + + export type ConcreteDevice = T extends "all" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "device" + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot[] + experiment?: string + services?: ServiceDescription[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "device" + experiment?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "device" + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot<"response">[] + experiment?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} + : never + + + + export type InstantiableBrowserDevice = T extends "all" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} + : never + -/** + + export type DeviceReference = T extends "all" + ? { + /** + * URL of the device + */ + url: string + [k: string]: unknown +} + : T extends "request" + ? { + /** + * URL of the device + */ + url: string + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the device + */ + url: string + [k: string]: unknown +} + : never + + + + export type DeviceGroup = T extends "all" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "group" + devices: DeviceReference[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "group" + devices: DeviceReference<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "group" + devices: DeviceReference<"response">[] + [k: string]: unknown +} + : never + + + + export type Device = T extends "all" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription[] + [k: string]: unknown +} | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "device" + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot[] + experiment?: string + services?: ServiceDescription[] + [k: string]: unknown +} | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription[] + [k: string]: unknown +} | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "group" + devices: DeviceReference[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "device" + experiment?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "group" + devices: DeviceReference<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "device" + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot<"response">[] + experiment?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "group" + devices: DeviceReference<"response">[] + [k: string]: unknown +} + : never + + + + export type Callback = T extends "all" + ? { + callbackType: string + [k: string]: unknown +} + : T extends "request" + ? { + callbackType: string + [k: string]: unknown +} + : T extends "response" + ? { + callbackType: string + [k: string]: unknown +} + : never + + + + export type EventCallback = T extends "all" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} + : T extends "request" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} + : T extends "response" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} + : never + + + + export type DeviceChangedEventCallback = T extends "all" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} & { + eventType: "device-changed" + device: { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown + } & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription[] + [k: string]: unknown + } | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown + } & { + type?: "device" + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot[] + experiment?: string + services?: ServiceDescription[] + [k: string]: unknown + } | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown + } & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription[] + [k: string]: unknown + } | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown + } & { + type?: "group" + devices: DeviceReference[] + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "request" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} & { + eventType: "device-changed" + device: { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown + } & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown + } | { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown + } & { + type?: "device" + experiment?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown + } | { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown + } & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown + } | { + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown + } & { + type?: "group" + devices: DeviceReference<"request">[] + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "response" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} & { + eventType: "device-changed" + device: { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown + } & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown + } | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown + } & { + type?: "device" + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot<"response">[] + experiment?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown + } | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown + } & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown + } | { + /** + * URL of the device + */ + url: string + /** + * Name of the device + */ + name: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown + } & { + type?: "group" + devices: DeviceReference<"response">[] + [k: string]: unknown + } + [k: string]: unknown +} + : never + + + + export type DeviceOverviewUpdate = T extends "all" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} + : never + + + + export type InstantiableCloudDeviceUpdate = T extends "all" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} + : never + + + + export type ConcreteDeviceUpdate = T extends "all" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "device" + experiment?: string + services?: ServiceDescription[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "device" + experiment?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "device" + experiment?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} + : never + + + + export type InstantiableBrowserDeviceUpdate = T extends "all" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} + : never + + + + export type DeviceGroupUpdate = T extends "all" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "group" + devices?: DeviceReference[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "group" + devices?: DeviceReference<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "group" + devices?: DeviceReference<"response">[] + [k: string]: unknown +} + : never + + + + export type DeviceUpdate = T extends "all" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "device" + experiment?: string + services?: ServiceDescription[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference[] + /** + * List of users who own the device + */ + owner?: UserReference[] + [k: string]: unknown +} & { + type?: "group" + devices?: DeviceReference[] + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "device" + experiment?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription<"request">[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"request">[] + /** + * List of users who own the device + */ + owner?: UserReference<"request">[] + [k: string]: unknown +} & { + type?: "group" + devices?: DeviceReference<"request">[] + [k: string]: unknown +} + : T extends "response" + ? { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "cloud instantiable" + instantiateUrl?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "device" + experiment?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "edge instantiable" + codeUrl?: string + services?: ServiceDescription<"response">[] + [k: string]: unknown +} | { + /** + * Name of the device + */ + name?: string + /** + * Extended description of the device, features, etc. + */ + description?: string + /** + * Type of the device + */ + type: "device" | "group" | "edge instantiable" | "cloud instantiable" + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean + /** + * List of users who can view the device + */ + viewer?: UserReference<"response">[] + /** + * List of users who own the device + */ + owner?: UserReference<"response">[] + [k: string]: unknown +} & { + type?: "group" + devices?: DeviceReference<"response">[] + [k: string]: unknown +} + : never + + + + export type AvailabilityRule = T extends "all" + ? { + start?: string + end?: string + [k: string]: unknown +} & { + available?: boolean + /** + * If specified the time slot is repeated in a fixed offset specified by the frequency + */ + repeat?: { + frequency: "HOURLY" | "DAILY" | "WEEKLY" + /** + * Up to this date-time the time slot will be repeated. + */ + until?: string + /** + * How often the time slot will be repeated + */ + count?: number + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "request" + ? { + start?: string + end?: string + [k: string]: unknown +} & { + available?: boolean + /** + * If specified the time slot is repeated in a fixed offset specified by the frequency + */ + repeat?: { + frequency: "HOURLY" | "DAILY" | "WEEKLY" + /** + * Up to this date-time the time slot will be repeated. + */ + until?: string + /** + * How often the time slot will be repeated + */ + count?: number + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "response" + ? { + start?: string + end?: string + [k: string]: unknown +} & { + available?: boolean + /** + * If specified the time slot is repeated in a fixed offset specified by the frequency + */ + repeat?: { + frequency: "HOURLY" | "DAILY" | "WEEKLY" + /** + * Up to this date-time the time slot will be repeated. + */ + until?: string + /** + * How often the time slot will be repeated + */ + count?: number + [k: string]: unknown + } + [k: string]: unknown +} + : never + + + + export type Message = T extends "all" + ? { + messageType: string + [k: string]: unknown +} + : T extends "request" + ? { + messageType: string + [k: string]: unknown +} + : T extends "response" + ? { + messageType: string + [k: string]: unknown +} + : never + + + + export type CommandMessage = T extends "all" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "command" + command: string + [k: string]: unknown +} + : T extends "request" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "command" + command: string + [k: string]: unknown +} + : T extends "response" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "command" + command: string + [k: string]: unknown +} + : never + + + + export type ServiceConfig = T extends "all" + ? { + serviceType: string + serviceId: string + remoteServiceId: string + [k: string]: unknown +} + : T extends "request" + ? { + serviceType: string + serviceId: string + remoteServiceId: string + [k: string]: unknown +} + : T extends "response" + ? { + serviceType: string + serviceId: string + remoteServiceId: string + [k: string]: unknown +} + : never + + + + export type CreatePeerconnectionMessage = T extends "all" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "command" + command: string + [k: string]: unknown +} & { + command: "createPeerconnection" + connectionType: "webrtc" | "websocket" | "local" + connectionUrl: string + services: ServiceConfig[] + tiebreaker: boolean + config?: { + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "request" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "command" + command: string + [k: string]: unknown +} & { + command: "createPeerconnection" + connectionType: "webrtc" | "websocket" | "local" + connectionUrl: string + services: ServiceConfig<"request">[] + tiebreaker: boolean + config?: { + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "response" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "command" + command: string + [k: string]: unknown +} & { + command: "createPeerconnection" + connectionType: "webrtc" | "websocket" | "local" + connectionUrl: string + services: ServiceConfig<"response">[] + tiebreaker: boolean + config?: { + [k: string]: unknown + } + [k: string]: unknown +} + : never + + + + export type ClosePeerconnectionMessage = T extends "all" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "command" + command: string + [k: string]: unknown +} & { + command: "closePeerconnection" + connectionUrl: string + [k: string]: unknown +} + : T extends "request" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "command" + command: string + [k: string]: unknown +} & { + command: "closePeerconnection" + connectionUrl: string + [k: string]: unknown +} + : T extends "response" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "command" + command: string + [k: string]: unknown +} & { + command: "closePeerconnection" + connectionUrl: string + [k: string]: unknown +} + : never + + + + export type SignalingMessage = T extends "all" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "signaling" + signalingType: string + connectionUrl: string + content: { + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "request" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "signaling" + signalingType: string + connectionUrl: string + content: { + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "response" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "signaling" + signalingType: string + connectionUrl: string + content: { + [k: string]: unknown + } + [k: string]: unknown +} + : never + + + + export type ConfigurationMessage = T extends "all" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "configuration" + configuration: { + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "request" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "configuration" + configuration: { + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "response" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "configuration" + configuration: { + [k: string]: unknown + } + [k: string]: unknown +} + : never + + + + export type ExperimentStatusChangedMessage = T extends "all" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "experiment-status-changed" + status: string + message?: string + [k: string]: unknown +} + : T extends "request" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "experiment-status-changed" + status: string + message?: string + [k: string]: unknown +} + : T extends "response" + ? { + messageType: string + [k: string]: unknown +} & { + messageType: "experiment-status-changed" + status: string + message?: string + [k: string]: unknown +} + : never + + + + /** * The status of the peerconnection. */ -export type ConnectionStatus = - T extends 'all' - ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' - : T extends 'request' - ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' - : T extends 'response' - ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' - : never; - -export type PeerconnectionCommon = - T extends 'all' - ? { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: - | 'new' - | 'connecting' - | 'connected' - | 'disconnected' - | 'failed' - | 'closed'; - [k: string]: unknown; - } - : never; - -export type PeerconnectionOverview = - T extends 'all' - ? { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - [k: string]: unknown; - } & { - devices: SizedTuple; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - [k: string]: unknown; - } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: - | 'new' - | 'connecting' - | 'connected' - | 'disconnected' - | 'failed' - | 'closed'; - [k: string]: unknown; - } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - } - : never; - -export type ConfiguredDeviceReference = - T extends 'all' - ? { - /** - * URL of the device - */ - url: string; - config?: { - services?: ServiceConfig[]; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * URL of the device - */ - url: string; - config?: { - services?: ServiceConfig<'request'>[]; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - config?: { - services?: ServiceConfig<'response'>[]; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; - -export type Peerconnection = - T extends 'all' - ? { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - [k: string]: unknown; - } & { - devices: SizedTuple; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - [k: string]: unknown; - } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: - | 'new' - | 'connecting' - | 'connected' - | 'disconnected' - | 'failed' - | 'closed'; - [k: string]: unknown; - } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - } - : never; - -export type PeerconnectionClosedEventCallback< - T extends 'request' | 'response' | 'all' = 'all', -> = T extends 'all' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'peerconnection-closed'; - peerconnection: { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - [k: string]: unknown; - } & { - devices: SizedTuple; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'request' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'peerconnection-closed'; - peerconnection: { - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - [k: string]: unknown; - } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'peerconnection-closed'; - peerconnection: { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: - | 'new' - | 'connecting' - | 'connected' - | 'disconnected' - | 'failed' - | 'closed'; - [k: string]: unknown; - } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; - -export type PeerconnectionStatusChangedEventCallback< - T extends 'request' | 'response' | 'all' = 'all', -> = T extends 'all' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'peerconnection-status-changed'; - peerconnection: { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - [k: string]: unknown; - } & { - devices: SizedTuple; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'request' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'peerconnection-status-changed'; - peerconnection: { - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - [k: string]: unknown; - } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'peerconnection-status-changed'; - peerconnection: { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: - | 'new' - | 'connecting' - | 'connected' - | 'disconnected' - | 'failed' - | 'closed'; - [k: string]: unknown; - } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; - -export function isAuthenticationMessage( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', +export type ConnectionStatus = T extends "all" + ? "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + : T extends "request" + ? "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + : T extends "response" + ? "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + : never + + + + export type PeerconnectionCommon = T extends "all" + ? { + /** + * URL of the peerconnection + */ + url: string + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the peerconnection + */ + url: string + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown +} + : never + + + + export type PeerconnectionOverview = T extends "all" + ? { + /** + * URL of the peerconnection + */ + url: string + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown +} & { + devices: SizedTuple + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + [k: string]: unknown +} & { + devices: SizedTuple,2,2> + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the peerconnection + */ + url: string + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown +} & { + devices: SizedTuple,2,2> + [k: string]: unknown +} + : never + + + + export type ConfiguredDeviceReference = T extends "all" + ? { + /** + * URL of the device + */ + url: string + config?: { + services?: ServiceConfig[] + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "request" + ? { + /** + * URL of the device + */ + url: string + config?: { + services?: ServiceConfig<"request">[] + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the device + */ + url: string + config?: { + services?: ServiceConfig<"response">[] + [k: string]: unknown + } + [k: string]: unknown +} + : never + + + + export type Peerconnection = T extends "all" + ? { + /** + * URL of the peerconnection + */ + url: string + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown +} & { + devices: SizedTuple + [k: string]: unknown +} + : T extends "request" + ? { + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + [k: string]: unknown +} & { + devices: SizedTuple,2,2> + [k: string]: unknown +} + : T extends "response" + ? { + /** + * URL of the peerconnection + */ + url: string + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown +} & { + devices: SizedTuple,2,2> + [k: string]: unknown +} + : never + + + + export type PeerconnectionClosedEventCallback = T extends "all" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} & { + eventType: "peerconnection-closed" + peerconnection: { + /** + * URL of the peerconnection + */ + url: string + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown + } & { + devices: SizedTuple + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "request" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} & { + eventType: "peerconnection-closed" + peerconnection: { + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + [k: string]: unknown + } & { + devices: SizedTuple,2,2> + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "response" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} & { + eventType: "peerconnection-closed" + peerconnection: { + /** + * URL of the peerconnection + */ + url: string + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown + } & { + devices: SizedTuple,2,2> + [k: string]: unknown + } + [k: string]: unknown +} + : never + + + + export type PeerconnectionStatusChangedEventCallback = T extends "all" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} & { + eventType: "peerconnection-status-changed" + peerconnection: { + /** + * URL of the peerconnection + */ + url: string + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown + } & { + devices: SizedTuple + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "request" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} & { + eventType: "peerconnection-status-changed" + peerconnection: { + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + [k: string]: unknown + } & { + devices: SizedTuple,2,2> + [k: string]: unknown + } + [k: string]: unknown +} + : T extends "response" + ? { + callbackType: string + [k: string]: unknown +} & { + callbackType: "event" + eventType: string + [k: string]: unknown +} & { + eventType: "peerconnection-status-changed" + peerconnection: { + /** + * URL of the peerconnection + */ + url: string + /** + * Type of the peerconnection + */ + type: "local" | "webrtc" + /** + * The status of the peerconnection. + */ + status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" + [k: string]: unknown + } & { + devices: SizedTuple,2,2> + [k: string]: unknown + } + [k: string]: unknown +} + : never + + +export function isAuthenticationMessage( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is AuthenticationMessage { - switch (type) { - case 'request': - return BasicValidation.validateAuthenticationMessageRequest(obj); - case 'response': - return BasicValidation.validateAuthenticationMessageResponse(obj); - default: - return BasicValidation.validateAuthenticationMessage(obj); - } -} - -export function isConnectionStateChangedMessage< - T extends 'request' | 'response' | 'all' = 'all', ->( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateAuthenticationMessageRequest(obj) + case "response": + return BasicValidation.validateAuthenticationMessageResponse(obj) + default: + return BasicValidation.validateAuthenticationMessage(obj) + } +} + +export function isConnectionStateChangedMessage( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is ConnectionStateChangedMessage { - switch (type) { - case 'request': - return BasicValidation.validateConnectionStateChangedMessageRequest(obj); - case 'response': - return BasicValidation.validateConnectionStateChangedMessageResponse(obj); - default: - return BasicValidation.validateConnectionStateChangedMessage(obj); - } -} - -export function isDeviceOverview( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateConnectionStateChangedMessageRequest(obj) + case "response": + return BasicValidation.validateConnectionStateChangedMessageResponse(obj) + default: + return BasicValidation.validateConnectionStateChangedMessage(obj) + } +} + +export function isDeviceOverview( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is DeviceOverview { - switch (type) { - case 'request': - return BasicValidation.validateDeviceOverviewRequest(obj); - case 'response': - return BasicValidation.validateDeviceOverviewResponse(obj); - default: - return BasicValidation.validateDeviceOverview(obj); - } -} - -export function isInstantiableCloudDevice< - T extends 'request' | 'response' | 'all' = 'all', ->( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateDeviceOverviewRequest(obj) + case "response": + return BasicValidation.validateDeviceOverviewResponse(obj) + default: + return BasicValidation.validateDeviceOverview(obj) + } +} + +export function isInstantiableCloudDevice( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is InstantiableCloudDevice { - switch (type) { - case 'request': - return BasicValidation.validateInstantiableCloudDeviceRequest(obj); - case 'response': - return BasicValidation.validateInstantiableCloudDeviceResponse(obj); - default: - return BasicValidation.validateInstantiableCloudDevice(obj); - } -} - -export function isConcreteDevice( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateInstantiableCloudDeviceRequest(obj) + case "response": + return BasicValidation.validateInstantiableCloudDeviceResponse(obj) + default: + return BasicValidation.validateInstantiableCloudDevice(obj) + } +} + +export function isConcreteDevice( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is ConcreteDevice { - switch (type) { - case 'request': - return BasicValidation.validateConcreteDeviceRequest(obj); - case 'response': - return BasicValidation.validateConcreteDeviceResponse(obj); - default: - return BasicValidation.validateConcreteDevice(obj); - } -} - -export function isInstantiableBrowserDevice< - T extends 'request' | 'response' | 'all' = 'all', ->( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateConcreteDeviceRequest(obj) + case "response": + return BasicValidation.validateConcreteDeviceResponse(obj) + default: + return BasicValidation.validateConcreteDevice(obj) + } +} + +export function isInstantiableBrowserDevice( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is InstantiableBrowserDevice { - switch (type) { - case 'request': - return BasicValidation.validateInstantiableBrowserDeviceRequest(obj); - case 'response': - return BasicValidation.validateInstantiableBrowserDeviceResponse(obj); - default: - return BasicValidation.validateInstantiableBrowserDevice(obj); - } -} - -export function isDeviceGroup( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateInstantiableBrowserDeviceRequest(obj) + case "response": + return BasicValidation.validateInstantiableBrowserDeviceResponse(obj) + default: + return BasicValidation.validateInstantiableBrowserDevice(obj) + } +} + +export function isDeviceGroup( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is DeviceGroup { - switch (type) { - case 'request': - return BasicValidation.validateDeviceGroupRequest(obj); - case 'response': - return BasicValidation.validateDeviceGroupResponse(obj); - default: - return BasicValidation.validateDeviceGroup(obj); - } -} - -export function isDevice( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateDeviceGroupRequest(obj) + case "response": + return BasicValidation.validateDeviceGroupResponse(obj) + default: + return BasicValidation.validateDeviceGroup(obj) + } +} + +export function isDevice( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is Device { - switch (type) { - case 'request': - return BasicValidation.validateDeviceRequest(obj); - case 'response': - return BasicValidation.validateDeviceResponse(obj); - default: - return BasicValidation.validateDevice(obj); - } -} - -export function isCallback( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateDeviceRequest(obj) + case "response": + return BasicValidation.validateDeviceResponse(obj) + default: + return BasicValidation.validateDevice(obj) + } +} + +export function isCallback( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is Callback { - switch (type) { - case 'request': - return BasicValidation.validateCallbackRequest(obj); - case 'response': - return BasicValidation.validateCallbackResponse(obj); - default: - return BasicValidation.validateCallback(obj); - } -} - -export function isEventCallback( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateCallbackRequest(obj) + case "response": + return BasicValidation.validateCallbackResponse(obj) + default: + return BasicValidation.validateCallback(obj) + } +} + +export function isEventCallback( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is EventCallback { - switch (type) { - case 'request': - return BasicValidation.validateEventCallbackRequest(obj); - case 'response': - return BasicValidation.validateEventCallbackResponse(obj); - default: - return BasicValidation.validateEventCallback(obj); - } -} - -export function isDeviceChangedEventCallback< - T extends 'request' | 'response' | 'all' = 'all', ->( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateEventCallbackRequest(obj) + case "response": + return BasicValidation.validateEventCallbackResponse(obj) + default: + return BasicValidation.validateEventCallback(obj) + } +} + +export function isDeviceChangedEventCallback( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is DeviceChangedEventCallback { - switch (type) { - case 'request': - return BasicValidation.validateDeviceChangedEventCallbackRequest(obj); - case 'response': - return BasicValidation.validateDeviceChangedEventCallbackResponse(obj); - default: - return BasicValidation.validateDeviceChangedEventCallback(obj); - } -} - -export function isMessage( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateDeviceChangedEventCallbackRequest(obj) + case "response": + return BasicValidation.validateDeviceChangedEventCallbackResponse(obj) + default: + return BasicValidation.validateDeviceChangedEventCallback(obj) + } +} + +export function isMessage( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is Message { - switch (type) { - case 'request': - return BasicValidation.validateMessageRequest(obj); - case 'response': - return BasicValidation.validateMessageResponse(obj); - default: - return BasicValidation.validateMessage(obj); - } -} - -export function isCommandMessage( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateMessageRequest(obj) + case "response": + return BasicValidation.validateMessageResponse(obj) + default: + return BasicValidation.validateMessage(obj) + } +} + +export function isCommandMessage( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is CommandMessage { - switch (type) { - case 'request': - return BasicValidation.validateCommandMessageRequest(obj); - case 'response': - return BasicValidation.validateCommandMessageResponse(obj); - default: - return BasicValidation.validateCommandMessage(obj); - } -} - -export function isCreatePeerconnectionMessage< - T extends 'request' | 'response' | 'all' = 'all', ->( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateCommandMessageRequest(obj) + case "response": + return BasicValidation.validateCommandMessageResponse(obj) + default: + return BasicValidation.validateCommandMessage(obj) + } +} + +export function isCreatePeerconnectionMessage( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is CreatePeerconnectionMessage { - switch (type) { - case 'request': - return BasicValidation.validateCreatePeerconnectionMessageRequest(obj); - case 'response': - return BasicValidation.validateCreatePeerconnectionMessageResponse(obj); - default: - return BasicValidation.validateCreatePeerconnectionMessage(obj); - } -} - -export function isClosePeerconnectionMessage< - T extends 'request' | 'response' | 'all' = 'all', ->( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateCreatePeerconnectionMessageRequest(obj) + case "response": + return BasicValidation.validateCreatePeerconnectionMessageResponse(obj) + default: + return BasicValidation.validateCreatePeerconnectionMessage(obj) + } +} + +export function isClosePeerconnectionMessage( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is ClosePeerconnectionMessage { - switch (type) { - case 'request': - return BasicValidation.validateClosePeerconnectionMessageRequest(obj); - case 'response': - return BasicValidation.validateClosePeerconnectionMessageResponse(obj); - default: - return BasicValidation.validateClosePeerconnectionMessage(obj); - } -} - -export function isSignalingMessage( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateClosePeerconnectionMessageRequest(obj) + case "response": + return BasicValidation.validateClosePeerconnectionMessageResponse(obj) + default: + return BasicValidation.validateClosePeerconnectionMessage(obj) + } +} + +export function isSignalingMessage( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is SignalingMessage { - switch (type) { - case 'request': - return BasicValidation.validateSignalingMessageRequest(obj); - case 'response': - return BasicValidation.validateSignalingMessageResponse(obj); - default: - return BasicValidation.validateSignalingMessage(obj); - } -} - -export function isConfigurationMessage( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateSignalingMessageRequest(obj) + case "response": + return BasicValidation.validateSignalingMessageResponse(obj) + default: + return BasicValidation.validateSignalingMessage(obj) + } +} + +export function isConfigurationMessage( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is ConfigurationMessage { - switch (type) { - case 'request': - return BasicValidation.validateConfigurationMessageRequest(obj); - case 'response': - return BasicValidation.validateConfigurationMessageResponse(obj); - default: - return BasicValidation.validateConfigurationMessage(obj); - } -} - -export function isExperimentStatusChangedMessage< - T extends 'request' | 'response' | 'all' = 'all', ->( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateConfigurationMessageRequest(obj) + case "response": + return BasicValidation.validateConfigurationMessageResponse(obj) + default: + return BasicValidation.validateConfigurationMessage(obj) + } +} + +export function isExperimentStatusChangedMessage( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is ExperimentStatusChangedMessage { - switch (type) { - case 'request': - return BasicValidation.validateExperimentStatusChangedMessageRequest(obj); - case 'response': - return BasicValidation.validateExperimentStatusChangedMessageResponse(obj); - default: - return BasicValidation.validateExperimentStatusChangedMessage(obj); - } -} - -export function isPeerconnection( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validateExperimentStatusChangedMessageRequest(obj) + case "response": + return BasicValidation.validateExperimentStatusChangedMessageResponse(obj) + default: + return BasicValidation.validateExperimentStatusChangedMessage(obj) + } +} + +export function isPeerconnection( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is Peerconnection { - switch (type) { - case 'request': - return BasicValidation.validatePeerconnectionRequest(obj); - case 'response': - return BasicValidation.validatePeerconnectionResponse(obj); - default: - return BasicValidation.validatePeerconnection(obj); - } -} - -export function isPeerconnectionClosedEventCallback< - T extends 'request' | 'response' | 'all' = 'all', ->( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', + switch (type) { + case "request": + return BasicValidation.validatePeerconnectionRequest(obj) + case "response": + return BasicValidation.validatePeerconnectionResponse(obj) + default: + return BasicValidation.validatePeerconnection(obj) + } +} + +export function isPeerconnectionClosedEventCallback( + obj: unknown, type: "request" | "response" | "all" | T = "all" ): obj is PeerconnectionClosedEventCallback { - switch (type) { - case 'request': - return BasicValidation.validatePeerconnectionClosedEventCallbackRequest(obj); - case 'response': - return BasicValidation.validatePeerconnectionClosedEventCallbackResponse(obj); - default: - return BasicValidation.validatePeerconnectionClosedEventCallback(obj); - } -} - -export function isPeerconnectionStatusChangedEventCallback< - T extends 'request' | 'response' | 'all' = 'all', ->( - obj: unknown, - type: 'request' | 'response' | 'all' | T = 'all', -): obj is PeerconnectionStatusChangedEventCallback { - switch (type) { - case 'request': - return BasicValidation.validatePeerconnectionStatusChangedEventCallbackRequest(obj); - case 'response': - return BasicValidation.validatePeerconnectionStatusChangedEventCallbackResponse( - obj, - ); - default: - return BasicValidation.validatePeerconnectionStatusChangedEventCallback(obj); - } + switch (type) { + case "request": + return BasicValidation.validatePeerconnectionClosedEventCallbackRequest(obj) + case "response": + return BasicValidation.validatePeerconnectionClosedEventCallbackResponse(obj) + default: + return BasicValidation.validatePeerconnectionClosedEventCallback(obj) + } } + +export function isPeerconnectionStatusChangedEventCallback( + obj: unknown, type: "request" | "response" | "all" | T = "all" +): obj is PeerconnectionStatusChangedEventCallback { + switch (type) { + case "request": + return BasicValidation.validatePeerconnectionStatusChangedEventCallbackRequest(obj) + case "response": + return BasicValidation.validatePeerconnectionStatusChangedEventCallbackResponse(obj) + default: + return BasicValidation.validatePeerconnectionStatusChangedEventCallback(obj) + } +} \ No newline at end of file diff --git a/services/booking/src/common/src/hacks.ts b/services/booking/src/common/src/hacks.ts new file mode 100644 index 00000000..a81017b4 --- /dev/null +++ b/services/booking/src/common/src/hacks.ts @@ -0,0 +1,24 @@ +export function hackURLWithPort(u: string | URL): string { + if (typeof (u) == "string") { + u = new URL(u); + } + + if (u.hostname == "localhost") { + let portstring = u.port + if (portstring === "") { + switch (u.protocol) { + case "http": + portstring = "80" + break; + case "https": + portstring = "443" + break; + default: + throw new Error("Unknow protocol " + u.protocol + " - can not derive port"); + } + } + + return u.protocol + "//" + u.hostname + ":" + portstring + u.pathname + u.search; + } + return u.toString() +} \ No newline at end of file diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index ebe5b938..c08f9c1c 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -6,6 +6,7 @@ import { BelongsToUs, clients } from '@crosslab/booking-service-common'; import dayjs from 'dayjs'; import lodash from 'lodash'; import * as mysql from 'mysql2/promise'; +import { hackURLWithPort } from '@crosslab/booking-service-common'; import { config } from '../config.js'; import { @@ -326,7 +327,7 @@ export const postSchedule: postScheduleSignature = async (request, body) => { } let freeCombined = timetableAnd(...free); response.push({ - Device: body.Experiment.Devices[device].ID, + Device: hackURLWithPort(body.Experiment.Devices[device].ID), Booked: timetableNot(freeCombined, dayjs(body.Time.Start), dayjs(body.Time.End)), Free: freeCombined, }); From ded206b9048226f568f11e38d12fdb5eb0ddd163 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 4 Sep 2024 16:15:56 +0200 Subject: [PATCH 70/79] Fixed hack --- services/booking/src/common/src/hacks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/booking/src/common/src/hacks.ts b/services/booking/src/common/src/hacks.ts index a81017b4..a5b74e1a 100644 --- a/services/booking/src/common/src/hacks.ts +++ b/services/booking/src/common/src/hacks.ts @@ -7,10 +7,10 @@ export function hackURLWithPort(u: string | URL): string { let portstring = u.port if (portstring === "") { switch (u.protocol) { - case "http": + case "http:": portstring = "80" break; - case "https": + case "https:": portstring = "443" break; default: From 1473fe6c832cb4d4d25ce5c5df6255cf066d16c8 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 4 Sep 2024 16:30:45 +0200 Subject: [PATCH 71/79] Added hack --- services/booking/src/common/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/services/booking/src/common/src/index.ts b/services/booking/src/common/src/index.ts index 4a2fb1f1..ecdeb0ac 100644 --- a/services/booking/src/common/src/index.ts +++ b/services/booking/src/common/src/index.ts @@ -1,4 +1,5 @@ export * from './auth.js'; export * from './config.js'; export * from './sleep.js'; +export * from './hacks.js'; export * from './clients/index.js'; From 7349a69031a94077838513598ce3ca926c179836 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 4 Sep 2024 17:40:06 +0200 Subject: [PATCH 72/79] Fixed 'undefinded' --- services/booking/src/schedule-service/src/operations/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index c08f9c1c..223e0507 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -102,10 +102,8 @@ export const postSchedule: postScheduleSignature = async (request, body) => { if (r.type === 'device') { realDevices[device].push(r.url); } else if (r.type === 'cloud instantiable' || r.type === 'edge instantiable') { - // For now, just add free time realDevices[device].push(r.url); timetables[device].push([]); - continue; } else { // group for (let i = 0; i < r.devices.length; i++) { From 555a0f48e2854413bd0800ef7e4d737159608385 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Thu, 5 Sep 2024 07:14:22 +0000 Subject: [PATCH 73/79] Fixed schedule server for edge device --- .../schedule-service/src/operations/index.ts | 5 +- .../src/operations/operations_test.ts | 59 +++++++++++++++++++ .../booking/src/test_common/src/fakeserver.ts | 24 ++++++++ 3 files changed, 84 insertions(+), 4 deletions(-) diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index 223e0507..b07055a5 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -99,11 +99,8 @@ export const postSchedule: postScheduleSignature = async (request, body) => { }; } - if (r.type === 'device') { + if (r.type === 'device'|| r.type === 'cloud instantiable' || r.type === 'edge instantiable') { realDevices[device].push(r.url); - } else if (r.type === 'cloud instantiable' || r.type === 'edge instantiable') { - realDevices[device].push(r.url); - timetables[device].push([]); } else { // group for (let i = 0; i < r.devices.length; i++) { diff --git a/services/booking/src/schedule-service/src/operations/operations_test.ts b/services/booking/src/schedule-service/src/operations/operations_test.ts index bd24aeee..3190e256 100644 --- a/services/booking/src/schedule-service/src/operations/operations_test.ts +++ b/services/booking/src/schedule-service/src/operations/operations_test.ts @@ -452,6 +452,65 @@ mocha.describe('operations.ts', function () { } }); + mocha.it('postBookingSchedule (edge device no availability)', async function () { + let r = await postSchedule(getFakeRequest(), { + Experiment: { + Devices: [ + { + ID: 'http://localhost:10801/devices/00000000-0000-1111-0000-000000000000', + }, + ], + }, + Combined: false, + Time: { Start: '1999-06-25T00:00:00Z', End: '1999-06-28T23:59:59Z' }, + onlyOwn: undefined, + }); + if (r.status !== 200) { + if(r.status === 500){ + throw Error('Response error: ' + r.status + ' Message:' + r.body); + } + throw Error('Response error: ' + r.status); + } + if (r.body.length != 1) { + throw Error('Body has wrong length, should 1, is ' + r.body.length); + } + + if ( + r.body[0].Device !== + 'http://localhost:10801/devices/00000000-0000-1111-0000-000000000000' + ) { + throw Error('Device is ' + r.body[0].Device); + } + + if (r.body[0].Booked.length !== 0) { + console.log(r.body[0].Booked); + throw Error('Device ' + 0 + ' Booked has length ' + r.body[0].Booked.length); + } + + if (r.body[0].Free.length !== 1) { + console.log(r.body[0].Free); + throw Error('Device ' + 0 + ' Free has length ' + r.body[0].Free.length); + } + + if (!dayjs(r.body[0].Free[0].Start).isSame(dayjs('1999-06-25T00:00:00Z'))) { + throw Error( + 'Device ' + + 0 + + ' Free.Start is wrong, should 1999-06-25T00:00:00Z is ' + + r.body[0].Free[0].Start, + ); + } + + if (!dayjs(r.body[0].Free[0].End).isSame(dayjs('1999-06-28T23:59:59Z'))) { + throw Error( + 'Device ' + + 0 + + ' Free.End is wrong, should 1999-06-28T23:59:59Z is ' + + r.body[0].Free[0].End, + ); + } + }); + mocha.it('postBookingSchedule (remote error case)', async function () { this.timeout(10000); diff --git a/services/booking/src/test_common/src/fakeserver.ts b/services/booking/src/test_common/src/fakeserver.ts index 5aa647f5..c5705a77 100644 --- a/services/booking/src/test_common/src/fakeserver.ts +++ b/services/booking/src/test_common/src/fakeserver.ts @@ -204,6 +204,30 @@ export async function startFakeServer() { } }); + app.get('/devices/00000000-0000-1111-0000-000000000000', (_req, res) => { + switch (fakeServerConfig.device_service_status) { + case 200: + res.send( + '{"url": "http://localhost:10801/devices/00000000-0000-1111-0000-000000000000", "type": "edge instantiable", "name": "JS Device 1", "description": "A test device", "isPublic": true, "codeUrl": "http://localhost/cloud_instantiable_device", "owner": [{"url": "http://localhost:80/users/69d03aff-1a7f-41de-8b66-0902bdc0886f"}], "viewer": []}' + ); + return; + case 404: + res.status(404).send(); + return; + case 500: + res.status(500).send(); + return; + case 503: + res.status(503).send(); + return; + default: + res + .status(fakeServerConfig.device_service_status) + .send('Undefined error' + fakeServerConfig.device_service_status); + return; + } + }); + app.post('/test_callbacks/test-local-single', (_req, res) => { fakeServerConfig.callback_test_local_single_was_called = true; res.status(200).send(); From e84d2ad66110ea255d87fc24942b83f0331ab56e Mon Sep 17 00:00:00 2001 From: Pierre Helbing Date: Thu, 5 Sep 2024 09:51:11 +0000 Subject: [PATCH 74/79] fix unavailable instantiated devices --- services/device/src/operations/devices/device/post.ts | 7 ++++--- services/experiment/src/methods/experimentStatus/book.ts | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/services/device/src/operations/devices/device/post.ts b/services/device/src/operations/devices/device/post.ts index b88827e4..f69d6da2 100644 --- a/services/device/src/operations/devices/device/post.ts +++ b/services/device/src/operations/devices/device/post.ts @@ -46,9 +46,10 @@ export const postDevicesByDeviceId: postDevicesByDeviceIdSignature = async ( type: 'device', }); - concreteDeviceModel = (await repositories.device.save( - concreteDeviceModel, - )) as ConcreteDeviceModel; + concreteDeviceModel = (await repositories.device.save({ + ...concreteDeviceModel, + availabilityRules: [{ available: true }], + })) as ConcreteDeviceModel; await req.authorization.relate( `user:${req.authorization.user}`, diff --git a/services/experiment/src/methods/experimentStatus/book.ts b/services/experiment/src/methods/experimentStatus/book.ts index 962c72ec..ee07f32c 100644 --- a/services/experiment/src/methods/experimentStatus/book.ts +++ b/services/experiment/src/methods/experimentStatus/book.ts @@ -70,7 +70,10 @@ export async function bookExperiment(experimentModel: ExperimentModel) { for (let i = 0; i < 10; i++) { const updatedBooking = await clients.booking.frontend.getBooking(booking.BookingID); - if (updatedBooking.Booking.Status === 'booked') resolve(); + if (updatedBooking.Booking.Status === 'booked') { + resolve(); + break; + } await new Promise(resolve => setTimeout(resolve, 1000)); } From 380200ea46d7a55fd06343ae0984ca3ad16dabd8 Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 6 Sep 2024 11:01:23 +0200 Subject: [PATCH 75/79] Cleaned up messages * Removed DEBUG messages * All errors are now reported on stderr --- .../src/booking-backend/src/amqpHandle.ts | 17 +++++------ .../src/integrationtest_helper_amqp.ts | 6 ++-- .../src/booking-backend/src/internal.ts | 20 ++++++------- .../src/messageDefinition_test.ts | 2 +- .../indextest_helper_amqp_booking.ts | 6 ++-- .../operations/indextest_helper_amqp_free.ts | 6 ++-- services/booking/src/common/src/auth.ts | 7 ----- services/booking/src/common/src/config.ts | 2 +- .../src/device-reservation/src/mainLoop.ts | 12 ++++---- .../schedule-service/src/operations/index.ts | 30 ++++++------------- 10 files changed, 44 insertions(+), 64 deletions(-) diff --git a/services/booking/src/booking-backend/src/amqpHandle.ts b/services/booking/src/booking-backend/src/amqpHandle.ts index 6b344967..8e05b4c0 100644 --- a/services/booking/src/booking-backend/src/amqpHandle.ts +++ b/services/booking/src/booking-backend/src/amqpHandle.ts @@ -11,7 +11,6 @@ import { DeviceBookingRequest } from './messageDefinition.js'; export async function handleFreeDeviceRequest(): Promise { // freeDevice - console.log('handleFreeDeviceRequest started'); while (true) { try { let connection = await amqplib.connect(config.AmqpUrl); @@ -38,11 +37,11 @@ export async function handleFreeDeviceRequest(): Promise { try { data = BigInt(msg.content.toString()); } catch (error) { - console.log('Can not parse message:', error); + console.error('Can not parse message:', error); try { channel.ack(msg); } catch (error) { - console.log('Can not ack message:', error); + console.error('Can not ack message:', error); } continue; } @@ -50,12 +49,12 @@ export async function handleFreeDeviceRequest(): Promise { await freeDevice(data); channel.ack(msg); } catch (err) { - console.log('Error freeing device:' + err); + console.error('Error freeing device:' + err); channel.ack(msg); } } } catch (err) { - console.log(err); + console.error('Got uncaught error in handleFreeDeviceRequest:', err); console.log('Reconnecting...'); await sleep(1000); } @@ -90,11 +89,11 @@ export async function handleDeviceReservationRequest(): Promise { try { data = DeviceBookingRequest.fromString(msg.content.toString()); } catch (error) { - console.log('Can not parse message:', error); + console.error('Can not parse message:', error); try { channel.ack(msg); } catch (error) { - console.log('Can not ack message:', error); + console.error('Can not ack message:', error); } continue; } @@ -102,12 +101,12 @@ export async function handleDeviceReservationRequest(): Promise { await reservateDevice(data); channel.ack(msg); } catch (err) { - console.log('Error reservating device:' + err); + console.error('Error reservating device:' + err); channel.nack(msg); } } } catch (err) { - console.log(err); + console.error('Got uncaught error in handleFreeDeviceRequest:', err); console.log('Reconnecting...'); await sleep(1000); } diff --git a/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts b/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts index 539398af..5f6c66a8 100644 --- a/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts +++ b/services/booking/src/booking-backend/src/integrationtest_helper_amqp.ts @@ -37,11 +37,11 @@ async function helperLoop(): Promise { try { data = BigInt(msg.content.toString()); } catch (error) { - console.log('Can not parse message:', error); + console.error('Can not parse message:', error); try { channel.ack(msg); } catch (error) { - console.log('Can not ack message:', error); + console.error('Can not ack message:', error); } continue; } @@ -56,7 +56,7 @@ async function helperLoop(): Promise { TestAMQPresults.set(data, 1); channel.ack(msg); } catch (err) { - console.log('Error at helperLoop: ' + err); + console.error('Error at helperLoop:', err); } } } diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index 50508500..dc7b3dae 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -296,9 +296,9 @@ export async function dispatchCallback(bookingID: bigint) { } } catch (err) { // Something went wrong here - just continue for now - console.log( + console.error( 'error', - 'Unknown error in dispatchCallback: ' + (err as Error).toString(), + 'Unknown error in dispatchCallback:', err, ); continue; } @@ -440,9 +440,9 @@ export async function reservateDevice(r: DeviceBookingRequest) { onlyOwn: true, }); } catch (e) { - console.log( - 'Error while getting schedule in reservateDevice (using next device): ' + - (e as Error).toString(), + console.error( + 'Error while getting schedule in reservateDevice (using next device):', + e, ); continue; } @@ -527,7 +527,7 @@ export async function reservateDevice(r: DeviceBookingRequest) { } continue; } catch (err) { - console.log(err); + console.error('Unknown error while booking device:', err); continue; } finally { if (channel !== undefined) { @@ -599,7 +599,7 @@ export async function reservateDevice(r: DeviceBookingRequest) { continue; break; default: - console.log( + console.error( 'Unknown API response for getBookingManageByID:', getReturn.Booking.Status, ); @@ -815,9 +815,9 @@ export async function DeleteBooking( } } catch (err) { // Don't jump out here, since some devices might already be freed - console.log( - 'Got error while cancelling booking, devices might not be freed: ' + - (err as Error).toString(), + console.error( + 'Got error while cancelling booking, devices might not be freed:', + err, ); } finally { await channel.close(); diff --git a/services/booking/src/booking-backend/src/messageDefinition_test.ts b/services/booking/src/booking-backend/src/messageDefinition_test.ts index 6a680b2b..41e08c8c 100644 --- a/services/booking/src/booking-backend/src/messageDefinition_test.ts +++ b/services/booking/src/booking-backend/src/messageDefinition_test.ts @@ -92,7 +92,7 @@ mocha.describe('messageDefinition.ts', function () { try { DeviceBookingRequest.fromString(bad[i]); } catch (err) { - // console.log(err); + console.log(err); fail = true; } if (!fail) { diff --git a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_booking.ts b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_booking.ts index 3e6e0d41..6e0c2315 100644 --- a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_booking.ts +++ b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_booking.ts @@ -44,11 +44,11 @@ async function helperLoop(): Promise { message = DeviceBookingRequest.fromString(data); } catch (error) { - console.log('Can not parse message:', error); + console.error('Can not parse message:', error); try { channel.ack(msg); } catch (error) { - console.log('Can not ack message:', error); + console.error('Can not ack message:', error); } continue; } @@ -60,7 +60,7 @@ async function helperLoop(): Promise { TestAMQPresultsBooking.set(key, 1); channel.ack(msg); } catch (err) { - console.log('Error at helperLoop: ' + err); + console.error('Error at helperLoop: ' + err); } } } diff --git a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts index 8d72c296..421e9ee3 100644 --- a/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts +++ b/services/booking/src/booking-frontend/src/operations/indextest_helper_amqp_free.ts @@ -36,11 +36,11 @@ async function helperLoop(): Promise { try { data = BigInt(msg.content.toString()); } catch (error) { - console.log('Can not parse message:', error); + console.error('Can not parse message:', error); try { channel.ack(msg); } catch (error) { - console.log('Can not ack message:', error); + console.error('Can not ack message:', error); } continue; } @@ -55,7 +55,7 @@ async function helperLoop(): Promise { TestAMQPresults.set(data, 1); channel.ack(msg); } catch (err) { - console.log('Error at helperLoop: ' + err); + console.error('Error at helperLoop: ' + err); } } } diff --git a/services/booking/src/common/src/auth.ts b/services/booking/src/common/src/auth.ts index 72c21968..a0d3bf22 100644 --- a/services/booking/src/common/src/auth.ts +++ b/services/booking/src/common/src/auth.ts @@ -22,13 +22,6 @@ function convertInstitutionPrefix(): void { export function BelongsToUs(url: URL): boolean { convertInstitutionPrefix(); for (let i = 0; i < institutePrefixURL.length; i++) { - console.log( - 'DEBUG:', - url.toString(), - url.hostname, - institutePrefixURL[i].toString(), - institutePrefixURL[i].hostname, - ); if (url.hostname == institutePrefixURL[i].hostname) { return true; } diff --git a/services/booking/src/common/src/config.ts b/services/booking/src/common/src/config.ts index 34d4f873..d26df98e 100644 --- a/services/booking/src/common/src/config.ts +++ b/services/booking/src/common/src/config.ts @@ -1,5 +1,5 @@ export function die(reason: string): never { - console.error(reason); + console.error('Died because of', reason); process.exit(1); } diff --git a/services/booking/src/device-reservation/src/mainLoop.ts b/services/booking/src/device-reservation/src/mainLoop.ts index 019c1b72..a775dcb3 100644 --- a/services/booking/src/device-reservation/src/mainLoop.ts +++ b/services/booking/src/device-reservation/src/mainLoop.ts @@ -47,11 +47,11 @@ export async function mainLoop(): Promise { try { data = ReservationMessage.fromString(msg.content.toString()); } catch (error) { - console.log('Can not parse message:', error); + console.error('Can not parse message:', error); try { channel.ack(msg); } catch (error) { - console.log('Can not ack message:', error); + console.error('Can not ack message:', error); } continue; } @@ -306,7 +306,7 @@ export async function mainLoop(): Promise { break; } } catch (error) { - console.log('Can not process request: ' + error); + console.error('Can not process request: ' + error); // Do not jump out here, always send an answer to caller answer = { Type: data.Type, @@ -330,7 +330,7 @@ export async function mainLoop(): Promise { channel.sendToQueue(data.AnswerQueue, Buffer.from(JSON.stringify(answer))); channel.ack(msg); } catch (error) { - console.log('Can not ack message:', error); + console.error('Can not ack message:', error); } } catch (error) { try { @@ -349,14 +349,14 @@ export async function mainLoop(): Promise { channel.sendToQueue(data.AnswerQueue, Buffer.from(JSON.stringify(answer))); channel.ack(msg); } catch (e) { - console.log('Can not ack message:', e); + console.error('Can not ack message:', e); } } finally { release(); } } } catch (err) { - console.log(err); + console.error('Uncaught error in mainLoop:', err); console.log('Reconnecting...'); await sleep(1000); } diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index b07055a5..f66f4059 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -54,11 +54,11 @@ export const postSchedule: postScheduleSignature = async (request, body) => { flat_group: true, }); } catch (error) { - console.log( + console.error( 'Error while getting device ' + body.Experiment.Devices[device].ID + - ' :' + - (error as Error).toString(), + ' :', + error, ); const err = error as UnsuccessfulRequestError; // Bad status code @@ -82,7 +82,6 @@ export const postSchedule: postScheduleSignature = async (request, body) => { }; } - console.log('ANY ERROR device'); // any other error throw err; } @@ -114,13 +113,6 @@ export const postSchedule: postScheduleSignature = async (request, body) => { // Get timetable let d: URL = new URL(realDevices[device][i]); - console.log( - 'DEBUG:', - d.toString(), - body.Experiment.Devices[device].ID, - BelongsToUs(d), - JSON.stringify(config.InstitutePrefix), - ); let t: Timeslot[] = []; if (!BelongsToUs(d)) { // This is not our device @@ -180,8 +172,8 @@ export const postSchedule: postScheduleSignature = async (request, body) => { try { req = await lr[3]; } catch (error) { - console.log( - 'Error while getting schedule for ' + k + ' :' + (error as Error).toString(), + console.error( + 'Error while getting schedule for ' + k + ' :', error ); const err = error as UnsuccessfulRequestError; if (err.response !== undefined && err.response.status !== undefined) { @@ -196,7 +188,6 @@ export const postSchedule: postScheduleSignature = async (request, body) => { body: 'Institution ' + k + ' returned status code ' + err.response.status, }; } - console.log('ANY ERROR lr'); throw err; } if (req.length != lr[2]!.Experiment.Devices.length) { @@ -250,13 +241,13 @@ export const postSchedule: postScheduleSignature = async (request, body) => { try { a = await availability[device][i]; } catch (error) { - console.log( + console.error( 'Error while availability for ' + device + ' ' + i + - ' :' + - (error as Error).toString(), + ' :', + error, ); const err = error as UnsuccessfulRequestError; if (err.response !== undefined && err.response.status !== undefined) { @@ -279,7 +270,6 @@ export const postSchedule: postScheduleSignature = async (request, body) => { err.response.status, }; } - console.log('ANY ERROR availability'); throw err; } if (a.type == 'group') { @@ -297,8 +287,6 @@ export const postSchedule: postScheduleSignature = async (request, body) => { startTime: body.Time.Start, endTime: body.Time.End, }); - console.log('DEBUG:', JSON.stringify(a.announcedAvailability)); - console.log('DEBUG:', JSON.stringify(announcedAvailability)); available = timetableAnd( announcedAvailability!.map(e => { return { Start: e.start!, End: e.end! }; @@ -312,7 +300,7 @@ export const postSchedule: postScheduleSignature = async (request, body) => { ); let notFree: Timeslot[] = timetableAnd(notAvailable, timetables[device][i]); - console.log( + console.error( JSON.stringify( timetableNot(notFree, dayjs(body.Time.Start), dayjs(body.Time.End)), ), From b61849ce4988b2c31e0e363820e54425f3abee1a Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Fri, 6 Sep 2024 11:10:43 +0200 Subject: [PATCH 76/79] Removed logger since it is no longer needed --- .../booking/src/booking-backend/src/index.ts | 4 +-- .../src/booking-backend/src/internal.ts | 1 - .../booking/src/booking-frontend/src/index.ts | 4 +-- .../booking-frontend/src/operations/index.ts | 29 +++++-------------- .../booking/src/schedule-service/src/index.ts | 4 +-- 5 files changed, 11 insertions(+), 31 deletions(-) diff --git a/services/booking/src/booking-backend/src/index.ts b/services/booking/src/booking-backend/src/index.ts index 947d10d7..a1ab5c86 100644 --- a/services/booking/src/booking-backend/src/index.ts +++ b/services/booking/src/booking-backend/src/index.ts @@ -1,17 +1,15 @@ -import { authorization, error, logging } from '@crosslab/service-common'; +import { authorization, error } from '@crosslab/service-common'; import express, { Application, ErrorRequestHandler, RequestHandler } from 'express'; import { handleDeviceReservationRequest, handleFreeDeviceRequest } from './amqpHandle.js'; import { config } from './config.js'; import { app } from './generated/index.js'; -logging.init(); app.initService({ preHandlers: [ (application: Application) => { application.use(express.json()); application.use(express.urlencoded({ extended: false })); - application.use(logging.middleware() as RequestHandler); application.use(authorization.middleware() as RequestHandler); }, ], diff --git a/services/booking/src/booking-backend/src/internal.ts b/services/booking/src/booking-backend/src/internal.ts index dc7b3dae..6999946a 100644 --- a/services/booking/src/booking-backend/src/internal.ts +++ b/services/booking/src/booking-backend/src/internal.ts @@ -15,7 +15,6 @@ import * as mysql from 'mysql2/promise'; import { config } from './config.js'; import { DeviceBookingRequest } from './messageDefinition.js'; -import { logger } from '@crosslab/service-common'; dayjs.extend(isSameOrBefore); dayjs.extend(isSameOrAfter); diff --git a/services/booking/src/booking-frontend/src/index.ts b/services/booking/src/booking-frontend/src/index.ts index 3e74f00d..ad66a6cf 100644 --- a/services/booking/src/booking-frontend/src/index.ts +++ b/services/booking/src/booking-frontend/src/index.ts @@ -1,16 +1,14 @@ -import { authorization, error, logging } from '@crosslab/service-common'; +import { authorization, error } from '@crosslab/service-common'; import express from 'express'; import { config } from './config.js'; import { app } from './generated/index.js'; -logging.init(); app.initService({ preHandlers: [ application => { application.use(express.json()); application.use(express.urlencoded({ extended: false })); - application.use(logging.middleware() as express.RequestHandler); application.use(authorization.middleware() as express.RequestHandler); }, ], diff --git a/services/booking/src/booking-frontend/src/operations/index.ts b/services/booking/src/booking-frontend/src/operations/index.ts index f565ddaa..d843bfa1 100644 --- a/services/booking/src/booking-frontend/src/operations/index.ts +++ b/services/booking/src/booking-frontend/src/operations/index.ts @@ -1,6 +1,5 @@ import { BelongsToUs, sleep } from '@crosslab/booking-service-common'; import { DeviceBookingRequest } from '@crosslab/service-booking-backend'; -import { logger } from '@crosslab/service-common/logging'; import * as amqplib from 'amqplib'; import dayjs from 'dayjs'; import * as mysql from 'mysql2/promise'; @@ -70,18 +69,6 @@ export const postBooking: postBookingSignature = async (request, body) => { // Send devices to backend for (let i = 0; i < body.Devices.length; i++) { - logger.log( - 'info', - JSON.stringify( - new DeviceBookingRequest( - bookingID, - new URL(body.Devices[i].ID), - i, - dayjs(body.Time.Start), - dayjs(body.Time.End), - ), - ), - ); let s = JSON.stringify( new DeviceBookingRequest( bookingID, @@ -107,7 +94,7 @@ export const postBooking: postBookingSignature = async (request, body) => { } catch (err) { await db.rollback(); - logger.log('error', 'Error creating booking: ' + (err as Error).toString()); + console.error('error', 'Error creating booking: ' + (err as Error).toString()); return { status: 500, @@ -193,7 +180,7 @@ export const getBookingByID: getBookingByIDSignature = async (request, parameter } catch (err) { await db.rollback(); db.end(); - logger.log('error', 'Error getting Booking by ID: ' + (err as Error).toString()); + console.error('error', 'Error getting Booking by ID: ' + (err as Error).toString()); return { status: 500, @@ -224,10 +211,10 @@ export const deleteBookingByID: deleteBookingByIDSignature = async ( let [code, err] = await commonRemoveBooking(requestID); if (err != '') { - logger.log('error', 'Error deleting booking by ID: ' + err); + console.error('error', 'Error deleting booking by ID: ' + err); } if (code != 200) { - logger.log('warn', 'Delete booking by ID returned not 200: ' + code); + console.error('warn', 'Delete booking by ID returned not 200: ' + code); } // Typescript seems to have problems to infer body correctly with case 500. @@ -389,7 +376,7 @@ export const patchBookingByID: patchBookingByIDSignature = async ( success = true; } catch (err) { - logger.log('error', 'Error patching booking in DB: ' + (err as Error).toString()); + console.error('error', 'Error patching booking in DB: ' + (err as Error).toString()); return { status: 500, body: err.toString(), @@ -431,10 +418,10 @@ export const deleteBookingByIDDestroy: deleteBookingByIDDestroySignature = async let [code, err] = await commonRemoveBooking(requestID); if (err != '') { - logger.log('error', 'Error deleting booking by ID destroying signature: ' + err); + console.error('error', 'Error deleting booking by ID destroying signature: ' + err); } if (code != 200) { - logger.log( + console.error( 'warn', 'Delete booking by ID destroying signature returned not 200: ' + code, ); @@ -539,7 +526,7 @@ async function commonRemoveBooking( success = true; } catch (err) { - logger.log('error', 'Error commonRemoveBooking: ' + (err as Error).toString()); + console.error('error', 'Error commonRemoveBooking: ' + (err as Error).toString()); return [500, err.toString()]; } finally { if (success) { diff --git a/services/booking/src/schedule-service/src/index.ts b/services/booking/src/schedule-service/src/index.ts index 51ae5c03..e40e7bb2 100644 --- a/services/booking/src/schedule-service/src/index.ts +++ b/services/booking/src/schedule-service/src/index.ts @@ -1,16 +1,14 @@ -import { authorization, error, logging } from '@crosslab/service-common'; +import { authorization, error } from '@crosslab/service-common'; import express, { ErrorRequestHandler, RequestHandler } from 'express'; import { config } from './config.js'; import { app } from './generated/index.js'; -logging.init(); app.initService({ preHandlers: [ application => { application.use(express.json()); application.use(express.urlencoded({ extended: false })); - application.use(logging.middleware() as RequestHandler); application.use(authorization.middleware() as RequestHandler); }, ], From 2ca41a5a9ee77532806d6c92a37cbc1978561e1b Mon Sep 17 00:00:00 2001 From: Marcus Soll Date: Wed, 9 Oct 2024 11:35:12 +0000 Subject: [PATCH 77/79] Started fixing tests schedule-service still has open tests since the fake of availability is not implemented yet. --- .../templates/service-client/client.ts.njk | 22 +- helper/python-test-helper/setup.cfg | 2 +- .../src/operations/index_test.ts | 21 - .../src/clients/booking-backend/client.ts | 33 +- .../src/clients/booking-frontend/client.ts | 35 +- .../src/clients/device/basicValidation.cjs | 163686 ++++++++++++++- .../src/clients/device/basicValidation.d.cts | 1109 +- .../src/common/src/clients/device/client.ts | 2735 +- .../src/clients/device/requestValidation.ts | 1623 +- .../common/src/clients/device/signatures.ts | 1309 +- .../src/common/src/clients/device/types.ts | 7340 +- .../src/clients/schedule-service/client.ts | 23 +- .../src/device-reservation/package-lock.json | 11 +- .../schedule-service/src/operations/index.ts | 11 +- .../src/operations/operations_test.ts | 1 + .../booking/src/test_common/src/fakeserver.ts | 27 +- .../src/clients/authentication/client.ts | 23 +- services/device/src/clients/device/client.ts | 23 +- .../device/src/clients/federation/client.ts | 23 +- .../src/clients/booking-backend/client.ts | 23 +- .../src/clients/booking-frontend/client.ts | 23 +- .../experiment/src/clients/device/client.ts | 23 +- .../src/clients/schedule-service/client.ts | 23 +- .../lti/src/clients/authentication/client.ts | 20 +- services/lti/src/clients/experiment/client.ts | 20 +- 25 files changed, 171019 insertions(+), 7170 deletions(-) diff --git a/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk b/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk index 86b5ced4..89b7e2be 100644 --- a/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk +++ b/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk @@ -133,23 +133,9 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { - if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!(url).startsWith(baseUrl)) - throw new InvalidUrlError(`Provided url "${url}" does not start with the provided base url "${baseUrl}"`); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError(`Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`); - - return pathParameters; +function validateUrl(url: string, endpoint: string): string[] { + if (!isValidHttpUrl(url)) throw new InvalidUrlError('Provided url is not a valid http url') + return parsePathParameters(url, endpoint) } /** @@ -473,7 +459,7 @@ export class Client { const urlSuffix = '{{ operation.path | replace(r/{.*?}/g, "{}") }}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) const [{{ operation.path | replace(r/(.*?{(.*?)})(\/\w*)*/g, "$2,") }}] = - {{- "" }} validateUrl(new URL(url).toString(), this.baseUrl, '{{ operation.path | replace(r/{.*?}/g, "{}") }}') + {{- "" }} validateUrl(new URL(url).toString(), '{{ operation.path | replace(r/{.*?}/g, "{}") }}') {%- else %} const url = appendToUrl( {{ "options?.url ?? " if optionalUrl }}this.baseUrl, diff --git a/helper/python-test-helper/setup.cfg b/helper/python-test-helper/setup.cfg index e03b324b..f10f9494 100644 --- a/helper/python-test-helper/setup.cfg +++ b/helper/python-test-helper/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = test_helper -version = 0.0.0+dev.ce78fa35 +version = 0.0.0+dev.e84d2ad6 author = Johannes Nau author_email = johannes.nau@tu-ilmenau.de description = Helper Project used in python tests diff --git a/services/booking/src/booking-backend/src/operations/index_test.ts b/services/booking/src/booking-backend/src/operations/index_test.ts index f90b3ab9..eb3e0adf 100644 --- a/services/booking/src/booking-backend/src/operations/index_test.ts +++ b/services/booking/src/booking-backend/src/operations/index_test.ts @@ -513,27 +513,6 @@ mocha.describe('operations.ts', function () { } }); - mocha.it('postBookingCallbackByID no authorization', async function () { - let isError = false; - try { - await postBookingCallbackByID( - getFakeRequest({ user: 'badActor', isAuthorized: false }), - { ID: '' }, - ); - await sleep(250); - } catch (err) { - if ((err as Error).message == 'test authorization failed') { - isError = true; - } else { - console.log((err as Error).message); - throw err; - } - } - if (!isError) { - throw new Error('no access violation detected'); - } - }); - mocha.it('postBookingCallbackByID success', async function () { await postBookingCallbackByID(getFakeRequest(), { ID: '1' }); await sleep(250); diff --git a/services/booking/src/common/src/clients/booking-backend/client.ts b/services/booking/src/common/src/clients/booking-backend/client.ts index f54a62e0..beb793aa 100644 --- a/services/booking/src/common/src/clients/booking-backend/client.ts +++ b/services/booking/src/common/src/clients/booking-backend/client.ts @@ -127,27 +127,10 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { +function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError( - `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, - ); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError( - `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, - ); - - return pathParameters; + throw new InvalidUrlError('Provided url is not a valid http url'); + return parsePathParameters(url, endpoint); } /** @@ -248,7 +231,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}/lock'); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}/lock'); console.log('trying to fetch url:', url); const parameters = { @@ -321,7 +304,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}/lock'); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}/lock'); console.log('trying to fetch url:', url); const parameters = { @@ -394,11 +377,7 @@ export class Client { ): Promise { const urlSuffix = '/booking_callback/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/booking_callback/{}', - ); + const [ID] = validateUrl(new URL(url).toString(), '/booking_callback/{}'); console.log('trying to fetch url:', url); const parameters = { diff --git a/services/booking/src/common/src/clients/booking-frontend/client.ts b/services/booking/src/common/src/clients/booking-frontend/client.ts index 65e60847..d1071f36 100644 --- a/services/booking/src/common/src/clients/booking-frontend/client.ts +++ b/services/booking/src/common/src/clients/booking-frontend/client.ts @@ -127,27 +127,10 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { +function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError( - `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, - ); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError( - `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, - ); - - return pathParameters; + throw new InvalidUrlError('Provided url is not a valid http url'); + return parsePathParameters(url, endpoint); } /** @@ -353,7 +336,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -429,7 +412,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -502,7 +485,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -575,11 +558,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/destroy'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/booking/{}/destroy', - ); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}/destroy'); console.log('trying to fetch url:', url); const parameters = { diff --git a/services/booking/src/common/src/clients/device/basicValidation.cjs b/services/booking/src/common/src/clients/device/basicValidation.cjs index 5ee086d4..c1a37652 100644 --- a/services/booking/src/common/src/clients/device/basicValidation.cjs +++ b/services/booking/src/common/src/clients/device/basicValidation.cjs @@ -5,4 +5,163688 @@ * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, * and run openapi-codegeneration to regenerate this file. */ -"use strict";exports.validateAuthenticationMessage = validate21;const schema6 = {"title":"Authentication Message","allOf":[{"title":"Message","type":"object","properties":{"messageType":{"type":"string"}},"required":["messageType"],"additionalProperties":true,"x-typeguard":true},{"type":"object","properties":{"messageType":{"const":"authenticate"},"token":{"type":"string"},"authenticated":{"type":"boolean"}},"required":["messageType"]}],"x-typeguard":true,"x-standalone":true,"x-name":"AuthenticationMessage","x-location":"#/components/schemas/authentication_message","x-schema-type":"all"};function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;if(errors === _errs0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.messageType === undefined) && (missing0 = "messageType")){validate21.errors = [{instancePath,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'",schema:schema6.allOf[0].required,parentSchema:schema6.allOf[0],data}];return false;}else {if(data.messageType !== undefined){let data0 = data.messageType;if(typeof data0 !== "string"){validate21.errors = [{instancePath:instancePath+"/messageType",schemaPath:"#/allOf/0/properties/messageType/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema6.allOf[0].properties.messageType.type,parentSchema:schema6.allOf[0].properties.messageType,data:data0}];return false;}}}}else {validate21.errors = [{instancePath,schemaPath:"#/allOf/0/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema6.allOf[0].type,parentSchema:schema6.allOf[0],data}];return false;}}var valid0 = _errs0 === errors;if(valid0){const _errs5 = errors;if(errors === _errs5){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.messageType === undefined) && (missing1 = "messageType")){validate21.errors = [{instancePath,schemaPath:"#/allOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'",schema:schema6.allOf[1].required,parentSchema:schema6.allOf[1],data}];return false;}else {if(data.messageType !== undefined){let data1 = data.messageType;const _errs7 = errors;if("authenticate" !== data1){validate21.errors = [{instancePath:instancePath+"/messageType",schemaPath:"#/allOf/1/properties/messageType/const",keyword:"const",params:{allowedValue: "authenticate"},message:"must be equal to constant",schema:"authenticate",parentSchema:schema6.allOf[1].properties.messageType,data:data1}];return false;}var valid2 = _errs7 === errors;}else {var valid2 = true;}if(valid2){if(data.token !== undefined){let data2 = data.token;const _errs8 = errors;if(typeof data2 !== "string"){validate21.errors = [{instancePath:instancePath+"/token",schemaPath:"#/allOf/1/properties/token/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema6.allOf[1].properties.token.type,parentSchema:schema6.allOf[1].properties.token,data:data2}];return false;}var valid2 = _errs8 === errors;}else {var valid2 = true;}if(valid2){if(data.authenticated !== undefined){let data3 = data.authenticated;const _errs10 = errors;if(typeof data3 !== "boolean"){validate21.errors = [{instancePath:instancePath+"/authenticated",schemaPath:"#/allOf/1/properties/authenticated/type",keyword:"type",params:{type: "boolean"},message:"must be boolean",schema:schema6.allOf[1].properties.authenticated.type,parentSchema:schema6.allOf[1].properties.authenticated,data:data3}];return false;}var valid2 = _errs10 === errors;}else {var valid2 = true;}}}}}else {validate21.errors = [{instancePath,schemaPath:"#/allOf/1/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema6.allOf[1].type,parentSchema:schema6.allOf[1],data}];return false;}}var valid0 = _errs5 === errors;}validate21.errors = vErrors;return errors === 0;}exports.validateConnectionStateChangedMessage = validate22;const schema7 = {"title":"Connection State Changed Message","allOf":[{"title":"Message","type":"object","properties":{"messageType":{"type":"string"}},"required":["messageType"],"additionalProperties":true,"x-typeguard":true},{"type":"object","properties":{"messageType":{"const":"connection-state-changed"},"connectionUrl":{"type":"string","format":"uri"},"status":{"title":"Connection Status","type":"string","description":"The status of the peerconnection.","enum":["new","connecting","connected","disconnected","failed","closed"]}},"required":["connectionUrl","status"]}],"x-typeguard":true,"x-standalone":true,"x-name":"ConnectionStateChangedMessage","x-location":"#/components/schemas/connection_state_changed_message","x-schema-type":"all"};const formats0 = require("ajv-formats/dist/formats").fullFormats.uri;function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;if(errors === _errs0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.messageType === undefined) && (missing0 = "messageType")){validate22.errors = [{instancePath,schemaPath:"#/allOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'",schema:schema7.allOf[0].required,parentSchema:schema7.allOf[0],data}];return false;}else {if(data.messageType !== undefined){let data0 = data.messageType;if(typeof data0 !== "string"){validate22.errors = [{instancePath:instancePath+"/messageType",schemaPath:"#/allOf/0/properties/messageType/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema7.allOf[0].properties.messageType.type,parentSchema:schema7.allOf[0].properties.messageType,data:data0}];return false;}}}}else {validate22.errors = [{instancePath,schemaPath:"#/allOf/0/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema7.allOf[0].type,parentSchema:schema7.allOf[0],data}];return false;}}var valid0 = _errs0 === errors;if(valid0){const _errs5 = errors;if(errors === _errs5){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if(((data.connectionUrl === undefined) && (missing1 = "connectionUrl")) || ((data.status === undefined) && (missing1 = "status"))){validate22.errors = [{instancePath,schemaPath:"#/allOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'",schema:schema7.allOf[1].required,parentSchema:schema7.allOf[1],data}];return false;}else {if(data.messageType !== undefined){let data1 = data.messageType;const _errs7 = errors;if("connection-state-changed" !== data1){validate22.errors = [{instancePath:instancePath+"/messageType",schemaPath:"#/allOf/1/properties/messageType/const",keyword:"const",params:{allowedValue: "connection-state-changed"},message:"must be equal to constant",schema:"connection-state-changed",parentSchema:schema7.allOf[1].properties.messageType,data:data1}];return false;}var valid2 = _errs7 === errors;}else {var valid2 = true;}if(valid2){if(data.connectionUrl !== undefined){let data2 = data.connectionUrl;const _errs8 = errors;if(errors === _errs8){if(errors === _errs8){if(typeof data2 === "string"){if(!(formats0(data2))){validate22.errors = [{instancePath:instancePath+"/connectionUrl",schemaPath:"#/allOf/1/properties/connectionUrl/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\"",schema:"uri",parentSchema:schema7.allOf[1].properties.connectionUrl,data:data2}];return false;}}else {validate22.errors = [{instancePath:instancePath+"/connectionUrl",schemaPath:"#/allOf/1/properties/connectionUrl/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema7.allOf[1].properties.connectionUrl.type,parentSchema:schema7.allOf[1].properties.connectionUrl,data:data2}];return false;}}}var valid2 = _errs8 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){let data3 = data.status;const _errs10 = errors;if(typeof data3 !== "string"){validate22.errors = [{instancePath:instancePath+"/status",schemaPath:"#/allOf/1/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema7.allOf[1].properties.status.type,parentSchema:schema7.allOf[1].properties.status,data:data3}];return false;}if(!((((((data3 === "new") || (data3 === "connecting")) || (data3 === "connected")) || (data3 === "disconnected")) || (data3 === "failed")) || (data3 === "closed"))){validate22.errors = [{instancePath:instancePath+"/status",schemaPath:"#/allOf/1/properties/status/enum",keyword:"enum",params:{allowedValues: schema7.allOf[1].properties.status.enum},message:"must be equal to one of the allowed values",schema:schema7.allOf[1].properties.status.enum,parentSchema:schema7.allOf[1].properties.status,data:data3}];return false;}var valid2 = _errs10 === errors;}else {var valid2 = true;}}}}}else {validate22.errors = [{instancePath,schemaPath:"#/allOf/1/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema7.allOf[1].type,parentSchema:schema7.allOf[1],data}];return false;}}var valid0 = _errs5 === errors;}validate22.errors = vErrors;return errors === 0;}exports.validateUserReference = validate23;const schema8 = {"title":"User Reference","type":"object","properties":{"url":{"type":"string","description":"URL of the user","format":"uri"}},"required":["url"],"x-standalone":true,"x-name":"UserReference","x-location":"#/components/schemas/user_reference","x-schema-type":"all"};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.url === undefined) && (missing0 = "url")){validate23.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'",schema:schema8.required,parentSchema:schema8,data}];return false;}else {if(data.url !== undefined){let data0 = data.url;const _errs1 = errors;if(errors === _errs1){if(errors === _errs1){if(typeof data0 === "string"){if(!(formats0(data0))){validate23.errors = [{instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\"",schema:"uri",parentSchema:schema8.properties.url,data:data0}];return false;}}else {validate23.errors = [{instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema8.properties.url.type,parentSchema:schema8.properties.url,data:data0}];return false;}}}}}}else {validate23.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema8.type,parentSchema:schema8,data}];return false;}}validate23.errors = vErrors;return errors === 0;}exports.validateDeviceOverview = validate24;const schema9 = {"title":"Device Overview","type":"object","properties":{"url":{"type":"string","description":"URL of the device","format":"uri","readOnly":true},"name":{"type":"string","description":"Name of the device"},"description":{"type":"string","description":"Extended description of the device, features, etc."},"type":{"type":"string","description":"Type of the device","enum":["device","group","edge instantiable","cloud instantiable"]},"isPublic":{"type":"boolean","description":"If true, the device may be seen and used by every user."},"viewer":{"type":"array","description":"List of users who can view the device","items":{"title":"User Reference","type":"object","properties":{"url":{"type":"string","description":"URL of the user","format":"uri"}},"required":["url"]}},"owner":{"type":"array","description":"List of users who own the device","items":{"title":"User Reference","type":"object","properties":{"url":{"type":"string","description":"URL of the user","format":"uri"}},"required":["url"]}}},"required":["url","type","name","isPublic"],"x-typeguard":true,"x-standalone":true,"x-name":"DeviceOverview","x-location":"#/components/schemas/device_overview","x-schema-type":"all"};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.url === undefined) && (missing0 = "url")) || ((data.type === undefined) && (missing0 = "type"))) || ((data.name === undefined) && (missing0 = "name"))) || ((data.isPublic === undefined) && (missing0 = "isPublic"))){validate24.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'",schema:schema9.required,parentSchema:schema9,data}];return false;}else {if(data.url !== undefined){let data0 = data.url;const _errs1 = errors;if(errors === _errs1){if(errors === _errs1){if(typeof data0 === "string"){if(!(formats0(data0))){validate24.errors = [{instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\"",schema:"uri",parentSchema:schema9.properties.url,data:data0}];return false;}}else {validate24.errors = [{instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema9.properties.url.type,parentSchema:schema9.properties.url,data:data0}];return false;}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.name !== undefined){let data1 = data.name;const _errs3 = errors;if(typeof data1 !== "string"){validate24.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema9.properties.name.type,parentSchema:schema9.properties.name,data:data1}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.description !== undefined){let data2 = data.description;const _errs5 = errors;if(typeof data2 !== "string"){validate24.errors = [{instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema9.properties.description.type,parentSchema:schema9.properties.description,data:data2}];return false;}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.type !== undefined){let data3 = data.type;const _errs7 = errors;if(typeof data3 !== "string"){validate24.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema9.properties.type.type,parentSchema:schema9.properties.type,data:data3}];return false;}if(!((((data3 === "device") || (data3 === "group")) || (data3 === "edge instantiable")) || (data3 === "cloud instantiable"))){validate24.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues: schema9.properties.type.enum},message:"must be equal to one of the allowed values",schema:schema9.properties.type.enum,parentSchema:schema9.properties.type,data:data3}];return false;}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.isPublic !== undefined){let data4 = data.isPublic;const _errs9 = errors;if(typeof data4 !== "boolean"){validate24.errors = [{instancePath:instancePath+"/isPublic",schemaPath:"#/properties/isPublic/type",keyword:"type",params:{type: "boolean"},message:"must be boolean",schema:schema9.properties.isPublic.type,parentSchema:schema9.properties.isPublic,data:data4}];return false;}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.viewer !== undefined){let data5 = data.viewer;const _errs11 = errors;if(errors === _errs11){if(Array.isArray(data5)){var valid1 = true;const len0 = data5.length;for(let i0=0; i0 2){validate54.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema39.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate54.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema39.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate56.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema41.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate56.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema41.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate57.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema42.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {if(data8.length < 2){validate57.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema42.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {var valid8 = true;const len0 = data8.length;for(let i0=0; i0 2){validate58.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema43.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {if(data8.length < 2){validate58.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema43.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {var valid8 = true;const len0 = data8.length;for(let i0=0; i0 2){validate80.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema65.items.allOf[1].properties.devices,data:data4}];return false;}else {if(data4.length < 2){validate80.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema65.items.allOf[1].properties.devices,data:data4}];return false;}else {var valid4 = true;const len1 = data4.length;for(let i1=0; i1 2){validate81.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema66.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate81.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema66.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate82.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema67.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate82.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema67.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate83.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema68.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate83.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema68.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate84.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema69.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate84.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema69.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate152.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema137.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate152.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema137.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate153.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema138.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate153.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema138.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate156.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema141.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate156.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema141.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate157.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema142.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate157.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema142.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate158.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema143.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data6}];return false;}else {if(data6.length < 2){validate158.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema143.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data6}];return false;}else {var valid8 = true;const len0 = data6.length;for(let i0=0; i0 2){validate159.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema144.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {if(data8.length < 2){validate159.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema144.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {var valid8 = true;const len0 = data8.length;for(let i0=0; i0 2){validate160.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema145.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data6}];return false;}else {if(data6.length < 2){validate160.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema145.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data6}];return false;}else {var valid8 = true;const len0 = data6.length;for(let i0=0; i0 2){validate161.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema146.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {if(data8.length < 2){validate161.errors = [{instancePath:instancePath+"/peerconnection/devices",schemaPath:"#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema146.allOf[1].properties.peerconnection.allOf[1].properties.devices,data:data8}];return false;}else {var valid8 = true;const len0 = data8.length;for(let i0=0; i0 2){validate204.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema189.items.allOf[1].properties.devices,data:data2}];return false;}else {if(data2.length < 2){validate204.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema189.items.allOf[1].properties.devices,data:data2}];return false;}else {var valid4 = true;const len1 = data2.length;for(let i1=0; i1 2){validate205.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema190.items.allOf[1].properties.devices,data:data4}];return false;}else {if(data4.length < 2){validate205.errors = [{instancePath:instancePath+"/" + i0+"/devices",schemaPath:"#/items/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema190.items.allOf[1].properties.devices,data:data4}];return false;}else {var valid4 = true;const len1 = data4.length;for(let i1=0; i1 2){validate206.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema191.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate206.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema191.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate207.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema192.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate207.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema192.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate208.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema193.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate208.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema193.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate209.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema194.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate209.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema194.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate210.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema195.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate210.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema195.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate211.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema196.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate211.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema196.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2){validate212.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema197.allOf[1].properties.devices,data:data1}];return false;}else {if(data1.length < 2){validate212.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema197.allOf[1].properties.devices,data:data1}];return false;}else {var valid3 = true;const len0 = data1.length;for(let i0=0; i0 2){validate213.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items",schema:2,parentSchema:schema198.allOf[1].properties.devices,data:data3}];return false;}else {if(data3.length < 2){validate213.errors = [{instancePath:instancePath+"/devices",schemaPath:"#/allOf/1/properties/devices/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items",schema:2,parentSchema:schema198.allOf[1].properties.devices,data:data3}];return false;}else {var valid3 = true;const len0 = data3.length;for(let i0=0; i0 2) { + validate54.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema39.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate54.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema39.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate54.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema39.allOf[1].properties.devices.items.required, + parentSchema: schema39.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate54.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema39.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate54.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema39.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema39.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + } + } + } else { + validate54.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema39.allOf[1].properties.devices.items.type, + parentSchema: schema39.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate54.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema39.allOf[1].properties.devices.type, + parentSchema: schema39.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate54.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema39.allOf[1].type, + parentSchema: schema39.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate54.errors = vErrors; + return errors === 0; +} +exports.validateConfiguredDeviceReference = validate55; +const schema40 = { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'ConfiguredDeviceReference', + 'x-location': '#/components/schemas/configured_device_reference', + 'x-schema-type': 'all', +}; +function validate55( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate55.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema40.required, + parentSchema: schema40, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate55.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema40.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate55.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema40.properties.url.type, + parentSchema: schema40.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.config !== undefined) { + let data1 = data.config; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + if (data1.services !== undefined) { + let data2 = data1.services; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len0 = data2.length; + for (let i0 = 0; i0 < len0; i0++) { + let data3 = data2[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.serviceType === undefined && + (missing1 = 'serviceType')) || + (data3.serviceId === undefined && + (missing1 = 'serviceId')) || + (data3.remoteServiceId === undefined && + (missing1 = 'remoteServiceId')) + ) { + validate55.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema40.properties.config.properties.services.items + .required, + parentSchema: + schema40.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.serviceType !== undefined) { + let data4 = data3.serviceType; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate55.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema40.properties.config.properties + .services.items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } else { + validate55.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema40.properties.config.properties.services + .items.properties.serviceType.type, + parentSchema: + schema40.properties.config.properties.services + .items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs10 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.serviceId !== undefined) { + let data5 = data3.serviceId; + const _errs12 = errors; + if (typeof data5 !== 'string') { + validate55.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceId', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema40.properties.config.properties.services + .items.properties.serviceId.type, + parentSchema: + schema40.properties.config.properties.services + .items.properties.serviceId, + data: data5, + }, + ]; + return false; + } + var valid3 = _errs12 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.remoteServiceId !== undefined) { + let data6 = data3.remoteServiceId; + const _errs14 = errors; + if (typeof data6 !== 'string') { + validate55.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema40.properties.config.properties.services + .items.properties.remoteServiceId.type, + parentSchema: + schema40.properties.config.properties.services + .items.properties.remoteServiceId, + data: data6, + }, + ]; + return false; + } + var valid3 = _errs14 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + validate55.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema40.properties.config.properties.services.items + .type, + parentSchema: + schema40.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate55.errors = [ + { + instancePath: instancePath + '/config/services', + schemaPath: '#/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema40.properties.config.properties.services.type, + parentSchema: schema40.properties.config.properties.services, + data: data2, + }, + ]; + return false; + } + } + } + } else { + validate55.errors = [ + { + instancePath: instancePath + '/config', + schemaPath: '#/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema40.properties.config.type, + parentSchema: schema40.properties.config, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate55.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema40.type, + parentSchema: schema40, + data, + }, + ]; + return false; + } + } + validate55.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnection = validate56; +const schema41 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'Peerconnection', + 'x-location': '#/components/schemas/peerconnection', + 'x-schema-type': 'all', +}; +function validate56( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate56.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema41.allOf[0].required, + parentSchema: schema41.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate56.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema41.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema41.allOf[0].properties.url.type, + parentSchema: schema41.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate56.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema41.allOf[0].properties.type.type, + parentSchema: schema41.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate56.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema41.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema41.allOf[0].properties.type.enum, + parentSchema: schema41.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate56.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema41.allOf[0].properties.status.type, + parentSchema: schema41.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate56.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema41.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema41.allOf[0].properties.status.enum, + parentSchema: schema41.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate56.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema41.allOf[0].type, + parentSchema: schema41.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate56.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema41.allOf[1].required, + parentSchema: schema41.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate56.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema41.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate56.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema41.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate56.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema41.allOf[1].properties.devices.items.required, + parentSchema: schema41.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate56.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema41.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate56.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema41.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema41.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema41.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema41.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema41.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema41.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema41.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema41.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId.type, + parentSchema: + schema41.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema41.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema41.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema41.allOf[1].properties.devices + .items.properties.config + .properties.services.items.type, + parentSchema: + schema41.allOf[1].properties.devices + .items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate56.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema41.allOf[1].properties.devices.items + .properties.config.properties.services + .type, + parentSchema: + schema41.allOf[1].properties.devices.items + .properties.config.properties.services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate56.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema41.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema41.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema41.allOf[1].properties.devices.items.type, + parentSchema: schema41.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate56.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema41.allOf[1].properties.devices.type, + parentSchema: schema41.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate56.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema41.allOf[1].type, + parentSchema: schema41.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate56.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionClosedEventCallback = validate57; +const schema42 = { + title: 'Peerconnection Closed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-closed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: [ + 'new', + 'connecting', + 'connected', + 'disconnected', + 'failed', + 'closed', + ], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionClosedEventCallback', + 'x-location': '#/components/schemas/peerconnection_closed', + 'x-schema-type': 'all', +}; +function validate57( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema42.allOf[0].allOf[0].required, + parentSchema: schema42.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema42.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema42.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.allOf[0].allOf[0].type, + parentSchema: schema42.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema42.allOf[0].allOf[1].required, + parentSchema: schema42.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema42.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema42.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate57.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema42.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema42.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema42.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema42.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema42.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.allOf[0].allOf[1].type, + parentSchema: schema42.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema42.allOf[1].required, + parentSchema: schema42.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema42.allOf[1].properties.eventType.type, + parentSchema: schema42.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-closed')) { + validate57.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema42.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema42.allOf[1].properties.eventType.enum, + parentSchema: schema42.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.url === undefined && (missing3 = 'url')) || + (data4.type === undefined && (missing3 = 'type')) || + (data4.status === undefined && (missing3 = 'status')) + ) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema42.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.url.type, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid6 = _errs18 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.type !== undefined) { + let data6 = data4.type; + const _errs20 = errors; + if (typeof data6 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'local' || data6 === 'webrtc')) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + var valid6 = _errs20 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.status !== undefined) { + let data7 = data4.status; + const _errs22 = errors; + if (typeof data7 !== 'string') { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.status.type, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'new' || + data7 === 'connecting' || + data7 === 'connected' || + data7 === 'disconnected' || + data7 === 'failed' || + data7 === 'closed' + ) + ) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + var valid6 = _errs22 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema42.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs24 = errors; + if (errors === _errs24) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema42.allOf[1].properties.peerconnection.allOf[1].required, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data8 = data4.devices; + const _errs26 = errors; + if (errors === _errs26) { + if (Array.isArray(data8)) { + if (data8.length > 2) { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + if (data8.length < 2) { + validate57.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data8.length; + for (let i0 = 0; i0 < len0; i0++) { + let data9 = data8[i0]; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing5; + if (data9.url === undefined && (missing5 = 'url')) { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema42.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema42.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs30 = errors; + if (errors === _errs30) { + if (errors === _errs30) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + var valid9 = _errs30 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data9.config !== undefined) { + let data11 = data9.config; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + if (data11.services !== undefined) { + let data12 = data11.services; + const _errs34 = errors; + if (errors === _errs34) { + if (Array.isArray(data12)) { + var valid11 = true; + const len1 = data12.length; + for (let i1 = 0; i1 < len1; i1++) { + let data13 = data12[i1]; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == 'object' && + !Array.isArray(data13) + ) { + let missing6; + if ( + (data13.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data13.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data13.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema42.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema42.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } else { + if ( + data13.serviceType !== + undefined + ) { + let data14 = + data13.serviceType; + const _errs39 = errors; + if (errors === _errs39) { + if ( + errors === _errs39 + ) { + if ( + typeof data14 === + 'string' + ) { + if ( + !formats0(data14) + ) { + validate57.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate57.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.serviceId !== + undefined + ) { + let data15 = + data13.serviceId; + const _errs41 = errors; + if ( + typeof data15 !== + 'string' + ) { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid12 = + _errs41 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.remoteServiceId !== + undefined + ) { + let data16 = + data13.remoteServiceId; + const _errs43 = + errors; + if ( + typeof data16 !== + 'string' + ) { + validate57.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema42 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data16, + }, + ]; + return false; + } + var valid12 = + _errs43 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema42.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema42.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } + } + var valid11 = _errs36 === errors; + if (!valid11) { + break; + } + } + } else { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data12, + }, + ]; + return false; + } + } + } + } else { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema42.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data11, + }, + ]; + return false; + } + } + var valid9 = _errs32 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate57.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema42.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema42.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } + } + var valid8 = _errs28 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema42.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } + } + } + } + } else { + validate57.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema42.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs24 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate57.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema42.allOf[1].type, + parentSchema: schema42.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate57.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionStatusChangedEventCallback = validate58; +const schema43 = { + title: 'Peerconnection Status Changed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-status-changed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: [ + 'new', + 'connecting', + 'connected', + 'disconnected', + 'failed', + 'closed', + ], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionStatusChangedEventCallback', + 'x-location': '#/components/schemas/peerconnection_status_changed', + 'x-schema-type': 'all', +}; +function validate58( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema43.allOf[0].allOf[0].required, + parentSchema: schema43.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema43.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema43.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.allOf[0].allOf[0].type, + parentSchema: schema43.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema43.allOf[0].allOf[1].required, + parentSchema: schema43.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema43.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema43.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate58.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema43.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema43.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema43.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema43.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema43.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.allOf[0].allOf[1].type, + parentSchema: schema43.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema43.allOf[1].required, + parentSchema: schema43.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema43.allOf[1].properties.eventType.type, + parentSchema: schema43.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-status-changed')) { + validate58.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema43.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema43.allOf[1].properties.eventType.enum, + parentSchema: schema43.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.url === undefined && (missing3 = 'url')) || + (data4.type === undefined && (missing3 = 'type')) || + (data4.status === undefined && (missing3 = 'status')) + ) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema43.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.url.type, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid6 = _errs18 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.type !== undefined) { + let data6 = data4.type; + const _errs20 = errors; + if (typeof data6 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'local' || data6 === 'webrtc')) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + var valid6 = _errs20 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.status !== undefined) { + let data7 = data4.status; + const _errs22 = errors; + if (typeof data7 !== 'string') { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.status.type, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'new' || + data7 === 'connecting' || + data7 === 'connected' || + data7 === 'disconnected' || + data7 === 'failed' || + data7 === 'closed' + ) + ) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + var valid6 = _errs22 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema43.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs24 = errors; + if (errors === _errs24) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema43.allOf[1].properties.peerconnection.allOf[1].required, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data8 = data4.devices; + const _errs26 = errors; + if (errors === _errs26) { + if (Array.isArray(data8)) { + if (data8.length > 2) { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + if (data8.length < 2) { + validate58.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data8.length; + for (let i0 = 0; i0 < len0; i0++) { + let data9 = data8[i0]; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing5; + if (data9.url === undefined && (missing5 = 'url')) { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema43.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema43.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs30 = errors; + if (errors === _errs30) { + if (errors === _errs30) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + var valid9 = _errs30 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data9.config !== undefined) { + let data11 = data9.config; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + if (data11.services !== undefined) { + let data12 = data11.services; + const _errs34 = errors; + if (errors === _errs34) { + if (Array.isArray(data12)) { + var valid11 = true; + const len1 = data12.length; + for (let i1 = 0; i1 < len1; i1++) { + let data13 = data12[i1]; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == 'object' && + !Array.isArray(data13) + ) { + let missing6; + if ( + (data13.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data13.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data13.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema43.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema43.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } else { + if ( + data13.serviceType !== + undefined + ) { + let data14 = + data13.serviceType; + const _errs39 = errors; + if (errors === _errs39) { + if ( + errors === _errs39 + ) { + if ( + typeof data14 === + 'string' + ) { + if ( + !formats0(data14) + ) { + validate58.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate58.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.serviceId !== + undefined + ) { + let data15 = + data13.serviceId; + const _errs41 = errors; + if ( + typeof data15 !== + 'string' + ) { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid12 = + _errs41 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.remoteServiceId !== + undefined + ) { + let data16 = + data13.remoteServiceId; + const _errs43 = + errors; + if ( + typeof data16 !== + 'string' + ) { + validate58.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema43 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data16, + }, + ]; + return false; + } + var valid12 = + _errs43 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema43.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema43.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } + } + var valid11 = _errs36 === errors; + if (!valid11) { + break; + } + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data12, + }, + ]; + return false; + } + } + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema43.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data11, + }, + ]; + return false; + } + } + var valid9 = _errs32 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate58.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema43.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema43.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } + } + var valid8 = _errs28 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema43.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } + } + } + } + } else { + validate58.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema43.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs24 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate58.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema43.allOf[1].type, + parentSchema: schema43.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate58.errors = vErrors; + return errors === 0; +} +exports.validateChangedUrl = validate59; +const schema44 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ChangedUrl', + 'x-location': '#/components/parameters/device_changed_url/schema', + 'x-schema-type': 'all', +}; +function validate59( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate59.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema44, + data, + }, + ]; + return false; + } + } else { + validate59.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema44.type, + parentSchema: schema44, + data, + }, + ]; + return false; + } + } + } + validate59.errors = vErrors; + return errors === 0; +} +exports.validateDeviceId = validate60; +const schema45 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'DeviceId', + 'x-location': '#/components/parameters/device_id/schema', + 'x-schema-type': 'all', +}; +const formats258 = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +function validate60( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate60.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema45, + data, + }, + ]; + return false; + } + } else { + validate60.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema45.type, + parentSchema: schema45, + data, + }, + ]; + return false; + } + } + } + validate60.errors = vErrors; + return errors === 0; +} +exports.validateFlatGroup = validate61; +const schema46 = { + type: 'boolean', + default: false, + 'x-standalone': false, + 'x-name': 'FlatGroup', + 'x-location': '#/components/parameters/flat_group/schema', + 'x-schema-type': 'all', +}; +function validate61( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'boolean') { + validate61.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema46.type, + parentSchema: schema46, + data, + }, + ]; + return false; + } + validate61.errors = vErrors; + return errors === 0; +} +exports.validateStartTime = validate62; +const schema47 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'StartTime', + 'x-location': '#/components/parameters/start_time/schema', + 'x-schema-type': 'all', +}; +function validate62( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate62.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema47, + data, + }, + ]; + return false; + } + } else { + validate62.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema47.type, + parentSchema: schema47, + data, + }, + ]; + return false; + } + } + } + validate62.errors = vErrors; + return errors === 0; +} +exports.validateEndTime = validate63; +const schema48 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'EndTime', + 'x-location': '#/components/parameters/end_time/schema', + 'x-schema-type': 'all', +}; +function validate63( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate63.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema48, + data, + }, + ]; + return false; + } + } else { + validate63.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema48.type, + parentSchema: schema48, + data, + }, + ]; + return false; + } + } + } + validate63.errors = vErrors; + return errors === 0; +} +exports.validateClosedUrl = validate64; +const schema49 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ClosedUrl', + 'x-location': '#/components/parameters/closed_url/schema', + 'x-schema-type': 'all', +}; +function validate64( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate64.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema49, + data, + }, + ]; + return false; + } + } else { + validate64.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema49.type, + parentSchema: schema49, + data, + }, + ]; + return false; + } + } + } + validate64.errors = vErrors; + return errors === 0; +} +exports.validateStatusChangedUrl = validate65; +const schema50 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'StatusChangedUrl', + 'x-location': '#/components/parameters/status_changed_url/schema', + 'x-schema-type': 'all', +}; +function validate65( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate65.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema50, + data, + }, + ]; + return false; + } + } else { + validate65.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema50.type, + parentSchema: schema50, + data, + }, + ]; + return false; + } + } + } + validate65.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionId = validate66; +const schema51 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'PeerconnectionId', + 'x-location': '#/components/parameters/peerconnection_id/schema', + 'x-schema-type': 'all', +}; +function validate66( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate66.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema51, + data, + }, + ]; + return false; + } + } else { + validate66.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema51.type, + parentSchema: schema51, + data, + }, + ]; + return false; + } + } + } + validate66.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUrl = validate67; +const schema52 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'DeviceUrl', + 'x-location': '#/components/parameters/device_url/schema', + 'x-schema-type': 'all', +}; +function validate67( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate67.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema52, + data, + }, + ]; + return false; + } + } else { + validate67.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema52.type, + parentSchema: schema52, + data, + }, + ]; + return false; + } + } + } + validate67.errors = vErrors; + return errors === 0; +} +exports.validateListDevicesResponse200 = validate68; +const schema53 = { + type: 'array', + items: { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + 'x-standalone': false, + 'x-name': 'listDevicesResponse200', + 'x-location': '#/paths//devices/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate68( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.url === undefined && (missing0 = 'url')) || + (data0.type === undefined && (missing0 = 'type')) || + (data0.name === undefined && (missing0 = 'name')) || + (data0.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema53.items.required, + parentSchema: schema53.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema53.items.properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema53.items.properties.url.type, + parentSchema: schema53.items.properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.name !== undefined) { + let data2 = data0.name; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/name', + schemaPath: '#/items/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema53.items.properties.name.type, + parentSchema: schema53.items.properties.name, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.description !== undefined) { + let data3 = data0.description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/description', + schemaPath: '#/items/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema53.items.properties.description.type, + parentSchema: schema53.items.properties.description, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.type !== undefined) { + let data4 = data0.type; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema53.items.properties.type.type, + parentSchema: schema53.items.properties.type, + data: data4, + }, + ]; + return false; + } + if ( + !( + data4 === 'device' || + data4 === 'group' || + data4 === 'edge instantiable' || + data4 === 'cloud instantiable' + ) + ) { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema53.items.properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema53.items.properties.type.enum, + parentSchema: schema53.items.properties.type, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.isPublic !== undefined) { + let data5 = data0.isPublic; + const _errs11 = errors; + if (typeof data5 !== 'boolean') { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/isPublic', + schemaPath: '#/items/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema53.items.properties.isPublic.type, + parentSchema: schema53.items.properties.isPublic, + data: data5, + }, + ]; + return false; + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.viewer !== undefined) { + let data6 = data0.viewer; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid2 = true; + const len1 = data6.length; + for (let i1 = 0; i1 < len1; i1++) { + let data7 = data6[i1]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing1; + if (data7.url === undefined && (missing1 = 'url')) { + validate68.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: + '#/items/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + + missing1 + + "'", + schema: + schema53.items.properties.viewer.items + .required, + parentSchema: + schema53.items.properties.viewer.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate68.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema53.items.properties.viewer + .items.properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate68.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema53.items.properties.viewer.items + .properties.url.type, + parentSchema: + schema53.items.properties.viewer.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } + } + } + } + } else { + validate68.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: + '#/items/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema53.items.properties.viewer.items.type, + parentSchema: + schema53.items.properties.viewer.items, + data: data7, + }, + ]; + return false; + } + } + var valid2 = _errs15 === errors; + if (!valid2) { + break; + } + } + } else { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/viewer', + schemaPath: '#/items/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema53.items.properties.viewer.type, + parentSchema: schema53.items.properties.viewer, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.owner !== undefined) { + let data9 = data0.owner; + const _errs19 = errors; + if (errors === _errs19) { + if (Array.isArray(data9)) { + var valid4 = true; + const len2 = data9.length; + for (let i2 = 0; i2 < len2; i2++) { + let data10 = data9[i2]; + const _errs21 = errors; + if (errors === _errs21) { + if ( + data10 && + typeof data10 == 'object' && + !Array.isArray(data10) + ) { + let missing2; + if ( + data10.url === undefined && + (missing2 = 'url') + ) { + validate68.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: + '#/items/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema53.items.properties.owner.items + .required, + parentSchema: + schema53.items.properties.owner.items, + data: data10, + }, + ]; + return false; + } else { + if (data10.url !== undefined) { + let data11 = data10.url; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate68.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema53.items.properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } else { + validate68.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema53.items.properties.owner + .items.properties.url.type, + parentSchema: + schema53.items.properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } + } + } + } + } else { + validate68.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: + '#/items/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema53.items.properties.owner.items.type, + parentSchema: + schema53.items.properties.owner.items, + data: data10, + }, + ]; + return false; + } + } + var valid4 = _errs21 === errors; + if (!valid4) { + break; + } + } + } else { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0 + '/owner', + schemaPath: '#/items/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema53.items.properties.owner.type, + parentSchema: schema53.items.properties.owner, + data: data9, + }, + ]; + return false; + } + } + var valid1 = _errs19 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate68.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema53.items.type, + parentSchema: schema53.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate68.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema53.type, + parentSchema: schema53, + data, + }, + ]; + return false; + } + } + validate68.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceBody = validate69; +const schema54 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceBody', + 'x-location': '#/paths//devices/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate69( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema54.anyOf[0].allOf[0].required, + parentSchema: schema54.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema54.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema54.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema54.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema54.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema54.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema54.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema54.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema54.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema54.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema54.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema54.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema54.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema54.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[0].allOf[0].type, + parentSchema: schema54.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema54.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema54.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema54.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema54.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[0].allOf[1].type, + parentSchema: schema54.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema54.anyOf[1].allOf[0].required, + parentSchema: schema54.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema54.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema54.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema54.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema54.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema54.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema54.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema54.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema54.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema54.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema54.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema54.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema54.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema54.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[1].allOf[0].type, + parentSchema: schema54.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema54.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema54.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema54.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema54.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema54.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema54.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema54.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema54.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema54.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[1].allOf[1].type, + parentSchema: schema54.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema54.anyOf[2].allOf[0].required, + parentSchema: schema54.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema54.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema54.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema54.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema54.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema54.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema54.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema54.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema54.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema54.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema54.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema54.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema54.anyOf[2].allOf[0].properties.owner.items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema54.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[2].allOf[0].type, + parentSchema: schema54.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema54.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema54.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema54.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema54.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema54.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema54.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[2].allOf[1].type, + parentSchema: schema54.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema54.anyOf[3].allOf[0].required, + parentSchema: schema54.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema54.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema54.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema54.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema54.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema54.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema54.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema54.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema54.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema54.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema54.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema54.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema54.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema54.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema54.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema54.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema54.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema54.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema54.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema54.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema54.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema54.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema54.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[3].allOf[0].type, + parentSchema: schema54.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema54.anyOf[3].allOf[1].required, + parentSchema: schema54.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema54.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema54.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema54.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema54.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema54.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema54.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema54.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema54.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema54.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema54.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema54.anyOf[3].allOf[1].type, + parentSchema: schema54.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema54.anyOf, + parentSchema: schema54, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate69.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate69.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceResponse201 = validate70; +const schema55 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceResponse201', + 'x-location': '#/paths//devices/post/responses/201/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate70( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema55.anyOf[0].allOf[0].required, + parentSchema: schema55.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema55.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema55.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema55.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema55.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema55.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema55.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema55.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema55.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema55.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema55.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema55.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[0].allOf[0].type, + parentSchema: schema55.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema55.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema55.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema55.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema55.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[0].allOf[1].type, + parentSchema: schema55.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema55.anyOf[1].allOf[0].required, + parentSchema: schema55.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema55.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema55.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema55.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema55.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema55.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema55.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema55.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema55.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema55.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema55.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema55.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[1].allOf[0].type, + parentSchema: schema55.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema55.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema55.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema55.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema55.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema55.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema55.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema55.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema55.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema55.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[1].allOf[1].type, + parentSchema: schema55.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema55.anyOf[2].allOf[0].required, + parentSchema: schema55.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema55.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema55.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema55.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema55.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema55.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema55.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema55.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema55.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema55.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema55.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema55.anyOf[2].allOf[0].properties.owner.items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[2].allOf[0].type, + parentSchema: schema55.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema55.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema55.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema55.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema55.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema55.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema55.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[2].allOf[1].type, + parentSchema: schema55.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema55.anyOf[3].allOf[0].required, + parentSchema: schema55.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema55.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema55.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema55.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema55.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema55.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema55.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema55.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema55.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema55.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema55.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema55.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema55.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema55.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema55.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema55.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema55.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[3].allOf[0].type, + parentSchema: schema55.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema55.anyOf[3].allOf[1].required, + parentSchema: schema55.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema55.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema55.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema55.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema55.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema55.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema55.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema55.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema55.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema55.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema55.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema55.anyOf[3].allOf[1].type, + parentSchema: schema55.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema55.anyOf, + parentSchema: schema55, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate70.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate70.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceResponse200 = validate71; +const schema56 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getDeviceResponse200', + 'x-location': + '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate71( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema56.anyOf[0].allOf[0].required, + parentSchema: schema56.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema56.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema56.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema56.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema56.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema56.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema56.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema56.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema56.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema56.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema56.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema56.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[0].allOf[0].type, + parentSchema: schema56.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema56.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema56.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema56.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema56.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[0].allOf[1].type, + parentSchema: schema56.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema56.anyOf[1].allOf[0].required, + parentSchema: schema56.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema56.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema56.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema56.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema56.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema56.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema56.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema56.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema56.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema56.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema56.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema56.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[1].allOf[0].type, + parentSchema: schema56.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema56.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema56.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema56.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema56.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema56.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema56.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema56.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema56.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema56.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[1].allOf[1].type, + parentSchema: schema56.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema56.anyOf[2].allOf[0].required, + parentSchema: schema56.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema56.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema56.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema56.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema56.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema56.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema56.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema56.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema56.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema56.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema56.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema56.anyOf[2].allOf[0].properties.owner.items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[2].allOf[0].type, + parentSchema: schema56.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema56.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema56.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema56.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema56.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema56.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema56.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[2].allOf[1].type, + parentSchema: schema56.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema56.anyOf[3].allOf[0].required, + parentSchema: schema56.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema56.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema56.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema56.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema56.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema56.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema56.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema56.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema56.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema56.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema56.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema56.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema56.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema56.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema56.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema56.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema56.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[3].allOf[0].type, + parentSchema: schema56.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema56.anyOf[3].allOf[1].required, + parentSchema: schema56.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema56.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema56.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema56.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema56.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema56.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema56.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema56.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema56.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema56.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema56.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema56.anyOf[3].allOf[1].type, + parentSchema: schema56.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema56.anyOf, + parentSchema: schema56, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate71.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate71.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceBody = validate72; +const schema57 = { + title: 'Device Update', + anyOf: [ + { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + }, + ], + }, + ], + 'x-standalone': false, + 'x-name': 'updateDeviceBody', + 'x-location': + '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate72( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema57.anyOf[0].allOf[0].required, + parentSchema: schema57.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema57.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema57.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema57.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema57.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema57.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema57.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema57.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema57.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema57.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema57.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema57.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[0].allOf[0].type, + parentSchema: schema57.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema57.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema57.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema57.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema57.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema57.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[0].allOf[1].type, + parentSchema: schema57.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.type === undefined && (missing3 = 'type')) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema57.anyOf[1].allOf[0].required, + parentSchema: schema57.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema57.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema57.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema57.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema57.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema57.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema57.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[1].allOf[0].properties.viewer.items.type, + parentSchema: + schema57.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema57.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema57.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema57.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema57.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[1].allOf[0].type, + parentSchema: schema57.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema57.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema57.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema57.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema57.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema57.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema57.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema57.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[1].allOf[1].type, + parentSchema: schema57.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if (data.type === undefined && (missing6 = 'type')) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema57.anyOf[2].allOf[0].required, + parentSchema: schema57.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema57.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema57.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema57.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema57.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema57.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[2].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema57.anyOf[2].allOf[0].properties.viewer + .items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema57.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema57.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema57.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema57.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema57.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[2].allOf[0].type, + parentSchema: schema57.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema57.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema57.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema57.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema57.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema57.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema57.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema57.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[2].allOf[1].type, + parentSchema: schema57.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.type === undefined && (missing9 = 'type')) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema57.anyOf[3].allOf[0].required, + parentSchema: schema57.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema57.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema57.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema57.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema57.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema57.anyOf[3].allOf[0].properties.viewer.items + .required, + parentSchema: + schema57.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema57.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema57.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema57.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema57.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema57.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema57.anyOf[3].allOf[0].properties.owner.items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[3].allOf[0].properties.owner.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[3].allOf[0].type, + parentSchema: schema57.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err101 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema57.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing12; + if (data63.url === undefined && (missing12 = 'url')) { + const err102 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: + "must have required property '" + missing12 + "'", + schema: + schema57.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema57.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err103 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema57.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + } else { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema57.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema57.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } + } + } + } + } else { + const err105 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema57.anyOf[3].allOf[1].properties.devices.items.type, + parentSchema: + schema57.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema57.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema57.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } else { + const err107 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema57.anyOf[3].allOf[1].type, + parentSchema: schema57.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err108 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema57.anyOf, + parentSchema: schema57, + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + validate72.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate72.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceResponse200 = validate73; +const schema58 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'updateDeviceResponse200', + 'x-location': + '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate73( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema58.anyOf[0].allOf[0].required, + parentSchema: schema58.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema58.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema58.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema58.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema58.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema58.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema58.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema58.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema58.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema58.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema58.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema58.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[0].allOf[0].type, + parentSchema: schema58.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema58.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema58.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema58.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema58.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[0].allOf[1].type, + parentSchema: schema58.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema58.anyOf[1].allOf[0].required, + parentSchema: schema58.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema58.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema58.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema58.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema58.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema58.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema58.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema58.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema58.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema58.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema58.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema58.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[1].allOf[0].type, + parentSchema: schema58.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema58.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema58.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema58.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema58.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema58.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema58.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema58.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema58.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema58.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[1].allOf[1].type, + parentSchema: schema58.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema58.anyOf[2].allOf[0].required, + parentSchema: schema58.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema58.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema58.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema58.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema58.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema58.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema58.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema58.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema58.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema58.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema58.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema58.anyOf[2].allOf[0].properties.owner.items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[2].allOf[0].type, + parentSchema: schema58.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema58.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema58.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema58.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema58.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema58.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema58.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[2].allOf[1].type, + parentSchema: schema58.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema58.anyOf[3].allOf[0].required, + parentSchema: schema58.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema58.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema58.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema58.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema58.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema58.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema58.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema58.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema58.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema58.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema58.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema58.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema58.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema58.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema58.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema58.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema58.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[3].allOf[0].type, + parentSchema: schema58.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema58.anyOf[3].allOf[1].required, + parentSchema: schema58.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema58.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema58.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema58.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema58.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema58.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema58.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema58.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema58.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema58.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema58.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema58.anyOf[3].allOf[1].type, + parentSchema: schema58.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema58.anyOf, + parentSchema: schema58, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate73.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate73.errors = vErrors; + return errors === 0; +} +exports.validateInstantiateDeviceResponse201 = validate74; +const schema59 = { + type: 'object', + properties: { + instance: { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + deviceToken: { type: 'string' }, + }, + required: ['instance', 'deviceToken'], + 'x-standalone': false, + 'x-name': 'instantiateDeviceResponse201', + 'x-location': + '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate74( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.instance === undefined && (missing0 = 'instance')) || + (data.deviceToken === undefined && (missing0 = 'deviceToken')) + ) { + validate74.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema59.required, + parentSchema: schema59, + data, + }, + ]; + return false; + } else { + if (data.instance !== undefined) { + let data0 = data.instance; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.url === undefined && (missing1 = 'url')) || + (data0.type === undefined && (missing1 = 'type')) || + (data0.name === undefined && (missing1 = 'name')) || + (data0.isPublic === undefined && (missing1 = 'isPublic')) + ) { + validate74.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema59.properties.instance.allOf[0].required, + parentSchema: schema59.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate74.errors = [ + { + instancePath: instancePath + '/instance/url', + schemaPath: + '#/properties/instance/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema59.properties.instance.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance/url', + schemaPath: + '#/properties/instance/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[0].properties.url.type, + parentSchema: + schema59.properties.instance.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.name !== undefined) { + let data2 = data0.name; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate74.errors = [ + { + instancePath: instancePath + '/instance/name', + schemaPath: + '#/properties/instance/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[0].properties.name.type, + parentSchema: + schema59.properties.instance.allOf[0].properties.name, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.description !== undefined) { + let data3 = data0.description; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate74.errors = [ + { + instancePath: instancePath + '/instance/description', + schemaPath: + '#/properties/instance/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[0].properties.description + .type, + parentSchema: + schema59.properties.instance.allOf[0].properties + .description, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.type !== undefined) { + let data4 = data0.type; + const _errs10 = errors; + if (typeof data4 !== 'string') { + validate74.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[0].properties.type + .type, + parentSchema: + schema59.properties.instance.allOf[0].properties.type, + data: data4, + }, + ]; + return false; + } + if ( + !( + data4 === 'device' || + data4 === 'group' || + data4 === 'edge instantiable' || + data4 === 'cloud instantiable' + ) + ) { + validate74.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema59.properties.instance.allOf[0].properties.type + .enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema59.properties.instance.allOf[0].properties.type + .enum, + parentSchema: + schema59.properties.instance.allOf[0].properties.type, + data: data4, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.isPublic !== undefined) { + let data5 = data0.isPublic; + const _errs12 = errors; + if (typeof data5 !== 'boolean') { + validate74.errors = [ + { + instancePath: instancePath + '/instance/isPublic', + schemaPath: + '#/properties/instance/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema59.properties.instance.allOf[0].properties + .isPublic.type, + parentSchema: + schema59.properties.instance.allOf[0].properties + .isPublic, + data: data5, + }, + ]; + return false; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.viewer !== undefined) { + let data6 = data0.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data6)) { + var valid3 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if (data7.url === undefined && (missing2 = 'url')) { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema59.properties.instance.allOf[0] + .properties.viewer.items.required, + parentSchema: + schema59.properties.instance.allOf[0] + .properties.viewer.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema59.properties.instance + .allOf[0].properties.viewer + .items.properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance + .allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema59.properties.instance + .allOf[0].properties.viewer.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } + } + } + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema59.properties.instance.allOf[0] + .properties.viewer.items.type, + parentSchema: + schema59.properties.instance.allOf[0] + .properties.viewer.items, + data: data7, + }, + ]; + return false; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance/viewer', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema59.properties.instance.allOf[0].properties + .viewer.type, + parentSchema: + schema59.properties.instance.allOf[0].properties + .viewer, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.owner !== undefined) { + let data9 = data0.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data9)) { + var valid5 = true; + const len1 = data9.length; + for (let i1 = 0; i1 < len1; i1++) { + let data10 = data9[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data10 && + typeof data10 == 'object' && + !Array.isArray(data10) + ) { + let missing3; + if ( + data10.url === undefined && + (missing3 = 'url') + ) { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema59.properties.instance.allOf[0] + .properties.owner.items.required, + parentSchema: + schema59.properties.instance.allOf[0] + .properties.owner.items, + data: data10, + }, + ]; + return false; + } else { + if (data10.url !== undefined) { + let data11 = data10.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema59.properties.instance + .allOf[0].properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance + .allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema59.properties.instance + .allOf[0].properties.owner.items + .properties.url, + data: data11, + }, + ]; + return false; + } + } + } + } + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema59.properties.instance.allOf[0] + .properties.owner.items.type, + parentSchema: + schema59.properties.instance.allOf[0] + .properties.owner.items, + data: data10, + }, + ]; + return false; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance/owner', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema59.properties.instance.allOf[0].properties + .owner.type, + parentSchema: + schema59.properties.instance.allOf[0].properties + .owner, + data: data9, + }, + ]; + return false; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema59.properties.instance.allOf[0].type, + parentSchema: schema59.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.type !== undefined) { + let data12 = data0.type; + const _errs28 = errors; + if ('device' !== data12) { + validate74.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: '#/properties/instance/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: + schema59.properties.instance.allOf[1].properties.type, + data: data12, + }, + ]; + return false; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.connected !== undefined) { + let data13 = data0.connected; + const _errs29 = errors; + if (typeof data13 !== 'boolean') { + validate74.errors = [ + { + instancePath: instancePath + '/instance/connected', + schemaPath: + '#/properties/instance/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema59.properties.instance.allOf[1].properties.connected + .type, + parentSchema: + schema59.properties.instance.allOf[1].properties.connected, + data: data13, + }, + ]; + return false; + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.announcedAvailability !== undefined) { + let data14 = data0.announcedAvailability; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data14)) { + var valid8 = true; + const len2 = data14.length; + for (let i2 = 0; i2 < len2; i2++) { + let data15 = data14[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if ( + data15 && + typeof data15 == 'object' && + !Array.isArray(data15) + ) { + if (data15.start !== undefined) { + let data16 = data15.start; + const _errs35 = errors; + if (errors === _errs35) { + if (errors === _errs35) { + if (typeof data16 === 'string') { + if (!formats22.validate(data16)) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start, + data: data16, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start.type, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start, + data: data16, + }, + ]; + return false; + } + } + } + var valid9 = _errs35 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data15.end !== undefined) { + let data17 = data15.end; + const _errs37 = errors; + if (errors === _errs37) { + if (errors === _errs37) { + if (typeof data17 === 'string') { + if (!formats22.validate(data17)) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability + .items.properties.end, + data: data17, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.end.type, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.end, + data: data17, + }, + ]; + return false; + } + } + } + var valid9 = _errs37 === errors; + } else { + var valid9 = true; + } + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2, + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema59.properties.instance.allOf[1].properties + .announcedAvailability.items.type, + parentSchema: + schema59.properties.instance.allOf[1].properties + .announcedAvailability.items, + data: data15, + }, + ]; + return false; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/announcedAvailability', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema59.properties.instance.allOf[1].properties + .announcedAvailability.type, + parentSchema: + schema59.properties.instance.allOf[1].properties + .announcedAvailability, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.experiment !== undefined) { + let data18 = data0.experiment; + const _errs39 = errors; + if (errors === _errs39) { + if (errors === _errs39) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + validate74.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema59.properties.instance.allOf[1].properties + .experiment, + data: data18, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1].properties + .experiment.type, + parentSchema: + schema59.properties.instance.allOf[1].properties + .experiment, + data: data18, + }, + ]; + return false; + } + } + } + var valid7 = _errs39 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.services !== undefined) { + let data19 = data0.services; + const _errs41 = errors; + if (errors === _errs41) { + if (Array.isArray(data19)) { + var valid10 = true; + const len3 = data19.length; + for (let i3 = 0; i3 < len3; i3++) { + let data20 = data19[i3]; + const _errs43 = errors; + if (errors === _errs43) { + if ( + data20 && + typeof data20 == 'object' && + !Array.isArray(data20) + ) { + if (data20.serviceType !== undefined) { + let data21 = data20.serviceType; + const _errs46 = errors; + if (errors === _errs46) { + if (errors === _errs46) { + if (typeof data21 === 'string') { + if (!formats0(data21)) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema59.properties.instance.allOf[1] + .properties.services.items + .properties.serviceType, + data: data21, + }, + ]; + return false; + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType.type, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType, + data: data21, + }, + ]; + return false; + } + } + } + var valid11 = _errs46 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data20.serviceId !== undefined) { + let data22 = data20.serviceId; + const _errs48 = errors; + if (typeof data22 !== 'string') { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceId', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId.type, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId, + data: data22, + }, + ]; + return false; + } + var valid11 = _errs48 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data20.serviceDirection !== undefined) { + let data23 = data20.serviceDirection; + const _errs50 = errors; + if (typeof data23 !== 'string') { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.type, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data23, + }, + ]; + return false; + } + if ( + !( + data23 === 'consumer' || + data23 === 'producer' || + data23 === 'prosumer' + ) + ) { + validate74.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema59.properties.instance.allOf[1] + .properties.services.items + .properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.enum, + parentSchema: + schema59.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data23, + }, + ]; + return false; + } + var valid11 = _errs50 === errors; + } else { + var valid11 = true; + } + } + } + } else { + validate74.errors = [ + { + instancePath: + instancePath + '/instance/services/' + i3, + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema59.properties.instance.allOf[1].properties + .services.items.type, + parentSchema: + schema59.properties.instance.allOf[1].properties + .services.items, + data: data20, + }, + ]; + return false; + } + } + var valid10 = _errs43 === errors; + if (!valid10) { + break; + } + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance/services', + schemaPath: + '#/properties/instance/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema59.properties.instance.allOf[1].properties + .services.type, + parentSchema: + schema59.properties.instance.allOf[1].properties + .services, + data: data19, + }, + ]; + return false; + } + } + var valid7 = _errs41 === errors; + } else { + var valid7 = true; + } + } + } + } + } + } else { + validate74.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema59.properties.instance.allOf[1].type, + parentSchema: schema59.properties.instance.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs26 === errors; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.deviceToken !== undefined) { + let data24 = data.deviceToken; + const _errs52 = errors; + if (typeof data24 !== 'string') { + validate74.errors = [ + { + instancePath: instancePath + '/deviceToken', + schemaPath: '#/properties/deviceToken/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema59.properties.deviceToken.type, + parentSchema: schema59.properties.deviceToken, + data: data24, + }, + ]; + return false; + } + var valid0 = _errs52 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate74.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema59.type, + parentSchema: schema59, + data, + }, + ]; + return false; + } + } + validate74.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceAvailabilityResponse200 = validate75; +const schema60 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'getDeviceAvailabilityResponse200', + 'x-location': + '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate75( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate75.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema60.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate75.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema60.items.properties.start.type, + parentSchema: schema60.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate75.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema60.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate75.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema60.items.properties.end.type, + parentSchema: schema60.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate75.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema60.items.type, + parentSchema: schema60.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate75.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema60.type, + parentSchema: schema60, + data, + }, + ]; + return false; + } + } + validate75.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesBody = validate76; +const schema61 = { + title: 'Availability Rules', + description: 'The availability rule to be applied.', + type: 'array', + items: { + title: 'Availability Rule', + type: 'object', + allOf: [ + { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + { + type: 'object', + properties: { + available: { type: 'boolean' }, + repeat: { + description: + 'If specified the time slot is repeated in a fixed offset specified by the frequency', + type: 'object', + properties: { + frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, + until: { + description: 'Up to this date-time the time slot will be repeated.', + type: 'string', + format: 'date-time', + }, + count: { + description: 'How often the time slot will be repeated', + type: 'integer', + }, + }, + required: ['frequency'], + }, + }, + }, + ], + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesBody', + 'x-location': + '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate76( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema61.items.type, + parentSchema: schema61.items, + data: data0, + }, + ]; + return false; + } + const _errs3 = errors; + if (errors === _errs3) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema61.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema61.items.allOf[0].properties.start.type, + parentSchema: schema61.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs5 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema61.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema61.items.allOf[0].properties.end.type, + parentSchema: schema61.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + } + } else { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema61.items.allOf[0].type, + parentSchema: schema61.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (valid1) { + const _errs9 = errors; + if (errors === _errs9) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.available !== undefined) { + let data3 = data0.available; + const _errs11 = errors; + if (typeof data3 !== 'boolean') { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/available', + schemaPath: '#/items/allOf/1/properties/available/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema61.items.allOf[1].properties.available.type, + parentSchema: schema61.items.allOf[1].properties.available, + data: data3, + }, + ]; + return false; + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data0.repeat !== undefined) { + let data4 = data0.repeat; + const _errs13 = errors; + if (errors === _errs13) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing0; + if (data4.frequency === undefined && (missing0 = 'frequency')) { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema61.items.allOf[1].properties.repeat.required, + parentSchema: schema61.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } else { + if (data4.frequency !== undefined) { + let data5 = data4.frequency; + const _errs15 = errors; + if (typeof data5 !== 'string') { + validate76.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema61.items.allOf[1].properties.repeat.properties + .frequency.type, + parentSchema: + schema61.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + if ( + !( + data5 === 'HOURLY' || + data5 === 'DAILY' || + data5 === 'WEEKLY' + ) + ) { + validate76.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/enum', + keyword: 'enum', + params: { + allowedValues: + schema61.items.allOf[1].properties.repeat.properties + .frequency.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema61.items.allOf[1].properties.repeat.properties + .frequency.enum, + parentSchema: + schema61.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.until !== undefined) { + let data6 = data4.until; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data6 === 'string') { + if (!formats22.validate(data6)) { + validate76.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema61.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } else { + validate76.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema61.items.allOf[1].properties.repeat + .properties.until.type, + parentSchema: + schema61.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs17 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.count !== undefined) { + let data7 = data4.count; + const _errs19 = errors; + if ( + !( + typeof data7 == 'number' && + !(data7 % 1) && + !isNaN(data7) && + isFinite(data7) + ) + ) { + validate76.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/count', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/count/type', + keyword: 'type', + params: { type: 'integer' }, + message: 'must be integer', + schema: + schema61.items.allOf[1].properties.repeat.properties + .count.type, + parentSchema: + schema61.items.allOf[1].properties.repeat.properties + .count, + data: data7, + }, + ]; + return false; + } + var valid4 = _errs19 === errors; + } else { + var valid4 = true; + } + } + } + } + } else { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema61.items.allOf[1].properties.repeat.type, + parentSchema: schema61.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs13 === errors; + } else { + var valid3 = true; + } + } + } else { + validate76.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema61.items.allOf[1].type, + parentSchema: schema61.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs9 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate76.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema61.type, + parentSchema: schema61, + data, + }, + ]; + return false; + } + } + validate76.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesResponse200 = validate77; +const schema62 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesResponse200', + 'x-location': + '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate77( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate77.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema62.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate77.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema62.items.properties.start.type, + parentSchema: schema62.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate77.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema62.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate77.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema62.items.properties.end.type, + parentSchema: schema62.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate77.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema62.items.type, + parentSchema: schema62.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate77.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema62.type, + parentSchema: schema62, + data, + }, + ]; + return false; + } + } + validate77.errors = vErrors; + return errors === 0; +} +exports.validateCreateWebsocketTokenResponse200 = validate78; +const schema63 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'createWebsocketTokenResponse200', + 'x-location': + '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate78( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate78.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema63.type, + parentSchema: schema63, + data, + }, + ]; + return false; + } + validate78.errors = vErrors; + return errors === 0; +} +exports.validateSendSignalingMessageBody = validate79; +const schema64 = { + title: 'Sig Message', + anyOf: [ + { + title: 'Create Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'createPeerconnection' }, + connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, + connectionUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + type: 'object', + required: ['serviceType', 'serviceId', 'remoteServiceId'], + title: 'Service Config', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + additionalProperties: true, + }, + }, + tiebreaker: { type: 'boolean' }, + config: { type: 'object', additionalProperties: true }, + }, + required: [ + 'command', + 'connectionType', + 'connectionUrl', + 'services', + 'tiebreaker', + ], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Close Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'closePeerconnection' }, + connectionUrl: { type: 'string', format: 'uri' }, + }, + required: ['command', 'connectionUrl'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Signaling Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'signaling' }, + signalingType: { type: 'string' }, + connectionUrl: { type: 'string', format: 'uri' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'signalingType', 'connectionUrl', 'content'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Configuration Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'configuration' }, + configuration: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'configuration'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Experiment Status Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'experiment-status-changed' }, + status: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['messageType', 'status'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-standalone': false, + 'x-name': 'sendSignalingMessageBody', + 'x-location': + '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate79( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + const _errs3 = errors; + if (errors === _errs3) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema64.anyOf[0].allOf[0].allOf[0].required, + parentSchema: schema64.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[0].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema64.anyOf[0].allOf[0].allOf[0].properties.messageType, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } + } else { + const err2 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[0].allOf[0].allOf[0].type, + parentSchema: schema64.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var valid2 = _errs3 === errors; + if (valid2) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + const err3 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema64.anyOf[0].allOf[0].allOf[1].required, + parentSchema: schema64.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs10 = errors; + if ('command' !== data1) { + const err4 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema64.anyOf[0].allOf[0].allOf[1].properties.messageType, + data: data1, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs11 = errors; + if (typeof data2 !== 'string') { + const err5 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[0].allOf[0].allOf[1].properties.command.type, + parentSchema: schema64.anyOf[0].allOf[0].allOf[1].properties.command, + data: data2, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid4 = _errs11 === errors; + } else { + var valid4 = true; + } + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[0].allOf[0].allOf[1].type, + parentSchema: schema64.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var valid2 = _errs8 === errors; + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs13 = errors; + if (errors === _errs13) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionType === undefined && (missing2 = 'connectionType')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || + (data.services === undefined && (missing2 = 'services')) || + (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) + ) { + const err7 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema64.anyOf[0].allOf[1].required, + parentSchema: schema64.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs15 = errors; + if ('createPeerconnection' !== data3) { + const err8 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'createPeerconnection' }, + message: 'must be equal to constant', + schema: 'createPeerconnection', + parentSchema: schema64.anyOf[0].allOf[1].properties.command, + data: data3, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + var valid5 = _errs15 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionType !== undefined) { + let data4 = data.connectionType; + const _errs16 = errors; + if (typeof data4 !== 'string') { + const err9 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[0].allOf[1].properties.connectionType.type, + parentSchema: schema64.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { + const err10 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/enum', + keyword: 'enum', + params: { + allowedValues: + schema64.anyOf[0].allOf[1].properties.connectionType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema64.anyOf[0].allOf[1].properties.connectionType.enum, + parentSchema: schema64.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + var valid5 = _errs16 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionUrl !== undefined) { + let data5 = data.connectionUrl; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + const err11 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema64.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } else { + const err12 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[0].allOf[1].properties.connectionUrl.type, + parentSchema: schema64.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + } + var valid5 = _errs18 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.services !== undefined) { + let data6 = data.services; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data6)) { + var valid6 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing3; + if ( + (data7.serviceType === undefined && + (missing3 = 'serviceType')) || + (data7.serviceId === undefined && + (missing3 = 'serviceId')) || + (data7.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + const err13 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema64.anyOf[0].allOf[1].properties.services.items + .required, + parentSchema: + schema64.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data7.serviceType !== undefined) { + let data8 = data7.serviceType; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + const err14 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.serviceId !== undefined) { + let data9 = data7.serviceId; + const _errs27 = errors; + if (typeof data9 !== 'string') { + const err16 = { + instancePath: + instancePath + '/services/' + i0 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.serviceId, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.remoteServiceId !== undefined) { + let data10 = data7.remoteServiceId; + const _errs29 = errors; + if (typeof data10 !== 'string') { + const err17 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId.type, + parentSchema: + schema64.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + const err18 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema64.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema64.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid6 = _errs22 === errors; + if (!valid6) { + break; + } + } + } else { + const err19 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema64.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema64.anyOf[0].allOf[1].properties.services, + data: data6, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + var valid5 = _errs20 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.tiebreaker !== undefined) { + let data11 = data.tiebreaker; + const _errs31 = errors; + if (typeof data11 !== 'boolean') { + const err20 = { + instancePath: instancePath + '/tiebreaker', + schemaPath: '#/anyOf/0/allOf/1/properties/tiebreaker/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema64.anyOf[0].allOf[1].properties.tiebreaker.type, + parentSchema: schema64.anyOf[0].allOf[1].properties.tiebreaker, + data: data11, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + var valid5 = _errs31 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.config !== undefined) { + let data12 = data.config; + const _errs33 = errors; + if (errors === _errs33) { + if ( + data12 && + typeof data12 == 'object' && + !Array.isArray(data12) + ) { + } else { + const err21 = { + instancePath: instancePath + '/config', + schemaPath: '#/anyOf/0/allOf/1/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[0].allOf[1].properties.config.type, + parentSchema: schema64.anyOf[0].allOf[1].properties.config, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + var valid5 = _errs33 === errors; + } else { + var valid5 = true; + } + } + } + } + } + } + } + } else { + const err22 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[0].allOf[1].type, + parentSchema: schema64.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } + var valid1 = _errs13 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs36 = errors; + const _errs37 = errors; + const _errs38 = errors; + if (errors === _errs38) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing4; + if (data.messageType === undefined && (missing4 = 'messageType')) { + const err23 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: schema64.anyOf[1].allOf[0].allOf[0].required, + parentSchema: schema64.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data13 = data.messageType; + if (typeof data13 !== 'string') { + const err24 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[1].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema64.anyOf[1].allOf[0].allOf[0].properties.messageType, + data: data13, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + } + } + } else { + const err25 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[1].allOf[0].allOf[0].type, + parentSchema: schema64.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid9 = _errs38 === errors; + if (valid9) { + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing5; + if ( + (data.messageType === undefined && (missing5 = 'messageType')) || + (data.command === undefined && (missing5 = 'command')) + ) { + const err26 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: "must have required property '" + missing5 + "'", + schema: schema64.anyOf[1].allOf[0].allOf[1].required, + parentSchema: schema64.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data14 = data.messageType; + const _errs45 = errors; + if ('command' !== data14) { + const err27 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: + schema64.anyOf[1].allOf[0].allOf[1].properties.messageType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.command !== undefined) { + let data15 = data.command; + const _errs46 = errors; + if (typeof data15 !== 'string') { + const err28 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[1].allOf[0].allOf[1].properties.command.type, + parentSchema: schema64.anyOf[1].allOf[0].allOf[1].properties.command, + data: data15, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + var valid11 = _errs46 === errors; + } else { + var valid11 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[1].allOf[0].allOf[1].type, + parentSchema: schema64.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid9 = _errs43 === errors; + } + var valid8 = _errs37 === errors; + if (valid8) { + const _errs48 = errors; + if (errors === _errs48) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.command === undefined && (missing6 = 'command')) || + (data.connectionUrl === undefined && (missing6 = 'connectionUrl')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema64.anyOf[1].allOf[1].required, + parentSchema: schema64.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.command !== undefined) { + let data16 = data.command; + const _errs50 = errors; + if ('closePeerconnection' !== data16) { + const err31 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'closePeerconnection' }, + message: 'must be equal to constant', + schema: 'closePeerconnection', + parentSchema: schema64.anyOf[1].allOf[1].properties.command, + data: data16, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + var valid12 = _errs50 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data.connectionUrl !== undefined) { + let data17 = data.connectionUrl; + const _errs51 = errors; + if (errors === _errs51) { + if (errors === _errs51) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + const err32 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema64.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } else { + const err33 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[1].allOf[1].properties.connectionUrl.type, + parentSchema: schema64.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + } + } + var valid12 = _errs51 === errors; + } else { + var valid12 = true; + } + } + } + } else { + const err34 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[1].allOf[1].type, + parentSchema: schema64.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + } + var valid8 = _errs48 === errors; + } + var _valid0 = _errs36 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs53 = errors; + const _errs54 = errors; + if (errors === _errs54) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing7; + if (data.messageType === undefined && (missing7 = 'messageType')) { + const err35 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: "must have required property '" + missing7 + "'", + schema: schema64.anyOf[2].allOf[0].required, + parentSchema: schema64.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data18 = data.messageType; + if (typeof data18 !== 'string') { + const err36 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[2].allOf[0].properties.messageType.type, + parentSchema: schema64.anyOf[2].allOf[0].properties.messageType, + data: data18, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } else { + const err37 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[2].allOf[0].type, + parentSchema: schema64.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid13 = _errs54 === errors; + if (valid13) { + const _errs59 = errors; + if (errors === _errs59) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing8; + if ( + (data.messageType === undefined && (missing8 = 'messageType')) || + (data.signalingType === undefined && (missing8 = 'signalingType')) || + (data.connectionUrl === undefined && (missing8 = 'connectionUrl')) || + (data.content === undefined && (missing8 = 'content')) + ) { + const err38 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: "must have required property '" + missing8 + "'", + schema: schema64.anyOf[2].allOf[1].required, + parentSchema: schema64.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data19 = data.messageType; + const _errs61 = errors; + if ('signaling' !== data19) { + const err39 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'signaling' }, + message: 'must be equal to constant', + schema: 'signaling', + parentSchema: schema64.anyOf[2].allOf[1].properties.messageType, + data: data19, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + var valid15 = _errs61 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.signalingType !== undefined) { + let data20 = data.signalingType; + const _errs62 = errors; + if (typeof data20 !== 'string') { + const err40 = { + instancePath: instancePath + '/signalingType', + schemaPath: '#/anyOf/2/allOf/1/properties/signalingType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[2].allOf[1].properties.signalingType.type, + parentSchema: schema64.anyOf[2].allOf[1].properties.signalingType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + var valid15 = _errs62 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.connectionUrl !== undefined) { + let data21 = data.connectionUrl; + const _errs64 = errors; + if (errors === _errs64) { + if (errors === _errs64) { + if (typeof data21 === 'string') { + if (!formats0(data21)) { + const err41 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: + '#/anyOf/2/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema64.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } else { + const err42 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema64.anyOf[2].allOf[1].properties.connectionUrl.type, + parentSchema: + schema64.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + } + var valid15 = _errs64 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.content !== undefined) { + let data22 = data.content; + const _errs66 = errors; + if (errors === _errs66) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + } else { + const err43 = { + instancePath: instancePath + '/content', + schemaPath: '#/anyOf/2/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[2].allOf[1].properties.content.type, + parentSchema: schema64.anyOf[2].allOf[1].properties.content, + data: data22, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid15 = _errs66 === errors; + } else { + var valid15 = true; + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[2].allOf[1].type, + parentSchema: schema64.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid13 = _errs59 === errors; + } + var _valid0 = _errs53 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs69 = errors; + const _errs70 = errors; + if (errors === _errs70) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.messageType === undefined && (missing9 = 'messageType')) { + const err45 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema64.anyOf[3].allOf[0].required, + parentSchema: schema64.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data23 = data.messageType; + if (typeof data23 !== 'string') { + const err46 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[3].allOf[0].properties.messageType.type, + parentSchema: schema64.anyOf[3].allOf[0].properties.messageType, + data: data23, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + } + } else { + const err47 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[3].allOf[0].type, + parentSchema: schema64.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid16 = _errs70 === errors; + if (valid16) { + const _errs75 = errors; + if (errors === _errs75) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing10; + if ( + (data.messageType === undefined && (missing10 = 'messageType')) || + (data.configuration === undefined && (missing10 = 'configuration')) + ) { + const err48 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: "must have required property '" + missing10 + "'", + schema: schema64.anyOf[3].allOf[1].required, + parentSchema: schema64.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data24 = data.messageType; + const _errs77 = errors; + if ('configuration' !== data24) { + const err49 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'configuration' }, + message: 'must be equal to constant', + schema: 'configuration', + parentSchema: schema64.anyOf[3].allOf[1].properties.messageType, + data: data24, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data.configuration !== undefined) { + let data25 = data.configuration; + const _errs78 = errors; + if (errors === _errs78) { + if (data25 && typeof data25 == 'object' && !Array.isArray(data25)) { + } else { + const err50 = { + instancePath: instancePath + '/configuration', + schemaPath: '#/anyOf/3/allOf/1/properties/configuration/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema64.anyOf[3].allOf[1].properties.configuration.type, + parentSchema: + schema64.anyOf[3].allOf[1].properties.configuration, + data: data25, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err51 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[3].allOf[1].type, + parentSchema: schema64.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } + var valid16 = _errs75 === errors; + } + var _valid0 = _errs69 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs81 = errors; + const _errs82 = errors; + if (errors === _errs82) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing11; + if (data.messageType === undefined && (missing11 = 'messageType')) { + const err52 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: "must have required property '" + missing11 + "'", + schema: schema64.anyOf[4].allOf[0].required, + parentSchema: schema64.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data26 = data.messageType; + if (typeof data26 !== 'string') { + const err53 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[4].allOf[0].properties.messageType.type, + parentSchema: schema64.anyOf[4].allOf[0].properties.messageType, + data: data26, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + } + } else { + const err54 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[4].allOf[0].type, + parentSchema: schema64.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid19 = _errs82 === errors; + if (valid19) { + const _errs87 = errors; + if (errors === _errs87) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if ( + (data.messageType === undefined && (missing12 = 'messageType')) || + (data.status === undefined && (missing12 = 'status')) + ) { + const err55 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema64.anyOf[4].allOf[1].required, + parentSchema: schema64.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data27 = data.messageType; + const _errs89 = errors; + if ('experiment-status-changed' !== data27) { + const err56 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'experiment-status-changed' }, + message: 'must be equal to constant', + schema: 'experiment-status-changed', + parentSchema: schema64.anyOf[4].allOf[1].properties.messageType, + data: data27, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + var valid21 = _errs89 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.status !== undefined) { + let data28 = data.status; + const _errs90 = errors; + if (typeof data28 !== 'string') { + const err57 = { + instancePath: instancePath + '/status', + schemaPath: '#/anyOf/4/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[4].allOf[1].properties.status.type, + parentSchema: schema64.anyOf[4].allOf[1].properties.status, + data: data28, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid21 = _errs90 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.message !== undefined) { + let data29 = data.message; + const _errs92 = errors; + if (typeof data29 !== 'string') { + const err58 = { + instancePath: instancePath + '/message', + schemaPath: '#/anyOf/4/allOf/1/properties/message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema64.anyOf[4].allOf[1].properties.message.type, + parentSchema: schema64.anyOf[4].allOf[1].properties.message, + data: data29, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid21 = _errs92 === errors; + } else { + var valid21 = true; + } + } + } + } + } else { + const err59 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema64.anyOf[4].allOf[1].type, + parentSchema: schema64.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } + var valid19 = _errs87 === errors; + } + var _valid0 = _errs81 === errors; + valid0 = valid0 || _valid0; + } + } + } + } + if (!valid0) { + const err60 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema64.anyOf, + parentSchema: schema64, + data, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + validate79.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate79.errors = vErrors; + return errors === 0; +} +exports.validateListPeerconnectionsResponse200 = validate80; +const schema65 = { + type: 'array', + items: { + title: 'Peerconnection Overview', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + }, + 'x-standalone': false, + 'x-name': 'listPeerconnectionsResponse200', + 'x-location': + '#/paths//peerconnections/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate80( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.url === undefined && (missing0 = 'url')) || + (data0.type === undefined && (missing0 = 'type')) || + (data0.status === undefined && (missing0 = 'status')) + ) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema65.items.allOf[0].required, + parentSchema: schema65.items.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema65.items.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema65.items.allOf[0].properties.url.type, + parentSchema: schema65.items.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.type !== undefined) { + let data2 = data0.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema65.items.allOf[0].properties.type.type, + parentSchema: schema65.items.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if (!(data2 === 'local' || data2 === 'webrtc')) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema65.items.allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema65.items.allOf[0].properties.type.enum, + parentSchema: schema65.items.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.status !== undefined) { + let data3 = data0.status; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/status', + schemaPath: '#/items/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema65.items.allOf[0].properties.status.type, + parentSchema: schema65.items.allOf[0].properties.status, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'new' || + data3 === 'connecting' || + data3 === 'connected' || + data3 === 'disconnected' || + data3 === 'failed' || + data3 === 'closed' + ) + ) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/status', + schemaPath: '#/items/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: schema65.items.allOf[0].properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema65.items.allOf[0].properties.status.enum, + parentSchema: schema65.items.allOf[0].properties.status, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema65.items.allOf[0].type, + parentSchema: schema65.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs10 = errors; + if (errors === _errs10) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.devices === undefined && (missing1 = 'devices')) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema65.items.allOf[1].required, + parentSchema: schema65.items.allOf[1], + data: data0, + }, + ]; + return false; + } else { + if (data0.devices !== undefined) { + let data4 = data0.devices; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + if (data4.length > 2) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema65.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } else { + if (data4.length < 2) { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema65.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } else { + var valid4 = true; + const len1 = data4.length; + for (let i1 = 0; i1 < len1; i1++) { + let data5 = data4[i1]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing2; + if (data5.url === undefined && (missing2 = 'url')) { + validate80.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema65.items.allOf[1].properties.devices.items + .required, + parentSchema: + schema65.items.allOf[1].properties.devices.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate80.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema65.items.allOf[1].properties + .devices.items.properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate80.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema65.items.allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema65.items.allOf[1].properties.devices + .items.properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate80.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema65.items.allOf[1].properties.devices.items + .type, + parentSchema: + schema65.items.allOf[1].properties.devices.items, + data: data5, + }, + ]; + return false; + } + } + var valid4 = _errs14 === errors; + if (!valid4) { + break; + } + } + } + } + } else { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema65.items.allOf[1].properties.devices.type, + parentSchema: schema65.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } + } + } + } + } else { + validate80.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema65.items.allOf[1].type, + parentSchema: schema65.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate80.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema65.type, + parentSchema: schema65, + data, + }, + ]; + return false; + } + } + validate80.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionBody = validate81; +const schema66 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionBody', + 'x-location': + '#/paths//peerconnections/post/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate81( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate81.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema66.allOf[0].required, + parentSchema: schema66.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate81.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema66.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate81.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema66.allOf[0].properties.url.type, + parentSchema: schema66.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate81.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema66.allOf[0].properties.type.type, + parentSchema: schema66.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate81.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema66.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema66.allOf[0].properties.type.enum, + parentSchema: schema66.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate81.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema66.allOf[0].properties.status.type, + parentSchema: schema66.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate81.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema66.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema66.allOf[0].properties.status.enum, + parentSchema: schema66.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate81.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema66.allOf[0].type, + parentSchema: schema66.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate81.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema66.allOf[1].required, + parentSchema: schema66.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate81.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema66.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate81.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema66.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate81.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema66.allOf[1].properties.devices.items.required, + parentSchema: schema66.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate81.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema66.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate81.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema66.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema66.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema66.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema66.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema66.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema66.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema66.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema66.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId.type, + parentSchema: + schema66.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema66.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema66.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema66.allOf[1].properties.devices + .items.properties.config + .properties.services.items.type, + parentSchema: + schema66.allOf[1].properties.devices + .items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate81.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema66.allOf[1].properties.devices.items + .properties.config.properties.services + .type, + parentSchema: + schema66.allOf[1].properties.devices.items + .properties.config.properties.services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate81.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema66.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema66.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate81.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema66.allOf[1].properties.devices.items.type, + parentSchema: schema66.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate81.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema66.allOf[1].properties.devices.type, + parentSchema: schema66.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate81.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema66.allOf[1].type, + parentSchema: schema66.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate81.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse201 = validate82; +const schema67 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse201', + 'x-location': + '#/paths//peerconnections/post/responses/201/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate82( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate82.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema67.allOf[0].required, + parentSchema: schema67.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate82.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema67.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema67.allOf[0].properties.url.type, + parentSchema: schema67.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate82.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema67.allOf[0].properties.type.type, + parentSchema: schema67.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate82.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema67.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema67.allOf[0].properties.type.enum, + parentSchema: schema67.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate82.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema67.allOf[0].properties.status.type, + parentSchema: schema67.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate82.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema67.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema67.allOf[0].properties.status.enum, + parentSchema: schema67.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate82.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema67.allOf[0].type, + parentSchema: schema67.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate82.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema67.allOf[1].required, + parentSchema: schema67.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate82.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema67.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate82.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema67.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate82.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema67.allOf[1].properties.devices.items.required, + parentSchema: schema67.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate82.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema67.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate82.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema67.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema67.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema67.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema67.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema67.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId.type, + parentSchema: + schema67.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema67.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema67.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema67.allOf[1].properties.devices + .items.properties.config + .properties.services.items.type, + parentSchema: + schema67.allOf[1].properties.devices + .items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate82.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema67.allOf[1].properties.devices.items + .properties.config.properties.services + .type, + parentSchema: + schema67.allOf[1].properties.devices.items + .properties.config.properties.services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate82.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema67.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema67.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema67.allOf[1].properties.devices.items.type, + parentSchema: schema67.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate82.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema67.allOf[1].properties.devices.type, + parentSchema: schema67.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate82.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema67.allOf[1].type, + parentSchema: schema67.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate82.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse202 = validate83; +const schema68 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse202', + 'x-location': + '#/paths//peerconnections/post/responses/202/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate83( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate83.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema68.allOf[0].required, + parentSchema: schema68.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate83.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema68.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema68.allOf[0].properties.url.type, + parentSchema: schema68.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate83.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema68.allOf[0].properties.type.type, + parentSchema: schema68.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate83.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema68.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema68.allOf[0].properties.type.enum, + parentSchema: schema68.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate83.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema68.allOf[0].properties.status.type, + parentSchema: schema68.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate83.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema68.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema68.allOf[0].properties.status.enum, + parentSchema: schema68.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate83.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema68.allOf[0].type, + parentSchema: schema68.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate83.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema68.allOf[1].required, + parentSchema: schema68.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate83.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema68.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate83.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema68.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate83.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema68.allOf[1].properties.devices.items.required, + parentSchema: schema68.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate83.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema68.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate83.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema68.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema68.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema68.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema68.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema68.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId.type, + parentSchema: + schema68.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema68.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema68.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema68.allOf[1].properties.devices + .items.properties.config + .properties.services.items.type, + parentSchema: + schema68.allOf[1].properties.devices + .items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate83.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema68.allOf[1].properties.devices.items + .properties.config.properties.services + .type, + parentSchema: + schema68.allOf[1].properties.devices.items + .properties.config.properties.services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate83.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema68.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema68.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema68.allOf[1].properties.devices.items.type, + parentSchema: schema68.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate83.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema68.allOf[1].properties.devices.type, + parentSchema: schema68.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate83.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema68.allOf[1].type, + parentSchema: schema68.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate83.errors = vErrors; + return errors === 0; +} +exports.validateGetPeerconnectionResponse200 = validate84; +const schema69 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getPeerconnectionResponse200', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate84( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate84.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema69.allOf[0].required, + parentSchema: schema69.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate84.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema69.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate84.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema69.allOf[0].properties.url.type, + parentSchema: schema69.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate84.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema69.allOf[0].properties.type.type, + parentSchema: schema69.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate84.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema69.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema69.allOf[0].properties.type.enum, + parentSchema: schema69.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate84.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema69.allOf[0].properties.status.type, + parentSchema: schema69.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate84.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema69.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema69.allOf[0].properties.status.enum, + parentSchema: schema69.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate84.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema69.allOf[0].type, + parentSchema: schema69.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate84.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema69.allOf[1].required, + parentSchema: schema69.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate84.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema69.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate84.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema69.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate84.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema69.allOf[1].properties.devices.items.required, + parentSchema: schema69.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate84.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema69.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate84.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema69.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema69.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema69.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema69.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema69.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema69.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema69.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema69.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId.type, + parentSchema: + schema69.allOf[1].properties + .devices.items.properties + .config.properties + .services.items.properties + .serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema69.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema69.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema69.allOf[1].properties.devices + .items.properties.config + .properties.services.items.type, + parentSchema: + schema69.allOf[1].properties.devices + .items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate84.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema69.allOf[1].properties.devices.items + .properties.config.properties.services + .type, + parentSchema: + schema69.allOf[1].properties.devices.items + .properties.config.properties.services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate84.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema69.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema69.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate84.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema69.allOf[1].properties.devices.items.type, + parentSchema: schema69.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate84.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema69.allOf[1].properties.devices.type, + parentSchema: schema69.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate84.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema69.allOf[1].type, + parentSchema: schema69.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate84.errors = vErrors; + return errors === 0; +} +exports.validatePatchPeerconnectionDeviceStatusBody = validate85; +const schema70 = { + type: 'object', + properties: { + status: { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['status'], + 'x-standalone': false, + 'x-name': 'patchPeerconnectionDeviceStatusBody', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema', + 'x-schema-type': 'all', +}; +function validate85( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.status === undefined && (missing0 = 'status')) { + validate85.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema70.required, + parentSchema: schema70, + data, + }, + ]; + return false; + } else { + if (data.status !== undefined) { + let data0 = data.status; + if (typeof data0 !== 'string') { + validate85.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema70.properties.status.type, + parentSchema: schema70.properties.status, + data: data0, + }, + ]; + return false; + } + if ( + !( + data0 === 'new' || + data0 === 'connecting' || + data0 === 'connected' || + data0 === 'disconnected' || + data0 === 'failed' || + data0 === 'closed' + ) + ) { + validate85.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema70.properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema70.properties.status.enum, + parentSchema: schema70.properties.status, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate85.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema70.type, + parentSchema: schema70, + data, + }, + ]; + return false; + } + } + validate85.errors = vErrors; + return errors === 0; +} +exports.validateAuthenticationMessageRequest = validate86; +const schema71 = { + title: 'Authentication Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'authenticate' }, + token: { type: 'string' }, + authenticated: { type: 'boolean' }, + }, + required: ['messageType'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'AuthenticationMessageRequest', + 'x-location': '#/components/schemas/authentication_message_request', + 'x-schema-type': 'request', +}; +function validate86( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate86.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema71.allOf[0].required, + parentSchema: schema71.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate86.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema71.allOf[0].properties.messageType.type, + parentSchema: schema71.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate86.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema71.allOf[0].type, + parentSchema: schema71.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.messageType === undefined && (missing1 = 'messageType')) { + validate86.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema71.allOf[1].required, + parentSchema: schema71.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('authenticate' !== data1) { + validate86.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'authenticate' }, + message: 'must be equal to constant', + schema: 'authenticate', + parentSchema: schema71.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.token !== undefined) { + let data2 = data.token; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate86.errors = [ + { + instancePath: instancePath + '/token', + schemaPath: '#/allOf/1/properties/token/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema71.allOf[1].properties.token.type, + parentSchema: schema71.allOf[1].properties.token, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.authenticated !== undefined) { + let data3 = data.authenticated; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + validate86.errors = [ + { + instancePath: instancePath + '/authenticated', + schemaPath: '#/allOf/1/properties/authenticated/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema71.allOf[1].properties.authenticated.type, + parentSchema: schema71.allOf[1].properties.authenticated, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate86.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema71.allOf[1].type, + parentSchema: schema71.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate86.errors = vErrors; + return errors === 0; +} +exports.validateAuthenticationMessageResponse = validate87; +const schema72 = { + title: 'Authentication Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'authenticate' }, + token: { type: 'string' }, + authenticated: { type: 'boolean' }, + }, + required: ['messageType'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'AuthenticationMessageResponse', + 'x-location': '#/components/schemas/authentication_message_response', + 'x-schema-type': 'response', +}; +function validate87( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate87.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema72.allOf[0].required, + parentSchema: schema72.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate87.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema72.allOf[0].properties.messageType.type, + parentSchema: schema72.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate87.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema72.allOf[0].type, + parentSchema: schema72.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.messageType === undefined && (missing1 = 'messageType')) { + validate87.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema72.allOf[1].required, + parentSchema: schema72.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('authenticate' !== data1) { + validate87.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'authenticate' }, + message: 'must be equal to constant', + schema: 'authenticate', + parentSchema: schema72.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.token !== undefined) { + let data2 = data.token; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate87.errors = [ + { + instancePath: instancePath + '/token', + schemaPath: '#/allOf/1/properties/token/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema72.allOf[1].properties.token.type, + parentSchema: schema72.allOf[1].properties.token, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.authenticated !== undefined) { + let data3 = data.authenticated; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + validate87.errors = [ + { + instancePath: instancePath + '/authenticated', + schemaPath: '#/allOf/1/properties/authenticated/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema72.allOf[1].properties.authenticated.type, + parentSchema: schema72.allOf[1].properties.authenticated, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate87.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema72.allOf[1].type, + parentSchema: schema72.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate87.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStateChangedMessageRequest = validate88; +const schema73 = { + title: 'Connection State Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'connection-state-changed' }, + connectionUrl: { type: 'string', format: 'uri' }, + status: { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['connectionUrl', 'status'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConnectionStateChangedMessageRequest', + 'x-location': '#/components/schemas/connection_state_changed_message_request', + 'x-schema-type': 'request', +}; +function validate88( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema73.allOf[0].required, + parentSchema: schema73.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate88.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema73.allOf[0].properties.messageType.type, + parentSchema: schema73.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema73.allOf[0].type, + parentSchema: schema73.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || + (data.status === undefined && (missing1 = 'status')) + ) { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema73.allOf[1].required, + parentSchema: schema73.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('connection-state-changed' !== data1) { + validate88.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'connection-state-changed' }, + message: 'must be equal to constant', + schema: 'connection-state-changed', + parentSchema: schema73.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.connectionUrl !== undefined) { + let data2 = data.connectionUrl; + const _errs8 = errors; + if (errors === _errs8) { + if (errors === _errs8) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate88.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema73.allOf[1].properties.connectionUrl, + data: data2, + }, + ]; + return false; + } + } else { + validate88.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema73.allOf[1].properties.connectionUrl.type, + parentSchema: schema73.allOf[1].properties.connectionUrl, + data: data2, + }, + ]; + return false; + } + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.status !== undefined) { + let data3 = data.status; + const _errs10 = errors; + if (typeof data3 !== 'string') { + validate88.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema73.allOf[1].properties.status.type, + parentSchema: schema73.allOf[1].properties.status, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'new' || + data3 === 'connecting' || + data3 === 'connected' || + data3 === 'disconnected' || + data3 === 'failed' || + data3 === 'closed' + ) + ) { + validate88.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema73.allOf[1].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema73.allOf[1].properties.status.enum, + parentSchema: schema73.allOf[1].properties.status, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema73.allOf[1].type, + parentSchema: schema73.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate88.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStateChangedMessageResponse = validate89; +const schema74 = { + title: 'Connection State Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'connection-state-changed' }, + connectionUrl: { type: 'string', format: 'uri' }, + status: { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['connectionUrl', 'status'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConnectionStateChangedMessageResponse', + 'x-location': '#/components/schemas/connection_state_changed_message_response', + 'x-schema-type': 'response', +}; +function validate89( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate89.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema74.allOf[0].required, + parentSchema: schema74.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate89.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema74.allOf[0].properties.messageType.type, + parentSchema: schema74.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate89.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema74.allOf[0].type, + parentSchema: schema74.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || + (data.status === undefined && (missing1 = 'status')) + ) { + validate89.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema74.allOf[1].required, + parentSchema: schema74.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('connection-state-changed' !== data1) { + validate89.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'connection-state-changed' }, + message: 'must be equal to constant', + schema: 'connection-state-changed', + parentSchema: schema74.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.connectionUrl !== undefined) { + let data2 = data.connectionUrl; + const _errs8 = errors; + if (errors === _errs8) { + if (errors === _errs8) { + if (typeof data2 === 'string') { + if (!formats0(data2)) { + validate89.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema74.allOf[1].properties.connectionUrl, + data: data2, + }, + ]; + return false; + } + } else { + validate89.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema74.allOf[1].properties.connectionUrl.type, + parentSchema: schema74.allOf[1].properties.connectionUrl, + data: data2, + }, + ]; + return false; + } + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.status !== undefined) { + let data3 = data.status; + const _errs10 = errors; + if (typeof data3 !== 'string') { + validate89.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema74.allOf[1].properties.status.type, + parentSchema: schema74.allOf[1].properties.status, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'new' || + data3 === 'connecting' || + data3 === 'connected' || + data3 === 'disconnected' || + data3 === 'failed' || + data3 === 'closed' + ) + ) { + validate89.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema74.allOf[1].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema74.allOf[1].properties.status.enum, + parentSchema: schema74.allOf[1].properties.status, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate89.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema74.allOf[1].type, + parentSchema: schema74.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate89.errors = vErrors; + return errors === 0; +} +exports.validateUserReferenceRequest = validate90; +const schema75 = { + title: 'User Reference', + type: 'object', + properties: { url: { type: 'string', description: 'URL of the user', format: 'uri' } }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'UserReferenceRequest', + 'x-location': '#/components/schemas/user_reference_request', + 'x-schema-type': 'request', +}; +function validate90( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate90.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema75.required, + parentSchema: schema75, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate90.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema75.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate90.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema75.properties.url.type, + parentSchema: schema75.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate90.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema75.type, + parentSchema: schema75, + data, + }, + ]; + return false; + } + } + validate90.errors = vErrors; + return errors === 0; +} +exports.validateUserReferenceResponse = validate91; +const schema76 = { + title: 'User Reference', + type: 'object', + properties: { url: { type: 'string', description: 'URL of the user', format: 'uri' } }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'UserReferenceResponse', + 'x-location': '#/components/schemas/user_reference_response', + 'x-schema-type': 'response', +}; +function validate91( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate91.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema76.required, + parentSchema: schema76, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate91.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema76.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate91.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema76.properties.url.type, + parentSchema: schema76.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate91.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema76.type, + parentSchema: schema76, + data, + }, + ]; + return false; + } + } + validate91.errors = vErrors; + return errors === 0; +} +exports.validateDeviceOverviewRequest = validate92; +const schema77 = { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceOverviewRequest', + 'x-location': '#/components/schemas/device_overview_request', + 'x-schema-type': 'request', +}; +function validate92( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate92.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema77.required, + parentSchema: schema77, + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs1 = errors; + if (typeof data0 !== 'string') { + validate92.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema77.properties.name.type, + parentSchema: schema77.properties.name, + data: data0, + }, + ]; + return false; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate92.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema77.properties.description.type, + parentSchema: schema77.properties.description, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate92.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema77.properties.type.type, + parentSchema: schema77.properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate92.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema77.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema77.properties.type.enum, + parentSchema: schema77.properties.type, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs7 = errors; + if (typeof data3 !== 'boolean') { + validate92.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema77.properties.isPublic.type, + parentSchema: schema77.properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid1 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate92.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema77.properties.viewer.items.required, + parentSchema: schema77.properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate92.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema77.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } else { + validate92.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema77.properties.viewer.items.properties + .url.type, + parentSchema: + schema77.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate92.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema77.properties.viewer.items.type, + parentSchema: schema77.properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + if (!valid1) { + break; + } + } + } else { + validate92.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema77.properties.viewer.type, + parentSchema: schema77.properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs15 = errors; + if (errors === _errs15) { + if (Array.isArray(data7)) { + var valid3 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs17 = errors; + if (errors === _errs17) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate92.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema77.properties.owner.items.required, + parentSchema: schema77.properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate92.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema77.properties.owner.items.properties + .url, + data: data9, + }, + ]; + return false; + } + } else { + validate92.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema77.properties.owner.items.properties + .url.type, + parentSchema: + schema77.properties.owner.items.properties + .url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate92.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema77.properties.owner.items.type, + parentSchema: schema77.properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid3 = _errs17 === errors; + if (!valid3) { + break; + } + } + } else { + validate92.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema77.properties.owner.type, + parentSchema: schema77.properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } else { + validate92.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema77.type, + parentSchema: schema77, + data, + }, + ]; + return false; + } + } + validate92.errors = vErrors; + return errors === 0; +} +exports.validateDeviceOverviewResponse = validate93; +const schema78 = { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceOverviewResponse', + 'x-location': '#/components/schemas/device_overview_response', + 'x-schema-type': 'response', +}; +function validate93( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate93.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema78.required, + parentSchema: schema78, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate93.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema78.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate93.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema78.properties.url.type, + parentSchema: schema78.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate93.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema78.properties.name.type, + parentSchema: schema78.properties.name, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate93.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema78.properties.description.type, + parentSchema: schema78.properties.description, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate93.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema78.properties.type.type, + parentSchema: schema78.properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate93.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema78.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema78.properties.type.enum, + parentSchema: schema78.properties.type, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs9 = errors; + if (typeof data4 !== 'boolean') { + validate93.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema78.properties.isPublic.type, + parentSchema: schema78.properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid1 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs13 = errors; + if (errors === _errs13) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate93.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema78.properties.viewer.items.required, + parentSchema: schema78.properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate93.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema78.properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate93.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema78.properties.viewer.items.properties + .url.type, + parentSchema: + schema78.properties.viewer.items.properties + .url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate93.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema78.properties.viewer.items.type, + parentSchema: schema78.properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + if (!valid1) { + break; + } + } + } else { + validate93.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema78.properties.viewer.type, + parentSchema: schema78.properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs17 = errors; + if (errors === _errs17) { + if (Array.isArray(data8)) { + var valid3 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs19 = errors; + if (errors === _errs19) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate93.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema78.properties.owner.items.required, + parentSchema: schema78.properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs21 = errors; + if (errors === _errs21) { + if (errors === _errs21) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate93.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema78.properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate93.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema78.properties.owner.items.properties + .url.type, + parentSchema: + schema78.properties.owner.items.properties + .url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate93.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema78.properties.owner.items.type, + parentSchema: schema78.properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid3 = _errs19 === errors; + if (!valid3) { + break; + } + } + } else { + validate93.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema78.properties.owner.type, + parentSchema: schema78.properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid0 = _errs17 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } else { + validate93.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema78.type, + parentSchema: schema78, + data, + }, + ]; + return false; + } + } + validate93.errors = vErrors; + return errors === 0; +} +exports.validateServiceDescriptionRequest = validate94; +const schema79 = { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { type: 'string', enum: ['consumer', 'producer', 'prosumer'] }, + }, + additionalProperties: true, + 'x-standalone': true, + 'x-name': 'ServiceDescriptionRequest', + 'x-location': '#/components/schemas/service_description_request', + 'x-schema-type': 'request', +}; +function validate94( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.serviceType !== undefined) { + let data0 = data.serviceType; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate94.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema79.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } else { + validate94.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema79.properties.serviceType.type, + parentSchema: schema79.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceId !== undefined) { + let data1 = data.serviceId; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate94.errors = [ + { + instancePath: instancePath + '/serviceId', + schemaPath: '#/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema79.properties.serviceId.type, + parentSchema: schema79.properties.serviceId, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceDirection !== undefined) { + let data2 = data.serviceDirection; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate94.errors = [ + { + instancePath: instancePath + '/serviceDirection', + schemaPath: '#/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema79.properties.serviceDirection.type, + parentSchema: schema79.properties.serviceDirection, + data: data2, + }, + ]; + return false; + } + if (!(data2 === 'consumer' || data2 === 'producer' || data2 === 'prosumer')) { + validate94.errors = [ + { + instancePath: instancePath + '/serviceDirection', + schemaPath: '#/properties/serviceDirection/enum', + keyword: 'enum', + params: { allowedValues: schema79.properties.serviceDirection.enum }, + message: 'must be equal to one of the allowed values', + schema: schema79.properties.serviceDirection.enum, + parentSchema: schema79.properties.serviceDirection, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate94.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema79.type, + parentSchema: schema79, + data, + }, + ]; + return false; + } + } + validate94.errors = vErrors; + return errors === 0; +} +exports.validateServiceDescriptionResponse = validate95; +const schema80 = { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { type: 'string', enum: ['consumer', 'producer', 'prosumer'] }, + }, + additionalProperties: true, + 'x-standalone': true, + 'x-name': 'ServiceDescriptionResponse', + 'x-location': '#/components/schemas/service_description_response', + 'x-schema-type': 'response', +}; +function validate95( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.serviceType !== undefined) { + let data0 = data.serviceType; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate95.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema80.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } else { + validate95.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema80.properties.serviceType.type, + parentSchema: schema80.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceId !== undefined) { + let data1 = data.serviceId; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate95.errors = [ + { + instancePath: instancePath + '/serviceId', + schemaPath: '#/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema80.properties.serviceId.type, + parentSchema: schema80.properties.serviceId, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceDirection !== undefined) { + let data2 = data.serviceDirection; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate95.errors = [ + { + instancePath: instancePath + '/serviceDirection', + schemaPath: '#/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema80.properties.serviceDirection.type, + parentSchema: schema80.properties.serviceDirection, + data: data2, + }, + ]; + return false; + } + if (!(data2 === 'consumer' || data2 === 'producer' || data2 === 'prosumer')) { + validate95.errors = [ + { + instancePath: instancePath + '/serviceDirection', + schemaPath: '#/properties/serviceDirection/enum', + keyword: 'enum', + params: { allowedValues: schema80.properties.serviceDirection.enum }, + message: 'must be equal to one of the allowed values', + schema: schema80.properties.serviceDirection.enum, + parentSchema: schema80.properties.serviceDirection, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate95.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema80.type, + parentSchema: schema80, + data, + }, + ]; + return false; + } + } + validate95.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableCloudDeviceRequest = validate96; +const schema81 = { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'InstantiableCloudDeviceRequest', + 'x-location': '#/components/schemas/device_cloud_instantiable_request', + 'x-schema-type': 'request', +}; +function validate96( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate96.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema81.allOf[0].required, + parentSchema: schema81.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate96.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema81.allOf[0].properties.name.type, + parentSchema: schema81.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate96.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema81.allOf[0].properties.description.type, + parentSchema: schema81.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate96.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema81.allOf[0].properties.type.type, + parentSchema: schema81.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate96.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema81.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema81.allOf[0].properties.type.enum, + parentSchema: schema81.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate96.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema81.allOf[0].properties.isPublic.type, + parentSchema: schema81.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate96.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema81.allOf[0].properties.viewer.items.required, + parentSchema: schema81.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate96.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema81.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate96.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema81.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema81.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema81.allOf[0].properties.viewer.items.type, + parentSchema: schema81.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema81.allOf[0].properties.viewer.type, + parentSchema: schema81.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate96.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema81.allOf[0].properties.owner.items.required, + parentSchema: + schema81.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate96.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema81.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate96.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema81.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema81.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema81.allOf[0].properties.owner.items.type, + parentSchema: schema81.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema81.allOf[0].properties.owner.type, + parentSchema: schema81.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate96.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema81.allOf[0].type, + parentSchema: schema81.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('cloud instantiable' !== data10) { + validate96.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema81.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate96.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema81.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema81.allOf[1].properties.instantiateUrl.type, + parentSchema: schema81.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate96.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema81.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate96.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema81.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema81.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate96.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema81.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema81.allOf[1].properties.services.items.properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate96.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema81.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema81.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate96.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema81.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema81.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema81.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema81.allOf[1].properties.services.items.type, + parentSchema: schema81.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate96.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema81.allOf[1].properties.services.type, + parentSchema: schema81.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate96.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema81.allOf[1].type, + parentSchema: schema81.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate96.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableCloudDeviceResponse = validate97; +const schema82 = { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'InstantiableCloudDeviceResponse', + 'x-location': '#/components/schemas/device_cloud_instantiable_response', + 'x-schema-type': 'response', +}; +function validate97( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate97.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema82.allOf[0].required, + parentSchema: schema82.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate97.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema82.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema82.allOf[0].properties.url.type, + parentSchema: schema82.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate97.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema82.allOf[0].properties.name.type, + parentSchema: schema82.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate97.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema82.allOf[0].properties.description.type, + parentSchema: schema82.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate97.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema82.allOf[0].properties.type.type, + parentSchema: schema82.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate97.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema82.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema82.allOf[0].properties.type.enum, + parentSchema: schema82.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate97.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema82.allOf[0].properties.isPublic.type, + parentSchema: schema82.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate97.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema82.allOf[0].properties.viewer.items.required, + parentSchema: + schema82.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate97.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema82.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate97.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema82.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema82.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema82.allOf[0].properties.viewer.items.type, + parentSchema: schema82.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema82.allOf[0].properties.viewer.type, + parentSchema: schema82.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate97.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema82.allOf[0].properties.owner.items.required, + parentSchema: + schema82.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate97.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema82.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate97.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema82.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema82.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema82.allOf[0].properties.owner.items.type, + parentSchema: + schema82.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema82.allOf[0].properties.owner.type, + parentSchema: schema82.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate97.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema82.allOf[0].type, + parentSchema: schema82.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data11) { + validate97.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema82.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + validate97.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema82.allOf[1].properties.instantiateUrl, + data: data12, + }, + ]; + return false; + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema82.allOf[1].properties.instantiateUrl.type, + parentSchema: schema82.allOf[1].properties.instantiateUrl, + data: data12, + }, + ]; + return false; + } + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data13)) { + var valid7 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + validate97.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema82.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } else { + validate97.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema82.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema82.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate97.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema82.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema82.allOf[1].properties.services.items.properties + .serviceId, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs38 = errors; + if (typeof data17 !== 'string') { + validate97.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema82.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema82.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + validate97.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema82.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema82.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema82.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + var valid8 = _errs38 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema82.allOf[1].properties.services.items.type, + parentSchema: schema82.allOf[1].properties.services.items, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + if (!valid7) { + break; + } + } + } else { + validate97.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema82.allOf[1].properties.services.type, + parentSchema: schema82.allOf[1].properties.services, + data: data13, + }, + ]; + return false; + } + } + var valid6 = _errs29 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate97.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema82.allOf[1].type, + parentSchema: schema82.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate97.errors = vErrors; + return errors === 0; +} +exports.validateTimeSlotRequest = validate98; +const schema83 = { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeSlotRequest', + 'x-location': '#/components/schemas/time_slot_request', + 'x-schema-type': 'request', +}; +function validate98( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.start !== undefined) { + let data0 = data.start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats22.validate(data0)) { + validate98.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema83.properties.start, + data: data0, + }, + ]; + return false; + } + } else { + validate98.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema83.properties.start.type, + parentSchema: schema83.properties.start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.end !== undefined) { + let data1 = data.end; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate98.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema83.properties.end, + data: data1, + }, + ]; + return false; + } + } else { + validate98.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema83.properties.end.type, + parentSchema: schema83.properties.end, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } else { + validate98.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema83.type, + parentSchema: schema83, + data, + }, + ]; + return false; + } + } + validate98.errors = vErrors; + return errors === 0; +} +exports.validateTimeSlotResponse = validate99; +const schema84 = { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + 'x-standalone': true, + 'x-name': 'TimeSlotResponse', + 'x-location': '#/components/schemas/time_slot_response', + 'x-schema-type': 'response', +}; +function validate99( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.start !== undefined) { + let data0 = data.start; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats22.validate(data0)) { + validate99.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema84.properties.start, + data: data0, + }, + ]; + return false; + } + } else { + validate99.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema84.properties.start.type, + parentSchema: schema84.properties.start, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.end !== undefined) { + let data1 = data.end; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate99.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema84.properties.end, + data: data1, + }, + ]; + return false; + } + } else { + validate99.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema84.properties.end.type, + parentSchema: schema84.properties.end, + data: data1, + }, + ]; + return false; + } + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } else { + validate99.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema84.type, + parentSchema: schema84, + data, + }, + ]; + return false; + } + } + validate99.errors = vErrors; + return errors === 0; +} +exports.validateAvailabilityRequest = validate100; +const schema85 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': true, + 'x-name': 'AvailabilityRequest', + 'x-location': '#/components/schemas/availability_request', + 'x-schema-type': 'request', +}; +function validate100( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate100.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema85.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate100.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema85.items.properties.start.type, + parentSchema: schema85.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate100.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema85.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate100.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema85.items.properties.end.type, + parentSchema: schema85.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate100.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema85.items.type, + parentSchema: schema85.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate100.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema85.type, + parentSchema: schema85, + data, + }, + ]; + return false; + } + } + validate100.errors = vErrors; + return errors === 0; +} +exports.validateAvailabilityResponse = validate101; +const schema86 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': true, + 'x-name': 'AvailabilityResponse', + 'x-location': '#/components/schemas/availability_response', + 'x-schema-type': 'response', +}; +function validate101( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate101.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema86.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate101.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema86.items.properties.start.type, + parentSchema: schema86.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate101.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema86.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate101.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema86.items.properties.end.type, + parentSchema: schema86.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate101.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema86.items.type, + parentSchema: schema86.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate101.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema86.type, + parentSchema: schema86, + data, + }, + ]; + return false; + } + } + validate101.errors = vErrors; + return errors === 0; +} +exports.validateConcreteDeviceRequest = validate102; +const schema87 = { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConcreteDeviceRequest', + 'x-location': '#/components/schemas/device_concrete_request', + 'x-schema-type': 'request', +}; +function validate102( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate102.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema87.allOf[0].required, + parentSchema: schema87.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate102.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema87.allOf[0].properties.name.type, + parentSchema: schema87.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate102.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema87.allOf[0].properties.description.type, + parentSchema: schema87.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate102.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema87.allOf[0].properties.type.type, + parentSchema: schema87.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate102.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema87.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema87.allOf[0].properties.type.enum, + parentSchema: schema87.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate102.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema87.allOf[0].properties.isPublic.type, + parentSchema: schema87.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate102.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema87.allOf[0].properties.viewer.items.required, + parentSchema: schema87.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate102.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema87.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate102.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema87.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema87.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema87.allOf[0].properties.viewer.items.type, + parentSchema: schema87.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema87.allOf[0].properties.viewer.type, + parentSchema: schema87.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate102.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema87.allOf[0].properties.owner.items.required, + parentSchema: + schema87.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate102.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema87.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate102.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema87.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema87.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema87.allOf[0].properties.owner.items.type, + parentSchema: schema87.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema87.allOf[0].properties.owner.type, + parentSchema: schema87.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate102.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema87.allOf[0].type, + parentSchema: schema87.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('device' !== data10) { + validate102.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema87.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.experiment !== undefined) { + let data11 = data.experiment; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate102.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema87.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema87.allOf[1].properties.experiment.type, + parentSchema: schema87.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate102.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema87.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate102.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema87.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema87.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate102.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema87.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema87.allOf[1].properties.services.items.properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate102.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema87.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema87.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate102.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema87.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema87.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema87.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema87.allOf[1].properties.services.items.type, + parentSchema: schema87.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate102.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema87.allOf[1].properties.services.type, + parentSchema: schema87.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate102.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema87.allOf[1].type, + parentSchema: schema87.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate102.errors = vErrors; + return errors === 0; +} +exports.validateConcreteDeviceResponse = validate103; +const schema88 = { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConcreteDeviceResponse', + 'x-location': '#/components/schemas/device_concrete_response', + 'x-schema-type': 'response', +}; +function validate103( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate103.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema88.allOf[0].required, + parentSchema: schema88.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate103.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema88.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema88.allOf[0].properties.url.type, + parentSchema: schema88.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate103.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema88.allOf[0].properties.name.type, + parentSchema: schema88.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate103.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema88.allOf[0].properties.description.type, + parentSchema: schema88.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate103.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema88.allOf[0].properties.type.type, + parentSchema: schema88.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate103.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema88.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema88.allOf[0].properties.type.enum, + parentSchema: schema88.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate103.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema88.allOf[0].properties.isPublic.type, + parentSchema: schema88.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate103.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema88.allOf[0].properties.viewer.items.required, + parentSchema: + schema88.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate103.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema88.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema88.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema88.allOf[0].properties.viewer.items.type, + parentSchema: schema88.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema88.allOf[0].properties.viewer.type, + parentSchema: schema88.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate103.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema88.allOf[0].properties.owner.items.required, + parentSchema: + schema88.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate103.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema88.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema88.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema88.allOf[0].properties.owner.items.type, + parentSchema: + schema88.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema88.allOf[0].properties.owner.type, + parentSchema: schema88.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate103.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema88.allOf[0].type, + parentSchema: schema88.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('device' !== data11) { + validate103.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema88.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.connected !== undefined) { + let data12 = data.connected; + const _errs27 = errors; + if (typeof data12 !== 'boolean') { + validate103.errors = [ + { + instancePath: instancePath + '/connected', + schemaPath: '#/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema88.allOf[1].properties.connected.type, + parentSchema: schema88.allOf[1].properties.connected, + data: data12, + }, + ]; + return false; + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.announcedAvailability !== undefined) { + let data13 = data.announcedAvailability; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data13)) { + var valid7 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.start !== undefined) { + let data15 = data14.start; + const _errs33 = errors; + if (errors === _errs33) { + if (errors === _errs33) { + if (typeof data15 === 'string') { + if (!formats22.validate(data15)) { + validate103.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema88.allOf[1].properties.announcedAvailability + .items.properties.start, + data: data15, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[1].properties.announcedAvailability + .items.properties.start.type, + parentSchema: + schema88.allOf[1].properties.announcedAvailability + .items.properties.start, + data: data15, + }, + ]; + return false; + } + } + } + var valid8 = _errs33 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.end !== undefined) { + let data16 = data14.end; + const _errs35 = errors; + if (errors === _errs35) { + if (errors === _errs35) { + if (typeof data16 === 'string') { + if (!formats22.validate(data16)) { + validate103.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema88.allOf[1].properties + .announcedAvailability.items.properties.end, + data: data16, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: + instancePath + + '/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[1].properties.announcedAvailability + .items.properties.end.type, + parentSchema: + schema88.allOf[1].properties.announcedAvailability + .items.properties.end, + data: data16, + }, + ]; + return false; + } + } + } + var valid8 = _errs35 === errors; + } else { + var valid8 = true; + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/announcedAvailability/' + i2, + schemaPath: + '#/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema88.allOf[1].properties.announcedAvailability.items + .type, + parentSchema: + schema88.allOf[1].properties.announcedAvailability.items, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + if (!valid7) { + break; + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/announcedAvailability', + schemaPath: '#/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema88.allOf[1].properties.announcedAvailability.type, + parentSchema: schema88.allOf[1].properties.announcedAvailability, + data: data13, + }, + ]; + return false; + } + } + var valid6 = _errs29 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.experiment !== undefined) { + let data17 = data.experiment; + const _errs37 = errors; + if (errors === _errs37) { + if (errors === _errs37) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + validate103.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema88.allOf[1].properties.experiment, + data: data17, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema88.allOf[1].properties.experiment.type, + parentSchema: schema88.allOf[1].properties.experiment, + data: data17, + }, + ]; + return false; + } + } + } + var valid6 = _errs37 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data18 = data.services; + const _errs39 = errors; + if (errors === _errs39) { + if (Array.isArray(data18)) { + var valid9 = true; + const len3 = data18.length; + for (let i3 = 0; i3 < len3; i3++) { + let data19 = data18[i3]; + const _errs41 = errors; + if (errors === _errs41) { + if ( + data19 && + typeof data19 == 'object' && + !Array.isArray(data19) + ) { + if (data19.serviceType !== undefined) { + let data20 = data19.serviceType; + const _errs44 = errors; + if (errors === _errs44) { + if (errors === _errs44) { + if (typeof data20 === 'string') { + if (!formats0(data20)) { + validate103.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema88.allOf[1].properties.services.items + .properties.serviceType, + data: data20, + }, + ]; + return false; + } + } else { + validate103.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema88.allOf[1].properties.services.items + .properties.serviceType, + data: data20, + }, + ]; + return false; + } + } + } + var valid10 = _errs44 === errors; + } else { + var valid10 = true; + } + if (valid10) { + if (data19.serviceId !== undefined) { + let data21 = data19.serviceId; + const _errs46 = errors; + if (typeof data21 !== 'string') { + validate103.errors = [ + { + instancePath: + instancePath + '/services/' + i3 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema88.allOf[1].properties.services.items + .properties.serviceId, + data: data21, + }, + ]; + return false; + } + var valid10 = _errs46 === errors; + } else { + var valid10 = true; + } + if (valid10) { + if (data19.serviceDirection !== undefined) { + let data22 = data19.serviceDirection; + const _errs48 = errors; + if (typeof data22 !== 'string') { + validate103.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema88.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema88.allOf[1].properties.services.items + .properties.serviceDirection, + data: data22, + }, + ]; + return false; + } + if ( + !( + data22 === 'consumer' || + data22 === 'producer' || + data22 === 'prosumer' + ) + ) { + validate103.errors = [ + { + instancePath: + instancePath + + '/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema88.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema88.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema88.allOf[1].properties.services.items + .properties.serviceDirection, + data: data22, + }, + ]; + return false; + } + var valid10 = _errs48 === errors; + } else { + var valid10 = true; + } + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/services/' + i3, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema88.allOf[1].properties.services.items.type, + parentSchema: schema88.allOf[1].properties.services.items, + data: data19, + }, + ]; + return false; + } + } + var valid9 = _errs41 === errors; + if (!valid9) { + break; + } + } + } else { + validate103.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema88.allOf[1].properties.services.type, + parentSchema: schema88.allOf[1].properties.services, + data: data18, + }, + ]; + return false; + } + } + var valid6 = _errs39 === errors; + } else { + var valid6 = true; + } + } + } + } + } + } else { + validate103.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema88.allOf[1].type, + parentSchema: schema88.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate103.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableBrowserDeviceRequest = validate104; +const schema89 = { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'InstantiableBrowserDeviceRequest', + 'x-location': '#/components/schemas/device_edge_instantiable_request', + 'x-schema-type': 'request', +}; +function validate104( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate104.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema89.allOf[0].required, + parentSchema: schema89.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate104.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema89.allOf[0].properties.name.type, + parentSchema: schema89.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate104.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema89.allOf[0].properties.description.type, + parentSchema: schema89.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate104.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema89.allOf[0].properties.type.type, + parentSchema: schema89.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate104.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema89.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema89.allOf[0].properties.type.enum, + parentSchema: schema89.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate104.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema89.allOf[0].properties.isPublic.type, + parentSchema: schema89.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate104.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema89.allOf[0].properties.viewer.items.required, + parentSchema: schema89.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate104.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema89.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate104.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema89.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema89.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema89.allOf[0].properties.viewer.items.type, + parentSchema: schema89.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema89.allOf[0].properties.viewer.type, + parentSchema: schema89.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate104.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema89.allOf[0].properties.owner.items.required, + parentSchema: + schema89.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate104.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema89.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate104.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema89.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema89.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema89.allOf[0].properties.owner.items.type, + parentSchema: schema89.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema89.allOf[0].properties.owner.type, + parentSchema: schema89.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate104.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema89.allOf[0].type, + parentSchema: schema89.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('edge instantiable' !== data10) { + validate104.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema89.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.codeUrl !== undefined) { + let data11 = data.codeUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate104.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema89.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema89.allOf[1].properties.codeUrl.type, + parentSchema: schema89.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate104.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema89.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate104.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema89.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema89.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate104.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema89.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema89.allOf[1].properties.services.items.properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate104.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema89.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema89.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate104.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema89.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema89.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema89.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema89.allOf[1].properties.services.items.type, + parentSchema: schema89.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate104.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema89.allOf[1].properties.services.type, + parentSchema: schema89.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate104.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema89.allOf[1].type, + parentSchema: schema89.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate104.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableBrowserDeviceResponse = validate105; +const schema90 = { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'InstantiableBrowserDeviceResponse', + 'x-location': '#/components/schemas/device_edge_instantiable_response', + 'x-schema-type': 'response', +}; +function validate105( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate105.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema90.allOf[0].required, + parentSchema: schema90.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate105.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema90.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema90.allOf[0].properties.url.type, + parentSchema: schema90.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate105.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema90.allOf[0].properties.name.type, + parentSchema: schema90.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate105.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema90.allOf[0].properties.description.type, + parentSchema: schema90.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate105.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema90.allOf[0].properties.type.type, + parentSchema: schema90.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate105.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema90.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema90.allOf[0].properties.type.enum, + parentSchema: schema90.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate105.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema90.allOf[0].properties.isPublic.type, + parentSchema: schema90.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate105.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema90.allOf[0].properties.viewer.items.required, + parentSchema: + schema90.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate105.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema90.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate105.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema90.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema90.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema90.allOf[0].properties.viewer.items.type, + parentSchema: schema90.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema90.allOf[0].properties.viewer.type, + parentSchema: schema90.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate105.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema90.allOf[0].properties.owner.items.required, + parentSchema: + schema90.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate105.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema90.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate105.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema90.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema90.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema90.allOf[0].properties.owner.items.type, + parentSchema: + schema90.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema90.allOf[0].properties.owner.type, + parentSchema: schema90.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate105.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema90.allOf[0].type, + parentSchema: schema90.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('edge instantiable' !== data11) { + validate105.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema90.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.codeUrl !== undefined) { + let data12 = data.codeUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + validate105.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema90.allOf[1].properties.codeUrl, + data: data12, + }, + ]; + return false; + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema90.allOf[1].properties.codeUrl.type, + parentSchema: schema90.allOf[1].properties.codeUrl, + data: data12, + }, + ]; + return false; + } + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data13)) { + var valid7 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + validate105.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema90.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } else { + validate105.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema90.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema90.allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }, + ]; + return false; + } + } + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate105.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema90.allOf[1].properties.services.items.properties + .serviceId.type, + parentSchema: + schema90.allOf[1].properties.services.items.properties + .serviceId, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs38 = errors; + if (typeof data17 !== 'string') { + validate105.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema90.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema90.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + validate105.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema90.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema90.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema90.allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }, + ]; + return false; + } + var valid8 = _errs38 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema90.allOf[1].properties.services.items.type, + parentSchema: schema90.allOf[1].properties.services.items, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + if (!valid7) { + break; + } + } + } else { + validate105.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema90.allOf[1].properties.services.type, + parentSchema: schema90.allOf[1].properties.services, + data: data13, + }, + ]; + return false; + } + } + var valid6 = _errs29 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate105.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema90.allOf[1].type, + parentSchema: schema90.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate105.errors = vErrors; + return errors === 0; +} +exports.validateDeviceReferenceRequest = validate106; +const schema91 = { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'DeviceReferenceRequest', + 'x-location': '#/components/schemas/device_reference_request', + 'x-schema-type': 'request', +}; +function validate106( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate106.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema91.required, + parentSchema: schema91, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate106.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema91.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate106.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema91.properties.url.type, + parentSchema: schema91.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate106.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema91.type, + parentSchema: schema91, + data, + }, + ]; + return false; + } + } + validate106.errors = vErrors; + return errors === 0; +} +exports.validateDeviceReferenceResponse = validate107; +const schema92 = { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'DeviceReferenceResponse', + 'x-location': '#/components/schemas/device_reference_response', + 'x-schema-type': 'response', +}; +function validate107( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate107.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema92.required, + parentSchema: schema92, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate107.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema92.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate107.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema92.properties.url.type, + parentSchema: schema92.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + } + } + } else { + validate107.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema92.type, + parentSchema: schema92, + data, + }, + ]; + return false; + } + } + validate107.errors = vErrors; + return errors === 0; +} +exports.validateDeviceGroupRequest = validate108; +const schema93 = { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceGroupRequest', + 'x-location': '#/components/schemas/device_group_request', + 'x-schema-type': 'request', +}; +function validate108( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate108.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema93.allOf[0].required, + parentSchema: schema93.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate108.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema93.allOf[0].properties.name.type, + parentSchema: schema93.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate108.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema93.allOf[0].properties.description.type, + parentSchema: schema93.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate108.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema93.allOf[0].properties.type.type, + parentSchema: schema93.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate108.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema93.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema93.allOf[0].properties.type.enum, + parentSchema: schema93.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate108.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema93.allOf[0].properties.isPublic.type, + parentSchema: schema93.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate108.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema93.allOf[0].properties.viewer.items.required, + parentSchema: schema93.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate108.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema93.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate108.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema93.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema93.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema93.allOf[0].properties.viewer.items.type, + parentSchema: schema93.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema93.allOf[0].properties.viewer.type, + parentSchema: schema93.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate108.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema93.allOf[0].properties.owner.items.required, + parentSchema: + schema93.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate108.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema93.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate108.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema93.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema93.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema93.allOf[0].properties.owner.items.type, + parentSchema: schema93.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema93.allOf[0].properties.owner.type, + parentSchema: schema93.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate108.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema93.allOf[0].type, + parentSchema: schema93.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.devices === undefined && (missing3 = 'devices')) { + validate108.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema93.allOf[1].required, + parentSchema: schema93.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('group' !== data10) { + validate108.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema93.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.devices !== undefined) { + let data11 = data.devices; + const _errs25 = errors; + if (errors === _errs25) { + if (Array.isArray(data11)) { + var valid7 = true; + const len2 = data11.length; + for (let i2 = 0; i2 < len2; i2++) { + let data12 = data11[i2]; + const _errs27 = errors; + if (errors === _errs27) { + if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { + let missing4; + if (data12.url === undefined && (missing4 = 'url')) { + validate108.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: schema93.allOf[1].properties.devices.items.required, + parentSchema: schema93.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } else { + if (data12.url !== undefined) { + let data13 = data12.url; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data13 === 'string') { + if (!formats0(data13)) { + validate108.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema93.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } else { + validate108.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema93.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema93.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } + } + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema93.allOf[1].properties.devices.items.type, + parentSchema: schema93.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } + } + var valid7 = _errs27 === errors; + if (!valid7) { + break; + } + } + } else { + validate108.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema93.allOf[1].properties.devices.type, + parentSchema: schema93.allOf[1].properties.devices, + data: data11, + }, + ]; + return false; + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate108.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema93.allOf[1].type, + parentSchema: schema93.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate108.errors = vErrors; + return errors === 0; +} +exports.validateDeviceGroupResponse = validate109; +const schema94 = { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceGroupResponse', + 'x-location': '#/components/schemas/device_group_response', + 'x-schema-type': 'response', +}; +function validate109( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate109.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema94.allOf[0].required, + parentSchema: schema94.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate109.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema94.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema94.allOf[0].properties.url.type, + parentSchema: schema94.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate109.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema94.allOf[0].properties.name.type, + parentSchema: schema94.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate109.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema94.allOf[0].properties.description.type, + parentSchema: schema94.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate109.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema94.allOf[0].properties.type.type, + parentSchema: schema94.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate109.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema94.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema94.allOf[0].properties.type.enum, + parentSchema: schema94.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate109.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema94.allOf[0].properties.isPublic.type, + parentSchema: schema94.allOf[0].properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid2 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate109.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema94.allOf[0].properties.viewer.items.required, + parentSchema: + schema94.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate109.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema94.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate109.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema94.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema94.allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema94.allOf[0].properties.viewer.items.type, + parentSchema: schema94.allOf[0].properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + if (!valid2) { + break; + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema94.allOf[0].properties.viewer.type, + parentSchema: schema94.allOf[0].properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs12 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid4 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate109.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema94.allOf[0].properties.owner.items.required, + parentSchema: + schema94.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate109.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema94.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate109.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema94.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema94.allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema94.allOf[0].properties.owner.items.type, + parentSchema: + schema94.allOf[0].properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs20 === errors; + if (!valid4) { + break; + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema94.allOf[0].properties.owner.type, + parentSchema: schema94.allOf[0].properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs18 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate109.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema94.allOf[0].type, + parentSchema: schema94.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.devices === undefined && (missing3 = 'devices')) { + validate109.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema94.allOf[1].required, + parentSchema: schema94.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data11 = data.type; + const _errs26 = errors; + if ('group' !== data11) { + validate109.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema94.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid6 = _errs26 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.devices !== undefined) { + let data12 = data.devices; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + let missing4; + if (data13.url === undefined && (missing4 = 'url')) { + validate109.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: schema94.allOf[1].properties.devices.items.required, + parentSchema: schema94.allOf[1].properties.devices.items, + data: data13, + }, + ]; + return false; + } else { + if (data13.url !== undefined) { + let data14 = data13.url; + const _errs31 = errors; + if (errors === _errs31) { + if (errors === _errs31) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate109.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema94.allOf[1].properties.devices.items + .properties.url, + data: data14, + }, + ]; + return false; + } + } else { + validate109.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema94.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema94.allOf[1].properties.devices.items + .properties.url, + data: data14, + }, + ]; + return false; + } + } + } + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema94.allOf[1].properties.devices.items.type, + parentSchema: schema94.allOf[1].properties.devices.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate109.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema94.allOf[1].properties.devices.type, + parentSchema: schema94.allOf[1].properties.devices, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate109.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema94.allOf[1].type, + parentSchema: schema94.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs24 === errors; + } + validate109.errors = vErrors; + return errors === 0; +} +exports.validateDeviceRequest = validate110; +const schema95 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceRequest', + 'x-location': '#/components/schemas/device_request', + 'x-schema-type': 'request', +}; +function validate110( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema95.anyOf[0].allOf[0].required, + parentSchema: schema95.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema95.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema95.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema95.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema95.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema95.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema95.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema95.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema95.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema95.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema95.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema95.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema95.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema95.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[0].allOf[0].type, + parentSchema: schema95.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema95.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema95.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema95.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema95.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema95.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[0].allOf[1].type, + parentSchema: schema95.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema95.anyOf[1].allOf[0].required, + parentSchema: schema95.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema95.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema95.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema95.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema95.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema95.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema95.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema95.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[1].allOf[0].properties.viewer.items.type, + parentSchema: + schema95.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema95.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema95.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema95.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema95.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema95.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[1].allOf[0].type, + parentSchema: schema95.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema95.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema95.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema95.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema95.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema95.anyOf[1].allOf[1].properties.services.items + .properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema95.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema95.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[1].allOf[1].type, + parentSchema: schema95.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema95.anyOf[2].allOf[0].required, + parentSchema: schema95.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema95.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema95.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema95.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema95.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema95.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema95.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[2].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema95.anyOf[2].allOf[0].properties.viewer + .items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema95.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema95.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema95.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema95.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema95.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema95.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[2].allOf[0].type, + parentSchema: schema95.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema95.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema95.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema95.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema95.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema95.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema95.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema95.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[2].allOf[1].type, + parentSchema: schema95.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema95.anyOf[3].allOf[0].required, + parentSchema: schema95.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema95.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema95.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema95.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema95.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema95.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema95.anyOf[3].allOf[0].properties.viewer.items + .required, + parentSchema: + schema95.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema95.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema95.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema95.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema95.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema95.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema95.anyOf[3].allOf[0].properties.owner.items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[3].allOf[0].properties.owner.type, + parentSchema: schema95.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[3].allOf[0].type, + parentSchema: schema95.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err101 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema95.anyOf[3].allOf[1].required, + parentSchema: schema95.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema95.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing13; + if (data63.url === undefined && (missing13 = 'url')) { + const err103 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema95.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema95.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema95.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema95.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema95.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema95.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema95.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema95.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema95.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err108 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema95.anyOf[3].allOf[1].type, + parentSchema: schema95.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err109 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema95.anyOf, + parentSchema: schema95, + data, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate110.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate110.errors = vErrors; + return errors === 0; +} +exports.validateDeviceResponse = validate111; +const schema96 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceResponse', + 'x-location': '#/components/schemas/device_response', + 'x-schema-type': 'response', +}; +function validate111( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema96.anyOf[0].allOf[0].required, + parentSchema: schema96.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema96.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema96.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema96.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema96.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema96.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema96.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema96.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema96.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema96.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema96.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema96.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[0].allOf[0].type, + parentSchema: schema96.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema96.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema96.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema96.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema96.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[0].allOf[1].type, + parentSchema: schema96.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema96.anyOf[1].allOf[0].required, + parentSchema: schema96.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema96.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema96.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema96.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema96.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema96.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema96.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema96.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema96.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema96.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema96.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema96.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[1].allOf[0].type, + parentSchema: schema96.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema96.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema96.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema96.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema96.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema96.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema96.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema96.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema96.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema96.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[1].allOf[1].type, + parentSchema: schema96.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema96.anyOf[2].allOf[0].required, + parentSchema: schema96.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema96.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema96.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema96.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema96.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema96.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema96.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema96.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema96.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema96.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema96.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema96.anyOf[2].allOf[0].properties.owner.items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[2].allOf[0].type, + parentSchema: schema96.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema96.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema96.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[2].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema96.anyOf[2].allOf[1].properties.services.items + .properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema96.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[2].allOf[1].properties.services.items.type, + parentSchema: + schema96.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema96.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[2].allOf[1].type, + parentSchema: schema96.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema96.anyOf[3].allOf[0].required, + parentSchema: schema96.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema96.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema96.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema96.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema96.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema96.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema96.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema96.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema96.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema96.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema96.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema96.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema96.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema96.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema96.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema96.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema96.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[3].allOf[0].type, + parentSchema: schema96.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema96.anyOf[3].allOf[1].required, + parentSchema: schema96.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema96.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema96.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema96.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema96.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema96.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema96.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema96.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema96.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema96.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema96.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema96.anyOf[3].allOf[1].type, + parentSchema: schema96.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema96.anyOf, + parentSchema: schema96, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate111.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate111.errors = vErrors; + return errors === 0; +} +exports.validateCallbackRequest = validate112; +const schema97 = { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CallbackRequest', + 'x-location': '#/components/schemas/callback_request', + 'x-schema-type': 'request', +}; +function validate112( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate112.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema97.required, + parentSchema: schema97, + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate112.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema97.properties.callbackType.type, + parentSchema: schema97.properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate112.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema97.type, + parentSchema: schema97, + data, + }, + ]; + return false; + } + } + validate112.errors = vErrors; + return errors === 0; +} +exports.validateCallbackResponse = validate113; +const schema98 = { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CallbackResponse', + 'x-location': '#/components/schemas/callback_response', + 'x-schema-type': 'response', +}; +function validate113( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate113.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema98.required, + parentSchema: schema98, + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate113.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema98.properties.callbackType.type, + parentSchema: schema98.properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate113.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema98.type, + parentSchema: schema98, + data, + }, + ]; + return false; + } + } + validate113.errors = vErrors; + return errors === 0; +} +exports.validateEventCallbackRequest = validate114; +const schema99 = { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'EventCallbackRequest', + 'x-location': '#/components/schemas/event_callback_request', + 'x-schema-type': 'request', +}; +function validate114( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate114.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema99.allOf[0].required, + parentSchema: schema99.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate114.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema99.allOf[0].properties.callbackType.type, + parentSchema: schema99.allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate114.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema99.allOf[0].type, + parentSchema: schema99.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate114.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema99.allOf[1].required, + parentSchema: schema99.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs6 = errors; + if (typeof data1 !== 'string') { + validate114.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema99.allOf[1].properties.callbackType.type, + parentSchema: schema99.allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate114.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: schema99.allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema99.allOf[1].properties.callbackType.enum, + parentSchema: schema99.allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate114.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema99.allOf[1].properties.eventType.type, + parentSchema: schema99.allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate114.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema99.allOf[1].type, + parentSchema: schema99.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate114.errors = vErrors; + return errors === 0; +} +exports.validateEventCallbackResponse = validate115; +const schema100 = { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'EventCallbackResponse', + 'x-location': '#/components/schemas/event_callback_response', + 'x-schema-type': 'response', +}; +function validate115( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate115.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema100.allOf[0].required, + parentSchema: schema100.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate115.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema100.allOf[0].properties.callbackType.type, + parentSchema: schema100.allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate115.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema100.allOf[0].type, + parentSchema: schema100.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate115.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema100.allOf[1].required, + parentSchema: schema100.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs6 = errors; + if (typeof data1 !== 'string') { + validate115.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema100.allOf[1].properties.callbackType.type, + parentSchema: schema100.allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate115.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: schema100.allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema100.allOf[1].properties.callbackType.enum, + parentSchema: schema100.allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate115.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema100.allOf[1].properties.eventType.type, + parentSchema: schema100.allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate115.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema100.allOf[1].type, + parentSchema: schema100.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate115.errors = vErrors; + return errors === 0; +} +exports.validateDeviceChangedEventCallbackRequest = validate116; +const schema101 = { + title: 'Device Changed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['device-changed'] }, + device: { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'device'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceChangedEventCallbackRequest', + 'x-location': '#/components/schemas/device_changed_request', + 'x-schema-type': 'request', +}; +function validate116( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema101.allOf[0].allOf[0].required, + parentSchema: schema101.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate116.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema101.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema101.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[0].allOf[0].type, + parentSchema: schema101.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema101.allOf[0].allOf[1].required, + parentSchema: schema101.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate116.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema101.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema101.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate116.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema101.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema101.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate116.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema101.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema101.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[0].allOf[1].type, + parentSchema: schema101.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.device === undefined && (missing2 = 'device')) + ) { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema101.allOf[1].required, + parentSchema: schema101.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate116.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema101.allOf[1].properties.eventType.type, + parentSchema: schema101.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'device-changed')) { + validate116.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema101.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema101.allOf[1].properties.eventType.enum, + parentSchema: schema101.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.device !== undefined) { + let data4 = data.device; + const _errs15 = errors; + const _errs16 = errors; + let valid5 = false; + const _errs17 = errors; + const _errs18 = errors; + if (errors === _errs18) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.type === undefined && (missing3 = 'type')) || + (data4.name === undefined && (missing3 = 'name')) || + (data4.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err0 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0].required, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data4.name !== undefined) { + let data5 = data4.name; + const _errs20 = errors; + if (typeof data5 !== 'string') { + const err1 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.name.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.name, + data: data5, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid7 = _errs20 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.description !== undefined) { + let data6 = data4.description; + const _errs22 = errors; + if (typeof data6 !== 'string') { + const err2 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.description.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.description, + data: data6, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid7 = _errs22 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.type !== undefined) { + let data7 = data4.type; + const _errs24 = errors; + if (typeof data7 !== 'string') { + const err3 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type, + data: data7, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data7 === 'device' || + data7 === 'group' || + data7 === 'edge instantiable' || + data7 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.enum, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type, + data: data7, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid7 = _errs24 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.isPublic !== undefined) { + let data8 = data4.isPublic; + const _errs26 = errors; + if (typeof data8 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.isPublic.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.isPublic, + data: data8, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.viewer !== undefined) { + let data9 = data4.viewer; + const _errs28 = errors; + if (errors === _errs28) { + if (Array.isArray(data9)) { + var valid8 = true; + const len0 = data9.length; + for (let i0 = 0; i0 < len0; i0++) { + let data10 = data9[i0]; + const _errs30 = errors; + if (errors === _errs30) { + if ( + data10 && + typeof data10 == 'object' && + !Array.isArray(data10) + ) { + let missing4; + if ( + data10.url === undefined && + (missing4 = 'url') + ) { + const err6 = { + instancePath: + instancePath + '/device/viewer/' + i0, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + + missing4 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer + .items, + data: data10, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data10.url !== undefined) { + let data11 = data10.url; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err7 = { + instancePath: + instancePath + + '/device/viewer/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.viewer.items + .properties.url, + data: data11, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + + '/device/viewer/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties + .viewer.items.properties.url, + data: data11, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: + instancePath + '/device/viewer/' + i0, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer.items.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer.items, + data: data10, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid8 = _errs30 === errors; + if (!valid8) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer, + data: data9, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.owner !== undefined) { + let data12 = data4.owner; + const _errs34 = errors; + if (errors === _errs34) { + if (Array.isArray(data12)) { + var valid10 = true; + const len1 = data12.length; + for (let i1 = 0; i1 < len1; i1++) { + let data13 = data12[i1]; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == 'object' && + !Array.isArray(data13) + ) { + let missing5; + if ( + data13.url === undefined && + (missing5 = 'url') + ) { + const err11 = { + instancePath: + instancePath + '/device/owner/' + i1, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data13.url !== undefined) { + let data14 = data13.url; + const _errs38 = errors; + if (errors === _errs38) { + if (errors === _errs38) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err12 = { + instancePath: + instancePath + + '/device/owner/' + + i1 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url, + data: data14, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + + '/device/owner/' + + i1 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url, + data: data14, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: + instancePath + '/device/owner/' + i1, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid10 = _errs36 === errors; + if (!valid10) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.owner.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.owner, + data: data12, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid7 = _errs34 === errors; + } else { + var valid7 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[1].properties.device.anyOf[0].allOf[0].type, + parentSchema: schema101.allOf[1].properties.device.anyOf[0].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid6 = _errs18 === errors; + if (valid6) { + const _errs40 = errors; + if (errors === _errs40) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data15 = data4.type; + const _errs42 = errors; + if ('cloud instantiable' !== data15) { + const err17 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.type, + data: data15, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid12 = _errs42 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data4.instantiateUrl !== undefined) { + let data16 = data4.instantiateUrl; + const _errs43 = errors; + if (errors === _errs43) { + if (errors === _errs43) { + if (typeof data16 === 'string') { + if (!formats0(data16)) { + const err18 = { + instancePath: instancePath + '/device/instantiateUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl, + data: data16, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/device/instantiateUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl, + data: data16, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid12 = _errs43 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data4.services !== undefined) { + let data17 = data4.services; + const _errs45 = errors; + if (errors === _errs45) { + if (Array.isArray(data17)) { + var valid13 = true; + const len2 = data17.length; + for (let i2 = 0; i2 < len2; i2++) { + let data18 = data17[i2]; + const _errs47 = errors; + if (errors === _errs47) { + if ( + data18 && + typeof data18 == 'object' && + !Array.isArray(data18) + ) { + if (data18.serviceType !== undefined) { + let data19 = data18.serviceType; + const _errs50 = errors; + if (errors === _errs50) { + if (errors === _errs50) { + if (typeof data19 === 'string') { + if (!formats0(data19)) { + const err20 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data19, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data19, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid14 = _errs50 === errors; + } else { + var valid14 = true; + } + if (valid14) { + if (data18.serviceId !== undefined) { + let data20 = data18.serviceId; + const _errs52 = errors; + if (typeof data20 !== 'string') { + const err22 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceId, + data: data20, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid14 = _errs52 === errors; + } else { + var valid14 = true; + } + if (valid14) { + if (data18.serviceDirection !== undefined) { + let data21 = data18.serviceDirection; + const _errs54 = errors; + if (typeof data21 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection, + data: data21, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data21 === 'consumer' || + data21 === 'producer' || + data21 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection, + data: data21, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid14 = _errs54 === errors; + } else { + var valid14 = true; + } + } + } + } else { + const err25 = { + instancePath: + instancePath + '/device/services/' + i2, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items, + data: data18, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid13 = _errs47 === errors; + if (!valid13) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.services.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.services, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid12 = _errs45 === errors; + } else { + var valid12 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[1].properties.device.anyOf[0].allOf[1].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[0].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid6 = _errs40 === errors; + } + var _valid0 = _errs17 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs56 = errors; + const _errs57 = errors; + if (errors === _errs57) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing6; + if ( + (data4.type === undefined && (missing6 = 'type')) || + (data4.name === undefined && (missing6 = 'name')) || + (data4.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err28 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0].required, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data4.name !== undefined) { + let data22 = data4.name; + const _errs59 = errors; + if (typeof data22 !== 'string') { + const err29 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.name.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.name, + data: data22, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid16 = _errs59 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.description !== undefined) { + let data23 = data4.description; + const _errs61 = errors; + if (typeof data23 !== 'string') { + const err30 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.description.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.description, + data: data23, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid16 = _errs61 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.type !== undefined) { + let data24 = data4.type; + const _errs63 = errors; + if (typeof data24 !== 'string') { + const err31 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type, + data: data24, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data24 === 'device' || + data24 === 'group' || + data24 === 'edge instantiable' || + data24 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.enum, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type, + data: data24, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid16 = _errs63 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.isPublic !== undefined) { + let data25 = data4.isPublic; + const _errs65 = errors; + if (typeof data25 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.isPublic.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.isPublic, + data: data25, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.viewer !== undefined) { + let data26 = data4.viewer; + const _errs67 = errors; + if (errors === _errs67) { + if (Array.isArray(data26)) { + var valid17 = true; + const len3 = data26.length; + for (let i3 = 0; i3 < len3; i3++) { + let data27 = data26[i3]; + const _errs69 = errors; + if (errors === _errs69) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing7; + if ( + data27.url === undefined && + (missing7 = 'url') + ) { + const err34 = { + instancePath: + instancePath + '/device/viewer/' + i3, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + + missing7 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs71 = errors; + if (errors === _errs71) { + if (errors === _errs71) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err35 = { + instancePath: + instancePath + + '/device/viewer/' + + i3 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + + '/device/viewer/' + + i3 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: + instancePath + '/device/viewer/' + i3, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid17 = _errs69 === errors; + if (!valid17) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.viewer.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.viewer, + data: data26, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid16 = _errs67 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.owner !== undefined) { + let data29 = data4.owner; + const _errs73 = errors; + if (errors === _errs73) { + if (Array.isArray(data29)) { + var valid19 = true; + const len4 = data29.length; + for (let i4 = 0; i4 < len4; i4++) { + let data30 = data29[i4]; + const _errs75 = errors; + if (errors === _errs75) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + let missing8; + if ( + data30.url === undefined && + (missing8 = 'url') + ) { + const err39 = { + instancePath: + instancePath + '/device/owner/' + i4, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data30.url !== undefined) { + let data31 = data30.url; + const _errs77 = errors; + if (errors === _errs77) { + if (errors === _errs77) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err40 = { + instancePath: + instancePath + + '/device/owner/' + + i4 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url, + data: data31, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + + '/device/owner/' + + i4 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url, + data: data31, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: + instancePath + '/device/owner/' + i4, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid19 = _errs75 === errors; + if (!valid19) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.owner.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.owner, + data: data29, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid16 = _errs73 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[1].properties.device.anyOf[1].allOf[0].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid15 = _errs57 === errors; + if (valid15) { + const _errs79 = errors; + if (errors === _errs79) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data32 = data4.type; + const _errs81 = errors; + if ('device' !== data32) { + const err45 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.type, + data: data32, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid21 = _errs81 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.experiment !== undefined) { + let data33 = data4.experiment; + const _errs82 = errors; + if (errors === _errs82) { + if (errors === _errs82) { + if (typeof data33 === 'string') { + if (!formats0(data33)) { + const err46 = { + instancePath: instancePath + '/device/experiment', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.experiment, + data: data33, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/device/experiment', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.experiment.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.experiment, + data: data33, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid21 = _errs82 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.services !== undefined) { + let data34 = data4.services; + const _errs84 = errors; + if (errors === _errs84) { + if (Array.isArray(data34)) { + var valid22 = true; + const len5 = data34.length; + for (let i5 = 0; i5 < len5; i5++) { + let data35 = data34[i5]; + const _errs86 = errors; + if (errors === _errs86) { + if ( + data35 && + typeof data35 == 'object' && + !Array.isArray(data35) + ) { + if (data35.serviceType !== undefined) { + let data36 = data35.serviceType; + const _errs89 = errors; + if (errors === _errs89) { + if (errors === _errs89) { + if (typeof data36 === 'string') { + if (!formats0(data36)) { + const err48 = { + instancePath: + instancePath + + '/device/services/' + + i5 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceType, + data: data36, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + + '/device/services/' + + i5 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data36, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid23 = _errs89 === errors; + } else { + var valid23 = true; + } + if (valid23) { + if (data35.serviceId !== undefined) { + let data37 = data35.serviceId; + const _errs91 = errors; + if (typeof data37 !== 'string') { + const err50 = { + instancePath: + instancePath + + '/device/services/' + + i5 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data37, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid23 = _errs91 === errors; + } else { + var valid23 = true; + } + if (valid23) { + if (data35.serviceDirection !== undefined) { + let data38 = data35.serviceDirection; + const _errs93 = errors; + if (typeof data38 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/device/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection + .type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data38, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data38 === 'consumer' || + data38 === 'producer' || + data38 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/device/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection + .enum, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data38, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid23 = _errs93 === errors; + } else { + var valid23 = true; + } + } + } + } else { + const err53 = { + instancePath: + instancePath + '/device/services/' + i5, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services.items.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services.items, + data: data35, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid22 = _errs86 === errors; + if (!valid22) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.services.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.services, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid21 = _errs84 === errors; + } else { + var valid21 = true; + } + } + } + } else { + const err55 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[1].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid15 = _errs79 === errors; + } + var _valid0 = _errs56 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs95 = errors; + const _errs96 = errors; + if (errors === _errs96) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing9; + if ( + (data4.type === undefined && (missing9 = 'type')) || + (data4.name === undefined && (missing9 = 'name')) || + (data4.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err56 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .required, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data4.name !== undefined) { + let data39 = data4.name; + const _errs98 = errors; + if (typeof data39 !== 'string') { + const err57 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.name.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.name, + data: data39, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid25 = _errs98 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data4.description !== undefined) { + let data40 = data4.description; + const _errs100 = errors; + if (typeof data40 !== 'string') { + const err58 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.description.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.description, + data: data40, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid25 = _errs100 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data4.type !== undefined) { + let data41 = data4.type; + const _errs102 = errors; + if (typeof data41 !== 'string') { + const err59 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.type.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.type, + data: data41, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data41 === 'device' || + data41 === 'group' || + data41 === 'edge instantiable' || + data41 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.type.enum, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.type, + data: data41, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid25 = _errs102 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data4.isPublic !== undefined) { + let data42 = data4.isPublic; + const _errs104 = errors; + if (typeof data42 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.isPublic.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.isPublic, + data: data42, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data4.viewer !== undefined) { + let data43 = data4.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data43)) { + var valid26 = true; + const len6 = data43.length; + for (let i6 = 0; i6 < len6; i6++) { + let data44 = data43[i6]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data44 && + typeof data44 == 'object' && + !Array.isArray(data44) + ) { + let missing10; + if ( + data44.url === undefined && + (missing10 = 'url') + ) { + const err62 = { + instancePath: + instancePath + '/device/viewer/' + i6, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items, + data: data44, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data44.url !== undefined) { + let data45 = data44.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err63 = { + instancePath: + instancePath + + '/device/viewer/' + + i6 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url, + data: data45, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + + '/device/viewer/' + + i6 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url, + data: data45, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: + instancePath + '/device/viewer/' + i6, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items, + data: data44, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid26 = _errs108 === errors; + if (!valid26) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.viewer.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.viewer, + data: data43, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid25 = _errs106 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data4.owner !== undefined) { + let data46 = data4.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data46)) { + var valid28 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing11; + if ( + data47.url === undefined && + (missing11 = 'url') + ) { + const err67 = { + instancePath: + instancePath + '/device/owner/' + i7, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err68 = { + instancePath: + instancePath + + '/device/owner/' + + i7 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1] + .properties.device + .anyOf[2].allOf[0] + .properties.owner.items + .properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + + '/device/owner/' + + i7 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.owner.items + .properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: + instancePath + '/device/owner/' + i7, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid28 = _errs114 === errors; + if (!valid28) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.owner.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.owner, + data: data46, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid25 = _errs112 === errors; + } else { + var valid25 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid24 = _errs96 === errors; + if (valid24) { + const _errs118 = errors; + if (errors === _errs118) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data49 = data4.type; + const _errs120 = errors; + if ('edge instantiable' !== data49) { + const err73 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[1] + .properties.type, + data: data49, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid30 = _errs120 === errors; + } else { + var valid30 = true; + } + if (valid30) { + if (data4.codeUrl !== undefined) { + let data50 = data4.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data50 === 'string') { + if (!formats0(data50)) { + const err74 = { + instancePath: instancePath + '/device/codeUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl, + data: data50, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/device/codeUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl, + data: data50, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid30 = _errs121 === errors; + } else { + var valid30 = true; + } + if (valid30) { + if (data4.services !== undefined) { + let data51 = data4.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data51)) { + var valid31 = true; + const len8 = data51.length; + for (let i8 = 0; i8 < len8; i8++) { + let data52 = data51[i8]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data52 && + typeof data52 == 'object' && + !Array.isArray(data52) + ) { + if (data52.serviceType !== undefined) { + let data53 = data52.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err76 = { + instancePath: + instancePath + + '/device/services/' + + i8 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType, + data: data53, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + + '/device/services/' + + i8 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType, + data: data53, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid32 = _errs128 === errors; + } else { + var valid32 = true; + } + if (valid32) { + if (data52.serviceId !== undefined) { + let data54 = data52.serviceId; + const _errs130 = errors; + if (typeof data54 !== 'string') { + const err78 = { + instancePath: + instancePath + + '/device/services/' + + i8 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data54, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid32 = _errs130 === errors; + } else { + var valid32 = true; + } + if (valid32) { + if (data52.serviceDirection !== undefined) { + let data55 = data52.serviceDirection; + const _errs132 = errors; + if (typeof data55 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/device/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data55, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data55 === 'consumer' || + data55 === 'producer' || + data55 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/device/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data55, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid32 = _errs132 === errors; + } else { + var valid32 = true; + } + } + } + } else { + const err81 = { + instancePath: + instancePath + '/device/services/' + i8, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.items.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.items, + data: data52, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid31 = _errs125 === errors; + if (!valid31) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid30 = _errs123 === errors; + } else { + var valid30 = true; + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[2].allOf[1].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[2].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid24 = _errs118 === errors; + } + var _valid0 = _errs95 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing12; + if ( + (data4.type === undefined && (missing12 = 'type')) || + (data4.name === undefined && (missing12 = 'name')) || + (data4.isPublic === undefined && (missing12 = 'isPublic')) + ) { + const err84 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0] + .required, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data4.name !== undefined) { + let data56 = data4.name; + const _errs137 = errors; + if (typeof data56 !== 'string') { + const err85 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.name.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.name, + data: data56, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid34 = _errs137 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data4.description !== undefined) { + let data57 = data4.description; + const _errs139 = errors; + if (typeof data57 !== 'string') { + const err86 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.description.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.description, + data: data57, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid34 = _errs139 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data4.type !== undefined) { + let data58 = data4.type; + const _errs141 = errors; + if (typeof data58 !== 'string') { + const err87 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type, + data: data58, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data58 === 'device' || + data58 === 'group' || + data58 === 'edge instantiable' || + data58 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.enum, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type, + data: data58, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid34 = _errs141 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data4.isPublic !== undefined) { + let data59 = data4.isPublic; + const _errs143 = errors; + if (typeof data59 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.isPublic.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.isPublic, + data: data59, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data4.viewer !== undefined) { + let data60 = data4.viewer; + const _errs145 = errors; + if (errors === _errs145) { + if (Array.isArray(data60)) { + var valid35 = true; + const len9 = data60.length; + for (let i9 = 0; i9 < len9; i9++) { + let data61 = data60[i9]; + const _errs147 = errors; + if (errors === _errs147) { + if ( + data61 && + typeof data61 == 'object' && + !Array.isArray(data61) + ) { + let missing13; + if ( + data61.url === undefined && + (missing13 = 'url') + ) { + const err90 = { + instancePath: + instancePath + '/device/viewer/' + i9, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + + missing13 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items, + data: data61, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data61.url !== undefined) { + let data62 = data61.url; + const _errs149 = errors; + if (errors === _errs149) { + if (errors === _errs149) { + if (typeof data62 === 'string') { + if (!formats0(data62)) { + const err91 = { + instancePath: + instancePath + + '/device/viewer/' + + i9 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.viewer.items + .properties.url, + data: data62, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + + '/device/viewer/' + + i9 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.viewer.items + .properties.url, + data: data62, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: + instancePath + '/device/viewer/' + i9, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items, + data: data61, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid35 = _errs147 === errors; + if (!valid35) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.viewer.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.viewer, + data: data60, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid34 = _errs145 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data4.owner !== undefined) { + let data63 = data4.owner; + const _errs151 = errors; + if (errors === _errs151) { + if (Array.isArray(data63)) { + var valid37 = true; + const len10 = data63.length; + for (let i10 = 0; i10 < len10; i10++) { + let data64 = data63[i10]; + const _errs153 = errors; + if (errors === _errs153) { + if ( + data64 && + typeof data64 == 'object' && + !Array.isArray(data64) + ) { + let missing14; + if ( + data64.url === undefined && + (missing14 = 'url') + ) { + const err95 = { + instancePath: + instancePath + + '/device/owner/' + + i10, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { + missingProperty: missing14, + }, + message: + "must have required property '" + + missing14 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .owner.items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .owner.items, + data: data64, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data64.url !== undefined) { + let data65 = data64.url; + const _errs155 = errors; + if (errors === _errs155) { + if (errors === _errs155) { + if (typeof data65 === 'string') { + if (!formats0(data65)) { + const err96 = { + instancePath: + instancePath + + '/device/owner/' + + i10 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url, + data: data65, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + + '/device/owner/' + + i10 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema101.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url, + data: data65, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: + instancePath + '/device/owner/' + i10, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner + .items, + data: data64, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid37 = _errs153 === errors; + if (!valid37) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner, + data: data63, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid34 = _errs151 === errors; + } else { + var valid34 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid33 = _errs135 === errors; + if (valid33) { + const _errs157 = errors; + if (errors === _errs157) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing15; + if (data4.devices === undefined && (missing15 = 'devices')) { + const err101 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing15 }, + message: "must have required property '" + missing15 + "'", + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[1] + .required, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data4.type !== undefined) { + let data66 = data4.type; + const _errs159 = errors; + if ('group' !== data66) { + const err102 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[1] + .properties.type, + data: data66, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid39 = _errs159 === errors; + } else { + var valid39 = true; + } + if (valid39) { + if (data4.devices !== undefined) { + let data67 = data4.devices; + const _errs160 = errors; + if (errors === _errs160) { + if (Array.isArray(data67)) { + var valid40 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs162 = errors; + if (errors === _errs162) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing16; + if ( + data68.url === undefined && + (missing16 = 'url') + ) { + const err103 = { + instancePath: + instancePath + '/device/devices/' + i11, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing16 }, + message: + "must have required property '" + + missing16 + + "'", + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items.required, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs164 = errors; + if (errors === _errs164) { + if (errors === _errs164) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err104 = { + instancePath: + instancePath + + '/device/devices/' + + i11 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema101.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + + '/device/devices/' + + i11 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema101.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema101.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: + instancePath + '/device/devices/' + i11, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items.type, + parentSchema: + schema101.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid40 = _errs162 === errors; + if (!valid40) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/device/devices', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices.type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices, + data: data67, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid39 = _errs160 === errors; + } else { + var valid39 = true; + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema101.allOf[1].properties.device.anyOf[3].allOf[1].type, + parentSchema: + schema101.allOf[1].properties.device.anyOf[3].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid33 = _errs157 === errors; + } + var _valid0 = _errs134 === errors; + valid5 = valid5 || _valid0; + } + } + } + if (!valid5) { + const err109 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema101.allOf[1].properties.device.anyOf, + parentSchema: schema101.allOf[1].properties.device, + data: data4, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate116.errors = vErrors; + return false; + } else { + errors = _errs16; + if (vErrors !== null) { + if (_errs16) { + vErrors.length = _errs16; + } else { + vErrors = null; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate116.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema101.allOf[1].type, + parentSchema: schema101.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate116.errors = vErrors; + return errors === 0; +} +exports.validateDeviceChangedEventCallbackResponse = validate117; +const schema102 = { + title: 'Device Changed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['device-changed'] }, + device: { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: [ + 'device', + 'group', + 'edge instantiable', + 'cloud instantiable', + ], + }, + isPublic: { + type: 'boolean', + description: + 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the user', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'device'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'DeviceChangedEventCallbackResponse', + 'x-location': '#/components/schemas/device_changed_response', + 'x-schema-type': 'response', +}; +function validate117( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema102.allOf[0].allOf[0].required, + parentSchema: schema102.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate117.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema102.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema102.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[0].allOf[0].type, + parentSchema: schema102.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema102.allOf[0].allOf[1].required, + parentSchema: schema102.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate117.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema102.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema102.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate117.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema102.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema102.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate117.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema102.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema102.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[0].allOf[1].type, + parentSchema: schema102.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.device === undefined && (missing2 = 'device')) + ) { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema102.allOf[1].required, + parentSchema: schema102.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate117.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema102.allOf[1].properties.eventType.type, + parentSchema: schema102.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'device-changed')) { + validate117.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema102.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema102.allOf[1].properties.eventType.enum, + parentSchema: schema102.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.device !== undefined) { + let data4 = data.device; + const _errs15 = errors; + const _errs16 = errors; + let valid5 = false; + const _errs17 = errors; + const _errs18 = errors; + if (errors === _errs18) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.url === undefined && (missing3 = 'url')) || + (data4.type === undefined && (missing3 = 'type')) || + (data4.name === undefined && (missing3 = 'name')) || + (data4.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err0 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0].required, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + const err1 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.url, + data: data5, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.url.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.url, + data: data5, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid7 = _errs20 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.name !== undefined) { + let data6 = data4.name; + const _errs22 = errors; + if (typeof data6 !== 'string') { + const err3 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.name.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.name, + data: data6, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid7 = _errs22 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.description !== undefined) { + let data7 = data4.description; + const _errs24 = errors; + if (typeof data7 !== 'string') { + const err4 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.description.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.description, + data: data7, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid7 = _errs24 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.type !== undefined) { + let data8 = data4.type; + const _errs26 = errors; + if (typeof data8 !== 'string') { + const err5 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type, + data: data8, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data8 === 'device' || + data8 === 'group' || + data8 === 'edge instantiable' || + data8 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type.enum, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.type, + data: data8, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.isPublic !== undefined) { + let data9 = data4.isPublic; + const _errs28 = errors; + if (typeof data9 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.isPublic.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[0] + .properties.isPublic, + data: data9, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.viewer !== undefined) { + let data10 = data4.viewer; + const _errs30 = errors; + if (errors === _errs30) { + if (Array.isArray(data10)) { + var valid8 = true; + const len0 = data10.length; + for (let i0 = 0; i0 < len0; i0++) { + let data11 = data10[i0]; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + let missing4; + if ( + data11.url === undefined && + (missing4 = 'url') + ) { + const err8 = { + instancePath: + instancePath + '/device/viewer/' + i0, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + + missing4 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer + .items, + data: data11, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data11.url !== undefined) { + let data12 = data11.url; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err9 = { + instancePath: + instancePath + + '/device/viewer/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.viewer.items + .properties.url, + data: data12, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + + '/device/viewer/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.viewer.items + .properties.url, + data: data12, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: + instancePath + '/device/viewer/' + i0, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer.items + .type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.viewer + .items, + data: data11, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid8 = _errs32 === errors; + if (!valid8) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.viewer, + data: data10, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid7 = _errs30 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data4.owner !== undefined) { + let data13 = data4.owner; + const _errs36 = errors; + if (errors === _errs36) { + if (Array.isArray(data13)) { + var valid10 = true; + const len1 = data13.length; + for (let i1 = 0; i1 < len1; i1++) { + let data14 = data13[i1]; + const _errs38 = errors; + if (errors === _errs38) { + if ( + data14 && + typeof data14 == 'object' && + !Array.isArray(data14) + ) { + let missing5; + if ( + data14.url === undefined && + (missing5 = 'url') + ) { + const err13 = { + instancePath: + instancePath + '/device/owner/' + i1, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data14.url !== undefined) { + let data15 = data14.url; + const _errs40 = errors; + if (errors === _errs40) { + if (errors === _errs40) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err14 = { + instancePath: + instancePath + + '/device/owner/' + + i1 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url, + data: data15, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + + '/device/owner/' + + i1 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[0].allOf[0] + .properties.owner.items + .properties.url, + data: data15, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: + instancePath + '/device/owner/' + i1, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[0].properties.owner + .items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid10 = _errs38 === errors; + if (!valid10) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.owner.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[0].properties.owner, + data: data13, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid7 = _errs36 === errors; + } else { + var valid7 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[1].properties.device.anyOf[0].allOf[0].type, + parentSchema: schema102.allOf[1].properties.device.anyOf[0].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid6 = _errs18 === errors; + if (valid6) { + const _errs42 = errors; + if (errors === _errs42) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data16 = data4.type; + const _errs44 = errors; + if ('cloud instantiable' !== data16) { + const err19 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.type, + data: data16, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid12 = _errs44 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data4.instantiateUrl !== undefined) { + let data17 = data4.instantiateUrl; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + const err20 = { + instancePath: instancePath + '/device/instantiateUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/device/instantiateUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.instantiateUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid12 = _errs45 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data4.services !== undefined) { + let data18 = data4.services; + const _errs47 = errors; + if (errors === _errs47) { + if (Array.isArray(data18)) { + var valid13 = true; + const len2 = data18.length; + for (let i2 = 0; i2 < len2; i2++) { + let data19 = data18[i2]; + const _errs49 = errors; + if (errors === _errs49) { + if ( + data19 && + typeof data19 == 'object' && + !Array.isArray(data19) + ) { + if (data19.serviceType !== undefined) { + let data20 = data19.serviceType; + const _errs52 = errors; + if (errors === _errs52) { + if (errors === _errs52) { + if (typeof data20 === 'string') { + if (!formats0(data20)) { + const err22 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid14 = _errs52 === errors; + } else { + var valid14 = true; + } + if (valid14) { + if (data19.serviceId !== undefined) { + let data21 = data19.serviceId; + const _errs54 = errors; + if (typeof data21 !== 'string') { + const err24 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceId, + data: data21, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid14 = _errs54 === errors; + } else { + var valid14 = true; + } + if (valid14) { + if (data19.serviceDirection !== undefined) { + let data22 = data19.serviceDirection; + const _errs56 = errors; + if (typeof data22 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection, + data: data22, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data22 === 'consumer' || + data22 === 'producer' || + data22 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/device/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection, + data: data22, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid14 = _errs56 === errors; + } else { + var valid14 = true; + } + } + } + } else { + const err27 = { + instancePath: + instancePath + '/device/services/' + i2, + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0] + .allOf[1].properties.services.items, + data: data19, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid13 = _errs49 === errors; + if (!valid13) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.services.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1] + .properties.services, + data: data18, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid12 = _errs47 === errors; + } else { + var valid12 = true; + } + } + } + } else { + const err29 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[1].properties.device.anyOf[0].allOf[1].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[0].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid6 = _errs42 === errors; + } + var _valid0 = _errs17 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs58 = errors; + const _errs59 = errors; + if (errors === _errs59) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing6; + if ( + (data4.url === undefined && (missing6 = 'url')) || + (data4.type === undefined && (missing6 = 'type')) || + (data4.name === undefined && (missing6 = 'name')) || + (data4.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err30 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0].required, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data4.url !== undefined) { + let data23 = data4.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err31 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.url.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid16 = _errs61 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.name !== undefined) { + let data24 = data4.name; + const _errs63 = errors; + if (typeof data24 !== 'string') { + const err33 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.name.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.name, + data: data24, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid16 = _errs63 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.description !== undefined) { + let data25 = data4.description; + const _errs65 = errors; + if (typeof data25 !== 'string') { + const err34 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.description.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.description, + data: data25, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.type !== undefined) { + let data26 = data4.type; + const _errs67 = errors; + if (typeof data26 !== 'string') { + const err35 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type, + data: data26, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data26 === 'device' || + data26 === 'group' || + data26 === 'edge instantiable' || + data26 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type.enum, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0] + .properties.type, + data: data26, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid16 = _errs67 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.isPublic !== undefined) { + let data27 = data4.isPublic; + const _errs69 = errors; + if (typeof data27 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.isPublic.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.isPublic, + data: data27, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.viewer !== undefined) { + let data28 = data4.viewer; + const _errs71 = errors; + if (errors === _errs71) { + if (Array.isArray(data28)) { + var valid17 = true; + const len3 = data28.length; + for (let i3 = 0; i3 < len3; i3++) { + let data29 = data28[i3]; + const _errs73 = errors; + if (errors === _errs73) { + if ( + data29 && + typeof data29 == 'object' && + !Array.isArray(data29) + ) { + let missing7; + if ( + data29.url === undefined && + (missing7 = 'url') + ) { + const err38 = { + instancePath: + instancePath + '/device/viewer/' + i3, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + + missing7 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items, + data: data29, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data29.url !== undefined) { + let data30 = data29.url; + const _errs75 = errors; + if (errors === _errs75) { + if (errors === _errs75) { + if (typeof data30 === 'string') { + if (!formats0(data30)) { + const err39 = { + instancePath: + instancePath + + '/device/viewer/' + + i3 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url, + data: data30, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + + '/device/viewer/' + + i3 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.viewer.items + .properties.url, + data: data30, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: + instancePath + '/device/viewer/' + i3, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.viewer + .items, + data: data29, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid17 = _errs73 === errors; + if (!valid17) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.viewer.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.viewer, + data: data28, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid16 = _errs71 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data4.owner !== undefined) { + let data31 = data4.owner; + const _errs77 = errors; + if (errors === _errs77) { + if (Array.isArray(data31)) { + var valid19 = true; + const len4 = data31.length; + for (let i4 = 0; i4 < len4; i4++) { + let data32 = data31[i4]; + const _errs79 = errors; + if (errors === _errs79) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + let missing8; + if ( + data32.url === undefined && + (missing8 = 'url') + ) { + const err43 = { + instancePath: + instancePath + '/device/owner/' + i4, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data32.url !== undefined) { + let data33 = data32.url; + const _errs81 = errors; + if (errors === _errs81) { + if (errors === _errs81) { + if (typeof data33 === 'string') { + if (!formats0(data33)) { + const err44 = { + instancePath: + instancePath + + '/device/owner/' + + i4 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[1].allOf[0] + .properties.owner.items + .properties.url, + data: data33, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + + '/device/owner/' + + i4 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[0] + .properties.owner.items + .properties.url, + data: data33, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: + instancePath + '/device/owner/' + i4, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[0].properties.owner + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid19 = _errs79 === errors; + if (!valid19) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.owner.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[0].properties.owner, + data: data31, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid16 = _errs77 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[1].properties.device.anyOf[1].allOf[0].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid15 = _errs59 === errors; + if (valid15) { + const _errs83 = errors; + if (errors === _errs83) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data34 = data4.type; + const _errs85 = errors; + if ('device' !== data34) { + const err49 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.type, + data: data34, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid21 = _errs85 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.connected !== undefined) { + let data35 = data4.connected; + const _errs86 = errors; + if (typeof data35 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/device/connected', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.connected.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.connected, + data: data35, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid21 = _errs86 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.announcedAvailability !== undefined) { + let data36 = data4.announcedAvailability; + const _errs88 = errors; + if (errors === _errs88) { + if (Array.isArray(data36)) { + var valid22 = true; + const len5 = data36.length; + for (let i5 = 0; i5 < len5; i5++) { + let data37 = data36[i5]; + const _errs90 = errors; + if (errors === _errs90) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.start !== undefined) { + let data38 = data37.start; + const _errs92 = errors; + if (errors === _errs92) { + if (errors === _errs92) { + if (typeof data38 === 'string') { + if (!formats22.validate(data38)) { + const err51 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.start, + data: data38, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.start.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.start, + data: data38, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid23 = _errs92 === errors; + } else { + var valid23 = true; + } + if (valid23) { + if (data37.end !== undefined) { + let data39 = data37.end; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data39 === 'string') { + if (!formats22.validate(data39)) { + const err53 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.end, + data: data39, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.end.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .announcedAvailability.items + .properties.end, + data: data39, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid23 = _errs94 === errors; + } else { + var valid23 = true; + } + } + } else { + const err55 = { + instancePath: + instancePath + + '/device/announcedAvailability/' + + i5, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.announcedAvailability + .items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid22 = _errs90 === errors; + if (!valid22) { + break; + } + } + } else { + const err56 = { + instancePath: + instancePath + '/device/announcedAvailability', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.announcedAvailability.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1] + .properties.announcedAvailability, + data: data36, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid21 = _errs88 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.experiment !== undefined) { + let data40 = data4.experiment; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err57 = { + instancePath: instancePath + '/device/experiment', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.experiment, + data: data40, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/device/experiment', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.experiment.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.experiment, + data: data40, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid21 = _errs96 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data4.services !== undefined) { + let data41 = data4.services; + const _errs98 = errors; + if (errors === _errs98) { + if (Array.isArray(data41)) { + var valid24 = true; + const len6 = data41.length; + for (let i6 = 0; i6 < len6; i6++) { + let data42 = data41[i6]; + const _errs100 = errors; + if (errors === _errs100) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + if (data42.serviceType !== undefined) { + let data43 = data42.serviceType; + const _errs103 = errors; + if (errors === _errs103) { + if (errors === _errs103) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err59 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties + .device.anyOf[1].allOf[1] + .properties.services.items + .properties.serviceType, + data: data43, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceType.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceType, + data: data43, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid25 = _errs103 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data42.serviceId !== undefined) { + let data44 = data42.serviceId; + const _errs105 = errors; + if (typeof data44 !== 'string') { + const err61 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties.serviceId + .type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceId, + data: data44, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data42.serviceDirection !== undefined) { + let data45 = data42.serviceDirection; + const _errs107 = errors; + if (typeof data45 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data45, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data45 === 'consumer' || + data45 === 'producer' || + data45 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/device/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties + .device.anyOf[1].allOf[1] + .properties.services.items + .properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data45, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err64 = { + instancePath: + instancePath + '/device/services/' + i6, + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[1].allOf[1].properties.services + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid24 = _errs100 === errors; + if (!valid24) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1] + .allOf[1].properties.services, + data: data41, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs98 === errors; + } else { + var valid21 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[1].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid15 = _errs83 === errors; + } + var _valid0 = _errs58 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs109 = errors; + const _errs110 = errors; + if (errors === _errs110) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing9; + if ( + (data4.url === undefined && (missing9 = 'url')) || + (data4.type === undefined && (missing9 = 'type')) || + (data4.name === undefined && (missing9 = 'name')) || + (data4.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err67 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .required, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data4.url !== undefined) { + let data46 = data4.url; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data46 === 'string') { + if (!formats0(data46)) { + const err68 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.url, + data: data46, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.url.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.url, + data: data46, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.name !== undefined) { + let data47 = data4.name; + const _errs114 = errors; + if (typeof data47 !== 'string') { + const err70 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.name.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.name, + data: data47, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.description !== undefined) { + let data48 = data4.description; + const _errs116 = errors; + if (typeof data48 !== 'string') { + const err71 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.description.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0] + .properties.description, + data: data48, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.type !== undefined) { + let data49 = data4.type; + const _errs118 = errors; + if (typeof data49 !== 'string') { + const err72 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type, + data: data49, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data49 === 'device' || + data49 === 'group' || + data49 === 'edge instantiable' || + data49 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type.enum, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.type, + data: data49, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid27 = _errs118 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.isPublic !== undefined) { + let data50 = data4.isPublic; + const _errs120 = errors; + if (typeof data50 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.isPublic.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.isPublic, + data: data50, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.viewer !== undefined) { + let data51 = data4.viewer; + const _errs122 = errors; + if (errors === _errs122) { + if (Array.isArray(data51)) { + var valid28 = true; + const len7 = data51.length; + for (let i7 = 0; i7 < len7; i7++) { + let data52 = data51[i7]; + const _errs124 = errors; + if (errors === _errs124) { + if ( + data52 && + typeof data52 == 'object' && + !Array.isArray(data52) + ) { + let missing10; + if ( + data52.url === undefined && + (missing10 = 'url') + ) { + const err75 = { + instancePath: + instancePath + '/device/viewer/' + i7, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items, + data: data52, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data52.url !== undefined) { + let data53 = data52.url; + const _errs126 = errors; + if (errors === _errs126) { + if (errors === _errs126) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err76 = { + instancePath: + instancePath + + '/device/viewer/' + + i7 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[2].allOf[0] + .properties.viewer.items + .properties.url, + data: data53, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + + '/device/viewer/' + + i7 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[2].allOf[0] + .properties.viewer.items + .properties.url, + data: data53, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: + instancePath + '/device/viewer/' + i7, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.viewer + .items, + data: data52, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid28 = _errs124 === errors; + if (!valid28) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.viewer.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[0].properties.viewer, + data: data51, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid27 = _errs122 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data4.owner !== undefined) { + let data54 = data4.owner; + const _errs128 = errors; + if (errors === _errs128) { + if (Array.isArray(data54)) { + var valid30 = true; + const len8 = data54.length; + for (let i8 = 0; i8 < len8; i8++) { + let data55 = data54[i8]; + const _errs130 = errors; + if (errors === _errs130) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + let missing11; + if ( + data55.url === undefined && + (missing11 = 'url') + ) { + const err80 = { + instancePath: + instancePath + + '/device/owner/' + + i8, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { + missingProperty: missing11, + }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties + .owner.items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties + .owner.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data55.url !== undefined) { + let data56 = data55.url; + const _errs132 = errors; + if (errors === _errs132) { + if (errors === _errs132) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err81 = { + instancePath: + instancePath + + '/device/owner/' + + i8 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[2].allOf[0] + .properties.owner.items + .properties.url, + data: data56, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + + '/device/owner/' + + i8 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1] + .properties.device + .anyOf[2].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[2].allOf[0] + .properties.owner.items + .properties.url, + data: data56, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: + instancePath + '/device/owner/' + i8, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner + .items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid30 = _errs130 === errors; + if (!valid30) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[0].properties.owner, + data: data54, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid27 = _errs128 === errors; + } else { + var valid27 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid26 = _errs110 === errors; + if (valid26) { + const _errs134 = errors; + if (errors === _errs134) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + if (data4.type !== undefined) { + let data57 = data4.type; + const _errs136 = errors; + if ('edge instantiable' !== data57) { + const err86 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[1] + .properties.type, + data: data57, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid32 = _errs136 === errors; + } else { + var valid32 = true; + } + if (valid32) { + if (data4.codeUrl !== undefined) { + let data58 = data4.codeUrl; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data58 === 'string') { + if (!formats0(data58)) { + const err87 = { + instancePath: instancePath + '/device/codeUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl, + data: data58, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/device/codeUrl', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.codeUrl, + data: data58, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid32 = _errs137 === errors; + } else { + var valid32 = true; + } + if (valid32) { + if (data4.services !== undefined) { + let data59 = data4.services; + const _errs139 = errors; + if (errors === _errs139) { + if (Array.isArray(data59)) { + var valid33 = true; + const len9 = data59.length; + for (let i9 = 0; i9 < len9; i9++) { + let data60 = data59[i9]; + const _errs141 = errors; + if (errors === _errs141) { + if ( + data60 && + typeof data60 == 'object' && + !Array.isArray(data60) + ) { + if (data60.serviceType !== undefined) { + let data61 = data60.serviceType; + const _errs144 = errors; + if (errors === _errs144) { + if (errors === _errs144) { + if (typeof data61 === 'string') { + if (!formats0(data61)) { + const err89 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType, + data: data61, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceType, + data: data61, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data60.serviceId !== undefined) { + let data62 = data60.serviceId; + const _errs146 = errors; + if (typeof data62 !== 'string') { + const err91 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data62, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid34 = _errs146 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data60.serviceDirection !== undefined) { + let data63 = data60.serviceDirection; + const _errs148 = errors; + if (typeof data63 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data63, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data63 === 'consumer' || + data63 === 'producer' || + data63 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/device/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection.enum, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[2].allOf[1].properties + .services.items.properties + .serviceDirection, + data: data63, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid34 = _errs148 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err94 = { + instancePath: + instancePath + '/device/services/' + i9, + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.items.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.items, + data: data60, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid33 = _errs141 === errors; + if (!valid33) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/device/services', + schemaPath: + '#/allOf/1/properties/device/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2] + .allOf[1].properties.services, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid32 = _errs139 === errors; + } else { + var valid32 = true; + } + } + } + } else { + const err96 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[2].allOf[1].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[2].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid26 = _errs134 === errors; + } + var _valid0 = _errs109 === errors; + valid5 = valid5 || _valid0; + if (!valid5) { + const _errs150 = errors; + const _errs151 = errors; + if (errors === _errs151) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing12; + if ( + (data4.url === undefined && (missing12 = 'url')) || + (data4.type === undefined && (missing12 = 'type')) || + (data4.name === undefined && (missing12 = 'name')) || + (data4.isPublic === undefined && (missing12 = 'isPublic')) + ) { + const err97 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0] + .required, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data4.url !== undefined) { + let data64 = data4.url; + const _errs153 = errors; + if (errors === _errs153) { + if (errors === _errs153) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err98 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/device/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.url.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid36 = _errs153 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.name !== undefined) { + let data65 = data4.name; + const _errs155 = errors; + if (typeof data65 !== 'string') { + const err100 = { + instancePath: instancePath + '/device/name', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.name.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0] + .properties.name, + data: data65, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid36 = _errs155 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.description !== undefined) { + let data66 = data4.description; + const _errs157 = errors; + if (typeof data66 !== 'string') { + const err101 = { + instancePath: instancePath + '/device/description', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.description.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.description, + data: data66, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid36 = _errs157 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.type !== undefined) { + let data67 = data4.type; + const _errs159 = errors; + if (typeof data67 !== 'string') { + const err102 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type, + data: data67, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data67 === 'device' || + data67 === 'group' || + data67 === 'edge instantiable' || + data67 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type.enum, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.type, + data: data67, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid36 = _errs159 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.isPublic !== undefined) { + let data68 = data4.isPublic; + const _errs161 = errors; + if (typeof data68 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/device/isPublic', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.isPublic.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[0].properties.isPublic, + data: data68, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.viewer !== undefined) { + let data69 = data4.viewer; + const _errs163 = errors; + if (errors === _errs163) { + if (Array.isArray(data69)) { + var valid37 = true; + const len10 = data69.length; + for (let i10 = 0; i10 < len10; i10++) { + let data70 = data69[i10]; + const _errs165 = errors; + if (errors === _errs165) { + if ( + data70 && + typeof data70 == 'object' && + !Array.isArray(data70) + ) { + let missing13; + if ( + data70.url === undefined && + (missing13 = 'url') + ) { + const err105 = { + instancePath: + instancePath + + '/device/viewer/' + + i10, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { + missingProperty: missing13, + }, + message: + "must have required property '" + + missing13 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .viewer.items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .viewer.items, + data: data70, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data70.url !== undefined) { + let data71 = data70.url; + const _errs167 = errors; + if (errors === _errs167) { + if (errors === _errs167) { + if (typeof data71 === 'string') { + if (!formats0(data71)) { + const err106 = { + instancePath: + instancePath + + '/device/viewer/' + + i10 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.viewer.items + .properties.url, + data: data71, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/device/viewer/' + + i10 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.viewer.items + .properties.url.type, + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.viewer.items + .properties.url, + data: data71, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: + instancePath + + '/device/viewer/' + + i10, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer + .items, + data: data70, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid37 = _errs165 === errors; + if (!valid37) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/device/viewer', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.viewer, + data: data69, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid36 = _errs163 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data4.owner !== undefined) { + let data72 = data4.owner; + const _errs169 = errors; + if (errors === _errs169) { + if (Array.isArray(data72)) { + var valid39 = true; + const len11 = data72.length; + for (let i11 = 0; i11 < len11; i11++) { + let data73 = data72[i11]; + const _errs171 = errors; + if (errors === _errs171) { + if ( + data73 && + typeof data73 == 'object' && + !Array.isArray(data73) + ) { + let missing14; + if ( + data73.url === undefined && + (missing14 = 'url') + ) { + const err110 = { + instancePath: + instancePath + + '/device/owner/' + + i11, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { + missingProperty: missing14, + }, + message: + "must have required property '" + + missing14 + + "'", + schema: + schema102.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.owner.items + .required, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[3].allOf[0] + .properties.owner.items, + data: data73, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data73.url !== undefined) { + let data74 = data73.url; + const _errs173 = errors; + if (errors === _errs173) { + if (errors === _errs173) { + if ( + typeof data74 === 'string' + ) { + if (!formats0(data74)) { + const err111 = { + instancePath: + instancePath + + '/device/owner/' + + i11 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner + .items.properties.url, + data: data74, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/device/owner/' + + i11 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url.type, + parentSchema: + schema102.allOf[1] + .properties.device + .anyOf[3].allOf[0] + .properties.owner.items + .properties.url, + data: data74, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: + instancePath + + '/device/owner/' + + i11, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .owner.items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties + .owner.items, + data: data73, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid39 = _errs171 === errors; + if (!valid39) { + break; + } + } + } else { + const err114 = { + instancePath: + instancePath + '/device/owner', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner + .type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[0].properties.owner, + data: data72, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid36 = _errs169 === errors; + } else { + var valid36 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[0], + data: data4, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid35 = _errs151 === errors; + if (valid35) { + const _errs175 = errors; + if (errors === _errs175) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing15; + if (data4.devices === undefined && (missing15 = 'devices')) { + const err116 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing15 }, + message: "must have required property '" + missing15 + "'", + schema: + schema102.allOf[1].properties.device.anyOf[3].allOf[1] + .required, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data4.type !== undefined) { + let data75 = data4.type; + const _errs177 = errors; + if ('group' !== data75) { + const err117 = { + instancePath: instancePath + '/device/type', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[1] + .properties.type, + data: data75, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid41 = _errs177 === errors; + } else { + var valid41 = true; + } + if (valid41) { + if (data4.devices !== undefined) { + let data76 = data4.devices; + const _errs178 = errors; + if (errors === _errs178) { + if (Array.isArray(data76)) { + var valid42 = true; + const len12 = data76.length; + for (let i12 = 0; i12 < len12; i12++) { + let data77 = data76[i12]; + const _errs180 = errors; + if (errors === _errs180) { + if ( + data77 && + typeof data77 == 'object' && + !Array.isArray(data77) + ) { + let missing16; + if ( + data77.url === undefined && + (missing16 = 'url') + ) { + const err118 = { + instancePath: + instancePath + '/device/devices/' + i12, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing16 }, + message: + "must have required property '" + + missing16 + + "'", + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items.required, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items, + data: data77, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data77.url !== undefined) { + let data78 = data77.url; + const _errs182 = errors; + if (errors === _errs182) { + if (errors === _errs182) { + if (typeof data78 === 'string') { + if (!formats0(data78)) { + const err119 = { + instancePath: + instancePath + + '/device/devices/' + + i12 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema102.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url, + data: data78, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + + '/device/devices/' + + i12 + + '/url', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema102.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema102.allOf[1].properties + .device.anyOf[3].allOf[1] + .properties.devices.items + .properties.url, + data: data78, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: + instancePath + '/device/devices/' + i12, + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items.type, + parentSchema: + schema102.allOf[1].properties.device + .anyOf[3].allOf[1].properties.devices + .items, + data: data77, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid42 = _errs180 === errors; + if (!valid42) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/device/devices', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices.type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3] + .allOf[1].properties.devices, + data: data76, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid41 = _errs178 === errors; + } else { + var valid41 = true; + } + } + } + } else { + const err123 = { + instancePath: instancePath + '/device', + schemaPath: + '#/allOf/1/properties/device/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema102.allOf[1].properties.device.anyOf[3].allOf[1].type, + parentSchema: + schema102.allOf[1].properties.device.anyOf[3].allOf[1], + data: data4, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid35 = _errs175 === errors; + } + var _valid0 = _errs150 === errors; + valid5 = valid5 || _valid0; + } + } + } + if (!valid5) { + const err124 = { + instancePath: instancePath + '/device', + schemaPath: '#/allOf/1/properties/device/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema102.allOf[1].properties.device.anyOf, + parentSchema: schema102.allOf[1].properties.device, + data: data4, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate117.errors = vErrors; + return false; + } else { + errors = _errs16; + if (vErrors !== null) { + if (_errs16) { + vErrors.length = _errs16; + } else { + vErrors = null; + } + } + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate117.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema102.allOf[1].type, + parentSchema: schema102.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate117.errors = vErrors; + return errors === 0; +} +exports.validateDeviceOverviewUpdateRequest = validate118; +const schema103 = { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + 'x-standalone': true, + 'x-name': 'DeviceOverviewUpdateRequest', + 'x-location': '#/components/schemas/device_overview_update_request', + 'x-schema-type': 'request', +}; +function validate118( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate118.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema103.required, + parentSchema: schema103, + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs1 = errors; + if (typeof data0 !== 'string') { + validate118.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema103.properties.name.type, + parentSchema: schema103.properties.name, + data: data0, + }, + ]; + return false; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate118.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema103.properties.description.type, + parentSchema: schema103.properties.description, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate118.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema103.properties.type.type, + parentSchema: schema103.properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate118.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema103.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema103.properties.type.enum, + parentSchema: schema103.properties.type, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs7 = errors; + if (typeof data3 !== 'boolean') { + validate118.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema103.properties.isPublic.type, + parentSchema: schema103.properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid1 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate118.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema103.properties.viewer.items.required, + parentSchema: schema103.properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate118.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema103.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } else { + validate118.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema103.properties.viewer.items.properties + .url.type, + parentSchema: + schema103.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate118.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema103.properties.viewer.items.type, + parentSchema: schema103.properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + if (!valid1) { + break; + } + } + } else { + validate118.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema103.properties.viewer.type, + parentSchema: schema103.properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs15 = errors; + if (errors === _errs15) { + if (Array.isArray(data7)) { + var valid3 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs17 = errors; + if (errors === _errs17) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate118.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema103.properties.owner.items.required, + parentSchema: schema103.properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate118.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema103.properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate118.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema103.properties.owner.items.properties + .url.type, + parentSchema: + schema103.properties.owner.items.properties + .url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate118.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema103.properties.owner.items.type, + parentSchema: schema103.properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid3 = _errs17 === errors; + if (!valid3) { + break; + } + } + } else { + validate118.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema103.properties.owner.type, + parentSchema: schema103.properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } else { + validate118.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema103.type, + parentSchema: schema103, + data, + }, + ]; + return false; + } + } + validate118.errors = vErrors; + return errors === 0; +} +exports.validateDeviceOverviewUpdateResponse = validate119; +const schema104 = { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + 'x-standalone': true, + 'x-name': 'DeviceOverviewUpdateResponse', + 'x-location': '#/components/schemas/device_overview_update_response', + 'x-schema-type': 'response', +}; +function validate119( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate119.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema104.required, + parentSchema: schema104, + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs1 = errors; + if (typeof data0 !== 'string') { + validate119.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema104.properties.name.type, + parentSchema: schema104.properties.name, + data: data0, + }, + ]; + return false; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate119.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema104.properties.description.type, + parentSchema: schema104.properties.description, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate119.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema104.properties.type.type, + parentSchema: schema104.properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate119.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema104.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema104.properties.type.enum, + parentSchema: schema104.properties.type, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs7 = errors; + if (typeof data3 !== 'boolean') { + validate119.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema104.properties.isPublic.type, + parentSchema: schema104.properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid0 = _errs7 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs9 = errors; + if (errors === _errs9) { + if (Array.isArray(data4)) { + var valid1 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs11 = errors; + if (errors === _errs11) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate119.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: schema104.properties.viewer.items.required, + parentSchema: schema104.properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs13 = errors; + if (errors === _errs13) { + if (errors === _errs13) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate119.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema104.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } else { + validate119.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema104.properties.viewer.items.properties + .url.type, + parentSchema: + schema104.properties.viewer.items.properties + .url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate119.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema104.properties.viewer.items.type, + parentSchema: schema104.properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + if (!valid1) { + break; + } + } + } else { + validate119.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema104.properties.viewer.type, + parentSchema: schema104.properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid0 = _errs9 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs15 = errors; + if (errors === _errs15) { + if (Array.isArray(data7)) { + var valid3 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs17 = errors; + if (errors === _errs17) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate119.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: schema104.properties.owner.items.required, + parentSchema: schema104.properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate119.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema104.properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate119.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema104.properties.owner.items.properties + .url.type, + parentSchema: + schema104.properties.owner.items.properties + .url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate119.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema104.properties.owner.items.type, + parentSchema: schema104.properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid3 = _errs17 === errors; + if (!valid3) { + break; + } + } + } else { + validate119.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema104.properties.owner.type, + parentSchema: schema104.properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid0 = _errs15 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } else { + validate119.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema104.type, + parentSchema: schema104, + data, + }, + ]; + return false; + } + } + validate119.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableCloudDeviceUpdateRequest = validate120; +const schema105 = { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'InstantiableCloudDeviceUpdateRequest', + 'x-location': '#/components/schemas/device_cloud_instantiable_update_request', + 'x-schema-type': 'request', +}; +function validate120( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate120.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema105.allOf[0].required, + parentSchema: schema105.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate120.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema105.allOf[0].properties.name.type, + parentSchema: schema105.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate120.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema105.allOf[0].properties.description.type, + parentSchema: schema105.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate120.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema105.allOf[0].properties.type.type, + parentSchema: schema105.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate120.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema105.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema105.allOf[0].properties.type.enum, + parentSchema: schema105.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate120.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema105.allOf[0].properties.isPublic.type, + parentSchema: schema105.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate120.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema105.allOf[0].properties.viewer.items.required, + parentSchema: + schema105.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate120.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema105.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate120.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema105.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema105.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema105.allOf[0].properties.viewer.items.type, + parentSchema: schema105.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema105.allOf[0].properties.viewer.type, + parentSchema: schema105.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate120.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema105.allOf[0].properties.owner.items.required, + parentSchema: + schema105.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate120.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema105.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate120.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema105.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema105.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema105.allOf[0].properties.owner.items.type, + parentSchema: schema105.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema105.allOf[0].properties.owner.type, + parentSchema: schema105.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate120.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema105.allOf[0].type, + parentSchema: schema105.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('cloud instantiable' !== data10) { + validate120.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema105.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate120.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema105.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema105.allOf[1].properties.instantiateUrl.type, + parentSchema: schema105.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate120.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema105.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate120.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema105.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema105.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate120.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema105.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema105.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate120.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema105.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema105.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate120.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema105.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema105.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema105.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema105.allOf[1].properties.services.items.type, + parentSchema: schema105.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate120.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema105.allOf[1].properties.services.type, + parentSchema: schema105.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate120.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema105.allOf[1].type, + parentSchema: schema105.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate120.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableCloudDeviceUpdateResponse = validate121; +const schema106 = { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'InstantiableCloudDeviceUpdateResponse', + 'x-location': '#/components/schemas/device_cloud_instantiable_update_response', + 'x-schema-type': 'response', +}; +function validate121( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate121.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema106.allOf[0].required, + parentSchema: schema106.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate121.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema106.allOf[0].properties.name.type, + parentSchema: schema106.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate121.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema106.allOf[0].properties.description.type, + parentSchema: schema106.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate121.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema106.allOf[0].properties.type.type, + parentSchema: schema106.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate121.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema106.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema106.allOf[0].properties.type.enum, + parentSchema: schema106.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate121.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema106.allOf[0].properties.isPublic.type, + parentSchema: schema106.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate121.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema106.allOf[0].properties.viewer.items.required, + parentSchema: + schema106.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate121.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema106.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate121.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema106.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema106.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema106.allOf[0].properties.viewer.items.type, + parentSchema: schema106.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema106.allOf[0].properties.viewer.type, + parentSchema: schema106.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate121.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema106.allOf[0].properties.owner.items.required, + parentSchema: + schema106.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate121.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema106.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate121.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema106.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema106.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema106.allOf[0].properties.owner.items.type, + parentSchema: schema106.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema106.allOf[0].properties.owner.type, + parentSchema: schema106.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate121.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema106.allOf[0].type, + parentSchema: schema106.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('cloud instantiable' !== data10) { + validate121.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema106.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate121.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema106.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema106.allOf[1].properties.instantiateUrl.type, + parentSchema: schema106.allOf[1].properties.instantiateUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate121.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema106.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate121.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema106.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema106.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate121.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema106.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema106.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate121.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema106.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema106.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate121.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema106.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema106.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema106.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema106.allOf[1].properties.services.items.type, + parentSchema: schema106.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate121.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema106.allOf[1].properties.services.type, + parentSchema: schema106.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate121.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema106.allOf[1].type, + parentSchema: schema106.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate121.errors = vErrors; + return errors === 0; +} +exports.validateConcreteDeviceUpdateRequest = validate122; +const schema107 = { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'ConcreteDeviceUpdateRequest', + 'x-location': '#/components/schemas/device_concrete_update_request', + 'x-schema-type': 'request', +}; +function validate122( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate122.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema107.allOf[0].required, + parentSchema: schema107.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate122.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema107.allOf[0].properties.name.type, + parentSchema: schema107.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate122.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema107.allOf[0].properties.description.type, + parentSchema: schema107.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate122.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema107.allOf[0].properties.type.type, + parentSchema: schema107.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate122.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema107.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema107.allOf[0].properties.type.enum, + parentSchema: schema107.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate122.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema107.allOf[0].properties.isPublic.type, + parentSchema: schema107.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate122.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema107.allOf[0].properties.viewer.items.required, + parentSchema: + schema107.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate122.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema107.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate122.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema107.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema107.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema107.allOf[0].properties.viewer.items.type, + parentSchema: schema107.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema107.allOf[0].properties.viewer.type, + parentSchema: schema107.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate122.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema107.allOf[0].properties.owner.items.required, + parentSchema: + schema107.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate122.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema107.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate122.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema107.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema107.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema107.allOf[0].properties.owner.items.type, + parentSchema: schema107.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema107.allOf[0].properties.owner.type, + parentSchema: schema107.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate122.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema107.allOf[0].type, + parentSchema: schema107.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('device' !== data10) { + validate122.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema107.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.experiment !== undefined) { + let data11 = data.experiment; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate122.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema107.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema107.allOf[1].properties.experiment.type, + parentSchema: schema107.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate122.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema107.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate122.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema107.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema107.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate122.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema107.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema107.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate122.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema107.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema107.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate122.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema107.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema107.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema107.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema107.allOf[1].properties.services.items.type, + parentSchema: schema107.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate122.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema107.allOf[1].properties.services.type, + parentSchema: schema107.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate122.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema107.allOf[1].type, + parentSchema: schema107.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate122.errors = vErrors; + return errors === 0; +} +exports.validateConcreteDeviceUpdateResponse = validate123; +const schema108 = { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'ConcreteDeviceUpdateResponse', + 'x-location': '#/components/schemas/device_concrete_update_response', + 'x-schema-type': 'response', +}; +function validate123( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate123.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema108.allOf[0].required, + parentSchema: schema108.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate123.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema108.allOf[0].properties.name.type, + parentSchema: schema108.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate123.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema108.allOf[0].properties.description.type, + parentSchema: schema108.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate123.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema108.allOf[0].properties.type.type, + parentSchema: schema108.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate123.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema108.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema108.allOf[0].properties.type.enum, + parentSchema: schema108.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate123.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema108.allOf[0].properties.isPublic.type, + parentSchema: schema108.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate123.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema108.allOf[0].properties.viewer.items.required, + parentSchema: + schema108.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate123.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema108.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate123.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema108.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema108.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema108.allOf[0].properties.viewer.items.type, + parentSchema: schema108.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema108.allOf[0].properties.viewer.type, + parentSchema: schema108.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate123.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema108.allOf[0].properties.owner.items.required, + parentSchema: + schema108.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate123.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema108.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate123.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema108.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema108.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema108.allOf[0].properties.owner.items.type, + parentSchema: schema108.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema108.allOf[0].properties.owner.type, + parentSchema: schema108.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate123.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema108.allOf[0].type, + parentSchema: schema108.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('device' !== data10) { + validate123.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema108.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.experiment !== undefined) { + let data11 = data.experiment; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate123.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema108.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/experiment', + schemaPath: '#/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema108.allOf[1].properties.experiment.type, + parentSchema: schema108.allOf[1].properties.experiment, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate123.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema108.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate123.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema108.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema108.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate123.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema108.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema108.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate123.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema108.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema108.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate123.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema108.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema108.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema108.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema108.allOf[1].properties.services.items.type, + parentSchema: schema108.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate123.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema108.allOf[1].properties.services.type, + parentSchema: schema108.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate123.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema108.allOf[1].type, + parentSchema: schema108.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate123.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableBrowserDeviceUpdateRequest = validate124; +const schema109 = { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'InstantiableBrowserDeviceUpdateRequest', + 'x-location': '#/components/schemas/device_edge_instantiable_update_request', + 'x-schema-type': 'request', +}; +function validate124( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate124.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema109.allOf[0].required, + parentSchema: schema109.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate124.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema109.allOf[0].properties.name.type, + parentSchema: schema109.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate124.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema109.allOf[0].properties.description.type, + parentSchema: schema109.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate124.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema109.allOf[0].properties.type.type, + parentSchema: schema109.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate124.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema109.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema109.allOf[0].properties.type.enum, + parentSchema: schema109.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate124.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema109.allOf[0].properties.isPublic.type, + parentSchema: schema109.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate124.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema109.allOf[0].properties.viewer.items.required, + parentSchema: + schema109.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate124.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema109.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate124.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema109.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema109.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema109.allOf[0].properties.viewer.items.type, + parentSchema: schema109.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema109.allOf[0].properties.viewer.type, + parentSchema: schema109.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate124.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema109.allOf[0].properties.owner.items.required, + parentSchema: + schema109.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate124.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema109.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate124.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema109.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema109.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema109.allOf[0].properties.owner.items.type, + parentSchema: schema109.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema109.allOf[0].properties.owner.type, + parentSchema: schema109.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate124.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema109.allOf[0].type, + parentSchema: schema109.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('edge instantiable' !== data10) { + validate124.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema109.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.codeUrl !== undefined) { + let data11 = data.codeUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate124.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema109.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema109.allOf[1].properties.codeUrl.type, + parentSchema: schema109.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate124.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema109.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate124.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema109.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema109.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate124.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema109.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema109.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate124.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema109.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema109.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate124.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema109.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema109.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema109.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema109.allOf[1].properties.services.items.type, + parentSchema: schema109.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate124.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema109.allOf[1].properties.services.type, + parentSchema: schema109.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate124.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema109.allOf[1].type, + parentSchema: schema109.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate124.errors = vErrors; + return errors === 0; +} +exports.validateInstantiableBrowserDeviceUpdateResponse = validate125; +const schema110 = { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'InstantiableBrowserDeviceUpdateResponse', + 'x-location': '#/components/schemas/device_edge_instantiable_update_response', + 'x-schema-type': 'response', +}; +function validate125( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate125.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema110.allOf[0].required, + parentSchema: schema110.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate125.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema110.allOf[0].properties.name.type, + parentSchema: schema110.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate125.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema110.allOf[0].properties.description.type, + parentSchema: schema110.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate125.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema110.allOf[0].properties.type.type, + parentSchema: schema110.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate125.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema110.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema110.allOf[0].properties.type.enum, + parentSchema: schema110.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate125.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema110.allOf[0].properties.isPublic.type, + parentSchema: schema110.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate125.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema110.allOf[0].properties.viewer.items.required, + parentSchema: + schema110.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate125.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema110.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate125.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema110.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema110.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema110.allOf[0].properties.viewer.items.type, + parentSchema: schema110.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema110.allOf[0].properties.viewer.type, + parentSchema: schema110.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate125.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema110.allOf[0].properties.owner.items.required, + parentSchema: + schema110.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate125.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema110.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate125.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema110.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema110.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema110.allOf[0].properties.owner.items.type, + parentSchema: schema110.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema110.allOf[0].properties.owner.type, + parentSchema: schema110.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate125.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema110.allOf[0].type, + parentSchema: schema110.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('edge instantiable' !== data10) { + validate125.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema110.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.codeUrl !== undefined) { + let data11 = data.codeUrl; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate125.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema110.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema110.allOf[1].properties.codeUrl.type, + parentSchema: schema110.allOf[1].properties.codeUrl, + data: data11, + }, + ]; + return false; + } + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs27 = errors; + if (errors === _errs27) { + if (Array.isArray(data12)) { + var valid7 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs29 = errors; + if (errors === _errs29) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs32 = errors; + if (errors === _errs32) { + if (errors === _errs32) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + validate125.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema110.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate125.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema110.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema110.allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid8 = _errs32 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs34 = errors; + if (typeof data15 !== 'string') { + validate125.errors = [ + { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema110.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema110.allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }, + ]; + return false; + } + var valid8 = _errs34 === errors; + } else { + var valid8 = true; + } + if (valid8) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate125.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema110.allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema110.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + validate125.errors = [ + { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema110.allOf[1].properties.services.items + .properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema110.allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema110.allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }, + ]; + return false; + } + var valid8 = _errs36 === errors; + } else { + var valid8 = true; + } + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema110.allOf[1].properties.services.items.type, + parentSchema: schema110.allOf[1].properties.services.items, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + if (!valid7) { + break; + } + } + } else { + validate125.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema110.allOf[1].properties.services.type, + parentSchema: schema110.allOf[1].properties.services, + data: data12, + }, + ]; + return false; + } + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } else { + validate125.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema110.allOf[1].type, + parentSchema: schema110.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate125.errors = vErrors; + return errors === 0; +} +exports.validateDeviceGroupUpdateRequest = validate126; +const schema111 = { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'DeviceGroupUpdateRequest', + 'x-location': '#/components/schemas/device_group_update_request', + 'x-schema-type': 'request', +}; +function validate126( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate126.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema111.allOf[0].required, + parentSchema: schema111.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate126.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema111.allOf[0].properties.name.type, + parentSchema: schema111.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate126.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema111.allOf[0].properties.description.type, + parentSchema: schema111.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate126.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema111.allOf[0].properties.type.type, + parentSchema: schema111.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate126.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema111.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema111.allOf[0].properties.type.enum, + parentSchema: schema111.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate126.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema111.allOf[0].properties.isPublic.type, + parentSchema: schema111.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate126.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema111.allOf[0].properties.viewer.items.required, + parentSchema: + schema111.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate126.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema111.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate126.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema111.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema111.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema111.allOf[0].properties.viewer.items.type, + parentSchema: schema111.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema111.allOf[0].properties.viewer.type, + parentSchema: schema111.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate126.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema111.allOf[0].properties.owner.items.required, + parentSchema: + schema111.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate126.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema111.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate126.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema111.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema111.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema111.allOf[0].properties.owner.items.type, + parentSchema: schema111.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema111.allOf[0].properties.owner.type, + parentSchema: schema111.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate126.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema111.allOf[0].type, + parentSchema: schema111.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('group' !== data10) { + validate126.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema111.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.devices !== undefined) { + let data11 = data.devices; + const _errs25 = errors; + if (errors === _errs25) { + if (Array.isArray(data11)) { + var valid7 = true; + const len2 = data11.length; + for (let i2 = 0; i2 < len2; i2++) { + let data12 = data11[i2]; + const _errs27 = errors; + if (errors === _errs27) { + if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { + let missing3; + if (data12.url === undefined && (missing3 = 'url')) { + validate126.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema111.allOf[1].properties.devices.items.required, + parentSchema: schema111.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } else { + if (data12.url !== undefined) { + let data13 = data12.url; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data13 === 'string') { + if (!formats0(data13)) { + validate126.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema111.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } else { + validate126.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema111.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema111.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } + } + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema111.allOf[1].properties.devices.items.type, + parentSchema: schema111.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } + } + var valid7 = _errs27 === errors; + if (!valid7) { + break; + } + } + } else { + validate126.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema111.allOf[1].properties.devices.type, + parentSchema: schema111.allOf[1].properties.devices, + data: data11, + }, + ]; + return false; + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + } + } else { + validate126.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema111.allOf[1].type, + parentSchema: schema111.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate126.errors = vErrors; + return errors === 0; +} +exports.validateDeviceGroupUpdateResponse = validate127; +const schema112 = { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'DeviceGroupUpdateResponse', + 'x-location': '#/components/schemas/device_group_update_response', + 'x-schema-type': 'response', +}; +function validate127( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate127.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema112.allOf[0].required, + parentSchema: schema112.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (typeof data0 !== 'string') { + validate127.errors = [ + { + instancePath: instancePath + '/name', + schemaPath: '#/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema112.allOf[0].properties.name.type, + parentSchema: schema112.allOf[0].properties.name, + data: data0, + }, + ]; + return false; + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate127.errors = [ + { + instancePath: instancePath + '/description', + schemaPath: '#/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema112.allOf[0].properties.description.type, + parentSchema: schema112.allOf[0].properties.description, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate127.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema112.allOf[0].properties.type.type, + parentSchema: schema112.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + validate127.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema112.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema112.allOf[0].properties.type.enum, + parentSchema: schema112.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs8 = errors; + if (typeof data3 !== 'boolean') { + validate127.errors = [ + { + instancePath: instancePath + '/isPublic', + schemaPath: '#/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema112.allOf[0].properties.isPublic.type, + parentSchema: schema112.allOf[0].properties.isPublic, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs8 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data4)) { + var valid2 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + validate127.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema112.allOf[0].properties.viewer.items.required, + parentSchema: + schema112.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate127.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema112.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate127.errors = [ + { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema112.allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema112.allOf[0].properties.viewer.items + .properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: '#/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema112.allOf[0].properties.viewer.items.type, + parentSchema: schema112.allOf[0].properties.viewer.items, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + if (!valid2) { + break; + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/viewer', + schemaPath: '#/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema112.allOf[0].properties.viewer.type, + parentSchema: schema112.allOf[0].properties.viewer, + data: data4, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data7)) { + var valid4 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs18 = errors; + if (errors === _errs18) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + validate127.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema112.allOf[0].properties.owner.items.required, + parentSchema: + schema112.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs20 = errors; + if (errors === _errs20) { + if (errors === _errs20) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate127.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema112.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } else { + validate127.errors = [ + { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema112.allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema112.allOf[0].properties.owner.items + .properties.url, + data: data9, + }, + ]; + return false; + } + } + } + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/owner/' + i1, + schemaPath: '#/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema112.allOf[0].properties.owner.items.type, + parentSchema: schema112.allOf[0].properties.owner.items, + data: data8, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + if (!valid4) { + break; + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/owner', + schemaPath: '#/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema112.allOf[0].properties.owner.type, + parentSchema: schema112.allOf[0].properties.owner, + data: data7, + }, + ]; + return false; + } + } + var valid1 = _errs16 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate127.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema112.allOf[0].type, + parentSchema: schema112.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs22 = errors; + if (errors === _errs22) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs24 = errors; + if ('group' !== data10) { + validate127.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema112.allOf[1].properties.type, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs24 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data.devices !== undefined) { + let data11 = data.devices; + const _errs25 = errors; + if (errors === _errs25) { + if (Array.isArray(data11)) { + var valid7 = true; + const len2 = data11.length; + for (let i2 = 0; i2 < len2; i2++) { + let data12 = data11[i2]; + const _errs27 = errors; + if (errors === _errs27) { + if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { + let missing3; + if (data12.url === undefined && (missing3 = 'url')) { + validate127.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema112.allOf[1].properties.devices.items.required, + parentSchema: schema112.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } else { + if (data12.url !== undefined) { + let data13 = data12.url; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data13 === 'string') { + if (!formats0(data13)) { + validate127.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema112.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } else { + validate127.errors = [ + { + instancePath: + instancePath + '/devices/' + i2 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema112.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema112.allOf[1].properties.devices.items + .properties.url, + data: data13, + }, + ]; + return false; + } + } + } + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/devices/' + i2, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema112.allOf[1].properties.devices.items.type, + parentSchema: schema112.allOf[1].properties.devices.items, + data: data12, + }, + ]; + return false; + } + } + var valid7 = _errs27 === errors; + if (!valid7) { + break; + } + } + } else { + validate127.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema112.allOf[1].properties.devices.type, + parentSchema: schema112.allOf[1].properties.devices, + data: data11, + }, + ]; + return false; + } + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + } + } else { + validate127.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema112.allOf[1].type, + parentSchema: schema112.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs22 === errors; + } + validate127.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUpdateRequest = validate128; +const schema113 = { + title: 'Device Update', + anyOf: [ + { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + }, + ], + }, + ], + 'x-standalone': true, + 'x-name': 'DeviceUpdateRequest', + 'x-location': '#/components/schemas/device_update_request', + 'x-schema-type': 'request', +}; +function validate128( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema113.anyOf[0].allOf[0].required, + parentSchema: schema113.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema113.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema113.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema113.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema113.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema113.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema113.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema113.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema113.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema113.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema113.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema113.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema113.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema113.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[0].allOf[0].type, + parentSchema: schema113.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema113.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema113.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema113.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema113.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema113.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema113.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema113.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[0].allOf[1].type, + parentSchema: schema113.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.type === undefined && (missing3 = 'type')) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema113.anyOf[1].allOf[0].required, + parentSchema: schema113.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema113.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema113.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema113.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema113.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema113.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema113.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema113.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema113.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema113.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema113.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema113.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema113.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema113.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[1].allOf[0].type, + parentSchema: schema113.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema113.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema113.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema113.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema113.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema113.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema113.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema113.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[1].allOf[1].type, + parentSchema: schema113.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if (data.type === undefined && (missing6 = 'type')) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema113.anyOf[2].allOf[0].required, + parentSchema: schema113.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema113.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema113.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema113.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema113.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema113.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema113.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema113.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema113.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema113.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema113.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema113.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema113.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema113.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[2].allOf[0].type, + parentSchema: schema113.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema113.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema113.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema113.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema113.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema113.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema113.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[2].allOf[1].type, + parentSchema: schema113.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.type === undefined && (missing9 = 'type')) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema113.anyOf[3].allOf[0].required, + parentSchema: schema113.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema113.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema113.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema113.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema113.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema113.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema113.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema113.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema113.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema113.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema113.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema113.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema113.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema113.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema113.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema113.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema113.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema113.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema113.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema113.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[3].allOf[0].type, + parentSchema: schema113.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err101 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema113.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing12; + if (data63.url === undefined && (missing12 = 'url')) { + const err102 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: + "must have required property '" + missing12 + "'", + schema: + schema113.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema113.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err103 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema113.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + } else { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema113.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema113.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } + } + } + } + } else { + const err105 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema113.anyOf[3].allOf[1].properties.devices.items.type, + parentSchema: + schema113.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema113.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema113.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } else { + const err107 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema113.anyOf[3].allOf[1].type, + parentSchema: schema113.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err108 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema113.anyOf, + parentSchema: schema113, + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + validate128.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate128.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUpdateResponse = validate129; +const schema114 = { + title: 'Device Update', + anyOf: [ + { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + }, + ], + }, + ], + 'x-standalone': true, + 'x-name': 'DeviceUpdateResponse', + 'x-location': '#/components/schemas/device_update_response', + 'x-schema-type': 'response', +}; +function validate129( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema114.anyOf[0].allOf[0].required, + parentSchema: schema114.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema114.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema114.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema114.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema114.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema114.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema114.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema114.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema114.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema114.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema114.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema114.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[0].allOf[0].type, + parentSchema: schema114.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema114.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema114.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema114.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema114.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema114.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema114.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema114.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[0].allOf[1].type, + parentSchema: schema114.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.type === undefined && (missing3 = 'type')) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema114.anyOf[1].allOf[0].required, + parentSchema: schema114.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema114.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema114.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema114.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema114.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema114.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema114.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema114.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema114.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema114.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema114.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema114.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[1].allOf[0].type, + parentSchema: schema114.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema114.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema114.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema114.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema114.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema114.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema114.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema114.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[1].allOf[1].type, + parentSchema: schema114.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if (data.type === undefined && (missing6 = 'type')) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema114.anyOf[2].allOf[0].required, + parentSchema: schema114.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema114.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema114.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema114.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema114.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema114.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema114.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema114.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema114.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema114.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema114.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema114.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[2].allOf[0].type, + parentSchema: schema114.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema114.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema114.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema114.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema114.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema114.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema114.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[2].allOf[1].type, + parentSchema: schema114.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.type === undefined && (missing9 = 'type')) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema114.anyOf[3].allOf[0].required, + parentSchema: schema114.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema114.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema114.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema114.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema114.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema114.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema114.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema114.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema114.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema114.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema114.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema114.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema114.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema114.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[3].allOf[0].type, + parentSchema: schema114.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err101 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema114.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing12; + if (data63.url === undefined && (missing12 = 'url')) { + const err102 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: + "must have required property '" + missing12 + "'", + schema: + schema114.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema114.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err103 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema114.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + } else { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema114.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema114.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } + } + } + } + } else { + const err105 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema114.anyOf[3].allOf[1].properties.devices.items.type, + parentSchema: + schema114.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema114.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema114.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } else { + const err107 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema114.anyOf[3].allOf[1].type, + parentSchema: schema114.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err108 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema114.anyOf, + parentSchema: schema114, + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + validate129.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate129.errors = vErrors; + return errors === 0; +} +exports.validateAvailabilityRuleRequest = validate130; +const schema115 = { + title: 'Availability Rule', + type: 'object', + allOf: [ + { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + { + type: 'object', + properties: { + available: { type: 'boolean' }, + repeat: { + description: + 'If specified the time slot is repeated in a fixed offset specified by the frequency', + type: 'object', + properties: { + frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, + until: { + description: 'Up to this date-time the time slot will be repeated.', + type: 'string', + format: 'date-time', + }, + count: { + description: 'How often the time slot will be repeated', + type: 'integer', + }, + }, + required: ['frequency'], + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'AvailabilityRuleRequest', + 'x-location': '#/components/schemas/availability_rule_request', + 'x-schema-type': 'request', +}; +function validate130( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (!(data && typeof data == 'object' && !Array.isArray(data))) { + validate130.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema115.type, + parentSchema: schema115, + data, + }, + ]; + return false; + } + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.start !== undefined) { + let data0 = data.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data0 === 'string') { + if (!formats22.validate(data0)) { + validate130.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/allOf/0/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema115.allOf[0].properties.start, + data: data0, + }, + ]; + return false; + } + } else { + validate130.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/allOf/0/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema115.allOf[0].properties.start.type, + parentSchema: schema115.allOf[0].properties.start, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.end !== undefined) { + let data1 = data.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate130.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/allOf/0/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema115.allOf[0].properties.end, + data: data1, + }, + ]; + return false; + } + } else { + validate130.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/allOf/0/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema115.allOf[0].properties.end.type, + parentSchema: schema115.allOf[0].properties.end, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate130.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema115.allOf[0].type, + parentSchema: schema115.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (valid0) { + const _errs7 = errors; + if (errors === _errs7) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.available !== undefined) { + let data2 = data.available; + const _errs9 = errors; + if (typeof data2 !== 'boolean') { + validate130.errors = [ + { + instancePath: instancePath + '/available', + schemaPath: '#/allOf/1/properties/available/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema115.allOf[1].properties.available.type, + parentSchema: schema115.allOf[1].properties.available, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.repeat !== undefined) { + let data3 = data.repeat; + const _errs11 = errors; + if (errors === _errs11) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing0; + if (data3.frequency === undefined && (missing0 = 'frequency')) { + validate130.errors = [ + { + instancePath: instancePath + '/repeat', + schemaPath: '#/allOf/1/properties/repeat/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema115.allOf[1].properties.repeat.required, + parentSchema: schema115.allOf[1].properties.repeat, + data: data3, + }, + ]; + return false; + } else { + if (data3.frequency !== undefined) { + let data4 = data3.frequency; + const _errs13 = errors; + if (typeof data4 !== 'string') { + validate130.errors = [ + { + instancePath: instancePath + '/repeat/frequency', + schemaPath: + '#/allOf/1/properties/repeat/properties/frequency/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema115.allOf[1].properties.repeat.properties.frequency + .type, + parentSchema: + schema115.allOf[1].properties.repeat.properties.frequency, + data: data4, + }, + ]; + return false; + } + if ( + !(data4 === 'HOURLY' || data4 === 'DAILY' || data4 === 'WEEKLY') + ) { + validate130.errors = [ + { + instancePath: instancePath + '/repeat/frequency', + schemaPath: + '#/allOf/1/properties/repeat/properties/frequency/enum', + keyword: 'enum', + params: { + allowedValues: + schema115.allOf[1].properties.repeat.properties.frequency + .enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema115.allOf[1].properties.repeat.properties.frequency + .enum, + parentSchema: + schema115.allOf[1].properties.repeat.properties.frequency, + data: data4, + }, + ]; + return false; + } + var valid3 = _errs13 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.until !== undefined) { + let data5 = data3.until; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data5 === 'string') { + if (!formats22.validate(data5)) { + validate130.errors = [ + { + instancePath: instancePath + '/repeat/until', + schemaPath: + '#/allOf/1/properties/repeat/properties/until/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema115.allOf[1].properties.repeat.properties.until, + data: data5, + }, + ]; + return false; + } + } else { + validate130.errors = [ + { + instancePath: instancePath + '/repeat/until', + schemaPath: + '#/allOf/1/properties/repeat/properties/until/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema115.allOf[1].properties.repeat.properties.until + .type, + parentSchema: + schema115.allOf[1].properties.repeat.properties.until, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs15 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.count !== undefined) { + let data6 = data3.count; + const _errs17 = errors; + if ( + !( + typeof data6 == 'number' && + !(data6 % 1) && + !isNaN(data6) && + isFinite(data6) + ) + ) { + validate130.errors = [ + { + instancePath: instancePath + '/repeat/count', + schemaPath: + '#/allOf/1/properties/repeat/properties/count/type', + keyword: 'type', + params: { type: 'integer' }, + message: 'must be integer', + schema: + schema115.allOf[1].properties.repeat.properties.count + .type, + parentSchema: + schema115.allOf[1].properties.repeat.properties.count, + data: data6, + }, + ]; + return false; + } + var valid3 = _errs17 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + validate130.errors = [ + { + instancePath: instancePath + '/repeat', + schemaPath: '#/allOf/1/properties/repeat/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema115.allOf[1].properties.repeat.type, + parentSchema: schema115.allOf[1].properties.repeat, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs11 === errors; + } else { + var valid2 = true; + } + } + } else { + validate130.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema115.allOf[1].type, + parentSchema: schema115.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs7 === errors; + } + validate130.errors = vErrors; + return errors === 0; +} +exports.validateAvailabilityRuleResponse = validate131; +const schema116 = { + title: 'Availability Rule', + type: 'object', + allOf: [ + { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + { + type: 'object', + properties: { + available: { type: 'boolean' }, + repeat: { + description: + 'If specified the time slot is repeated in a fixed offset specified by the frequency', + type: 'object', + properties: { + frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, + until: { + description: 'Up to this date-time the time slot will be repeated.', + type: 'string', + format: 'date-time', + }, + count: { + description: 'How often the time slot will be repeated', + type: 'integer', + }, + }, + required: ['frequency'], + }, + }, + }, + ], + 'x-standalone': true, + 'x-name': 'AvailabilityRuleResponse', + 'x-location': '#/components/schemas/availability_rule_response', + 'x-schema-type': 'response', +}; +function validate131( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (!(data && typeof data == 'object' && !Array.isArray(data))) { + validate131.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema116.type, + parentSchema: schema116, + data, + }, + ]; + return false; + } + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.start !== undefined) { + let data0 = data.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data0 === 'string') { + if (!formats22.validate(data0)) { + validate131.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/allOf/0/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema116.allOf[0].properties.start, + data: data0, + }, + ]; + return false; + } + } else { + validate131.errors = [ + { + instancePath: instancePath + '/start', + schemaPath: '#/allOf/0/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema116.allOf[0].properties.start.type, + parentSchema: schema116.allOf[0].properties.start, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.end !== undefined) { + let data1 = data.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate131.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/allOf/0/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema116.allOf[0].properties.end, + data: data1, + }, + ]; + return false; + } + } else { + validate131.errors = [ + { + instancePath: instancePath + '/end', + schemaPath: '#/allOf/0/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema116.allOf[0].properties.end.type, + parentSchema: schema116.allOf[0].properties.end, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate131.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema116.allOf[0].type, + parentSchema: schema116.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (valid0) { + const _errs7 = errors; + if (errors === _errs7) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.available !== undefined) { + let data2 = data.available; + const _errs9 = errors; + if (typeof data2 !== 'boolean') { + validate131.errors = [ + { + instancePath: instancePath + '/available', + schemaPath: '#/allOf/1/properties/available/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema116.allOf[1].properties.available.type, + parentSchema: schema116.allOf[1].properties.available, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs9 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.repeat !== undefined) { + let data3 = data.repeat; + const _errs11 = errors; + if (errors === _errs11) { + if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { + let missing0; + if (data3.frequency === undefined && (missing0 = 'frequency')) { + validate131.errors = [ + { + instancePath: instancePath + '/repeat', + schemaPath: '#/allOf/1/properties/repeat/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema116.allOf[1].properties.repeat.required, + parentSchema: schema116.allOf[1].properties.repeat, + data: data3, + }, + ]; + return false; + } else { + if (data3.frequency !== undefined) { + let data4 = data3.frequency; + const _errs13 = errors; + if (typeof data4 !== 'string') { + validate131.errors = [ + { + instancePath: instancePath + '/repeat/frequency', + schemaPath: + '#/allOf/1/properties/repeat/properties/frequency/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema116.allOf[1].properties.repeat.properties.frequency + .type, + parentSchema: + schema116.allOf[1].properties.repeat.properties.frequency, + data: data4, + }, + ]; + return false; + } + if ( + !(data4 === 'HOURLY' || data4 === 'DAILY' || data4 === 'WEEKLY') + ) { + validate131.errors = [ + { + instancePath: instancePath + '/repeat/frequency', + schemaPath: + '#/allOf/1/properties/repeat/properties/frequency/enum', + keyword: 'enum', + params: { + allowedValues: + schema116.allOf[1].properties.repeat.properties.frequency + .enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema116.allOf[1].properties.repeat.properties.frequency + .enum, + parentSchema: + schema116.allOf[1].properties.repeat.properties.frequency, + data: data4, + }, + ]; + return false; + } + var valid3 = _errs13 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.until !== undefined) { + let data5 = data3.until; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data5 === 'string') { + if (!formats22.validate(data5)) { + validate131.errors = [ + { + instancePath: instancePath + '/repeat/until', + schemaPath: + '#/allOf/1/properties/repeat/properties/until/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema116.allOf[1].properties.repeat.properties.until, + data: data5, + }, + ]; + return false; + } + } else { + validate131.errors = [ + { + instancePath: instancePath + '/repeat/until', + schemaPath: + '#/allOf/1/properties/repeat/properties/until/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema116.allOf[1].properties.repeat.properties.until + .type, + parentSchema: + schema116.allOf[1].properties.repeat.properties.until, + data: data5, + }, + ]; + return false; + } + } + } + var valid3 = _errs15 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.count !== undefined) { + let data6 = data3.count; + const _errs17 = errors; + if ( + !( + typeof data6 == 'number' && + !(data6 % 1) && + !isNaN(data6) && + isFinite(data6) + ) + ) { + validate131.errors = [ + { + instancePath: instancePath + '/repeat/count', + schemaPath: + '#/allOf/1/properties/repeat/properties/count/type', + keyword: 'type', + params: { type: 'integer' }, + message: 'must be integer', + schema: + schema116.allOf[1].properties.repeat.properties.count + .type, + parentSchema: + schema116.allOf[1].properties.repeat.properties.count, + data: data6, + }, + ]; + return false; + } + var valid3 = _errs17 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + validate131.errors = [ + { + instancePath: instancePath + '/repeat', + schemaPath: '#/allOf/1/properties/repeat/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema116.allOf[1].properties.repeat.type, + parentSchema: schema116.allOf[1].properties.repeat, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs11 === errors; + } else { + var valid2 = true; + } + } + } else { + validate131.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema116.allOf[1].type, + parentSchema: schema116.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs7 === errors; + } + validate131.errors = vErrors; + return errors === 0; +} +exports.validateMessageRequest = validate132; +const schema117 = { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'MessageRequest', + 'x-location': '#/components/schemas/message_request', + 'x-schema-type': 'request', +}; +function validate132( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate132.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema117.required, + parentSchema: schema117, + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate132.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema117.properties.messageType.type, + parentSchema: schema117.properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate132.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema117.type, + parentSchema: schema117, + data, + }, + ]; + return false; + } + } + validate132.errors = vErrors; + return errors === 0; +} +exports.validateMessageResponse = validate133; +const schema118 = { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'MessageResponse', + 'x-location': '#/components/schemas/message_response', + 'x-schema-type': 'response', +}; +function validate133( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate133.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema118.required, + parentSchema: schema118, + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate133.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema118.properties.messageType.type, + parentSchema: schema118.properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate133.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema118.type, + parentSchema: schema118, + data, + }, + ]; + return false; + } + } + validate133.errors = vErrors; + return errors === 0; +} +exports.validateCommandMessageRequest = validate134; +const schema119 = { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CommandMessageRequest', + 'x-location': '#/components/schemas/command_message_request', + 'x-schema-type': 'request', +}; +function validate134( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate134.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema119.allOf[0].required, + parentSchema: schema119.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate134.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema119.allOf[0].properties.messageType.type, + parentSchema: schema119.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate134.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema119.allOf[0].type, + parentSchema: schema119.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate134.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema119.allOf[1].required, + parentSchema: schema119.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('command' !== data1) { + validate134.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema119.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate134.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema119.allOf[1].properties.command.type, + parentSchema: schema119.allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate134.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema119.allOf[1].type, + parentSchema: schema119.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate134.errors = vErrors; + return errors === 0; +} +exports.validateCommandMessageResponse = validate135; +const schema120 = { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CommandMessageResponse', + 'x-location': '#/components/schemas/command_message_response', + 'x-schema-type': 'response', +}; +function validate135( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate135.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema120.allOf[0].required, + parentSchema: schema120.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate135.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema120.allOf[0].properties.messageType.type, + parentSchema: schema120.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate135.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema120.allOf[0].type, + parentSchema: schema120.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate135.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema120.allOf[1].required, + parentSchema: schema120.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('command' !== data1) { + validate135.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema120.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate135.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema120.allOf[1].properties.command.type, + parentSchema: schema120.allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate135.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema120.allOf[1].type, + parentSchema: schema120.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate135.errors = vErrors; + return errors === 0; +} +exports.validateServiceConfigRequest = validate136; +const schema121 = { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + 'x-standalone': true, + 'x-name': 'ServiceConfigRequest', + 'x-location': '#/components/schemas/service_config_request', + 'x-schema-type': 'request', +}; +function validate136( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.serviceType === undefined && (missing0 = 'serviceType')) || + (data.serviceId === undefined && (missing0 = 'serviceId')) || + (data.remoteServiceId === undefined && (missing0 = 'remoteServiceId')) + ) { + validate136.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema121.required, + parentSchema: schema121, + data, + }, + ]; + return false; + } else { + if (data.serviceType !== undefined) { + let data0 = data.serviceType; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate136.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema121.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } else { + validate136.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema121.properties.serviceType.type, + parentSchema: schema121.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceId !== undefined) { + let data1 = data.serviceId; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate136.errors = [ + { + instancePath: instancePath + '/serviceId', + schemaPath: '#/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema121.properties.serviceId.type, + parentSchema: schema121.properties.serviceId, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.remoteServiceId !== undefined) { + let data2 = data.remoteServiceId; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate136.errors = [ + { + instancePath: instancePath + '/remoteServiceId', + schemaPath: '#/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema121.properties.remoteServiceId.type, + parentSchema: schema121.properties.remoteServiceId, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate136.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema121.type, + parentSchema: schema121, + data, + }, + ]; + return false; + } + } + validate136.errors = vErrors; + return errors === 0; +} +exports.validateServiceConfigResponse = validate137; +const schema122 = { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + 'x-standalone': true, + 'x-name': 'ServiceConfigResponse', + 'x-location': '#/components/schemas/service_config_response', + 'x-schema-type': 'response', +}; +function validate137( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.serviceType === undefined && (missing0 = 'serviceType')) || + (data.serviceId === undefined && (missing0 = 'serviceId')) || + (data.remoteServiceId === undefined && (missing0 = 'remoteServiceId')) + ) { + validate137.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema122.required, + parentSchema: schema122, + data, + }, + ]; + return false; + } else { + if (data.serviceType !== undefined) { + let data0 = data.serviceType; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate137.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema122.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } else { + validate137.errors = [ + { + instancePath: instancePath + '/serviceType', + schemaPath: '#/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema122.properties.serviceType.type, + parentSchema: schema122.properties.serviceType, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.serviceId !== undefined) { + let data1 = data.serviceId; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate137.errors = [ + { + instancePath: instancePath + '/serviceId', + schemaPath: '#/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema122.properties.serviceId.type, + parentSchema: schema122.properties.serviceId, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.remoteServiceId !== undefined) { + let data2 = data.remoteServiceId; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate137.errors = [ + { + instancePath: instancePath + '/remoteServiceId', + schemaPath: '#/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema122.properties.remoteServiceId.type, + parentSchema: schema122.properties.remoteServiceId, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate137.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema122.type, + parentSchema: schema122, + data, + }, + ]; + return false; + } + } + validate137.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionMessageRequest = validate138; +const schema123 = { + title: 'Create Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'createPeerconnection' }, + connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, + connectionUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + type: 'object', + required: ['serviceType', 'serviceId', 'remoteServiceId'], + title: 'Service Config', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + additionalProperties: true, + }, + }, + tiebreaker: { type: 'boolean' }, + config: { type: 'object', additionalProperties: true }, + }, + required: ['command', 'connectionType', 'connectionUrl', 'services', 'tiebreaker'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CreatePeerconnectionMessageRequest', + 'x-location': '#/components/schemas/create_peerconnection_message_request', + 'x-schema-type': 'request', +}; +function validate138( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema123.allOf[0].allOf[0].required, + parentSchema: schema123.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate138.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema123.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema123.allOf[0].allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema123.allOf[0].allOf[0].type, + parentSchema: schema123.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema123.allOf[0].allOf[1].required, + parentSchema: schema123.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs8 = errors; + if ('command' !== data1) { + validate138.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema123.allOf[0].allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs8 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate138.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema123.allOf[0].allOf[1].properties.command.type, + parentSchema: schema123.allOf[0].allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema123.allOf[0].allOf[1].type, + parentSchema: schema123.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionType === undefined && (missing2 = 'connectionType')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || + (data.services === undefined && (missing2 = 'services')) || + (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) + ) { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema123.allOf[1].required, + parentSchema: schema123.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs13 = errors; + if ('createPeerconnection' !== data3) { + validate138.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'createPeerconnection' }, + message: 'must be equal to constant', + schema: 'createPeerconnection', + parentSchema: schema123.allOf[1].properties.command, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionType !== undefined) { + let data4 = data.connectionType; + const _errs14 = errors; + if (typeof data4 !== 'string') { + validate138.errors = [ + { + instancePath: instancePath + '/connectionType', + schemaPath: '#/allOf/1/properties/connectionType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema123.allOf[1].properties.connectionType.type, + parentSchema: schema123.allOf[1].properties.connectionType, + data: data4, + }, + ]; + return false; + } + if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { + validate138.errors = [ + { + instancePath: instancePath + '/connectionType', + schemaPath: '#/allOf/1/properties/connectionType/enum', + keyword: 'enum', + params: { + allowedValues: schema123.allOf[1].properties.connectionType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema123.allOf[1].properties.connectionType.enum, + parentSchema: schema123.allOf[1].properties.connectionType, + data: data4, + }, + ]; + return false; + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionUrl !== undefined) { + let data5 = data.connectionUrl; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate138.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema123.allOf[1].properties.connectionUrl, + data: data5, + }, + ]; + return false; + } + } else { + validate138.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema123.allOf[1].properties.connectionUrl.type, + parentSchema: schema123.allOf[1].properties.connectionUrl, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.services !== undefined) { + let data6 = data.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data6)) { + var valid5 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing3; + if ( + (data7.serviceType === undefined && + (missing3 = 'serviceType')) || + (data7.serviceId === undefined && + (missing3 = 'serviceId')) || + (data7.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate138.errors = [ + { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/allOf/1/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: + "must have required property '" + missing3 + "'", + schema: + schema123.allOf[1].properties.services.items.required, + parentSchema: + schema123.allOf[1].properties.services.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.serviceType !== undefined) { + let data8 = data7.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate138.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema123.allOf[1].properties.services.items + .properties.serviceType, + data: data8, + }, + ]; + return false; + } + } else { + validate138.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema123.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema123.allOf[1].properties.services.items + .properties.serviceType, + data: data8, + }, + ]; + return false; + } + } + } + var valid6 = _errs23 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data7.serviceId !== undefined) { + let data9 = data7.serviceId; + const _errs25 = errors; + if (typeof data9 !== 'string') { + validate138.errors = [ + { + instancePath: + instancePath + '/services/' + i0 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema123.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema123.allOf[1].properties.services.items + .properties.serviceId, + data: data9, + }, + ]; + return false; + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data7.remoteServiceId !== undefined) { + let data10 = data7.remoteServiceId; + const _errs27 = errors; + if (typeof data10 !== 'string') { + validate138.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema123.allOf[1].properties.services.items + .properties.remoteServiceId.type, + parentSchema: + schema123.allOf[1].properties.services.items + .properties.remoteServiceId, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate138.errors = [ + { + instancePath: instancePath + '/services/' + i0, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema123.allOf[1].properties.services.items.type, + parentSchema: + schema123.allOf[1].properties.services.items, + data: data7, + }, + ]; + return false; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + validate138.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema123.allOf[1].properties.services.type, + parentSchema: schema123.allOf[1].properties.services, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.tiebreaker !== undefined) { + let data11 = data.tiebreaker; + const _errs29 = errors; + if (typeof data11 !== 'boolean') { + validate138.errors = [ + { + instancePath: instancePath + '/tiebreaker', + schemaPath: '#/allOf/1/properties/tiebreaker/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema123.allOf[1].properties.tiebreaker.type, + parentSchema: schema123.allOf[1].properties.tiebreaker, + data: data11, + }, + ]; + return false; + } + var valid4 = _errs29 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.config !== undefined) { + let data12 = data.config; + const _errs31 = errors; + if (errors === _errs31) { + if ( + data12 && + typeof data12 == 'object' && + !Array.isArray(data12) + ) { + } else { + validate138.errors = [ + { + instancePath: instancePath + '/config', + schemaPath: '#/allOf/1/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema123.allOf[1].properties.config.type, + parentSchema: schema123.allOf[1].properties.config, + data: data12, + }, + ]; + return false; + } + } + var valid4 = _errs31 === errors; + } else { + var valid4 = true; + } + } + } + } + } + } + } + } else { + validate138.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema123.allOf[1].type, + parentSchema: schema123.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate138.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionMessageResponse = validate139; +const schema124 = { + title: 'Create Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'createPeerconnection' }, + connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, + connectionUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + type: 'object', + required: ['serviceType', 'serviceId', 'remoteServiceId'], + title: 'Service Config', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + additionalProperties: true, + }, + }, + tiebreaker: { type: 'boolean' }, + config: { type: 'object', additionalProperties: true }, + }, + required: ['command', 'connectionType', 'connectionUrl', 'services', 'tiebreaker'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'CreatePeerconnectionMessageResponse', + 'x-location': '#/components/schemas/create_peerconnection_message_response', + 'x-schema-type': 'response', +}; +function validate139( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema124.allOf[0].allOf[0].required, + parentSchema: schema124.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate139.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema124.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema124.allOf[0].allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema124.allOf[0].allOf[0].type, + parentSchema: schema124.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema124.allOf[0].allOf[1].required, + parentSchema: schema124.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs8 = errors; + if ('command' !== data1) { + validate139.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema124.allOf[0].allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs8 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate139.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema124.allOf[0].allOf[1].properties.command.type, + parentSchema: schema124.allOf[0].allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema124.allOf[0].allOf[1].type, + parentSchema: schema124.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionType === undefined && (missing2 = 'connectionType')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || + (data.services === undefined && (missing2 = 'services')) || + (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) + ) { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema124.allOf[1].required, + parentSchema: schema124.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs13 = errors; + if ('createPeerconnection' !== data3) { + validate139.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'createPeerconnection' }, + message: 'must be equal to constant', + schema: 'createPeerconnection', + parentSchema: schema124.allOf[1].properties.command, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionType !== undefined) { + let data4 = data.connectionType; + const _errs14 = errors; + if (typeof data4 !== 'string') { + validate139.errors = [ + { + instancePath: instancePath + '/connectionType', + schemaPath: '#/allOf/1/properties/connectionType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema124.allOf[1].properties.connectionType.type, + parentSchema: schema124.allOf[1].properties.connectionType, + data: data4, + }, + ]; + return false; + } + if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { + validate139.errors = [ + { + instancePath: instancePath + '/connectionType', + schemaPath: '#/allOf/1/properties/connectionType/enum', + keyword: 'enum', + params: { + allowedValues: schema124.allOf[1].properties.connectionType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema124.allOf[1].properties.connectionType.enum, + parentSchema: schema124.allOf[1].properties.connectionType, + data: data4, + }, + ]; + return false; + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionUrl !== undefined) { + let data5 = data.connectionUrl; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate139.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema124.allOf[1].properties.connectionUrl, + data: data5, + }, + ]; + return false; + } + } else { + validate139.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema124.allOf[1].properties.connectionUrl.type, + parentSchema: schema124.allOf[1].properties.connectionUrl, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.services !== undefined) { + let data6 = data.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data6)) { + var valid5 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing3; + if ( + (data7.serviceType === undefined && + (missing3 = 'serviceType')) || + (data7.serviceId === undefined && + (missing3 = 'serviceId')) || + (data7.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate139.errors = [ + { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/allOf/1/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: + "must have required property '" + missing3 + "'", + schema: + schema124.allOf[1].properties.services.items.required, + parentSchema: + schema124.allOf[1].properties.services.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.serviceType !== undefined) { + let data8 = data7.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate139.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema124.allOf[1].properties.services.items + .properties.serviceType, + data: data8, + }, + ]; + return false; + } + } else { + validate139.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema124.allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema124.allOf[1].properties.services.items + .properties.serviceType, + data: data8, + }, + ]; + return false; + } + } + } + var valid6 = _errs23 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data7.serviceId !== undefined) { + let data9 = data7.serviceId; + const _errs25 = errors; + if (typeof data9 !== 'string') { + validate139.errors = [ + { + instancePath: + instancePath + '/services/' + i0 + '/serviceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema124.allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema124.allOf[1].properties.services.items + .properties.serviceId, + data: data9, + }, + ]; + return false; + } + var valid6 = _errs25 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data7.remoteServiceId !== undefined) { + let data10 = data7.remoteServiceId; + const _errs27 = errors; + if (typeof data10 !== 'string') { + validate139.errors = [ + { + instancePath: + instancePath + + '/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema124.allOf[1].properties.services.items + .properties.remoteServiceId.type, + parentSchema: + schema124.allOf[1].properties.services.items + .properties.remoteServiceId, + data: data10, + }, + ]; + return false; + } + var valid6 = _errs27 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate139.errors = [ + { + instancePath: instancePath + '/services/' + i0, + schemaPath: '#/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema124.allOf[1].properties.services.items.type, + parentSchema: + schema124.allOf[1].properties.services.items, + data: data7, + }, + ]; + return false; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + validate139.errors = [ + { + instancePath: instancePath + '/services', + schemaPath: '#/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema124.allOf[1].properties.services.type, + parentSchema: schema124.allOf[1].properties.services, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs18 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.tiebreaker !== undefined) { + let data11 = data.tiebreaker; + const _errs29 = errors; + if (typeof data11 !== 'boolean') { + validate139.errors = [ + { + instancePath: instancePath + '/tiebreaker', + schemaPath: '#/allOf/1/properties/tiebreaker/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema124.allOf[1].properties.tiebreaker.type, + parentSchema: schema124.allOf[1].properties.tiebreaker, + data: data11, + }, + ]; + return false; + } + var valid4 = _errs29 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.config !== undefined) { + let data12 = data.config; + const _errs31 = errors; + if (errors === _errs31) { + if ( + data12 && + typeof data12 == 'object' && + !Array.isArray(data12) + ) { + } else { + validate139.errors = [ + { + instancePath: instancePath + '/config', + schemaPath: '#/allOf/1/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema124.allOf[1].properties.config.type, + parentSchema: schema124.allOf[1].properties.config, + data: data12, + }, + ]; + return false; + } + } + var valid4 = _errs31 === errors; + } else { + var valid4 = true; + } + } + } + } + } + } + } + } else { + validate139.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema124.allOf[1].type, + parentSchema: schema124.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate139.errors = vErrors; + return errors === 0; +} +exports.validateClosePeerconnectionMessageRequest = validate140; +const schema125 = { + title: 'Close Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'closePeerconnection' }, + connectionUrl: { type: 'string', format: 'uri' }, + }, + required: ['command', 'connectionUrl'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ClosePeerconnectionMessageRequest', + 'x-location': '#/components/schemas/close_peerconnection_message_request', + 'x-schema-type': 'request', +}; +function validate140( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema125.allOf[0].allOf[0].required, + parentSchema: schema125.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate140.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema125.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema125.allOf[0].allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema125.allOf[0].allOf[0].type, + parentSchema: schema125.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema125.allOf[0].allOf[1].required, + parentSchema: schema125.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs8 = errors; + if ('command' !== data1) { + validate140.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema125.allOf[0].allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs8 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate140.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema125.allOf[0].allOf[1].properties.command.type, + parentSchema: schema125.allOf[0].allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema125.allOf[0].allOf[1].type, + parentSchema: schema125.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) + ) { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema125.allOf[1].required, + parentSchema: schema125.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs13 = errors; + if ('closePeerconnection' !== data3) { + validate140.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'closePeerconnection' }, + message: 'must be equal to constant', + schema: 'closePeerconnection', + parentSchema: schema125.allOf[1].properties.command, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionUrl !== undefined) { + let data4 = data.connectionUrl; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate140.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema125.allOf[1].properties.connectionUrl, + data: data4, + }, + ]; + return false; + } + } else { + validate140.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema125.allOf[1].properties.connectionUrl.type, + parentSchema: schema125.allOf[1].properties.connectionUrl, + data: data4, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate140.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema125.allOf[1].type, + parentSchema: schema125.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate140.errors = vErrors; + return errors === 0; +} +exports.validateClosePeerconnectionMessageResponse = validate141; +const schema126 = { + title: 'Close Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { messageType: { const: 'command' }, command: { type: 'string' } }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'closePeerconnection' }, + connectionUrl: { type: 'string', format: 'uri' }, + }, + required: ['command', 'connectionUrl'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ClosePeerconnectionMessageResponse', + 'x-location': '#/components/schemas/close_peerconnection_message_response', + 'x-schema-type': 'response', +}; +function validate141( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema126.allOf[0].allOf[0].required, + parentSchema: schema126.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate141.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema126.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema126.allOf[0].allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema126.allOf[0].allOf[0].type, + parentSchema: schema126.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema126.allOf[0].allOf[1].required, + parentSchema: schema126.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs8 = errors; + if ('command' !== data1) { + validate141.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema126.allOf[0].allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs8 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate141.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema126.allOf[0].allOf[1].properties.command.type, + parentSchema: schema126.allOf[0].allOf[1].properties.command, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema126.allOf[0].allOf[1].type, + parentSchema: schema126.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) + ) { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema126.allOf[1].required, + parentSchema: schema126.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs13 = errors; + if ('closePeerconnection' !== data3) { + validate141.errors = [ + { + instancePath: instancePath + '/command', + schemaPath: '#/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'closePeerconnection' }, + message: 'must be equal to constant', + schema: 'closePeerconnection', + parentSchema: schema126.allOf[1].properties.command, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.connectionUrl !== undefined) { + let data4 = data.connectionUrl; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate141.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema126.allOf[1].properties.connectionUrl, + data: data4, + }, + ]; + return false; + } + } else { + validate141.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema126.allOf[1].properties.connectionUrl.type, + parentSchema: schema126.allOf[1].properties.connectionUrl, + data: data4, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate141.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema126.allOf[1].type, + parentSchema: schema126.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate141.errors = vErrors; + return errors === 0; +} +exports.validateSignalingMessageRequest = validate142; +const schema127 = { + title: 'Signaling Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'signaling' }, + signalingType: { type: 'string' }, + connectionUrl: { type: 'string', format: 'uri' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'signalingType', 'connectionUrl', 'content'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'SignalingMessageRequest', + 'x-location': '#/components/schemas/signaling_message_request', + 'x-schema-type': 'request', +}; +function validate142( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate142.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema127.allOf[0].required, + parentSchema: schema127.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate142.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema127.allOf[0].properties.messageType.type, + parentSchema: schema127.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate142.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema127.allOf[0].type, + parentSchema: schema127.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.signalingType === undefined && (missing1 = 'signalingType')) || + (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || + (data.content === undefined && (missing1 = 'content')) + ) { + validate142.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema127.allOf[1].required, + parentSchema: schema127.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('signaling' !== data1) { + validate142.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'signaling' }, + message: 'must be equal to constant', + schema: 'signaling', + parentSchema: schema127.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.signalingType !== undefined) { + let data2 = data.signalingType; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate142.errors = [ + { + instancePath: instancePath + '/signalingType', + schemaPath: '#/allOf/1/properties/signalingType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema127.allOf[1].properties.signalingType.type, + parentSchema: schema127.allOf[1].properties.signalingType, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.connectionUrl !== undefined) { + let data3 = data.connectionUrl; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate142.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema127.allOf[1].properties.connectionUrl, + data: data3, + }, + ]; + return false; + } + } else { + validate142.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema127.allOf[1].properties.connectionUrl.type, + parentSchema: schema127.allOf[1].properties.connectionUrl, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.content !== undefined) { + let data4 = data.content; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + } else { + validate142.errors = [ + { + instancePath: instancePath + '/content', + schemaPath: '#/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema127.allOf[1].properties.content.type, + parentSchema: schema127.allOf[1].properties.content, + data: data4, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } else { + validate142.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema127.allOf[1].type, + parentSchema: schema127.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate142.errors = vErrors; + return errors === 0; +} +exports.validateSignalingMessageResponse = validate143; +const schema128 = { + title: 'Signaling Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'signaling' }, + signalingType: { type: 'string' }, + connectionUrl: { type: 'string', format: 'uri' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'signalingType', 'connectionUrl', 'content'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'SignalingMessageResponse', + 'x-location': '#/components/schemas/signaling_message_response', + 'x-schema-type': 'response', +}; +function validate143( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate143.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema128.allOf[0].required, + parentSchema: schema128.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate143.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema128.allOf[0].properties.messageType.type, + parentSchema: schema128.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate143.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema128.allOf[0].type, + parentSchema: schema128.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.signalingType === undefined && (missing1 = 'signalingType')) || + (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || + (data.content === undefined && (missing1 = 'content')) + ) { + validate143.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema128.allOf[1].required, + parentSchema: schema128.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('signaling' !== data1) { + validate143.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'signaling' }, + message: 'must be equal to constant', + schema: 'signaling', + parentSchema: schema128.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.signalingType !== undefined) { + let data2 = data.signalingType; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate143.errors = [ + { + instancePath: instancePath + '/signalingType', + schemaPath: '#/allOf/1/properties/signalingType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema128.allOf[1].properties.signalingType.type, + parentSchema: schema128.allOf[1].properties.signalingType, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.connectionUrl !== undefined) { + let data3 = data.connectionUrl; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate143.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema128.allOf[1].properties.connectionUrl, + data: data3, + }, + ]; + return false; + } + } else { + validate143.errors = [ + { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema128.allOf[1].properties.connectionUrl.type, + parentSchema: schema128.allOf[1].properties.connectionUrl, + data: data3, + }, + ]; + return false; + } + } + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.content !== undefined) { + let data4 = data.content; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + } else { + validate143.errors = [ + { + instancePath: instancePath + '/content', + schemaPath: '#/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema128.allOf[1].properties.content.type, + parentSchema: schema128.allOf[1].properties.content, + data: data4, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } else { + validate143.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema128.allOf[1].type, + parentSchema: schema128.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate143.errors = vErrors; + return errors === 0; +} +exports.validateConfigurationMessageRequest = validate144; +const schema129 = { + title: 'Configuration Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'configuration' }, + configuration: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'configuration'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConfigurationMessageRequest', + 'x-location': '#/components/schemas/configuration_message_request', + 'x-schema-type': 'request', +}; +function validate144( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate144.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema129.allOf[0].required, + parentSchema: schema129.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate144.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema129.allOf[0].properties.messageType.type, + parentSchema: schema129.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate144.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema129.allOf[0].type, + parentSchema: schema129.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.configuration === undefined && (missing1 = 'configuration')) + ) { + validate144.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema129.allOf[1].required, + parentSchema: schema129.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('configuration' !== data1) { + validate144.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'configuration' }, + message: 'must be equal to constant', + schema: 'configuration', + parentSchema: schema129.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.configuration !== undefined) { + let data2 = data.configuration; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + } else { + validate144.errors = [ + { + instancePath: instancePath + '/configuration', + schemaPath: '#/allOf/1/properties/configuration/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema129.allOf[1].properties.configuration.type, + parentSchema: schema129.allOf[1].properties.configuration, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate144.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema129.allOf[1].type, + parentSchema: schema129.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate144.errors = vErrors; + return errors === 0; +} +exports.validateConfigurationMessageResponse = validate145; +const schema130 = { + title: 'Configuration Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'configuration' }, + configuration: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'configuration'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ConfigurationMessageResponse', + 'x-location': '#/components/schemas/configuration_message_response', + 'x-schema-type': 'response', +}; +function validate145( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate145.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema130.allOf[0].required, + parentSchema: schema130.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate145.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema130.allOf[0].properties.messageType.type, + parentSchema: schema130.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate145.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema130.allOf[0].type, + parentSchema: schema130.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.configuration === undefined && (missing1 = 'configuration')) + ) { + validate145.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema130.allOf[1].required, + parentSchema: schema130.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('configuration' !== data1) { + validate145.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'configuration' }, + message: 'must be equal to constant', + schema: 'configuration', + parentSchema: schema130.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.configuration !== undefined) { + let data2 = data.configuration; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + } else { + validate145.errors = [ + { + instancePath: instancePath + '/configuration', + schemaPath: '#/allOf/1/properties/configuration/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema130.allOf[1].properties.configuration.type, + parentSchema: schema130.allOf[1].properties.configuration, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate145.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema130.allOf[1].type, + parentSchema: schema130.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate145.errors = vErrors; + return errors === 0; +} +exports.validateExperimentStatusChangedMessageRequest = validate146; +const schema131 = { + title: 'Experiment Status Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'experiment-status-changed' }, + status: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['messageType', 'status'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ExperimentStatusChangedMessageRequest', + 'x-location': '#/components/schemas/experiment_status_changed_message_request', + 'x-schema-type': 'request', +}; +function validate146( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate146.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema131.allOf[0].required, + parentSchema: schema131.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate146.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema131.allOf[0].properties.messageType.type, + parentSchema: schema131.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate146.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema131.allOf[0].type, + parentSchema: schema131.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.status === undefined && (missing1 = 'status')) + ) { + validate146.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema131.allOf[1].required, + parentSchema: schema131.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('experiment-status-changed' !== data1) { + validate146.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'experiment-status-changed' }, + message: 'must be equal to constant', + schema: 'experiment-status-changed', + parentSchema: schema131.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate146.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema131.allOf[1].properties.status.type, + parentSchema: schema131.allOf[1].properties.status, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.message !== undefined) { + let data3 = data.message; + const _errs10 = errors; + if (typeof data3 !== 'string') { + validate146.errors = [ + { + instancePath: instancePath + '/message', + schemaPath: '#/allOf/1/properties/message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema131.allOf[1].properties.message.type, + parentSchema: schema131.allOf[1].properties.message, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate146.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema131.allOf[1].type, + parentSchema: schema131.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate146.errors = vErrors; + return errors === 0; +} +exports.validateExperimentStatusChangedMessageResponse = validate147; +const schema132 = { + title: 'Experiment Status Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'experiment-status-changed' }, + status: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['messageType', 'status'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'ExperimentStatusChangedMessageResponse', + 'x-location': '#/components/schemas/experiment_status_changed_message_response', + 'x-schema-type': 'response', +}; +function validate147( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate147.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema132.allOf[0].required, + parentSchema: schema132.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate147.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema132.allOf[0].properties.messageType.type, + parentSchema: schema132.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate147.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema132.allOf[0].type, + parentSchema: schema132.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.status === undefined && (missing1 = 'status')) + ) { + validate147.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema132.allOf[1].required, + parentSchema: schema132.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('experiment-status-changed' !== data1) { + validate147.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'experiment-status-changed' }, + message: 'must be equal to constant', + schema: 'experiment-status-changed', + parentSchema: schema132.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate147.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema132.allOf[1].properties.status.type, + parentSchema: schema132.allOf[1].properties.status, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.message !== undefined) { + let data3 = data.message; + const _errs10 = errors; + if (typeof data3 !== 'string') { + validate147.errors = [ + { + instancePath: instancePath + '/message', + schemaPath: '#/allOf/1/properties/message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema132.allOf[1].properties.message.type, + parentSchema: schema132.allOf[1].properties.message, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate147.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema132.allOf[1].type, + parentSchema: schema132.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate147.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStatusRequest = validate148; +const schema133 = { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + 'x-standalone': true, + 'x-name': 'ConnectionStatusRequest', + 'x-location': '#/components/schemas/peerconnection_status_request', + 'x-schema-type': 'request', +}; +function validate148( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate148.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema133.type, + parentSchema: schema133, + data, + }, + ]; + return false; + } + if ( + !( + data === 'new' || + data === 'connecting' || + data === 'connected' || + data === 'disconnected' || + data === 'failed' || + data === 'closed' + ) + ) { + validate148.errors = [ + { + instancePath, + schemaPath: '#/enum', + keyword: 'enum', + params: { allowedValues: schema133.enum }, + message: 'must be equal to one of the allowed values', + schema: schema133.enum, + parentSchema: schema133, + data, + }, + ]; + return false; + } + validate148.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStatusResponse = validate149; +const schema134 = { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + 'x-standalone': true, + 'x-name': 'ConnectionStatusResponse', + 'x-location': '#/components/schemas/peerconnection_status_response', + 'x-schema-type': 'response', +}; +function validate149( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate149.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema134.type, + parentSchema: schema134, + data, + }, + ]; + return false; + } + if ( + !( + data === 'new' || + data === 'connecting' || + data === 'connected' || + data === 'disconnected' || + data === 'failed' || + data === 'closed' + ) + ) { + validate149.errors = [ + { + instancePath, + schemaPath: '#/enum', + keyword: 'enum', + params: { allowedValues: schema134.enum }, + message: 'must be equal to one of the allowed values', + schema: schema134.enum, + parentSchema: schema134, + data, + }, + ]; + return false; + } + validate149.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionCommonRequest = validate150; +const schema135 = { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + 'x-standalone': true, + 'x-name': 'PeerconnectionCommonRequest', + 'x-location': '#/components/schemas/peerconnection_common_request', + 'x-schema-type': 'request', +}; +function validate150( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate150.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema135.required, + parentSchema: schema135, + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate150.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema135.properties.type.type, + parentSchema: schema135.properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate150.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema135.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema135.properties.type.enum, + parentSchema: schema135.properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate150.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema135.type, + parentSchema: schema135, + data, + }, + ]; + return false; + } + } + validate150.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionCommonResponse = validate151; +const schema136 = { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + 'x-standalone': true, + 'x-name': 'PeerconnectionCommonResponse', + 'x-location': '#/components/schemas/peerconnection_common_response', + 'x-schema-type': 'response', +}; +function validate151( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate151.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema136.required, + parentSchema: schema136, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate151.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema136.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate151.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema136.properties.url.type, + parentSchema: schema136.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate151.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema136.properties.type.type, + parentSchema: schema136.properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate151.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema136.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema136.properties.type.enum, + parentSchema: schema136.properties.type, + data: data1, + }, + ]; + return false; + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate151.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema136.properties.status.type, + parentSchema: schema136.properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate151.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema136.properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema136.properties.status.enum, + parentSchema: schema136.properties.status, + data: data2, + }, + ]; + return false; + } + var valid0 = _errs5 === errors; + } else { + var valid0 = true; + } + } + } + } + } else { + validate151.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema136.type, + parentSchema: schema136, + data, + }, + ]; + return false; + } + } + validate151.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionOverviewRequest = validate152; +const schema137 = { + title: 'Peerconnection Overview', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-standalone': true, + 'x-name': 'PeerconnectionOverviewRequest', + 'x-location': '#/components/schemas/peerconnection_overview_request', + 'x-schema-type': 'request', +}; +function validate152( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate152.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema137.allOf[0].required, + parentSchema: schema137.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate152.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema137.allOf[0].properties.type.type, + parentSchema: schema137.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate152.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema137.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema137.allOf[0].properties.type.enum, + parentSchema: schema137.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate152.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema137.allOf[0].type, + parentSchema: schema137.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate152.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema137.allOf[1].required, + parentSchema: schema137.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate152.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema137.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate152.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema137.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate152.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema137.allOf[1].properties.devices.items.required, + parentSchema: schema137.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate152.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema137.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate152.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema137.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema137.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + } + } + } else { + validate152.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema137.allOf[1].properties.devices.items.type, + parentSchema: schema137.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate152.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema137.allOf[1].properties.devices.type, + parentSchema: schema137.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate152.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema137.allOf[1].type, + parentSchema: schema137.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate152.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionOverviewResponse = validate153; +const schema138 = { + title: 'Peerconnection Overview', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-standalone': true, + 'x-name': 'PeerconnectionOverviewResponse', + 'x-location': '#/components/schemas/peerconnection_overview_response', + 'x-schema-type': 'response', +}; +function validate153( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate153.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema138.allOf[0].required, + parentSchema: schema138.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate153.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema138.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate153.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema138.allOf[0].properties.url.type, + parentSchema: schema138.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate153.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema138.allOf[0].properties.type.type, + parentSchema: schema138.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate153.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema138.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema138.allOf[0].properties.type.enum, + parentSchema: schema138.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate153.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema138.allOf[0].properties.status.type, + parentSchema: schema138.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate153.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema138.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema138.allOf[0].properties.status.enum, + parentSchema: schema138.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate153.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema138.allOf[0].type, + parentSchema: schema138.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate153.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema138.allOf[1].required, + parentSchema: schema138.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate153.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema138.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate153.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema138.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate153.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema138.allOf[1].properties.devices.items.required, + parentSchema: schema138.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate153.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema138.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate153.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema138.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema138.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + } + } + } else { + validate153.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema138.allOf[1].properties.devices.items.type, + parentSchema: schema138.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate153.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema138.allOf[1].properties.devices.type, + parentSchema: schema138.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate153.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema138.allOf[1].type, + parentSchema: schema138.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate153.errors = vErrors; + return errors === 0; +} +exports.validateConfiguredDeviceReferenceRequest = validate154; +const schema139 = { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'ConfiguredDeviceReferenceRequest', + 'x-location': '#/components/schemas/configured_device_reference_request', + 'x-schema-type': 'request', +}; +function validate154( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate154.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema139.required, + parentSchema: schema139, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate154.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema139.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate154.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema139.properties.url.type, + parentSchema: schema139.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.config !== undefined) { + let data1 = data.config; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + if (data1.services !== undefined) { + let data2 = data1.services; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len0 = data2.length; + for (let i0 = 0; i0 < len0; i0++) { + let data3 = data2[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.serviceType === undefined && + (missing1 = 'serviceType')) || + (data3.serviceId === undefined && + (missing1 = 'serviceId')) || + (data3.remoteServiceId === undefined && + (missing1 = 'remoteServiceId')) + ) { + validate154.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema139.properties.config.properties.services.items + .required, + parentSchema: + schema139.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.serviceType !== undefined) { + let data4 = data3.serviceType; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate154.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema139.properties.config.properties + .services.items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } else { + validate154.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema139.properties.config.properties + .services.items.properties.serviceType.type, + parentSchema: + schema139.properties.config.properties + .services.items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs10 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.serviceId !== undefined) { + let data5 = data3.serviceId; + const _errs12 = errors; + if (typeof data5 !== 'string') { + validate154.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceId', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema139.properties.config.properties.services + .items.properties.serviceId.type, + parentSchema: + schema139.properties.config.properties.services + .items.properties.serviceId, + data: data5, + }, + ]; + return false; + } + var valid3 = _errs12 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.remoteServiceId !== undefined) { + let data6 = data3.remoteServiceId; + const _errs14 = errors; + if (typeof data6 !== 'string') { + validate154.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema139.properties.config.properties + .services.items.properties.remoteServiceId + .type, + parentSchema: + schema139.properties.config.properties + .services.items.properties.remoteServiceId, + data: data6, + }, + ]; + return false; + } + var valid3 = _errs14 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + validate154.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema139.properties.config.properties.services.items + .type, + parentSchema: + schema139.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate154.errors = [ + { + instancePath: instancePath + '/config/services', + schemaPath: '#/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema139.properties.config.properties.services.type, + parentSchema: schema139.properties.config.properties.services, + data: data2, + }, + ]; + return false; + } + } + } + } else { + validate154.errors = [ + { + instancePath: instancePath + '/config', + schemaPath: '#/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema139.properties.config.type, + parentSchema: schema139.properties.config, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate154.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema139.type, + parentSchema: schema139, + data, + }, + ]; + return false; + } + } + validate154.errors = vErrors; + return errors === 0; +} +exports.validateConfiguredDeviceReferenceResponse = validate155; +const schema140 = { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + 'x-standalone': true, + 'x-name': 'ConfiguredDeviceReferenceResponse', + 'x-location': '#/components/schemas/configured_device_reference_response', + 'x-schema-type': 'response', +}; +function validate155( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.url === undefined && (missing0 = 'url')) { + validate155.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema140.required, + parentSchema: schema140, + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs1 = errors; + if (errors === _errs1) { + if (errors === _errs1) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate155.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema140.properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate155.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema140.properties.url.type, + parentSchema: schema140.properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.config !== undefined) { + let data1 = data.config; + const _errs3 = errors; + if (errors === _errs3) { + if (data1 && typeof data1 == 'object' && !Array.isArray(data1)) { + if (data1.services !== undefined) { + let data2 = data1.services; + const _errs5 = errors; + if (errors === _errs5) { + if (Array.isArray(data2)) { + var valid2 = true; + const len0 = data2.length; + for (let i0 = 0; i0 < len0; i0++) { + let data3 = data2[i0]; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing1; + if ( + (data3.serviceType === undefined && + (missing1 = 'serviceType')) || + (data3.serviceId === undefined && + (missing1 = 'serviceId')) || + (data3.remoteServiceId === undefined && + (missing1 = 'remoteServiceId')) + ) { + validate155.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema140.properties.config.properties.services.items + .required, + parentSchema: + schema140.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.serviceType !== undefined) { + let data4 = data3.serviceType; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate155.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema140.properties.config.properties + .services.items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } else { + validate155.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceType', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema140.properties.config.properties + .services.items.properties.serviceType.type, + parentSchema: + schema140.properties.config.properties + .services.items.properties.serviceType, + data: data4, + }, + ]; + return false; + } + } + } + var valid3 = _errs10 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.serviceId !== undefined) { + let data5 = data3.serviceId; + const _errs12 = errors; + if (typeof data5 !== 'string') { + validate155.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/serviceId', + schemaPath: + '#/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema140.properties.config.properties.services + .items.properties.serviceId.type, + parentSchema: + schema140.properties.config.properties.services + .items.properties.serviceId, + data: data5, + }, + ]; + return false; + } + var valid3 = _errs12 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data3.remoteServiceId !== undefined) { + let data6 = data3.remoteServiceId; + const _errs14 = errors; + if (typeof data6 !== 'string') { + validate155.errors = [ + { + instancePath: + instancePath + + '/config/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema140.properties.config.properties + .services.items.properties.remoteServiceId + .type, + parentSchema: + schema140.properties.config.properties + .services.items.properties.remoteServiceId, + data: data6, + }, + ]; + return false; + } + var valid3 = _errs14 === errors; + } else { + var valid3 = true; + } + } + } + } + } else { + validate155.errors = [ + { + instancePath: instancePath + '/config/services/' + i0, + schemaPath: + '#/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema140.properties.config.properties.services.items + .type, + parentSchema: + schema140.properties.config.properties.services.items, + data: data3, + }, + ]; + return false; + } + } + var valid2 = _errs7 === errors; + if (!valid2) { + break; + } + } + } else { + validate155.errors = [ + { + instancePath: instancePath + '/config/services', + schemaPath: '#/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema140.properties.config.properties.services.type, + parentSchema: schema140.properties.config.properties.services, + data: data2, + }, + ]; + return false; + } + } + } + } else { + validate155.errors = [ + { + instancePath: instancePath + '/config', + schemaPath: '#/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema140.properties.config.type, + parentSchema: schema140.properties.config, + data: data1, + }, + ]; + return false; + } + } + var valid0 = _errs3 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate155.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema140.type, + parentSchema: schema140, + data, + }, + ]; + return false; + } + } + validate155.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionRequest = validate156; +const schema141 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionRequest', + 'x-location': '#/components/schemas/peerconnection_request', + 'x-schema-type': 'request', +}; +function validate156( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate156.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema141.allOf[0].required, + parentSchema: schema141.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate156.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema141.allOf[0].properties.type.type, + parentSchema: schema141.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate156.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema141.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema141.allOf[0].properties.type.enum, + parentSchema: schema141.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate156.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema141.allOf[0].type, + parentSchema: schema141.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate156.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema141.allOf[1].required, + parentSchema: schema141.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate156.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema141.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate156.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema141.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate156.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema141.allOf[1].properties.devices.items.required, + parentSchema: schema141.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate156.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema141.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate156.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema141.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema141.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data2.config !== undefined) { + let data4 = data2.config; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data4 && + typeof data4 == 'object' && + !Array.isArray(data4) + ) { + if (data4.services !== undefined) { + let data5 = data4.services; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid6 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing3; + if ( + (data6.serviceType === undefined && + (missing3 = 'serviceType')) || + (data6.serviceId === undefined && + (missing3 = 'serviceId')) || + (data6.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema141.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema141.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.serviceType !== undefined) { + let data7 = data6.serviceType; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema141.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } else { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema141.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema141.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } + } + var valid7 = _errs19 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data6.serviceId !== undefined) { + let data8 = data6.serviceId; + const _errs21 = errors; + if (typeof data8 !== 'string') { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema141.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema141.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data8, + }, + ]; + return false; + } + var valid7 = _errs21 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data6.remoteServiceId !== + undefined + ) { + let data9 = data6.remoteServiceId; + const _errs23 = errors; + if (typeof data9 !== 'string') { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema141.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema141.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data9, + }, + ]; + return false; + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema141.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema141.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } + } + var valid6 = _errs16 === errors; + if (!valid6) { + break; + } + } + } else { + validate156.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema141.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema141.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate156.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema141.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema141.allOf[1].properties.devices.items + .properties.config, + data: data4, + }, + ]; + return false; + } + } + var valid4 = _errs12 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate156.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema141.allOf[1].properties.devices.items.type, + parentSchema: schema141.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate156.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema141.allOf[1].properties.devices.type, + parentSchema: schema141.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate156.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema141.allOf[1].type, + parentSchema: schema141.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate156.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionResponse = validate157; +const schema142 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionResponse', + 'x-location': '#/components/schemas/peerconnection_response', + 'x-schema-type': 'response', +}; +function validate157( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate157.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema142.allOf[0].required, + parentSchema: schema142.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate157.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema142.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate157.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema142.allOf[0].properties.url.type, + parentSchema: schema142.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate157.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema142.allOf[0].properties.type.type, + parentSchema: schema142.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate157.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema142.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema142.allOf[0].properties.type.enum, + parentSchema: schema142.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate157.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema142.allOf[0].properties.status.type, + parentSchema: schema142.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate157.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema142.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema142.allOf[0].properties.status.enum, + parentSchema: schema142.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate157.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema142.allOf[0].type, + parentSchema: schema142.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate157.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema142.allOf[1].required, + parentSchema: schema142.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate157.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema142.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate157.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema142.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate157.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema142.allOf[1].properties.devices.items.required, + parentSchema: schema142.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate157.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema142.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate157.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema142.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema142.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema142.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema142.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema142.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema142.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema142.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema142.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema142.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema142.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema142.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema142.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema142.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate157.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema142.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema142.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate157.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema142.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema142.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate157.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema142.allOf[1].properties.devices.items.type, + parentSchema: schema142.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate157.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema142.allOf[1].properties.devices.type, + parentSchema: schema142.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate157.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema142.allOf[1].type, + parentSchema: schema142.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate157.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionClosedEventCallbackRequest = validate158; +const schema143 = { + title: 'Peerconnection Closed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-closed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionClosedEventCallbackRequest', + 'x-location': '#/components/schemas/peerconnection_closed_request', + 'x-schema-type': 'request', +}; +function validate158( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema143.allOf[0].allOf[0].required, + parentSchema: schema143.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate158.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema143.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema143.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema143.allOf[0].allOf[0].type, + parentSchema: schema143.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema143.allOf[0].allOf[1].required, + parentSchema: schema143.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate158.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema143.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema143.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate158.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema143.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema143.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema143.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate158.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema143.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema143.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema143.allOf[0].allOf[1].type, + parentSchema: schema143.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema143.allOf[1].required, + parentSchema: schema143.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate158.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema143.allOf[1].properties.eventType.type, + parentSchema: schema143.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-closed')) { + validate158.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema143.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema143.allOf[1].properties.eventType.enum, + parentSchema: schema143.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if (data4.type === undefined && (missing3 = 'type')) { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema143.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.type !== undefined) { + let data5 = data4.type; + if (typeof data5 !== 'string') { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema143.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data5, + }, + ]; + return false; + } + if (!(data5 === 'local' || data5 === 'webrtc')) { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema143.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema143.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema143.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema143.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs20 = errors; + if (errors === _errs20) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema143.allOf[1].properties.peerconnection.allOf[1] + .required, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data6 = data4.devices; + const _errs22 = errors; + if (errors === _errs22) { + if (Array.isArray(data6)) { + if (data6.length > 2) { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data6, + }, + ]; + return false; + } else { + if (data6.length < 2) { + validate158.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema143.allOf[1].properties.peerconnection + .allOf[1].properties.devices, + data: data6, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs24 = errors; + if (errors === _errs24) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing5; + if (data7.url === undefined && (missing5 = 'url')) { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema143.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema143.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs26 = errors; + if (errors === _errs26) { + if (errors === _errs26) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } + } + var valid9 = _errs26 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data7.config !== undefined) { + let data9 = data7.config; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + if (data9.services !== undefined) { + let data10 = data9.services; + const _errs30 = errors; + if (errors === _errs30) { + if (Array.isArray(data10)) { + var valid11 = true; + const len1 = data10.length; + for (let i1 = 0; i1 < len1; i1++) { + let data11 = data10[i1]; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + let missing6; + if ( + (data11.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data11.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data11.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema143.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema143.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data11, + }, + ]; + return false; + } else { + if ( + data11.serviceType !== + undefined + ) { + let data12 = + data11.serviceType; + const _errs35 = errors; + if (errors === _errs35) { + if ( + errors === _errs35 + ) { + if ( + typeof data12 === + 'string' + ) { + if ( + !formats0(data12) + ) { + validate158.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data12, + }, + ]; + return false; + } + } else { + validate158.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data12, + }, + ]; + return false; + } + } + } + var valid12 = + _errs35 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data11.serviceId !== + undefined + ) { + let data13 = + data11.serviceId; + const _errs37 = errors; + if ( + typeof data13 !== + 'string' + ) { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data13, + }, + ]; + return false; + } + var valid12 = + _errs37 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data11.remoteServiceId !== + undefined + ) { + let data14 = + data11.remoteServiceId; + const _errs39 = + errors; + if ( + typeof data14 !== + 'string' + ) { + validate158.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema143 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data14, + }, + ]; + return false; + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema143.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema143.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data11, + }, + ]; + return false; + } + } + var valid11 = _errs32 === errors; + if (!valid11) { + break; + } + } + } else { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data10, + }, + ]; + return false; + } + } + } + } else { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema143.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data9, + }, + ]; + return false; + } + } + var valid9 = _errs28 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate158.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema143.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema143.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data7, + }, + ]; + return false; + } + } + var valid8 = _errs24 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema143.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data6, + }, + ]; + return false; + } + } + } + } + } else { + validate158.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema143.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema143.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs20 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate158.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema143.allOf[1].type, + parentSchema: schema143.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate158.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionClosedEventCallbackResponse = validate159; +const schema144 = { + title: 'Peerconnection Closed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-closed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: [ + 'new', + 'connecting', + 'connected', + 'disconnected', + 'failed', + 'closed', + ], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionClosedEventCallbackResponse', + 'x-location': '#/components/schemas/peerconnection_closed_response', + 'x-schema-type': 'response', +}; +function validate159( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema144.allOf[0].allOf[0].required, + parentSchema: schema144.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema144.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema144.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema144.allOf[0].allOf[0].type, + parentSchema: schema144.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema144.allOf[0].allOf[1].required, + parentSchema: schema144.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema144.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema144.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate159.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema144.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema144.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema144.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema144.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema144.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema144.allOf[0].allOf[1].type, + parentSchema: schema144.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema144.allOf[1].required, + parentSchema: schema144.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema144.allOf[1].properties.eventType.type, + parentSchema: schema144.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-closed')) { + validate159.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema144.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema144.allOf[1].properties.eventType.enum, + parentSchema: schema144.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.url === undefined && (missing3 = 'url')) || + (data4.type === undefined && (missing3 = 'type')) || + (data4.status === undefined && (missing3 = 'status')) + ) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema144.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.url.type, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid6 = _errs18 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.type !== undefined) { + let data6 = data4.type; + const _errs20 = errors; + if (typeof data6 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'local' || data6 === 'webrtc')) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + var valid6 = _errs20 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.status !== undefined) { + let data7 = data4.status; + const _errs22 = errors; + if (typeof data7 !== 'string') { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.status.type, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'new' || + data7 === 'connecting' || + data7 === 'connected' || + data7 === 'disconnected' || + data7 === 'failed' || + data7 === 'closed' + ) + ) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + var valid6 = _errs22 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema144.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema144.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs24 = errors; + if (errors === _errs24) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema144.allOf[1].properties.peerconnection.allOf[1] + .required, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data8 = data4.devices; + const _errs26 = errors; + if (errors === _errs26) { + if (Array.isArray(data8)) { + if (data8.length > 2) { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + if (data8.length < 2) { + validate159.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema144.allOf[1].properties.peerconnection + .allOf[1].properties.devices, + data: data8, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data8.length; + for (let i0 = 0; i0 < len0; i0++) { + let data9 = data8[i0]; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing5; + if (data9.url === undefined && (missing5 = 'url')) { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema144.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema144.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs30 = errors; + if (errors === _errs30) { + if (errors === _errs30) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + var valid9 = _errs30 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data9.config !== undefined) { + let data11 = data9.config; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + if (data11.services !== undefined) { + let data12 = data11.services; + const _errs34 = errors; + if (errors === _errs34) { + if (Array.isArray(data12)) { + var valid11 = true; + const len1 = data12.length; + for (let i1 = 0; i1 < len1; i1++) { + let data13 = data12[i1]; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == 'object' && + !Array.isArray(data13) + ) { + let missing6; + if ( + (data13.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data13.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data13.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema144.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema144.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } else { + if ( + data13.serviceType !== + undefined + ) { + let data14 = + data13.serviceType; + const _errs39 = errors; + if (errors === _errs39) { + if ( + errors === _errs39 + ) { + if ( + typeof data14 === + 'string' + ) { + if ( + !formats0(data14) + ) { + validate159.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate159.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.serviceId !== + undefined + ) { + let data15 = + data13.serviceId; + const _errs41 = errors; + if ( + typeof data15 !== + 'string' + ) { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid12 = + _errs41 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.remoteServiceId !== + undefined + ) { + let data16 = + data13.remoteServiceId; + const _errs43 = + errors; + if ( + typeof data16 !== + 'string' + ) { + validate159.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema144 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data16, + }, + ]; + return false; + } + var valid12 = + _errs43 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema144.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema144.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } + } + var valid11 = _errs36 === errors; + if (!valid11) { + break; + } + } + } else { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data12, + }, + ]; + return false; + } + } + } + } else { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema144.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data11, + }, + ]; + return false; + } + } + var valid9 = _errs32 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate159.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema144.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema144.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } + } + var valid8 = _errs28 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema144.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } + } + } + } + } else { + validate159.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema144.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema144.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs24 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate159.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema144.allOf[1].type, + parentSchema: schema144.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate159.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionStatusChangedEventCallbackRequest = validate160; +const schema145 = { + title: 'Peerconnection Status Changed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-status-changed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionStatusChangedEventCallbackRequest', + 'x-location': '#/components/schemas/peerconnection_status_changed_request', + 'x-schema-type': 'request', +}; +function validate160( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema145.allOf[0].allOf[0].required, + parentSchema: schema145.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate160.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema145.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema145.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema145.allOf[0].allOf[0].type, + parentSchema: schema145.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema145.allOf[0].allOf[1].required, + parentSchema: schema145.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate160.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema145.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema145.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate160.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema145.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema145.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema145.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate160.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema145.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema145.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema145.allOf[0].allOf[1].type, + parentSchema: schema145.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema145.allOf[1].required, + parentSchema: schema145.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate160.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema145.allOf[1].properties.eventType.type, + parentSchema: schema145.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-status-changed')) { + validate160.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema145.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema145.allOf[1].properties.eventType.enum, + parentSchema: schema145.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if (data4.type === undefined && (missing3 = 'type')) { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema145.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.type !== undefined) { + let data5 = data4.type; + if (typeof data5 !== 'string') { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema145.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data5, + }, + ]; + return false; + } + if (!(data5 === 'local' || data5 === 'webrtc')) { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema145.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema145.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema145.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema145.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs20 = errors; + if (errors === _errs20) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema145.allOf[1].properties.peerconnection.allOf[1] + .required, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data6 = data4.devices; + const _errs22 = errors; + if (errors === _errs22) { + if (Array.isArray(data6)) { + if (data6.length > 2) { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data6, + }, + ]; + return false; + } else { + if (data6.length < 2) { + validate160.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema145.allOf[1].properties.peerconnection + .allOf[1].properties.devices, + data: data6, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs24 = errors; + if (errors === _errs24) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing5; + if (data7.url === undefined && (missing5 = 'url')) { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema145.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema145.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs26 = errors; + if (errors === _errs26) { + if (errors === _errs26) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } + } + var valid9 = _errs26 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data7.config !== undefined) { + let data9 = data7.config; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + if (data9.services !== undefined) { + let data10 = data9.services; + const _errs30 = errors; + if (errors === _errs30) { + if (Array.isArray(data10)) { + var valid11 = true; + const len1 = data10.length; + for (let i1 = 0; i1 < len1; i1++) { + let data11 = data10[i1]; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + let missing6; + if ( + (data11.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data11.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data11.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema145.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema145.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data11, + }, + ]; + return false; + } else { + if ( + data11.serviceType !== + undefined + ) { + let data12 = + data11.serviceType; + const _errs35 = errors; + if (errors === _errs35) { + if ( + errors === _errs35 + ) { + if ( + typeof data12 === + 'string' + ) { + if ( + !formats0(data12) + ) { + validate160.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data12, + }, + ]; + return false; + } + } else { + validate160.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data12, + }, + ]; + return false; + } + } + } + var valid12 = + _errs35 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data11.serviceId !== + undefined + ) { + let data13 = + data11.serviceId; + const _errs37 = errors; + if ( + typeof data13 !== + 'string' + ) { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data13, + }, + ]; + return false; + } + var valid12 = + _errs37 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data11.remoteServiceId !== + undefined + ) { + let data14 = + data11.remoteServiceId; + const _errs39 = + errors; + if ( + typeof data14 !== + 'string' + ) { + validate160.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema145 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data14, + }, + ]; + return false; + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema145.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema145.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data11, + }, + ]; + return false; + } + } + var valid11 = _errs32 === errors; + if (!valid11) { + break; + } + } + } else { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data10, + }, + ]; + return false; + } + } + } + } else { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema145.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data9, + }, + ]; + return false; + } + } + var valid9 = _errs28 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate160.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema145.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema145.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data7, + }, + ]; + return false; + } + } + var valid8 = _errs24 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema145.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data6, + }, + ]; + return false; + } + } + } + } + } else { + validate160.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema145.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema145.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs20 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate160.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema145.allOf[1].type, + parentSchema: schema145.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate160.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionStatusChangedEventCallbackResponse = validate161; +const schema146 = { + title: 'Peerconnection Status Changed Event Callback', + allOf: [ + { + title: 'Event Callback', + allOf: [ + { + title: 'Callback', + type: 'object', + properties: { callbackType: { type: 'string' } }, + required: ['callbackType'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + callbackType: { type: 'string', enum: ['event'] }, + eventType: { type: 'string' }, + }, + required: ['callbackType', 'eventType'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + eventType: { type: 'string', enum: ['peerconnection-status-changed'] }, + peerconnection: { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: [ + 'new', + 'connecting', + 'connected', + 'disconnected', + 'failed', + 'closed', + ], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + }, + required: ['eventType', 'peerconnection'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'PeerconnectionStatusChangedEventCallbackResponse', + 'x-location': '#/components/schemas/peerconnection_status_changed_response', + 'x-schema-type': 'response', +}; +function validate161( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + const _errs1 = errors; + if (errors === _errs1) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.callbackType === undefined && (missing0 = 'callbackType')) { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema146.allOf[0].allOf[0].required, + parentSchema: schema146.allOf[0].allOf[0], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data0 = data.callbackType; + if (typeof data0 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema146.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema146.allOf[0].allOf[0].properties.callbackType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema146.allOf[0].allOf[0].type, + parentSchema: schema146.allOf[0].allOf[0], + data, + }, + ]; + return false; + } + } + var valid1 = _errs1 === errors; + if (valid1) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.callbackType === undefined && (missing1 = 'callbackType')) || + (data.eventType === undefined && (missing1 = 'eventType')) + ) { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema146.allOf[0].allOf[1].required, + parentSchema: schema146.allOf[0].allOf[1], + data, + }, + ]; + return false; + } else { + if (data.callbackType !== undefined) { + let data1 = data.callbackType; + const _errs7 = errors; + if (typeof data1 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema146.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema146.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'event')) { + validate161.errors = [ + { + instancePath: instancePath + '/callbackType', + schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', + keyword: 'enum', + params: { + allowedValues: + schema146.allOf[0].allOf[1].properties.callbackType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema146.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema146.allOf[0].allOf[1].properties.callbackType, + data: data1, + }, + ]; + return false; + } + var valid3 = _errs7 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data.eventType !== undefined) { + let data2 = data.eventType; + const _errs9 = errors; + if (typeof data2 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema146.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema146.allOf[0].allOf[1].properties.eventType, + data: data2, + }, + ]; + return false; + } + var valid3 = _errs9 === errors; + } else { + var valid3 = true; + } + } + } + } else { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema146.allOf[0].allOf[1].type, + parentSchema: schema146.allOf[0].allOf[1], + data, + }, + ]; + return false; + } + } + var valid1 = _errs5 === errors; + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs11 = errors; + if (errors === _errs11) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.eventType === undefined && (missing2 = 'eventType')) || + (data.peerconnection === undefined && (missing2 = 'peerconnection')) + ) { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema146.allOf[1].required, + parentSchema: schema146.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.eventType !== undefined) { + let data3 = data.eventType; + const _errs13 = errors; + if (typeof data3 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema146.allOf[1].properties.eventType.type, + parentSchema: schema146.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + if (!(data3 === 'peerconnection-status-changed')) { + validate161.errors = [ + { + instancePath: instancePath + '/eventType', + schemaPath: '#/allOf/1/properties/eventType/enum', + keyword: 'enum', + params: { allowedValues: schema146.allOf[1].properties.eventType.enum }, + message: 'must be equal to one of the allowed values', + schema: schema146.allOf[1].properties.eventType.enum, + parentSchema: schema146.allOf[1].properties.eventType, + data: data3, + }, + ]; + return false; + } + var valid4 = _errs13 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.peerconnection !== undefined) { + let data4 = data.peerconnection; + const _errs15 = errors; + const _errs16 = errors; + if (errors === _errs16) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing3; + if ( + (data4.url === undefined && (missing3 = 'url')) || + (data4.type === undefined && (missing3 = 'type')) || + (data4.status === undefined && (missing3 = 'status')) + ) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema146.allOf[1].properties.peerconnection.allOf[0].required, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.url.type, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid6 = _errs18 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.type !== undefined) { + let data6 = data4.type; + const _errs20 = errors; + if (typeof data6 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.type.type, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + if (!(data6 === 'local' || data6 === 'webrtc')) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/type', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.type.enum, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.type, + data: data6, + }, + ]; + return false; + } + var valid6 = _errs20 === errors; + } else { + var valid6 = true; + } + if (valid6) { + if (data4.status !== undefined) { + let data7 = data4.status; + const _errs22 = errors; + if (typeof data7 !== 'string') { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.status.type, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + if ( + !( + data7 === 'new' || + data7 === 'connecting' || + data7 === 'connected' || + data7 === 'disconnected' || + data7 === 'failed' || + data7 === 'closed' + ) + ) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/status', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.status.enum, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[0] + .properties.status, + data: data7, + }, + ]; + return false; + } + var valid6 = _errs22 === errors; + } else { + var valid6 = true; + } + } + } + } + } else { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema146.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema146.allOf[1].properties.peerconnection.allOf[0], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs16 === errors; + if (valid5) { + const _errs24 = errors; + if (errors === _errs24) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing4; + if (data4.devices === undefined && (missing4 = 'devices')) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: + schema146.allOf[1].properties.peerconnection.allOf[1] + .required, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } else { + if (data4.devices !== undefined) { + let data8 = data4.devices; + const _errs26 = errors; + if (errors === _errs26) { + if (Array.isArray(data8)) { + if (data8.length > 2) { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } else { + if (data8.length < 2) { + validate161.errors = [ + { + instancePath: + instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: + schema146.allOf[1].properties.peerconnection + .allOf[1].properties.devices, + data: data8, + }, + ]; + return false; + } else { + var valid8 = true; + const len0 = data8.length; + for (let i0 = 0; i0 < len0; i0++) { + let data9 = data8[i0]; + const _errs28 = errors; + if (errors === _errs28) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing5; + if (data9.url === undefined && (missing5 = 'url')) { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + + missing5 + + "'", + schema: + schema146.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items + .required, + parentSchema: + schema146.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs30 = errors; + if (errors === _errs30) { + if (errors === _errs30) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/url', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url.type, + parentSchema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + var valid9 = _errs30 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data9.config !== undefined) { + let data11 = data9.config; + const _errs32 = errors; + if (errors === _errs32) { + if ( + data11 && + typeof data11 == 'object' && + !Array.isArray(data11) + ) { + if (data11.services !== undefined) { + let data12 = data11.services; + const _errs34 = errors; + if (errors === _errs34) { + if (Array.isArray(data12)) { + var valid11 = true; + const len1 = data12.length; + for (let i1 = 0; i1 < len1; i1++) { + let data13 = data12[i1]; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == 'object' && + !Array.isArray(data13) + ) { + let missing6; + if ( + (data13.serviceType === + undefined && + (missing6 = + 'serviceType')) || + (data13.serviceId === + undefined && + (missing6 = + 'serviceId')) || + (data13.remoteServiceId === + undefined && + (missing6 = + 'remoteServiceId')) + ) { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: + missing6, + }, + message: + "must have required property '" + + missing6 + + "'", + schema: + schema146.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.required, + parentSchema: + schema146.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } else { + if ( + data13.serviceType !== + undefined + ) { + let data14 = + data13.serviceType; + const _errs39 = errors; + if (errors === _errs39) { + if ( + errors === _errs39 + ) { + if ( + typeof data14 === + 'string' + ) { + if ( + !formats0(data14) + ) { + validate161.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: + 'format', + params: { + format: + 'uri', + }, + message: + 'must match format "' + + 'uri' + + '"', + schema: + 'uri', + parentSchema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } else { + validate161.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType + .type, + parentSchema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .serviceType, + data: data14, + }, + ]; + return false; + } + } + } + var valid12 = + _errs39 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.serviceId !== + undefined + ) { + let data15 = + data13.serviceId; + const _errs41 = errors; + if ( + typeof data15 !== + 'string' + ) { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId + .type, + parentSchema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices.items + .properties + .config + .properties + .services + .items + .properties + .serviceId, + data: data15, + }, + ]; + return false; + } + var valid12 = + _errs41 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.remoteServiceId !== + undefined + ) { + let data16 = + data13.remoteServiceId; + const _errs43 = + errors; + if ( + typeof data16 !== + 'string' + ) { + validate161.errors = + [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: + 'type', + params: { + type: 'string', + }, + message: + 'must be string', + schema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId + .type, + parentSchema: + schema146 + .allOf[1] + .properties + .peerconnection + .allOf[1] + .properties + .devices + .items + .properties + .config + .properties + .services + .items + .properties + .remoteServiceId, + data: data16, + }, + ]; + return false; + } + var valid12 = + _errs43 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { + type: 'object', + }, + message: 'must be object', + schema: + schema146.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items.type, + parentSchema: + schema146.allOf[1] + .properties + .peerconnection + .allOf[1].properties + .devices.items + .properties.config + .properties.services + .items, + data: data13, + }, + ]; + return false; + } + } + var valid11 = _errs36 === errors; + if (!valid11) { + break; + } + } + } else { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services.type, + parentSchema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config + .properties.services, + data: data12, + }, + ]; + return false; + } + } + } + } else { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0 + + '/config', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config.type, + parentSchema: + schema146.allOf[1].properties + .peerconnection.allOf[1] + .properties.devices.items + .properties.config, + data: data11, + }, + ]; + return false; + } + } + var valid9 = _errs32 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate161.errors = [ + { + instancePath: + instancePath + + '/peerconnection/devices/' + + i0, + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema146.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items.type, + parentSchema: + schema146.allOf[1].properties.peerconnection + .allOf[1].properties.devices.items, + data: data9, + }, + ]; + return false; + } + } + var valid8 = _errs28 === errors; + if (!valid8) { + break; + } + } + } + } + } else { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection/devices', + schemaPath: + '#/allOf/1/properties/peerconnection/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema146.allOf[1].properties.peerconnection.allOf[1] + .properties.devices.type, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[1] + .properties.devices, + data: data8, + }, + ]; + return false; + } + } + } + } + } else { + validate161.errors = [ + { + instancePath: instancePath + '/peerconnection', + schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema146.allOf[1].properties.peerconnection.allOf[1].type, + parentSchema: + schema146.allOf[1].properties.peerconnection.allOf[1], + data: data4, + }, + ]; + return false; + } + } + var valid5 = _errs24 === errors; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate161.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema146.allOf[1].type, + parentSchema: schema146.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs11 === errors; + } + validate161.errors = vErrors; + return errors === 0; +} +exports.validateChangedUrlRequest = validate162; +const schema147 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ChangedUrlRequest', + 'x-location': '#/components/parameters/device_changed_url/schema_request', + 'x-schema-type': 'request', +}; +function validate162( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate162.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema147, + data, + }, + ]; + return false; + } + } else { + validate162.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema147.type, + parentSchema: schema147, + data, + }, + ]; + return false; + } + } + } + validate162.errors = vErrors; + return errors === 0; +} +exports.validateChangedUrlResponse = validate163; +const schema148 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ChangedUrlResponse', + 'x-location': '#/components/parameters/device_changed_url/schema_response', + 'x-schema-type': 'response', +}; +function validate163( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate163.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema148, + data, + }, + ]; + return false; + } + } else { + validate163.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema148.type, + parentSchema: schema148, + data, + }, + ]; + return false; + } + } + } + validate163.errors = vErrors; + return errors === 0; +} +exports.validateDeviceIdRequest = validate164; +const schema149 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'DeviceIdRequest', + 'x-location': '#/components/parameters/device_id/schema_request', + 'x-schema-type': 'request', +}; +function validate164( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate164.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema149, + data, + }, + ]; + return false; + } + } else { + validate164.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema149.type, + parentSchema: schema149, + data, + }, + ]; + return false; + } + } + } + validate164.errors = vErrors; + return errors === 0; +} +exports.validateDeviceIdResponse = validate165; +const schema150 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'DeviceIdResponse', + 'x-location': '#/components/parameters/device_id/schema_response', + 'x-schema-type': 'response', +}; +function validate165( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate165.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema150, + data, + }, + ]; + return false; + } + } else { + validate165.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema150.type, + parentSchema: schema150, + data, + }, + ]; + return false; + } + } + } + validate165.errors = vErrors; + return errors === 0; +} +exports.validateFlatGroupRequest = validate166; +const schema151 = { + type: 'boolean', + default: false, + 'x-standalone': false, + 'x-name': 'FlatGroupRequest', + 'x-location': '#/components/parameters/flat_group/schema_request', + 'x-schema-type': 'request', +}; +function validate166( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'boolean') { + validate166.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema151.type, + parentSchema: schema151, + data, + }, + ]; + return false; + } + validate166.errors = vErrors; + return errors === 0; +} +exports.validateFlatGroupResponse = validate167; +const schema152 = { + type: 'boolean', + default: false, + 'x-standalone': false, + 'x-name': 'FlatGroupResponse', + 'x-location': '#/components/parameters/flat_group/schema_response', + 'x-schema-type': 'response', +}; +function validate167( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'boolean') { + validate167.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema152.type, + parentSchema: schema152, + data, + }, + ]; + return false; + } + validate167.errors = vErrors; + return errors === 0; +} +exports.validateStartTimeRequest = validate168; +const schema153 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'StartTimeRequest', + 'x-location': '#/components/parameters/start_time/schema_request', + 'x-schema-type': 'request', +}; +function validate168( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate168.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema153, + data, + }, + ]; + return false; + } + } else { + validate168.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema153.type, + parentSchema: schema153, + data, + }, + ]; + return false; + } + } + } + validate168.errors = vErrors; + return errors === 0; +} +exports.validateStartTimeResponse = validate169; +const schema154 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'StartTimeResponse', + 'x-location': '#/components/parameters/start_time/schema_response', + 'x-schema-type': 'response', +}; +function validate169( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate169.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema154, + data, + }, + ]; + return false; + } + } else { + validate169.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema154.type, + parentSchema: schema154, + data, + }, + ]; + return false; + } + } + } + validate169.errors = vErrors; + return errors === 0; +} +exports.validateEndTimeRequest = validate170; +const schema155 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'EndTimeRequest', + 'x-location': '#/components/parameters/end_time/schema_request', + 'x-schema-type': 'request', +}; +function validate170( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate170.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema155, + data, + }, + ]; + return false; + } + } else { + validate170.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema155.type, + parentSchema: schema155, + data, + }, + ]; + return false; + } + } + } + validate170.errors = vErrors; + return errors === 0; +} +exports.validateEndTimeResponse = validate171; +const schema156 = { + type: 'string', + format: 'date-time', + 'x-standalone': false, + 'x-name': 'EndTimeResponse', + 'x-location': '#/components/parameters/end_time/schema_response', + 'x-schema-type': 'response', +}; +function validate171( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats22.validate(data)) { + validate171.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema156, + data, + }, + ]; + return false; + } + } else { + validate171.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema156.type, + parentSchema: schema156, + data, + }, + ]; + return false; + } + } + } + validate171.errors = vErrors; + return errors === 0; +} +exports.validateClosedUrlRequest = validate172; +const schema157 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ClosedUrlRequest', + 'x-location': '#/components/parameters/closed_url/schema_request', + 'x-schema-type': 'request', +}; +function validate172( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate172.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema157, + data, + }, + ]; + return false; + } + } else { + validate172.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema157.type, + parentSchema: schema157, + data, + }, + ]; + return false; + } + } + } + validate172.errors = vErrors; + return errors === 0; +} +exports.validateClosedUrlResponse = validate173; +const schema158 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'ClosedUrlResponse', + 'x-location': '#/components/parameters/closed_url/schema_response', + 'x-schema-type': 'response', +}; +function validate173( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate173.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema158, + data, + }, + ]; + return false; + } + } else { + validate173.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema158.type, + parentSchema: schema158, + data, + }, + ]; + return false; + } + } + } + validate173.errors = vErrors; + return errors === 0; +} +exports.validateStatusChangedUrlRequest = validate174; +const schema159 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'StatusChangedUrlRequest', + 'x-location': '#/components/parameters/status_changed_url/schema_request', + 'x-schema-type': 'request', +}; +function validate174( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate174.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema159, + data, + }, + ]; + return false; + } + } else { + validate174.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema159.type, + parentSchema: schema159, + data, + }, + ]; + return false; + } + } + } + validate174.errors = vErrors; + return errors === 0; +} +exports.validateStatusChangedUrlResponse = validate175; +const schema160 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'StatusChangedUrlResponse', + 'x-location': '#/components/parameters/status_changed_url/schema_response', + 'x-schema-type': 'response', +}; +function validate175( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate175.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema160, + data, + }, + ]; + return false; + } + } else { + validate175.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema160.type, + parentSchema: schema160, + data, + }, + ]; + return false; + } + } + } + validate175.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionIdRequest = validate176; +const schema161 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'PeerconnectionIdRequest', + 'x-location': '#/components/parameters/peerconnection_id/schema_request', + 'x-schema-type': 'request', +}; +function validate176( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate176.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema161, + data, + }, + ]; + return false; + } + } else { + validate176.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema161.type, + parentSchema: schema161, + data, + }, + ]; + return false; + } + } + } + validate176.errors = vErrors; + return errors === 0; +} +exports.validatePeerconnectionIdResponse = validate177; +const schema162 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'PeerconnectionIdResponse', + 'x-location': '#/components/parameters/peerconnection_id/schema_response', + 'x-schema-type': 'response', +}; +function validate177( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate177.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema162, + data, + }, + ]; + return false; + } + } else { + validate177.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema162.type, + parentSchema: schema162, + data, + }, + ]; + return false; + } + } + } + validate177.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUrlRequest = validate178; +const schema163 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'DeviceUrlRequest', + 'x-location': '#/components/parameters/device_url/schema_request', + 'x-schema-type': 'request', +}; +function validate178( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate178.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema163, + data, + }, + ]; + return false; + } + } else { + validate178.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema163.type, + parentSchema: schema163, + data, + }, + ]; + return false; + } + } + } + validate178.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUrlResponse = validate179; +const schema164 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'DeviceUrlResponse', + 'x-location': '#/components/parameters/device_url/schema_response', + 'x-schema-type': 'response', +}; +function validate179( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate179.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema164, + data, + }, + ]; + return false; + } + } else { + validate179.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema164.type, + parentSchema: schema164, + data, + }, + ]; + return false; + } + } + } + validate179.errors = vErrors; + return errors === 0; +} +exports.validateListDevicesResponse200Request = validate180; +const schema165 = { + type: 'array', + items: { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + 'x-standalone': false, + 'x-name': 'listDevicesResponse200Request', + 'x-location': + '#/paths//devices/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate180( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.type === undefined && (missing0 = 'type')) || + (data0.name === undefined && (missing0 = 'name')) || + (data0.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema165.items.required, + parentSchema: schema165.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.name !== undefined) { + let data1 = data0.name; + const _errs3 = errors; + if (typeof data1 !== 'string') { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/name', + schemaPath: '#/items/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema165.items.properties.name.type, + parentSchema: schema165.items.properties.name, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.description !== undefined) { + let data2 = data0.description; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/description', + schemaPath: '#/items/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema165.items.properties.description.type, + parentSchema: schema165.items.properties.description, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.type !== undefined) { + let data3 = data0.type; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema165.items.properties.type.type, + parentSchema: schema165.items.properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema165.items.properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema165.items.properties.type.enum, + parentSchema: schema165.items.properties.type, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.isPublic !== undefined) { + let data4 = data0.isPublic; + const _errs9 = errors; + if (typeof data4 !== 'boolean') { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/isPublic', + schemaPath: '#/items/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema165.items.properties.isPublic.type, + parentSchema: schema165.items.properties.isPublic, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.viewer !== undefined) { + let data5 = data0.viewer; + const _errs11 = errors; + if (errors === _errs11) { + if (Array.isArray(data5)) { + var valid2 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs13 = errors; + if (errors === _errs13) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + validate180.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: + '#/items/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + + missing1 + + "'", + schema: + schema165.items.properties.viewer.items + .required, + parentSchema: + schema165.items.properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs15 = errors; + if (errors === _errs15) { + if (errors === _errs15) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate180.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema165.items.properties.viewer + .items.properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate180.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema165.items.properties.viewer.items + .properties.url.type, + parentSchema: + schema165.items.properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate180.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: '#/items/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema165.items.properties.viewer.items.type, + parentSchema: + schema165.items.properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs13 === errors; + if (!valid2) { + break; + } + } + } else { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/viewer', + schemaPath: '#/items/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema165.items.properties.viewer.type, + parentSchema: schema165.items.properties.viewer, + data: data5, + }, + ]; + return false; + } + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.owner !== undefined) { + let data8 = data0.owner; + const _errs17 = errors; + if (errors === _errs17) { + if (Array.isArray(data8)) { + var valid4 = true; + const len2 = data8.length; + for (let i2 = 0; i2 < len2; i2++) { + let data9 = data8[i2]; + const _errs19 = errors; + if (errors === _errs19) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + validate180.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: + '#/items/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema165.items.properties.owner.items + .required, + parentSchema: + schema165.items.properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs21 = errors; + if (errors === _errs21) { + if (errors === _errs21) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate180.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema165.items.properties.owner + .items.properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate180.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema165.items.properties.owner.items + .properties.url.type, + parentSchema: + schema165.items.properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate180.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: '#/items/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema165.items.properties.owner.items.type, + parentSchema: + schema165.items.properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid4 = _errs19 === errors; + if (!valid4) { + break; + } + } + } else { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0 + '/owner', + schemaPath: '#/items/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema165.items.properties.owner.type, + parentSchema: schema165.items.properties.owner, + data: data8, + }, + ]; + return false; + } + } + var valid1 = _errs17 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } else { + validate180.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema165.items.type, + parentSchema: schema165.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate180.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema165.type, + parentSchema: schema165, + data, + }, + ]; + return false; + } + } + validate180.errors = vErrors; + return errors === 0; +} +exports.validateListDevicesResponse200Response = validate181; +const schema166 = { + type: 'array', + items: { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + 'x-standalone': false, + 'x-name': 'listDevicesResponse200Response', + 'x-location': + '#/paths//devices/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate181( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.url === undefined && (missing0 = 'url')) || + (data0.type === undefined && (missing0 = 'type')) || + (data0.name === undefined && (missing0 = 'name')) || + (data0.isPublic === undefined && (missing0 = 'isPublic')) + ) { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema166.items.required, + parentSchema: schema166.items, + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema166.items.properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema166.items.properties.url.type, + parentSchema: schema166.items.properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.name !== undefined) { + let data2 = data0.name; + const _errs5 = errors; + if (typeof data2 !== 'string') { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/name', + schemaPath: '#/items/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema166.items.properties.name.type, + parentSchema: schema166.items.properties.name, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.description !== undefined) { + let data3 = data0.description; + const _errs7 = errors; + if (typeof data3 !== 'string') { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/description', + schemaPath: '#/items/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema166.items.properties.description.type, + parentSchema: schema166.items.properties.description, + data: data3, + }, + ]; + return false; + } + var valid1 = _errs7 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.type !== undefined) { + let data4 = data0.type; + const _errs9 = errors; + if (typeof data4 !== 'string') { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema166.items.properties.type.type, + parentSchema: schema166.items.properties.type, + data: data4, + }, + ]; + return false; + } + if ( + !( + data4 === 'device' || + data4 === 'group' || + data4 === 'edge instantiable' || + data4 === 'cloud instantiable' + ) + ) { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema166.items.properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema166.items.properties.type.enum, + parentSchema: schema166.items.properties.type, + data: data4, + }, + ]; + return false; + } + var valid1 = _errs9 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.isPublic !== undefined) { + let data5 = data0.isPublic; + const _errs11 = errors; + if (typeof data5 !== 'boolean') { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/isPublic', + schemaPath: '#/items/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema166.items.properties.isPublic.type, + parentSchema: schema166.items.properties.isPublic, + data: data5, + }, + ]; + return false; + } + var valid1 = _errs11 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.viewer !== undefined) { + let data6 = data0.viewer; + const _errs13 = errors; + if (errors === _errs13) { + if (Array.isArray(data6)) { + var valid2 = true; + const len1 = data6.length; + for (let i1 = 0; i1 < len1; i1++) { + let data7 = data6[i1]; + const _errs15 = errors; + if (errors === _errs15) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing1; + if (data7.url === undefined && (missing1 = 'url')) { + validate181.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: + '#/items/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + + missing1 + + "'", + schema: + schema166.items.properties.viewer.items + .required, + parentSchema: + schema166.items.properties.viewer.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate181.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema166.items.properties.viewer + .items.properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate181.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/viewer/' + + i1 + + '/url', + schemaPath: + '#/items/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema166.items.properties.viewer + .items.properties.url.type, + parentSchema: + schema166.items.properties.viewer + .items.properties.url, + data: data8, + }, + ]; + return false; + } + } + } + } + } + } else { + validate181.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/viewer/' + i1, + schemaPath: + '#/items/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema166.items.properties.viewer.items.type, + parentSchema: + schema166.items.properties.viewer.items, + data: data7, + }, + ]; + return false; + } + } + var valid2 = _errs15 === errors; + if (!valid2) { + break; + } + } + } else { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/viewer', + schemaPath: '#/items/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema166.items.properties.viewer.type, + parentSchema: schema166.items.properties.viewer, + data: data6, + }, + ]; + return false; + } + } + var valid1 = _errs13 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.owner !== undefined) { + let data9 = data0.owner; + const _errs19 = errors; + if (errors === _errs19) { + if (Array.isArray(data9)) { + var valid4 = true; + const len2 = data9.length; + for (let i2 = 0; i2 < len2; i2++) { + let data10 = data9[i2]; + const _errs21 = errors; + if (errors === _errs21) { + if ( + data10 && + typeof data10 == 'object' && + !Array.isArray(data10) + ) { + let missing2; + if ( + data10.url === undefined && + (missing2 = 'url') + ) { + validate181.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: + '#/items/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema166.items.properties.owner.items + .required, + parentSchema: + schema166.items.properties.owner.items, + data: data10, + }, + ]; + return false; + } else { + if (data10.url !== undefined) { + let data11 = data10.url; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate181.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema166.items.properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } else { + validate181.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/owner/' + + i2 + + '/url', + schemaPath: + '#/items/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema166.items.properties.owner + .items.properties.url.type, + parentSchema: + schema166.items.properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } + } + } + } + } else { + validate181.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/owner/' + i2, + schemaPath: + '#/items/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema166.items.properties.owner.items.type, + parentSchema: + schema166.items.properties.owner.items, + data: data10, + }, + ]; + return false; + } + } + var valid4 = _errs21 === errors; + if (!valid4) { + break; + } + } + } else { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0 + '/owner', + schemaPath: '#/items/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema166.items.properties.owner.type, + parentSchema: schema166.items.properties.owner, + data: data9, + }, + ]; + return false; + } + } + var valid1 = _errs19 === errors; + } else { + var valid1 = true; + } + } + } + } + } + } + } + } + } else { + validate181.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema166.items.type, + parentSchema: schema166.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate181.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema166.type, + parentSchema: schema166, + data, + }, + ]; + return false; + } + } + validate181.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceBodyRequest = validate182; +const schema167 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceBodyRequest', + 'x-location': + '#/paths//devices/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate182( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema167.anyOf[0].allOf[0].required, + parentSchema: schema167.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema167.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema167.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema167.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema167.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema167.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema167.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema167.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema167.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema167.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema167.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema167.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema167.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema167.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[0].allOf[0].type, + parentSchema: schema167.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema167.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema167.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema167.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema167.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema167.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema167.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema167.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[0].allOf[1].type, + parentSchema: schema167.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema167.anyOf[1].allOf[0].required, + parentSchema: schema167.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema167.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema167.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema167.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema167.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema167.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema167.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema167.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema167.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema167.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema167.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema167.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema167.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema167.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[1].allOf[0].type, + parentSchema: schema167.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema167.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema167.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema167.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema167.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema167.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema167.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema167.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[1].allOf[1].type, + parentSchema: schema167.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema167.anyOf[2].allOf[0].required, + parentSchema: schema167.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema167.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema167.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema167.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema167.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema167.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema167.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema167.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema167.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema167.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema167.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema167.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema167.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema167.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[2].allOf[0].type, + parentSchema: schema167.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema167.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema167.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema167.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema167.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema167.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema167.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[2].allOf[1].type, + parentSchema: schema167.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema167.anyOf[3].allOf[0].required, + parentSchema: schema167.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema167.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema167.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema167.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema167.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema167.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema167.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema167.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema167.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema167.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema167.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema167.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema167.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema167.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema167.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema167.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema167.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema167.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema167.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[3].allOf[0].type, + parentSchema: schema167.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err101 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema167.anyOf[3].allOf[1].required, + parentSchema: schema167.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema167.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing13; + if (data63.url === undefined && (missing13 = 'url')) { + const err103 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema167.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema167.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema167.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema167.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema167.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema167.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema167.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema167.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema167.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err108 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema167.anyOf[3].allOf[1].type, + parentSchema: schema167.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err109 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema167.anyOf, + parentSchema: schema167, + data, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate182.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate182.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceBodyResponse = validate183; +const schema168 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceBodyResponse', + 'x-location': + '#/paths//devices/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate183( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema168.anyOf[0].allOf[0].required, + parentSchema: schema168.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema168.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema168.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema168.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema168.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema168.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema168.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[0].allOf[0].properties + .viewer.items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema168.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[0].allOf[0].properties.viewer.items + .type, + parentSchema: + schema168.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema168.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema168.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema168.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema168.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema168.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[0].allOf[0].type, + parentSchema: schema168.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema168.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema168.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema168.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema168.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema168.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema168.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[0].allOf[1].type, + parentSchema: schema168.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema168.anyOf[1].allOf[0].required, + parentSchema: schema168.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema168.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema168.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema168.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema168.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema168.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema168.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema168.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema168.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema168.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema168.anyOf[1].allOf[0].properties.owner + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema168.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema168.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema168.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[1].allOf[0].type, + parentSchema: schema168.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema168.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema168.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema168.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema168.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema168.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema168.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[1].allOf[1].properties + .services.items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema168.anyOf[1].allOf[1].properties + .services.items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema168.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema168.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema168.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[1].allOf[1].type, + parentSchema: schema168.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema168.anyOf[2].allOf[0].required, + parentSchema: schema168.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema168.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema168.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema168.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema168.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema168.anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema168.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema168.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema168.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema168.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema168.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema168.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema168.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema168.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[2].allOf[0].properties.owner.type, + parentSchema: + schema168.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[2].allOf[0].type, + parentSchema: schema168.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema168.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema168.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema168.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema168.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema168.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[2].allOf[1].type, + parentSchema: schema168.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema168.anyOf[3].allOf[0].required, + parentSchema: schema168.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema168.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema168.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema168.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema168.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema168.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema168.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema168.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema168.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema168.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema168.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema168.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema168.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema168.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema168.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema168.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema168.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema168.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema168.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[3].allOf[0].type, + parentSchema: schema168.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema168.anyOf[3].allOf[1].required, + parentSchema: schema168.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema168.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema168.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema168.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema168.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema168.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema168.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema168.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema168.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema168.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema168.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema168.anyOf[3].allOf[1].type, + parentSchema: schema168.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema168.anyOf, + parentSchema: schema168, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate183.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate183.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceResponse201Request = validate184; +const schema169 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceResponse201Request', + 'x-location': + '#/paths//devices/post/responses/201/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate184( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema169.anyOf[0].allOf[0].required, + parentSchema: schema169.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema169.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema169.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema169.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema169.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema169.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema169.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema169.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema169.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema169.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema169.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema169.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema169.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema169.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[0].allOf[0].type, + parentSchema: schema169.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema169.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema169.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema169.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema169.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema169.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema169.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema169.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[0].allOf[1].type, + parentSchema: schema169.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema169.anyOf[1].allOf[0].required, + parentSchema: schema169.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema169.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema169.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema169.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema169.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema169.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema169.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema169.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema169.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema169.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema169.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema169.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema169.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema169.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[1].allOf[0].type, + parentSchema: schema169.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema169.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema169.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema169.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema169.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema169.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema169.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema169.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[1].allOf[1].type, + parentSchema: schema169.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema169.anyOf[2].allOf[0].required, + parentSchema: schema169.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema169.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema169.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema169.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema169.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema169.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema169.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema169.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema169.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema169.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema169.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema169.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema169.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema169.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[2].allOf[0].type, + parentSchema: schema169.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema169.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema169.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema169.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema169.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema169.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema169.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[2].allOf[1].type, + parentSchema: schema169.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema169.anyOf[3].allOf[0].required, + parentSchema: schema169.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema169.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema169.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema169.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema169.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema169.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema169.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema169.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema169.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema169.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema169.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema169.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema169.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema169.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema169.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema169.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema169.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema169.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema169.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema169.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[3].allOf[0].type, + parentSchema: schema169.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err101 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema169.anyOf[3].allOf[1].required, + parentSchema: schema169.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema169.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing13; + if (data63.url === undefined && (missing13 = 'url')) { + const err103 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema169.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema169.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema169.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema169.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema169.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema169.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema169.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema169.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema169.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err108 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema169.anyOf[3].allOf[1].type, + parentSchema: schema169.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err109 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema169.anyOf, + parentSchema: schema169, + data, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate184.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate184.errors = vErrors; + return errors === 0; +} +exports.validateCreateDeviceResponse201Response = validate185; +const schema170 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createDeviceResponse201Response', + 'x-location': + '#/paths//devices/post/responses/201/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate185( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema170.anyOf[0].allOf[0].required, + parentSchema: schema170.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema170.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema170.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema170.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema170.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema170.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[0].allOf[0].properties + .viewer.items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema170.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[0].allOf[0].properties.viewer.items + .type, + parentSchema: + schema170.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema170.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema170.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema170.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema170.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[0].allOf[0].type, + parentSchema: schema170.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema170.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema170.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema170.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema170.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema170.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema170.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[0].allOf[1].type, + parentSchema: schema170.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema170.anyOf[1].allOf[0].required, + parentSchema: schema170.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema170.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema170.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema170.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema170.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema170.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema170.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema170.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema170.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema170.anyOf[1].allOf[0].properties.owner + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema170.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema170.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[1].allOf[0].type, + parentSchema: schema170.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema170.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema170.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema170.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema170.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema170.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema170.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[1].allOf[1].properties + .services.items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema170.anyOf[1].allOf[1].properties + .services.items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema170.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema170.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema170.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[1].allOf[1].type, + parentSchema: schema170.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema170.anyOf[2].allOf[0].required, + parentSchema: schema170.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema170.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema170.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema170.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema170.anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema170.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema170.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema170.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema170.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema170.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema170.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema170.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[2].allOf[0].properties.owner.type, + parentSchema: + schema170.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[2].allOf[0].type, + parentSchema: schema170.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema170.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema170.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema170.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema170.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema170.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[2].allOf[1].type, + parentSchema: schema170.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema170.anyOf[3].allOf[0].required, + parentSchema: schema170.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema170.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema170.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema170.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema170.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema170.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema170.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema170.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema170.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema170.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema170.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema170.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema170.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[3].allOf[0].type, + parentSchema: schema170.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema170.anyOf[3].allOf[1].required, + parentSchema: schema170.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema170.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema170.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema170.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema170.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema170.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema170.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema170.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema170.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema170.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema170.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema170.anyOf[3].allOf[1].type, + parentSchema: schema170.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema170.anyOf, + parentSchema: schema170, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate185.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate185.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceResponse200Request = validate186; +const schema171 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getDeviceResponse200Request', + 'x-location': + '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate186( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema171.anyOf[0].allOf[0].required, + parentSchema: schema171.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema171.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema171.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema171.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema171.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema171.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema171.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema171.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema171.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema171.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema171.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema171.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[0].allOf[0].type, + parentSchema: schema171.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema171.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema171.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema171.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema171.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema171.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema171.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema171.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[0].allOf[1].type, + parentSchema: schema171.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema171.anyOf[1].allOf[0].required, + parentSchema: schema171.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema171.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema171.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema171.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema171.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema171.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema171.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema171.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema171.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema171.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema171.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema171.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[1].allOf[0].type, + parentSchema: schema171.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema171.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema171.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema171.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema171.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema171.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema171.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema171.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[1].allOf[1].type, + parentSchema: schema171.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema171.anyOf[2].allOf[0].required, + parentSchema: schema171.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema171.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema171.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema171.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema171.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema171.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema171.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema171.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema171.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema171.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema171.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema171.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[2].allOf[0].type, + parentSchema: schema171.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema171.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema171.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema171.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema171.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema171.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema171.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[2].allOf[1].type, + parentSchema: schema171.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema171.anyOf[3].allOf[0].required, + parentSchema: schema171.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema171.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema171.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema171.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema171.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema171.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema171.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema171.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema171.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema171.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema171.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema171.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema171.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema171.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[3].allOf[0].type, + parentSchema: schema171.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err101 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema171.anyOf[3].allOf[1].required, + parentSchema: schema171.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema171.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing13; + if (data63.url === undefined && (missing13 = 'url')) { + const err103 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema171.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema171.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema171.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema171.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema171.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema171.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema171.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema171.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema171.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err108 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema171.anyOf[3].allOf[1].type, + parentSchema: schema171.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err109 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema171.anyOf, + parentSchema: schema171, + data, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate186.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate186.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceResponse200Response = validate187; +const schema172 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getDeviceResponse200Response', + 'x-location': + '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate187( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema172.anyOf[0].allOf[0].required, + parentSchema: schema172.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema172.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema172.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema172.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema172.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema172.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[0].allOf[0].properties + .viewer.items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema172.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[0].allOf[0].properties.viewer.items + .type, + parentSchema: + schema172.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema172.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema172.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema172.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema172.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[0].allOf[0].type, + parentSchema: schema172.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema172.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema172.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema172.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema172.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema172.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema172.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[0].allOf[1].type, + parentSchema: schema172.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema172.anyOf[1].allOf[0].required, + parentSchema: schema172.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema172.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema172.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema172.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema172.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema172.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema172.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema172.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema172.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema172.anyOf[1].allOf[0].properties.owner + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema172.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema172.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[1].allOf[0].type, + parentSchema: schema172.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema172.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema172.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema172.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema172.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema172.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema172.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[1].allOf[1].properties + .services.items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema172.anyOf[1].allOf[1].properties + .services.items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema172.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema172.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema172.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[1].allOf[1].type, + parentSchema: schema172.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema172.anyOf[2].allOf[0].required, + parentSchema: schema172.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema172.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema172.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema172.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema172.anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema172.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema172.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema172.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema172.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema172.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema172.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema172.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[2].allOf[0].properties.owner.type, + parentSchema: + schema172.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[2].allOf[0].type, + parentSchema: schema172.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema172.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema172.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema172.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema172.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema172.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[2].allOf[1].type, + parentSchema: schema172.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema172.anyOf[3].allOf[0].required, + parentSchema: schema172.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema172.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema172.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema172.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema172.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema172.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema172.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema172.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema172.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema172.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema172.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema172.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema172.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[3].allOf[0].type, + parentSchema: schema172.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema172.anyOf[3].allOf[1].required, + parentSchema: schema172.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema172.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema172.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema172.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema172.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema172.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema172.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema172.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema172.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema172.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema172.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema172.anyOf[3].allOf[1].type, + parentSchema: schema172.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema172.anyOf, + parentSchema: schema172, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate187.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate187.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceBodyRequest = validate188; +const schema173 = { + title: 'Device Update', + anyOf: [ + { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + }, + ], + }, + ], + 'x-standalone': false, + 'x-name': 'updateDeviceBodyRequest', + 'x-location': + '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate188( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema173.anyOf[0].allOf[0].required, + parentSchema: schema173.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema173.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema173.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema173.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema173.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema173.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema173.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema173.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema173.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema173.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema173.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema173.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[0].allOf[0].type, + parentSchema: schema173.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema173.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema173.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema173.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema173.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema173.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema173.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema173.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[0].allOf[1].type, + parentSchema: schema173.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.type === undefined && (missing3 = 'type')) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema173.anyOf[1].allOf[0].required, + parentSchema: schema173.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema173.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema173.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema173.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema173.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema173.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema173.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema173.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema173.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema173.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema173.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema173.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[1].allOf[0].type, + parentSchema: schema173.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema173.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema173.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema173.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema173.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema173.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema173.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema173.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[1].allOf[1].type, + parentSchema: schema173.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if (data.type === undefined && (missing6 = 'type')) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema173.anyOf[2].allOf[0].required, + parentSchema: schema173.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema173.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema173.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema173.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema173.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema173.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema173.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema173.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema173.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema173.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema173.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema173.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[2].allOf[0].type, + parentSchema: schema173.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema173.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema173.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema173.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema173.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema173.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema173.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[2].allOf[1].type, + parentSchema: schema173.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.type === undefined && (missing9 = 'type')) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema173.anyOf[3].allOf[0].required, + parentSchema: schema173.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema173.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema173.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema173.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema173.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema173.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema173.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema173.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema173.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema173.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema173.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema173.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema173.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema173.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[3].allOf[0].type, + parentSchema: schema173.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err101 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema173.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing12; + if (data63.url === undefined && (missing12 = 'url')) { + const err102 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: + "must have required property '" + missing12 + "'", + schema: + schema173.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema173.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err103 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema173.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + } else { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema173.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema173.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } + } + } + } + } else { + const err105 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema173.anyOf[3].allOf[1].properties.devices.items.type, + parentSchema: + schema173.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema173.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema173.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } else { + const err107 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema173.anyOf[3].allOf[1].type, + parentSchema: schema173.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err108 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema173.anyOf, + parentSchema: schema173, + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + validate188.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate188.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceBodyResponse = validate189; +const schema174 = { + title: 'Device Update', + anyOf: [ + { + title: 'Instantiable Cloud Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Concrete Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Instantiable Browser Device Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + }, + { + title: 'Device Group Update', + allOf: [ + { + title: 'Device Overview Update', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + }, + ], + }, + ], + 'x-standalone': false, + 'x-name': 'updateDeviceBodyResponse', + 'x-location': + '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate189( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema174.anyOf[0].allOf[0].required, + parentSchema: schema174.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema174.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema174.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema174.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema174.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema174.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema174.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema174.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema174.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema174.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema174.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema174.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[0].allOf[0].type, + parentSchema: schema174.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema174.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema174.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema174.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema174.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema174.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema174.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema174.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[0].allOf[1].type, + parentSchema: schema174.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if (data.type === undefined && (missing3 = 'type')) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema174.anyOf[1].allOf[0].required, + parentSchema: schema174.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema174.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema174.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema174.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema174.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema174.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema174.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema174.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema174.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema174.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema174.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema174.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[1].allOf[0].type, + parentSchema: schema174.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema174.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema174.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema174.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema174.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema174.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema174.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema174.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[1].allOf[1].type, + parentSchema: schema174.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if (data.type === undefined && (missing6 = 'type')) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema174.anyOf[2].allOf[0].required, + parentSchema: schema174.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema174.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema174.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema174.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema174.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema174.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema174.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema174.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema174.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema174.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema174.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema174.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[2].allOf[0].type, + parentSchema: schema174.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema174.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema174.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema174.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema174.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema174.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema174.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[2].allOf[1].type, + parentSchema: schema174.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.type === undefined && (missing9 = 'type')) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema174.anyOf[3].allOf[0].required, + parentSchema: schema174.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema174.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema174.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema174.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema174.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema174.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema174.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema174.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema174.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema174.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema174.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema174.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema174.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema174.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[3].allOf[0].type, + parentSchema: schema174.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err101 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema174.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing12; + if (data63.url === undefined && (missing12 = 'url')) { + const err102 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: + "must have required property '" + missing12 + "'", + schema: + schema174.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema174.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err103 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema174.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + } else { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema174.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema174.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } + } + } + } + } else { + const err105 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema174.anyOf[3].allOf[1].properties.devices.items.type, + parentSchema: + schema174.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema174.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema174.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } else { + const err107 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema174.anyOf[3].allOf[1].type, + parentSchema: schema174.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err108 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema174.anyOf, + parentSchema: schema174, + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + validate189.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate189.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceResponse200Request = validate190; +const schema175 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'updateDeviceResponse200Request', + 'x-location': + '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate190( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema175.anyOf[0].allOf[0].required, + parentSchema: schema175.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.name !== undefined) { + let data0 = data.name; + const _errs4 = errors; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.name, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data1 = data.description; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err2 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.description, + data: data1, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data2 = data.type; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err3 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + if ( + !( + data2 === 'device' || + data2 === 'group' || + data2 === 'edge instantiable' || + data2 === 'cloud instantiable' + ) + ) { + const err4 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema175.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema175.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[0].allOf[0].properties.type, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data3 = data.isPublic; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + const err5 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema175.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.isPublic, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data4 = data.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + var valid3 = true; + const len0 = data4.length; + for (let i0 = 0; i0 < len0; i0++) { + let data5 = data4[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing1; + if (data5.url === undefined && (missing1 = 'url')) { + const err6 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: + schema175.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema175.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + const err7 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + } else { + const err8 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema175.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + } + } + } + } + } else { + const err9 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[0].allOf[0].properties.viewer.items.type, + parentSchema: + schema175.anyOf[0].allOf[0].properties.viewer.items, + data: data5, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + const err10 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.viewer, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data7 = data.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid5 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing2; + if (data8.url === undefined && (missing2 = 'url')) { + const err11 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema175.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema175.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } else { + if (data8.url !== undefined) { + let data9 = data8.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + const err12 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } else { + const err13 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema175.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + } + } + } + } else { + const err14 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[0].allOf[0].properties.owner.items.type, + parentSchema: + schema175.anyOf[0].allOf[0].properties.owner.items, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + const err15 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.owner, + data: data7, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + const err16 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[0].allOf[0].type, + parentSchema: schema175.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data10 = data.type; + const _errs26 = errors; + if ('cloud instantiable' !== data10) { + const err17 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema175.anyOf[0].allOf[1].properties.type, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data11 = data.instantiateUrl; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + const err18 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema175.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } else { + const err19 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema175.anyOf[0].allOf[1].properties.instantiateUrl, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data12 = data.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data12)) { + var valid8 = true; + const len2 = data12.length; + for (let i2 = 0; i2 < len2; i2++) { + let data13 = data12[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { + if (data13.serviceType !== undefined) { + let data14 = data13.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data14 === 'string') { + if (!formats0(data14)) { + const err20 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceId !== undefined) { + let data15 = data13.serviceId; + const _errs36 = errors; + if (typeof data15 !== 'string') { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data13.serviceDirection !== undefined) { + let data16 = data13.serviceDirection; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err23 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + if ( + !( + data16 === 'consumer' || + data16 === 'producer' || + data16 === 'prosumer' + ) + ) { + const err24 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema175.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema175.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err25 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema175.anyOf[0].allOf[1].properties.services.items, + data: data13, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + const err26 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema175.anyOf[0].allOf[1].properties.services, + data: data12, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err27 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[0].allOf[1].type, + parentSchema: schema175.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid1 = _errs24 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs40 = errors; + const _errs41 = errors; + if (errors === _errs41) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err28 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema175.anyOf[1].allOf[0].required, + parentSchema: schema175.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } else { + if (data.name !== undefined) { + let data17 = data.name; + const _errs43 = errors; + if (typeof data17 !== 'string') { + const err29 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.name, + data: data17, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + var valid11 = _errs43 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data18 = data.description; + const _errs45 = errors; + if (typeof data18 !== 'string') { + const err30 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.description, + data: data18, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data19 = data.type; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err31 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + if ( + !( + data19 === 'device' || + data19 === 'group' || + data19 === 'edge instantiable' || + data19 === 'cloud instantiable' + ) + ) { + const err32 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema175.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema175.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[1].allOf[0].properties.type, + data: data19, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data20 = data.isPublic; + const _errs49 = errors; + if (typeof data20 !== 'boolean') { + const err33 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema175.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.isPublic, + data: data20, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data21 = data.viewer; + const _errs51 = errors; + if (errors === _errs51) { + if (Array.isArray(data21)) { + var valid12 = true; + const len3 = data21.length; + for (let i3 = 0; i3 < len3; i3++) { + let data22 = data21[i3]; + const _errs53 = errors; + if (errors === _errs53) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + let missing4; + if (data22.url === undefined && (missing4 = 'url')) { + const err34 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema175.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema175.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } else { + if (data22.url !== undefined) { + let data23 = data22.url; + const _errs55 = errors; + if (errors === _errs55) { + if (errors === _errs55) { + if (typeof data23 === 'string') { + if (!formats0(data23)) { + const err35 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + } else { + const err36 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[1].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema175.anyOf[1].allOf[0].properties.viewer + .items.properties.url, + data: data23, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } + } + } else { + const err37 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema175.anyOf[1].allOf[0].properties.viewer.items, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid12 = _errs53 === errors; + if (!valid12) { + break; + } + } + } else { + const err38 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.viewer, + data: data21, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data24 = data.owner; + const _errs57 = errors; + if (errors === _errs57) { + if (Array.isArray(data24)) { + var valid14 = true; + const len4 = data24.length; + for (let i4 = 0; i4 < len4; i4++) { + let data25 = data24[i4]; + const _errs59 = errors; + if (errors === _errs59) { + if ( + data25 && + typeof data25 == 'object' && + !Array.isArray(data25) + ) { + let missing5; + if (data25.url === undefined && (missing5 = 'url')) { + const err39 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema175.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema175.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } else { + if (data25.url !== undefined) { + let data26 = data25.url; + const _errs61 = errors; + if (errors === _errs61) { + if (errors === _errs61) { + if (typeof data26 === 'string') { + if (!formats0(data26)) { + const err40 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } else { + const err41 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[1].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema175.anyOf[1].allOf[0].properties.owner + .items.properties.url, + data: data26, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + } + } + } + } else { + const err42 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema175.anyOf[1].allOf[0].properties.owner.items, + data: data25, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid14 = _errs59 === errors; + if (!valid14) { + break; + } + } + } else { + const err43 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.owner, + data: data24, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid11 = _errs57 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[1].allOf[0].type, + parentSchema: schema175.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid10 = _errs41 === errors; + if (valid10) { + const _errs63 = errors; + if (errors === _errs63) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data27 = data.type; + const _errs65 = errors; + if ('device' !== data27) { + const err45 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema175.anyOf[1].allOf[1].properties.type, + data: data27, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + var valid16 = _errs65 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data28 = data.experiment; + const _errs66 = errors; + if (errors === _errs66) { + if (errors === _errs66) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err46 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema175.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } else { + const err47 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema175.anyOf[1].allOf[1].properties.experiment, + data: data28, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + } + var valid16 = _errs66 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data29 = data.services; + const _errs68 = errors; + if (errors === _errs68) { + if (Array.isArray(data29)) { + var valid17 = true; + const len5 = data29.length; + for (let i5 = 0; i5 < len5; i5++) { + let data30 = data29[i5]; + const _errs70 = errors; + if (errors === _errs70) { + if ( + data30 && + typeof data30 == 'object' && + !Array.isArray(data30) + ) { + if (data30.serviceType !== undefined) { + let data31 = data30.serviceType; + const _errs73 = errors; + if (errors === _errs73) { + if (errors === _errs73) { + if (typeof data31 === 'string') { + if (!formats0(data31)) { + const err48 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } else { + const err49 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + } + } + var valid18 = _errs73 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceId !== undefined) { + let data32 = data30.serviceId; + const _errs75 = errors; + if (typeof data32 !== 'string') { + const err50 = { + instancePath: + instancePath + '/services/' + i5 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[1].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema175.anyOf[1].allOf[1].properties.services.items + .properties.serviceId, + data: data32, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid18 = _errs75 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data30.serviceDirection !== undefined) { + let data33 = data30.serviceDirection; + const _errs77 = errors; + if (typeof data33 !== 'string') { + const err51 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + if ( + !( + data33 === 'consumer' || + data33 === 'producer' || + data33 === 'prosumer' + ) + ) { + const err52 = { + instancePath: + instancePath + + '/services/' + + i5 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema175.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err53 = { + instancePath: instancePath + '/services/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[1].allOf[1].properties.services.items.type, + parentSchema: + schema175.anyOf[1].allOf[1].properties.services.items, + data: data30, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + var valid17 = _errs70 === errors; + if (!valid17) { + break; + } + } + } else { + const err54 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema175.anyOf[1].allOf[1].properties.services, + data: data29, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid16 = _errs68 === errors; + } else { + var valid16 = true; + } + } + } + } else { + const err55 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[1].allOf[1].type, + parentSchema: schema175.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid10 = _errs63 === errors; + } + var _valid0 = _errs40 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs79 = errors; + const _errs80 = errors; + if (errors === _errs80) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err56 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema175.anyOf[2].allOf[0].required, + parentSchema: schema175.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } else { + if (data.name !== undefined) { + let data34 = data.name; + const _errs82 = errors; + if (typeof data34 !== 'string') { + const err57 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.name, + data: data34, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid20 = _errs82 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.description !== undefined) { + let data35 = data.description; + const _errs84 = errors; + if (typeof data35 !== 'string') { + const err58 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.description, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid20 = _errs84 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.type !== undefined) { + let data36 = data.type; + const _errs86 = errors; + if (typeof data36 !== 'string') { + const err59 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + if ( + !( + data36 === 'device' || + data36 === 'group' || + data36 === 'edge instantiable' || + data36 === 'cloud instantiable' + ) + ) { + const err60 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema175.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema175.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[2].allOf[0].properties.type, + data: data36, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + var valid20 = _errs86 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.isPublic !== undefined) { + let data37 = data.isPublic; + const _errs88 = errors; + if (typeof data37 !== 'boolean') { + const err61 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema175.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.isPublic, + data: data37, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs88 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.viewer !== undefined) { + let data38 = data.viewer; + const _errs90 = errors; + if (errors === _errs90) { + if (Array.isArray(data38)) { + var valid21 = true; + const len6 = data38.length; + for (let i6 = 0; i6 < len6; i6++) { + let data39 = data38[i6]; + const _errs92 = errors; + if (errors === _errs92) { + if ( + data39 && + typeof data39 == 'object' && + !Array.isArray(data39) + ) { + let missing7; + if (data39.url === undefined && (missing7 = 'url')) { + const err62 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema175.anyOf[2].allOf[0].properties.viewer.items + .required, + parentSchema: + schema175.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } else { + if (data39.url !== undefined) { + let data40 = data39.url; + const _errs94 = errors; + if (errors === _errs94) { + if (errors === _errs94) { + if (typeof data40 === 'string') { + if (!formats0(data40)) { + const err63 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + } else { + const err64 = { + instancePath: + instancePath + '/viewer/' + i6 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema175.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data40, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + } + } + } + } else { + const err65 = { + instancePath: instancePath + '/viewer/' + i6, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema175.anyOf[2].allOf[0].properties.viewer.items, + data: data39, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid21 = _errs92 === errors; + if (!valid21) { + break; + } + } + } else { + const err66 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.viewer, + data: data38, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid20 = _errs90 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data.owner !== undefined) { + let data41 = data.owner; + const _errs96 = errors; + if (errors === _errs96) { + if (Array.isArray(data41)) { + var valid23 = true; + const len7 = data41.length; + for (let i7 = 0; i7 < len7; i7++) { + let data42 = data41[i7]; + const _errs98 = errors; + if (errors === _errs98) { + if ( + data42 && + typeof data42 == 'object' && + !Array.isArray(data42) + ) { + let missing8; + if (data42.url === undefined && (missing8 = 'url')) { + const err67 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + missing8 + "'", + schema: + schema175.anyOf[2].allOf[0].properties.owner.items + .required, + parentSchema: + schema175.anyOf[2].allOf[0].properties.owner + .items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data42.url !== undefined) { + let data43 = data42.url; + const _errs100 = errors; + if (errors === _errs100) { + if (errors === _errs100) { + if (typeof data43 === 'string') { + if (!formats0(data43)) { + const err68 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: + instancePath + '/owner/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema175.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data43, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + } + } + } else { + const err70 = { + instancePath: instancePath + '/owner/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema175.anyOf[2].allOf[0].properties.owner.items, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + } + var valid23 = _errs98 === errors; + if (!valid23) { + break; + } + } + } else { + const err71 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.owner, + data: data41, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + } + var valid20 = _errs96 === errors; + } else { + var valid20 = true; + } + } + } + } + } + } + } + } else { + const err72 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[2].allOf[0].type, + parentSchema: schema175.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + } + var valid19 = _errs80 === errors; + if (valid19) { + const _errs102 = errors; + if (errors === _errs102) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs104 = errors; + if ('edge instantiable' !== data44) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema175.anyOf[2].allOf[1].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid25 = _errs104 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.codeUrl !== undefined) { + let data45 = data.codeUrl; + const _errs105 = errors; + if (errors === _errs105) { + if (errors === _errs105) { + if (typeof data45 === 'string') { + if (!formats0(data45)) { + const err74 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema175.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + } else { + const err75 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema175.anyOf[2].allOf[1].properties.codeUrl, + data: data45, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } + } + } + var valid25 = _errs105 === errors; + } else { + var valid25 = true; + } + if (valid25) { + if (data.services !== undefined) { + let data46 = data.services; + const _errs107 = errors; + if (errors === _errs107) { + if (Array.isArray(data46)) { + var valid26 = true; + const len8 = data46.length; + for (let i8 = 0; i8 < len8; i8++) { + let data47 = data46[i8]; + const _errs109 = errors; + if (errors === _errs109) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + if (data47.serviceType !== undefined) { + let data48 = data47.serviceType; + const _errs112 = errors; + if (errors === _errs112) { + if (errors === _errs112) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + var valid27 = _errs112 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceId !== undefined) { + let data49 = data47.serviceId; + const _errs114 = errors; + if (typeof data49 !== 'string') { + const err78 = { + instancePath: + instancePath + '/services/' + i8 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data49, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + var valid27 = _errs114 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data47.serviceDirection !== undefined) { + let data50 = data47.serviceDirection; + const _errs116 = errors; + if (typeof data50 !== 'string') { + const err79 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + if ( + !( + data50 === 'consumer' || + data50 === 'producer' || + data50 === 'prosumer' + ) + ) { + const err80 = { + instancePath: + instancePath + + '/services/' + + i8 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema175.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } + var valid27 = _errs116 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err81 = { + instancePath: instancePath + '/services/' + i8, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema175.anyOf[2].allOf[1].properties.services.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } + var valid26 = _errs109 === errors; + if (!valid26) { + break; + } + } + } else { + const err82 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema175.anyOf[2].allOf[1].properties.services, + data: data46, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + var valid25 = _errs107 === errors; + } else { + var valid25 = true; + } + } + } + } else { + const err83 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[2].allOf[1].type, + parentSchema: schema175.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid19 = _errs102 === errors; + } + var _valid0 = _errs79 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs118 = errors; + const _errs119 = errors; + if (errors === _errs119) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err84 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema175.anyOf[3].allOf[0].required, + parentSchema: schema175.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } else { + if (data.name !== undefined) { + let data51 = data.name; + const _errs121 = errors; + if (typeof data51 !== 'string') { + const err85 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.name, + data: data51, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + var valid29 = _errs121 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.description !== undefined) { + let data52 = data.description; + const _errs123 = errors; + if (typeof data52 !== 'string') { + const err86 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.description, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid29 = _errs123 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.type !== undefined) { + let data53 = data.type; + const _errs125 = errors; + if (typeof data53 !== 'string') { + const err87 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema175.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + if ( + !( + data53 === 'device' || + data53 === 'group' || + data53 === 'edge instantiable' || + data53 === 'cloud instantiable' + ) + ) { + const err88 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema175.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema175.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[3].allOf[0].properties.type, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + var valid29 = _errs125 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.isPublic !== undefined) { + let data54 = data.isPublic; + const _errs127 = errors; + if (typeof data54 !== 'boolean') { + const err89 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema175.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.isPublic, + data: data54, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + var valid29 = _errs127 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.viewer !== undefined) { + let data55 = data.viewer; + const _errs129 = errors; + if (errors === _errs129) { + if (Array.isArray(data55)) { + var valid30 = true; + const len9 = data55.length; + for (let i9 = 0; i9 < len9; i9++) { + let data56 = data55[i9]; + const _errs131 = errors; + if (errors === _errs131) { + if ( + data56 && + typeof data56 == 'object' && + !Array.isArray(data56) + ) { + let missing10; + if (data56.url === undefined && (missing10 = 'url')) { + const err90 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + missing10 + "'", + schema: + schema175.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema175.anyOf[3].allOf[0].properties.viewer + .items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } else { + if (data56.url !== undefined) { + let data57 = data56.url; + const _errs133 = errors; + if (errors === _errs133) { + if (errors === _errs133) { + if (typeof data57 === 'string') { + if (!formats0(data57)) { + const err91 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + } else { + const err92 = { + instancePath: + instancePath + '/viewer/' + i9 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema175.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data57, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + } + } + } + } + } else { + const err93 = { + instancePath: instancePath + '/viewer/' + i9, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[3].allOf[0].properties.viewer.items + .type, + parentSchema: + schema175.anyOf[3].allOf[0].properties.viewer.items, + data: data56, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + } + var valid30 = _errs131 === errors; + if (!valid30) { + break; + } + } + } else { + const err94 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.viewer, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid29 = _errs129 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data.owner !== undefined) { + let data58 = data.owner; + const _errs135 = errors; + if (errors === _errs135) { + if (Array.isArray(data58)) { + var valid32 = true; + const len10 = data58.length; + for (let i10 = 0; i10 < len10; i10++) { + let data59 = data58[i10]; + const _errs137 = errors; + if (errors === _errs137) { + if ( + data59 && + typeof data59 == 'object' && + !Array.isArray(data59) + ) { + let missing11; + if (data59.url === undefined && (missing11 = 'url')) { + const err95 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema175.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema175.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } else { + if (data59.url !== undefined) { + let data60 = data59.url; + const _errs139 = errors; + if (errors === _errs139) { + if (errors === _errs139) { + if (typeof data60 === 'string') { + if (!formats0(data60)) { + const err96 = { + instancePath: + instancePath + + '/owner/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } else { + const err97 = { + instancePath: + instancePath + '/owner/' + i10 + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema175.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data60, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } + } + } + } + } + } else { + const err98 = { + instancePath: instancePath + '/owner/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[3].allOf[0].properties.owner.items + .type, + parentSchema: + schema175.anyOf[3].allOf[0].properties.owner + .items, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } + var valid32 = _errs137 === errors; + if (!valid32) { + break; + } + } + } else { + const err99 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema175.anyOf[3].allOf[0].properties.owner, + data: data58, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + var valid29 = _errs135 === errors; + } else { + var valid29 = true; + } + } + } + } + } + } + } + } else { + const err100 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[3].allOf[0].type, + parentSchema: schema175.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + } + var valid28 = _errs119 === errors; + if (valid28) { + const _errs141 = errors; + if (errors === _errs141) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err101 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema175.anyOf[3].allOf[1].required, + parentSchema: schema175.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } else { + if (data.type !== undefined) { + let data61 = data.type; + const _errs143 = errors; + if ('group' !== data61) { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema175.anyOf[3].allOf[1].properties.type, + data: data61, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + var valid34 = _errs143 === errors; + } else { + var valid34 = true; + } + if (valid34) { + if (data.devices !== undefined) { + let data62 = data.devices; + const _errs144 = errors; + if (errors === _errs144) { + if (Array.isArray(data62)) { + var valid35 = true; + const len11 = data62.length; + for (let i11 = 0; i11 < len11; i11++) { + let data63 = data62[i11]; + const _errs146 = errors; + if (errors === _errs146) { + if ( + data63 && + typeof data63 == 'object' && + !Array.isArray(data63) + ) { + let missing13; + if (data63.url === undefined && (missing13 = 'url')) { + const err103 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema175.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema175.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } else { + if (data63.url !== undefined) { + let data64 = data63.url; + const _errs148 = errors; + if (errors === _errs148) { + if (errors === _errs148) { + if (typeof data64 === 'string') { + if (!formats0(data64)) { + const err104 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema175.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + } else { + const err105 = { + instancePath: + instancePath + '/devices/' + i11 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema175.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema175.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data64, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } + } + } + } + } + } else { + const err106 = { + instancePath: instancePath + '/devices/' + i11, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema175.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema175.anyOf[3].allOf[1].properties.devices.items, + data: data63, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } + var valid35 = _errs146 === errors; + if (!valid35) { + break; + } + } + } else { + const err107 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema175.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema175.anyOf[3].allOf[1].properties.devices, + data: data62, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + var valid34 = _errs144 === errors; + } else { + var valid34 = true; + } + } + } + } else { + const err108 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema175.anyOf[3].allOf[1].type, + parentSchema: schema175.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid28 = _errs141 === errors; + } + var _valid0 = _errs118 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err109 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema175.anyOf, + parentSchema: schema175, + data, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + validate190.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate190.errors = vErrors; + return errors === 0; +} +exports.validateUpdateDeviceResponse200Response = validate191; +const schema176 = { + title: 'Device', + anyOf: [ + { + title: 'Instantiable Cloud Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'cloud instantiable' }, + instantiateUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Instantiable Browser Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'edge instantiable' }, + codeUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + { + title: 'Device Group', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'group' }, + devices: { + type: 'array', + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'updateDeviceResponse200Response', + 'x-location': + '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate191( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.name === undefined && (missing0 = 'name')) || + (data.isPublic === undefined && (missing0 = 'isPublic')) + ) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema176.anyOf[0].allOf[0].required, + parentSchema: schema176.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + const err1 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } else { + const err2 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/0/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.url, + data: data0, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.name !== undefined) { + let data1 = data.name; + const _errs6 = errors; + if (typeof data1 !== 'string') { + const err3 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/0/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.name, + data: data1, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.description !== undefined) { + let data2 = data.description; + const _errs8 = errors; + if (typeof data2 !== 'string') { + const err4 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/0/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.description, + data: data2, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.type !== undefined) { + let data3 = data.type; + const _errs10 = errors; + if (typeof data3 !== 'string') { + const err5 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + const err6 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema176.anyOf[0].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema176.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[0].allOf[0].properties.type, + data: data3, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.isPublic !== undefined) { + let data4 = data.isPublic; + const _errs12 = errors; + if (typeof data4 !== 'boolean') { + const err7 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/0/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema176.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.isPublic, + data: data4, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.viewer !== undefined) { + let data5 = data.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing1; + if (data6.url === undefined && (missing1 = 'url')) { + const err8 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'", + schema: + schema176.anyOf[0].allOf[0].properties.viewer.items + .required, + parentSchema: + schema176.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + const err9 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[0].allOf[0].properties + .viewer.items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + } else { + const err10 = { + instancePath: + instancePath + '/viewer/' + i0 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[0].allOf[0].properties.viewer + .items.properties.url.type, + parentSchema: + schema176.anyOf[0].allOf[0].properties.viewer + .items.properties.url, + data: data7, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } + } + } else { + const err11 = { + instancePath: instancePath + '/viewer/' + i0, + schemaPath: + '#/anyOf/0/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[0].allOf[0].properties.viewer.items + .type, + parentSchema: + schema176.anyOf[0].allOf[0].properties.viewer.items, + data: data6, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + const err12 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/0/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.viewer, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.owner !== undefined) { + let data8 = data.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing2; + if (data9.url === undefined && (missing2 = 'url')) { + const err13 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema176.anyOf[0].allOf[0].properties.owner.items + .required, + parentSchema: + schema176.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + const err14 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[0].allOf[0].properties + .owner.items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + '/owner/' + i1 + '/url', + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[0].allOf[0].properties.owner + .items.properties.url.type, + parentSchema: + schema176.anyOf[0].allOf[0].properties.owner + .items.properties.url, + data: data10, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + } + } + } else { + const err16 = { + instancePath: instancePath + '/owner/' + i1, + schemaPath: + '#/anyOf/0/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[0].allOf[0].properties.owner.items + .type, + parentSchema: + schema176.anyOf[0].allOf[0].properties.owner.items, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + const err17 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/0/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.owner, + data: data8, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + const err18 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[0].allOf[0].type, + parentSchema: schema176.anyOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data11 = data.type; + const _errs28 = errors; + if ('cloud instantiable' !== data11) { + const err19 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/0/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'cloud instantiable' }, + message: 'must be equal to constant', + schema: 'cloud instantiable', + parentSchema: schema176.anyOf[0].allOf[1].properties.type, + data: data11, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.instantiateUrl !== undefined) { + let data12 = data.instantiateUrl; + const _errs29 = errors; + if (errors === _errs29) { + if (errors === _errs29) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + const err20 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + } else { + const err21 = { + instancePath: instancePath + '/instantiateUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/instantiateUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema176.anyOf[0].allOf[1].properties.instantiateUrl, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data.services !== undefined) { + let data13 = data.services; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if (data14 && typeof data14 == 'object' && !Array.isArray(data14)) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs36 = errors; + if (errors === _errs36) { + if (errors === _errs36) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + const err22 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } else { + const err23 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceType.type, + parentSchema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceType, + data: data15, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } + } + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs38 = errors; + if (typeof data16 !== 'string') { + const err24 = { + instancePath: + instancePath + '/services/' + i2 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceId.type, + parentSchema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceId, + data: data16, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs40 = errors; + if (typeof data17 !== 'string') { + const err25 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.type, + parentSchema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + const err26 = { + instancePath: + instancePath + + '/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema176.anyOf[0].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection.enum, + parentSchema: + schema176.anyOf[0].allOf[1].properties.services.items + .properties.serviceDirection, + data: data17, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } + var valid9 = _errs40 === errors; + } else { + var valid9 = true; + } + } + } + } else { + const err27 = { + instancePath: instancePath + '/services/' + i2, + schemaPath: '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[0].allOf[1].properties.services.items.type, + parentSchema: + schema176.anyOf[0].allOf[1].properties.services.items, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + const err28 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema176.anyOf[0].allOf[1].properties.services, + data: data13, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[0].allOf[1].type, + parentSchema: schema176.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid1 = _errs26 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs42 = errors; + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing3; + if ( + (data.url === undefined && (missing3 = 'url')) || + (data.type === undefined && (missing3 = 'type')) || + (data.name === undefined && (missing3 = 'name')) || + (data.isPublic === undefined && (missing3 = 'isPublic')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: schema176.anyOf[1].allOf[0].required, + parentSchema: schema176.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.url !== undefined) { + let data18 = data.url; + const _errs45 = errors; + if (errors === _errs45) { + if (errors === _errs45) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + const err31 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + } else { + const err32 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/1/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.url, + data: data18, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.name !== undefined) { + let data19 = data.name; + const _errs47 = errors; + if (typeof data19 !== 'string') { + const err33 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/1/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.name, + data: data19, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + var valid11 = _errs47 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.description !== undefined) { + let data20 = data.description; + const _errs49 = errors; + if (typeof data20 !== 'string') { + const err34 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/1/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.description, + data: data20, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + var valid11 = _errs49 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.type !== undefined) { + let data21 = data.type; + const _errs51 = errors; + if (typeof data21 !== 'string') { + const err35 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } + if ( + !( + data21 === 'device' || + data21 === 'group' || + data21 === 'edge instantiable' || + data21 === 'cloud instantiable' + ) + ) { + const err36 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema176.anyOf[1].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema176.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[1].allOf[0].properties.type, + data: data21, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + var valid11 = _errs51 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.isPublic !== undefined) { + let data22 = data.isPublic; + const _errs53 = errors; + if (typeof data22 !== 'boolean') { + const err37 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/1/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema176.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.isPublic, + data: data22, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + var valid11 = _errs53 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.viewer !== undefined) { + let data23 = data.viewer; + const _errs55 = errors; + if (errors === _errs55) { + if (Array.isArray(data23)) { + var valid12 = true; + const len3 = data23.length; + for (let i3 = 0; i3 < len3; i3++) { + let data24 = data23[i3]; + const _errs57 = errors; + if (errors === _errs57) { + if ( + data24 && + typeof data24 == 'object' && + !Array.isArray(data24) + ) { + let missing4; + if (data24.url === undefined && (missing4 = 'url')) { + const err38 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: + "must have required property '" + missing4 + "'", + schema: + schema176.anyOf[1].allOf[0].properties.viewer.items + .required, + parentSchema: + schema176.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data24.url !== undefined) { + let data25 = data24.url; + const _errs59 = errors; + if (errors === _errs59) { + if (errors === _errs59) { + if (typeof data25 === 'string') { + if (!formats0(data25)) { + const err39 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + } else { + const err40 = { + instancePath: + instancePath + '/viewer/' + i3 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema176.anyOf[1].allOf[0].properties + .viewer.items.properties.url, + data: data25, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + } + } + } + } + } else { + const err41 = { + instancePath: instancePath + '/viewer/' + i3, + schemaPath: + '#/anyOf/1/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[1].allOf[0].properties.viewer.items + .type, + parentSchema: + schema176.anyOf[1].allOf[0].properties.viewer.items, + data: data24, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } + var valid12 = _errs57 === errors; + if (!valid12) { + break; + } + } + } else { + const err42 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/1/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.viewer, + data: data23, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + var valid11 = _errs55 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.owner !== undefined) { + let data26 = data.owner; + const _errs61 = errors; + if (errors === _errs61) { + if (Array.isArray(data26)) { + var valid14 = true; + const len4 = data26.length; + for (let i4 = 0; i4 < len4; i4++) { + let data27 = data26[i4]; + const _errs63 = errors; + if (errors === _errs63) { + if ( + data27 && + typeof data27 == 'object' && + !Array.isArray(data27) + ) { + let missing5; + if (data27.url === undefined && (missing5 = 'url')) { + const err43 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: + "must have required property '" + missing5 + "'", + schema: + schema176.anyOf[1].allOf[0].properties.owner.items + .required, + parentSchema: + schema176.anyOf[1].allOf[0].properties.owner + .items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } else { + if (data27.url !== undefined) { + let data28 = data27.url; + const _errs65 = errors; + if (errors === _errs65) { + if (errors === _errs65) { + if (typeof data28 === 'string') { + if (!formats0(data28)) { + const err44 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } else { + const err45 = { + instancePath: + instancePath + '/owner/' + i4 + '/url', + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema176.anyOf[1].allOf[0].properties + .owner.items.properties.url, + data: data28, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } + } + } + } + } + } else { + const err46 = { + instancePath: instancePath + '/owner/' + i4, + schemaPath: + '#/anyOf/1/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[1].allOf[0].properties.owner.items + .type, + parentSchema: + schema176.anyOf[1].allOf[0].properties.owner.items, + data: data27, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + var valid14 = _errs63 === errors; + if (!valid14) { + break; + } + } + } else { + const err47 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/1/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.owner, + data: data26, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid11 = _errs61 === errors; + } else { + var valid11 = true; + } + } + } + } + } + } + } + } + } else { + const err48 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[1].allOf[0].type, + parentSchema: schema176.anyOf[1].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } + } + var valid10 = _errs43 === errors; + if (valid10) { + const _errs67 = errors; + if (errors === _errs67) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data29 = data.type; + const _errs69 = errors; + if ('device' !== data29) { + const err49 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/1/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: schema176.anyOf[1].allOf[1].properties.type, + data: data29, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid16 = _errs69 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.connected !== undefined) { + let data30 = data.connected; + const _errs70 = errors; + if (typeof data30 !== 'boolean') { + const err50 = { + instancePath: instancePath + '/connected', + schemaPath: '#/anyOf/1/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema176.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema176.anyOf[1].allOf[1].properties.connected, + data: data30, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + var valid16 = _errs70 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.announcedAvailability !== undefined) { + let data31 = data.announcedAvailability; + const _errs72 = errors; + if (errors === _errs72) { + if (Array.isArray(data31)) { + var valid17 = true; + const len5 = data31.length; + for (let i5 = 0; i5 < len5; i5++) { + let data32 = data31[i5]; + const _errs74 = errors; + if (errors === _errs74) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + if (data32.start !== undefined) { + let data33 = data32.start; + const _errs76 = errors; + if (errors === _errs76) { + if (errors === _errs76) { + if (typeof data33 === 'string') { + if (!formats22.validate(data33)) { + const err51 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } else { + const err52 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/start', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start + .type, + parentSchema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.start, + data: data33, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } + } + } + var valid18 = _errs76 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data32.end !== undefined) { + let data34 = data32.end; + const _errs78 = errors; + if (errors === _errs78) { + if (errors === _errs78) { + if (typeof data34 === 'string') { + if (!formats22.validate(data34)) { + const err53 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } else { + const err54 = { + instancePath: + instancePath + + '/announcedAvailability/' + + i5 + + '/end', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end + .type, + parentSchema: + schema176.anyOf[1].allOf[1].properties + .announcedAvailability.items.properties.end, + data: data34, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } else { + const err55 = { + instancePath: instancePath + '/announcedAvailability/' + i5, + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[1].allOf[1].properties.announcedAvailability + .items.type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.announcedAvailability + .items, + data: data32, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } + } + var valid17 = _errs74 === errors; + if (!valid17) { + break; + } + } + } else { + const err56 = { + instancePath: instancePath + '/announcedAvailability', + schemaPath: + '#/anyOf/1/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema176.anyOf[1].allOf[1].properties.announcedAvailability.type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.announcedAvailability, + data: data31, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + } + var valid16 = _errs72 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.experiment !== undefined) { + let data35 = data.experiment; + const _errs80 = errors; + if (errors === _errs80) { + if (errors === _errs80) { + if (typeof data35 === 'string') { + if (!formats0(data35)) { + const err57 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + } else { + const err58 = { + instancePath: instancePath + '/experiment', + schemaPath: '#/anyOf/1/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema176.anyOf[1].allOf[1].properties.experiment, + data: data35, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + } + } + var valid16 = _errs80 === errors; + } else { + var valid16 = true; + } + if (valid16) { + if (data.services !== undefined) { + let data36 = data.services; + const _errs82 = errors; + if (errors === _errs82) { + if (Array.isArray(data36)) { + var valid19 = true; + const len6 = data36.length; + for (let i6 = 0; i6 < len6; i6++) { + let data37 = data36[i6]; + const _errs84 = errors; + if (errors === _errs84) { + if ( + data37 && + typeof data37 == 'object' && + !Array.isArray(data37) + ) { + if (data37.serviceType !== undefined) { + let data38 = data37.serviceType; + const _errs87 = errors; + if (errors === _errs87) { + if (errors === _errs87) { + if (typeof data38 === 'string') { + if (!formats0(data38)) { + const err59 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[1].allOf[1].properties + .services.items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } else { + const err60 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceType', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceType, + data: data38, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } + } + } + var valid20 = _errs87 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceId !== undefined) { + let data39 = data37.serviceId; + const _errs89 = errors; + if (typeof data39 !== 'string') { + const err61 = { + instancePath: + instancePath + '/services/' + i6 + '/serviceId', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceId, + data: data39, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + var valid20 = _errs89 === errors; + } else { + var valid20 = true; + } + if (valid20) { + if (data37.serviceDirection !== undefined) { + let data40 = data37.serviceDirection; + const _errs91 = errors; + if (typeof data40 !== 'string') { + const err62 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + if ( + !( + data40 === 'consumer' || + data40 === 'producer' || + data40 === 'prosumer' + ) + ) { + const err63 = { + instancePath: + instancePath + + '/services/' + + i6 + + '/serviceDirection', + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema176.anyOf[1].allOf[1].properties + .services.items.properties.serviceDirection + .enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema176.anyOf[1].allOf[1].properties.services + .items.properties.serviceDirection, + data: data40, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } + var valid20 = _errs91 === errors; + } else { + var valid20 = true; + } + } + } + } else { + const err64 = { + instancePath: instancePath + '/services/' + i6, + schemaPath: + '#/anyOf/1/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[1].allOf[1].properties.services.items + .type, + parentSchema: + schema176.anyOf[1].allOf[1].properties.services.items, + data: data37, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + } + var valid19 = _errs84 === errors; + if (!valid19) { + break; + } + } + } else { + const err65 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/1/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema176.anyOf[1].allOf[1].properties.services, + data: data36, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid16 = _errs82 === errors; + } else { + var valid16 = true; + } + } + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[1].allOf[1].type, + parentSchema: schema176.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid10 = _errs67 === errors; + } + var _valid0 = _errs42 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs93 = errors; + const _errs94 = errors; + if (errors === _errs94) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.url === undefined && (missing6 = 'url')) || + (data.type === undefined && (missing6 = 'type')) || + (data.name === undefined && (missing6 = 'name')) || + (data.isPublic === undefined && (missing6 = 'isPublic')) + ) { + const err67 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema176.anyOf[2].allOf[0].required, + parentSchema: schema176.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err67]; + } else { + vErrors.push(err67); + } + errors++; + } else { + if (data.url !== undefined) { + let data41 = data.url; + const _errs96 = errors; + if (errors === _errs96) { + if (errors === _errs96) { + if (typeof data41 === 'string') { + if (!formats0(data41)) { + const err68 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err68]; + } else { + vErrors.push(err68); + } + errors++; + } + } else { + const err69 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/2/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.url, + data: data41, + }; + if (vErrors === null) { + vErrors = [err69]; + } else { + vErrors.push(err69); + } + errors++; + } + } + } + var valid22 = _errs96 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.name !== undefined) { + let data42 = data.name; + const _errs98 = errors; + if (typeof data42 !== 'string') { + const err70 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/2/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.name, + data: data42, + }; + if (vErrors === null) { + vErrors = [err70]; + } else { + vErrors.push(err70); + } + errors++; + } + var valid22 = _errs98 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.description !== undefined) { + let data43 = data.description; + const _errs100 = errors; + if (typeof data43 !== 'string') { + const err71 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/2/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.description, + data: data43, + }; + if (vErrors === null) { + vErrors = [err71]; + } else { + vErrors.push(err71); + } + errors++; + } + var valid22 = _errs100 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.type !== undefined) { + let data44 = data.type; + const _errs102 = errors; + if (typeof data44 !== 'string') { + const err72 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err72]; + } else { + vErrors.push(err72); + } + errors++; + } + if ( + !( + data44 === 'device' || + data44 === 'group' || + data44 === 'edge instantiable' || + data44 === 'cloud instantiable' + ) + ) { + const err73 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema176.anyOf[2].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema176.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[2].allOf[0].properties.type, + data: data44, + }; + if (vErrors === null) { + vErrors = [err73]; + } else { + vErrors.push(err73); + } + errors++; + } + var valid22 = _errs102 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.isPublic !== undefined) { + let data45 = data.isPublic; + const _errs104 = errors; + if (typeof data45 !== 'boolean') { + const err74 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/2/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema176.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.isPublic, + data: data45, + }; + if (vErrors === null) { + vErrors = [err74]; + } else { + vErrors.push(err74); + } + errors++; + } + var valid22 = _errs104 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.viewer !== undefined) { + let data46 = data.viewer; + const _errs106 = errors; + if (errors === _errs106) { + if (Array.isArray(data46)) { + var valid23 = true; + const len7 = data46.length; + for (let i7 = 0; i7 < len7; i7++) { + let data47 = data46[i7]; + const _errs108 = errors; + if (errors === _errs108) { + if ( + data47 && + typeof data47 == 'object' && + !Array.isArray(data47) + ) { + let missing7; + if (data47.url === undefined && (missing7 = 'url')) { + const err75 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: + "must have required property '" + missing7 + "'", + schema: + schema176.anyOf[2].allOf[0].properties.viewer + .items.required, + parentSchema: + schema176.anyOf[2].allOf[0].properties.viewer + .items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err75]; + } else { + vErrors.push(err75); + } + errors++; + } else { + if (data47.url !== undefined) { + let data48 = data47.url; + const _errs110 = errors; + if (errors === _errs110) { + if (errors === _errs110) { + if (typeof data48 === 'string') { + if (!formats0(data48)) { + const err76 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err76]; + } else { + vErrors.push(err76); + } + errors++; + } + } else { + const err77 = { + instancePath: + instancePath + '/viewer/' + i7 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[2].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema176.anyOf[2].allOf[0].properties + .viewer.items.properties.url, + data: data48, + }; + if (vErrors === null) { + vErrors = [err77]; + } else { + vErrors.push(err77); + } + errors++; + } + } + } + } + } + } else { + const err78 = { + instancePath: instancePath + '/viewer/' + i7, + schemaPath: + '#/anyOf/2/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[2].allOf[0].properties.viewer.items + .type, + parentSchema: + schema176.anyOf[2].allOf[0].properties.viewer.items, + data: data47, + }; + if (vErrors === null) { + vErrors = [err78]; + } else { + vErrors.push(err78); + } + errors++; + } + } + var valid23 = _errs108 === errors; + if (!valid23) { + break; + } + } + } else { + const err79 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/2/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.viewer, + data: data46, + }; + if (vErrors === null) { + vErrors = [err79]; + } else { + vErrors.push(err79); + } + errors++; + } + } + var valid22 = _errs106 === errors; + } else { + var valid22 = true; + } + if (valid22) { + if (data.owner !== undefined) { + let data49 = data.owner; + const _errs112 = errors; + if (errors === _errs112) { + if (Array.isArray(data49)) { + var valid25 = true; + const len8 = data49.length; + for (let i8 = 0; i8 < len8; i8++) { + let data50 = data49[i8]; + const _errs114 = errors; + if (errors === _errs114) { + if ( + data50 && + typeof data50 == 'object' && + !Array.isArray(data50) + ) { + let missing8; + if (data50.url === undefined && (missing8 = 'url')) { + const err80 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: + "must have required property '" + + missing8 + + "'", + schema: + schema176.anyOf[2].allOf[0].properties.owner + .items.required, + parentSchema: + schema176.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err80]; + } else { + vErrors.push(err80); + } + errors++; + } else { + if (data50.url !== undefined) { + let data51 = data50.url; + const _errs116 = errors; + if (errors === _errs116) { + if (errors === _errs116) { + if (typeof data51 === 'string') { + if (!formats0(data51)) { + const err81 = { + instancePath: + instancePath + + '/owner/' + + i8 + + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err81]; + } else { + vErrors.push(err81); + } + errors++; + } + } else { + const err82 = { + instancePath: + instancePath + '/owner/' + i8 + '/url', + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[2].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema176.anyOf[2].allOf[0].properties + .owner.items.properties.url, + data: data51, + }; + if (vErrors === null) { + vErrors = [err82]; + } else { + vErrors.push(err82); + } + errors++; + } + } + } + } + } + } else { + const err83 = { + instancePath: instancePath + '/owner/' + i8, + schemaPath: + '#/anyOf/2/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[2].allOf[0].properties.owner.items + .type, + parentSchema: + schema176.anyOf[2].allOf[0].properties.owner + .items, + data: data50, + }; + if (vErrors === null) { + vErrors = [err83]; + } else { + vErrors.push(err83); + } + errors++; + } + } + var valid25 = _errs114 === errors; + if (!valid25) { + break; + } + } + } else { + const err84 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/2/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[2].allOf[0].properties.owner.type, + parentSchema: + schema176.anyOf[2].allOf[0].properties.owner, + data: data49, + }; + if (vErrors === null) { + vErrors = [err84]; + } else { + vErrors.push(err84); + } + errors++; + } + } + var valid22 = _errs112 === errors; + } else { + var valid22 = true; + } + } + } + } + } + } + } + } + } else { + const err85 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[2].allOf[0].type, + parentSchema: schema176.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err85]; + } else { + vErrors.push(err85); + } + errors++; + } + } + var valid21 = _errs94 === errors; + if (valid21) { + const _errs118 = errors; + if (errors === _errs118) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + if (data.type !== undefined) { + let data52 = data.type; + const _errs120 = errors; + if ('edge instantiable' !== data52) { + const err86 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/2/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'edge instantiable' }, + message: 'must be equal to constant', + schema: 'edge instantiable', + parentSchema: schema176.anyOf[2].allOf[1].properties.type, + data: data52, + }; + if (vErrors === null) { + vErrors = [err86]; + } else { + vErrors.push(err86); + } + errors++; + } + var valid27 = _errs120 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.codeUrl !== undefined) { + let data53 = data.codeUrl; + const _errs121 = errors; + if (errors === _errs121) { + if (errors === _errs121) { + if (typeof data53 === 'string') { + if (!formats0(data53)) { + const err87 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err87]; + } else { + vErrors.push(err87); + } + errors++; + } + } else { + const err88 = { + instancePath: instancePath + '/codeUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/codeUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema176.anyOf[2].allOf[1].properties.codeUrl, + data: data53, + }; + if (vErrors === null) { + vErrors = [err88]; + } else { + vErrors.push(err88); + } + errors++; + } + } + } + var valid27 = _errs121 === errors; + } else { + var valid27 = true; + } + if (valid27) { + if (data.services !== undefined) { + let data54 = data.services; + const _errs123 = errors; + if (errors === _errs123) { + if (Array.isArray(data54)) { + var valid28 = true; + const len9 = data54.length; + for (let i9 = 0; i9 < len9; i9++) { + let data55 = data54[i9]; + const _errs125 = errors; + if (errors === _errs125) { + if ( + data55 && + typeof data55 == 'object' && + !Array.isArray(data55) + ) { + if (data55.serviceType !== undefined) { + let data56 = data55.serviceType; + const _errs128 = errors; + if (errors === _errs128) { + if (errors === _errs128) { + if (typeof data56 === 'string') { + if (!formats0(data56)) { + const err89 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err89]; + } else { + vErrors.push(err89); + } + errors++; + } + } else { + const err90 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceType', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceType, + data: data56, + }; + if (vErrors === null) { + vErrors = [err90]; + } else { + vErrors.push(err90); + } + errors++; + } + } + } + var valid29 = _errs128 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceId !== undefined) { + let data57 = data55.serviceId; + const _errs130 = errors; + if (typeof data57 !== 'string') { + const err91 = { + instancePath: + instancePath + '/services/' + i9 + '/serviceId', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceId, + data: data57, + }; + if (vErrors === null) { + vErrors = [err91]; + } else { + vErrors.push(err91); + } + errors++; + } + var valid29 = _errs130 === errors; + } else { + var valid29 = true; + } + if (valid29) { + if (data55.serviceDirection !== undefined) { + let data58 = data55.serviceDirection; + const _errs132 = errors; + if (typeof data58 !== 'string') { + const err92 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.type, + parentSchema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err92]; + } else { + vErrors.push(err92); + } + errors++; + } + if ( + !( + data58 === 'consumer' || + data58 === 'producer' || + data58 === 'prosumer' + ) + ) { + const err93 = { + instancePath: + instancePath + + '/services/' + + i9 + + '/serviceDirection', + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection.enum, + parentSchema: + schema176.anyOf[2].allOf[1].properties.services + .items.properties.serviceDirection, + data: data58, + }; + if (vErrors === null) { + vErrors = [err93]; + } else { + vErrors.push(err93); + } + errors++; + } + var valid29 = _errs132 === errors; + } else { + var valid29 = true; + } + } + } + } else { + const err94 = { + instancePath: instancePath + '/services/' + i9, + schemaPath: + '#/anyOf/2/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[2].allOf[1].properties.services.items + .type, + parentSchema: + schema176.anyOf[2].allOf[1].properties.services.items, + data: data55, + }; + if (vErrors === null) { + vErrors = [err94]; + } else { + vErrors.push(err94); + } + errors++; + } + } + var valid28 = _errs125 === errors; + if (!valid28) { + break; + } + } + } else { + const err95 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/2/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema176.anyOf[2].allOf[1].properties.services, + data: data54, + }; + if (vErrors === null) { + vErrors = [err95]; + } else { + vErrors.push(err95); + } + errors++; + } + } + var valid27 = _errs123 === errors; + } else { + var valid27 = true; + } + } + } + } else { + const err96 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[2].allOf[1].type, + parentSchema: schema176.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err96]; + } else { + vErrors.push(err96); + } + errors++; + } + } + var valid21 = _errs118 === errors; + } + var _valid0 = _errs93 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs134 = errors; + const _errs135 = errors; + if (errors === _errs135) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if ( + (data.url === undefined && (missing9 = 'url')) || + (data.type === undefined && (missing9 = 'type')) || + (data.name === undefined && (missing9 = 'name')) || + (data.isPublic === undefined && (missing9 = 'isPublic')) + ) { + const err97 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema176.anyOf[3].allOf[0].required, + parentSchema: schema176.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err97]; + } else { + vErrors.push(err97); + } + errors++; + } else { + if (data.url !== undefined) { + let data59 = data.url; + const _errs137 = errors; + if (errors === _errs137) { + if (errors === _errs137) { + if (typeof data59 === 'string') { + if (!formats0(data59)) { + const err98 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema176.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err98]; + } else { + vErrors.push(err98); + } + errors++; + } + } else { + const err99 = { + instancePath: instancePath + '/url', + schemaPath: '#/anyOf/3/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.url, + data: data59, + }; + if (vErrors === null) { + vErrors = [err99]; + } else { + vErrors.push(err99); + } + errors++; + } + } + } + var valid31 = _errs137 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.name !== undefined) { + let data60 = data.name; + const _errs139 = errors; + if (typeof data60 !== 'string') { + const err100 = { + instancePath: instancePath + '/name', + schemaPath: '#/anyOf/3/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.name, + data: data60, + }; + if (vErrors === null) { + vErrors = [err100]; + } else { + vErrors.push(err100); + } + errors++; + } + var valid31 = _errs139 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.description !== undefined) { + let data61 = data.description; + const _errs141 = errors; + if (typeof data61 !== 'string') { + const err101 = { + instancePath: instancePath + '/description', + schemaPath: '#/anyOf/3/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.description, + data: data61, + }; + if (vErrors === null) { + vErrors = [err101]; + } else { + vErrors.push(err101); + } + errors++; + } + var valid31 = _errs141 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.type !== undefined) { + let data62 = data.type; + const _errs143 = errors; + if (typeof data62 !== 'string') { + const err102 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema176.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err102]; + } else { + vErrors.push(err102); + } + errors++; + } + if ( + !( + data62 === 'device' || + data62 === 'group' || + data62 === 'edge instantiable' || + data62 === 'cloud instantiable' + ) + ) { + const err103 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema176.anyOf[3].allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema176.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[3].allOf[0].properties.type, + data: data62, + }; + if (vErrors === null) { + vErrors = [err103]; + } else { + vErrors.push(err103); + } + errors++; + } + var valid31 = _errs143 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.isPublic !== undefined) { + let data63 = data.isPublic; + const _errs145 = errors; + if (typeof data63 !== 'boolean') { + const err104 = { + instancePath: instancePath + '/isPublic', + schemaPath: '#/anyOf/3/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema176.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.isPublic, + data: data63, + }; + if (vErrors === null) { + vErrors = [err104]; + } else { + vErrors.push(err104); + } + errors++; + } + var valid31 = _errs145 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.viewer !== undefined) { + let data64 = data.viewer; + const _errs147 = errors; + if (errors === _errs147) { + if (Array.isArray(data64)) { + var valid32 = true; + const len10 = data64.length; + for (let i10 = 0; i10 < len10; i10++) { + let data65 = data64[i10]; + const _errs149 = errors; + if (errors === _errs149) { + if ( + data65 && + typeof data65 == 'object' && + !Array.isArray(data65) + ) { + let missing10; + if (data65.url === undefined && (missing10 = 'url')) { + const err105 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: + "must have required property '" + + missing10 + + "'", + schema: + schema176.anyOf[3].allOf[0].properties.viewer + .items.required, + parentSchema: + schema176.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err105]; + } else { + vErrors.push(err105); + } + errors++; + } else { + if (data65.url !== undefined) { + let data66 = data65.url; + const _errs151 = errors; + if (errors === _errs151) { + if (errors === _errs151) { + if (typeof data66 === 'string') { + if (!formats0(data66)) { + const err106 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err106]; + } else { + vErrors.push(err106); + } + errors++; + } + } else { + const err107 = { + instancePath: + instancePath + + '/viewer/' + + i10 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[3].allOf[0].properties + .viewer.items.properties.url.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties + .viewer.items.properties.url, + data: data66, + }; + if (vErrors === null) { + vErrors = [err107]; + } else { + vErrors.push(err107); + } + errors++; + } + } + } + } + } + } else { + const err108 = { + instancePath: instancePath + '/viewer/' + i10, + schemaPath: + '#/anyOf/3/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[3].allOf[0].properties.viewer + .items.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties.viewer + .items, + data: data65, + }; + if (vErrors === null) { + vErrors = [err108]; + } else { + vErrors.push(err108); + } + errors++; + } + } + var valid32 = _errs149 === errors; + if (!valid32) { + break; + } + } + } else { + const err109 = { + instancePath: instancePath + '/viewer', + schemaPath: '#/anyOf/3/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema176.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties.viewer, + data: data64, + }; + if (vErrors === null) { + vErrors = [err109]; + } else { + vErrors.push(err109); + } + errors++; + } + } + var valid31 = _errs147 === errors; + } else { + var valid31 = true; + } + if (valid31) { + if (data.owner !== undefined) { + let data67 = data.owner; + const _errs153 = errors; + if (errors === _errs153) { + if (Array.isArray(data67)) { + var valid34 = true; + const len11 = data67.length; + for (let i11 = 0; i11 < len11; i11++) { + let data68 = data67[i11]; + const _errs155 = errors; + if (errors === _errs155) { + if ( + data68 && + typeof data68 == 'object' && + !Array.isArray(data68) + ) { + let missing11; + if ( + data68.url === undefined && + (missing11 = 'url') + ) { + const err110 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: + "must have required property '" + + missing11 + + "'", + schema: + schema176.anyOf[3].allOf[0].properties.owner + .items.required, + parentSchema: + schema176.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err110]; + } else { + vErrors.push(err110); + } + errors++; + } else { + if (data68.url !== undefined) { + let data69 = data68.url; + const _errs157 = errors; + if (errors === _errs157) { + if (errors === _errs157) { + if (typeof data69 === 'string') { + if (!formats0(data69)) { + const err111 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[3].allOf[0] + .properties.owner.items.properties + .url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err111]; + } else { + vErrors.push(err111); + } + errors++; + } + } else { + const err112 = { + instancePath: + instancePath + + '/owner/' + + i11 + + '/url', + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[3].allOf[0].properties + .owner.items.properties.url.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties + .owner.items.properties.url, + data: data69, + }; + if (vErrors === null) { + vErrors = [err112]; + } else { + vErrors.push(err112); + } + errors++; + } + } + } + } + } + } else { + const err113 = { + instancePath: instancePath + '/owner/' + i11, + schemaPath: + '#/anyOf/3/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[3].allOf[0].properties.owner + .items.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties.owner + .items, + data: data68, + }; + if (vErrors === null) { + vErrors = [err113]; + } else { + vErrors.push(err113); + } + errors++; + } + } + var valid34 = _errs155 === errors; + if (!valid34) { + break; + } + } + } else { + const err114 = { + instancePath: instancePath + '/owner', + schemaPath: '#/anyOf/3/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema176.anyOf[3].allOf[0].properties.owner.type, + parentSchema: + schema176.anyOf[3].allOf[0].properties.owner, + data: data67, + }; + if (vErrors === null) { + vErrors = [err114]; + } else { + vErrors.push(err114); + } + errors++; + } + } + var valid31 = _errs153 === errors; + } else { + var valid31 = true; + } + } + } + } + } + } + } + } + } else { + const err115 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[3].allOf[0].type, + parentSchema: schema176.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err115]; + } else { + vErrors.push(err115); + } + errors++; + } + } + var valid30 = _errs135 === errors; + if (valid30) { + const _errs159 = errors; + if (errors === _errs159) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if (data.devices === undefined && (missing12 = 'devices')) { + const err116 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema176.anyOf[3].allOf[1].required, + parentSchema: schema176.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err116]; + } else { + vErrors.push(err116); + } + errors++; + } else { + if (data.type !== undefined) { + let data70 = data.type; + const _errs161 = errors; + if ('group' !== data70) { + const err117 = { + instancePath: instancePath + '/type', + schemaPath: '#/anyOf/3/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'group' }, + message: 'must be equal to constant', + schema: 'group', + parentSchema: schema176.anyOf[3].allOf[1].properties.type, + data: data70, + }; + if (vErrors === null) { + vErrors = [err117]; + } else { + vErrors.push(err117); + } + errors++; + } + var valid36 = _errs161 === errors; + } else { + var valid36 = true; + } + if (valid36) { + if (data.devices !== undefined) { + let data71 = data.devices; + const _errs162 = errors; + if (errors === _errs162) { + if (Array.isArray(data71)) { + var valid37 = true; + const len12 = data71.length; + for (let i12 = 0; i12 < len12; i12++) { + let data72 = data71[i12]; + const _errs164 = errors; + if (errors === _errs164) { + if ( + data72 && + typeof data72 == 'object' && + !Array.isArray(data72) + ) { + let missing13; + if (data72.url === undefined && (missing13 = 'url')) { + const err118 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: + "must have required property '" + missing13 + "'", + schema: + schema176.anyOf[3].allOf[1].properties.devices.items + .required, + parentSchema: + schema176.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err118]; + } else { + vErrors.push(err118); + } + errors++; + } else { + if (data72.url !== undefined) { + let data73 = data72.url; + const _errs166 = errors; + if (errors === _errs166) { + if (errors === _errs166) { + if (typeof data73 === 'string') { + if (!formats0(data73)) { + const err119 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema176.anyOf[3].allOf[1].properties + .devices.items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err119]; + } else { + vErrors.push(err119); + } + errors++; + } + } else { + const err120 = { + instancePath: + instancePath + '/devices/' + i12 + '/url', + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema176.anyOf[3].allOf[1].properties.devices + .items.properties.url.type, + parentSchema: + schema176.anyOf[3].allOf[1].properties.devices + .items.properties.url, + data: data73, + }; + if (vErrors === null) { + vErrors = [err120]; + } else { + vErrors.push(err120); + } + errors++; + } + } + } + } + } + } else { + const err121 = { + instancePath: instancePath + '/devices/' + i12, + schemaPath: + '#/anyOf/3/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema176.anyOf[3].allOf[1].properties.devices.items + .type, + parentSchema: + schema176.anyOf[3].allOf[1].properties.devices.items, + data: data72, + }; + if (vErrors === null) { + vErrors = [err121]; + } else { + vErrors.push(err121); + } + errors++; + } + } + var valid37 = _errs164 === errors; + if (!valid37) { + break; + } + } + } else { + const err122 = { + instancePath: instancePath + '/devices', + schemaPath: '#/anyOf/3/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema176.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema176.anyOf[3].allOf[1].properties.devices, + data: data71, + }; + if (vErrors === null) { + vErrors = [err122]; + } else { + vErrors.push(err122); + } + errors++; + } + } + var valid36 = _errs162 === errors; + } else { + var valid36 = true; + } + } + } + } else { + const err123 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema176.anyOf[3].allOf[1].type, + parentSchema: schema176.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err123]; + } else { + vErrors.push(err123); + } + errors++; + } + } + var valid30 = _errs159 === errors; + } + var _valid0 = _errs134 === errors; + valid0 = valid0 || _valid0; + } + } + } + if (!valid0) { + const err124 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema176.anyOf, + parentSchema: schema176, + data, + }; + if (vErrors === null) { + vErrors = [err124]; + } else { + vErrors.push(err124); + } + errors++; + validate191.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate191.errors = vErrors; + return errors === 0; +} +exports.validateInstantiateDeviceResponse201Request = validate192; +const schema177 = { + type: 'object', + properties: { + instance: { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + deviceToken: { type: 'string' }, + }, + required: ['instance', 'deviceToken'], + 'x-standalone': false, + 'x-name': 'instantiateDeviceResponse201Request', + 'x-location': + '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate192( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.instance === undefined && (missing0 = 'instance')) || + (data.deviceToken === undefined && (missing0 = 'deviceToken')) + ) { + validate192.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema177.required, + parentSchema: schema177, + data, + }, + ]; + return false; + } else { + if (data.instance !== undefined) { + let data0 = data.instance; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.type === undefined && (missing1 = 'type')) || + (data0.name === undefined && (missing1 = 'name')) || + (data0.isPublic === undefined && (missing1 = 'isPublic')) + ) { + validate192.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema177.properties.instance.allOf[0].required, + parentSchema: schema177.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.name !== undefined) { + let data1 = data0.name; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate192.errors = [ + { + instancePath: instancePath + '/instance/name', + schemaPath: '#/properties/instance/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[0].properties.name.type, + parentSchema: + schema177.properties.instance.allOf[0].properties.name, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.description !== undefined) { + let data2 = data0.description; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate192.errors = [ + { + instancePath: instancePath + '/instance/description', + schemaPath: + '#/properties/instance/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[0].properties.description + .type, + parentSchema: + schema177.properties.instance.allOf[0].properties.description, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.type !== undefined) { + let data3 = data0.type; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate192.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[0].properties.type.type, + parentSchema: + schema177.properties.instance.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'device' || + data3 === 'group' || + data3 === 'edge instantiable' || + data3 === 'cloud instantiable' + ) + ) { + validate192.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema177.properties.instance.allOf[0].properties.type + .enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema177.properties.instance.allOf[0].properties.type.enum, + parentSchema: + schema177.properties.instance.allOf[0].properties.type, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.isPublic !== undefined) { + let data4 = data0.isPublic; + const _errs10 = errors; + if (typeof data4 !== 'boolean') { + validate192.errors = [ + { + instancePath: instancePath + '/instance/isPublic', + schemaPath: + '#/properties/instance/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema177.properties.instance.allOf[0].properties.isPublic + .type, + parentSchema: + schema177.properties.instance.allOf[0].properties + .isPublic, + data: data4, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.viewer !== undefined) { + let data5 = data0.viewer; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data5)) { + var valid3 = true; + const len0 = data5.length; + for (let i0 = 0; i0 < len0; i0++) { + let data6 = data5[i0]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing2; + if (data6.url === undefined && (missing2 = 'url')) { + validate192.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema177.properties.instance.allOf[0] + .properties.viewer.items.required, + parentSchema: + schema177.properties.instance.allOf[0] + .properties.viewer.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.url !== undefined) { + let data7 = data6.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema177.properties.instance + .allOf[0].properties.viewer.items + .properties.url, + data: data7, + }, + ]; + return false; + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[0] + .properties.viewer.items.properties + .url.type, + parentSchema: + schema177.properties.instance.allOf[0] + .properties.viewer.items.properties + .url, + data: data7, + }, + ]; + return false; + } + } + } + } + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema177.properties.instance.allOf[0] + .properties.viewer.items.type, + parentSchema: + schema177.properties.instance.allOf[0] + .properties.viewer.items, + data: data6, + }, + ]; + return false; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + break; + } + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance/viewer', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema177.properties.instance.allOf[0].properties + .viewer.type, + parentSchema: + schema177.properties.instance.allOf[0].properties + .viewer, + data: data5, + }, + ]; + return false; + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.owner !== undefined) { + let data8 = data0.owner; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data8)) { + var valid5 = true; + const len1 = data8.length; + for (let i1 = 0; i1 < len1; i1++) { + let data9 = data8[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data9 && + typeof data9 == 'object' && + !Array.isArray(data9) + ) { + let missing3; + if (data9.url === undefined && (missing3 = 'url')) { + validate192.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema177.properties.instance.allOf[0] + .properties.owner.items.required, + parentSchema: + schema177.properties.instance.allOf[0] + .properties.owner.items, + data: data9, + }, + ]; + return false; + } else { + if (data9.url !== undefined) { + let data10 = data9.url; + const _errs22 = errors; + if (errors === _errs22) { + if (errors === _errs22) { + if (typeof data10 === 'string') { + if (!formats0(data10)) { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema177.properties.instance + .allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance + .allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema177.properties.instance + .allOf[0].properties.owner.items + .properties.url, + data: data10, + }, + ]; + return false; + } + } + } + } + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema177.properties.instance.allOf[0] + .properties.owner.items.type, + parentSchema: + schema177.properties.instance.allOf[0] + .properties.owner.items, + data: data9, + }, + ]; + return false; + } + } + var valid5 = _errs20 === errors; + if (!valid5) { + break; + } + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance/owner', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema177.properties.instance.allOf[0].properties + .owner.type, + parentSchema: + schema177.properties.instance.allOf[0].properties + .owner, + data: data8, + }, + ]; + return false; + } + } + var valid2 = _errs18 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema177.properties.instance.allOf[0].type, + parentSchema: schema177.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs24 = errors; + if (errors === _errs24) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.type !== undefined) { + let data11 = data0.type; + const _errs26 = errors; + if ('device' !== data11) { + validate192.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: '#/properties/instance/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: + schema177.properties.instance.allOf[1].properties.type, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs26 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.experiment !== undefined) { + let data12 = data0.experiment; + const _errs27 = errors; + if (errors === _errs27) { + if (errors === _errs27) { + if (typeof data12 === 'string') { + if (!formats0(data12)) { + validate192.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema177.properties.instance.allOf[1].properties + .experiment, + data: data12, + }, + ]; + return false; + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[1].properties + .experiment.type, + parentSchema: + schema177.properties.instance.allOf[1].properties + .experiment, + data: data12, + }, + ]; + return false; + } + } + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.services !== undefined) { + let data13 = data0.services; + const _errs29 = errors; + if (errors === _errs29) { + if (Array.isArray(data13)) { + var valid8 = true; + const len2 = data13.length; + for (let i2 = 0; i2 < len2; i2++) { + let data14 = data13[i2]; + const _errs31 = errors; + if (errors === _errs31) { + if ( + data14 && + typeof data14 == 'object' && + !Array.isArray(data14) + ) { + if (data14.serviceType !== undefined) { + let data15 = data14.serviceType; + const _errs34 = errors; + if (errors === _errs34) { + if (errors === _errs34) { + if (typeof data15 === 'string') { + if (!formats0(data15)) { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i2 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType, + data: data15, + }, + ]; + return false; + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i2 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType.type, + parentSchema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType, + data: data15, + }, + ]; + return false; + } + } + } + var valid9 = _errs34 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceId !== undefined) { + let data16 = data14.serviceId; + const _errs36 = errors; + if (typeof data16 !== 'string') { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i2 + + '/serviceId', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId.type, + parentSchema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId, + data: data16, + }, + ]; + return false; + } + var valid9 = _errs36 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data14.serviceDirection !== undefined) { + let data17 = data14.serviceDirection; + const _errs38 = errors; + if (typeof data17 !== 'string') { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.type, + parentSchema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data17, + }, + ]; + return false; + } + if ( + !( + data17 === 'consumer' || + data17 === 'producer' || + data17 === 'prosumer' + ) + ) { + validate192.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i2 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.enum, + parentSchema: + schema177.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data17, + }, + ]; + return false; + } + var valid9 = _errs38 === errors; + } else { + var valid9 = true; + } + } + } + } else { + validate192.errors = [ + { + instancePath: + instancePath + '/instance/services/' + i2, + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema177.properties.instance.allOf[1].properties + .services.items.type, + parentSchema: + schema177.properties.instance.allOf[1].properties + .services.items, + data: data14, + }, + ]; + return false; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + break; + } + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance/services', + schemaPath: + '#/properties/instance/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema177.properties.instance.allOf[1].properties.services + .type, + parentSchema: + schema177.properties.instance.allOf[1].properties + .services, + data: data13, + }, + ]; + return false; + } + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } else { + validate192.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema177.properties.instance.allOf[1].type, + parentSchema: schema177.properties.instance.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs24 === errors; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.deviceToken !== undefined) { + let data18 = data.deviceToken; + const _errs40 = errors; + if (typeof data18 !== 'string') { + validate192.errors = [ + { + instancePath: instancePath + '/deviceToken', + schemaPath: '#/properties/deviceToken/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema177.properties.deviceToken.type, + parentSchema: schema177.properties.deviceToken, + data: data18, + }, + ]; + return false; + } + var valid0 = _errs40 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate192.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema177.type, + parentSchema: schema177, + data, + }, + ]; + return false; + } + } + validate192.errors = vErrors; + return errors === 0; +} +exports.validateInstantiateDeviceResponse201Response = validate193; +const schema178 = { + type: 'object', + properties: { + instance: { + title: 'Concrete Device', + allOf: [ + { + title: 'Device Overview', + type: 'object', + properties: { + url: { + type: 'string', + description: 'URL of the device', + format: 'uri', + readOnly: true, + }, + name: { type: 'string', description: 'Name of the device' }, + description: { + type: 'string', + description: 'Extended description of the device, features, etc.', + }, + type: { + type: 'string', + description: 'Type of the device', + enum: ['device', 'group', 'edge instantiable', 'cloud instantiable'], + }, + isPublic: { + type: 'boolean', + description: 'If true, the device may be seen and used by every user.', + }, + viewer: { + type: 'array', + description: 'List of users who can view the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + owner: { + type: 'array', + description: 'List of users who own the device', + items: { + title: 'User Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the user', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['url', 'type', 'name', 'isPublic'], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + type: { const: 'device' }, + connected: { + description: + 'If true, the device is connected to the service and can be used.\n', + type: 'boolean', + readOnly: true, + }, + announcedAvailability: { + readOnly: true, + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + }, + experiment: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + title: 'Service Description', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + serviceDirection: { + type: 'string', + enum: ['consumer', 'producer', 'prosumer'], + }, + }, + additionalProperties: true, + }, + }, + }, + }, + ], + 'x-typeguard': true, + }, + deviceToken: { type: 'string' }, + }, + required: ['instance', 'deviceToken'], + 'x-standalone': false, + 'x-name': 'instantiateDeviceResponse201Response', + 'x-location': + '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate193( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.instance === undefined && (missing0 = 'instance')) || + (data.deviceToken === undefined && (missing0 = 'deviceToken')) + ) { + validate193.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema178.required, + parentSchema: schema178, + data, + }, + ]; + return false; + } else { + if (data.instance !== undefined) { + let data0 = data.instance; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if ( + (data0.url === undefined && (missing1 = 'url')) || + (data0.type === undefined && (missing1 = 'type')) || + (data0.name === undefined && (missing1 = 'name')) || + (data0.isPublic === undefined && (missing1 = 'isPublic')) + ) { + validate193.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema178.properties.instance.allOf[0].required, + parentSchema: schema178.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate193.errors = [ + { + instancePath: instancePath + '/instance/url', + schemaPath: + '#/properties/instance/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema178.properties.instance.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance/url', + schemaPath: + '#/properties/instance/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[0].properties.url.type, + parentSchema: + schema178.properties.instance.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.name !== undefined) { + let data2 = data0.name; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate193.errors = [ + { + instancePath: instancePath + '/instance/name', + schemaPath: + '#/properties/instance/allOf/0/properties/name/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[0].properties.name.type, + parentSchema: + schema178.properties.instance.allOf[0].properties.name, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.description !== undefined) { + let data3 = data0.description; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate193.errors = [ + { + instancePath: instancePath + '/instance/description', + schemaPath: + '#/properties/instance/allOf/0/properties/description/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[0].properties + .description.type, + parentSchema: + schema178.properties.instance.allOf[0].properties + .description, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.type !== undefined) { + let data4 = data0.type; + const _errs10 = errors; + if (typeof data4 !== 'string') { + validate193.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[0].properties.type + .type, + parentSchema: + schema178.properties.instance.allOf[0].properties.type, + data: data4, + }, + ]; + return false; + } + if ( + !( + data4 === 'device' || + data4 === 'group' || + data4 === 'edge instantiable' || + data4 === 'cloud instantiable' + ) + ) { + validate193.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: + '#/properties/instance/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: + schema178.properties.instance.allOf[0].properties.type + .enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema178.properties.instance.allOf[0].properties.type + .enum, + parentSchema: + schema178.properties.instance.allOf[0].properties.type, + data: data4, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.isPublic !== undefined) { + let data5 = data0.isPublic; + const _errs12 = errors; + if (typeof data5 !== 'boolean') { + validate193.errors = [ + { + instancePath: instancePath + '/instance/isPublic', + schemaPath: + '#/properties/instance/allOf/0/properties/isPublic/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema178.properties.instance.allOf[0].properties + .isPublic.type, + parentSchema: + schema178.properties.instance.allOf[0].properties + .isPublic, + data: data5, + }, + ]; + return false; + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.viewer !== undefined) { + let data6 = data0.viewer; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data6)) { + var valid3 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing2; + if (data7.url === undefined && (missing2 = 'url')) { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + + missing2 + + "'", + schema: + schema178.properties.instance.allOf[0] + .properties.viewer.items.required, + parentSchema: + schema178.properties.instance.allOf[0] + .properties.viewer.items, + data: data7, + }, + ]; + return false; + } else { + if (data7.url !== undefined) { + let data8 = data7.url; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema178.properties.instance + .allOf[0].properties.viewer + .items.properties.url, + data: data8, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/viewer/' + + i0 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance + .allOf[0].properties.viewer.items + .properties.url.type, + parentSchema: + schema178.properties.instance + .allOf[0].properties.viewer.items + .properties.url, + data: data8, + }, + ]; + return false; + } + } + } + } + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/viewer/' + i0, + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema178.properties.instance.allOf[0] + .properties.viewer.items.type, + parentSchema: + schema178.properties.instance.allOf[0] + .properties.viewer.items, + data: data7, + }, + ]; + return false; + } + } + var valid3 = _errs16 === errors; + if (!valid3) { + break; + } + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance/viewer', + schemaPath: + '#/properties/instance/allOf/0/properties/viewer/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema178.properties.instance.allOf[0].properties + .viewer.type, + parentSchema: + schema178.properties.instance.allOf[0].properties + .viewer, + data: data6, + }, + ]; + return false; + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.owner !== undefined) { + let data9 = data0.owner; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data9)) { + var valid5 = true; + const len1 = data9.length; + for (let i1 = 0; i1 < len1; i1++) { + let data10 = data9[i1]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data10 && + typeof data10 == 'object' && + !Array.isArray(data10) + ) { + let missing3; + if ( + data10.url === undefined && + (missing3 = 'url') + ) { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema178.properties.instance.allOf[0] + .properties.owner.items.required, + parentSchema: + schema178.properties.instance.allOf[0] + .properties.owner.items, + data: data10, + }, + ]; + return false; + } else { + if (data10.url !== undefined) { + let data11 = data10.url; + const _errs24 = errors; + if (errors === _errs24) { + if (errors === _errs24) { + if (typeof data11 === 'string') { + if (!formats0(data11)) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema178.properties.instance + .allOf[0].properties.owner + .items.properties.url, + data: data11, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/owner/' + + i1 + + '/url', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance + .allOf[0].properties.owner.items + .properties.url.type, + parentSchema: + schema178.properties.instance + .allOf[0].properties.owner.items + .properties.url, + data: data11, + }, + ]; + return false; + } + } + } + } + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/owner/' + i1, + schemaPath: + '#/properties/instance/allOf/0/properties/owner/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema178.properties.instance.allOf[0] + .properties.owner.items.type, + parentSchema: + schema178.properties.instance.allOf[0] + .properties.owner.items, + data: data10, + }, + ]; + return false; + } + } + var valid5 = _errs22 === errors; + if (!valid5) { + break; + } + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance/owner', + schemaPath: + '#/properties/instance/allOf/0/properties/owner/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema178.properties.instance.allOf[0].properties + .owner.type, + parentSchema: + schema178.properties.instance.allOf[0].properties + .owner, + data: data9, + }, + ]; + return false; + } + } + var valid2 = _errs20 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } + } + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema178.properties.instance.allOf[0].type, + parentSchema: schema178.properties.instance.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs26 = errors; + if (errors === _errs26) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.type !== undefined) { + let data12 = data0.type; + const _errs28 = errors; + if ('device' !== data12) { + validate193.errors = [ + { + instancePath: instancePath + '/instance/type', + schemaPath: '#/properties/instance/allOf/1/properties/type/const', + keyword: 'const', + params: { allowedValue: 'device' }, + message: 'must be equal to constant', + schema: 'device', + parentSchema: + schema178.properties.instance.allOf[1].properties.type, + data: data12, + }, + ]; + return false; + } + var valid7 = _errs28 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.connected !== undefined) { + let data13 = data0.connected; + const _errs29 = errors; + if (typeof data13 !== 'boolean') { + validate193.errors = [ + { + instancePath: instancePath + '/instance/connected', + schemaPath: + '#/properties/instance/allOf/1/properties/connected/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: + schema178.properties.instance.allOf[1].properties.connected + .type, + parentSchema: + schema178.properties.instance.allOf[1].properties.connected, + data: data13, + }, + ]; + return false; + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.announcedAvailability !== undefined) { + let data14 = data0.announcedAvailability; + const _errs31 = errors; + if (errors === _errs31) { + if (Array.isArray(data14)) { + var valid8 = true; + const len2 = data14.length; + for (let i2 = 0; i2 < len2; i2++) { + let data15 = data14[i2]; + const _errs33 = errors; + if (errors === _errs33) { + if ( + data15 && + typeof data15 == 'object' && + !Array.isArray(data15) + ) { + if (data15.start !== undefined) { + let data16 = data15.start; + const _errs35 = errors; + if (errors === _errs35) { + if (errors === _errs35) { + if (typeof data16 === 'string') { + if (!formats22.validate(data16)) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start, + data: data16, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/start', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.start, + data: data16, + }, + ]; + return false; + } + } + } + var valid9 = _errs35 === errors; + } else { + var valid9 = true; + } + if (valid9) { + if (data15.end !== undefined) { + let data17 = data15.end; + const _errs37 = errors; + if (errors === _errs37) { + if (errors === _errs37) { + if (typeof data17 === 'string') { + if (!formats22.validate(data17)) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + + 'date-time' + + '"', + schema: 'date-time', + parentSchema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability + .items.properties.end, + data: data17, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2 + + '/end', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.end.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.announcedAvailability.items + .properties.end, + data: data17, + }, + ]; + return false; + } + } + } + var valid9 = _errs37 === errors; + } else { + var valid9 = true; + } + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/announcedAvailability/' + + i2, + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema178.properties.instance.allOf[1].properties + .announcedAvailability.items.type, + parentSchema: + schema178.properties.instance.allOf[1].properties + .announcedAvailability.items, + data: data15, + }, + ]; + return false; + } + } + var valid8 = _errs33 === errors; + if (!valid8) { + break; + } + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/announcedAvailability', + schemaPath: + '#/properties/instance/allOf/1/properties/announcedAvailability/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema178.properties.instance.allOf[1].properties + .announcedAvailability.type, + parentSchema: + schema178.properties.instance.allOf[1].properties + .announcedAvailability, + data: data14, + }, + ]; + return false; + } + } + var valid7 = _errs31 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.experiment !== undefined) { + let data18 = data0.experiment; + const _errs39 = errors; + if (errors === _errs39) { + if (errors === _errs39) { + if (typeof data18 === 'string') { + if (!formats0(data18)) { + validate193.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema178.properties.instance.allOf[1].properties + .experiment, + data: data18, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance/experiment', + schemaPath: + '#/properties/instance/allOf/1/properties/experiment/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1].properties + .experiment.type, + parentSchema: + schema178.properties.instance.allOf[1].properties + .experiment, + data: data18, + }, + ]; + return false; + } + } + } + var valid7 = _errs39 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data0.services !== undefined) { + let data19 = data0.services; + const _errs41 = errors; + if (errors === _errs41) { + if (Array.isArray(data19)) { + var valid10 = true; + const len3 = data19.length; + for (let i3 = 0; i3 < len3; i3++) { + let data20 = data19[i3]; + const _errs43 = errors; + if (errors === _errs43) { + if ( + data20 && + typeof data20 == 'object' && + !Array.isArray(data20) + ) { + if (data20.serviceType !== undefined) { + let data21 = data20.serviceType; + const _errs46 = errors; + if (errors === _errs46) { + if (errors === _errs46) { + if (typeof data21 === 'string') { + if (!formats0(data21)) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items + .properties.serviceType, + data: data21, + }, + ]; + return false; + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceType', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceType, + data: data21, + }, + ]; + return false; + } + } + } + var valid11 = _errs46 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data20.serviceId !== undefined) { + let data22 = data20.serviceId; + const _errs48 = errors; + if (typeof data22 !== 'string') { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceId', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceId, + data: data22, + }, + ]; + return false; + } + var valid11 = _errs48 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data20.serviceDirection !== undefined) { + let data23 = data20.serviceDirection; + const _errs50 = errors; + if (typeof data23 !== 'string') { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data23, + }, + ]; + return false; + } + if ( + !( + data23 === 'consumer' || + data23 === 'producer' || + data23 === 'prosumer' + ) + ) { + validate193.errors = [ + { + instancePath: + instancePath + + '/instance/services/' + + i3 + + '/serviceDirection', + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/properties/serviceDirection/enum', + keyword: 'enum', + params: { + allowedValues: + schema178.properties.instance.allOf[1] + .properties.services.items + .properties.serviceDirection.enum, + }, + message: + 'must be equal to one of the allowed values', + schema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection.enum, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items.properties + .serviceDirection, + data: data23, + }, + ]; + return false; + } + var valid11 = _errs50 === errors; + } else { + var valid11 = true; + } + } + } + } else { + validate193.errors = [ + { + instancePath: + instancePath + '/instance/services/' + i3, + schemaPath: + '#/properties/instance/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema178.properties.instance.allOf[1] + .properties.services.items.type, + parentSchema: + schema178.properties.instance.allOf[1] + .properties.services.items, + data: data20, + }, + ]; + return false; + } + } + var valid10 = _errs43 === errors; + if (!valid10) { + break; + } + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance/services', + schemaPath: + '#/properties/instance/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema178.properties.instance.allOf[1].properties + .services.type, + parentSchema: + schema178.properties.instance.allOf[1].properties + .services, + data: data19, + }, + ]; + return false; + } + } + var valid7 = _errs41 === errors; + } else { + var valid7 = true; + } + } + } + } + } + } else { + validate193.errors = [ + { + instancePath: instancePath + '/instance', + schemaPath: '#/properties/instance/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema178.properties.instance.allOf[1].type, + parentSchema: schema178.properties.instance.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs26 === errors; + } + var valid0 = _errs1 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.deviceToken !== undefined) { + let data24 = data.deviceToken; + const _errs52 = errors; + if (typeof data24 !== 'string') { + validate193.errors = [ + { + instancePath: instancePath + '/deviceToken', + schemaPath: '#/properties/deviceToken/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema178.properties.deviceToken.type, + parentSchema: schema178.properties.deviceToken, + data: data24, + }, + ]; + return false; + } + var valid0 = _errs52 === errors; + } else { + var valid0 = true; + } + } + } + } else { + validate193.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema178.type, + parentSchema: schema178, + data, + }, + ]; + return false; + } + } + validate193.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceAvailabilityResponse200Request = validate194; +const schema179 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'getDeviceAvailabilityResponse200Request', + 'x-location': + '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate194( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate194.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema179.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate194.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema179.items.properties.start.type, + parentSchema: schema179.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate194.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema179.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate194.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema179.items.properties.end.type, + parentSchema: schema179.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate194.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema179.items.type, + parentSchema: schema179.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate194.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema179.type, + parentSchema: schema179, + data, + }, + ]; + return false; + } + } + validate194.errors = vErrors; + return errors === 0; +} +exports.validateGetDeviceAvailabilityResponse200Response = validate195; +const schema180 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'getDeviceAvailabilityResponse200Response', + 'x-location': + '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate195( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate195.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema180.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate195.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema180.items.properties.start.type, + parentSchema: schema180.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate195.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema180.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate195.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema180.items.properties.end.type, + parentSchema: schema180.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate195.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema180.items.type, + parentSchema: schema180.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate195.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema180.type, + parentSchema: schema180, + data, + }, + ]; + return false; + } + } + validate195.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesBodyRequest = validate196; +const schema181 = { + title: 'Availability Rules', + description: 'The availability rule to be applied.', + type: 'array', + items: { + title: 'Availability Rule', + type: 'object', + allOf: [ + { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + { + type: 'object', + properties: { + available: { type: 'boolean' }, + repeat: { + description: + 'If specified the time slot is repeated in a fixed offset specified by the frequency', + type: 'object', + properties: { + frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, + until: { + description: 'Up to this date-time the time slot will be repeated.', + type: 'string', + format: 'date-time', + }, + count: { + description: 'How often the time slot will be repeated', + type: 'integer', + }, + }, + required: ['frequency'], + }, + }, + }, + ], + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesBodyRequest', + 'x-location': + '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate196( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema181.items.type, + parentSchema: schema181.items, + data: data0, + }, + ]; + return false; + } + const _errs3 = errors; + if (errors === _errs3) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema181.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema181.items.allOf[0].properties.start.type, + parentSchema: schema181.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs5 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema181.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema181.items.allOf[0].properties.end.type, + parentSchema: schema181.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + } + } else { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema181.items.allOf[0].type, + parentSchema: schema181.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (valid1) { + const _errs9 = errors; + if (errors === _errs9) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.available !== undefined) { + let data3 = data0.available; + const _errs11 = errors; + if (typeof data3 !== 'boolean') { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/available', + schemaPath: '#/items/allOf/1/properties/available/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema181.items.allOf[1].properties.available.type, + parentSchema: schema181.items.allOf[1].properties.available, + data: data3, + }, + ]; + return false; + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data0.repeat !== undefined) { + let data4 = data0.repeat; + const _errs13 = errors; + if (errors === _errs13) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing0; + if (data4.frequency === undefined && (missing0 = 'frequency')) { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema181.items.allOf[1].properties.repeat.required, + parentSchema: schema181.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } else { + if (data4.frequency !== undefined) { + let data5 = data4.frequency; + const _errs15 = errors; + if (typeof data5 !== 'string') { + validate196.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema181.items.allOf[1].properties.repeat.properties + .frequency.type, + parentSchema: + schema181.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + if ( + !( + data5 === 'HOURLY' || + data5 === 'DAILY' || + data5 === 'WEEKLY' + ) + ) { + validate196.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/enum', + keyword: 'enum', + params: { + allowedValues: + schema181.items.allOf[1].properties.repeat.properties + .frequency.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema181.items.allOf[1].properties.repeat.properties + .frequency.enum, + parentSchema: + schema181.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.until !== undefined) { + let data6 = data4.until; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data6 === 'string') { + if (!formats22.validate(data6)) { + validate196.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema181.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } else { + validate196.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema181.items.allOf[1].properties.repeat + .properties.until.type, + parentSchema: + schema181.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs17 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.count !== undefined) { + let data7 = data4.count; + const _errs19 = errors; + if ( + !( + typeof data7 == 'number' && + !(data7 % 1) && + !isNaN(data7) && + isFinite(data7) + ) + ) { + validate196.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/count', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/count/type', + keyword: 'type', + params: { type: 'integer' }, + message: 'must be integer', + schema: + schema181.items.allOf[1].properties.repeat + .properties.count.type, + parentSchema: + schema181.items.allOf[1].properties.repeat + .properties.count, + data: data7, + }, + ]; + return false; + } + var valid4 = _errs19 === errors; + } else { + var valid4 = true; + } + } + } + } + } else { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema181.items.allOf[1].properties.repeat.type, + parentSchema: schema181.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs13 === errors; + } else { + var valid3 = true; + } + } + } else { + validate196.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema181.items.allOf[1].type, + parentSchema: schema181.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs9 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate196.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema181.type, + parentSchema: schema181, + data, + }, + ]; + return false; + } + } + validate196.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesBodyResponse = validate197; +const schema182 = { + title: 'Availability Rules', + description: 'The availability rule to be applied.', + type: 'array', + items: { + title: 'Availability Rule', + type: 'object', + allOf: [ + { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + { + type: 'object', + properties: { + available: { type: 'boolean' }, + repeat: { + description: + 'If specified the time slot is repeated in a fixed offset specified by the frequency', + type: 'object', + properties: { + frequency: { type: 'string', enum: ['HOURLY', 'DAILY', 'WEEKLY'] }, + until: { + description: 'Up to this date-time the time slot will be repeated.', + type: 'string', + format: 'date-time', + }, + count: { + description: 'How often the time slot will be repeated', + type: 'integer', + }, + }, + required: ['frequency'], + }, + }, + }, + ], + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesBodyResponse', + 'x-location': + '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate197( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema182.items.type, + parentSchema: schema182.items, + data: data0, + }, + ]; + return false; + } + const _errs3 = errors; + if (errors === _errs3) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema182.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/allOf/0/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema182.items.allOf[0].properties.start.type, + parentSchema: schema182.items.allOf[0].properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs5 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs7 = errors; + if (errors === _errs7) { + if (errors === _errs7) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema182.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/allOf/0/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema182.items.allOf[0].properties.end.type, + parentSchema: schema182.items.allOf[0].properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + } + } else { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema182.items.allOf[0].type, + parentSchema: schema182.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs3 === errors; + if (valid1) { + const _errs9 = errors; + if (errors === _errs9) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.available !== undefined) { + let data3 = data0.available; + const _errs11 = errors; + if (typeof data3 !== 'boolean') { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/available', + schemaPath: '#/items/allOf/1/properties/available/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema182.items.allOf[1].properties.available.type, + parentSchema: schema182.items.allOf[1].properties.available, + data: data3, + }, + ]; + return false; + } + var valid3 = _errs11 === errors; + } else { + var valid3 = true; + } + if (valid3) { + if (data0.repeat !== undefined) { + let data4 = data0.repeat; + const _errs13 = errors; + if (errors === _errs13) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing0; + if (data4.frequency === undefined && (missing0 = 'frequency')) { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema182.items.allOf[1].properties.repeat.required, + parentSchema: schema182.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } else { + if (data4.frequency !== undefined) { + let data5 = data4.frequency; + const _errs15 = errors; + if (typeof data5 !== 'string') { + validate197.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema182.items.allOf[1].properties.repeat.properties + .frequency.type, + parentSchema: + schema182.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + if ( + !( + data5 === 'HOURLY' || + data5 === 'DAILY' || + data5 === 'WEEKLY' + ) + ) { + validate197.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/frequency', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/frequency/enum', + keyword: 'enum', + params: { + allowedValues: + schema182.items.allOf[1].properties.repeat.properties + .frequency.enum, + }, + message: 'must be equal to one of the allowed values', + schema: + schema182.items.allOf[1].properties.repeat.properties + .frequency.enum, + parentSchema: + schema182.items.allOf[1].properties.repeat.properties + .frequency, + data: data5, + }, + ]; + return false; + } + var valid4 = _errs15 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.until !== undefined) { + let data6 = data4.until; + const _errs17 = errors; + if (errors === _errs17) { + if (errors === _errs17) { + if (typeof data6 === 'string') { + if (!formats22.validate(data6)) { + validate197.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/format', + keyword: 'format', + params: { format: 'date-time' }, + message: + 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: + schema182.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } else { + validate197.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/until', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/until/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema182.items.allOf[1].properties.repeat + .properties.until.type, + parentSchema: + schema182.items.allOf[1].properties.repeat + .properties.until, + data: data6, + }, + ]; + return false; + } + } + } + var valid4 = _errs17 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.count !== undefined) { + let data7 = data4.count; + const _errs19 = errors; + if ( + !( + typeof data7 == 'number' && + !(data7 % 1) && + !isNaN(data7) && + isFinite(data7) + ) + ) { + validate197.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/repeat/count', + schemaPath: + '#/items/allOf/1/properties/repeat/properties/count/type', + keyword: 'type', + params: { type: 'integer' }, + message: 'must be integer', + schema: + schema182.items.allOf[1].properties.repeat + .properties.count.type, + parentSchema: + schema182.items.allOf[1].properties.repeat + .properties.count, + data: data7, + }, + ]; + return false; + } + var valid4 = _errs19 === errors; + } else { + var valid4 = true; + } + } + } + } + } else { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0 + '/repeat', + schemaPath: '#/items/allOf/1/properties/repeat/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema182.items.allOf[1].properties.repeat.type, + parentSchema: schema182.items.allOf[1].properties.repeat, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs13 === errors; + } else { + var valid3 = true; + } + } + } else { + validate197.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema182.items.allOf[1].type, + parentSchema: schema182.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs9 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate197.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema182.type, + parentSchema: schema182, + data, + }, + ]; + return false; + } + } + validate197.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesResponse200Request = validate198; +const schema183 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesResponse200Request', + 'x-location': + '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate198( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate198.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema183.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate198.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema183.items.properties.start.type, + parentSchema: schema183.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate198.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema183.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate198.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema183.items.properties.end.type, + parentSchema: schema183.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate198.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema183.items.type, + parentSchema: schema183.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate198.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema183.type, + parentSchema: schema183, + data, + }, + ]; + return false; + } + } + validate198.errors = vErrors; + return errors === 0; +} +exports.validateAddDeviceAvailabilityRulesResponse200Response = validate199; +const schema184 = { + title: 'Availability', + description: + 'A list of time slots that the maintainer of the device announced it is available\n', + type: 'array', + items: { + title: 'Time Slot', + type: 'object', + properties: { + start: { type: 'string', format: 'date-time' }, + end: { type: 'string', format: 'date-time' }, + }, + }, + 'x-standalone': false, + 'x-name': 'addDeviceAvailabilityRulesResponse200Response', + 'x-location': + '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate199( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + if (errors === _errs1) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + if (data0.start !== undefined) { + let data1 = data0.start; + const _errs3 = errors; + if (errors === _errs3) { + if (errors === _errs3) { + if (typeof data1 === 'string') { + if (!formats22.validate(data1)) { + validate199.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema184.items.properties.start, + data: data1, + }, + ]; + return false; + } + } else { + validate199.errors = [ + { + instancePath: instancePath + '/' + i0 + '/start', + schemaPath: '#/items/properties/start/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema184.items.properties.start.type, + parentSchema: schema184.items.properties.start, + data: data1, + }, + ]; + return false; + } + } + } + var valid1 = _errs3 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data0.end !== undefined) { + let data2 = data0.end; + const _errs5 = errors; + if (errors === _errs5) { + if (errors === _errs5) { + if (typeof data2 === 'string') { + if (!formats22.validate(data2)) { + validate199.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/format', + keyword: 'format', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', + parentSchema: schema184.items.properties.end, + data: data2, + }, + ]; + return false; + } + } else { + validate199.errors = [ + { + instancePath: instancePath + '/' + i0 + '/end', + schemaPath: '#/items/properties/end/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema184.items.properties.end.type, + parentSchema: schema184.items.properties.end, + data: data2, + }, + ]; + return false; + } + } + } + var valid1 = _errs5 === errors; + } else { + var valid1 = true; + } + } + } else { + validate199.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema184.items.type, + parentSchema: schema184.items, + data: data0, + }, + ]; + return false; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate199.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema184.type, + parentSchema: schema184, + data, + }, + ]; + return false; + } + } + validate199.errors = vErrors; + return errors === 0; +} +exports.validateCreateWebsocketTokenResponse200Request = validate200; +const schema185 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'createWebsocketTokenResponse200Request', + 'x-location': + '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate200( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate200.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema185.type, + parentSchema: schema185, + data, + }, + ]; + return false; + } + validate200.errors = vErrors; + return errors === 0; +} +exports.validateCreateWebsocketTokenResponse200Response = validate201; +const schema186 = { + type: 'string', + 'x-standalone': false, + 'x-name': 'createWebsocketTokenResponse200Response', + 'x-location': + '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate201( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'string') { + validate201.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema186.type, + parentSchema: schema186, + data, + }, + ]; + return false; + } + validate201.errors = vErrors; + return errors === 0; +} +exports.validateSendSignalingMessageBodyRequest = validate202; +const schema187 = { + title: 'Sig Message', + anyOf: [ + { + title: 'Create Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'createPeerconnection' }, + connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, + connectionUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + type: 'object', + required: ['serviceType', 'serviceId', 'remoteServiceId'], + title: 'Service Config', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + additionalProperties: true, + }, + }, + tiebreaker: { type: 'boolean' }, + config: { type: 'object', additionalProperties: true }, + }, + required: [ + 'command', + 'connectionType', + 'connectionUrl', + 'services', + 'tiebreaker', + ], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Close Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'closePeerconnection' }, + connectionUrl: { type: 'string', format: 'uri' }, + }, + required: ['command', 'connectionUrl'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Signaling Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'signaling' }, + signalingType: { type: 'string' }, + connectionUrl: { type: 'string', format: 'uri' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'signalingType', 'connectionUrl', 'content'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Configuration Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'configuration' }, + configuration: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'configuration'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Experiment Status Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'experiment-status-changed' }, + status: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['messageType', 'status'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-standalone': false, + 'x-name': 'sendSignalingMessageBodyRequest', + 'x-location': + '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate202( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + const _errs3 = errors; + if (errors === _errs3) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema187.anyOf[0].allOf[0].allOf[0].required, + parentSchema: schema187.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[0].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema187.anyOf[0].allOf[0].allOf[0].properties.messageType, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } + } else { + const err2 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[0].allOf[0].allOf[0].type, + parentSchema: schema187.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var valid2 = _errs3 === errors; + if (valid2) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + const err3 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema187.anyOf[0].allOf[0].allOf[1].required, + parentSchema: schema187.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs10 = errors; + if ('command' !== data1) { + const err4 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema187.anyOf[0].allOf[0].allOf[1].properties.messageType, + data: data1, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs11 = errors; + if (typeof data2 !== 'string') { + const err5 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[0].allOf[0].allOf[1].properties.command.type, + parentSchema: schema187.anyOf[0].allOf[0].allOf[1].properties.command, + data: data2, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid4 = _errs11 === errors; + } else { + var valid4 = true; + } + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[0].allOf[0].allOf[1].type, + parentSchema: schema187.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var valid2 = _errs8 === errors; + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs13 = errors; + if (errors === _errs13) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionType === undefined && (missing2 = 'connectionType')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || + (data.services === undefined && (missing2 = 'services')) || + (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) + ) { + const err7 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema187.anyOf[0].allOf[1].required, + parentSchema: schema187.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs15 = errors; + if ('createPeerconnection' !== data3) { + const err8 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'createPeerconnection' }, + message: 'must be equal to constant', + schema: 'createPeerconnection', + parentSchema: schema187.anyOf[0].allOf[1].properties.command, + data: data3, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + var valid5 = _errs15 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionType !== undefined) { + let data4 = data.connectionType; + const _errs16 = errors; + if (typeof data4 !== 'string') { + const err9 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[0].allOf[1].properties.connectionType.type, + parentSchema: schema187.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { + const err10 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/enum', + keyword: 'enum', + params: { + allowedValues: + schema187.anyOf[0].allOf[1].properties.connectionType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema187.anyOf[0].allOf[1].properties.connectionType.enum, + parentSchema: schema187.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + var valid5 = _errs16 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionUrl !== undefined) { + let data5 = data.connectionUrl; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + const err11 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema187.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } else { + const err12 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[0].allOf[1].properties.connectionUrl.type, + parentSchema: + schema187.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + } + var valid5 = _errs18 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.services !== undefined) { + let data6 = data.services; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data6)) { + var valid6 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing3; + if ( + (data7.serviceType === undefined && + (missing3 = 'serviceType')) || + (data7.serviceId === undefined && + (missing3 = 'serviceId')) || + (data7.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + const err13 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema187.anyOf[0].allOf[1].properties.services.items + .required, + parentSchema: + schema187.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data7.serviceType !== undefined) { + let data8 = data7.serviceType; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + const err14 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema187.anyOf[0].allOf[1].properties + .services.items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.serviceId !== undefined) { + let data9 = data7.serviceId; + const _errs27 = errors; + if (typeof data9 !== 'string') { + const err16 = { + instancePath: + instancePath + '/services/' + i0 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.serviceId, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.remoteServiceId !== undefined) { + let data10 = data7.remoteServiceId; + const _errs29 = errors; + if (typeof data10 !== 'string') { + const err17 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId.type, + parentSchema: + schema187.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + const err18 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema187.anyOf[0].allOf[1].properties.services.items + .type, + parentSchema: + schema187.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid6 = _errs22 === errors; + if (!valid6) { + break; + } + } + } else { + const err19 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema187.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema187.anyOf[0].allOf[1].properties.services, + data: data6, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + var valid5 = _errs20 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.tiebreaker !== undefined) { + let data11 = data.tiebreaker; + const _errs31 = errors; + if (typeof data11 !== 'boolean') { + const err20 = { + instancePath: instancePath + '/tiebreaker', + schemaPath: '#/anyOf/0/allOf/1/properties/tiebreaker/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema187.anyOf[0].allOf[1].properties.tiebreaker.type, + parentSchema: schema187.anyOf[0].allOf[1].properties.tiebreaker, + data: data11, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + var valid5 = _errs31 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.config !== undefined) { + let data12 = data.config; + const _errs33 = errors; + if (errors === _errs33) { + if ( + data12 && + typeof data12 == 'object' && + !Array.isArray(data12) + ) { + } else { + const err21 = { + instancePath: instancePath + '/config', + schemaPath: '#/anyOf/0/allOf/1/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[0].allOf[1].properties.config.type, + parentSchema: schema187.anyOf[0].allOf[1].properties.config, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + var valid5 = _errs33 === errors; + } else { + var valid5 = true; + } + } + } + } + } + } + } + } else { + const err22 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[0].allOf[1].type, + parentSchema: schema187.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } + var valid1 = _errs13 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs36 = errors; + const _errs37 = errors; + const _errs38 = errors; + if (errors === _errs38) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing4; + if (data.messageType === undefined && (missing4 = 'messageType')) { + const err23 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: schema187.anyOf[1].allOf[0].allOf[0].required, + parentSchema: schema187.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data13 = data.messageType; + if (typeof data13 !== 'string') { + const err24 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[1].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema187.anyOf[1].allOf[0].allOf[0].properties.messageType, + data: data13, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + } + } + } else { + const err25 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[1].allOf[0].allOf[0].type, + parentSchema: schema187.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid9 = _errs38 === errors; + if (valid9) { + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing5; + if ( + (data.messageType === undefined && (missing5 = 'messageType')) || + (data.command === undefined && (missing5 = 'command')) + ) { + const err26 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: "must have required property '" + missing5 + "'", + schema: schema187.anyOf[1].allOf[0].allOf[1].required, + parentSchema: schema187.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data14 = data.messageType; + const _errs45 = errors; + if ('command' !== data14) { + const err27 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: + schema187.anyOf[1].allOf[0].allOf[1].properties.messageType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.command !== undefined) { + let data15 = data.command; + const _errs46 = errors; + if (typeof data15 !== 'string') { + const err28 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[1].allOf[0].allOf[1].properties.command.type, + parentSchema: schema187.anyOf[1].allOf[0].allOf[1].properties.command, + data: data15, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + var valid11 = _errs46 === errors; + } else { + var valid11 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[1].allOf[0].allOf[1].type, + parentSchema: schema187.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid9 = _errs43 === errors; + } + var valid8 = _errs37 === errors; + if (valid8) { + const _errs48 = errors; + if (errors === _errs48) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.command === undefined && (missing6 = 'command')) || + (data.connectionUrl === undefined && (missing6 = 'connectionUrl')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema187.anyOf[1].allOf[1].required, + parentSchema: schema187.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.command !== undefined) { + let data16 = data.command; + const _errs50 = errors; + if ('closePeerconnection' !== data16) { + const err31 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'closePeerconnection' }, + message: 'must be equal to constant', + schema: 'closePeerconnection', + parentSchema: schema187.anyOf[1].allOf[1].properties.command, + data: data16, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + var valid12 = _errs50 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data.connectionUrl !== undefined) { + let data17 = data.connectionUrl; + const _errs51 = errors; + if (errors === _errs51) { + if (errors === _errs51) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + const err32 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema187.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } else { + const err33 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[1].allOf[1].properties.connectionUrl.type, + parentSchema: + schema187.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + } + } + var valid12 = _errs51 === errors; + } else { + var valid12 = true; + } + } + } + } else { + const err34 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[1].allOf[1].type, + parentSchema: schema187.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + } + var valid8 = _errs48 === errors; + } + var _valid0 = _errs36 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs53 = errors; + const _errs54 = errors; + if (errors === _errs54) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing7; + if (data.messageType === undefined && (missing7 = 'messageType')) { + const err35 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: "must have required property '" + missing7 + "'", + schema: schema187.anyOf[2].allOf[0].required, + parentSchema: schema187.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data18 = data.messageType; + if (typeof data18 !== 'string') { + const err36 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[2].allOf[0].properties.messageType.type, + parentSchema: schema187.anyOf[2].allOf[0].properties.messageType, + data: data18, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } else { + const err37 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[2].allOf[0].type, + parentSchema: schema187.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid13 = _errs54 === errors; + if (valid13) { + const _errs59 = errors; + if (errors === _errs59) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing8; + if ( + (data.messageType === undefined && (missing8 = 'messageType')) || + (data.signalingType === undefined && (missing8 = 'signalingType')) || + (data.connectionUrl === undefined && (missing8 = 'connectionUrl')) || + (data.content === undefined && (missing8 = 'content')) + ) { + const err38 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: "must have required property '" + missing8 + "'", + schema: schema187.anyOf[2].allOf[1].required, + parentSchema: schema187.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data19 = data.messageType; + const _errs61 = errors; + if ('signaling' !== data19) { + const err39 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'signaling' }, + message: 'must be equal to constant', + schema: 'signaling', + parentSchema: schema187.anyOf[2].allOf[1].properties.messageType, + data: data19, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + var valid15 = _errs61 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.signalingType !== undefined) { + let data20 = data.signalingType; + const _errs62 = errors; + if (typeof data20 !== 'string') { + const err40 = { + instancePath: instancePath + '/signalingType', + schemaPath: '#/anyOf/2/allOf/1/properties/signalingType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[2].allOf[1].properties.signalingType.type, + parentSchema: schema187.anyOf[2].allOf[1].properties.signalingType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + var valid15 = _errs62 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.connectionUrl !== undefined) { + let data21 = data.connectionUrl; + const _errs64 = errors; + if (errors === _errs64) { + if (errors === _errs64) { + if (typeof data21 === 'string') { + if (!formats0(data21)) { + const err41 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: + '#/anyOf/2/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema187.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } else { + const err42 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema187.anyOf[2].allOf[1].properties.connectionUrl.type, + parentSchema: + schema187.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + } + var valid15 = _errs64 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.content !== undefined) { + let data22 = data.content; + const _errs66 = errors; + if (errors === _errs66) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + } else { + const err43 = { + instancePath: instancePath + '/content', + schemaPath: '#/anyOf/2/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[2].allOf[1].properties.content.type, + parentSchema: schema187.anyOf[2].allOf[1].properties.content, + data: data22, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid15 = _errs66 === errors; + } else { + var valid15 = true; + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[2].allOf[1].type, + parentSchema: schema187.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid13 = _errs59 === errors; + } + var _valid0 = _errs53 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs69 = errors; + const _errs70 = errors; + if (errors === _errs70) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.messageType === undefined && (missing9 = 'messageType')) { + const err45 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema187.anyOf[3].allOf[0].required, + parentSchema: schema187.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data23 = data.messageType; + if (typeof data23 !== 'string') { + const err46 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[3].allOf[0].properties.messageType.type, + parentSchema: schema187.anyOf[3].allOf[0].properties.messageType, + data: data23, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + } + } else { + const err47 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[3].allOf[0].type, + parentSchema: schema187.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid16 = _errs70 === errors; + if (valid16) { + const _errs75 = errors; + if (errors === _errs75) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing10; + if ( + (data.messageType === undefined && (missing10 = 'messageType')) || + (data.configuration === undefined && (missing10 = 'configuration')) + ) { + const err48 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: "must have required property '" + missing10 + "'", + schema: schema187.anyOf[3].allOf[1].required, + parentSchema: schema187.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data24 = data.messageType; + const _errs77 = errors; + if ('configuration' !== data24) { + const err49 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'configuration' }, + message: 'must be equal to constant', + schema: 'configuration', + parentSchema: schema187.anyOf[3].allOf[1].properties.messageType, + data: data24, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data.configuration !== undefined) { + let data25 = data.configuration; + const _errs78 = errors; + if (errors === _errs78) { + if (data25 && typeof data25 == 'object' && !Array.isArray(data25)) { + } else { + const err50 = { + instancePath: instancePath + '/configuration', + schemaPath: '#/anyOf/3/allOf/1/properties/configuration/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema187.anyOf[3].allOf[1].properties.configuration.type, + parentSchema: + schema187.anyOf[3].allOf[1].properties.configuration, + data: data25, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err51 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[3].allOf[1].type, + parentSchema: schema187.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } + var valid16 = _errs75 === errors; + } + var _valid0 = _errs69 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs81 = errors; + const _errs82 = errors; + if (errors === _errs82) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing11; + if (data.messageType === undefined && (missing11 = 'messageType')) { + const err52 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: "must have required property '" + missing11 + "'", + schema: schema187.anyOf[4].allOf[0].required, + parentSchema: schema187.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data26 = data.messageType; + if (typeof data26 !== 'string') { + const err53 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[4].allOf[0].properties.messageType.type, + parentSchema: schema187.anyOf[4].allOf[0].properties.messageType, + data: data26, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + } + } else { + const err54 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[4].allOf[0].type, + parentSchema: schema187.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid19 = _errs82 === errors; + if (valid19) { + const _errs87 = errors; + if (errors === _errs87) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if ( + (data.messageType === undefined && (missing12 = 'messageType')) || + (data.status === undefined && (missing12 = 'status')) + ) { + const err55 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema187.anyOf[4].allOf[1].required, + parentSchema: schema187.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data27 = data.messageType; + const _errs89 = errors; + if ('experiment-status-changed' !== data27) { + const err56 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'experiment-status-changed' }, + message: 'must be equal to constant', + schema: 'experiment-status-changed', + parentSchema: schema187.anyOf[4].allOf[1].properties.messageType, + data: data27, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + var valid21 = _errs89 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.status !== undefined) { + let data28 = data.status; + const _errs90 = errors; + if (typeof data28 !== 'string') { + const err57 = { + instancePath: instancePath + '/status', + schemaPath: '#/anyOf/4/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[4].allOf[1].properties.status.type, + parentSchema: schema187.anyOf[4].allOf[1].properties.status, + data: data28, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid21 = _errs90 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.message !== undefined) { + let data29 = data.message; + const _errs92 = errors; + if (typeof data29 !== 'string') { + const err58 = { + instancePath: instancePath + '/message', + schemaPath: '#/anyOf/4/allOf/1/properties/message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema187.anyOf[4].allOf[1].properties.message.type, + parentSchema: schema187.anyOf[4].allOf[1].properties.message, + data: data29, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid21 = _errs92 === errors; + } else { + var valid21 = true; + } + } + } + } + } else { + const err59 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema187.anyOf[4].allOf[1].type, + parentSchema: schema187.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } + var valid19 = _errs87 === errors; + } + var _valid0 = _errs81 === errors; + valid0 = valid0 || _valid0; + } + } + } + } + if (!valid0) { + const err60 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema187.anyOf, + parentSchema: schema187, + data, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + validate202.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate202.errors = vErrors; + return errors === 0; +} +exports.validateSendSignalingMessageBodyResponse = validate203; +const schema188 = { + title: 'Sig Message', + anyOf: [ + { + title: 'Create Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'createPeerconnection' }, + connectionType: { type: 'string', enum: ['webrtc', 'websocket', 'local'] }, + connectionUrl: { type: 'string', format: 'uri' }, + services: { + type: 'array', + items: { + type: 'object', + required: ['serviceType', 'serviceId', 'remoteServiceId'], + title: 'Service Config', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + additionalProperties: true, + }, + }, + tiebreaker: { type: 'boolean' }, + config: { type: 'object', additionalProperties: true }, + }, + required: [ + 'command', + 'connectionType', + 'connectionUrl', + 'services', + 'tiebreaker', + ], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Close Peerconnection Message', + allOf: [ + { + title: 'Command Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'command' }, + command: { type: 'string' }, + }, + required: ['messageType', 'command'], + }, + ], + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + command: { const: 'closePeerconnection' }, + connectionUrl: { type: 'string', format: 'uri' }, + }, + required: ['command', 'connectionUrl'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Signaling Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'signaling' }, + signalingType: { type: 'string' }, + connectionUrl: { type: 'string', format: 'uri' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'signalingType', 'connectionUrl', 'content'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Configuration Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'configuration' }, + configuration: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'configuration'], + }, + ], + 'x-typeguard': true, + }, + { + title: 'Experiment Status Changed Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'experiment-status-changed' }, + status: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['messageType', 'status'], + }, + ], + 'x-typeguard': true, + }, + ], + 'x-standalone': false, + 'x-name': 'sendSignalingMessageBodyResponse', + 'x-location': + '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate203( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs2 = errors; + const _errs3 = errors; + if (errors === _errs3) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + const err0 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema188.anyOf[0].allOf[0].allOf[0].required, + parentSchema: schema188.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + const err1 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[0].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema188.anyOf[0].allOf[0].allOf[0].properties.messageType, + data: data0, + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } + } else { + const err2 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[0].allOf[0].allOf[0].type, + parentSchema: schema188.anyOf[0].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var valid2 = _errs3 === errors; + if (valid2) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.command === undefined && (missing1 = 'command')) + ) { + const err3 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema188.anyOf[0].allOf[0].allOf[1].required, + parentSchema: schema188.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs10 = errors; + if ('command' !== data1) { + const err4 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: schema188.anyOf[0].allOf[0].allOf[1].properties.messageType, + data: data1, + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data.command !== undefined) { + let data2 = data.command; + const _errs11 = errors; + if (typeof data2 !== 'string') { + const err5 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[0].allOf[0].allOf[1].properties.command.type, + parentSchema: schema188.anyOf[0].allOf[0].allOf[1].properties.command, + data: data2, + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var valid4 = _errs11 === errors; + } else { + var valid4 = true; + } + } + } + } else { + const err6 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[0].allOf[0].allOf[1].type, + parentSchema: schema188.anyOf[0].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } + } + var valid2 = _errs8 === errors; + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs13 = errors; + if (errors === _errs13) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing2; + if ( + (data.command === undefined && (missing2 = 'command')) || + (data.connectionType === undefined && (missing2 = 'connectionType')) || + (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) || + (data.services === undefined && (missing2 = 'services')) || + (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) + ) { + const err7 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: schema188.anyOf[0].allOf[1].required, + parentSchema: schema188.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } else { + if (data.command !== undefined) { + let data3 = data.command; + const _errs15 = errors; + if ('createPeerconnection' !== data3) { + const err8 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/0/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'createPeerconnection' }, + message: 'must be equal to constant', + schema: 'createPeerconnection', + parentSchema: schema188.anyOf[0].allOf[1].properties.command, + data: data3, + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } + var valid5 = _errs15 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionType !== undefined) { + let data4 = data.connectionType; + const _errs16 = errors; + if (typeof data4 !== 'string') { + const err9 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[0].allOf[1].properties.connectionType.type, + parentSchema: schema188.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } + if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { + const err10 = { + instancePath: instancePath + '/connectionType', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionType/enum', + keyword: 'enum', + params: { + allowedValues: + schema188.anyOf[0].allOf[1].properties.connectionType.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema188.anyOf[0].allOf[1].properties.connectionType.enum, + parentSchema: schema188.anyOf[0].allOf[1].properties.connectionType, + data: data4, + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + var valid5 = _errs16 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.connectionUrl !== undefined) { + let data5 = data.connectionUrl; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + const err11 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema188.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } else { + const err12 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/0/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[0].allOf[1].properties.connectionUrl.type, + parentSchema: + schema188.anyOf[0].allOf[1].properties.connectionUrl, + data: data5, + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + } + } + } + var valid5 = _errs18 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.services !== undefined) { + let data6 = data.services; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data6)) { + var valid6 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs22 = errors; + if (errors === _errs22) { + if ( + data7 && + typeof data7 == 'object' && + !Array.isArray(data7) + ) { + let missing3; + if ( + (data7.serviceType === undefined && + (missing3 = 'serviceType')) || + (data7.serviceId === undefined && + (missing3 = 'serviceId')) || + (data7.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + const err13 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/required', + keyword: 'required', + params: { missingProperty: missing3 }, + message: "must have required property '" + missing3 + "'", + schema: + schema188.anyOf[0].allOf[1].properties.services.items + .required, + parentSchema: + schema188.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } else { + if (data7.serviceType !== undefined) { + let data8 = data7.serviceType; + const _errs25 = errors; + if (errors === _errs25) { + if (errors === _errs25) { + if (typeof data8 === 'string') { + if (!formats0(data8)) { + const err14 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema188.anyOf[0].allOf[1].properties + .services.items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + } + } else { + const err15 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/serviceType', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.serviceType.type, + parentSchema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.serviceType, + data: data8, + }; + if (vErrors === null) { + vErrors = [err15]; + } else { + vErrors.push(err15); + } + errors++; + } + } + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.serviceId !== undefined) { + let data9 = data7.serviceId; + const _errs27 = errors; + if (typeof data9 !== 'string') { + const err16 = { + instancePath: + instancePath + '/services/' + i0 + '/serviceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.serviceId.type, + parentSchema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.serviceId, + data: data9, + }; + if (vErrors === null) { + vErrors = [err16]; + } else { + vErrors.push(err16); + } + errors++; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data7.remoteServiceId !== undefined) { + let data10 = data7.remoteServiceId; + const _errs29 = errors; + if (typeof data10 !== 'string') { + const err17 = { + instancePath: + instancePath + + '/services/' + + i0 + + '/remoteServiceId', + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId.type, + parentSchema: + schema188.anyOf[0].allOf[1].properties.services + .items.properties.remoteServiceId, + data: data10, + }; + if (vErrors === null) { + vErrors = [err17]; + } else { + vErrors.push(err17); + } + errors++; + } + var valid7 = _errs29 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + const err18 = { + instancePath: instancePath + '/services/' + i0, + schemaPath: + '#/anyOf/0/allOf/1/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema188.anyOf[0].allOf[1].properties.services.items + .type, + parentSchema: + schema188.anyOf[0].allOf[1].properties.services.items, + data: data7, + }; + if (vErrors === null) { + vErrors = [err18]; + } else { + vErrors.push(err18); + } + errors++; + } + } + var valid6 = _errs22 === errors; + if (!valid6) { + break; + } + } + } else { + const err19 = { + instancePath: instancePath + '/services', + schemaPath: '#/anyOf/0/allOf/1/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema188.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema188.anyOf[0].allOf[1].properties.services, + data: data6, + }; + if (vErrors === null) { + vErrors = [err19]; + } else { + vErrors.push(err19); + } + errors++; + } + } + var valid5 = _errs20 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.tiebreaker !== undefined) { + let data11 = data.tiebreaker; + const _errs31 = errors; + if (typeof data11 !== 'boolean') { + const err20 = { + instancePath: instancePath + '/tiebreaker', + schemaPath: '#/anyOf/0/allOf/1/properties/tiebreaker/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema188.anyOf[0].allOf[1].properties.tiebreaker.type, + parentSchema: schema188.anyOf[0].allOf[1].properties.tiebreaker, + data: data11, + }; + if (vErrors === null) { + vErrors = [err20]; + } else { + vErrors.push(err20); + } + errors++; + } + var valid5 = _errs31 === errors; + } else { + var valid5 = true; + } + if (valid5) { + if (data.config !== undefined) { + let data12 = data.config; + const _errs33 = errors; + if (errors === _errs33) { + if ( + data12 && + typeof data12 == 'object' && + !Array.isArray(data12) + ) { + } else { + const err21 = { + instancePath: instancePath + '/config', + schemaPath: '#/anyOf/0/allOf/1/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[0].allOf[1].properties.config.type, + parentSchema: schema188.anyOf[0].allOf[1].properties.config, + data: data12, + }; + if (vErrors === null) { + vErrors = [err21]; + } else { + vErrors.push(err21); + } + errors++; + } + } + var valid5 = _errs33 === errors; + } else { + var valid5 = true; + } + } + } + } + } + } + } + } else { + const err22 = { + instancePath, + schemaPath: '#/anyOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[0].allOf[1].type, + parentSchema: schema188.anyOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err22]; + } else { + vErrors.push(err22); + } + errors++; + } + } + var valid1 = _errs13 === errors; + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs36 = errors; + const _errs37 = errors; + const _errs38 = errors; + if (errors === _errs38) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing4; + if (data.messageType === undefined && (missing4 = 'messageType')) { + const err23 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing4 }, + message: "must have required property '" + missing4 + "'", + schema: schema188.anyOf[1].allOf[0].allOf[0].required, + parentSchema: schema188.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err23]; + } else { + vErrors.push(err23); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data13 = data.messageType; + if (typeof data13 !== 'string') { + const err24 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[1].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema188.anyOf[1].allOf[0].allOf[0].properties.messageType, + data: data13, + }; + if (vErrors === null) { + vErrors = [err24]; + } else { + vErrors.push(err24); + } + errors++; + } + } + } + } else { + const err25 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[1].allOf[0].allOf[0].type, + parentSchema: schema188.anyOf[1].allOf[0].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err25]; + } else { + vErrors.push(err25); + } + errors++; + } + } + var valid9 = _errs38 === errors; + if (valid9) { + const _errs43 = errors; + if (errors === _errs43) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing5; + if ( + (data.messageType === undefined && (missing5 = 'messageType')) || + (data.command === undefined && (missing5 = 'command')) + ) { + const err26 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing5 }, + message: "must have required property '" + missing5 + "'", + schema: schema188.anyOf[1].allOf[0].allOf[1].required, + parentSchema: schema188.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err26]; + } else { + vErrors.push(err26); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data14 = data.messageType; + const _errs45 = errors; + if ('command' !== data14) { + const err27 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'command' }, + message: 'must be equal to constant', + schema: 'command', + parentSchema: + schema188.anyOf[1].allOf[0].allOf[1].properties.messageType, + data: data14, + }; + if (vErrors === null) { + vErrors = [err27]; + } else { + vErrors.push(err27); + } + errors++; + } + var valid11 = _errs45 === errors; + } else { + var valid11 = true; + } + if (valid11) { + if (data.command !== undefined) { + let data15 = data.command; + const _errs46 = errors; + if (typeof data15 !== 'string') { + const err28 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/0/allOf/1/properties/command/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[1].allOf[0].allOf[1].properties.command.type, + parentSchema: schema188.anyOf[1].allOf[0].allOf[1].properties.command, + data: data15, + }; + if (vErrors === null) { + vErrors = [err28]; + } else { + vErrors.push(err28); + } + errors++; + } + var valid11 = _errs46 === errors; + } else { + var valid11 = true; + } + } + } + } else { + const err29 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/0/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[1].allOf[0].allOf[1].type, + parentSchema: schema188.anyOf[1].allOf[0].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err29]; + } else { + vErrors.push(err29); + } + errors++; + } + } + var valid9 = _errs43 === errors; + } + var valid8 = _errs37 === errors; + if (valid8) { + const _errs48 = errors; + if (errors === _errs48) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing6; + if ( + (data.command === undefined && (missing6 = 'command')) || + (data.connectionUrl === undefined && (missing6 = 'connectionUrl')) + ) { + const err30 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing6 }, + message: "must have required property '" + missing6 + "'", + schema: schema188.anyOf[1].allOf[1].required, + parentSchema: schema188.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err30]; + } else { + vErrors.push(err30); + } + errors++; + } else { + if (data.command !== undefined) { + let data16 = data.command; + const _errs50 = errors; + if ('closePeerconnection' !== data16) { + const err31 = { + instancePath: instancePath + '/command', + schemaPath: '#/anyOf/1/allOf/1/properties/command/const', + keyword: 'const', + params: { allowedValue: 'closePeerconnection' }, + message: 'must be equal to constant', + schema: 'closePeerconnection', + parentSchema: schema188.anyOf[1].allOf[1].properties.command, + data: data16, + }; + if (vErrors === null) { + vErrors = [err31]; + } else { + vErrors.push(err31); + } + errors++; + } + var valid12 = _errs50 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if (data.connectionUrl !== undefined) { + let data17 = data.connectionUrl; + const _errs51 = errors; + if (errors === _errs51) { + if (errors === _errs51) { + if (typeof data17 === 'string') { + if (!formats0(data17)) { + const err32 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema188.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err32]; + } else { + vErrors.push(err32); + } + errors++; + } + } else { + const err33 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/1/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[1].allOf[1].properties.connectionUrl.type, + parentSchema: + schema188.anyOf[1].allOf[1].properties.connectionUrl, + data: data17, + }; + if (vErrors === null) { + vErrors = [err33]; + } else { + vErrors.push(err33); + } + errors++; + } + } + } + var valid12 = _errs51 === errors; + } else { + var valid12 = true; + } + } + } + } else { + const err34 = { + instancePath, + schemaPath: '#/anyOf/1/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[1].allOf[1].type, + parentSchema: schema188.anyOf[1].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err34]; + } else { + vErrors.push(err34); + } + errors++; + } + } + var valid8 = _errs48 === errors; + } + var _valid0 = _errs36 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs53 = errors; + const _errs54 = errors; + if (errors === _errs54) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing7; + if (data.messageType === undefined && (missing7 = 'messageType')) { + const err35 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing7 }, + message: "must have required property '" + missing7 + "'", + schema: schema188.anyOf[2].allOf[0].required, + parentSchema: schema188.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err35]; + } else { + vErrors.push(err35); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data18 = data.messageType; + if (typeof data18 !== 'string') { + const err36 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[2].allOf[0].properties.messageType.type, + parentSchema: schema188.anyOf[2].allOf[0].properties.messageType, + data: data18, + }; + if (vErrors === null) { + vErrors = [err36]; + } else { + vErrors.push(err36); + } + errors++; + } + } + } + } else { + const err37 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[2].allOf[0].type, + parentSchema: schema188.anyOf[2].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err37]; + } else { + vErrors.push(err37); + } + errors++; + } + } + var valid13 = _errs54 === errors; + if (valid13) { + const _errs59 = errors; + if (errors === _errs59) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing8; + if ( + (data.messageType === undefined && (missing8 = 'messageType')) || + (data.signalingType === undefined && (missing8 = 'signalingType')) || + (data.connectionUrl === undefined && (missing8 = 'connectionUrl')) || + (data.content === undefined && (missing8 = 'content')) + ) { + const err38 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing8 }, + message: "must have required property '" + missing8 + "'", + schema: schema188.anyOf[2].allOf[1].required, + parentSchema: schema188.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err38]; + } else { + vErrors.push(err38); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data19 = data.messageType; + const _errs61 = errors; + if ('signaling' !== data19) { + const err39 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/2/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'signaling' }, + message: 'must be equal to constant', + schema: 'signaling', + parentSchema: schema188.anyOf[2].allOf[1].properties.messageType, + data: data19, + }; + if (vErrors === null) { + vErrors = [err39]; + } else { + vErrors.push(err39); + } + errors++; + } + var valid15 = _errs61 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.signalingType !== undefined) { + let data20 = data.signalingType; + const _errs62 = errors; + if (typeof data20 !== 'string') { + const err40 = { + instancePath: instancePath + '/signalingType', + schemaPath: '#/anyOf/2/allOf/1/properties/signalingType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[2].allOf[1].properties.signalingType.type, + parentSchema: schema188.anyOf[2].allOf[1].properties.signalingType, + data: data20, + }; + if (vErrors === null) { + vErrors = [err40]; + } else { + vErrors.push(err40); + } + errors++; + } + var valid15 = _errs62 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.connectionUrl !== undefined) { + let data21 = data.connectionUrl; + const _errs64 = errors; + if (errors === _errs64) { + if (errors === _errs64) { + if (typeof data21 === 'string') { + if (!formats0(data21)) { + const err41 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: + '#/anyOf/2/allOf/1/properties/connectionUrl/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema188.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err41]; + } else { + vErrors.push(err41); + } + errors++; + } + } else { + const err42 = { + instancePath: instancePath + '/connectionUrl', + schemaPath: '#/anyOf/2/allOf/1/properties/connectionUrl/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema188.anyOf[2].allOf[1].properties.connectionUrl.type, + parentSchema: + schema188.anyOf[2].allOf[1].properties.connectionUrl, + data: data21, + }; + if (vErrors === null) { + vErrors = [err42]; + } else { + vErrors.push(err42); + } + errors++; + } + } + } + var valid15 = _errs64 === errors; + } else { + var valid15 = true; + } + if (valid15) { + if (data.content !== undefined) { + let data22 = data.content; + const _errs66 = errors; + if (errors === _errs66) { + if ( + data22 && + typeof data22 == 'object' && + !Array.isArray(data22) + ) { + } else { + const err43 = { + instancePath: instancePath + '/content', + schemaPath: '#/anyOf/2/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[2].allOf[1].properties.content.type, + parentSchema: schema188.anyOf[2].allOf[1].properties.content, + data: data22, + }; + if (vErrors === null) { + vErrors = [err43]; + } else { + vErrors.push(err43); + } + errors++; + } + } + var valid15 = _errs66 === errors; + } else { + var valid15 = true; + } + } + } + } + } + } else { + const err44 = { + instancePath, + schemaPath: '#/anyOf/2/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[2].allOf[1].type, + parentSchema: schema188.anyOf[2].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err44]; + } else { + vErrors.push(err44); + } + errors++; + } + } + var valid13 = _errs59 === errors; + } + var _valid0 = _errs53 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs69 = errors; + const _errs70 = errors; + if (errors === _errs70) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing9; + if (data.messageType === undefined && (missing9 = 'messageType')) { + const err45 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing9 }, + message: "must have required property '" + missing9 + "'", + schema: schema188.anyOf[3].allOf[0].required, + parentSchema: schema188.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err45]; + } else { + vErrors.push(err45); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data23 = data.messageType; + if (typeof data23 !== 'string') { + const err46 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[3].allOf[0].properties.messageType.type, + parentSchema: schema188.anyOf[3].allOf[0].properties.messageType, + data: data23, + }; + if (vErrors === null) { + vErrors = [err46]; + } else { + vErrors.push(err46); + } + errors++; + } + } + } + } else { + const err47 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[3].allOf[0].type, + parentSchema: schema188.anyOf[3].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err47]; + } else { + vErrors.push(err47); + } + errors++; + } + } + var valid16 = _errs70 === errors; + if (valid16) { + const _errs75 = errors; + if (errors === _errs75) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing10; + if ( + (data.messageType === undefined && (missing10 = 'messageType')) || + (data.configuration === undefined && (missing10 = 'configuration')) + ) { + const err48 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing10 }, + message: "must have required property '" + missing10 + "'", + schema: schema188.anyOf[3].allOf[1].required, + parentSchema: schema188.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err48]; + } else { + vErrors.push(err48); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data24 = data.messageType; + const _errs77 = errors; + if ('configuration' !== data24) { + const err49 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/3/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'configuration' }, + message: 'must be equal to constant', + schema: 'configuration', + parentSchema: schema188.anyOf[3].allOf[1].properties.messageType, + data: data24, + }; + if (vErrors === null) { + vErrors = [err49]; + } else { + vErrors.push(err49); + } + errors++; + } + var valid18 = _errs77 === errors; + } else { + var valid18 = true; + } + if (valid18) { + if (data.configuration !== undefined) { + let data25 = data.configuration; + const _errs78 = errors; + if (errors === _errs78) { + if (data25 && typeof data25 == 'object' && !Array.isArray(data25)) { + } else { + const err50 = { + instancePath: instancePath + '/configuration', + schemaPath: '#/anyOf/3/allOf/1/properties/configuration/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema188.anyOf[3].allOf[1].properties.configuration.type, + parentSchema: + schema188.anyOf[3].allOf[1].properties.configuration, + data: data25, + }; + if (vErrors === null) { + vErrors = [err50]; + } else { + vErrors.push(err50); + } + errors++; + } + } + var valid18 = _errs78 === errors; + } else { + var valid18 = true; + } + } + } + } else { + const err51 = { + instancePath, + schemaPath: '#/anyOf/3/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[3].allOf[1].type, + parentSchema: schema188.anyOf[3].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err51]; + } else { + vErrors.push(err51); + } + errors++; + } + } + var valid16 = _errs75 === errors; + } + var _valid0 = _errs69 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs81 = errors; + const _errs82 = errors; + if (errors === _errs82) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing11; + if (data.messageType === undefined && (missing11 = 'messageType')) { + const err52 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing11 }, + message: "must have required property '" + missing11 + "'", + schema: schema188.anyOf[4].allOf[0].required, + parentSchema: schema188.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err52]; + } else { + vErrors.push(err52); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data26 = data.messageType; + if (typeof data26 !== 'string') { + const err53 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[4].allOf[0].properties.messageType.type, + parentSchema: schema188.anyOf[4].allOf[0].properties.messageType, + data: data26, + }; + if (vErrors === null) { + vErrors = [err53]; + } else { + vErrors.push(err53); + } + errors++; + } + } + } + } else { + const err54 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[4].allOf[0].type, + parentSchema: schema188.anyOf[4].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err54]; + } else { + vErrors.push(err54); + } + errors++; + } + } + var valid19 = _errs82 === errors; + if (valid19) { + const _errs87 = errors; + if (errors === _errs87) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing12; + if ( + (data.messageType === undefined && (missing12 = 'messageType')) || + (data.status === undefined && (missing12 = 'status')) + ) { + const err55 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing12 }, + message: "must have required property '" + missing12 + "'", + schema: schema188.anyOf[4].allOf[1].required, + parentSchema: schema188.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err55]; + } else { + vErrors.push(err55); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data27 = data.messageType; + const _errs89 = errors; + if ('experiment-status-changed' !== data27) { + const err56 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/4/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'experiment-status-changed' }, + message: 'must be equal to constant', + schema: 'experiment-status-changed', + parentSchema: schema188.anyOf[4].allOf[1].properties.messageType, + data: data27, + }; + if (vErrors === null) { + vErrors = [err56]; + } else { + vErrors.push(err56); + } + errors++; + } + var valid21 = _errs89 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.status !== undefined) { + let data28 = data.status; + const _errs90 = errors; + if (typeof data28 !== 'string') { + const err57 = { + instancePath: instancePath + '/status', + schemaPath: '#/anyOf/4/allOf/1/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[4].allOf[1].properties.status.type, + parentSchema: schema188.anyOf[4].allOf[1].properties.status, + data: data28, + }; + if (vErrors === null) { + vErrors = [err57]; + } else { + vErrors.push(err57); + } + errors++; + } + var valid21 = _errs90 === errors; + } else { + var valid21 = true; + } + if (valid21) { + if (data.message !== undefined) { + let data29 = data.message; + const _errs92 = errors; + if (typeof data29 !== 'string') { + const err58 = { + instancePath: instancePath + '/message', + schemaPath: '#/anyOf/4/allOf/1/properties/message/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema188.anyOf[4].allOf[1].properties.message.type, + parentSchema: schema188.anyOf[4].allOf[1].properties.message, + data: data29, + }; + if (vErrors === null) { + vErrors = [err58]; + } else { + vErrors.push(err58); + } + errors++; + } + var valid21 = _errs92 === errors; + } else { + var valid21 = true; + } + } + } + } + } else { + const err59 = { + instancePath, + schemaPath: '#/anyOf/4/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema188.anyOf[4].allOf[1].type, + parentSchema: schema188.anyOf[4].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err59]; + } else { + vErrors.push(err59); + } + errors++; + } + } + var valid19 = _errs87 === errors; + } + var _valid0 = _errs81 === errors; + valid0 = valid0 || _valid0; + } + } + } + } + if (!valid0) { + const err60 = { + instancePath, + schemaPath: '#/anyOf', + keyword: 'anyOf', + params: {}, + message: 'must match a schema in anyOf', + schema: schema188.anyOf, + parentSchema: schema188, + data, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + validate203.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate203.errors = vErrors; + return errors === 0; +} +exports.validateListPeerconnectionsResponse200Request = validate204; +const schema189 = { + type: 'array', + items: { + title: 'Peerconnection Overview', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + }, + 'x-standalone': false, + 'x-name': 'listPeerconnectionsResponse200Request', + 'x-location': + '#/paths//peerconnections/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate204( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if (data0.type === undefined && (missing0 = 'type')) { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema189.items.allOf[0].required, + parentSchema: schema189.items.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.type !== undefined) { + let data1 = data0.type; + if (typeof data1 !== 'string') { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema189.items.allOf[0].properties.type.type, + parentSchema: schema189.items.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema189.items.allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema189.items.allOf[0].properties.type.enum, + parentSchema: schema189.items.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + } + } + } else { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema189.items.allOf[0].type, + parentSchema: schema189.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs6 = errors; + if (errors === _errs6) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.devices === undefined && (missing1 = 'devices')) { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema189.items.allOf[1].required, + parentSchema: schema189.items.allOf[1], + data: data0, + }, + ]; + return false; + } else { + if (data0.devices !== undefined) { + let data2 = data0.devices; + const _errs8 = errors; + if (errors === _errs8) { + if (Array.isArray(data2)) { + if (data2.length > 2) { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema189.items.allOf[1].properties.devices, + data: data2, + }, + ]; + return false; + } else { + if (data2.length < 2) { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema189.items.allOf[1].properties.devices, + data: data2, + }, + ]; + return false; + } else { + var valid4 = true; + const len1 = data2.length; + for (let i1 = 0; i1 < len1; i1++) { + let data3 = data2[i1]; + const _errs10 = errors; + if (errors === _errs10) { + if ( + data3 && + typeof data3 == 'object' && + !Array.isArray(data3) + ) { + let missing2; + if (data3.url === undefined && (missing2 = 'url')) { + validate204.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema189.items.allOf[1].properties.devices.items + .required, + parentSchema: + schema189.items.allOf[1].properties.devices.items, + data: data3, + }, + ]; + return false; + } else { + if (data3.url !== undefined) { + let data4 = data3.url; + const _errs12 = errors; + if (errors === _errs12) { + if (errors === _errs12) { + if (typeof data4 === 'string') { + if (!formats0(data4)) { + validate204.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema189.items.allOf[1].properties + .devices.items.properties.url, + data: data4, + }, + ]; + return false; + } + } else { + validate204.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema189.items.allOf[1].properties + .devices.items.properties.url.type, + parentSchema: + schema189.items.allOf[1].properties + .devices.items.properties.url, + data: data4, + }, + ]; + return false; + } + } + } + } + } + } else { + validate204.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema189.items.allOf[1].properties.devices.items + .type, + parentSchema: + schema189.items.allOf[1].properties.devices.items, + data: data3, + }, + ]; + return false; + } + } + var valid4 = _errs10 === errors; + if (!valid4) { + break; + } + } + } + } + } else { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema189.items.allOf[1].properties.devices.type, + parentSchema: schema189.items.allOf[1].properties.devices, + data: data2, + }, + ]; + return false; + } + } + } + } + } else { + validate204.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema189.items.allOf[1].type, + parentSchema: schema189.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs6 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate204.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema189.type, + parentSchema: schema189, + data, + }, + ]; + return false; + } + } + validate204.errors = vErrors; + return errors === 0; +} +exports.validateListPeerconnectionsResponse200Response = validate205; +const schema190 = { + type: 'array', + items: { + title: 'Peerconnection Overview', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + }, + 'x-standalone': false, + 'x-name': 'listPeerconnectionsResponse200Response', + 'x-location': + '#/paths//peerconnections/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate205( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (Array.isArray(data)) { + var valid0 = true; + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + let data0 = data[i0]; + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing0; + if ( + (data0.url === undefined && (missing0 = 'url')) || + (data0.type === undefined && (missing0 = 'type')) || + (data0.status === undefined && (missing0 = 'status')) + ) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema190.items.allOf[0].required, + parentSchema: schema190.items.allOf[0], + data: data0, + }, + ]; + return false; + } else { + if (data0.url !== undefined) { + let data1 = data0.url; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data1 === 'string') { + if (!formats0(data1)) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema190.items.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } else { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/url', + schemaPath: '#/items/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema190.items.allOf[0].properties.url.type, + parentSchema: schema190.items.allOf[0].properties.url, + data: data1, + }, + ]; + return false; + } + } + } + var valid2 = _errs4 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.type !== undefined) { + let data2 = data0.type; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema190.items.allOf[0].properties.type.type, + parentSchema: schema190.items.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + if (!(data2 === 'local' || data2 === 'webrtc')) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/type', + schemaPath: '#/items/allOf/0/properties/type/enum', + keyword: 'enum', + params: { + allowedValues: schema190.items.allOf[0].properties.type.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema190.items.allOf[0].properties.type.enum, + parentSchema: schema190.items.allOf[0].properties.type, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs6 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data0.status !== undefined) { + let data3 = data0.status; + const _errs8 = errors; + if (typeof data3 !== 'string') { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/status', + schemaPath: '#/items/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema190.items.allOf[0].properties.status.type, + parentSchema: schema190.items.allOf[0].properties.status, + data: data3, + }, + ]; + return false; + } + if ( + !( + data3 === 'new' || + data3 === 'connecting' || + data3 === 'connected' || + data3 === 'disconnected' || + data3 === 'failed' || + data3 === 'closed' + ) + ) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/status', + schemaPath: '#/items/allOf/0/properties/status/enum', + keyword: 'enum', + params: { + allowedValues: + schema190.items.allOf[0].properties.status.enum, + }, + message: 'must be equal to one of the allowed values', + schema: schema190.items.allOf[0].properties.status.enum, + parentSchema: schema190.items.allOf[0].properties.status, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema190.items.allOf[0].type, + parentSchema: schema190.items.allOf[0], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs2 === errors; + if (valid1) { + const _errs10 = errors; + if (errors === _errs10) { + if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { + let missing1; + if (data0.devices === undefined && (missing1 = 'devices')) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema190.items.allOf[1].required, + parentSchema: schema190.items.allOf[1], + data: data0, + }, + ]; + return false; + } else { + if (data0.devices !== undefined) { + let data4 = data0.devices; + const _errs12 = errors; + if (errors === _errs12) { + if (Array.isArray(data4)) { + if (data4.length > 2) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema190.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } else { + if (data4.length < 2) { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema190.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } else { + var valid4 = true; + const len1 = data4.length; + for (let i1 = 0; i1 < len1; i1++) { + let data5 = data4[i1]; + const _errs14 = errors; + if (errors === _errs14) { + if ( + data5 && + typeof data5 == 'object' && + !Array.isArray(data5) + ) { + let missing2; + if (data5.url === undefined && (missing2 = 'url')) { + validate205.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: + "must have required property '" + missing2 + "'", + schema: + schema190.items.allOf[1].properties.devices.items + .required, + parentSchema: + schema190.items.allOf[1].properties.devices.items, + data: data5, + }, + ]; + return false; + } else { + if (data5.url !== undefined) { + let data6 = data5.url; + const _errs16 = errors; + if (errors === _errs16) { + if (errors === _errs16) { + if (typeof data6 === 'string') { + if (!formats0(data6)) { + validate205.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema190.items.allOf[1].properties + .devices.items.properties.url, + data: data6, + }, + ]; + return false; + } + } else { + validate205.errors = [ + { + instancePath: + instancePath + + '/' + + i0 + + '/devices/' + + i1 + + '/url', + schemaPath: + '#/items/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema190.items.allOf[1].properties + .devices.items.properties.url.type, + parentSchema: + schema190.items.allOf[1].properties + .devices.items.properties.url, + data: data6, + }, + ]; + return false; + } + } + } + } + } + } else { + validate205.errors = [ + { + instancePath: + instancePath + '/' + i0 + '/devices/' + i1, + schemaPath: + '#/items/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema190.items.allOf[1].properties.devices.items + .type, + parentSchema: + schema190.items.allOf[1].properties.devices.items, + data: data5, + }, + ]; + return false; + } + } + var valid4 = _errs14 === errors; + if (!valid4) { + break; + } + } + } + } + } else { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0 + '/devices', + schemaPath: '#/items/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema190.items.allOf[1].properties.devices.type, + parentSchema: schema190.items.allOf[1].properties.devices, + data: data4, + }, + ]; + return false; + } + } + } + } + } else { + validate205.errors = [ + { + instancePath: instancePath + '/' + i0, + schemaPath: '#/items/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema190.items.allOf[1].type, + parentSchema: schema190.items.allOf[1], + data: data0, + }, + ]; + return false; + } + } + var valid1 = _errs10 === errors; + } + var valid0 = _errs1 === errors; + if (!valid0) { + break; + } + } + } else { + validate205.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema190.type, + parentSchema: schema190, + data, + }, + ]; + return false; + } + } + validate205.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionBodyRequest = validate206; +const schema191 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionBodyRequest', + 'x-location': + '#/paths//peerconnections/post/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate206( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate206.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema191.allOf[0].required, + parentSchema: schema191.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate206.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema191.allOf[0].properties.type.type, + parentSchema: schema191.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate206.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema191.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema191.allOf[0].properties.type.enum, + parentSchema: schema191.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate206.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema191.allOf[0].type, + parentSchema: schema191.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate206.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema191.allOf[1].required, + parentSchema: schema191.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate206.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema191.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate206.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema191.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate206.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema191.allOf[1].properties.devices.items.required, + parentSchema: schema191.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate206.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema191.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate206.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema191.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema191.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data2.config !== undefined) { + let data4 = data2.config; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data4 && + typeof data4 == 'object' && + !Array.isArray(data4) + ) { + if (data4.services !== undefined) { + let data5 = data4.services; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid6 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing3; + if ( + (data6.serviceType === undefined && + (missing3 = 'serviceType')) || + (data6.serviceId === undefined && + (missing3 = 'serviceId')) || + (data6.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema191.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema191.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.serviceType !== undefined) { + let data7 = data6.serviceType; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema191.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } else { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema191.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema191.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } + } + var valid7 = _errs19 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data6.serviceId !== undefined) { + let data8 = data6.serviceId; + const _errs21 = errors; + if (typeof data8 !== 'string') { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema191.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema191.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data8, + }, + ]; + return false; + } + var valid7 = _errs21 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data6.remoteServiceId !== + undefined + ) { + let data9 = data6.remoteServiceId; + const _errs23 = errors; + if (typeof data9 !== 'string') { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema191.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema191.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data9, + }, + ]; + return false; + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema191.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema191.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } + } + var valid6 = _errs16 === errors; + if (!valid6) { + break; + } + } + } else { + validate206.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema191.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema191.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate206.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema191.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema191.allOf[1].properties.devices.items + .properties.config, + data: data4, + }, + ]; + return false; + } + } + var valid4 = _errs12 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate206.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema191.allOf[1].properties.devices.items.type, + parentSchema: schema191.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate206.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema191.allOf[1].properties.devices.type, + parentSchema: schema191.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate206.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema191.allOf[1].type, + parentSchema: schema191.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate206.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionBodyResponse = validate207; +const schema192 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionBodyResponse', + 'x-location': + '#/paths//peerconnections/post/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate207( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate207.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema192.allOf[0].required, + parentSchema: schema192.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate207.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema192.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate207.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema192.allOf[0].properties.url.type, + parentSchema: schema192.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate207.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema192.allOf[0].properties.type.type, + parentSchema: schema192.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate207.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema192.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema192.allOf[0].properties.type.enum, + parentSchema: schema192.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate207.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema192.allOf[0].properties.status.type, + parentSchema: schema192.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate207.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema192.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema192.allOf[0].properties.status.enum, + parentSchema: schema192.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate207.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema192.allOf[0].type, + parentSchema: schema192.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate207.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema192.allOf[1].required, + parentSchema: schema192.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate207.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema192.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate207.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema192.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate207.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema192.allOf[1].properties.devices.items.required, + parentSchema: schema192.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate207.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema192.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate207.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema192.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema192.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema192.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema192.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema192.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema192.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema192.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema192.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema192.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema192.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema192.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema192.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema192.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate207.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema192.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema192.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate207.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema192.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema192.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate207.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema192.allOf[1].properties.devices.items.type, + parentSchema: schema192.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate207.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema192.allOf[1].properties.devices.type, + parentSchema: schema192.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate207.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema192.allOf[1].type, + parentSchema: schema192.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate207.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse201Request = validate208; +const schema193 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse201Request', + 'x-location': + '#/paths//peerconnections/post/responses/201/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate208( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate208.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema193.allOf[0].required, + parentSchema: schema193.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate208.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema193.allOf[0].properties.type.type, + parentSchema: schema193.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate208.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema193.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema193.allOf[0].properties.type.enum, + parentSchema: schema193.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate208.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema193.allOf[0].type, + parentSchema: schema193.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate208.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema193.allOf[1].required, + parentSchema: schema193.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate208.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema193.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate208.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema193.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate208.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema193.allOf[1].properties.devices.items.required, + parentSchema: schema193.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate208.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema193.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate208.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema193.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema193.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data2.config !== undefined) { + let data4 = data2.config; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data4 && + typeof data4 == 'object' && + !Array.isArray(data4) + ) { + if (data4.services !== undefined) { + let data5 = data4.services; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid6 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing3; + if ( + (data6.serviceType === undefined && + (missing3 = 'serviceType')) || + (data6.serviceId === undefined && + (missing3 = 'serviceId')) || + (data6.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema193.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema193.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.serviceType !== undefined) { + let data7 = data6.serviceType; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema193.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } else { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema193.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema193.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } + } + var valid7 = _errs19 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data6.serviceId !== undefined) { + let data8 = data6.serviceId; + const _errs21 = errors; + if (typeof data8 !== 'string') { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema193.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema193.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data8, + }, + ]; + return false; + } + var valid7 = _errs21 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data6.remoteServiceId !== + undefined + ) { + let data9 = data6.remoteServiceId; + const _errs23 = errors; + if (typeof data9 !== 'string') { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema193.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema193.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data9, + }, + ]; + return false; + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema193.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema193.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } + } + var valid6 = _errs16 === errors; + if (!valid6) { + break; + } + } + } else { + validate208.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema193.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema193.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate208.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema193.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema193.allOf[1].properties.devices.items + .properties.config, + data: data4, + }, + ]; + return false; + } + } + var valid4 = _errs12 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate208.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema193.allOf[1].properties.devices.items.type, + parentSchema: schema193.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate208.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema193.allOf[1].properties.devices.type, + parentSchema: schema193.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate208.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema193.allOf[1].type, + parentSchema: schema193.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate208.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse201Response = validate209; +const schema194 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse201Response', + 'x-location': + '#/paths//peerconnections/post/responses/201/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate209( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate209.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema194.allOf[0].required, + parentSchema: schema194.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate209.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema194.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate209.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema194.allOf[0].properties.url.type, + parentSchema: schema194.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate209.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema194.allOf[0].properties.type.type, + parentSchema: schema194.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate209.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema194.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema194.allOf[0].properties.type.enum, + parentSchema: schema194.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate209.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema194.allOf[0].properties.status.type, + parentSchema: schema194.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate209.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema194.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema194.allOf[0].properties.status.enum, + parentSchema: schema194.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate209.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema194.allOf[0].type, + parentSchema: schema194.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate209.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema194.allOf[1].required, + parentSchema: schema194.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate209.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema194.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate209.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema194.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate209.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema194.allOf[1].properties.devices.items.required, + parentSchema: schema194.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate209.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema194.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate209.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema194.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema194.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema194.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema194.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema194.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema194.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema194.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema194.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema194.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema194.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema194.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema194.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema194.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate209.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema194.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema194.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate209.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema194.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema194.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate209.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema194.allOf[1].properties.devices.items.type, + parentSchema: schema194.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate209.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema194.allOf[1].properties.devices.type, + parentSchema: schema194.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate209.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema194.allOf[1].type, + parentSchema: schema194.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate209.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse202Request = validate210; +const schema195 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse202Request', + 'x-location': + '#/paths//peerconnections/post/responses/202/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate210( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate210.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema195.allOf[0].required, + parentSchema: schema195.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate210.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema195.allOf[0].properties.type.type, + parentSchema: schema195.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate210.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema195.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema195.allOf[0].properties.type.enum, + parentSchema: schema195.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate210.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema195.allOf[0].type, + parentSchema: schema195.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate210.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema195.allOf[1].required, + parentSchema: schema195.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate210.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema195.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate210.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema195.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate210.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema195.allOf[1].properties.devices.items.required, + parentSchema: schema195.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate210.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema195.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate210.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema195.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema195.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data2.config !== undefined) { + let data4 = data2.config; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data4 && + typeof data4 == 'object' && + !Array.isArray(data4) + ) { + if (data4.services !== undefined) { + let data5 = data4.services; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid6 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing3; + if ( + (data6.serviceType === undefined && + (missing3 = 'serviceType')) || + (data6.serviceId === undefined && + (missing3 = 'serviceId')) || + (data6.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema195.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema195.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.serviceType !== undefined) { + let data7 = data6.serviceType; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema195.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } else { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema195.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema195.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } + } + var valid7 = _errs19 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data6.serviceId !== undefined) { + let data8 = data6.serviceId; + const _errs21 = errors; + if (typeof data8 !== 'string') { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema195.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema195.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data8, + }, + ]; + return false; + } + var valid7 = _errs21 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data6.remoteServiceId !== + undefined + ) { + let data9 = data6.remoteServiceId; + const _errs23 = errors; + if (typeof data9 !== 'string') { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema195.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema195.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data9, + }, + ]; + return false; + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema195.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema195.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } + } + var valid6 = _errs16 === errors; + if (!valid6) { + break; + } + } + } else { + validate210.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema195.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema195.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate210.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema195.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema195.allOf[1].properties.devices.items + .properties.config, + data: data4, + }, + ]; + return false; + } + } + var valid4 = _errs12 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate210.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema195.allOf[1].properties.devices.items.type, + parentSchema: schema195.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate210.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema195.allOf[1].properties.devices.type, + parentSchema: schema195.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate210.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema195.allOf[1].type, + parentSchema: schema195.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate210.errors = vErrors; + return errors === 0; +} +exports.validateCreatePeerconnectionResponse202Response = validate211; +const schema196 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'createPeerconnectionResponse202Response', + 'x-location': + '#/paths//peerconnections/post/responses/202/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate211( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate211.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema196.allOf[0].required, + parentSchema: schema196.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate211.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema196.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate211.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema196.allOf[0].properties.url.type, + parentSchema: schema196.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate211.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema196.allOf[0].properties.type.type, + parentSchema: schema196.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate211.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema196.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema196.allOf[0].properties.type.enum, + parentSchema: schema196.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate211.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema196.allOf[0].properties.status.type, + parentSchema: schema196.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate211.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema196.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema196.allOf[0].properties.status.enum, + parentSchema: schema196.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate211.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema196.allOf[0].type, + parentSchema: schema196.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate211.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema196.allOf[1].required, + parentSchema: schema196.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate211.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema196.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate211.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema196.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate211.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema196.allOf[1].properties.devices.items.required, + parentSchema: schema196.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate211.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema196.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate211.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema196.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema196.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema196.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema196.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema196.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema196.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema196.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema196.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema196.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema196.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema196.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema196.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema196.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate211.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema196.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema196.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate211.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema196.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema196.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate211.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema196.allOf[1].properties.devices.items.type, + parentSchema: schema196.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate211.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema196.allOf[1].properties.devices.type, + parentSchema: schema196.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate211.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema196.allOf[1].type, + parentSchema: schema196.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate211.errors = vErrors; + return errors === 0; +} +exports.validateGetPeerconnectionResponse200Request = validate212; +const schema197 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + }, + required: ['type'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getPeerconnectionResponse200Request', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate212( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.type === undefined && (missing0 = 'type')) { + validate212.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema197.allOf[0].required, + parentSchema: schema197.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.type !== undefined) { + let data0 = data.type; + if (typeof data0 !== 'string') { + validate212.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema197.allOf[0].properties.type.type, + parentSchema: schema197.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + if (!(data0 === 'local' || data0 === 'webrtc')) { + validate212.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema197.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema197.allOf[0].properties.type.enum, + parentSchema: schema197.allOf[0].properties.type, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate212.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema197.allOf[0].type, + parentSchema: schema197.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs4 = errors; + if (errors === _errs4) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate212.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema197.allOf[1].required, + parentSchema: schema197.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data1 = data.devices; + const _errs6 = errors; + if (errors === _errs6) { + if (Array.isArray(data1)) { + if (data1.length > 2) { + validate212.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema197.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + if (data1.length < 2) { + validate212.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema197.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data1.length; + for (let i0 = 0; i0 < len0; i0++) { + let data2 = data1[i0]; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + let missing2; + if (data2.url === undefined && (missing2 = 'url')) { + validate212.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema197.allOf[1].properties.devices.items.required, + parentSchema: schema197.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } else { + if (data2.url !== undefined) { + let data3 = data2.url; + const _errs10 = errors; + if (errors === _errs10) { + if (errors === _errs10) { + if (typeof data3 === 'string') { + if (!formats0(data3)) { + validate212.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema197.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } else { + validate212.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema197.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema197.allOf[1].properties.devices.items + .properties.url, + data: data3, + }, + ]; + return false; + } + } + } + var valid4 = _errs10 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data2.config !== undefined) { + let data4 = data2.config; + const _errs12 = errors; + if (errors === _errs12) { + if ( + data4 && + typeof data4 == 'object' && + !Array.isArray(data4) + ) { + if (data4.services !== undefined) { + let data5 = data4.services; + const _errs14 = errors; + if (errors === _errs14) { + if (Array.isArray(data5)) { + var valid6 = true; + const len1 = data5.length; + for (let i1 = 0; i1 < len1; i1++) { + let data6 = data5[i1]; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + let missing3; + if ( + (data6.serviceType === undefined && + (missing3 = 'serviceType')) || + (data6.serviceId === undefined && + (missing3 = 'serviceId')) || + (data6.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema197.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema197.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } else { + if (data6.serviceType !== undefined) { + let data7 = data6.serviceType; + const _errs19 = errors; + if (errors === _errs19) { + if (errors === _errs19) { + if (typeof data7 === 'string') { + if (!formats0(data7)) { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema197.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } else { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema197.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema197.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data7, + }, + ]; + return false; + } + } + } + var valid7 = _errs19 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data6.serviceId !== undefined) { + let data8 = data6.serviceId; + const _errs21 = errors; + if (typeof data8 !== 'string') { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema197.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema197.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data8, + }, + ]; + return false; + } + var valid7 = _errs21 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data6.remoteServiceId !== + undefined + ) { + let data9 = data6.remoteServiceId; + const _errs23 = errors; + if (typeof data9 !== 'string') { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema197.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema197.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data9, + }, + ]; + return false; + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema197.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema197.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data6, + }, + ]; + return false; + } + } + var valid6 = _errs16 === errors; + if (!valid6) { + break; + } + } + } else { + validate212.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema197.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema197.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data5, + }, + ]; + return false; + } + } + } + } else { + validate212.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema197.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema197.allOf[1].properties.devices.items + .properties.config, + data: data4, + }, + ]; + return false; + } + } + var valid4 = _errs12 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate212.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema197.allOf[1].properties.devices.items.type, + parentSchema: schema197.allOf[1].properties.devices.items, + data: data2, + }, + ]; + return false; + } + } + var valid3 = _errs8 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate212.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema197.allOf[1].properties.devices.type, + parentSchema: schema197.allOf[1].properties.devices, + data: data1, + }, + ]; + return false; + } + } + } + } + } else { + validate212.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema197.allOf[1].type, + parentSchema: schema197.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } + validate212.errors = vErrors; + return errors === 0; +} +exports.validateGetPeerconnectionResponse200Response = validate213; +const schema198 = { + title: 'Peerconnection', + allOf: [ + { + type: 'object', + title: 'Peerconnection Common', + properties: { + url: { + type: 'string', + description: 'URL of the peerconnection', + format: 'uri', + readOnly: true, + }, + type: { + type: 'string', + description: 'Type of the peerconnection', + enum: ['local', 'webrtc'], + }, + status: { + readOnly: true, + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['url', 'type', 'status'], + }, + { + type: 'object', + properties: { + devices: { + type: 'array', + minItems: 2, + maxItems: 2, + items: { + title: 'Configured Device Reference', + type: 'object', + properties: { + url: { type: 'string', description: 'URL of the device', format: 'uri' }, + config: { + type: 'object', + properties: { + services: { + type: 'array', + items: { + title: 'Service Config', + type: 'object', + properties: { + serviceType: { type: 'string', format: 'uri' }, + serviceId: { type: 'string' }, + remoteServiceId: { type: 'string' }, + }, + required: ['serviceType', 'serviceId', 'remoteServiceId'], + additionalProperties: true, + }, + }, + }, + }, + }, + required: ['url'], + }, + }, + }, + required: ['devices'], + }, + ], + 'x-typeguard': true, + 'x-standalone': false, + 'x-name': 'getPeerconnectionResponse200Response', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate213( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if ( + (data.url === undefined && (missing0 = 'url')) || + (data.type === undefined && (missing0 = 'type')) || + (data.status === undefined && (missing0 = 'status')) + ) { + validate213.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema198.allOf[0].required, + parentSchema: schema198.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.url !== undefined) { + let data0 = data.url; + const _errs2 = errors; + if (errors === _errs2) { + if (errors === _errs2) { + if (typeof data0 === 'string') { + if (!formats0(data0)) { + validate213.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema198.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } else { + validate213.errors = [ + { + instancePath: instancePath + '/url', + schemaPath: '#/allOf/0/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema198.allOf[0].properties.url.type, + parentSchema: schema198.allOf[0].properties.url, + data: data0, + }, + ]; + return false; + } + } + } + var valid1 = _errs2 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.type !== undefined) { + let data1 = data.type; + const _errs4 = errors; + if (typeof data1 !== 'string') { + validate213.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema198.allOf[0].properties.type.type, + parentSchema: schema198.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + if (!(data1 === 'local' || data1 === 'webrtc')) { + validate213.errors = [ + { + instancePath: instancePath + '/type', + schemaPath: '#/allOf/0/properties/type/enum', + keyword: 'enum', + params: { allowedValues: schema198.allOf[0].properties.type.enum }, + message: 'must be equal to one of the allowed values', + schema: schema198.allOf[0].properties.type.enum, + parentSchema: schema198.allOf[0].properties.type, + data: data1, + }, + ]; + return false; + } + var valid1 = _errs4 === errors; + } else { + var valid1 = true; + } + if (valid1) { + if (data.status !== undefined) { + let data2 = data.status; + const _errs6 = errors; + if (typeof data2 !== 'string') { + validate213.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema198.allOf[0].properties.status.type, + parentSchema: schema198.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + if ( + !( + data2 === 'new' || + data2 === 'connecting' || + data2 === 'connected' || + data2 === 'disconnected' || + data2 === 'failed' || + data2 === 'closed' + ) + ) { + validate213.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/allOf/0/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema198.allOf[0].properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema198.allOf[0].properties.status.enum, + parentSchema: schema198.allOf[0].properties.status, + data: data2, + }, + ]; + return false; + } + var valid1 = _errs6 === errors; + } else { + var valid1 = true; + } + } + } + } + } else { + validate213.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema198.allOf[0].type, + parentSchema: schema198.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs8 = errors; + if (errors === _errs8) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.devices === undefined && (missing1 = 'devices')) { + validate213.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema198.allOf[1].required, + parentSchema: schema198.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.devices !== undefined) { + let data3 = data.devices; + const _errs10 = errors; + if (errors === _errs10) { + if (Array.isArray(data3)) { + if (data3.length > 2) { + validate213.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/maxItems', + keyword: 'maxItems', + params: { limit: 2 }, + message: 'must NOT have more than 2 items', + schema: 2, + parentSchema: schema198.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + if (data3.length < 2) { + validate213.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/minItems', + keyword: 'minItems', + params: { limit: 2 }, + message: 'must NOT have fewer than 2 items', + schema: 2, + parentSchema: schema198.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } else { + var valid3 = true; + const len0 = data3.length; + for (let i0 = 0; i0 < len0; i0++) { + let data4 = data3[i0]; + const _errs12 = errors; + if (errors === _errs12) { + if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { + let missing2; + if (data4.url === undefined && (missing2 = 'url')) { + validate213.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/required', + keyword: 'required', + params: { missingProperty: missing2 }, + message: "must have required property '" + missing2 + "'", + schema: + schema198.allOf[1].properties.devices.items.required, + parentSchema: schema198.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } else { + if (data4.url !== undefined) { + let data5 = data4.url; + const _errs14 = errors; + if (errors === _errs14) { + if (errors === _errs14) { + if (typeof data5 === 'string') { + if (!formats0(data5)) { + validate213.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: + schema198.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } else { + validate213.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/url', + schemaPath: + '#/allOf/1/properties/devices/items/properties/url/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema198.allOf[1].properties.devices.items + .properties.url.type, + parentSchema: + schema198.allOf[1].properties.devices.items + .properties.url, + data: data5, + }, + ]; + return false; + } + } + } + var valid4 = _errs14 === errors; + } else { + var valid4 = true; + } + if (valid4) { + if (data4.config !== undefined) { + let data6 = data4.config; + const _errs16 = errors; + if (errors === _errs16) { + if ( + data6 && + typeof data6 == 'object' && + !Array.isArray(data6) + ) { + if (data6.services !== undefined) { + let data7 = data6.services; + const _errs18 = errors; + if (errors === _errs18) { + if (Array.isArray(data7)) { + var valid6 = true; + const len1 = data7.length; + for (let i1 = 0; i1 < len1; i1++) { + let data8 = data7[i1]; + const _errs20 = errors; + if (errors === _errs20) { + if ( + data8 && + typeof data8 == 'object' && + !Array.isArray(data8) + ) { + let missing3; + if ( + (data8.serviceType === undefined && + (missing3 = 'serviceType')) || + (data8.serviceId === undefined && + (missing3 = 'serviceId')) || + (data8.remoteServiceId === undefined && + (missing3 = 'remoteServiceId')) + ) { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/required', + keyword: 'required', + params: { + missingProperty: missing3, + }, + message: + "must have required property '" + + missing3 + + "'", + schema: + schema198.allOf[1].properties + .devices.items.properties.config + .properties.services.items + .required, + parentSchema: + schema198.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } else { + if (data8.serviceType !== undefined) { + let data9 = data8.serviceType; + const _errs23 = errors; + if (errors === _errs23) { + if (errors === _errs23) { + if (typeof data9 === 'string') { + if (!formats0(data9)) { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/format', + keyword: 'format', + params: { format: 'uri' }, + message: + 'must match format "' + + 'uri' + + '"', + schema: 'uri', + parentSchema: + schema198.allOf[1] + .properties.devices + .items.properties + .config.properties + .services.items + .properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } else { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceType', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema198.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType.type, + parentSchema: + schema198.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .serviceType, + data: data9, + }, + ]; + return false; + } + } + } + var valid7 = _errs23 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if (data8.serviceId !== undefined) { + let data10 = data8.serviceId; + const _errs25 = errors; + if (typeof data10 !== 'string') { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/serviceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/serviceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema198.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId + .type, + parentSchema: + schema198.allOf[1] + .properties.devices.items + .properties.config + .properties.services.items + .properties.serviceId, + data: data10, + }, + ]; + return false; + } + var valid7 = _errs25 === errors; + } else { + var valid7 = true; + } + if (valid7) { + if ( + data8.remoteServiceId !== + undefined + ) { + let data11 = + data8.remoteServiceId; + const _errs27 = errors; + if (typeof data11 !== 'string') { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1 + + '/remoteServiceId', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/properties/remoteServiceId/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: + schema198.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId.type, + parentSchema: + schema198.allOf[1] + .properties.devices + .items.properties.config + .properties.services + .items.properties + .remoteServiceId, + data: data11, + }, + ]; + return false; + } + var valid7 = _errs27 === errors; + } else { + var valid7 = true; + } + } + } + } + } else { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services/' + + i1, + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema198.allOf[1].properties + .devices.items.properties.config + .properties.services.items.type, + parentSchema: + schema198.allOf[1].properties + .devices.items.properties.config + .properties.services.items, + data: data8, + }, + ]; + return false; + } + } + var valid6 = _errs20 === errors; + if (!valid6) { + break; + } + } + } else { + validate213.errors = [ + { + instancePath: + instancePath + + '/devices/' + + i0 + + '/config/services', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/properties/services/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: + schema198.allOf[1].properties.devices + .items.properties.config.properties + .services.type, + parentSchema: + schema198.allOf[1].properties.devices + .items.properties.config.properties + .services, + data: data7, + }, + ]; + return false; + } + } + } + } else { + validate213.errors = [ + { + instancePath: + instancePath + '/devices/' + i0 + '/config', + schemaPath: + '#/allOf/1/properties/devices/items/properties/config/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: + schema198.allOf[1].properties.devices.items + .properties.config.type, + parentSchema: + schema198.allOf[1].properties.devices.items + .properties.config, + data: data6, + }, + ]; + return false; + } + } + var valid4 = _errs16 === errors; + } else { + var valid4 = true; + } + } + } + } else { + validate213.errors = [ + { + instancePath: instancePath + '/devices/' + i0, + schemaPath: '#/allOf/1/properties/devices/items/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema198.allOf[1].properties.devices.items.type, + parentSchema: schema198.allOf[1].properties.devices.items, + data: data4, + }, + ]; + return false; + } + } + var valid3 = _errs12 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate213.errors = [ + { + instancePath: instancePath + '/devices', + schemaPath: '#/allOf/1/properties/devices/type', + keyword: 'type', + params: { type: 'array' }, + message: 'must be array', + schema: schema198.allOf[1].properties.devices.type, + parentSchema: schema198.allOf[1].properties.devices, + data: data3, + }, + ]; + return false; + } + } + } + } + } else { + validate213.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema198.allOf[1].type, + parentSchema: schema198.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } + validate213.errors = vErrors; + return errors === 0; +} +exports.validatePatchPeerconnectionDeviceStatusBodyRequest = validate214; +const schema199 = { + type: 'object', + properties: { + status: { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['status'], + 'x-standalone': false, + 'x-name': 'patchPeerconnectionDeviceStatusBodyRequest', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema_request', + 'x-schema-type': 'request', +}; +function validate214( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.status === undefined && (missing0 = 'status')) { + validate214.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema199.required, + parentSchema: schema199, + data, + }, + ]; + return false; + } else { + if (data.status !== undefined) { + let data0 = data.status; + if (typeof data0 !== 'string') { + validate214.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema199.properties.status.type, + parentSchema: schema199.properties.status, + data: data0, + }, + ]; + return false; + } + if ( + !( + data0 === 'new' || + data0 === 'connecting' || + data0 === 'connected' || + data0 === 'disconnected' || + data0 === 'failed' || + data0 === 'closed' + ) + ) { + validate214.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema199.properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema199.properties.status.enum, + parentSchema: schema199.properties.status, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate214.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema199.type, + parentSchema: schema199, + data, + }, + ]; + return false; + } + } + validate214.errors = vErrors; + return errors === 0; +} +exports.validatePatchPeerconnectionDeviceStatusBodyResponse = validate215; +const schema200 = { + type: 'object', + properties: { + status: { + title: 'Connection Status', + type: 'string', + description: 'The status of the peerconnection.', + enum: ['new', 'connecting', 'connected', 'disconnected', 'failed', 'closed'], + }, + }, + required: ['status'], + 'x-standalone': false, + 'x-name': 'patchPeerconnectionDeviceStatusBodyResponse', + 'x-location': + '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema_response', + 'x-schema-type': 'response', +}; +function validate215( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.status === undefined && (missing0 = 'status')) { + validate215.errors = [ + { + instancePath, + schemaPath: '#/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema200.required, + parentSchema: schema200, + data, + }, + ]; + return false; + } else { + if (data.status !== undefined) { + let data0 = data.status; + if (typeof data0 !== 'string') { + validate215.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema200.properties.status.type, + parentSchema: schema200.properties.status, + data: data0, + }, + ]; + return false; + } + if ( + !( + data0 === 'new' || + data0 === 'connecting' || + data0 === 'connected' || + data0 === 'disconnected' || + data0 === 'failed' || + data0 === 'closed' + ) + ) { + validate215.errors = [ + { + instancePath: instancePath + '/status', + schemaPath: '#/properties/status/enum', + keyword: 'enum', + params: { allowedValues: schema200.properties.status.enum }, + message: 'must be equal to one of the allowed values', + schema: schema200.properties.status.enum, + parentSchema: schema200.properties.status, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate215.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema200.type, + parentSchema: schema200, + data, + }, + ]; + return false; + } + } + validate215.errors = vErrors; + return errors === 0; +} diff --git a/services/booking/src/common/src/clients/device/basicValidation.d.cts b/services/booking/src/common/src/clients/device/basicValidation.d.cts index b204d6f0..ffc3951d 100644 --- a/services/booking/src/common/src/clients/device/basicValidation.d.cts +++ b/services/booking/src/common/src/clients/device/basicValidation.d.cts @@ -1,780 +1,779 @@ -export declare function validateAuthenticationMessage( - object: unknown -): AuthenticationMessage +export declare function validateAuthenticationMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): AuthenticationMessage; -export declare function validateConnectionStateChangedMessage( - object: unknown -): ConnectionStateChangedMessage +export declare function validateConnectionStateChangedMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStateChangedMessage; export declare function validateUserReference( - object: unknown -): UserReference + object: unknown, +): UserReference; export declare function validateDeviceOverview( - object: unknown -): DeviceOverview + object: unknown, +): DeviceOverview; -export declare function validateServiceDescription( - object: unknown -): ServiceDescription +export declare function validateServiceDescription< + T extends 'request' | 'response' | 'all', +>(object: unknown): ServiceDescription; -export declare function validateInstantiableCloudDevice( - object: unknown -): InstantiableCloudDevice +export declare function validateInstantiableCloudDevice< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDevice; export declare function validateTimeSlot( - object: unknown -): TimeSlot + object: unknown, +): TimeSlot; export declare function validateAvailability( - object: unknown -): Availability + object: unknown, +): Availability; export declare function validateConcreteDevice( - object: unknown -): ConcreteDevice + object: unknown, +): ConcreteDevice; -export declare function validateInstantiableBrowserDevice( - object: unknown -): InstantiableBrowserDevice +export declare function validateInstantiableBrowserDevice< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDevice; export declare function validateDeviceReference( - object: unknown -): DeviceReference + object: unknown, +): DeviceReference; export declare function validateDeviceGroup( - object: unknown -): DeviceGroup + object: unknown, +): DeviceGroup; export declare function validateDevice( - object: unknown -): Device + object: unknown, +): Device; export declare function validateCallback( - object: unknown -): Callback + object: unknown, +): Callback; export declare function validateEventCallback( - object: unknown -): EventCallback + object: unknown, +): EventCallback; -export declare function validateDeviceChangedEventCallback( - object: unknown -): DeviceChangedEventCallback +export declare function validateDeviceChangedEventCallback< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceChangedEventCallback; -export declare function validateDeviceOverviewUpdate( - object: unknown -): DeviceOverviewUpdate +export declare function validateDeviceOverviewUpdate< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceOverviewUpdate; -export declare function validateInstantiableCloudDeviceUpdate( - object: unknown -): InstantiableCloudDeviceUpdate +export declare function validateInstantiableCloudDeviceUpdate< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDeviceUpdate; -export declare function validateConcreteDeviceUpdate( - object: unknown -): ConcreteDeviceUpdate +export declare function validateConcreteDeviceUpdate< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConcreteDeviceUpdate; -export declare function validateInstantiableBrowserDeviceUpdate( - object: unknown -): InstantiableBrowserDeviceUpdate +export declare function validateInstantiableBrowserDeviceUpdate< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDeviceUpdate; -export declare function validateDeviceGroupUpdate( - object: unknown -): DeviceGroupUpdate +export declare function validateDeviceGroupUpdate< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceGroupUpdate; export declare function validateDeviceUpdate( - object: unknown -): DeviceUpdate + object: unknown, +): DeviceUpdate; -export declare function validateAvailabilityRule( - object: unknown -): AvailabilityRule +export declare function validateAvailabilityRule< + T extends 'request' | 'response' | 'all', +>(object: unknown): AvailabilityRule; export declare function validateMessage( - object: unknown -): Message + object: unknown, +): Message; export declare function validateCommandMessage( - object: unknown -): CommandMessage + object: unknown, +): CommandMessage; export declare function validateServiceConfig( - object: unknown -): ServiceConfig + object: unknown, +): ServiceConfig; -export declare function validateCreatePeerconnectionMessage( - object: unknown -): CreatePeerconnectionMessage +export declare function validateCreatePeerconnectionMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): CreatePeerconnectionMessage; -export declare function validateClosePeerconnectionMessage( - object: unknown -): ClosePeerconnectionMessage +export declare function validateClosePeerconnectionMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): ClosePeerconnectionMessage; -export declare function validateSignalingMessage( - object: unknown -): SignalingMessage +export declare function validateSignalingMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): SignalingMessage; -export declare function validateConfigurationMessage( - object: unknown -): ConfigurationMessage +export declare function validateConfigurationMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfigurationMessage; -export declare function validateExperimentStatusChangedMessage( - object: unknown -): ExperimentStatusChangedMessage +export declare function validateExperimentStatusChangedMessage< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentStatusChangedMessage; -export declare function validateConnectionStatus( - object: unknown -): ConnectionStatus +export declare function validateConnectionStatus< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStatus; -export declare function validatePeerconnectionCommon( - object: unknown -): PeerconnectionCommon +export declare function validatePeerconnectionCommon< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionCommon; -export declare function validatePeerconnectionOverview( - object: unknown -): PeerconnectionOverview +export declare function validatePeerconnectionOverview< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionOverview; -export declare function validateConfiguredDeviceReference( - object: unknown -): ConfiguredDeviceReference +export declare function validateConfiguredDeviceReference< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfiguredDeviceReference; export declare function validatePeerconnection( - object: unknown -): Peerconnection + object: unknown, +): Peerconnection; -export declare function validatePeerconnectionClosedEventCallback( - object: unknown -): PeerconnectionClosedEventCallback +export declare function validatePeerconnectionClosedEventCallback< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionClosedEventCallback; -export declare function validatePeerconnectionStatusChangedEventCallback( - object: unknown -): PeerconnectionStatusChangedEventCallback +export declare function validatePeerconnectionStatusChangedEventCallback< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionStatusChangedEventCallback; export declare function validateChangedUrl( - object: unknown -): ChangedUrl + object: unknown, +): ChangedUrl; export declare function validateDeviceId( - object: unknown -): DeviceId + object: unknown, +): DeviceId; export declare function validateFlatGroup( - object: unknown -): FlatGroup + object: unknown, +): FlatGroup; export declare function validateStartTime( - object: unknown -): StartTime + object: unknown, +): StartTime; export declare function validateEndTime( - object: unknown -): EndTime + object: unknown, +): EndTime; export declare function validateClosedUrl( - object: unknown -): ClosedUrl + object: unknown, +): ClosedUrl; -export declare function validateStatusChangedUrl( - object: unknown -): StatusChangedUrl +export declare function validateStatusChangedUrl< + T extends 'request' | 'response' | 'all', +>(object: unknown): StatusChangedUrl; -export declare function validatePeerconnectionId( - object: unknown -): PeerconnectionId +export declare function validatePeerconnectionId< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionId; export declare function validateDeviceUrl( - object: unknown -): DeviceUrl + object: unknown, +): DeviceUrl; -export declare function validateListDevicesResponse200( - object: unknown -): listDevicesResponse200 +export declare function validateListDevicesResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): listDevicesResponse200; -export declare function validateCreateDeviceBody( - object: unknown -): createDeviceBody +export declare function validateCreateDeviceBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceBody; -export declare function validateCreateDeviceResponse201( - object: unknown -): createDeviceResponse201 +export declare function validateCreateDeviceResponse201< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceResponse201; -export declare function validateGetDeviceResponse200( - object: unknown -): getDeviceResponse200 +export declare function validateGetDeviceResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceResponse200; -export declare function validateUpdateDeviceBody( - object: unknown -): updateDeviceBody +export declare function validateUpdateDeviceBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceBody; -export declare function validateUpdateDeviceResponse200( - object: unknown -): updateDeviceResponse200 +export declare function validateUpdateDeviceResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceResponse200; -export declare function validateInstantiateDeviceResponse201( - object: unknown -): instantiateDeviceResponse201 +export declare function validateInstantiateDeviceResponse201< + T extends 'request' | 'response' | 'all', +>(object: unknown): instantiateDeviceResponse201; -export declare function validateGetDeviceAvailabilityResponse200( - object: unknown -): getDeviceAvailabilityResponse200 +export declare function validateGetDeviceAvailabilityResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceAvailabilityResponse200; -export declare function validateAddDeviceAvailabilityRulesBody( - object: unknown -): addDeviceAvailabilityRulesBody +export declare function validateAddDeviceAvailabilityRulesBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesBody; -export declare function validateAddDeviceAvailabilityRulesResponse200( - object: unknown -): addDeviceAvailabilityRulesResponse200 +export declare function validateAddDeviceAvailabilityRulesResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesResponse200; -export declare function validateCreateWebsocketTokenResponse200( - object: unknown -): createWebsocketTokenResponse200 +export declare function validateCreateWebsocketTokenResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): createWebsocketTokenResponse200; -export declare function validateSendSignalingMessageBody( - object: unknown -): sendSignalingMessageBody +export declare function validateSendSignalingMessageBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): sendSignalingMessageBody; -export declare function validateListPeerconnectionsResponse200( - object: unknown -): listPeerconnectionsResponse200 +export declare function validateListPeerconnectionsResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): listPeerconnectionsResponse200; -export declare function validateCreatePeerconnectionBody( - object: unknown -): createPeerconnectionBody +export declare function validateCreatePeerconnectionBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionBody; -export declare function validateCreatePeerconnectionResponse201( - object: unknown -): createPeerconnectionResponse201 +export declare function validateCreatePeerconnectionResponse201< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse201; -export declare function validateCreatePeerconnectionResponse202( - object: unknown -): createPeerconnectionResponse202 +export declare function validateCreatePeerconnectionResponse202< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse202; -export declare function validateGetPeerconnectionResponse200( - object: unknown -): getPeerconnectionResponse200 +export declare function validateGetPeerconnectionResponse200< + T extends 'request' | 'response' | 'all', +>(object: unknown): getPeerconnectionResponse200; -export declare function validatePatchPeerconnectionDeviceStatusBody( - object: unknown -): patchPeerconnectionDeviceStatusBody +export declare function validatePatchPeerconnectionDeviceStatusBody< + T extends 'request' | 'response' | 'all', +>(object: unknown): patchPeerconnectionDeviceStatusBody; -export declare function validateAuthenticationMessageRequest( - object: unknown -): AuthenticationMessageRequest +export declare function validateAuthenticationMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): AuthenticationMessageRequest; -export declare function validateAuthenticationMessageResponse( - object: unknown -): AuthenticationMessageResponse +export declare function validateAuthenticationMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): AuthenticationMessageResponse; -export declare function validateConnectionStateChangedMessageRequest( - object: unknown -): ConnectionStateChangedMessageRequest +export declare function validateConnectionStateChangedMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStateChangedMessageRequest; -export declare function validateConnectionStateChangedMessageResponse( - object: unknown -): ConnectionStateChangedMessageResponse +export declare function validateConnectionStateChangedMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStateChangedMessageResponse; -export declare function validateUserReferenceRequest( - object: unknown -): UserReferenceRequest +export declare function validateUserReferenceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): UserReferenceRequest; -export declare function validateUserReferenceResponse( - object: unknown -): UserReferenceResponse +export declare function validateUserReferenceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): UserReferenceResponse; -export declare function validateDeviceOverviewRequest( - object: unknown -): DeviceOverviewRequest +export declare function validateDeviceOverviewRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceOverviewRequest; -export declare function validateDeviceOverviewResponse( - object: unknown -): DeviceOverviewResponse +export declare function validateDeviceOverviewResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceOverviewResponse; -export declare function validateServiceDescriptionRequest( - object: unknown -): ServiceDescriptionRequest +export declare function validateServiceDescriptionRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ServiceDescriptionRequest; -export declare function validateServiceDescriptionResponse( - object: unknown -): ServiceDescriptionResponse +export declare function validateServiceDescriptionResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ServiceDescriptionResponse; -export declare function validateInstantiableCloudDeviceRequest( - object: unknown -): InstantiableCloudDeviceRequest +export declare function validateInstantiableCloudDeviceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDeviceRequest; -export declare function validateInstantiableCloudDeviceResponse( - object: unknown -): InstantiableCloudDeviceResponse +export declare function validateInstantiableCloudDeviceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDeviceResponse; export declare function validateTimeSlotRequest( - object: unknown -): TimeSlotRequest + object: unknown, +): TimeSlotRequest; -export declare function validateTimeSlotResponse( - object: unknown -): TimeSlotResponse +export declare function validateTimeSlotResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): TimeSlotResponse; -export declare function validateAvailabilityRequest( - object: unknown -): AvailabilityRequest +export declare function validateAvailabilityRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): AvailabilityRequest; -export declare function validateAvailabilityResponse( - object: unknown -): AvailabilityResponse +export declare function validateAvailabilityResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): AvailabilityResponse; -export declare function validateConcreteDeviceRequest( - object: unknown -): ConcreteDeviceRequest +export declare function validateConcreteDeviceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConcreteDeviceRequest; -export declare function validateConcreteDeviceResponse( - object: unknown -): ConcreteDeviceResponse +export declare function validateConcreteDeviceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConcreteDeviceResponse; -export declare function validateInstantiableBrowserDeviceRequest( - object: unknown -): InstantiableBrowserDeviceRequest +export declare function validateInstantiableBrowserDeviceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDeviceRequest; -export declare function validateInstantiableBrowserDeviceResponse( - object: unknown -): InstantiableBrowserDeviceResponse +export declare function validateInstantiableBrowserDeviceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDeviceResponse; -export declare function validateDeviceReferenceRequest( - object: unknown -): DeviceReferenceRequest +export declare function validateDeviceReferenceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceReferenceRequest; -export declare function validateDeviceReferenceResponse( - object: unknown -): DeviceReferenceResponse +export declare function validateDeviceReferenceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceReferenceResponse; -export declare function validateDeviceGroupRequest( - object: unknown -): DeviceGroupRequest +export declare function validateDeviceGroupRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceGroupRequest; -export declare function validateDeviceGroupResponse( - object: unknown -): DeviceGroupResponse +export declare function validateDeviceGroupResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceGroupResponse; export declare function validateDeviceRequest( - object: unknown -): DeviceRequest + object: unknown, +): DeviceRequest; export declare function validateDeviceResponse( - object: unknown -): DeviceResponse + object: unknown, +): DeviceResponse; export declare function validateCallbackRequest( - object: unknown -): CallbackRequest + object: unknown, +): CallbackRequest; -export declare function validateCallbackResponse( - object: unknown -): CallbackResponse +export declare function validateCallbackResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): CallbackResponse; -export declare function validateEventCallbackRequest( - object: unknown -): EventCallbackRequest +export declare function validateEventCallbackRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): EventCallbackRequest; -export declare function validateEventCallbackResponse( - object: unknown -): EventCallbackResponse +export declare function validateEventCallbackResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): EventCallbackResponse; -export declare function validateDeviceChangedEventCallbackRequest( - object: unknown -): DeviceChangedEventCallbackRequest +export declare function validateDeviceChangedEventCallbackRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceChangedEventCallbackRequest; -export declare function validateDeviceChangedEventCallbackResponse( - object: unknown -): DeviceChangedEventCallbackResponse +export declare function validateDeviceChangedEventCallbackResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceChangedEventCallbackResponse; -export declare function validateDeviceOverviewUpdateRequest( - object: unknown -): DeviceOverviewUpdateRequest +export declare function validateDeviceOverviewUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceOverviewUpdateRequest; -export declare function validateDeviceOverviewUpdateResponse( - object: unknown -): DeviceOverviewUpdateResponse +export declare function validateDeviceOverviewUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceOverviewUpdateResponse; -export declare function validateInstantiableCloudDeviceUpdateRequest( - object: unknown -): InstantiableCloudDeviceUpdateRequest +export declare function validateInstantiableCloudDeviceUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDeviceUpdateRequest; -export declare function validateInstantiableCloudDeviceUpdateResponse( - object: unknown -): InstantiableCloudDeviceUpdateResponse +export declare function validateInstantiableCloudDeviceUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableCloudDeviceUpdateResponse; -export declare function validateConcreteDeviceUpdateRequest( - object: unknown -): ConcreteDeviceUpdateRequest +export declare function validateConcreteDeviceUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConcreteDeviceUpdateRequest; -export declare function validateConcreteDeviceUpdateResponse( - object: unknown -): ConcreteDeviceUpdateResponse +export declare function validateConcreteDeviceUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConcreteDeviceUpdateResponse; -export declare function validateInstantiableBrowserDeviceUpdateRequest( - object: unknown -): InstantiableBrowserDeviceUpdateRequest +export declare function validateInstantiableBrowserDeviceUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDeviceUpdateRequest; -export declare function validateInstantiableBrowserDeviceUpdateResponse( - object: unknown -): InstantiableBrowserDeviceUpdateResponse +export declare function validateInstantiableBrowserDeviceUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): InstantiableBrowserDeviceUpdateResponse; -export declare function validateDeviceGroupUpdateRequest( - object: unknown -): DeviceGroupUpdateRequest +export declare function validateDeviceGroupUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceGroupUpdateRequest; -export declare function validateDeviceGroupUpdateResponse( - object: unknown -): DeviceGroupUpdateResponse +export declare function validateDeviceGroupUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceGroupUpdateResponse; -export declare function validateDeviceUpdateRequest( - object: unknown -): DeviceUpdateRequest +export declare function validateDeviceUpdateRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceUpdateRequest; -export declare function validateDeviceUpdateResponse( - object: unknown -): DeviceUpdateResponse +export declare function validateDeviceUpdateResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceUpdateResponse; -export declare function validateAvailabilityRuleRequest( - object: unknown -): AvailabilityRuleRequest +export declare function validateAvailabilityRuleRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): AvailabilityRuleRequest; -export declare function validateAvailabilityRuleResponse( - object: unknown -): AvailabilityRuleResponse +export declare function validateAvailabilityRuleResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): AvailabilityRuleResponse; export declare function validateMessageRequest( - object: unknown -): MessageRequest + object: unknown, +): MessageRequest; export declare function validateMessageResponse( - object: unknown -): MessageResponse + object: unknown, +): MessageResponse; -export declare function validateCommandMessageRequest( - object: unknown -): CommandMessageRequest +export declare function validateCommandMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): CommandMessageRequest; -export declare function validateCommandMessageResponse( - object: unknown -): CommandMessageResponse +export declare function validateCommandMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): CommandMessageResponse; -export declare function validateServiceConfigRequest( - object: unknown -): ServiceConfigRequest +export declare function validateServiceConfigRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ServiceConfigRequest; -export declare function validateServiceConfigResponse( - object: unknown -): ServiceConfigResponse +export declare function validateServiceConfigResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ServiceConfigResponse; -export declare function validateCreatePeerconnectionMessageRequest( - object: unknown -): CreatePeerconnectionMessageRequest +export declare function validateCreatePeerconnectionMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): CreatePeerconnectionMessageRequest; -export declare function validateCreatePeerconnectionMessageResponse( - object: unknown -): CreatePeerconnectionMessageResponse +export declare function validateCreatePeerconnectionMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): CreatePeerconnectionMessageResponse; -export declare function validateClosePeerconnectionMessageRequest( - object: unknown -): ClosePeerconnectionMessageRequest +export declare function validateClosePeerconnectionMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ClosePeerconnectionMessageRequest; -export declare function validateClosePeerconnectionMessageResponse( - object: unknown -): ClosePeerconnectionMessageResponse +export declare function validateClosePeerconnectionMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ClosePeerconnectionMessageResponse; -export declare function validateSignalingMessageRequest( - object: unknown -): SignalingMessageRequest +export declare function validateSignalingMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): SignalingMessageRequest; -export declare function validateSignalingMessageResponse( - object: unknown -): SignalingMessageResponse +export declare function validateSignalingMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): SignalingMessageResponse; -export declare function validateConfigurationMessageRequest( - object: unknown -): ConfigurationMessageRequest +export declare function validateConfigurationMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfigurationMessageRequest; -export declare function validateConfigurationMessageResponse( - object: unknown -): ConfigurationMessageResponse +export declare function validateConfigurationMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfigurationMessageResponse; -export declare function validateExperimentStatusChangedMessageRequest( - object: unknown -): ExperimentStatusChangedMessageRequest +export declare function validateExperimentStatusChangedMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentStatusChangedMessageRequest; -export declare function validateExperimentStatusChangedMessageResponse( - object: unknown -): ExperimentStatusChangedMessageResponse +export declare function validateExperimentStatusChangedMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ExperimentStatusChangedMessageResponse; -export declare function validateConnectionStatusRequest( - object: unknown -): ConnectionStatusRequest +export declare function validateConnectionStatusRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStatusRequest; -export declare function validateConnectionStatusResponse( - object: unknown -): ConnectionStatusResponse +export declare function validateConnectionStatusResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConnectionStatusResponse; -export declare function validatePeerconnectionCommonRequest( - object: unknown -): PeerconnectionCommonRequest +export declare function validatePeerconnectionCommonRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionCommonRequest; -export declare function validatePeerconnectionCommonResponse( - object: unknown -): PeerconnectionCommonResponse +export declare function validatePeerconnectionCommonResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionCommonResponse; -export declare function validatePeerconnectionOverviewRequest( - object: unknown -): PeerconnectionOverviewRequest +export declare function validatePeerconnectionOverviewRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionOverviewRequest; -export declare function validatePeerconnectionOverviewResponse( - object: unknown -): PeerconnectionOverviewResponse +export declare function validatePeerconnectionOverviewResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionOverviewResponse; -export declare function validateConfiguredDeviceReferenceRequest( - object: unknown -): ConfiguredDeviceReferenceRequest +export declare function validateConfiguredDeviceReferenceRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfiguredDeviceReferenceRequest; -export declare function validateConfiguredDeviceReferenceResponse( - object: unknown -): ConfiguredDeviceReferenceResponse +export declare function validateConfiguredDeviceReferenceResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ConfiguredDeviceReferenceResponse; -export declare function validatePeerconnectionRequest( - object: unknown -): PeerconnectionRequest +export declare function validatePeerconnectionRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionRequest; -export declare function validatePeerconnectionResponse( - object: unknown -): PeerconnectionResponse +export declare function validatePeerconnectionResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionResponse; -export declare function validatePeerconnectionClosedEventCallbackRequest( - object: unknown -): PeerconnectionClosedEventCallbackRequest +export declare function validatePeerconnectionClosedEventCallbackRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionClosedEventCallbackRequest; -export declare function validatePeerconnectionClosedEventCallbackResponse( - object: unknown -): PeerconnectionClosedEventCallbackResponse +export declare function validatePeerconnectionClosedEventCallbackResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionClosedEventCallbackResponse; -export declare function validatePeerconnectionStatusChangedEventCallbackRequest( - object: unknown -): PeerconnectionStatusChangedEventCallbackRequest +export declare function validatePeerconnectionStatusChangedEventCallbackRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionStatusChangedEventCallbackRequest; -export declare function validatePeerconnectionStatusChangedEventCallbackResponse( - object: unknown -): PeerconnectionStatusChangedEventCallbackResponse +export declare function validatePeerconnectionStatusChangedEventCallbackResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionStatusChangedEventCallbackResponse; -export declare function validateChangedUrlRequest( - object: unknown -): ChangedUrlRequest +export declare function validateChangedUrlRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ChangedUrlRequest; -export declare function validateChangedUrlResponse( - object: unknown -): ChangedUrlResponse +export declare function validateChangedUrlResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ChangedUrlResponse; export declare function validateDeviceIdRequest( - object: unknown -): DeviceIdRequest + object: unknown, +): DeviceIdRequest; -export declare function validateDeviceIdResponse( - object: unknown -): DeviceIdResponse +export declare function validateDeviceIdResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceIdResponse; -export declare function validateFlatGroupRequest( - object: unknown -): FlatGroupRequest +export declare function validateFlatGroupRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): FlatGroupRequest; -export declare function validateFlatGroupResponse( - object: unknown -): FlatGroupResponse +export declare function validateFlatGroupResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): FlatGroupResponse; -export declare function validateStartTimeRequest( - object: unknown -): StartTimeRequest +export declare function validateStartTimeRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): StartTimeRequest; -export declare function validateStartTimeResponse( - object: unknown -): StartTimeResponse +export declare function validateStartTimeResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): StartTimeResponse; export declare function validateEndTimeRequest( - object: unknown -): EndTimeRequest + object: unknown, +): EndTimeRequest; export declare function validateEndTimeResponse( - object: unknown -): EndTimeResponse + object: unknown, +): EndTimeResponse; -export declare function validateClosedUrlRequest( - object: unknown -): ClosedUrlRequest +export declare function validateClosedUrlRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): ClosedUrlRequest; -export declare function validateClosedUrlResponse( - object: unknown -): ClosedUrlResponse +export declare function validateClosedUrlResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): ClosedUrlResponse; -export declare function validateStatusChangedUrlRequest( - object: unknown -): StatusChangedUrlRequest +export declare function validateStatusChangedUrlRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): StatusChangedUrlRequest; -export declare function validateStatusChangedUrlResponse( - object: unknown -): StatusChangedUrlResponse +export declare function validateStatusChangedUrlResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): StatusChangedUrlResponse; -export declare function validatePeerconnectionIdRequest( - object: unknown -): PeerconnectionIdRequest +export declare function validatePeerconnectionIdRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionIdRequest; -export declare function validatePeerconnectionIdResponse( - object: unknown -): PeerconnectionIdResponse +export declare function validatePeerconnectionIdResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): PeerconnectionIdResponse; -export declare function validateDeviceUrlRequest( - object: unknown -): DeviceUrlRequest +export declare function validateDeviceUrlRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceUrlRequest; -export declare function validateDeviceUrlResponse( - object: unknown -): DeviceUrlResponse +export declare function validateDeviceUrlResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): DeviceUrlResponse; -export declare function validateListDevicesResponse200Request( - object: unknown -): listDevicesResponse200Request +export declare function validateListDevicesResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): listDevicesResponse200Request; -export declare function validateListDevicesResponse200Response( - object: unknown -): listDevicesResponse200Response +export declare function validateListDevicesResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): listDevicesResponse200Response; -export declare function validateCreateDeviceBodyRequest( - object: unknown -): createDeviceBodyRequest +export declare function validateCreateDeviceBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceBodyRequest; -export declare function validateCreateDeviceBodyResponse( - object: unknown -): createDeviceBodyResponse +export declare function validateCreateDeviceBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceBodyResponse; -export declare function validateCreateDeviceResponse201Request( - object: unknown -): createDeviceResponse201Request +export declare function validateCreateDeviceResponse201Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceResponse201Request; -export declare function validateCreateDeviceResponse201Response( - object: unknown -): createDeviceResponse201Response +export declare function validateCreateDeviceResponse201Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): createDeviceResponse201Response; -export declare function validateGetDeviceResponse200Request( - object: unknown -): getDeviceResponse200Request +export declare function validateGetDeviceResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceResponse200Request; -export declare function validateGetDeviceResponse200Response( - object: unknown -): getDeviceResponse200Response +export declare function validateGetDeviceResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceResponse200Response; -export declare function validateUpdateDeviceBodyRequest( - object: unknown -): updateDeviceBodyRequest +export declare function validateUpdateDeviceBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceBodyRequest; -export declare function validateUpdateDeviceBodyResponse( - object: unknown -): updateDeviceBodyResponse +export declare function validateUpdateDeviceBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceBodyResponse; -export declare function validateUpdateDeviceResponse200Request( - object: unknown -): updateDeviceResponse200Request +export declare function validateUpdateDeviceResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceResponse200Request; -export declare function validateUpdateDeviceResponse200Response( - object: unknown -): updateDeviceResponse200Response +export declare function validateUpdateDeviceResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): updateDeviceResponse200Response; -export declare function validateInstantiateDeviceResponse201Request( - object: unknown -): instantiateDeviceResponse201Request +export declare function validateInstantiateDeviceResponse201Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): instantiateDeviceResponse201Request; -export declare function validateInstantiateDeviceResponse201Response( - object: unknown -): instantiateDeviceResponse201Response +export declare function validateInstantiateDeviceResponse201Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): instantiateDeviceResponse201Response; -export declare function validateGetDeviceAvailabilityResponse200Request( - object: unknown -): getDeviceAvailabilityResponse200Request +export declare function validateGetDeviceAvailabilityResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceAvailabilityResponse200Request; -export declare function validateGetDeviceAvailabilityResponse200Response( - object: unknown -): getDeviceAvailabilityResponse200Response +export declare function validateGetDeviceAvailabilityResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): getDeviceAvailabilityResponse200Response; -export declare function validateAddDeviceAvailabilityRulesBodyRequest( - object: unknown -): addDeviceAvailabilityRulesBodyRequest +export declare function validateAddDeviceAvailabilityRulesBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesBodyRequest; -export declare function validateAddDeviceAvailabilityRulesBodyResponse( - object: unknown -): addDeviceAvailabilityRulesBodyResponse +export declare function validateAddDeviceAvailabilityRulesBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesBodyResponse; -export declare function validateAddDeviceAvailabilityRulesResponse200Request( - object: unknown -): addDeviceAvailabilityRulesResponse200Request +export declare function validateAddDeviceAvailabilityRulesResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesResponse200Request; -export declare function validateAddDeviceAvailabilityRulesResponse200Response( - object: unknown -): addDeviceAvailabilityRulesResponse200Response +export declare function validateAddDeviceAvailabilityRulesResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): addDeviceAvailabilityRulesResponse200Response; -export declare function validateCreateWebsocketTokenResponse200Request( - object: unknown -): createWebsocketTokenResponse200Request +export declare function validateCreateWebsocketTokenResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): createWebsocketTokenResponse200Request; -export declare function validateCreateWebsocketTokenResponse200Response( - object: unknown -): createWebsocketTokenResponse200Response +export declare function validateCreateWebsocketTokenResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): createWebsocketTokenResponse200Response; -export declare function validateSendSignalingMessageBodyRequest( - object: unknown -): sendSignalingMessageBodyRequest +export declare function validateSendSignalingMessageBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): sendSignalingMessageBodyRequest; -export declare function validateSendSignalingMessageBodyResponse( - object: unknown -): sendSignalingMessageBodyResponse +export declare function validateSendSignalingMessageBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): sendSignalingMessageBodyResponse; -export declare function validateListPeerconnectionsResponse200Request( - object: unknown -): listPeerconnectionsResponse200Request +export declare function validateListPeerconnectionsResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): listPeerconnectionsResponse200Request; -export declare function validateListPeerconnectionsResponse200Response( - object: unknown -): listPeerconnectionsResponse200Response +export declare function validateListPeerconnectionsResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): listPeerconnectionsResponse200Response; -export declare function validateCreatePeerconnectionBodyRequest( - object: unknown -): createPeerconnectionBodyRequest +export declare function validateCreatePeerconnectionBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionBodyRequest; -export declare function validateCreatePeerconnectionBodyResponse( - object: unknown -): createPeerconnectionBodyResponse +export declare function validateCreatePeerconnectionBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionBodyResponse; -export declare function validateCreatePeerconnectionResponse201Request( - object: unknown -): createPeerconnectionResponse201Request +export declare function validateCreatePeerconnectionResponse201Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse201Request; -export declare function validateCreatePeerconnectionResponse201Response( - object: unknown -): createPeerconnectionResponse201Response +export declare function validateCreatePeerconnectionResponse201Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse201Response; -export declare function validateCreatePeerconnectionResponse202Request( - object: unknown -): createPeerconnectionResponse202Request +export declare function validateCreatePeerconnectionResponse202Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse202Request; -export declare function validateCreatePeerconnectionResponse202Response( - object: unknown -): createPeerconnectionResponse202Response +export declare function validateCreatePeerconnectionResponse202Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): createPeerconnectionResponse202Response; -export declare function validateGetPeerconnectionResponse200Request( - object: unknown -): getPeerconnectionResponse200Request +export declare function validateGetPeerconnectionResponse200Request< + T extends 'request' | 'response' | 'all', +>(object: unknown): getPeerconnectionResponse200Request; -export declare function validateGetPeerconnectionResponse200Response( - object: unknown -): getPeerconnectionResponse200Response +export declare function validateGetPeerconnectionResponse200Response< + T extends 'request' | 'response' | 'all', +>(object: unknown): getPeerconnectionResponse200Response; -export declare function validatePatchPeerconnectionDeviceStatusBodyRequest( - object: unknown -): patchPeerconnectionDeviceStatusBodyRequest - -export declare function validatePatchPeerconnectionDeviceStatusBodyResponse( - object: unknown -): patchPeerconnectionDeviceStatusBodyResponse +export declare function validatePatchPeerconnectionDeviceStatusBodyRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): patchPeerconnectionDeviceStatusBodyRequest; +export declare function validatePatchPeerconnectionDeviceStatusBodyResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): patchPeerconnectionDeviceStatusBodyResponse; diff --git a/services/booking/src/common/src/clients/device/client.ts b/services/booking/src/common/src/clients/device/client.ts index c644f942..d7eac077 100644 --- a/services/booking/src/common/src/clients/device/client.ts +++ b/services/booking/src/common/src/clients/device/client.ts @@ -5,28 +5,28 @@ */ /* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/ban-ts-comment */ -import fetch, { RequestInfo, RequestInit, Response } from "node-fetch"; +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; import * as RequestValidation from './requestValidation.js'; import * as Signatures from './signatures.js'; import * as Types from './types.js'; // @ts-ignore -import { type Require } from "./types.js" +import { type Require } from './types.js'; /** * This error class should be used if an error occurs during validation of a request/response. * @category Errors */ export class ValidationError extends Error { - public errors: unknown + public errors: unknown; - constructor(message: string, errors: unknown) { - super(message) - this.name = "ValidationError" - this.errors = errors - } + constructor(message: string, errors: unknown) { + super(message); + this.name = 'ValidationError'; + this.errors = errors; + } } /** @@ -34,25 +34,25 @@ export class ValidationError extends Error { * @category Errors */ export class FetchError extends Error { - constructor(message: string) { - super(message) - this.name = "FetchError" - } + constructor(message: string) { + super(message); + this.name = 'FetchError'; + } } /** - * This error class should be used if the response of the server has a status + * This error class should be used if the response of the server has a status * greater than or equal to 400. This error should contain the validated response. * @category Errors */ export class UnsuccessfulRequestError extends Error { - public response: Types.ResponseData + public response: Types.ResponseData; - constructor(message: string, response: Types.ResponseData) { - super(message) - this.response = response - this.name = 'UnsuccessfulRequestError' - } + constructor(message: string, response: Types.ResponseData) { + super(message); + this.response = response; + this.name = 'UnsuccessfulRequestError'; + } } /** @@ -60,24 +60,24 @@ export class UnsuccessfulRequestError extends Error { * @category Errors */ export class InvalidUrlError extends Error { - constructor(message: string) { - super(message) - this.name = 'InvalidUrlError' - } + constructor(message: string) { + super(message); + this.name = 'InvalidUrlError'; + } } /** * This function attempts to parse a Response as ResponseData. */ async function parseResponse(response: Response): Promise { - let text = null - try { - text = await response.text() - const json = JSON.parse(text) - return { status: response.status, body: json } - } catch { - return { status: response.status, body: text } - } + let text = null; + try { + text = await response.text(); + const json = JSON.parse(text); + return { status: response.status, body: json }; + } catch { + return { status: response.status, body: text }; + } } /** @@ -86,15 +86,15 @@ async function parseResponse(response: Response): Promise { * @returns True if the string is a valid http url. */ function isValidHttpUrl(string: string) { - let url + let url; - try { - url = new URL(string) - } catch (_) { - return false - } + try { + url = new URL(string); + } catch (_) { + return false; + } - return url.protocol === 'http:' || url.protocol === 'https:' + return url.protocol === 'http:' || url.protocol === 'https:'; } /** @@ -108,15 +108,13 @@ function isValidHttpUrl(string: string) { * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)' - const regex = new RegExp( - endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$' - ) - const matches = url.match(regex) + const parameterRegex = '([a-zA-Z0-9-:]+)'; + const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); + const matches = url.match(regex); - if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint') + if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint'); - return matches.slice(1) + return matches.slice(1); } /** @@ -129,23 +127,10 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { +function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!(url).startsWith(baseUrl)) - throw new InvalidUrlError(`Provided url "${url}" does not start with the provided base url "${baseUrl}"`); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError(`Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`); - - return pathParameters; + throw new InvalidUrlError('Provided url is not a valid http url'); + return parsePathParameters(url, endpoint); } /** @@ -161,7 +146,7 @@ function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { * @returns The url with the appended endpoint. */ function appendToUrl(url: string, endpoint: string) { - return url.endsWith('/') ? `${url.slice(0, -1)}${endpoint}` : `${url}${endpoint}` + return url.endsWith('/') ? `${url.slice(0, -1)}${endpoint}` : `${url}${endpoint}`; } /** @@ -169,1245 +154,1415 @@ function appendToUrl(url: string, endpoint: string) { * @category Client */ export class Client { - public readonly baseUrl: string; - public readonly serviceUrl: string; - public accessToken: string; - private fixedHeaders: [string, string][] - private fetch = async (url: RequestInfo | URL, init: RequestInit) => { - let raw_response; - const parsedUrl = new URL(url.toString()) - try { - if ( - parsedUrl.toString().startsWith(this.baseUrl) || - parsedUrl.toString().startsWith(this.serviceUrl) - ) { - raw_response = await fetch(url, init); - } else { - raw_response = await fetch( - appendToUrl( - this.baseUrl, - '/proxy?' + new URLSearchParams([['URL', url.toString()]]).toString(), - ), - init, - ); - } - } catch (error) { - if (error instanceof Error) { - throw new FetchError(error.message); - } else if (typeof error === 'string') { - throw new FetchError(error); - } else { - throw new FetchError('Something went wrong while trying to fetch the request'); - } - } - return await parseResponse(raw_response); - }; - - /** - * @category Constructors - */ - constructor( - baseUrl: string, - options: { serviceUrl?: string; accessToken?: string, fixedHeaders?: [string, string][] }, - ) { - this.baseUrl = new URL(baseUrl).toString().slice(0, -1); - this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); - this.accessToken = options.accessToken ?? ''; - this.fixedHeaders = options.fixedHeaders ?? []; - } - - /** - * List devices - * - * @param options.url - * Url of the to be used. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The list of all devices. - */ - public async listDevices( - options?: { - headers?: [string, string][],url?: string}): Promise { - const url = appendToUrl(options?.url ?? this.baseUrl, "/devices") - console.log("trying to fetch url:", url); - - - - - - if (!RequestValidation.validateListDevicesInput()) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateListDevicesInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { - method: "GET", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ] - }) - - if (!RequestValidation.validateListDevicesOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateListDevicesOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - - return response.body - } - - /** - * Create a new device - * - * @param device - * The device to be created. - * @param options.changedUrl - * **An URL that will be called once the device changes.** - * - * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed - * as long as every callback resolves with a successful status code. - * - * If the callback fails the url MIGHT not be called in the future. - * - * There can be multiple callbacks registered with the same device. - * @param options.url - * Url of the to be used. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The device was created. A JSON representation of the new device is returned. - */ - public async createDevice(device: Types.Device<"request">, - options?: { - headers?: [string, string][],changedUrl?: string,url?: string}): Promise { - const url = appendToUrl(options?.url ?? this.baseUrl, "/devices") - console.log("trying to fetch url:", url); - - const body = device - - - const parameters = { - changedUrl: options?.changedUrl, - } - - const query: [string,string][] = [] - - if (parameters["changedUrl"]) - query.push(["changedUrl", parameters["changedUrl"].toString()]) - - if (!RequestValidation.validateCreateDeviceInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateCreateDeviceInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { - method: "POST", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ], - body: JSON.stringify(body) - }) - - if (!RequestValidation.validateCreateDeviceOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateCreateDeviceOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - - return response.body - } - - /** - * View a registered device - * - * @param url - * Url of the resource to be accessed. - * @param options.flat_group - * If true the returned device group will only contain concrete devices. I.e. any subgroups will be flattend. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the device. - */ - public async getDevice(url: string, - options?: { - headers?: [string, string][],flat_group?: boolean,}): Promise { - const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}') - console.log("trying to fetch url:", url); - - - - - const parameters = { - device_id: device_id, - flat_group: options?.flat_group, - } - - const query: [string,string][] = [] - - if (parameters["flat_group"]) - query.push(["flat_group", parameters["flat_group"].toString()]) - - if (!RequestValidation.validateGetDeviceInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateGetDeviceInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { - method: "GET", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ] - }) - - if (!RequestValidation.validateGetDeviceOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateGetDeviceOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - - return response.body + public readonly baseUrl: string; + public readonly serviceUrl: string; + public accessToken: string; + private fixedHeaders: [string, string][]; + private fetch = async (url: RequestInfo | URL, init: RequestInit) => { + let raw_response; + const parsedUrl = new URL(url.toString()); + try { + if ( + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) + ) { + raw_response = await fetch(url, init); + } else { + raw_response = await fetch( + appendToUrl( + this.baseUrl, + '/proxy?' + new URLSearchParams([['URL', url.toString()]]).toString(), + ), + init, + ); + } + } catch (error) { + if (error instanceof Error) { + throw new FetchError(error.message); + } else if (typeof error === 'string') { + throw new FetchError(error); + } else { + throw new FetchError('Something went wrong while trying to fetch the request'); + } } + return await parseResponse(raw_response); + }; + + /** + * @category Constructors + */ + constructor( + baseUrl: string, + options: { + serviceUrl?: string; + accessToken?: string; + fixedHeaders?: [string, string][]; + }, + ) { + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); + this.accessToken = options.accessToken ?? ''; + this.fixedHeaders = options.fixedHeaders ?? []; + } + + /** + * List devices + * + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The list of all devices. + */ + public async listDevices(options?: { + headers?: [string, string][]; + url?: string; + }): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); + console.log('trying to fetch url:', url); + + if (!RequestValidation.validateListDevicesInput()) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateListDevicesInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateListDevicesOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateListDevicesOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Create a new device + * + * @param device + * The device to be created. + * @param options.changedUrl + * **An URL that will be called once the device changes.** + * + * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed + * as long as every callback resolves with a successful status code. + * + * If the callback fails the url MIGHT not be called in the future. + * + * There can be multiple callbacks registered with the same device. + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The device was created. A JSON representation of the new device is returned. + */ + public async createDevice( + device: Types.Device<'request'>, + options?: { + headers?: [string, string][]; + changedUrl?: string; + url?: string; + }, + ): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/devices'); + console.log('trying to fetch url:', url); + + const body = device; + + const parameters = { + changedUrl: options?.changedUrl, + }; - /** - * Update an existing device - * - * @param url - * Url of the resource to be accessed. - * @param deviceUpdate - * Updated device. - * @param options.changedUrl - * **An URL that will be called once the device changes.** - * - * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed - * as long as every callback resolves with a successful status code. - * - * If the callback fails the url MIGHT not be called in the future. - * - * There can be multiple callbacks registered with the same device. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the changed device. - */ - public async updateDevice(url: string,deviceUpdate: Types.DeviceUpdate<"request"> | undefined, - options?: { - headers?: [string, string][],changedUrl?: string,}): Promise { - const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}') - console.log("trying to fetch url:", url); - - const body = deviceUpdate - - - const parameters = { - device_id: device_id, - changedUrl: options?.changedUrl, - } - - const query: [string,string][] = [] - - if (parameters["changedUrl"]) - query.push(["changedUrl", parameters["changedUrl"].toString()]) - - if (!RequestValidation.validateUpdateDeviceInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateUpdateDeviceInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { - method: "PATCH", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ], - body: JSON.stringify(body) - }) - - if (!RequestValidation.validateUpdateDeviceOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateUpdateDeviceOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - - return response.body - } + const query: [string, string][] = []; + + if (parameters['changedUrl']) + query.push(['changedUrl', parameters['changedUrl'].toString()]); + + if (!RequestValidation.validateCreateDeviceInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateCreateDeviceInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); + + if (!RequestValidation.validateCreateDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateCreateDeviceOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * View a registered device + * + * @param url + * Url of the resource to be accessed. + * @param options.flat_group + * If true the returned device group will only contain concrete devices. I.e. any subgroups will be flattend. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the device. + */ + public async getDevice( + url: string, + options?: { + headers?: [string, string][]; + flat_group?: boolean; + }, + ): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); + console.log('trying to fetch url:', url); + + const parameters = { + device_id: device_id, + flat_group: options?.flat_group, + }; - /** - * Delete a registered device - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The device was deleted. - */ - public async deleteDevice(url: string, - options?: { - headers?: [string, string][],}): Promise { - const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}') - console.log("trying to fetch url:", url); - - - - - const parameters = { - device_id: device_id, - } - - if (!RequestValidation.validateDeleteDeviceInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateDeleteDeviceInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { - method: "DELETE", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ] - }) - - if (!RequestValidation.validateDeleteDeviceOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateDeleteDeviceOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - } + const query: [string, string][] = []; + + if (parameters['flat_group']) + query.push(['flat_group', parameters['flat_group'].toString()]); + + if (!RequestValidation.validateGetDeviceInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateGetDeviceInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateGetDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateGetDeviceOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Update an existing device + * + * @param url + * Url of the resource to be accessed. + * @param deviceUpdate + * Updated device. + * @param options.changedUrl + * **An URL that will be called once the device changes.** + * + * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed + * as long as every callback resolves with a successful status code. + * + * If the callback fails the url MIGHT not be called in the future. + * + * There can be multiple callbacks registered with the same device. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the changed device. + */ + public async updateDevice( + url: string, + deviceUpdate: Types.DeviceUpdate<'request'> | undefined, + options?: { + headers?: [string, string][]; + changedUrl?: string; + }, + ): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); + console.log('trying to fetch url:', url); + + const body = deviceUpdate; + + const parameters = { + device_id: device_id, + changedUrl: options?.changedUrl, + }; - /** - * Instantiate a cloud instantiable device - * - * @param url - * Url of the resource to be accessed. - * @param options.changedUrl - * **An URL that will be called once the device changes.** - * - * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed - * as long as every callback resolves with a successful status code. - * - * If the callback fails the url MIGHT not be called in the future. - * - * There can be multiple callbacks registered with the same device. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the created instance. - */ - public async instantiateDevice(url: string, - options?: { - headers?: [string, string][],changedUrl?: string,}): Promise { - const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}') - console.log("trying to fetch url:", url); - - - - - const parameters = { - device_id: device_id, - changedUrl: options?.changedUrl, - } - - const query: [string,string][] = [] - - if (parameters["changedUrl"]) - query.push(["changedUrl", parameters["changedUrl"].toString()]) - - if (!RequestValidation.validateInstantiateDeviceInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateInstantiateDeviceInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { - method: "POST", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ] - }) - - if (!RequestValidation.validateInstantiateDeviceOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateInstantiateDeviceOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - - return response.body - } + const query: [string, string][] = []; + + if (parameters['changedUrl']) + query.push(['changedUrl', parameters['changedUrl'].toString()]); + + if (!RequestValidation.validateUpdateDeviceInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateUpdateDeviceInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + { + method: 'PATCH', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); + + if (!RequestValidation.validateUpdateDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateUpdateDeviceOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Delete a registered device + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The device was deleted. + */ + public async deleteDevice( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); + console.log('trying to fetch url:', url); + + const parameters = { + device_id: device_id, + }; - /** - * Get the availability of a device - * - * @param url - * Url of the resource to be accessed. - * @param options.startTime - * Start time of the requested availability - * @param options.endTime - * End time of the requested availability - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the availability of the device. - */ - public async getDeviceAvailability(url: string, - options?: { - headers?: [string, string][],startTime?: string,endTime?: string,}): Promise { - const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}/availability') - console.log("trying to fetch url:", url); - - - - - const parameters = { - device_id: device_id, - startTime: options?.startTime, - endTime: options?.endTime, - } - - const query: [string,string][] = [] - - if (parameters["startTime"]) - query.push(["startTime", parameters["startTime"].toString()]) - - if (parameters["endTime"]) - query.push(["endTime", parameters["endTime"].toString()]) - - if (!RequestValidation.validateGetDeviceAvailabilityInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateGetDeviceAvailabilityInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { - method: "GET", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ] - }) - - if (!RequestValidation.validateGetDeviceAvailabilityOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateGetDeviceAvailabilityOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - - return response.body - } + if (!RequestValidation.validateDeleteDeviceInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + (RequestValidation.validateDeleteDeviceInput as Types.FunctionWithErrors).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateDeleteDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + (RequestValidation.validateDeleteDeviceOutput as Types.FunctionWithErrors).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Instantiate a cloud instantiable device + * + * @param url + * Url of the resource to be accessed. + * @param options.changedUrl + * **An URL that will be called once the device changes.** + * + * Once the device was given a changedUrl parameter the contained URL will be called every time a device is changed + * as long as every callback resolves with a successful status code. + * + * If the callback fails the url MIGHT not be called in the future. + * + * There can be multiple callbacks registered with the same device. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the created instance. + */ + public async instantiateDevice( + url: string, + options?: { + headers?: [string, string][]; + changedUrl?: string; + }, + ): Promise { + const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); + console.log('trying to fetch url:', url); + + const parameters = { + device_id: device_id, + changedUrl: options?.changedUrl, + }; - /** - * Delete the availability rules of a device - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The availability rules of the device were deleted successfully. - */ - public async deleteDeviceAvailabilityRules(url: string, - options?: { - headers?: [string, string][],}): Promise { - const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}/availability') - console.log("trying to fetch url:", url); - - - - - const parameters = { - device_id: device_id, - } - - if (!RequestValidation.validateDeleteDeviceAvailabilityRulesInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateDeleteDeviceAvailabilityRulesInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { - method: "DELETE", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ] - }) - - if (!RequestValidation.validateDeleteDeviceAvailabilityRulesOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateDeleteDeviceAvailabilityRulesOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - } + const query: [string, string][] = []; + + if (parameters['changedUrl']) + query.push(['changedUrl', parameters['changedUrl'].toString()]); + + if (!RequestValidation.validateInstantiateDeviceInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateInstantiateDeviceInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateInstantiateDeviceOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateInstantiateDeviceOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Get the availability of a device + * + * @param url + * Url of the resource to be accessed. + * @param options.startTime + * Start time of the requested availability + * @param options.endTime + * End time of the requested availability + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the availability of the device. + */ + public async getDeviceAvailability( + url: string, + options?: { + headers?: [string, string][]; + startTime?: string; + endTime?: string; + }, + ): Promise { + const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/availability'); + console.log('trying to fetch url:', url); + + const parameters = { + device_id: device_id, + startTime: options?.startTime, + endTime: options?.endTime, + }; - /** - * Add availability rules for a device - * - * @param url - * Url of the resource to be accessed. - * @param availabilityRules - * The availability rules to be applied. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the changed availability. - */ - public async addDeviceAvailabilityRules(url: string,availabilityRules: Types.AvailabilityRule<"request">[] | undefined, - options?: { - headers?: [string, string][],}): Promise { - const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}/availability') - console.log("trying to fetch url:", url); - - const body = availabilityRules - - - const parameters = { - device_id: device_id, - } - - if (!RequestValidation.validateAddDeviceAvailabilityRulesInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateAddDeviceAvailabilityRulesInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { - method: "POST", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ], - body: JSON.stringify(body) - }) - - if (!RequestValidation.validateAddDeviceAvailabilityRulesOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateAddDeviceAvailabilityRulesOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - - return response.body - } + const query: [string, string][] = []; + + if (parameters['startTime']) + query.push(['startTime', parameters['startTime'].toString()]); + + if (parameters['endTime']) query.push(['endTime', parameters['endTime'].toString()]); + + if (!RequestValidation.validateGetDeviceAvailabilityInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateGetDeviceAvailabilityInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateGetDeviceAvailabilityOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateGetDeviceAvailabilityOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Delete the availability rules of a device + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The availability rules of the device were deleted successfully. + */ + public async deleteDeviceAvailabilityRules( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/availability'); + console.log('trying to fetch url:', url); + + const parameters = { + device_id: device_id, + }; - /** - * Create new websocket token for device - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The newly generated websocket token for the device. - */ - public async createWebsocketToken(url: string, - options?: { - headers?: [string, string][],}): Promise { - const urlSuffix = '/devices/{}/websocket'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}/websocket') - console.log("trying to fetch url:", url); - - - - - const parameters = { - device_id: device_id, - } - - if (!RequestValidation.validateCreateWebsocketTokenInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateCreateWebsocketTokenInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { - method: "POST", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ] - }) - - if (!RequestValidation.validateCreateWebsocketTokenOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateCreateWebsocketTokenOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - - return response.body - } + if (!RequestValidation.validateDeleteDeviceAvailabilityRulesInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateDeleteDeviceAvailabilityRulesInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateDeleteDeviceAvailabilityRulesOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateDeleteDeviceAvailabilityRulesOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Add availability rules for a device + * + * @param url + * Url of the resource to be accessed. + * @param availabilityRules + * The availability rules to be applied. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the changed availability. + */ + public async addDeviceAvailabilityRules( + url: string, + availabilityRules: Types.AvailabilityRule<'request'>[] | undefined, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/availability'); + console.log('trying to fetch url:', url); + + const body = availabilityRules; + + const parameters = { + device_id: device_id, + }; - /** - * Send signaling message to device - * - * @param url - * Url of the resource to be accessed. - * @param sigMessage - * The signaling message to be sent. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The signaling message was delivered successfully. - */ - public async sendSignalingMessage(url: string,sigMessage: Types.CreatePeerconnectionMessage<"request"> | Types.ClosePeerconnectionMessage<"request"> | Types.SignalingMessage<"request"> | Types.ConfigurationMessage<"request"> | Types.ExperimentStatusChangedMessage<"request">, - options?: { - headers?: [string, string][],}): Promise { - const urlSuffix = '/devices/{}/signaling'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}/signaling') - console.log("trying to fetch url:", url); - - const body = sigMessage - - - const parameters = { - device_id: device_id, - } - - if (!RequestValidation.validateSendSignalingMessageInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateSendSignalingMessageInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { - method: "POST", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ], - body: JSON.stringify(body) - }) - - if (!RequestValidation.validateSendSignalingMessageOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateSendSignalingMessageOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - } + if (!RequestValidation.validateAddDeviceAvailabilityRulesInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateAddDeviceAvailabilityRulesInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); + + if (!RequestValidation.validateAddDeviceAvailabilityRulesOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateAddDeviceAvailabilityRulesOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Create new websocket token for device + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The newly generated websocket token for the device. + */ + public async createWebsocketToken( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/devices/{}/websocket'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/websocket'); + console.log('trying to fetch url:', url); + + const parameters = { + device_id: device_id, + }; - /** - * List Peer Connection - * - * @param options.url - * Url of the to be used. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The list of all peerconnections. - */ - public async listPeerconnections( - options?: { - headers?: [string, string][],url?: string}): Promise { - const url = appendToUrl(options?.url ?? this.baseUrl, "/peerconnections") - console.log("trying to fetch url:", url); - - - - - - if (!RequestValidation.validateListPeerconnectionsInput()) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateListPeerconnectionsInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { - method: "GET", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ] - }) - - if (!RequestValidation.validateListPeerconnectionsOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateListPeerconnectionsOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - - return response.body - } + if (!RequestValidation.validateCreateWebsocketTokenInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateCreateWebsocketTokenInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateCreateWebsocketTokenOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateCreateWebsocketTokenOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Send signaling message to device + * + * @param url + * Url of the resource to be accessed. + * @param sigMessage + * The signaling message to be sent. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The signaling message was delivered successfully. + */ + public async sendSignalingMessage( + url: string, + sigMessage: + | Types.CreatePeerconnectionMessage<'request'> + | Types.ClosePeerconnectionMessage<'request'> + | Types.SignalingMessage<'request'> + | Types.ConfigurationMessage<'request'> + | Types.ExperimentStatusChangedMessage<'request'>, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/devices/{}/signaling'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/signaling'); + console.log('trying to fetch url:', url); + + const body = sigMessage; + + const parameters = { + device_id: device_id, + }; - /** - * Create a new Peer Connection - * - * @param peerconnection - * The peerconnection to be created. - * @param options.closedUrl - * An URL that will be called once the peer connection is closed. - * @param options.statusChangedUrl - * An URL that will be called if the status of the peerconnection changes. - * @param options.url - * Url of the to be used. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * 201: The peerconnection was created. A JSON representation of the new peer connection is returned. - * 202: The device service will attempt to create the peerconnection as soon as possible. - */ - public async createPeerconnection(peerconnection: Types.Peerconnection<"request">, - options?: { - headers?: [string, string][],closedUrl?: string,statusChangedUrl?: string,url?: string}): Promise { - const url = appendToUrl(options?.url ?? this.baseUrl, "/peerconnections") - console.log("trying to fetch url:", url); - - const body = peerconnection - - - const parameters = { - closedUrl: options?.closedUrl, - statusChangedUrl: options?.statusChangedUrl, - } - - const query: [string,string][] = [] - - if (parameters["closedUrl"]) - query.push(["closedUrl", parameters["closedUrl"].toString()]) - - if (parameters["statusChangedUrl"]) - query.push(["statusChangedUrl", parameters["statusChangedUrl"].toString()]) - - if (!RequestValidation.validateCreatePeerconnectionInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateCreatePeerconnectionInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { - method: "POST", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ], - body: JSON.stringify(body) - }) - - if (!RequestValidation.validateCreatePeerconnectionOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateCreatePeerconnectionOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - - return response.body - } + if (!RequestValidation.validateSendSignalingMessageInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateSendSignalingMessageInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); + + if (!RequestValidation.validateSendSignalingMessageOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateSendSignalingMessageOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * List Peer Connection + * + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The list of all peerconnections. + */ + public async listPeerconnections(options?: { + headers?: [string, string][]; + url?: string; + }): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); + console.log('trying to fetch url:', url); + + if (!RequestValidation.validateListPeerconnectionsInput()) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateListPeerconnectionsInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateListPeerconnectionsOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateListPeerconnectionsOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Create a new Peer Connection + * + * @param peerconnection + * The peerconnection to be created. + * @param options.closedUrl + * An URL that will be called once the peer connection is closed. + * @param options.statusChangedUrl + * An URL that will be called if the status of the peerconnection changes. + * @param options.url + * Url of the to be used. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * 201: The peerconnection was created. A JSON representation of the new peer connection is returned. + * 202: The device service will attempt to create the peerconnection as soon as possible. + */ + public async createPeerconnection( + peerconnection: Types.Peerconnection<'request'>, + options?: { + headers?: [string, string][]; + closedUrl?: string; + statusChangedUrl?: string; + url?: string; + }, + ): Promise { + const url = appendToUrl(options?.url ?? this.baseUrl, '/peerconnections'); + console.log('trying to fetch url:', url); + + const body = peerconnection; + + const parameters = { + closedUrl: options?.closedUrl, + statusChangedUrl: options?.statusChangedUrl, + }; - /** - * View a peer connection - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * The JSON Representation of the device peer connection. - */ - public async getPeerconnection(url: string, - options?: { - headers?: [string, string][],}): Promise { - const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [peerconnection_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/peerconnections/{}') - console.log("trying to fetch url:", url); - - - - - const parameters = { - peerconnection_id: peerconnection_id, - } - - if (!RequestValidation.validateGetPeerconnectionInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateGetPeerconnectionInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { - method: "GET", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ] - }) - - if (!RequestValidation.validateGetPeerconnectionOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateGetPeerconnectionOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - - return response.body - } + const query: [string, string][] = []; + + if (parameters['closedUrl']) + query.push(['closedUrl', parameters['closedUrl'].toString()]); + + if (parameters['statusChangedUrl']) + query.push(['statusChangedUrl', parameters['statusChangedUrl'].toString()]); + + if (!RequestValidation.validateCreatePeerconnectionInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateCreatePeerconnectionInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + { + method: 'POST', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); + + if (!RequestValidation.validateCreatePeerconnectionOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateCreatePeerconnectionOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * View a peer connection + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * The JSON Representation of the device peer connection. + */ + public async getPeerconnection( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [peerconnection_id] = validateUrl( + new URL(url).toString(), + '/peerconnections/{}', + ); + console.log('trying to fetch url:', url); + + const parameters = { + peerconnection_id: peerconnection_id, + }; - /** - * Delete a peer connection - * - * @param url - * Url of the resource to be accessed. - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * 202: The peerconnection will be deleted as soon as it's closed. - * 204: The peerconnection was deleted successfully. - */ - public async deletePeerconnection(url: string, - options?: { - headers?: [string, string][],}): Promise { - const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [peerconnection_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/peerconnections/{}') - console.log("trying to fetch url:", url); - - - - - const parameters = { - peerconnection_id: peerconnection_id, - } - - if (!RequestValidation.validateDeletePeerconnectionInput(parameters)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validateDeletePeerconnectionInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { - method: "DELETE", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ] - }) - - if (!RequestValidation.validateDeletePeerconnectionOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validateDeletePeerconnectionOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - } + if (!RequestValidation.validateGetPeerconnectionInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateGetPeerconnectionInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'GET', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateGetPeerconnectionOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateGetPeerconnectionOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + + return response.body; + } + + /** + * Delete a peer connection + * + * @param url + * Url of the resource to be accessed. + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * 202: The peerconnection will be deleted as soon as it's closed. + * 204: The peerconnection was deleted successfully. + */ + public async deletePeerconnection( + url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [peerconnection_id] = validateUrl( + new URL(url).toString(), + '/peerconnections/{}', + ); + console.log('trying to fetch url:', url); + + const parameters = { + peerconnection_id: peerconnection_id, + }; - /** - * Sets the peerconnection status of a single device. - * - * @param url - * Url of the resource to be accessed. - * @param body - * The JSON Representation of the device peer connection. - * @param device_url - * URL of the device - * - * @throws {@link FetchError | FetchError } - * Thrown if fetch fails. - * @throws {@link ValidationError | ValidationError } - * Thrown if the request/response validation fails. - * @throws {@link InvalidUrlError | InvalidUrlError } - * Thrown if the provided url is not valid for this request. - * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } - * Thrown if response is validated but has status greater than or equal to 400. - * - * @returns - * OK. - */ - public async patchPeerconnectionDeviceStatus(url: string,body: { - /** - * The status of the peerconnection. - */ - status: Types.ConnectionStatus<"request"> - [k: string]: unknown -},device_url: string, - options?: { - headers?: [string, string][],}): Promise { - const urlSuffix = '/peerconnections/{}/device_status'.split('{}').at(-1) ?? '' - if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [peerconnection_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/peerconnections/{}/device_status') - console.log("trying to fetch url:", url); - - - - - const parameters = { - peerconnection_id: peerconnection_id, - device_url: device_url, - } - - const query: [string,string][] = [] - - if (parameters["device_url"]) - query.push(["device_url", parameters["device_url"].toString()]) - - if (!RequestValidation.validatePatchPeerconnectionDeviceStatusInput(parameters, body)) - throw new ValidationError( - 'Request validation failed!', - (RequestValidation.validatePatchPeerconnectionDeviceStatusInput as Types.FunctionWithErrors).errors - ) - - const authorization: string = `Bearer ${this.accessToken}` - - console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); - const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { - method: "PATCH", - headers: [ - ["Content-Type", "application/json"], - ["Authorization", authorization], - ...this.fixedHeaders, - ...(options?.headers ?? []) - ], - body: JSON.stringify(body) - }) - - if (!RequestValidation.validatePatchPeerconnectionDeviceStatusOutput(response)) - throw new ValidationError( - 'Response validation failed!', - (RequestValidation.validatePatchPeerconnectionDeviceStatusOutput as Types.FunctionWithErrors).errors - ) - - if (Types.isErrorResponse(response)) - throw new UnsuccessfulRequestError( - `Server returned response with status ${response.status}`, - response - ) - - - } + if (!RequestValidation.validateDeletePeerconnectionInput(parameters)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validateDeletePeerconnectionInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl), + { + method: 'DELETE', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + }, + ); + + if (!RequestValidation.validateDeletePeerconnectionOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validateDeletePeerconnectionOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } + + /** + * Sets the peerconnection status of a single device. + * + * @param url + * Url of the resource to be accessed. + * @param body + * The JSON Representation of the device peer connection. + * @param device_url + * URL of the device + * + * @throws {@link FetchError | FetchError } + * Thrown if fetch fails. + * @throws {@link ValidationError | ValidationError } + * Thrown if the request/response validation fails. + * @throws {@link InvalidUrlError | InvalidUrlError } + * Thrown if the provided url is not valid for this request. + * @throws {@link UnsuccessfulRequestError | UnsuccessfulRequestError } + * Thrown if response is validated but has status greater than or equal to 400. + * + * @returns + * OK. + */ + public async patchPeerconnectionDeviceStatus( + url: string, + body: { + /** + * The status of the peerconnection. + */ + status: Types.ConnectionStatus<'request'>; + [k: string]: unknown; + }, + device_url: string, + options?: { + headers?: [string, string][]; + }, + ): Promise { + const urlSuffix = '/peerconnections/{}/device_status'.split('{}').at(-1) ?? ''; + if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); + const [peerconnection_id] = validateUrl( + new URL(url).toString(), + '/peerconnections/{}/device_status', + ); + console.log('trying to fetch url:', url); + + const parameters = { + peerconnection_id: peerconnection_id, + device_url: device_url, + }; - -} \ No newline at end of file + const query: [string, string][] = []; + + if (parameters['device_url']) + query.push(['device_url', parameters['device_url'].toString()]); + + if (!RequestValidation.validatePatchPeerconnectionDeviceStatusInput(parameters, body)) + throw new ValidationError( + 'Request validation failed!', + ( + RequestValidation.validatePatchPeerconnectionDeviceStatusInput as Types.FunctionWithErrors + ).errors, + ); + + const authorization: string = `Bearer ${this.accessToken}`; + + console.log( + 'trying to fetch url:', + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + ); + const response = await this.fetch( + new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + + '?' + + new URLSearchParams(query), + { + method: 'PATCH', + headers: [ + ['Content-Type', 'application/json'], + ['Authorization', authorization], + ...this.fixedHeaders, + ...(options?.headers ?? []), + ], + body: JSON.stringify(body), + }, + ); + + if (!RequestValidation.validatePatchPeerconnectionDeviceStatusOutput(response)) + throw new ValidationError( + 'Response validation failed!', + ( + RequestValidation.validatePatchPeerconnectionDeviceStatusOutput as Types.FunctionWithErrors + ).errors, + ); + + if (Types.isErrorResponse(response)) + throw new UnsuccessfulRequestError( + `Server returned response with status ${response.status}`, + response, + ); + } +} diff --git a/services/booking/src/common/src/clients/device/requestValidation.ts b/services/booking/src/common/src/clients/device/requestValidation.ts index 9f29fb6b..13992cce 100644 --- a/services/booking/src/common/src/clients/device/requestValidation.ts +++ b/services/booking/src/common/src/clients/device/requestValidation.ts @@ -3,1091 +3,1134 @@ * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, * and run openapi-codegeneration to regenerate this file. */ -import { FunctionWithErrors, ResponseData } from "./types.js" +import * as BasicValidation from './basicValidation.cjs'; +import * as Signatures from './signatures.js'; +import { FunctionWithErrors, ResponseData } from './types.js'; -import * as Signatures from "./signatures.js" - -import * as BasicValidation from "./basicValidation.cjs" /** * This function validates the inputs to listDevices() */ export function validateListDevicesInput() { - return true + return true; } /** * This function validates the outputs of listDevices() */ -export function validateListDevicesOutput(response: ResponseData): response is Signatures.ListDevicesResponse { - if (response.status < 100 || response.status >= 600) return false - - - if (response.status === 200) { - if (!BasicValidation.validateListDevicesResponse200Response(response.body)) { - (validateListDevicesOutput as FunctionWithErrors).errors = (BasicValidation.validateListDevicesResponse200Response as FunctionWithErrors).errors - return false - } +export function validateListDevicesOutput( + response: ResponseData, +): response is Signatures.ListDevicesResponse { + if (response.status < 100 || response.status >= 600) return false; - return true + if (response.status === 200) { + if (!BasicValidation.validateListDevicesResponse200Response(response.body)) { + (validateListDevicesOutput as FunctionWithErrors).errors = ( + BasicValidation.validateListDevicesResponse200Response as FunctionWithErrors + ).errors; + return false; } - - if (response.status === 400) { - return true - } + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } - (validateListDevicesOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + (validateListDevicesOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; - return false + return false; } /** * This function validates the inputs to createDevice() */ -export function validateCreateDeviceInput(parameters: Signatures.CreateDeviceParameters, body: Signatures.CreateDeviceBody) { - if (parameters) { - if ( - !BasicValidation.validateChangedUrlRequest(parameters["changedUrl"]) - && parameters['changedUrl'] !== undefined - ) { - (validateCreateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateChangedUrlRequest as FunctionWithErrors).errors - return false - } - } else { - if (parameters !== undefined) { - return false - } - } - - if (!BasicValidation.validateCreateDeviceBodyRequest(body)) { - (validateCreateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateCreateDeviceBodyRequest as FunctionWithErrors).errors - return false - } - - return true +export function validateCreateDeviceInput( + parameters: Signatures.CreateDeviceParameters, + body: Signatures.CreateDeviceBody, +) { + if (parameters) { + if ( + !BasicValidation.validateChangedUrlRequest(parameters['changedUrl']) && + parameters['changedUrl'] !== undefined + ) { + (validateCreateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateChangedUrlRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + if (parameters !== undefined) { + return false; + } + } + + if (!BasicValidation.validateCreateDeviceBodyRequest(body)) { + (validateCreateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateCreateDeviceBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; } /** * This function validates the outputs of createDevice() */ -export function validateCreateDeviceOutput(response: ResponseData): response is Signatures.CreateDeviceResponse { - if (response.status < 100 || response.status >= 600) return false - - - if (response.status === 201) { - if (!BasicValidation.validateCreateDeviceResponse201Response(response.body)) { - (validateCreateDeviceOutput as FunctionWithErrors).errors = (BasicValidation.validateCreateDeviceResponse201Response as FunctionWithErrors).errors - return false - } +export function validateCreateDeviceOutput( + response: ResponseData, +): response is Signatures.CreateDeviceResponse { + if (response.status < 100 || response.status >= 600) return false; - return true + if (response.status === 201) { + if (!BasicValidation.validateCreateDeviceResponse201Response(response.body)) { + (validateCreateDeviceOutput as FunctionWithErrors).errors = ( + BasicValidation.validateCreateDeviceResponse201Response as FunctionWithErrors + ).errors; + return false; } - - if (response.status === 400) { - return true - } + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } - (validateCreateDeviceOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + (validateCreateDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; - return false + return false; } /** * This function validates the inputs to getDevice() */ export function validateGetDeviceInput(parameters: Signatures.GetDeviceParameters) { - if (parameters) { - if ( - !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) - ) { - (validateGetDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors - return false - } - if ( - !BasicValidation.validateFlatGroupRequest(parameters["flat_group"]) - && parameters['flat_group'] !== undefined - ) { - (validateGetDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateFlatGroupRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - return true + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateGetDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateFlatGroupRequest(parameters['flat_group']) && + parameters['flat_group'] !== undefined + ) { + (validateGetDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateFlatGroupRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; } /** * This function validates the outputs of getDevice() */ -export function validateGetDeviceOutput(response: ResponseData): response is Signatures.GetDeviceResponse { - if (response.status < 100 || response.status >= 600) return false +export function validateGetDeviceOutput( + response: ResponseData, +): response is Signatures.GetDeviceResponse { + if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 200) { - if (!BasicValidation.validateGetDeviceResponse200Response(response.body)) { - (validateGetDeviceOutput as FunctionWithErrors).errors = (BasicValidation.validateGetDeviceResponse200Response as FunctionWithErrors).errors - return false - } - - return true + if (response.status === 200) { + if (!BasicValidation.validateGetDeviceResponse200Response(response.body)) { + (validateGetDeviceOutput as FunctionWithErrors).errors = ( + BasicValidation.validateGetDeviceResponse200Response as FunctionWithErrors + ).errors; + return false; } - - if (response.status === 400) { - return true - } + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } - (validateGetDeviceOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + (validateGetDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; - return false + return false; } /** * This function validates the inputs to updateDevice() */ -export function validateUpdateDeviceInput(parameters: Signatures.UpdateDeviceParameters, body: Signatures.UpdateDeviceBody) { - if (parameters) { - if ( - !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) - ) { - (validateUpdateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors - return false - } - if ( - !BasicValidation.validateChangedUrlRequest(parameters["changedUrl"]) - && parameters['changedUrl'] !== undefined - ) { - (validateUpdateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateChangedUrlRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - if (body === undefined) { - return true - } - - if (!BasicValidation.validateUpdateDeviceBodyRequest(body)) { - (validateUpdateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateUpdateDeviceBodyRequest as FunctionWithErrors).errors - return false - } - - return true +export function validateUpdateDeviceInput( + parameters: Signatures.UpdateDeviceParameters, + body: Signatures.UpdateDeviceBody, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateUpdateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateChangedUrlRequest(parameters['changedUrl']) && + parameters['changedUrl'] !== undefined + ) { + (validateUpdateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateChangedUrlRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + if (body === undefined) { + return true; + } + + if (!BasicValidation.validateUpdateDeviceBodyRequest(body)) { + (validateUpdateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateDeviceBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; } /** * This function validates the outputs of updateDevice() */ -export function validateUpdateDeviceOutput(response: ResponseData): response is Signatures.UpdateDeviceResponse { - if (response.status < 100 || response.status >= 600) return false +export function validateUpdateDeviceOutput( + response: ResponseData, +): response is Signatures.UpdateDeviceResponse { + if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 200) { - if (!BasicValidation.validateUpdateDeviceResponse200Response(response.body)) { - (validateUpdateDeviceOutput as FunctionWithErrors).errors = (BasicValidation.validateUpdateDeviceResponse200Response as FunctionWithErrors).errors - return false - } - - return true + if (response.status === 200) { + if (!BasicValidation.validateUpdateDeviceResponse200Response(response.body)) { + (validateUpdateDeviceOutput as FunctionWithErrors).errors = ( + BasicValidation.validateUpdateDeviceResponse200Response as FunctionWithErrors + ).errors; + return false; } - - if (response.status === 400) { - return true - } + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } - (validateUpdateDeviceOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + (validateUpdateDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; - return false + return false; } /** * This function validates the inputs to deleteDevice() */ export function validateDeleteDeviceInput(parameters: Signatures.DeleteDeviceParameters) { - if (parameters) { - if ( - !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) - ) { - (validateDeleteDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - return true + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateDeleteDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; } /** * This function validates the outputs of deleteDevice() */ -export function validateDeleteDeviceOutput(response: ResponseData): response is Signatures.DeleteDeviceResponse { - if (response.status < 100 || response.status >= 600) return false +export function validateDeleteDeviceOutput( + response: ResponseData, +): response is Signatures.DeleteDeviceResponse { + if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 204) { - return true - } + if (response.status === 204) { + return true; + } - - if (response.status === 400) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 404) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 500) { + return true; + } - (validateDeleteDeviceOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + (validateDeleteDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; - return false + return false; } /** * This function validates the inputs to instantiateDevice() */ -export function validateInstantiateDeviceInput(parameters: Signatures.InstantiateDeviceParameters) { - if (parameters) { - if ( - !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) - ) { - (validateInstantiateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors - return false - } - if ( - !BasicValidation.validateChangedUrlRequest(parameters["changedUrl"]) - && parameters['changedUrl'] !== undefined - ) { - (validateInstantiateDeviceInput as FunctionWithErrors).errors = (BasicValidation.validateChangedUrlRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - return true +export function validateInstantiateDeviceInput( + parameters: Signatures.InstantiateDeviceParameters, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateInstantiateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateChangedUrlRequest(parameters['changedUrl']) && + parameters['changedUrl'] !== undefined + ) { + (validateInstantiateDeviceInput as FunctionWithErrors).errors = ( + BasicValidation.validateChangedUrlRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; } /** * This function validates the outputs of instantiateDevice() */ -export function validateInstantiateDeviceOutput(response: ResponseData): response is Signatures.InstantiateDeviceResponse { - if (response.status < 100 || response.status >= 600) return false +export function validateInstantiateDeviceOutput( + response: ResponseData, +): response is Signatures.InstantiateDeviceResponse { + if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 201) { - if (!BasicValidation.validateInstantiateDeviceResponse201Response(response.body)) { - (validateInstantiateDeviceOutput as FunctionWithErrors).errors = (BasicValidation.validateInstantiateDeviceResponse201Response as FunctionWithErrors).errors - return false - } - - return true + if (response.status === 201) { + if (!BasicValidation.validateInstantiateDeviceResponse201Response(response.body)) { + (validateInstantiateDeviceOutput as FunctionWithErrors).errors = ( + BasicValidation.validateInstantiateDeviceResponse201Response as FunctionWithErrors + ).errors; + return false; } - - if (response.status === 400) { - return true - } + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } - (validateInstantiateDeviceOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + (validateInstantiateDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; - return false + return false; } /** * This function validates the inputs to getDeviceAvailability() */ -export function validateGetDeviceAvailabilityInput(parameters: Signatures.GetDeviceAvailabilityParameters) { - if (parameters) { - if ( - !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) - ) { - (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors - return false - } - if ( - !BasicValidation.validateStartTimeRequest(parameters["startTime"]) - && parameters['startTime'] !== undefined - ) { - (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = (BasicValidation.validateStartTimeRequest as FunctionWithErrors).errors - return false - } - if ( - !BasicValidation.validateEndTimeRequest(parameters["endTime"]) - && parameters['endTime'] !== undefined - ) { - (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = (BasicValidation.validateEndTimeRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - return true +export function validateGetDeviceAvailabilityInput( + parameters: Signatures.GetDeviceAvailabilityParameters, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateStartTimeRequest(parameters['startTime']) && + parameters['startTime'] !== undefined + ) { + (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = ( + BasicValidation.validateStartTimeRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateEndTimeRequest(parameters['endTime']) && + parameters['endTime'] !== undefined + ) { + (validateGetDeviceAvailabilityInput as FunctionWithErrors).errors = ( + BasicValidation.validateEndTimeRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; } /** * This function validates the outputs of getDeviceAvailability() */ -export function validateGetDeviceAvailabilityOutput(response: ResponseData): response is Signatures.GetDeviceAvailabilityResponse { - if (response.status < 100 || response.status >= 600) return false - - - if (response.status === 200) { - if (!BasicValidation.validateGetDeviceAvailabilityResponse200Response(response.body)) { - (validateGetDeviceAvailabilityOutput as FunctionWithErrors).errors = (BasicValidation.validateGetDeviceAvailabilityResponse200Response as FunctionWithErrors).errors - return false - } +export function validateGetDeviceAvailabilityOutput( + response: ResponseData, +): response is Signatures.GetDeviceAvailabilityResponse { + if (response.status < 100 || response.status >= 600) return false; - return true + if (response.status === 200) { + if ( + !BasicValidation.validateGetDeviceAvailabilityResponse200Response(response.body) + ) { + (validateGetDeviceAvailabilityOutput as FunctionWithErrors).errors = ( + BasicValidation.validateGetDeviceAvailabilityResponse200Response as FunctionWithErrors + ).errors; + return false; } - - if (response.status === 400) { - return true - } + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 404) { + return true; + } - (validateGetDeviceAvailabilityOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + if (response.status === 500) { + return true; + } - return false + (validateGetDeviceAvailabilityOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; } /** * This function validates the inputs to deleteDeviceAvailabilityRules() */ -export function validateDeleteDeviceAvailabilityRulesInput(parameters: Signatures.DeleteDeviceAvailabilityRulesParameters) { - if (parameters) { - if ( - !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) - ) { - (validateDeleteDeviceAvailabilityRulesInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - return true +export function validateDeleteDeviceAvailabilityRulesInput( + parameters: Signatures.DeleteDeviceAvailabilityRulesParameters, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateDeleteDeviceAvailabilityRulesInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; } /** * This function validates the outputs of deleteDeviceAvailabilityRules() */ -export function validateDeleteDeviceAvailabilityRulesOutput(response: ResponseData): response is Signatures.DeleteDeviceAvailabilityRulesResponse { - if (response.status < 100 || response.status >= 600) return false +export function validateDeleteDeviceAvailabilityRulesOutput( + response: ResponseData, +): response is Signatures.DeleteDeviceAvailabilityRulesResponse { + if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 204) { - return true - } + if (response.status === 204) { + return true; + } - - if (response.status === 400) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 404) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 500) { + return true; + } - (validateDeleteDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + (validateDeleteDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; - return false + return false; } /** * This function validates the inputs to addDeviceAvailabilityRules() */ -export function validateAddDeviceAvailabilityRulesInput(parameters: Signatures.AddDeviceAvailabilityRulesParameters, body: Signatures.AddDeviceAvailabilityRulesBody) { - if (parameters) { - if ( - !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) - ) { - (validateAddDeviceAvailabilityRulesInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - if (body === undefined) { - return true - } - - if (!BasicValidation.validateAddDeviceAvailabilityRulesBodyRequest(body)) { - (validateAddDeviceAvailabilityRulesInput as FunctionWithErrors).errors = (BasicValidation.validateAddDeviceAvailabilityRulesBodyRequest as FunctionWithErrors).errors - return false - } - - return true +export function validateAddDeviceAvailabilityRulesInput( + parameters: Signatures.AddDeviceAvailabilityRulesParameters, + body: Signatures.AddDeviceAvailabilityRulesBody, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateAddDeviceAvailabilityRulesInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + if (body === undefined) { + return true; + } + + if (!BasicValidation.validateAddDeviceAvailabilityRulesBodyRequest(body)) { + (validateAddDeviceAvailabilityRulesInput as FunctionWithErrors).errors = ( + BasicValidation.validateAddDeviceAvailabilityRulesBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; } /** * This function validates the outputs of addDeviceAvailabilityRules() */ -export function validateAddDeviceAvailabilityRulesOutput(response: ResponseData): response is Signatures.AddDeviceAvailabilityRulesResponse { - if (response.status < 100 || response.status >= 600) return false - - - if (response.status === 200) { - if (!BasicValidation.validateAddDeviceAvailabilityRulesResponse200Response(response.body)) { - (validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = (BasicValidation.validateAddDeviceAvailabilityRulesResponse200Response as FunctionWithErrors).errors - return false - } - - return true - } - - - if (response.status === 400) { - return true - } - - - if (response.status === 401) { - return true - } - - - if (response.status === 403) { - return true - } - - - if (response.status === 404) { - return true - } - - - if (response.status === 500) { - return true - } - - (validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` - - return false +export function validateAddDeviceAvailabilityRulesOutput( + response: ResponseData, +): response is Signatures.AddDeviceAvailabilityRulesResponse { + if (response.status < 100 || response.status >= 600) return false; + + if (response.status === 200) { + if ( + !BasicValidation.validateAddDeviceAvailabilityRulesResponse200Response( + response.body, + ) + ) { + (validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = ( + BasicValidation.validateAddDeviceAvailabilityRulesResponse200Response as FunctionWithErrors + ).errors; + return false; + } + + return true; + } + + if (response.status === 400) { + return true; + } + + if (response.status === 401) { + return true; + } + + if (response.status === 403) { + return true; + } + + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } + + (validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; } /** * This function validates the inputs to createWebsocketToken() */ -export function validateCreateWebsocketTokenInput(parameters: Signatures.CreateWebsocketTokenParameters) { - if (parameters) { - if ( - !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) - ) { - (validateCreateWebsocketTokenInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - return true +export function validateCreateWebsocketTokenInput( + parameters: Signatures.CreateWebsocketTokenParameters, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateCreateWebsocketTokenInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; } /** * This function validates the outputs of createWebsocketToken() */ -export function validateCreateWebsocketTokenOutput(response: ResponseData): response is Signatures.CreateWebsocketTokenResponse { - if (response.status < 100 || response.status >= 600) return false - - - if (response.status === 200) { - if (!BasicValidation.validateCreateWebsocketTokenResponse200Response(response.body)) { - (validateCreateWebsocketTokenOutput as FunctionWithErrors).errors = (BasicValidation.validateCreateWebsocketTokenResponse200Response as FunctionWithErrors).errors - return false - } +export function validateCreateWebsocketTokenOutput( + response: ResponseData, +): response is Signatures.CreateWebsocketTokenResponse { + if (response.status < 100 || response.status >= 600) return false; - return true + if (response.status === 200) { + if (!BasicValidation.validateCreateWebsocketTokenResponse200Response(response.body)) { + (validateCreateWebsocketTokenOutput as FunctionWithErrors).errors = ( + BasicValidation.validateCreateWebsocketTokenResponse200Response as FunctionWithErrors + ).errors; + return false; } - - if (response.status === 400) { - return true - } + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 404) { + return true; + } - (validateCreateWebsocketTokenOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + if (response.status === 500) { + return true; + } - return false + (validateCreateWebsocketTokenOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; } /** * This function validates the inputs to sendSignalingMessage() */ -export function validateSendSignalingMessageInput(parameters: Signatures.SendSignalingMessageParameters, body: Signatures.SendSignalingMessageBody) { - if (parameters) { - if ( - !BasicValidation.validateDeviceIdRequest(parameters["device_id"]) - ) { - (validateSendSignalingMessageInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceIdRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - if (!BasicValidation.validateSendSignalingMessageBodyRequest(body)) { - (validateSendSignalingMessageInput as FunctionWithErrors).errors = (BasicValidation.validateSendSignalingMessageBodyRequest as FunctionWithErrors).errors - return false - } - - return true +export function validateSendSignalingMessageInput( + parameters: Signatures.SendSignalingMessageParameters, + body: Signatures.SendSignalingMessageBody, +) { + if (parameters) { + if (!BasicValidation.validateDeviceIdRequest(parameters['device_id'])) { + (validateSendSignalingMessageInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + if (!BasicValidation.validateSendSignalingMessageBodyRequest(body)) { + (validateSendSignalingMessageInput as FunctionWithErrors).errors = ( + BasicValidation.validateSendSignalingMessageBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; } /** * This function validates the outputs of sendSignalingMessage() */ -export function validateSendSignalingMessageOutput(response: ResponseData): response is Signatures.SendSignalingMessageResponse { - if (response.status < 100 || response.status >= 600) return false +export function validateSendSignalingMessageOutput( + response: ResponseData, +): response is Signatures.SendSignalingMessageResponse { + if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 200) { - return true - } + if (response.status === 200) { + return true; + } - - if (response.status === 400) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 404) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 500) { + return true; + } - (validateSendSignalingMessageOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + (validateSendSignalingMessageOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; - return false + return false; } /** * This function validates the inputs to listPeerconnections() */ export function validateListPeerconnectionsInput() { - return true + return true; } /** * This function validates the outputs of listPeerconnections() */ -export function validateListPeerconnectionsOutput(response: ResponseData): response is Signatures.ListPeerconnectionsResponse { - if (response.status < 100 || response.status >= 600) return false - - - if (response.status === 200) { - if (!BasicValidation.validateListPeerconnectionsResponse200Response(response.body)) { - (validateListPeerconnectionsOutput as FunctionWithErrors).errors = (BasicValidation.validateListPeerconnectionsResponse200Response as FunctionWithErrors).errors - return false - } +export function validateListPeerconnectionsOutput( + response: ResponseData, +): response is Signatures.ListPeerconnectionsResponse { + if (response.status < 100 || response.status >= 600) return false; - return true + if (response.status === 200) { + if (!BasicValidation.validateListPeerconnectionsResponse200Response(response.body)) { + (validateListPeerconnectionsOutput as FunctionWithErrors).errors = ( + BasicValidation.validateListPeerconnectionsResponse200Response as FunctionWithErrors + ).errors; + return false; } - - if (response.status === 400) { - return true - } + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 404) { + return true; + } - (validateListPeerconnectionsOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + if (response.status === 500) { + return true; + } - return false + (validateListPeerconnectionsOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; } /** * This function validates the inputs to createPeerconnection() */ -export function validateCreatePeerconnectionInput(parameters: Signatures.CreatePeerconnectionParameters, body: Signatures.CreatePeerconnectionBody) { - if (parameters) { - if ( - !BasicValidation.validateClosedUrlRequest(parameters["closedUrl"]) - && parameters['closedUrl'] !== undefined - ) { - (validateCreatePeerconnectionInput as FunctionWithErrors).errors = (BasicValidation.validateClosedUrlRequest as FunctionWithErrors).errors - return false - } - if ( - !BasicValidation.validateStatusChangedUrlRequest(parameters["statusChangedUrl"]) - && parameters['statusChangedUrl'] !== undefined - ) { - (validateCreatePeerconnectionInput as FunctionWithErrors).errors = (BasicValidation.validateStatusChangedUrlRequest as FunctionWithErrors).errors - return false - } - } else { - if (parameters !== undefined) { - return false - } - } - - if (!BasicValidation.validateCreatePeerconnectionBodyRequest(body)) { - (validateCreatePeerconnectionInput as FunctionWithErrors).errors = (BasicValidation.validateCreatePeerconnectionBodyRequest as FunctionWithErrors).errors - return false - } - - return true +export function validateCreatePeerconnectionInput( + parameters: Signatures.CreatePeerconnectionParameters, + body: Signatures.CreatePeerconnectionBody, +) { + if (parameters) { + if ( + !BasicValidation.validateClosedUrlRequest(parameters['closedUrl']) && + parameters['closedUrl'] !== undefined + ) { + (validateCreatePeerconnectionInput as FunctionWithErrors).errors = ( + BasicValidation.validateClosedUrlRequest as FunctionWithErrors + ).errors; + return false; + } + if ( + !BasicValidation.validateStatusChangedUrlRequest(parameters['statusChangedUrl']) && + parameters['statusChangedUrl'] !== undefined + ) { + (validateCreatePeerconnectionInput as FunctionWithErrors).errors = ( + BasicValidation.validateStatusChangedUrlRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + if (parameters !== undefined) { + return false; + } + } + + if (!BasicValidation.validateCreatePeerconnectionBodyRequest(body)) { + (validateCreatePeerconnectionInput as FunctionWithErrors).errors = ( + BasicValidation.validateCreatePeerconnectionBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; } /** * This function validates the outputs of createPeerconnection() */ -export function validateCreatePeerconnectionOutput(response: ResponseData): response is Signatures.CreatePeerconnectionResponse { - if (response.status < 100 || response.status >= 600) return false +export function validateCreatePeerconnectionOutput( + response: ResponseData, +): response is Signatures.CreatePeerconnectionResponse { + if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 201) { - if (!BasicValidation.validateCreatePeerconnectionResponse201Response(response.body)) { - (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = (BasicValidation.validateCreatePeerconnectionResponse201Response as FunctionWithErrors).errors - return false - } - - return true + if (response.status === 201) { + if (!BasicValidation.validateCreatePeerconnectionResponse201Response(response.body)) { + (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = ( + BasicValidation.validateCreatePeerconnectionResponse201Response as FunctionWithErrors + ).errors; + return false; } - - if (response.status === 202) { - if (!BasicValidation.validateCreatePeerconnectionResponse202Response(response.body)) { - (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = (BasicValidation.validateCreatePeerconnectionResponse202Response as FunctionWithErrors).errors - return false - } + return true; + } - return true + if (response.status === 202) { + if (!BasicValidation.validateCreatePeerconnectionResponse202Response(response.body)) { + (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = ( + BasicValidation.validateCreatePeerconnectionResponse202Response as FunctionWithErrors + ).errors; + return false; } - - if (response.status === 400) { - return true - } + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 404) { + return true; + } + + if (response.status === 500) { + return true; + } - (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; - return false + return false; } /** * This function validates the inputs to getPeerconnection() */ -export function validateGetPeerconnectionInput(parameters: Signatures.GetPeerconnectionParameters) { - if (parameters) { - if ( - !BasicValidation.validatePeerconnectionIdRequest(parameters["peerconnection_id"]) - ) { - (validateGetPeerconnectionInput as FunctionWithErrors).errors = (BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - return true +export function validateGetPeerconnectionInput( + parameters: Signatures.GetPeerconnectionParameters, +) { + if (parameters) { + if ( + !BasicValidation.validatePeerconnectionIdRequest(parameters['peerconnection_id']) + ) { + (validateGetPeerconnectionInput as FunctionWithErrors).errors = ( + BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; } /** * This function validates the outputs of getPeerconnection() */ -export function validateGetPeerconnectionOutput(response: ResponseData): response is Signatures.GetPeerconnectionResponse { - if (response.status < 100 || response.status >= 600) return false - - - if (response.status === 200) { - if (!BasicValidation.validateGetPeerconnectionResponse200Response(response.body)) { - (validateGetPeerconnectionOutput as FunctionWithErrors).errors = (BasicValidation.validateGetPeerconnectionResponse200Response as FunctionWithErrors).errors - return false - } +export function validateGetPeerconnectionOutput( + response: ResponseData, +): response is Signatures.GetPeerconnectionResponse { + if (response.status < 100 || response.status >= 600) return false; - return true + if (response.status === 200) { + if (!BasicValidation.validateGetPeerconnectionResponse200Response(response.body)) { + (validateGetPeerconnectionOutput as FunctionWithErrors).errors = ( + BasicValidation.validateGetPeerconnectionResponse200Response as FunctionWithErrors + ).errors; + return false; } - - if (response.status === 400) { - return true - } + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 404) { + return true; + } - (validateGetPeerconnectionOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + if (response.status === 500) { + return true; + } - return false + (validateGetPeerconnectionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; + + return false; } /** * This function validates the inputs to deletePeerconnection() */ -export function validateDeletePeerconnectionInput(parameters: Signatures.DeletePeerconnectionParameters) { - if (parameters) { - if ( - !BasicValidation.validatePeerconnectionIdRequest(parameters["peerconnection_id"]) - ) { - (validateDeletePeerconnectionInput as FunctionWithErrors).errors = (BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - return true +export function validateDeletePeerconnectionInput( + parameters: Signatures.DeletePeerconnectionParameters, +) { + if (parameters) { + if ( + !BasicValidation.validatePeerconnectionIdRequest(parameters['peerconnection_id']) + ) { + (validateDeletePeerconnectionInput as FunctionWithErrors).errors = ( + BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + return true; } /** * This function validates the outputs of deletePeerconnection() */ -export function validateDeletePeerconnectionOutput(response: ResponseData): response is Signatures.DeletePeerconnectionResponse { - if (response.status < 100 || response.status >= 600) return false +export function validateDeletePeerconnectionOutput( + response: ResponseData, +): response is Signatures.DeletePeerconnectionResponse { + if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 202) { - return true - } + if (response.status === 202) { + return true; + } - - if (response.status === 204) { - return true - } + if (response.status === 204) { + return true; + } - - if (response.status === 400) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 404) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 500) { + return true; + } - (validateDeletePeerconnectionOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + (validateDeletePeerconnectionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; - return false + return false; } /** * This function validates the inputs to patchPeerconnectionDeviceStatus() */ -export function validatePatchPeerconnectionDeviceStatusInput(parameters: Signatures.PatchPeerconnectionDeviceStatusParameters, body: Signatures.PatchPeerconnectionDeviceStatusBody) { - if (parameters) { - if ( - !BasicValidation.validatePeerconnectionIdRequest(parameters["peerconnection_id"]) - ) { - (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = (BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors).errors - return false - } - if ( - !BasicValidation.validateDeviceUrlRequest(parameters["device_url"]) - ) { - (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = (BasicValidation.validateDeviceUrlRequest as FunctionWithErrors).errors - return false - } - } else { - return false - } - - if (!BasicValidation.validatePatchPeerconnectionDeviceStatusBodyRequest(body)) { - (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = (BasicValidation.validatePatchPeerconnectionDeviceStatusBodyRequest as FunctionWithErrors).errors - return false - } - - return true +export function validatePatchPeerconnectionDeviceStatusInput( + parameters: Signatures.PatchPeerconnectionDeviceStatusParameters, + body: Signatures.PatchPeerconnectionDeviceStatusBody, +) { + if (parameters) { + if ( + !BasicValidation.validatePeerconnectionIdRequest(parameters['peerconnection_id']) + ) { + (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = ( + BasicValidation.validatePeerconnectionIdRequest as FunctionWithErrors + ).errors; + return false; + } + if (!BasicValidation.validateDeviceUrlRequest(parameters['device_url'])) { + (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = ( + BasicValidation.validateDeviceUrlRequest as FunctionWithErrors + ).errors; + return false; + } + } else { + return false; + } + + if (!BasicValidation.validatePatchPeerconnectionDeviceStatusBodyRequest(body)) { + (validatePatchPeerconnectionDeviceStatusInput as FunctionWithErrors).errors = ( + BasicValidation.validatePatchPeerconnectionDeviceStatusBodyRequest as FunctionWithErrors + ).errors; + return false; + } + + return true; } /** * This function validates the outputs of patchPeerconnectionDeviceStatus() */ -export function validatePatchPeerconnectionDeviceStatusOutput(response: ResponseData): response is Signatures.PatchPeerconnectionDeviceStatusResponse { - if (response.status < 100 || response.status >= 600) return false +export function validatePatchPeerconnectionDeviceStatusOutput( + response: ResponseData, +): response is Signatures.PatchPeerconnectionDeviceStatusResponse { + if (response.status < 100 || response.status >= 600) return false; - - if (response.status === 204) { - return true - } + if (response.status === 204) { + return true; + } - - if (response.status === 400) { - return true - } + if (response.status === 400) { + return true; + } - - if (response.status === 401) { - return true - } + if (response.status === 401) { + return true; + } - - if (response.status === 403) { - return true - } + if (response.status === 403) { + return true; + } - - if (response.status === 404) { - return true - } + if (response.status === 404) { + return true; + } - - if (response.status === 500) { - return true - } + if (response.status === 500) { + return true; + } - (validatePatchPeerconnectionDeviceStatusOutput as FunctionWithErrors).errors = `Response status ${response.status} is unexpected` + (validatePatchPeerconnectionDeviceStatusOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; - return false + return false; } diff --git a/services/booking/src/common/src/clients/device/signatures.ts b/services/booking/src/common/src/clients/device/signatures.ts index 4b7c8577..259b337f 100644 --- a/services/booking/src/common/src/clients/device/signatures.ts +++ b/services/booking/src/common/src/clients/device/signatures.ts @@ -5,40 +5,45 @@ */ /* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/ban-ts-comment */ -import * as Types from "./types.js" +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import * as Types from './types.js'; // @ts-ignore -import { type Require } from "./types.js" +import { type Require } from './types.js'; /** * Typing for all possible responses to the request made by listDevices() * @category listDevices() */ -export type ListDevicesResponse = ListDevicesSuccessResponse | ListDevicesErrorResponse +export type ListDevicesResponse = ListDevicesSuccessResponse | ListDevicesErrorResponse; /** * Typing for all successful responses to the request made by listDevices() * @category listDevices() */ -export type ListDevicesSuccessResponse = ListDevicesResponse200 +export type ListDevicesSuccessResponse = ListDevicesResponse200; /** * Typing for all error responses to the request made by listDevices() * @category listDevices() */ -export type ListDevicesErrorResponse = ListDevicesResponse400 | ListDevicesResponse401 | ListDevicesResponse403 | ListDevicesResponse404 | ListDevicesResponse500 +export type ListDevicesErrorResponse = + | ListDevicesResponse400 + | ListDevicesResponse401 + | ListDevicesResponse403 + | ListDevicesResponse404 + | ListDevicesResponse500; /** * Typing for a response with status 200 to the request made by listDevices() * @category listDevices() */ export interface ListDevicesResponse200 extends Types.SuccessResponse { - status: 200 - headers?: { - [k: string]: string | undefined - } - body: Types.DeviceOverview<"response">[] + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.DeviceOverview<'response'>[]; } /** @@ -46,11 +51,11 @@ export interface ListDevicesResponse200 extends Types.SuccessResponse { * @category listDevices() */ export interface ListDevicesResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -58,11 +63,11 @@ export interface ListDevicesResponse400 extends Types.ErrorResponse { * @category listDevices() */ export interface ListDevicesResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -70,11 +75,11 @@ export interface ListDevicesResponse401 extends Types.ErrorResponse { * @category listDevices() */ export interface ListDevicesResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -82,11 +87,11 @@ export interface ListDevicesResponse403 extends Types.ErrorResponse { * @category listDevices() */ export interface ListDevicesResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -94,11 +99,11 @@ export interface ListDevicesResponse404 extends Types.ErrorResponse { * @category listDevices() */ export interface ListDevicesResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -106,43 +111,50 @@ export interface ListDevicesResponse500 extends Types.ErrorResponse { * @category createDevice() */ export type CreateDeviceParameters = { - "changedUrl"?: string, -} + changedUrl?: string; +}; /** * Typing for the body of the request made by createDevice() * @category createDevice() */ -export type CreateDeviceBody = Types.Device<"request"> +export type CreateDeviceBody = Types.Device<'request'>; /** * Typing for all possible responses to the request made by createDevice() * @category createDevice() */ -export type CreateDeviceResponse = CreateDeviceSuccessResponse | CreateDeviceErrorResponse +export type CreateDeviceResponse = + | CreateDeviceSuccessResponse + | CreateDeviceErrorResponse; /** * Typing for all successful responses to the request made by createDevice() * @category createDevice() */ -export type CreateDeviceSuccessResponse = CreateDeviceResponse201 +export type CreateDeviceSuccessResponse = CreateDeviceResponse201; /** * Typing for all error responses to the request made by createDevice() * @category createDevice() */ -export type CreateDeviceErrorResponse = CreateDeviceResponse400 | CreateDeviceResponse401 | CreateDeviceResponse403 | CreateDeviceResponse404 | CreateDeviceResponse500 +export type CreateDeviceErrorResponse = + | CreateDeviceResponse400 + | CreateDeviceResponse401 + | CreateDeviceResponse403 + | CreateDeviceResponse404 + | CreateDeviceResponse500; /** * Typing for a response with status 201 to the request made by createDevice() * @category createDevice() */ export interface CreateDeviceResponse201 extends Types.SuccessResponse { - status: 201 - headers?: { - [k: string]: string | undefined - } - body: Types.Device<"response"> + status: 201; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Device<'response'>; } /** @@ -150,11 +162,11 @@ export interface CreateDeviceResponse201 extends Types.SuccessResponse { * @category createDevice() */ export interface CreateDeviceResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -162,11 +174,11 @@ export interface CreateDeviceResponse400 extends Types.ErrorResponse { * @category createDevice() */ export interface CreateDeviceResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -174,11 +186,11 @@ export interface CreateDeviceResponse401 extends Types.ErrorResponse { * @category createDevice() */ export interface CreateDeviceResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -186,11 +198,11 @@ export interface CreateDeviceResponse403 extends Types.ErrorResponse { * @category createDevice() */ export interface CreateDeviceResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -198,11 +210,11 @@ export interface CreateDeviceResponse404 extends Types.ErrorResponse { * @category createDevice() */ export interface CreateDeviceResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -210,38 +222,43 @@ export interface CreateDeviceResponse500 extends Types.ErrorResponse { * @category getDevice() */ export type GetDeviceParameters = { - "device_id": string, - "flat_group"?: boolean, -} + device_id: string; + flat_group?: boolean; +}; /** * Typing for all possible responses to the request made by getDevice() * @category getDevice() */ -export type GetDeviceResponse = GetDeviceSuccessResponse | GetDeviceErrorResponse +export type GetDeviceResponse = GetDeviceSuccessResponse | GetDeviceErrorResponse; /** * Typing for all successful responses to the request made by getDevice() * @category getDevice() */ -export type GetDeviceSuccessResponse = GetDeviceResponse200 +export type GetDeviceSuccessResponse = GetDeviceResponse200; /** * Typing for all error responses to the request made by getDevice() * @category getDevice() */ -export type GetDeviceErrorResponse = GetDeviceResponse400 | GetDeviceResponse401 | GetDeviceResponse403 | GetDeviceResponse404 | GetDeviceResponse500 +export type GetDeviceErrorResponse = + | GetDeviceResponse400 + | GetDeviceResponse401 + | GetDeviceResponse403 + | GetDeviceResponse404 + | GetDeviceResponse500; /** * Typing for a response with status 200 to the request made by getDevice() * @category getDevice() */ export interface GetDeviceResponse200 extends Types.SuccessResponse { - status: 200 - headers?: { - [k: string]: string | undefined - } - body: Types.Device<"response"> + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Device<'response'>; } /** @@ -249,11 +266,11 @@ export interface GetDeviceResponse200 extends Types.SuccessResponse { * @category getDevice() */ export interface GetDeviceResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -261,11 +278,11 @@ export interface GetDeviceResponse400 extends Types.ErrorResponse { * @category getDevice() */ export interface GetDeviceResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -273,11 +290,11 @@ export interface GetDeviceResponse401 extends Types.ErrorResponse { * @category getDevice() */ export interface GetDeviceResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -285,11 +302,11 @@ export interface GetDeviceResponse403 extends Types.ErrorResponse { * @category getDevice() */ export interface GetDeviceResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -297,11 +314,11 @@ export interface GetDeviceResponse404 extends Types.ErrorResponse { * @category getDevice() */ export interface GetDeviceResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -309,44 +326,51 @@ export interface GetDeviceResponse500 extends Types.ErrorResponse { * @category updateDevice() */ export type UpdateDeviceParameters = { - "device_id": string, - "changedUrl"?: string, -} + device_id: string; + changedUrl?: string; +}; /** * Typing for the body of the request made by updateDevice() * @category updateDevice() */ -export type UpdateDeviceBody = Types.DeviceUpdate<"request"> | undefined +export type UpdateDeviceBody = Types.DeviceUpdate<'request'> | undefined; /** * Typing for all possible responses to the request made by updateDevice() * @category updateDevice() */ -export type UpdateDeviceResponse = UpdateDeviceSuccessResponse | UpdateDeviceErrorResponse +export type UpdateDeviceResponse = + | UpdateDeviceSuccessResponse + | UpdateDeviceErrorResponse; /** * Typing for all successful responses to the request made by updateDevice() * @category updateDevice() */ -export type UpdateDeviceSuccessResponse = UpdateDeviceResponse200 +export type UpdateDeviceSuccessResponse = UpdateDeviceResponse200; /** * Typing for all error responses to the request made by updateDevice() * @category updateDevice() */ -export type UpdateDeviceErrorResponse = UpdateDeviceResponse400 | UpdateDeviceResponse401 | UpdateDeviceResponse403 | UpdateDeviceResponse404 | UpdateDeviceResponse500 +export type UpdateDeviceErrorResponse = + | UpdateDeviceResponse400 + | UpdateDeviceResponse401 + | UpdateDeviceResponse403 + | UpdateDeviceResponse404 + | UpdateDeviceResponse500; /** * Typing for a response with status 200 to the request made by updateDevice() * @category updateDevice() */ export interface UpdateDeviceResponse200 extends Types.SuccessResponse { - status: 200 - headers?: { - [k: string]: string | undefined - } - body: Types.Device<"response"> + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Device<'response'>; } /** @@ -354,11 +378,11 @@ export interface UpdateDeviceResponse200 extends Types.SuccessResponse { * @category updateDevice() */ export interface UpdateDeviceResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -366,11 +390,11 @@ export interface UpdateDeviceResponse400 extends Types.ErrorResponse { * @category updateDevice() */ export interface UpdateDeviceResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -378,11 +402,11 @@ export interface UpdateDeviceResponse401 extends Types.ErrorResponse { * @category updateDevice() */ export interface UpdateDeviceResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -390,11 +414,11 @@ export interface UpdateDeviceResponse403 extends Types.ErrorResponse { * @category updateDevice() */ export interface UpdateDeviceResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -402,11 +426,11 @@ export interface UpdateDeviceResponse404 extends Types.ErrorResponse { * @category updateDevice() */ export interface UpdateDeviceResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -414,37 +438,44 @@ export interface UpdateDeviceResponse500 extends Types.ErrorResponse { * @category deleteDevice() */ export type DeleteDeviceParameters = { - "device_id": string, -} + device_id: string; +}; /** * Typing for all possible responses to the request made by deleteDevice() * @category deleteDevice() */ -export type DeleteDeviceResponse = DeleteDeviceSuccessResponse | DeleteDeviceErrorResponse +export type DeleteDeviceResponse = + | DeleteDeviceSuccessResponse + | DeleteDeviceErrorResponse; /** * Typing for all successful responses to the request made by deleteDevice() * @category deleteDevice() */ -export type DeleteDeviceSuccessResponse = DeleteDeviceResponse204 +export type DeleteDeviceSuccessResponse = DeleteDeviceResponse204; /** * Typing for all error responses to the request made by deleteDevice() * @category deleteDevice() */ -export type DeleteDeviceErrorResponse = DeleteDeviceResponse400 | DeleteDeviceResponse401 | DeleteDeviceResponse403 | DeleteDeviceResponse404 | DeleteDeviceResponse500 +export type DeleteDeviceErrorResponse = + | DeleteDeviceResponse400 + | DeleteDeviceResponse401 + | DeleteDeviceResponse403 + | DeleteDeviceResponse404 + | DeleteDeviceResponse500; /** * Typing for a response with status 204 to the request made by deleteDevice() * @category deleteDevice() */ export interface DeleteDeviceResponse204 extends Types.SuccessResponse { - status: 204 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 204; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -452,11 +483,11 @@ export interface DeleteDeviceResponse204 extends Types.SuccessResponse { * @category deleteDevice() */ export interface DeleteDeviceResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -464,11 +495,11 @@ export interface DeleteDeviceResponse400 extends Types.ErrorResponse { * @category deleteDevice() */ export interface DeleteDeviceResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -476,11 +507,11 @@ export interface DeleteDeviceResponse401 extends Types.ErrorResponse { * @category deleteDevice() */ export interface DeleteDeviceResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -488,11 +519,11 @@ export interface DeleteDeviceResponse403 extends Types.ErrorResponse { * @category deleteDevice() */ export interface DeleteDeviceResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -500,11 +531,11 @@ export interface DeleteDeviceResponse404 extends Types.ErrorResponse { * @category deleteDevice() */ export interface DeleteDeviceResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -512,42 +543,49 @@ export interface DeleteDeviceResponse500 extends Types.ErrorResponse { * @category instantiateDevice() */ export type InstantiateDeviceParameters = { - "device_id": string, - "changedUrl"?: string, -} + device_id: string; + changedUrl?: string; +}; /** * Typing for all possible responses to the request made by instantiateDevice() * @category instantiateDevice() */ -export type InstantiateDeviceResponse = InstantiateDeviceSuccessResponse | InstantiateDeviceErrorResponse +export type InstantiateDeviceResponse = + | InstantiateDeviceSuccessResponse + | InstantiateDeviceErrorResponse; /** * Typing for all successful responses to the request made by instantiateDevice() * @category instantiateDevice() */ -export type InstantiateDeviceSuccessResponse = InstantiateDeviceResponse201 +export type InstantiateDeviceSuccessResponse = InstantiateDeviceResponse201; /** * Typing for all error responses to the request made by instantiateDevice() * @category instantiateDevice() */ -export type InstantiateDeviceErrorResponse = InstantiateDeviceResponse400 | InstantiateDeviceResponse401 | InstantiateDeviceResponse403 | InstantiateDeviceResponse404 | InstantiateDeviceResponse500 +export type InstantiateDeviceErrorResponse = + | InstantiateDeviceResponse400 + | InstantiateDeviceResponse401 + | InstantiateDeviceResponse403 + | InstantiateDeviceResponse404 + | InstantiateDeviceResponse500; /** * Typing for a response with status 201 to the request made by instantiateDevice() * @category instantiateDevice() */ export interface InstantiateDeviceResponse201 extends Types.SuccessResponse { - status: 201 - headers?: { - [k: string]: string | undefined - } - body: { - instance: Types.ConcreteDevice<"response"> - deviceToken: string - [k: string]: unknown - } + status: 201; + headers?: { + [k: string]: string | undefined; + }; + body: { + instance: Types.ConcreteDevice<'response'>; + deviceToken: string; + [k: string]: unknown; + }; } /** @@ -555,11 +593,11 @@ export interface InstantiateDeviceResponse201 extends Types.SuccessResponse { * @category instantiateDevice() */ export interface InstantiateDeviceResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -567,11 +605,11 @@ export interface InstantiateDeviceResponse400 extends Types.ErrorResponse { * @category instantiateDevice() */ export interface InstantiateDeviceResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -579,11 +617,11 @@ export interface InstantiateDeviceResponse401 extends Types.ErrorResponse { * @category instantiateDevice() */ export interface InstantiateDeviceResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -591,11 +629,11 @@ export interface InstantiateDeviceResponse403 extends Types.ErrorResponse { * @category instantiateDevice() */ export interface InstantiateDeviceResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -603,11 +641,11 @@ export interface InstantiateDeviceResponse404 extends Types.ErrorResponse { * @category instantiateDevice() */ export interface InstantiateDeviceResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -615,39 +653,46 @@ export interface InstantiateDeviceResponse500 extends Types.ErrorResponse { * @category getDeviceAvailability() */ export type GetDeviceAvailabilityParameters = { - "device_id": string, - "startTime"?: string, - "endTime"?: string, -} + device_id: string; + startTime?: string; + endTime?: string; +}; /** * Typing for all possible responses to the request made by getDeviceAvailability() * @category getDeviceAvailability() */ -export type GetDeviceAvailabilityResponse = GetDeviceAvailabilitySuccessResponse | GetDeviceAvailabilityErrorResponse +export type GetDeviceAvailabilityResponse = + | GetDeviceAvailabilitySuccessResponse + | GetDeviceAvailabilityErrorResponse; /** * Typing for all successful responses to the request made by getDeviceAvailability() * @category getDeviceAvailability() */ -export type GetDeviceAvailabilitySuccessResponse = GetDeviceAvailabilityResponse200 +export type GetDeviceAvailabilitySuccessResponse = GetDeviceAvailabilityResponse200; /** * Typing for all error responses to the request made by getDeviceAvailability() * @category getDeviceAvailability() */ -export type GetDeviceAvailabilityErrorResponse = GetDeviceAvailabilityResponse400 | GetDeviceAvailabilityResponse401 | GetDeviceAvailabilityResponse403 | GetDeviceAvailabilityResponse404 | GetDeviceAvailabilityResponse500 +export type GetDeviceAvailabilityErrorResponse = + | GetDeviceAvailabilityResponse400 + | GetDeviceAvailabilityResponse401 + | GetDeviceAvailabilityResponse403 + | GetDeviceAvailabilityResponse404 + | GetDeviceAvailabilityResponse500; /** * Typing for a response with status 200 to the request made by getDeviceAvailability() * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse200 extends Types.SuccessResponse { - status: 200 - headers?: { - [k: string]: string | undefined - } - body: Types.Availability<"response"> + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Availability<'response'>; } /** @@ -655,11 +700,11 @@ export interface GetDeviceAvailabilityResponse200 extends Types.SuccessResponse * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -667,11 +712,11 @@ export interface GetDeviceAvailabilityResponse400 extends Types.ErrorResponse { * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -679,11 +724,11 @@ export interface GetDeviceAvailabilityResponse401 extends Types.ErrorResponse { * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -691,11 +736,11 @@ export interface GetDeviceAvailabilityResponse403 extends Types.ErrorResponse { * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -703,11 +748,11 @@ export interface GetDeviceAvailabilityResponse404 extends Types.ErrorResponse { * @category getDeviceAvailability() */ export interface GetDeviceAvailabilityResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -715,37 +760,45 @@ export interface GetDeviceAvailabilityResponse500 extends Types.ErrorResponse { * @category deleteDeviceAvailabilityRules() */ export type DeleteDeviceAvailabilityRulesParameters = { - "device_id": string, -} + device_id: string; +}; /** * Typing for all possible responses to the request made by deleteDeviceAvailabilityRules() * @category deleteDeviceAvailabilityRules() */ -export type DeleteDeviceAvailabilityRulesResponse = DeleteDeviceAvailabilityRulesSuccessResponse | DeleteDeviceAvailabilityRulesErrorResponse +export type DeleteDeviceAvailabilityRulesResponse = + | DeleteDeviceAvailabilityRulesSuccessResponse + | DeleteDeviceAvailabilityRulesErrorResponse; /** * Typing for all successful responses to the request made by deleteDeviceAvailabilityRules() * @category deleteDeviceAvailabilityRules() */ -export type DeleteDeviceAvailabilityRulesSuccessResponse = DeleteDeviceAvailabilityRulesResponse204 +export type DeleteDeviceAvailabilityRulesSuccessResponse = + DeleteDeviceAvailabilityRulesResponse204; /** * Typing for all error responses to the request made by deleteDeviceAvailabilityRules() * @category deleteDeviceAvailabilityRules() */ -export type DeleteDeviceAvailabilityRulesErrorResponse = DeleteDeviceAvailabilityRulesResponse400 | DeleteDeviceAvailabilityRulesResponse401 | DeleteDeviceAvailabilityRulesResponse403 | DeleteDeviceAvailabilityRulesResponse404 | DeleteDeviceAvailabilityRulesResponse500 +export type DeleteDeviceAvailabilityRulesErrorResponse = + | DeleteDeviceAvailabilityRulesResponse400 + | DeleteDeviceAvailabilityRulesResponse401 + | DeleteDeviceAvailabilityRulesResponse403 + | DeleteDeviceAvailabilityRulesResponse404 + | DeleteDeviceAvailabilityRulesResponse500; /** * Typing for a response with status 204 to the request made by deleteDeviceAvailabilityRules() * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse204 extends Types.SuccessResponse { - status: 204 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 204; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -753,11 +806,11 @@ export interface DeleteDeviceAvailabilityRulesResponse204 extends Types.SuccessR * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -765,11 +818,11 @@ export interface DeleteDeviceAvailabilityRulesResponse400 extends Types.ErrorRes * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -777,11 +830,11 @@ export interface DeleteDeviceAvailabilityRulesResponse401 extends Types.ErrorRes * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -789,11 +842,11 @@ export interface DeleteDeviceAvailabilityRulesResponse403 extends Types.ErrorRes * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -801,11 +854,11 @@ export interface DeleteDeviceAvailabilityRulesResponse404 extends Types.ErrorRes * @category deleteDeviceAvailabilityRules() */ export interface DeleteDeviceAvailabilityRulesResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -813,43 +866,53 @@ export interface DeleteDeviceAvailabilityRulesResponse500 extends Types.ErrorRes * @category addDeviceAvailabilityRules() */ export type AddDeviceAvailabilityRulesParameters = { - "device_id": string, -} + device_id: string; +}; /** * Typing for the body of the request made by addDeviceAvailabilityRules() * @category addDeviceAvailabilityRules() */ -export type AddDeviceAvailabilityRulesBody = Types.AvailabilityRule<"request">[] | undefined +export type AddDeviceAvailabilityRulesBody = + | Types.AvailabilityRule<'request'>[] + | undefined; /** * Typing for all possible responses to the request made by addDeviceAvailabilityRules() * @category addDeviceAvailabilityRules() */ -export type AddDeviceAvailabilityRulesResponse = AddDeviceAvailabilityRulesSuccessResponse | AddDeviceAvailabilityRulesErrorResponse +export type AddDeviceAvailabilityRulesResponse = + | AddDeviceAvailabilityRulesSuccessResponse + | AddDeviceAvailabilityRulesErrorResponse; /** * Typing for all successful responses to the request made by addDeviceAvailabilityRules() * @category addDeviceAvailabilityRules() */ -export type AddDeviceAvailabilityRulesSuccessResponse = AddDeviceAvailabilityRulesResponse200 +export type AddDeviceAvailabilityRulesSuccessResponse = + AddDeviceAvailabilityRulesResponse200; /** * Typing for all error responses to the request made by addDeviceAvailabilityRules() * @category addDeviceAvailabilityRules() */ -export type AddDeviceAvailabilityRulesErrorResponse = AddDeviceAvailabilityRulesResponse400 | AddDeviceAvailabilityRulesResponse401 | AddDeviceAvailabilityRulesResponse403 | AddDeviceAvailabilityRulesResponse404 | AddDeviceAvailabilityRulesResponse500 +export type AddDeviceAvailabilityRulesErrorResponse = + | AddDeviceAvailabilityRulesResponse400 + | AddDeviceAvailabilityRulesResponse401 + | AddDeviceAvailabilityRulesResponse403 + | AddDeviceAvailabilityRulesResponse404 + | AddDeviceAvailabilityRulesResponse500; /** * Typing for a response with status 200 to the request made by addDeviceAvailabilityRules() * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse200 extends Types.SuccessResponse { - status: 200 - headers?: { - [k: string]: string | undefined - } - body: Types.Availability<"response"> + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Availability<'response'>; } /** @@ -857,11 +920,11 @@ export interface AddDeviceAvailabilityRulesResponse200 extends Types.SuccessResp * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -869,11 +932,11 @@ export interface AddDeviceAvailabilityRulesResponse400 extends Types.ErrorRespon * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -881,11 +944,11 @@ export interface AddDeviceAvailabilityRulesResponse401 extends Types.ErrorRespon * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -893,11 +956,11 @@ export interface AddDeviceAvailabilityRulesResponse403 extends Types.ErrorRespon * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -905,11 +968,11 @@ export interface AddDeviceAvailabilityRulesResponse404 extends Types.ErrorRespon * @category addDeviceAvailabilityRules() */ export interface AddDeviceAvailabilityRulesResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -917,37 +980,44 @@ export interface AddDeviceAvailabilityRulesResponse500 extends Types.ErrorRespon * @category createWebsocketToken() */ export type CreateWebsocketTokenParameters = { - "device_id": string, -} + device_id: string; +}; /** * Typing for all possible responses to the request made by createWebsocketToken() * @category createWebsocketToken() */ -export type CreateWebsocketTokenResponse = CreateWebsocketTokenSuccessResponse | CreateWebsocketTokenErrorResponse +export type CreateWebsocketTokenResponse = + | CreateWebsocketTokenSuccessResponse + | CreateWebsocketTokenErrorResponse; /** * Typing for all successful responses to the request made by createWebsocketToken() * @category createWebsocketToken() */ -export type CreateWebsocketTokenSuccessResponse = CreateWebsocketTokenResponse200 +export type CreateWebsocketTokenSuccessResponse = CreateWebsocketTokenResponse200; /** * Typing for all error responses to the request made by createWebsocketToken() * @category createWebsocketToken() */ -export type CreateWebsocketTokenErrorResponse = CreateWebsocketTokenResponse400 | CreateWebsocketTokenResponse401 | CreateWebsocketTokenResponse403 | CreateWebsocketTokenResponse404 | CreateWebsocketTokenResponse500 +export type CreateWebsocketTokenErrorResponse = + | CreateWebsocketTokenResponse400 + | CreateWebsocketTokenResponse401 + | CreateWebsocketTokenResponse403 + | CreateWebsocketTokenResponse404 + | CreateWebsocketTokenResponse500; /** * Typing for a response with status 200 to the request made by createWebsocketToken() * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse200 extends Types.SuccessResponse { - status: 200 - headers?: { - [k: string]: string | undefined - } - body: string + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: string; } /** @@ -955,11 +1025,11 @@ export interface CreateWebsocketTokenResponse200 extends Types.SuccessResponse { * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -967,11 +1037,11 @@ export interface CreateWebsocketTokenResponse400 extends Types.ErrorResponse { * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -979,11 +1049,11 @@ export interface CreateWebsocketTokenResponse401 extends Types.ErrorResponse { * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -991,11 +1061,11 @@ export interface CreateWebsocketTokenResponse403 extends Types.ErrorResponse { * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1003,11 +1073,11 @@ export interface CreateWebsocketTokenResponse404 extends Types.ErrorResponse { * @category createWebsocketToken() */ export interface CreateWebsocketTokenResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1015,43 +1085,55 @@ export interface CreateWebsocketTokenResponse500 extends Types.ErrorResponse { * @category sendSignalingMessage() */ export type SendSignalingMessageParameters = { - "device_id": string, -} + device_id: string; +}; /** * Typing for the body of the request made by sendSignalingMessage() * @category sendSignalingMessage() */ -export type SendSignalingMessageBody = Types.CreatePeerconnectionMessage<"request"> | Types.ClosePeerconnectionMessage<"request"> | Types.SignalingMessage<"request"> | Types.ConfigurationMessage<"request"> | Types.ExperimentStatusChangedMessage<"request"> +export type SendSignalingMessageBody = + | Types.CreatePeerconnectionMessage<'request'> + | Types.ClosePeerconnectionMessage<'request'> + | Types.SignalingMessage<'request'> + | Types.ConfigurationMessage<'request'> + | Types.ExperimentStatusChangedMessage<'request'>; /** * Typing for all possible responses to the request made by sendSignalingMessage() * @category sendSignalingMessage() */ -export type SendSignalingMessageResponse = SendSignalingMessageSuccessResponse | SendSignalingMessageErrorResponse +export type SendSignalingMessageResponse = + | SendSignalingMessageSuccessResponse + | SendSignalingMessageErrorResponse; /** * Typing for all successful responses to the request made by sendSignalingMessage() * @category sendSignalingMessage() */ -export type SendSignalingMessageSuccessResponse = SendSignalingMessageResponse200 +export type SendSignalingMessageSuccessResponse = SendSignalingMessageResponse200; /** * Typing for all error responses to the request made by sendSignalingMessage() * @category sendSignalingMessage() */ -export type SendSignalingMessageErrorResponse = SendSignalingMessageResponse400 | SendSignalingMessageResponse401 | SendSignalingMessageResponse403 | SendSignalingMessageResponse404 | SendSignalingMessageResponse500 +export type SendSignalingMessageErrorResponse = + | SendSignalingMessageResponse400 + | SendSignalingMessageResponse401 + | SendSignalingMessageResponse403 + | SendSignalingMessageResponse404 + | SendSignalingMessageResponse500; /** * Typing for a response with status 200 to the request made by sendSignalingMessage() * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse200 extends Types.SuccessResponse { - status: 200 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1059,11 +1141,11 @@ export interface SendSignalingMessageResponse200 extends Types.SuccessResponse { * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1071,11 +1153,11 @@ export interface SendSignalingMessageResponse400 extends Types.ErrorResponse { * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1083,11 +1165,11 @@ export interface SendSignalingMessageResponse401 extends Types.ErrorResponse { * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1095,11 +1177,11 @@ export interface SendSignalingMessageResponse403 extends Types.ErrorResponse { * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1107,41 +1189,48 @@ export interface SendSignalingMessageResponse404 extends Types.ErrorResponse { * @category sendSignalingMessage() */ export interface SendSignalingMessageResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** * Typing for all possible responses to the request made by listPeerconnections() * @category listPeerconnections() */ -export type ListPeerconnectionsResponse = ListPeerconnectionsSuccessResponse | ListPeerconnectionsErrorResponse +export type ListPeerconnectionsResponse = + | ListPeerconnectionsSuccessResponse + | ListPeerconnectionsErrorResponse; /** * Typing for all successful responses to the request made by listPeerconnections() * @category listPeerconnections() */ -export type ListPeerconnectionsSuccessResponse = ListPeerconnectionsResponse200 +export type ListPeerconnectionsSuccessResponse = ListPeerconnectionsResponse200; /** * Typing for all error responses to the request made by listPeerconnections() * @category listPeerconnections() */ -export type ListPeerconnectionsErrorResponse = ListPeerconnectionsResponse400 | ListPeerconnectionsResponse401 | ListPeerconnectionsResponse403 | ListPeerconnectionsResponse404 | ListPeerconnectionsResponse500 +export type ListPeerconnectionsErrorResponse = + | ListPeerconnectionsResponse400 + | ListPeerconnectionsResponse401 + | ListPeerconnectionsResponse403 + | ListPeerconnectionsResponse404 + | ListPeerconnectionsResponse500; /** * Typing for a response with status 200 to the request made by listPeerconnections() * @category listPeerconnections() */ export interface ListPeerconnectionsResponse200 extends Types.SuccessResponse { - status: 200 - headers?: { - [k: string]: string | undefined - } - body: Types.PeerconnectionOverview<"response">[] + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.PeerconnectionOverview<'response'>[]; } /** @@ -1149,11 +1238,11 @@ export interface ListPeerconnectionsResponse200 extends Types.SuccessResponse { * @category listPeerconnections() */ export interface ListPeerconnectionsResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1161,11 +1250,11 @@ export interface ListPeerconnectionsResponse400 extends Types.ErrorResponse { * @category listPeerconnections() */ export interface ListPeerconnectionsResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1173,11 +1262,11 @@ export interface ListPeerconnectionsResponse401 extends Types.ErrorResponse { * @category listPeerconnections() */ export interface ListPeerconnectionsResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1185,11 +1274,11 @@ export interface ListPeerconnectionsResponse403 extends Types.ErrorResponse { * @category listPeerconnections() */ export interface ListPeerconnectionsResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1197,11 +1286,11 @@ export interface ListPeerconnectionsResponse404 extends Types.ErrorResponse { * @category listPeerconnections() */ export interface ListPeerconnectionsResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1209,44 +1298,53 @@ export interface ListPeerconnectionsResponse500 extends Types.ErrorResponse { * @category createPeerconnection() */ export type CreatePeerconnectionParameters = { - "closedUrl"?: string, - "statusChangedUrl"?: string, -} + closedUrl?: string; + statusChangedUrl?: string; +}; /** * Typing for the body of the request made by createPeerconnection() * @category createPeerconnection() */ -export type CreatePeerconnectionBody = Types.Peerconnection<"request"> +export type CreatePeerconnectionBody = Types.Peerconnection<'request'>; /** * Typing for all possible responses to the request made by createPeerconnection() * @category createPeerconnection() */ -export type CreatePeerconnectionResponse = CreatePeerconnectionSuccessResponse | CreatePeerconnectionErrorResponse +export type CreatePeerconnectionResponse = + | CreatePeerconnectionSuccessResponse + | CreatePeerconnectionErrorResponse; /** * Typing for all successful responses to the request made by createPeerconnection() * @category createPeerconnection() */ -export type CreatePeerconnectionSuccessResponse = CreatePeerconnectionResponse201 | CreatePeerconnectionResponse202 +export type CreatePeerconnectionSuccessResponse = + | CreatePeerconnectionResponse201 + | CreatePeerconnectionResponse202; /** * Typing for all error responses to the request made by createPeerconnection() * @category createPeerconnection() */ -export type CreatePeerconnectionErrorResponse = CreatePeerconnectionResponse400 | CreatePeerconnectionResponse401 | CreatePeerconnectionResponse403 | CreatePeerconnectionResponse404 | CreatePeerconnectionResponse500 +export type CreatePeerconnectionErrorResponse = + | CreatePeerconnectionResponse400 + | CreatePeerconnectionResponse401 + | CreatePeerconnectionResponse403 + | CreatePeerconnectionResponse404 + | CreatePeerconnectionResponse500; /** * Typing for a response with status 201 to the request made by createPeerconnection() * @category createPeerconnection() */ export interface CreatePeerconnectionResponse201 extends Types.SuccessResponse { - status: 201 - headers?: { - [k: string]: string | undefined - } - body: Types.Peerconnection<"response"> + status: 201; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Peerconnection<'response'>; } /** @@ -1254,11 +1352,11 @@ export interface CreatePeerconnectionResponse201 extends Types.SuccessResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse202 extends Types.SuccessResponse { - status: 202 - headers?: { - [k: string]: string | undefined - } - body: Types.Peerconnection<"response"> + status: 202; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Peerconnection<'response'>; } /** @@ -1266,11 +1364,11 @@ export interface CreatePeerconnectionResponse202 extends Types.SuccessResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1278,11 +1376,11 @@ export interface CreatePeerconnectionResponse400 extends Types.ErrorResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1290,11 +1388,11 @@ export interface CreatePeerconnectionResponse401 extends Types.ErrorResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1302,11 +1400,11 @@ export interface CreatePeerconnectionResponse403 extends Types.ErrorResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1314,11 +1412,11 @@ export interface CreatePeerconnectionResponse404 extends Types.ErrorResponse { * @category createPeerconnection() */ export interface CreatePeerconnectionResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1326,37 +1424,44 @@ export interface CreatePeerconnectionResponse500 extends Types.ErrorResponse { * @category getPeerconnection() */ export type GetPeerconnectionParameters = { - "peerconnection_id": string, -} + peerconnection_id: string; +}; /** * Typing for all possible responses to the request made by getPeerconnection() * @category getPeerconnection() */ -export type GetPeerconnectionResponse = GetPeerconnectionSuccessResponse | GetPeerconnectionErrorResponse +export type GetPeerconnectionResponse = + | GetPeerconnectionSuccessResponse + | GetPeerconnectionErrorResponse; /** * Typing for all successful responses to the request made by getPeerconnection() * @category getPeerconnection() */ -export type GetPeerconnectionSuccessResponse = GetPeerconnectionResponse200 +export type GetPeerconnectionSuccessResponse = GetPeerconnectionResponse200; /** * Typing for all error responses to the request made by getPeerconnection() * @category getPeerconnection() */ -export type GetPeerconnectionErrorResponse = GetPeerconnectionResponse400 | GetPeerconnectionResponse401 | GetPeerconnectionResponse403 | GetPeerconnectionResponse404 | GetPeerconnectionResponse500 +export type GetPeerconnectionErrorResponse = + | GetPeerconnectionResponse400 + | GetPeerconnectionResponse401 + | GetPeerconnectionResponse403 + | GetPeerconnectionResponse404 + | GetPeerconnectionResponse500; /** * Typing for a response with status 200 to the request made by getPeerconnection() * @category getPeerconnection() */ export interface GetPeerconnectionResponse200 extends Types.SuccessResponse { - status: 200 - headers?: { - [k: string]: string | undefined - } - body: Types.Peerconnection<"response"> + status: 200; + headers?: { + [k: string]: string | undefined; + }; + body: Types.Peerconnection<'response'>; } /** @@ -1364,11 +1469,11 @@ export interface GetPeerconnectionResponse200 extends Types.SuccessResponse { * @category getPeerconnection() */ export interface GetPeerconnectionResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1376,11 +1481,11 @@ export interface GetPeerconnectionResponse400 extends Types.ErrorResponse { * @category getPeerconnection() */ export interface GetPeerconnectionResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1388,11 +1493,11 @@ export interface GetPeerconnectionResponse401 extends Types.ErrorResponse { * @category getPeerconnection() */ export interface GetPeerconnectionResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1400,11 +1505,11 @@ export interface GetPeerconnectionResponse403 extends Types.ErrorResponse { * @category getPeerconnection() */ export interface GetPeerconnectionResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1412,11 +1517,11 @@ export interface GetPeerconnectionResponse404 extends Types.ErrorResponse { * @category getPeerconnection() */ export interface GetPeerconnectionResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1424,37 +1529,46 @@ export interface GetPeerconnectionResponse500 extends Types.ErrorResponse { * @category deletePeerconnection() */ export type DeletePeerconnectionParameters = { - "peerconnection_id": string, -} + peerconnection_id: string; +}; /** * Typing for all possible responses to the request made by deletePeerconnection() * @category deletePeerconnection() */ -export type DeletePeerconnectionResponse = DeletePeerconnectionSuccessResponse | DeletePeerconnectionErrorResponse +export type DeletePeerconnectionResponse = + | DeletePeerconnectionSuccessResponse + | DeletePeerconnectionErrorResponse; /** * Typing for all successful responses to the request made by deletePeerconnection() * @category deletePeerconnection() */ -export type DeletePeerconnectionSuccessResponse = DeletePeerconnectionResponse202 | DeletePeerconnectionResponse204 +export type DeletePeerconnectionSuccessResponse = + | DeletePeerconnectionResponse202 + | DeletePeerconnectionResponse204; /** * Typing for all error responses to the request made by deletePeerconnection() * @category deletePeerconnection() */ -export type DeletePeerconnectionErrorResponse = DeletePeerconnectionResponse400 | DeletePeerconnectionResponse401 | DeletePeerconnectionResponse403 | DeletePeerconnectionResponse404 | DeletePeerconnectionResponse500 +export type DeletePeerconnectionErrorResponse = + | DeletePeerconnectionResponse400 + | DeletePeerconnectionResponse401 + | DeletePeerconnectionResponse403 + | DeletePeerconnectionResponse404 + | DeletePeerconnectionResponse500; /** * Typing for a response with status 202 to the request made by deletePeerconnection() * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse202 extends Types.SuccessResponse { - status: 202 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 202; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1462,11 +1576,11 @@ export interface DeletePeerconnectionResponse202 extends Types.SuccessResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse204 extends Types.SuccessResponse { - status: 204 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 204; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1474,11 +1588,11 @@ export interface DeletePeerconnectionResponse204 extends Types.SuccessResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1486,11 +1600,11 @@ export interface DeletePeerconnectionResponse400 extends Types.ErrorResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1498,11 +1612,11 @@ export interface DeletePeerconnectionResponse401 extends Types.ErrorResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1510,11 +1624,11 @@ export interface DeletePeerconnectionResponse403 extends Types.ErrorResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1522,11 +1636,11 @@ export interface DeletePeerconnectionResponse404 extends Types.ErrorResponse { * @category deletePeerconnection() */ export interface DeletePeerconnectionResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1534,50 +1648,59 @@ export interface DeletePeerconnectionResponse500 extends Types.ErrorResponse { * @category patchPeerconnectionDeviceStatus() */ export type PatchPeerconnectionDeviceStatusParameters = { - "peerconnection_id": string, - "device_url": string, -} + peerconnection_id: string; + device_url: string; +}; /** * Typing for the body of the request made by patchPeerconnectionDeviceStatus() * @category patchPeerconnectionDeviceStatus() */ export type PatchPeerconnectionDeviceStatusBody = { - /** - * The status of the peerconnection. - */ - status: Types.ConnectionStatus<"request"> - [k: string]: unknown - } + /** + * The status of the peerconnection. + */ + status: Types.ConnectionStatus<'request'>; + [k: string]: unknown; +}; /** * Typing for all possible responses to the request made by patchPeerconnectionDeviceStatus() * @category patchPeerconnectionDeviceStatus() */ -export type PatchPeerconnectionDeviceStatusResponse = PatchPeerconnectionDeviceStatusSuccessResponse | PatchPeerconnectionDeviceStatusErrorResponse +export type PatchPeerconnectionDeviceStatusResponse = + | PatchPeerconnectionDeviceStatusSuccessResponse + | PatchPeerconnectionDeviceStatusErrorResponse; /** * Typing for all successful responses to the request made by patchPeerconnectionDeviceStatus() * @category patchPeerconnectionDeviceStatus() */ -export type PatchPeerconnectionDeviceStatusSuccessResponse = PatchPeerconnectionDeviceStatusResponse204 +export type PatchPeerconnectionDeviceStatusSuccessResponse = + PatchPeerconnectionDeviceStatusResponse204; /** * Typing for all error responses to the request made by patchPeerconnectionDeviceStatus() * @category patchPeerconnectionDeviceStatus() */ -export type PatchPeerconnectionDeviceStatusErrorResponse = PatchPeerconnectionDeviceStatusResponse400 | PatchPeerconnectionDeviceStatusResponse401 | PatchPeerconnectionDeviceStatusResponse403 | PatchPeerconnectionDeviceStatusResponse404 | PatchPeerconnectionDeviceStatusResponse500 +export type PatchPeerconnectionDeviceStatusErrorResponse = + | PatchPeerconnectionDeviceStatusResponse400 + | PatchPeerconnectionDeviceStatusResponse401 + | PatchPeerconnectionDeviceStatusResponse403 + | PatchPeerconnectionDeviceStatusResponse404 + | PatchPeerconnectionDeviceStatusResponse500; /** * Typing for a response with status 204 to the request made by patchPeerconnectionDeviceStatus() * @category patchPeerconnectionDeviceStatus() */ -export interface PatchPeerconnectionDeviceStatusResponse204 extends Types.SuccessResponse { - status: 204 - headers?: { - [k: string]: string | undefined - } - body?: undefined +export interface PatchPeerconnectionDeviceStatusResponse204 + extends Types.SuccessResponse { + status: 204; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1585,11 +1708,11 @@ export interface PatchPeerconnectionDeviceStatusResponse204 extends Types.Succes * @category patchPeerconnectionDeviceStatus() */ export interface PatchPeerconnectionDeviceStatusResponse400 extends Types.ErrorResponse { - status: 400 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 400; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1597,11 +1720,11 @@ export interface PatchPeerconnectionDeviceStatusResponse400 extends Types.ErrorR * @category patchPeerconnectionDeviceStatus() */ export interface PatchPeerconnectionDeviceStatusResponse401 extends Types.ErrorResponse { - status: 401 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 401; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1609,11 +1732,11 @@ export interface PatchPeerconnectionDeviceStatusResponse401 extends Types.ErrorR * @category patchPeerconnectionDeviceStatus() */ export interface PatchPeerconnectionDeviceStatusResponse403 extends Types.ErrorResponse { - status: 403 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 403; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1621,11 +1744,11 @@ export interface PatchPeerconnectionDeviceStatusResponse403 extends Types.ErrorR * @category patchPeerconnectionDeviceStatus() */ export interface PatchPeerconnectionDeviceStatusResponse404 extends Types.ErrorResponse { - status: 404 - headers?: { - [k: string]: string | undefined - } - body?: undefined + status: 404; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; } /** @@ -1633,9 +1756,9 @@ export interface PatchPeerconnectionDeviceStatusResponse404 extends Types.ErrorR * @category patchPeerconnectionDeviceStatus() */ export interface PatchPeerconnectionDeviceStatusResponse500 extends Types.ErrorResponse { - status: 500 - headers?: { - [k: string]: string | undefined - } - body?: undefined -} \ No newline at end of file + status: 500; + headers?: { + [k: string]: string | undefined; + }; + body?: undefined; +} diff --git a/services/booking/src/common/src/clients/device/types.ts b/services/booking/src/common/src/clients/device/types.ts index 13cd46e1..b309e029 100644 --- a/services/booking/src/common/src/clients/device/types.ts +++ b/services/booking/src/common/src/clients/device/types.ts @@ -3,3723 +3,3803 @@ * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, * and run openapi-codegeneration to regenerate this file. */ -import * as BasicValidation from "./basicValidation.cjs" +import * as BasicValidation from './basicValidation.cjs'; /** * @internal */ export interface FunctionWithErrors { - (...args: unknown[]): unknown - errors?: unknown + (...args: unknown[]): unknown; + errors?: unknown; } /** * @internal */ export interface RequestInfo { - method?: "GET" | "POST" | "PUT" | "DELETE" | "TRACE" | "OPTIONS" | "PATCH" | "HEAD" - body?: string - headers?: [string, string][] + method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'OPTIONS' | 'PATCH' | 'HEAD'; + body?: string; + headers?: [string, string][]; } /** * @internal */ -export type FetchFunction = (url: string, info?: RequestInfo) => Promise | ResponseData +export type FetchFunction = ( + url: string, + info?: RequestInfo, +) => Promise | ResponseData; export interface ResponseData { - status: number, - headers?: { - [key: string]: string | undefined - }, - body?: unknown + status: number; + headers?: { + [key: string]: string | undefined; + }; + body?: unknown; } export interface SuccessResponse extends ResponseData { - success?: true + success?: true; } export interface ErrorResponse extends ResponseData { - success?: false + success?: false; } /** * @internal */ export function isSuccessResponse(response: ResponseData): response is SuccessResponse { - return response.status < 400 + return response.status < 400; } /** * @internal */ export function isErrorResponse(response: ResponseData): response is ErrorResponse { - return response.status >= 400 + return response.status >= 400; } /** * This type allows to pick the required properties of another type. */ export type Require = Partial & { - [Property in Key]-?: Type[Property] -} + [Property in Key]-?: Type[Property]; +}; export type SizedTuple< - T, - MIN extends number | undefined = undefined, - MAX extends number | undefined = undefined + T, + MIN extends number | undefined = undefined, + MAX extends number | undefined = undefined, > = MIN extends number - ? MAX extends number - ? _SizedTuple> - : TupleObject> & T[] - : MAX extends number + ? MAX extends number + ? _SizedTuple> + : TupleObject> & T[] + : MAX extends number ? _SizedTuple, true> : T[]; -type _SizedTuple< - T, - ARR extends number[], - Z extends boolean = false -> = ARR extends [infer HEAD extends number, ...infer TAIL extends number[]] - ? Tuple | _SizedTuple - : never; +type _SizedTuple = ARR extends [ + infer HEAD extends number, + ...infer TAIL extends number[], +] + ? Tuple | _SizedTuple + : never; type Tuple = _Tuple< - T, - NumericRangeTuple + T, + NumericRangeTuple >; type _Tuple = N extends [ - infer HEAD, - ...infer TAIL extends number[] + infer HEAD, + ...infer TAIL extends number[], ] - ? HEAD extends 0 - ? [] | _Tuple - : [T, ..._Tuple] - : []; + ? HEAD extends 0 + ? [] | _Tuple + : [T, ..._Tuple] + : []; type TupleObject = N extends [ - infer HEAD extends number, - ...infer TAIL extends number[] + infer HEAD extends number, + ...infer TAIL extends number[], ] - ? TAIL extends [] - ? Record - : { [P in HEAD]: T } & TupleObject - : Record; + ? TAIL extends [] + ? Record + : { [P in HEAD]: T } & TupleObject + : Record; export type NumericRange< - START extends number, - END extends number, - ARR extends unknown[] = [], - ACC extends number = never + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number = never, > = ARR['length'] extends END - ? ACC | START | END - : NumericRange< - START, - END, - [...ARR, 1], - ARR[START] extends undefined ? ACC : ACC | ARR['length'] - >; + ? ACC | START | END + : NumericRange< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : ACC | ARR['length'] + >; type NumericRangeTuple< - START extends number, - END extends number, - ARR extends unknown[] = [], - ACC extends number[] = [] + START extends number, + END extends number, + ARR extends unknown[] = [], + ACC extends number[] = [], > = ARR['length'] extends END - ? [START, ...ACC, END] - : NumericRangeTuple< - START, - END, - [...ARR, 1], - ARR[START] extends undefined ? ACC : [...ACC, ARR['length']] - >; - - - export type AuthenticationMessage = T extends "all" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "authenticate" - token?: string - authenticated?: boolean - [k: string]: unknown -} - : T extends "request" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "authenticate" - token?: string - authenticated?: boolean - [k: string]: unknown -} - : T extends "response" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "authenticate" - token?: string - authenticated?: boolean - [k: string]: unknown -} - : never - - - - export type ConnectionStateChangedMessage = T extends "all" - ? { - messageType: string - [k: string]: unknown -} & { - messageType?: "connection-state-changed" - connectionUrl: string - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown -} - : T extends "request" - ? { - messageType: string - [k: string]: unknown -} & { - messageType?: "connection-state-changed" - connectionUrl: string - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown -} - : T extends "response" - ? { - messageType: string - [k: string]: unknown -} & { - messageType?: "connection-state-changed" - connectionUrl: string - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown -} - : never - - - - export type UserReference = T extends "all" - ? { - /** - * URL of the user - */ - url: string - [k: string]: unknown -} - : T extends "request" - ? { - /** - * URL of the user - */ - url: string - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the user - */ - url: string - [k: string]: unknown -} - : never - - - - export type DeviceOverview = T extends "all" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} - : never - - - - export type ServiceDescription = T extends "all" - ? { - serviceType?: string - serviceId?: string - serviceDirection?: "consumer" | "producer" | "prosumer" - [k: string]: unknown -} - : T extends "request" - ? { - serviceType?: string - serviceId?: string - serviceDirection?: "consumer" | "producer" | "prosumer" - [k: string]: unknown -} - : T extends "response" - ? { - serviceType?: string - serviceId?: string - serviceDirection?: "consumer" | "producer" | "prosumer" - [k: string]: unknown -} - : never - - - - export type InstantiableCloudDevice = T extends "all" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} - : never - - - - export type TimeSlot = T extends "all" - ? { - start?: string - end?: string - [k: string]: unknown -} - : T extends "request" - ? { - start?: string - end?: string - [k: string]: unknown -} - : T extends "response" - ? { - start?: string - end?: string - [k: string]: unknown -} - : never - - + ? [START, ...ACC, END] + : NumericRangeTuple< + START, + END, + [...ARR, 1], + ARR[START] extends undefined ? ACC : [...ACC, ARR['length']] + >; + +export type AuthenticationMessage = + T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'authenticate'; + token?: string; + authenticated?: boolean; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'authenticate'; + token?: string; + authenticated?: boolean; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'authenticate'; + token?: string; + authenticated?: boolean; + [k: string]: unknown; + } + : never; + +export type ConnectionStateChangedMessage< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType?: 'connection-state-changed'; + connectionUrl: string; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType?: 'connection-state-changed'; + connectionUrl: string; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType?: 'connection-state-changed'; + connectionUrl: string; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } + : never; + +export type UserReference = + T extends 'all' + ? { + /** + * URL of the user + */ + url: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * URL of the user + */ + url: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the user + */ + url: string; + [k: string]: unknown; + } + : never; + +export type DeviceOverview = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } + : never; + +export type ServiceDescription = + T extends 'all' + ? { + serviceType?: string; + serviceId?: string; + serviceDirection?: 'consumer' | 'producer' | 'prosumer'; + [k: string]: unknown; + } + : T extends 'request' + ? { + serviceType?: string; + serviceId?: string; + serviceDirection?: 'consumer' | 'producer' | 'prosumer'; + [k: string]: unknown; + } + : T extends 'response' + ? { + serviceType?: string; + serviceId?: string; + serviceDirection?: 'consumer' | 'producer' | 'prosumer'; + [k: string]: unknown; + } + : never; + +export type InstantiableCloudDevice = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type TimeSlot = T extends 'all' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } + : never; - /** +/** * A list of time slots that the maintainer of the device announced it is available - * + * */ -export type Availability = T extends "all" - ? TimeSlot[] - : T extends "request" - ? TimeSlot<"request">[] - : T extends "response" - ? TimeSlot<"response">[] - : never - - - - export type ConcreteDevice = T extends "all" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "device" - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot[] - experiment?: string - services?: ServiceDescription[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "device" - experiment?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "device" - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot<"response">[] - experiment?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} - : never - - - - export type InstantiableBrowserDevice = T extends "all" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} - : never - - - - export type DeviceReference = T extends "all" - ? { - /** - * URL of the device - */ - url: string - [k: string]: unknown -} - : T extends "request" - ? { - /** - * URL of the device - */ - url: string - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the device - */ - url: string - [k: string]: unknown -} - : never - - - - export type DeviceGroup = T extends "all" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "group" - devices: DeviceReference[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "group" - devices: DeviceReference<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "group" - devices: DeviceReference<"response">[] - [k: string]: unknown -} - : never - - - - export type Device = T extends "all" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription[] - [k: string]: unknown -} | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "device" - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot[] - experiment?: string - services?: ServiceDescription[] - [k: string]: unknown -} | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription[] - [k: string]: unknown -} | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "group" - devices: DeviceReference[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "device" - experiment?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "group" - devices: DeviceReference<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "device" - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot<"response">[] - experiment?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "group" - devices: DeviceReference<"response">[] - [k: string]: unknown -} - : never - - - - export type Callback = T extends "all" - ? { - callbackType: string - [k: string]: unknown -} - : T extends "request" - ? { - callbackType: string - [k: string]: unknown -} - : T extends "response" - ? { - callbackType: string - [k: string]: unknown -} - : never - - - - export type EventCallback = T extends "all" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} - : T extends "request" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} - : T extends "response" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} - : never - - - - export type DeviceChangedEventCallback = T extends "all" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} & { - eventType: "device-changed" - device: { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown - } & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription[] - [k: string]: unknown - } | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown - } & { - type?: "device" - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot[] - experiment?: string - services?: ServiceDescription[] - [k: string]: unknown - } | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown - } & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription[] - [k: string]: unknown - } | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown - } & { - type?: "group" - devices: DeviceReference[] - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "request" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} & { - eventType: "device-changed" - device: { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown - } & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown - } | { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown - } & { - type?: "device" - experiment?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown - } | { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown - } & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown - } | { - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown - } & { - type?: "group" - devices: DeviceReference<"request">[] - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "response" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} & { - eventType: "device-changed" - device: { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown - } & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown - } | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown - } & { - type?: "device" - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot<"response">[] - experiment?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown - } | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown - } & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown - } | { - /** - * URL of the device - */ - url: string - /** - * Name of the device - */ - name: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown - } & { - type?: "group" - devices: DeviceReference<"response">[] - [k: string]: unknown - } - [k: string]: unknown -} - : never - - - - export type DeviceOverviewUpdate = T extends "all" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} - : never - - - - export type InstantiableCloudDeviceUpdate = T extends "all" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} - : never - - - - export type ConcreteDeviceUpdate = T extends "all" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "device" - experiment?: string - services?: ServiceDescription[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "device" - experiment?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "device" - experiment?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} - : never - - - - export type InstantiableBrowserDeviceUpdate = T extends "all" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} - : never - - - - export type DeviceGroupUpdate = T extends "all" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "group" - devices?: DeviceReference[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "group" - devices?: DeviceReference<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "group" - devices?: DeviceReference<"response">[] - [k: string]: unknown -} - : never - - - - export type DeviceUpdate = T extends "all" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "device" - experiment?: string - services?: ServiceDescription[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference[] - /** - * List of users who own the device - */ - owner?: UserReference[] - [k: string]: unknown -} & { - type?: "group" - devices?: DeviceReference[] - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "device" - experiment?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription<"request">[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"request">[] - /** - * List of users who own the device - */ - owner?: UserReference<"request">[] - [k: string]: unknown -} & { - type?: "group" - devices?: DeviceReference<"request">[] - [k: string]: unknown -} - : T extends "response" - ? { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "cloud instantiable" - instantiateUrl?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "device" - experiment?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "edge instantiable" - codeUrl?: string - services?: ServiceDescription<"response">[] - [k: string]: unknown -} | { - /** - * Name of the device - */ - name?: string - /** - * Extended description of the device, features, etc. - */ - description?: string - /** - * Type of the device - */ - type: "device" | "group" | "edge instantiable" | "cloud instantiable" - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean - /** - * List of users who can view the device - */ - viewer?: UserReference<"response">[] - /** - * List of users who own the device - */ - owner?: UserReference<"response">[] - [k: string]: unknown -} & { - type?: "group" - devices?: DeviceReference<"response">[] - [k: string]: unknown -} - : never - - - - export type AvailabilityRule = T extends "all" - ? { - start?: string - end?: string - [k: string]: unknown -} & { - available?: boolean - /** - * If specified the time slot is repeated in a fixed offset specified by the frequency - */ - repeat?: { - frequency: "HOURLY" | "DAILY" | "WEEKLY" - /** - * Up to this date-time the time slot will be repeated. - */ - until?: string - /** - * How often the time slot will be repeated - */ - count?: number - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "request" - ? { - start?: string - end?: string - [k: string]: unknown -} & { - available?: boolean - /** - * If specified the time slot is repeated in a fixed offset specified by the frequency - */ - repeat?: { - frequency: "HOURLY" | "DAILY" | "WEEKLY" - /** - * Up to this date-time the time slot will be repeated. - */ - until?: string - /** - * How often the time slot will be repeated - */ - count?: number - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "response" - ? { - start?: string - end?: string - [k: string]: unknown -} & { - available?: boolean - /** - * If specified the time slot is repeated in a fixed offset specified by the frequency - */ - repeat?: { - frequency: "HOURLY" | "DAILY" | "WEEKLY" - /** - * Up to this date-time the time slot will be repeated. - */ - until?: string - /** - * How often the time slot will be repeated - */ - count?: number - [k: string]: unknown - } - [k: string]: unknown -} - : never - - - - export type Message = T extends "all" - ? { - messageType: string - [k: string]: unknown -} - : T extends "request" - ? { - messageType: string - [k: string]: unknown -} - : T extends "response" - ? { - messageType: string - [k: string]: unknown -} - : never - - - - export type CommandMessage = T extends "all" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "command" - command: string - [k: string]: unknown -} - : T extends "request" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "command" - command: string - [k: string]: unknown -} - : T extends "response" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "command" - command: string - [k: string]: unknown -} - : never - - - - export type ServiceConfig = T extends "all" - ? { - serviceType: string - serviceId: string - remoteServiceId: string - [k: string]: unknown -} - : T extends "request" - ? { - serviceType: string - serviceId: string - remoteServiceId: string - [k: string]: unknown -} - : T extends "response" - ? { - serviceType: string - serviceId: string - remoteServiceId: string - [k: string]: unknown -} - : never - - - - export type CreatePeerconnectionMessage = T extends "all" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "command" - command: string - [k: string]: unknown -} & { - command: "createPeerconnection" - connectionType: "webrtc" | "websocket" | "local" - connectionUrl: string - services: ServiceConfig[] - tiebreaker: boolean - config?: { - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "request" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "command" - command: string - [k: string]: unknown -} & { - command: "createPeerconnection" - connectionType: "webrtc" | "websocket" | "local" - connectionUrl: string - services: ServiceConfig<"request">[] - tiebreaker: boolean - config?: { - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "response" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "command" - command: string - [k: string]: unknown -} & { - command: "createPeerconnection" - connectionType: "webrtc" | "websocket" | "local" - connectionUrl: string - services: ServiceConfig<"response">[] - tiebreaker: boolean - config?: { - [k: string]: unknown - } - [k: string]: unknown -} - : never - - - - export type ClosePeerconnectionMessage = T extends "all" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "command" - command: string - [k: string]: unknown -} & { - command: "closePeerconnection" - connectionUrl: string - [k: string]: unknown -} - : T extends "request" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "command" - command: string - [k: string]: unknown -} & { - command: "closePeerconnection" - connectionUrl: string - [k: string]: unknown -} - : T extends "response" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "command" - command: string - [k: string]: unknown -} & { - command: "closePeerconnection" - connectionUrl: string - [k: string]: unknown -} - : never - - - - export type SignalingMessage = T extends "all" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "signaling" - signalingType: string - connectionUrl: string - content: { - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "request" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "signaling" - signalingType: string - connectionUrl: string - content: { - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "response" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "signaling" - signalingType: string - connectionUrl: string - content: { - [k: string]: unknown - } - [k: string]: unknown -} - : never - - - - export type ConfigurationMessage = T extends "all" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "configuration" - configuration: { - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "request" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "configuration" - configuration: { - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "response" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "configuration" - configuration: { - [k: string]: unknown - } - [k: string]: unknown -} - : never - - - - export type ExperimentStatusChangedMessage = T extends "all" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "experiment-status-changed" - status: string - message?: string - [k: string]: unknown -} - : T extends "request" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "experiment-status-changed" - status: string - message?: string - [k: string]: unknown -} - : T extends "response" - ? { - messageType: string - [k: string]: unknown -} & { - messageType: "experiment-status-changed" - status: string - message?: string - [k: string]: unknown -} - : never - - - +export type Availability = + T extends 'all' + ? TimeSlot[] + : T extends 'request' + ? TimeSlot<'request'>[] + : T extends 'response' + ? TimeSlot<'response'>[] + : never; + +export type ConcreteDevice = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot[]; + experiment?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot<'response'>[]; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type InstantiableBrowserDevice = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type DeviceReference = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * URL of the device + */ + url: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + [k: string]: unknown; + } + : never; + +export type DeviceGroup = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'response'>[]; + [k: string]: unknown; + } + : never; + +export type Device = T extends 'all' + ? + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot[]; + experiment?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference[]; + [k: string]: unknown; + }) + : T extends 'request' + ? + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'request'>[]; + [k: string]: unknown; + }) + : T extends 'response' + ? + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot<'response'>[]; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'response'>[]; + [k: string]: unknown; + }) + : never; + +export type Callback = T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } + : never; + +export type EventCallback = + T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } + : never; + +export type DeviceChangedEventCallback = + T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'device-changed'; + device: + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot[]; + experiment?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference[]; + [k: string]: unknown; + }); + [k: string]: unknown; + } + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'device-changed'; + device: + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'request'>[]; + [k: string]: unknown; + }); + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'device-changed'; + device: + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot<'response'>[]; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'response'>[]; + [k: string]: unknown; + }); + [k: string]: unknown; + } + : never; + +export type DeviceOverviewUpdate = + T extends 'all' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } + : never; + +export type InstantiableCloudDeviceUpdate< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type ConcreteDeviceUpdate = + T extends 'all' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type InstantiableBrowserDeviceUpdate< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type DeviceGroupUpdate = + T extends 'all' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference<'response'>[]; + [k: string]: unknown; + } + : never; + +export type DeviceUpdate = + T extends 'all' + ? + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference[]; + /** + * List of users who own the device + */ + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference[]; + [k: string]: unknown; + }) + : T extends 'request' + ? + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference<'request'>[]; + [k: string]: unknown; + }) + : T extends 'response' + ? + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference<'response'>[]; + [k: string]: unknown; + }) + : never; + +export type AvailabilityRule = + T extends 'all' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } & { + available?: boolean; + /** + * If specified the time slot is repeated in a fixed offset specified by the frequency + */ + repeat?: { + frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; + /** + * Up to this date-time the time slot will be repeated. + */ + until?: string; + /** + * How often the time slot will be repeated + */ + count?: number; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } & { + available?: boolean; + /** + * If specified the time slot is repeated in a fixed offset specified by the frequency + */ + repeat?: { + frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; + /** + * Up to this date-time the time slot will be repeated. + */ + until?: string; + /** + * How often the time slot will be repeated + */ + count?: number; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } & { + available?: boolean; + /** + * If specified the time slot is repeated in a fixed offset specified by the frequency + */ + repeat?: { + frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; + /** + * Up to this date-time the time slot will be repeated. + */ + until?: string; + /** + * How often the time slot will be repeated + */ + count?: number; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type Message = T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } + : never; + +export type CommandMessage = + T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } + : never; + +export type ServiceConfig = + T extends 'all' + ? { + serviceType: string; + serviceId: string; + remoteServiceId: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + serviceType: string; + serviceId: string; + remoteServiceId: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + serviceType: string; + serviceId: string; + remoteServiceId: string; + [k: string]: unknown; + } + : never; + +export type CreatePeerconnectionMessage< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'createPeerconnection'; + connectionType: 'webrtc' | 'websocket' | 'local'; + connectionUrl: string; + services: ServiceConfig[]; + tiebreaker: boolean; + config?: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'createPeerconnection'; + connectionType: 'webrtc' | 'websocket' | 'local'; + connectionUrl: string; + services: ServiceConfig<'request'>[]; + tiebreaker: boolean; + config?: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'createPeerconnection'; + connectionType: 'webrtc' | 'websocket' | 'local'; + connectionUrl: string; + services: ServiceConfig<'response'>[]; + tiebreaker: boolean; + config?: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type ClosePeerconnectionMessage = + T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'closePeerconnection'; + connectionUrl: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'closePeerconnection'; + connectionUrl: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'closePeerconnection'; + connectionUrl: string; + [k: string]: unknown; + } + : never; + +export type SignalingMessage = + T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'signaling'; + signalingType: string; + connectionUrl: string; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'signaling'; + signalingType: string; + connectionUrl: string; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'signaling'; + signalingType: string; + connectionUrl: string; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type ConfigurationMessage = + T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'configuration'; + configuration: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'configuration'; + configuration: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'configuration'; + configuration: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type ExperimentStatusChangedMessage< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'experiment-status-changed'; + status: string; + message?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'experiment-status-changed'; + status: string; + message?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'experiment-status-changed'; + status: string; + message?: string; + [k: string]: unknown; + } + : never; + +/** * The status of the peerconnection. */ -export type ConnectionStatus = T extends "all" - ? "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - : T extends "request" - ? "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - : T extends "response" - ? "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - : never - - - - export type PeerconnectionCommon = T extends "all" - ? { - /** - * URL of the peerconnection - */ - url: string - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the peerconnection - */ - url: string - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown -} - : never - - - - export type PeerconnectionOverview = T extends "all" - ? { - /** - * URL of the peerconnection - */ - url: string - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown -} & { - devices: SizedTuple - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - [k: string]: unknown -} & { - devices: SizedTuple,2,2> - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the peerconnection - */ - url: string - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown -} & { - devices: SizedTuple,2,2> - [k: string]: unknown -} - : never - - - - export type ConfiguredDeviceReference = T extends "all" - ? { - /** - * URL of the device - */ - url: string - config?: { - services?: ServiceConfig[] - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "request" - ? { - /** - * URL of the device - */ - url: string - config?: { - services?: ServiceConfig<"request">[] - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the device - */ - url: string - config?: { - services?: ServiceConfig<"response">[] - [k: string]: unknown - } - [k: string]: unknown -} - : never - - - - export type Peerconnection = T extends "all" - ? { - /** - * URL of the peerconnection - */ - url: string - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown -} & { - devices: SizedTuple - [k: string]: unknown -} - : T extends "request" - ? { - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - [k: string]: unknown -} & { - devices: SizedTuple,2,2> - [k: string]: unknown -} - : T extends "response" - ? { - /** - * URL of the peerconnection - */ - url: string - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown -} & { - devices: SizedTuple,2,2> - [k: string]: unknown -} - : never - - - - export type PeerconnectionClosedEventCallback = T extends "all" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} & { - eventType: "peerconnection-closed" - peerconnection: { - /** - * URL of the peerconnection - */ - url: string - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown - } & { - devices: SizedTuple - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "request" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} & { - eventType: "peerconnection-closed" - peerconnection: { - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - [k: string]: unknown - } & { - devices: SizedTuple,2,2> - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "response" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} & { - eventType: "peerconnection-closed" - peerconnection: { - /** - * URL of the peerconnection - */ - url: string - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown - } & { - devices: SizedTuple,2,2> - [k: string]: unknown - } - [k: string]: unknown -} - : never - - - - export type PeerconnectionStatusChangedEventCallback = T extends "all" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} & { - eventType: "peerconnection-status-changed" - peerconnection: { - /** - * URL of the peerconnection - */ - url: string - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown - } & { - devices: SizedTuple - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "request" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} & { - eventType: "peerconnection-status-changed" - peerconnection: { - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - [k: string]: unknown - } & { - devices: SizedTuple,2,2> - [k: string]: unknown - } - [k: string]: unknown -} - : T extends "response" - ? { - callbackType: string - [k: string]: unknown -} & { - callbackType: "event" - eventType: string - [k: string]: unknown -} & { - eventType: "peerconnection-status-changed" - peerconnection: { - /** - * URL of the peerconnection - */ - url: string - /** - * Type of the peerconnection - */ - type: "local" | "webrtc" - /** - * The status of the peerconnection. - */ - status: "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed" - [k: string]: unknown - } & { - devices: SizedTuple,2,2> - [k: string]: unknown - } - [k: string]: unknown -} - : never - - -export function isAuthenticationMessage( - obj: unknown, type: "request" | "response" | "all" | T = "all" -): obj is AuthenticationMessage { - switch (type) { - case "request": - return BasicValidation.validateAuthenticationMessageRequest(obj) - case "response": - return BasicValidation.validateAuthenticationMessageResponse(obj) - default: - return BasicValidation.validateAuthenticationMessage(obj) +export type ConnectionStatus = + T extends 'all' + ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' + : T extends 'request' + ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' + : T extends 'response' + ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' + : never; + +export type PeerconnectionCommon = + T extends 'all' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } + : never; + +export type PeerconnectionOverview = + T extends 'all' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : never; + +export type ConfiguredDeviceReference = + T extends 'all' + ? { + /** + * URL of the device + */ + url: string; + config?: { + services?: ServiceConfig[]; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * URL of the device + */ + url: string; + config?: { + services?: ServiceConfig<'request'>[]; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + config?: { + services?: ServiceConfig<'response'>[]; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type Peerconnection = + T extends 'all' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : never; + +export type PeerconnectionClosedEventCallback< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-closed'; + peerconnection: { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple; + [k: string]: unknown; + }; + [k: string]: unknown; } -} - -export function isConnectionStateChangedMessage( - obj: unknown, type: "request" | "response" | "all" | T = "all" -): obj is ConnectionStateChangedMessage { - switch (type) { - case "request": - return BasicValidation.validateConnectionStateChangedMessageRequest(obj) - case "response": - return BasicValidation.validateConnectionStateChangedMessageResponse(obj) - default: - return BasicValidation.validateConnectionStateChangedMessage(obj) + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-closed'; + peerconnection: { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-closed'; + peerconnection: { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type PeerconnectionStatusChangedEventCallback< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-status-changed'; + peerconnection: { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple; + [k: string]: unknown; + }; + [k: string]: unknown; } -} - -export function isDeviceOverview( - obj: unknown, type: "request" | "response" | "all" | T = "all" + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-status-changed'; + peerconnection: { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-status-changed'; + peerconnection: { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export function isAuthenticationMessage( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is AuthenticationMessage { + switch (type) { + case 'request': + return BasicValidation.validateAuthenticationMessageRequest(obj); + case 'response': + return BasicValidation.validateAuthenticationMessageResponse(obj); + default: + return BasicValidation.validateAuthenticationMessage(obj); + } +} + +export function isConnectionStateChangedMessage< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is ConnectionStateChangedMessage { + switch (type) { + case 'request': + return BasicValidation.validateConnectionStateChangedMessageRequest(obj); + case 'response': + return BasicValidation.validateConnectionStateChangedMessageResponse(obj); + default: + return BasicValidation.validateConnectionStateChangedMessage(obj); + } +} + +export function isDeviceOverview( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is DeviceOverview { - switch (type) { - case "request": - return BasicValidation.validateDeviceOverviewRequest(obj) - case "response": - return BasicValidation.validateDeviceOverviewResponse(obj) - default: - return BasicValidation.validateDeviceOverview(obj) - } -} - -export function isInstantiableCloudDevice( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateDeviceOverviewRequest(obj); + case 'response': + return BasicValidation.validateDeviceOverviewResponse(obj); + default: + return BasicValidation.validateDeviceOverview(obj); + } +} + +export function isInstantiableCloudDevice< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is InstantiableCloudDevice { - switch (type) { - case "request": - return BasicValidation.validateInstantiableCloudDeviceRequest(obj) - case "response": - return BasicValidation.validateInstantiableCloudDeviceResponse(obj) - default: - return BasicValidation.validateInstantiableCloudDevice(obj) - } -} - -export function isConcreteDevice( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateInstantiableCloudDeviceRequest(obj); + case 'response': + return BasicValidation.validateInstantiableCloudDeviceResponse(obj); + default: + return BasicValidation.validateInstantiableCloudDevice(obj); + } +} + +export function isConcreteDevice( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is ConcreteDevice { - switch (type) { - case "request": - return BasicValidation.validateConcreteDeviceRequest(obj) - case "response": - return BasicValidation.validateConcreteDeviceResponse(obj) - default: - return BasicValidation.validateConcreteDevice(obj) - } -} - -export function isInstantiableBrowserDevice( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateConcreteDeviceRequest(obj); + case 'response': + return BasicValidation.validateConcreteDeviceResponse(obj); + default: + return BasicValidation.validateConcreteDevice(obj); + } +} + +export function isInstantiableBrowserDevice< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is InstantiableBrowserDevice { - switch (type) { - case "request": - return BasicValidation.validateInstantiableBrowserDeviceRequest(obj) - case "response": - return BasicValidation.validateInstantiableBrowserDeviceResponse(obj) - default: - return BasicValidation.validateInstantiableBrowserDevice(obj) - } -} - -export function isDeviceGroup( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateInstantiableBrowserDeviceRequest(obj); + case 'response': + return BasicValidation.validateInstantiableBrowserDeviceResponse(obj); + default: + return BasicValidation.validateInstantiableBrowserDevice(obj); + } +} + +export function isDeviceGroup( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is DeviceGroup { - switch (type) { - case "request": - return BasicValidation.validateDeviceGroupRequest(obj) - case "response": - return BasicValidation.validateDeviceGroupResponse(obj) - default: - return BasicValidation.validateDeviceGroup(obj) - } -} - -export function isDevice( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateDeviceGroupRequest(obj); + case 'response': + return BasicValidation.validateDeviceGroupResponse(obj); + default: + return BasicValidation.validateDeviceGroup(obj); + } +} + +export function isDevice( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is Device { - switch (type) { - case "request": - return BasicValidation.validateDeviceRequest(obj) - case "response": - return BasicValidation.validateDeviceResponse(obj) - default: - return BasicValidation.validateDevice(obj) - } -} - -export function isCallback( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateDeviceRequest(obj); + case 'response': + return BasicValidation.validateDeviceResponse(obj); + default: + return BasicValidation.validateDevice(obj); + } +} + +export function isCallback( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is Callback { - switch (type) { - case "request": - return BasicValidation.validateCallbackRequest(obj) - case "response": - return BasicValidation.validateCallbackResponse(obj) - default: - return BasicValidation.validateCallback(obj) - } -} - -export function isEventCallback( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateCallbackRequest(obj); + case 'response': + return BasicValidation.validateCallbackResponse(obj); + default: + return BasicValidation.validateCallback(obj); + } +} + +export function isEventCallback( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is EventCallback { - switch (type) { - case "request": - return BasicValidation.validateEventCallbackRequest(obj) - case "response": - return BasicValidation.validateEventCallbackResponse(obj) - default: - return BasicValidation.validateEventCallback(obj) - } -} - -export function isDeviceChangedEventCallback( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateEventCallbackRequest(obj); + case 'response': + return BasicValidation.validateEventCallbackResponse(obj); + default: + return BasicValidation.validateEventCallback(obj); + } +} + +export function isDeviceChangedEventCallback< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is DeviceChangedEventCallback { - switch (type) { - case "request": - return BasicValidation.validateDeviceChangedEventCallbackRequest(obj) - case "response": - return BasicValidation.validateDeviceChangedEventCallbackResponse(obj) - default: - return BasicValidation.validateDeviceChangedEventCallback(obj) - } -} - -export function isMessage( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateDeviceChangedEventCallbackRequest(obj); + case 'response': + return BasicValidation.validateDeviceChangedEventCallbackResponse(obj); + default: + return BasicValidation.validateDeviceChangedEventCallback(obj); + } +} + +export function isMessage( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is Message { - switch (type) { - case "request": - return BasicValidation.validateMessageRequest(obj) - case "response": - return BasicValidation.validateMessageResponse(obj) - default: - return BasicValidation.validateMessage(obj) - } -} - -export function isCommandMessage( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateMessageRequest(obj); + case 'response': + return BasicValidation.validateMessageResponse(obj); + default: + return BasicValidation.validateMessage(obj); + } +} + +export function isCommandMessage( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is CommandMessage { - switch (type) { - case "request": - return BasicValidation.validateCommandMessageRequest(obj) - case "response": - return BasicValidation.validateCommandMessageResponse(obj) - default: - return BasicValidation.validateCommandMessage(obj) - } -} - -export function isCreatePeerconnectionMessage( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateCommandMessageRequest(obj); + case 'response': + return BasicValidation.validateCommandMessageResponse(obj); + default: + return BasicValidation.validateCommandMessage(obj); + } +} + +export function isCreatePeerconnectionMessage< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is CreatePeerconnectionMessage { - switch (type) { - case "request": - return BasicValidation.validateCreatePeerconnectionMessageRequest(obj) - case "response": - return BasicValidation.validateCreatePeerconnectionMessageResponse(obj) - default: - return BasicValidation.validateCreatePeerconnectionMessage(obj) - } -} - -export function isClosePeerconnectionMessage( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateCreatePeerconnectionMessageRequest(obj); + case 'response': + return BasicValidation.validateCreatePeerconnectionMessageResponse(obj); + default: + return BasicValidation.validateCreatePeerconnectionMessage(obj); + } +} + +export function isClosePeerconnectionMessage< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is ClosePeerconnectionMessage { - switch (type) { - case "request": - return BasicValidation.validateClosePeerconnectionMessageRequest(obj) - case "response": - return BasicValidation.validateClosePeerconnectionMessageResponse(obj) - default: - return BasicValidation.validateClosePeerconnectionMessage(obj) - } -} - -export function isSignalingMessage( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateClosePeerconnectionMessageRequest(obj); + case 'response': + return BasicValidation.validateClosePeerconnectionMessageResponse(obj); + default: + return BasicValidation.validateClosePeerconnectionMessage(obj); + } +} + +export function isSignalingMessage( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is SignalingMessage { - switch (type) { - case "request": - return BasicValidation.validateSignalingMessageRequest(obj) - case "response": - return BasicValidation.validateSignalingMessageResponse(obj) - default: - return BasicValidation.validateSignalingMessage(obj) - } -} - -export function isConfigurationMessage( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateSignalingMessageRequest(obj); + case 'response': + return BasicValidation.validateSignalingMessageResponse(obj); + default: + return BasicValidation.validateSignalingMessage(obj); + } +} + +export function isConfigurationMessage( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is ConfigurationMessage { - switch (type) { - case "request": - return BasicValidation.validateConfigurationMessageRequest(obj) - case "response": - return BasicValidation.validateConfigurationMessageResponse(obj) - default: - return BasicValidation.validateConfigurationMessage(obj) - } -} - -export function isExperimentStatusChangedMessage( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateConfigurationMessageRequest(obj); + case 'response': + return BasicValidation.validateConfigurationMessageResponse(obj); + default: + return BasicValidation.validateConfigurationMessage(obj); + } +} + +export function isExperimentStatusChangedMessage< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is ExperimentStatusChangedMessage { - switch (type) { - case "request": - return BasicValidation.validateExperimentStatusChangedMessageRequest(obj) - case "response": - return BasicValidation.validateExperimentStatusChangedMessageResponse(obj) - default: - return BasicValidation.validateExperimentStatusChangedMessage(obj) - } -} - -export function isPeerconnection( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validateExperimentStatusChangedMessageRequest(obj); + case 'response': + return BasicValidation.validateExperimentStatusChangedMessageResponse(obj); + default: + return BasicValidation.validateExperimentStatusChangedMessage(obj); + } +} + +export function isPeerconnection( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is Peerconnection { - switch (type) { - case "request": - return BasicValidation.validatePeerconnectionRequest(obj) - case "response": - return BasicValidation.validatePeerconnectionResponse(obj) - default: - return BasicValidation.validatePeerconnection(obj) - } -} - -export function isPeerconnectionClosedEventCallback( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validatePeerconnectionRequest(obj); + case 'response': + return BasicValidation.validatePeerconnectionResponse(obj); + default: + return BasicValidation.validatePeerconnection(obj); + } +} + +export function isPeerconnectionClosedEventCallback< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is PeerconnectionClosedEventCallback { - switch (type) { - case "request": - return BasicValidation.validatePeerconnectionClosedEventCallbackRequest(obj) - case "response": - return BasicValidation.validatePeerconnectionClosedEventCallbackResponse(obj) - default: - return BasicValidation.validatePeerconnectionClosedEventCallback(obj) - } -} - -export function isPeerconnectionStatusChangedEventCallback( - obj: unknown, type: "request" | "response" | "all" | T = "all" + switch (type) { + case 'request': + return BasicValidation.validatePeerconnectionClosedEventCallbackRequest(obj); + case 'response': + return BasicValidation.validatePeerconnectionClosedEventCallbackResponse(obj); + default: + return BasicValidation.validatePeerconnectionClosedEventCallback(obj); + } +} + +export function isPeerconnectionStatusChangedEventCallback< + T extends 'request' | 'response' | 'all' = 'all', +>( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', ): obj is PeerconnectionStatusChangedEventCallback { - switch (type) { - case "request": - return BasicValidation.validatePeerconnectionStatusChangedEventCallbackRequest(obj) - case "response": - return BasicValidation.validatePeerconnectionStatusChangedEventCallbackResponse(obj) - default: - return BasicValidation.validatePeerconnectionStatusChangedEventCallback(obj) - } -} \ No newline at end of file + switch (type) { + case 'request': + return BasicValidation.validatePeerconnectionStatusChangedEventCallbackRequest(obj); + case 'response': + return BasicValidation.validatePeerconnectionStatusChangedEventCallbackResponse( + obj, + ); + default: + return BasicValidation.validatePeerconnectionStatusChangedEventCallback(obj); + } +} diff --git a/services/booking/src/common/src/clients/schedule-service/client.ts b/services/booking/src/common/src/clients/schedule-service/client.ts index 5241f64f..1fb66831 100644 --- a/services/booking/src/common/src/clients/schedule-service/client.ts +++ b/services/booking/src/common/src/clients/schedule-service/client.ts @@ -127,27 +127,10 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { +function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError( - `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, - ); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError( - `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, - ); - - return pathParameters; + throw new InvalidUrlError('Provided url is not a valid http url'); + return parsePathParameters(url, endpoint); } /** diff --git a/services/booking/src/device-reservation/package-lock.json b/services/booking/src/device-reservation/package-lock.json index 82460c77..21cbcb5d 100644 --- a/services/booking/src/device-reservation/package-lock.json +++ b/services/booking/src/device-reservation/package-lock.json @@ -35,10 +35,19 @@ "version": "0.0.1", "license": "Apache-2.0", "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0" + "@trivago/prettier-plugin-sort-imports": "^4.2.0", + "@types/express": "^4.17.13", + "ajv-formats": "^3.0.1", + "express": "^4.18.1", + "node-fetch": "^3.3.2" }, "devDependencies": { + "@cross-lab-project/codegen-typescript-addon": "file:../../../../helper/crosslab-typescript-addon", + "@cross-lab-project/openapi-codegen": "file:../../../../helper/openapi-codegeneration", + "@types/express": "^4.17.13", "@types/node": "^20.5.9", + "@types/node-fetch": "^2.6.4", + "npm-run-all": "^4.1.5", "prettier": "^3.0.3", "typescript": "^5.2.2" } diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index b07055a5..8a355367 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -114,13 +114,6 @@ export const postSchedule: postScheduleSignature = async (request, body) => { // Get timetable let d: URL = new URL(realDevices[device][i]); - console.log( - 'DEBUG:', - d.toString(), - body.Experiment.Devices[device].ID, - BelongsToUs(d), - JSON.stringify(config.InstitutePrefix), - ); let t: Timeslot[] = []; if (!BelongsToUs(d)) { // This is not our device @@ -293,12 +286,10 @@ export const postSchedule: postScheduleSignature = async (request, body) => { if (a.type == 'cloud instantiable' || a.type == 'edge instantiable') { available = [{ Start: body.Time.Start, End: body.Time.End }]; } else { - const announcedAvailability = await clients.device.getDeviceAvailability(a.url, { + const announcedAvailability = await clients.device.getDeviceAvailability(a.url, { // Currently broken in tests startTime: body.Time.Start, endTime: body.Time.End, }); - console.log('DEBUG:', JSON.stringify(a.announcedAvailability)); - console.log('DEBUG:', JSON.stringify(announcedAvailability)); available = timetableAnd( announcedAvailability!.map(e => { return { Start: e.start!, End: e.end! }; diff --git a/services/booking/src/schedule-service/src/operations/operations_test.ts b/services/booking/src/schedule-service/src/operations/operations_test.ts index 3190e256..5f7da6f2 100644 --- a/services/booking/src/schedule-service/src/operations/operations_test.ts +++ b/services/booking/src/schedule-service/src/operations/operations_test.ts @@ -98,6 +98,7 @@ mocha.describe('operations.ts', function () { if (r.body[i].Booked.length !== correctBooked.length) { console.log(r.body[i].Booked); + console.log(r.body[i].Free); throw Error('Device ' + i + ' Booked has length ' + r.body[i].Booked.length); } diff --git a/services/booking/src/test_common/src/fakeserver.ts b/services/booking/src/test_common/src/fakeserver.ts index c5705a77..86ee4401 100644 --- a/services/booking/src/test_common/src/fakeserver.ts +++ b/services/booking/src/test_common/src/fakeserver.ts @@ -59,12 +59,12 @@ export async function startFakeServer() { case 200: if (fakeServerConfig.device_wrong_device) { res.send( - '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-111111111110", "name": "Test Group", "description": "Test group for unit tests", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-111111111110", "name": "Test Group", "description": "Test group for unit tests", "isPublic": true, "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); return; } res.send( - '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000001", "name": "Test Group", "description": "Test group for unit tests", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000001", "name": "Test Group", "description": "Test group for unit tests", "isPublic": true, "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); return; case 404: @@ -84,11 +84,16 @@ export async function startFakeServer() { } }); + app.get('/devices/*/availability', (_req, res) => { + res.send('[{"start": "1990-01-01T01:00:00Z", "end": "2200-01-01T01:00:00Z"}]'); + return; + }); + app.get('/devices/00000000-0000-0000-0000-000000000002', (_req, res) => { switch (fakeServerConfig.device_service_status) { case 200: res.send( - '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000002", "name": "Test Group 2", "description": "Test group two for unit tests", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000002", "name": "Test Group 2", "description": "Test group two for unit tests", "isPublic": true, "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); return; case 404: @@ -112,7 +117,7 @@ export async function startFakeServer() { switch (fakeServerConfig.device_service_status) { case 200: res.send( - '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010", "name": "Test Group Booking", "description": "Test group containing two local devices. Used in booking-backend/bookng-frontend tests.", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/00000000-0000-0000-0000-000000000010", "name": "Test Group Booking", "description": "Test group containing two local devices. Used in booking-backend/bookng-frontend tests.", "isPublic": true, "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); return; case 404: @@ -137,18 +142,18 @@ export async function startFakeServer() { case 200: if (fakeServerConfig.device_single_is_group) { res.send( - '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Group 2", "description": "Test group two for unit tests", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Group 2", "description": "Test group two for unit tests", "isPublic": true, "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); return; } if (fakeServerConfig.device_not_available) { res.send( - '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Device", "description": "Test device for unit tests", "type": "device", "connected": true, "announcedAvailability": [], "isPublic": true}', + '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Device", "description": "Test device for unit tests", "isPublic": true, "type": "device", "connected": true, "announcedAvailability": [], "isPublic": true}', ); return; } res.send( - '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Device", "description": "Test device for unit tests", "type": "device", "connected": true, "announcedAvailability": [{"start":"1999-01-01T00:00:00Z", "end": "1999-12-31T23:59:59Z"},{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000", "name": "Test Device", "description": "Test device for unit tests", "isPublic": true, "type": "device", "connected": true, "announcedAvailability": [{"start":"1999-01-01T00:00:00Z", "end": "1999-12-31T23:59:59Z"},{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', ); return; case 404: @@ -173,18 +178,18 @@ export async function startFakeServer() { case 200: if (fakeServerConfig.device_single_is_group) { res.send( - '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Group 3", "description": "Test group two for unit tests", "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Group 3", "description": "Test group two for unit tests", "isPublic": true, "type": "group", "devices": [{"url": "http://localhost:10801/devices/10000000-0000-0000-0000-000000000000"}, {"url": "http://127.0.0.1:10802/devices/a0000000-0000-0000-0000-000000000000"}], "isPublic": true}', ); return; } if (fakeServerConfig.device_not_available) { res.send( - '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Device 2", "description": "Test device for unit tests", "type": "device", "connected": true, "announcedAvailability": [], "isPublic": true}', + '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Device 2", "description": "Test device for unit tests", "isPublic": true, "type": "device", "connected": true, "announcedAvailability": [], "isPublic": true}', ); return; } res.send( - '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Device 2", "description": "Test device for unit tests", "type": "device", "connected": true, "announcedAvailability": [{"start":"1999-01-01T00:00:00Z", "end": "1999-12-31T23:59:59Z"},{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/20000000-0000-0000-0000-000000000000", "name": "Test Device 2", "description": "Test device for unit tests", "isPublic": true, "type": "device", "connected": true, "announcedAvailability": [{"start":"1999-01-01T00:00:00Z", "end": "1999-12-31T23:59:59Z"},{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', ); return; case 404: @@ -392,7 +397,7 @@ export async function startFakeServer() { switch (fakeServerConfig.proxy_device_service_status) { case 200: res.send( - '{"url": "http://localhost:10801/devices/a0000000-0000-0000-0000-000000000000", "name": "Remote Fake", "description": "Remote Fake test device for unit tests", "type": "device", "connected": true, "announcedAvailability": [{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', + '{"url": "http://localhost:10801/devices/a0000000-0000-0000-0000-000000000000", "name": "Remote Fake", "description": "Remote Fake test device for unit tests", "isPublic": true, "type": "device", "connected": true, "announcedAvailability": [{"start": "2022-06-20T00:00:00Z", "end": "2022-06-27T06:00:00Z"}, {"start": "2022-06-27T07:00:00Z", "end": "2022-07-01T23:59:59Z"}], "isPublic": true}', ); return; case 404: diff --git a/services/device/src/clients/authentication/client.ts b/services/device/src/clients/authentication/client.ts index 7e1abffa..3d231616 100644 --- a/services/device/src/clients/authentication/client.ts +++ b/services/device/src/clients/authentication/client.ts @@ -127,27 +127,10 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { +function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError( - `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, - ); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError( - `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, - ); - - return pathParameters; + throw new InvalidUrlError('Provided url is not a valid http url'); + return parsePathParameters(url, endpoint); } /** diff --git a/services/device/src/clients/device/client.ts b/services/device/src/clients/device/client.ts index 19211284..77e98422 100644 --- a/services/device/src/clients/device/client.ts +++ b/services/device/src/clients/device/client.ts @@ -127,27 +127,10 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { +function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError( - `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, - ); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError( - `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, - ); - - return pathParameters; + throw new InvalidUrlError('Provided url is not a valid http url'); + return parsePathParameters(url, endpoint); } /** diff --git a/services/device/src/clients/federation/client.ts b/services/device/src/clients/federation/client.ts index 5eb22094..0ba9dd47 100644 --- a/services/device/src/clients/federation/client.ts +++ b/services/device/src/clients/federation/client.ts @@ -127,27 +127,10 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { +function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError( - `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, - ); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError( - `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, - ); - - return pathParameters; + throw new InvalidUrlError('Provided url is not a valid http url'); + return parsePathParameters(url, endpoint); } /** diff --git a/services/experiment/src/clients/booking-backend/client.ts b/services/experiment/src/clients/booking-backend/client.ts index f54a62e0..9e2759fb 100644 --- a/services/experiment/src/clients/booking-backend/client.ts +++ b/services/experiment/src/clients/booking-backend/client.ts @@ -127,27 +127,10 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { +function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError( - `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, - ); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError( - `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, - ); - - return pathParameters; + throw new InvalidUrlError('Provided url is not a valid http url'); + return parsePathParameters(url, endpoint); } /** diff --git a/services/experiment/src/clients/booking-frontend/client.ts b/services/experiment/src/clients/booking-frontend/client.ts index 65e60847..49dfb92d 100644 --- a/services/experiment/src/clients/booking-frontend/client.ts +++ b/services/experiment/src/clients/booking-frontend/client.ts @@ -127,27 +127,10 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { +function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError( - `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, - ); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError( - `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, - ); - - return pathParameters; + throw new InvalidUrlError('Provided url is not a valid http url'); + return parsePathParameters(url, endpoint); } /** diff --git a/services/experiment/src/clients/device/client.ts b/services/experiment/src/clients/device/client.ts index 19211284..77e98422 100644 --- a/services/experiment/src/clients/device/client.ts +++ b/services/experiment/src/clients/device/client.ts @@ -127,27 +127,10 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { +function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError( - `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, - ); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError( - `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, - ); - - return pathParameters; + throw new InvalidUrlError('Provided url is not a valid http url'); + return parsePathParameters(url, endpoint); } /** diff --git a/services/experiment/src/clients/schedule-service/client.ts b/services/experiment/src/clients/schedule-service/client.ts index 5241f64f..1fb66831 100644 --- a/services/experiment/src/clients/schedule-service/client.ts +++ b/services/experiment/src/clients/schedule-service/client.ts @@ -127,27 +127,10 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { +function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError( - `Provided url "${url}" does not start with the provided base url "${baseUrl}"`, - ); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError( - `Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`, - ); - - return pathParameters; + throw new InvalidUrlError('Provided url is not a valid http url'); + return parsePathParameters(url, endpoint); } /** diff --git a/services/lti/src/clients/authentication/client.ts b/services/lti/src/clients/authentication/client.ts index 48065dd4..040b32a2 100644 --- a/services/lti/src/clients/authentication/client.ts +++ b/services/lti/src/clients/authentication/client.ts @@ -129,23 +129,9 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { - if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!(url).startsWith(baseUrl)) - throw new InvalidUrlError(`Provided url "${url}" does not start with the provided base url "${baseUrl}"`); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError(`Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`); - - return pathParameters; +function validateUrl(url: string, endpoint: string): string[] { + if (!isValidHttpUrl(url)) throw new InvalidUrlError('Provided url is not a valid http url') + return parsePathParameters(url, endpoint) } /** diff --git a/services/lti/src/clients/experiment/client.ts b/services/lti/src/clients/experiment/client.ts index 6f9fc433..a964762a 100644 --- a/services/lti/src/clients/experiment/client.ts +++ b/services/lti/src/clients/experiment/client.ts @@ -129,23 +129,9 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { - if (!isValidHttpUrl(url)) - throw new InvalidUrlError(`Provided url "${url}" is not a valid http url`); - if (!(url).startsWith(baseUrl)) - throw new InvalidUrlError(`Provided url "${url}" does not start with the provided base url "${baseUrl}"`); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError(`Provided url "${url}" does not match extended base url "${extendedBaseUrl}"`); - - return pathParameters; +function validateUrl(url: string, endpoint: string): string[] { + if (!isValidHttpUrl(url)) throw new InvalidUrlError('Provided url is not a valid http url') + return parsePathParameters(url, endpoint) } /** From e100eb24e60b3d0be6f1f04bfe3d82c996ec5373 Mon Sep 17 00:00:00 2001 From: lassertos Date: Fri, 1 Nov 2024 16:17:50 +0000 Subject: [PATCH 78/79] finish merge main branch --- .jobs.yml | 12 +- .../python/src/crosslab/api_client/client.py | 561 +- .../python/src/crosslab/api_client/schemas.py | 531 +- clients/api/python/tests/test_openapi.py | 4853 ++-- .../templates/service-client/client.ts.njk | 11 + integration-test/docker-compose.yaml | 1 + services/booking/scripts/test.sh | 14 +- .../src/booking-backend/package-lock.json | 161 +- .../src/booking-backend/scripts/test.sh | 19 +- .../src/booking-frontend/package-lock.json | 106 +- .../src/booking-frontend/scripts/test.sh | 19 +- .../src/clients/booking-backend/client.ts | 2 +- .../src/clients/booking-frontend/client.ts | 2 +- .../src/clients/device/basicValidation.cjs | 23976 ++++++++-------- .../src/clients/device/basicValidation.d.cts | 12 + .../src/common/src/clients/device/client.ts | 5 +- .../common/src/clients/device/signatures.ts | 3 +- .../src/common/src/clients/device/types.ts | 50 + .../src/clients/schedule-service/client.ts | 53 - .../src/device-reservation/package-lock.json | 9 +- .../src/device-reservation/scripts/test.sh | 19 +- .../src/schedule-service/package-lock.json | 159 +- .../src/schedule-service/scripts/test.sh | 19 +- .../src/schedule-service/src/config.ts | 2 +- .../schedule-service/src/operations/index.ts | 2 +- .../booking/src/test_common/package-lock.json | 11 +- .../src/clients/authentication/client.ts | 8 +- .../authentication/requestValidation.ts | 55 +- .../src/clients/authentication/types.ts | 90 +- services/device/src/clients/device/client.ts | 43 +- .../src/clients/device/requestValidation.ts | 80 +- services/device/src/clients/device/types.ts | 4038 +-- .../device/src/clients/federation/client.ts | 20 +- .../clients/federation/requestValidation.ts | 65 +- .../device/src/clients/federation/types.ts | 36 +- services/device/src/database/model.ts | 1 - .../src/clients/booking-backend/client.ts | 12 +- .../booking-backend/requestValidation.ts | 15 +- .../src/clients/booking-backend/types.ts | 322 +- .../src/clients/booking-frontend/client.ts | 14 +- .../booking-frontend/requestValidation.ts | 25 +- .../src/clients/booking-frontend/types.ts | 322 +- .../experiment/src/clients/device/client.ts | 43 +- .../src/clients/schedule-service/client.ts | 53 - .../schedule-service/requestValidation.ts | 5 +- .../src/clients/schedule-service/types.ts | 322 +- .../src/methods/experimentStatus/book.ts | 17 +- .../lti/src/clients/authentication/client.ts | 21 +- services/lti/src/clients/device/client.ts | 155 +- services/lti/src/clients/experiment/client.ts | 30 +- 50 files changed, 19100 insertions(+), 17304 deletions(-) diff --git a/.jobs.yml b/.jobs.yml index 7ed61e6e..735e3fc1 100644 --- a/.jobs.yml +++ b/.jobs.yml @@ -138,6 +138,8 @@ services/booking/src/common: - helper/crosslab-typescript-addon:build - helper/openapi-codegeneration:build - services/booking:build-spec + - services/device:build-spec + - clients/api/js:build services/booking/src/device-reservation: - script: build @@ -195,11 +197,11 @@ services/booking/src/schedule-service: - services/booking/src/test_common:build - helper/crosslab-typescript-addon:build - helper/openapi-codegeneration:build - - script: test - dependencies: - - services/booking/src/schedule-service:build - tags: - - test + # - script: test + # dependencies: + # - services/booking/src/schedule-service:build + # tags: + # - test - script: build-docker dependencies: - services/booking/src/schedule-service:build diff --git a/clients/api/python/src/crosslab/api_client/client.py b/clients/api/python/src/crosslab/api_client/client.py index ec92365e..0eb0342e 100644 --- a/clients/api/python/src/crosslab/api_client/client.py +++ b/clients/api/python/src/crosslab/api_client/client.py @@ -63,6 +63,18 @@ UpdateInstitutionRequest, UpdateInstitutionResponse, DeleteInstitutionResponse, + ScheduleRequest, + ScheduleResponse, + NewBookingRequest, + NewBookingResponse, + UpdateBookingRequest, + UpdateBookingResponse, + DeleteBookingResponse, + GetBookingResponse, + DestroyBookingResponse, + LockBookingResponse, + UnlockBookingResponse, + BookingCallbackResponse, ListPlatformResponse, RegisterPlatformResponse, GetPlatformResponse, @@ -83,20 +95,9 @@ UpdateResourceStudentsResponse, GetResourceStudentResponse, UpdateResourceStudentRequest, - UpdateResourceStudentResponse - DeleteInstitutionResponse, - ScheduleRequest, - ScheduleResponse, - NewBookingRequest, - NewBookingResponse, - UpdateBookingRequest, - UpdateBookingResponse, - DeleteBookingResponse, - GetBookingResponse, - DestroyBookingResponse, - LockBookingResponse, - UnlockBookingResponse, - BookingCallbackResponse + UpdateResourceStudentResponse, + UpdateLtiExperimentRequest, + UpdateLtiExperimentResponse ) @@ -126,8 +127,7 @@ def set_auth_token(self, authToken: Optional[str]): async def __aenter__(self): self.http_session = aiohttp.ClientSession() if self.authToken is not None: - self.http_session.headers.update( - {"Authorization": f'Bearer {self.authToken}'}) + self.http_session.headers.update({"Authorization": f'Bearer {self.authToken}'}) return self async def __aexit__(self, *err): @@ -178,7 +178,7 @@ async def _fetch( async def login(self, body: LoginRequest, url: str = "/login") -> LoginResponse: # noqa: E501 """ Login user - + This endpoint will login a user and return an access token for the use of the microservice architecture.""" # noqa: E501 if not self.BASE_URL: raise Exception("No base url set") @@ -192,7 +192,7 @@ async def login(self, body: LoginRequest, url: str = "/login") -> LoginResponse: valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post", body=body) - + # transform response if status == 201: return resp @@ -201,7 +201,7 @@ async def login(self, body: LoginRequest, url: str = "/login") -> LoginResponse: async def logout(self, body: LogoutRequest, url: str = "/logout") -> LogoutResponse: # noqa: E501 """ Logout user - + This endpoint will logout a user and remove the corresponding access token for the use of the microservice architecture.""" # noqa: E501 if not self.BASE_URL: raise Exception("No base url set") @@ -215,7 +215,7 @@ async def logout(self, body: LogoutRequest, url: str = "/logout") -> LogoutRespo valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post", body=body) - + # transform response if status == 204: return resp @@ -243,10 +243,10 @@ async def list_users(self, url: str = "/users", username: Optional[str] = None) query_params['username'] = username else: query_params['username'] = str(username) - + # make http call status, resp = await self._fetch(valid_url, method="get", params=query_params) - + # transform response if status == 200: return resp @@ -268,7 +268,7 @@ async def create_user(self, body: CreateUserRequest, url: str = "/users") -> Cre valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post", body=body) - + # transform response if status == 201: return resp @@ -282,8 +282,7 @@ async def get_user(self, url: str) -> GetUserResponse: # noqa: E501 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(users\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(users\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -291,7 +290,7 @@ async def get_user(self, url: str) -> GetUserResponse: # noqa: E501 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -305,8 +304,7 @@ async def update_user(self, url: str, body: UpdateUserRequest) -> UpdateUserResp raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(users\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(users\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -314,7 +312,7 @@ async def update_user(self, url: str, body: UpdateUserRequest) -> UpdateUserResp valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="patch", body=body) - + # transform response if status == 200: return resp @@ -328,8 +326,7 @@ async def delete_user(self, url: str) -> DeleteUserResponse: # noqa: E501 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(users\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(users\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -337,7 +334,7 @@ async def delete_user(self, url: str) -> DeleteUserResponse: # noqa: E501 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="delete") - + # transform response if status == 204: return resp @@ -351,8 +348,7 @@ async def get_identity(self, url: str = "/identity") -> GetIdentityResponse: # raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(identity)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(identity)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/identity' @@ -360,7 +356,7 @@ async def get_identity(self, url: str = "/identity") -> GetIdentityResponse: # valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -374,8 +370,7 @@ async def update_identity(self, url: str = "/identity", body: Optional[UpdateIde raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(identity)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(identity)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/identity' @@ -383,7 +378,7 @@ async def update_identity(self, url: str = "/identity", body: Optional[UpdateIde valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="patch", body=body) - + # transform response if status == 200: return resp @@ -392,7 +387,7 @@ async def update_identity(self, url: str = "/identity", body: Optional[UpdateIde async def createToken(self, body: CreateTokenRequest, url: str = "/token") -> CreateTokenResponse: # noqa: E501 """ Create a new token - + This endpoint will create a new token for the use of the microservice architecture.""" # noqa: E501 if not self.BASE_URL: raise Exception("No base url set") @@ -406,7 +401,7 @@ async def createToken(self, body: CreateTokenRequest, url: str = "/token") -> Cr valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post", body=body) - + # transform response if status == 201: return resp @@ -420,8 +415,7 @@ async def list_devices(self, url: str = "/devices") -> ListDevicesResponse: # n raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(devices)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(devices)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/devices' @@ -429,7 +423,7 @@ async def list_devices(self, url: str = "/devices") -> ListDevicesResponse: # n valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -443,8 +437,7 @@ async def create_device(self, body: CreateDeviceRequest, url: str = "/devices", raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(devices)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(devices)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/devices' @@ -458,10 +451,10 @@ async def create_device(self, body: CreateDeviceRequest, url: str = "/devices", query_params['changedUrl'] = changedUrl else: query_params['changedUrl'] = str(changedUrl) - + # make http call status, resp = await self._fetch(valid_url, method="post", body=body, params=query_params) - + # transform response if status == 201: return resp @@ -475,8 +468,7 @@ async def get_device(self, url: str, flat_group: Optional[bool] = None) -> GetDe raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(devices\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(devices\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -490,10 +482,10 @@ async def get_device(self, url: str, flat_group: Optional[bool] = None) -> GetDe query_params['flat_group'] = flat_group else: query_params['flat_group'] = str(flat_group) - + # make http call status, resp = await self._fetch(valid_url, method="get", params=query_params) - + # transform response if status == 200: return resp @@ -507,8 +499,7 @@ async def update_device(self, url: str, body: Optional[UpdateDeviceRequest] = No raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(devices\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(devices\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -522,10 +513,10 @@ async def update_device(self, url: str, body: Optional[UpdateDeviceRequest] = No query_params['changedUrl'] = changedUrl else: query_params['changedUrl'] = str(changedUrl) - + # make http call status, resp = await self._fetch(valid_url, method="patch", body=body, params=query_params) - + # transform response if status == 200: return resp @@ -539,8 +530,7 @@ async def delete_device(self, url: str) -> DeleteDeviceResponse: # noqa: E501 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(devices\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(devices\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -548,7 +538,7 @@ async def delete_device(self, url: str) -> DeleteDeviceResponse: # noqa: E501 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="delete") - + # transform response if status == 204: return resp @@ -562,8 +552,7 @@ async def instantiate_device(self, url: str, changedUrl: Optional[str] = None) - raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(devices\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(devices\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -577,10 +566,10 @@ async def instantiate_device(self, url: str, changedUrl: Optional[str] = None) - query_params['changedUrl'] = changedUrl else: query_params['changedUrl'] = str(changedUrl) - + # make http call status, resp = await self._fetch(valid_url, method="post", params=query_params) - + # transform response if status == 201: return resp @@ -594,8 +583,7 @@ async def get_device_availability(self, url: str, startTime: Optional[str] = Non raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(devices\/[^?]*?)(\/availability)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(devices\/[^?]*?)(\/availability)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/availability' @@ -614,10 +602,10 @@ async def get_device_availability(self, url: str, startTime: Optional[str] = Non query_params['endTime'] = endTime else: query_params['endTime'] = str(endTime) - + # make http call status, resp = await self._fetch(valid_url, method="get", params=query_params) - + # transform response if status == 200: return resp @@ -631,8 +619,7 @@ async def delete_device_availability_rules(self, url: str) -> DeleteDeviceAvaila raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(devices\/[^?]*?)(\/availability)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(devices\/[^?]*?)(\/availability)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/availability' @@ -640,7 +627,7 @@ async def delete_device_availability_rules(self, url: str) -> DeleteDeviceAvaila valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="delete") - + # transform response if status == 204: return resp @@ -654,8 +641,7 @@ async def add_device_availability_rules(self, url: str, body: Optional[AddDevice raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(devices\/[^?]*?)(\/availability)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(devices\/[^?]*?)(\/availability)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/availability' @@ -663,7 +649,7 @@ async def add_device_availability_rules(self, url: str, body: Optional[AddDevice valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post", body=body) - + # transform response if status == 200: return resp @@ -677,8 +663,7 @@ async def create_websocket_token(self, url: str) -> CreateWebsocketTokenResponse raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(devices\/[^?]*?)(\/websocket)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(devices\/[^?]*?)(\/websocket)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/websocket' @@ -686,7 +671,7 @@ async def create_websocket_token(self, url: str) -> CreateWebsocketTokenResponse valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post") - + # transform response if status == 200: return resp @@ -700,8 +685,7 @@ async def send_signaling_message(self, url: str, body: SendSignalingMessageReque raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(devices\/[^?]*?)(\/signaling)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(devices\/[^?]*?)(\/signaling)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/signaling' @@ -709,7 +693,7 @@ async def send_signaling_message(self, url: str, body: SendSignalingMessageReque valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post", body=body) - + # transform response if status == 200: return resp @@ -723,8 +707,7 @@ async def list_peerconnections(self, url: str = "/peerconnections") -> ListPeerc raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(peerconnections)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(peerconnections)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/peerconnections' @@ -732,7 +715,7 @@ async def list_peerconnections(self, url: str = "/peerconnections") -> ListPeerc valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -746,8 +729,7 @@ async def create_peerconnection(self, body: CreatePeerconnectionRequest, url: st raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(peerconnections)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(peerconnections)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/peerconnections' @@ -766,10 +748,10 @@ async def create_peerconnection(self, body: CreatePeerconnectionRequest, url: st query_params['statusChangedUrl'] = statusChangedUrl else: query_params['statusChangedUrl'] = str(statusChangedUrl) - + # make http call status, resp = await self._fetch(valid_url, method="post", body=body, params=query_params) - + # transform response if status == 201: return resp @@ -785,8 +767,7 @@ async def get_peerconnection(self, url: str) -> GetPeerconnectionResponse: # no raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(peerconnections\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(peerconnections\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -794,7 +775,7 @@ async def get_peerconnection(self, url: str) -> GetPeerconnectionResponse: # no valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -808,8 +789,7 @@ async def delete_peerconnection(self, url: str) -> DeletePeerconnectionResponse: raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(peerconnections\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(peerconnections\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -817,7 +797,7 @@ async def delete_peerconnection(self, url: str) -> DeletePeerconnectionResponse: valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="delete") - + # transform response if status == 202: return resp @@ -833,8 +813,7 @@ async def patch_peerconnection_device_status(self, url: str, body: PatchPeerconn raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(peerconnections\/[^?]*?)(\/device_status)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(peerconnections\/[^?]*?)(\/device_status)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/device_status' @@ -848,10 +827,10 @@ async def patch_peerconnection_device_status(self, url: str, body: PatchPeerconn query_params['device_url'] = device_url else: query_params['device_url'] = str(device_url) - + # make http call status, resp = await self._fetch(valid_url, method="patch", body=body, params=query_params) - + # transform response if status == 204: return resp @@ -865,8 +844,7 @@ async def list_experiments(self, url: str = "/experiments", experimentStatus: Op raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(experiments)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(experiments)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/experiments' @@ -880,10 +858,10 @@ async def list_experiments(self, url: str = "/experiments", experimentStatus: Op query_params['experimentStatus'] = experimentStatus else: query_params['experimentStatus'] = str(experimentStatus) - + # make http call status, resp = await self._fetch(valid_url, method="get", params=query_params) - + # transform response if status == 200: return resp @@ -897,8 +875,7 @@ async def create_experiment(self, body: CreateExperimentRequest, url: str = "/ex raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(experiments)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(experiments)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/experiments' @@ -912,10 +889,10 @@ async def create_experiment(self, body: CreateExperimentRequest, url: str = "/ex query_params['changedURL'] = changedURL else: query_params['changedURL'] = str(changedURL) - + # make http call status, resp = await self._fetch(valid_url, method="post", body=body, params=query_params) - + # transform response if status == 201: return resp @@ -931,8 +908,7 @@ async def get_experiment(self, url: str) -> GetExperimentResponse: # noqa: E501 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(experiments\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(experiments\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -940,7 +916,7 @@ async def get_experiment(self, url: str) -> GetExperimentResponse: # noqa: E501 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -949,17 +925,16 @@ async def get_experiment(self, url: str) -> GetExperimentResponse: # noqa: E501 async def update_experiment(self, url: str, body: Optional[UpdateExperimentRequest] = None, changedURL: Optional[str] = None) -> UpdateExperimentResponse: # noqa: E501 """ Update an existing experiment. - + With this endpoint an experiment can be changed. The request body may be skipped if you just want to set a hook via the query string parameters. - + If a body is supplied you can choose to include any first level fields which will fully replace the field in the existing experiment. """ # noqa: E501 if not self.BASE_URL: raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(experiments\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(experiments\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -973,10 +948,10 @@ async def update_experiment(self, url: str, body: Optional[UpdateExperimentReque query_params['changedURL'] = changedURL else: query_params['changedURL'] = str(changedURL) - + # make http call status, resp = await self._fetch(valid_url, method="patch", body=body, params=query_params) - + # transform response if status == 200: return resp @@ -992,8 +967,7 @@ async def delete_experiment(self, url: str) -> DeleteExperimentResponse: # noqa raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(experiments\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(experiments\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1001,7 +975,7 @@ async def delete_experiment(self, url: str) -> DeleteExperimentResponse: # noqa valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="delete") - + # transform response if status == 204: return resp @@ -1015,8 +989,7 @@ async def list_template(self, url: str = "/templates") -> ListTemplateResponse: raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(templates)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(templates)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/templates' @@ -1024,7 +997,7 @@ async def list_template(self, url: str = "/templates") -> ListTemplateResponse: valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -1038,8 +1011,7 @@ async def create_template(self, body: CreateTemplateRequest, url: str = "/templa raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(templates)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(templates)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/templates' @@ -1047,7 +1019,7 @@ async def create_template(self, body: CreateTemplateRequest, url: str = "/templa valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post", body=body) - + # transform response if status == 201: return resp @@ -1063,8 +1035,7 @@ async def get_template(self, url: str) -> GetTemplateResponse: # noqa: E501 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(templates\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(templates\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1072,7 +1043,7 @@ async def get_template(self, url: str) -> GetTemplateResponse: # noqa: E501 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -1081,17 +1052,16 @@ async def get_template(self, url: str) -> GetTemplateResponse: # noqa: E501 async def update_template(self, url: str, body: UpdateTemplateRequest) -> UpdateTemplateResponse: # noqa: E501 """ Update an existing template. - + With this endpoint an template can be changed. The request body may be skipped if you just want to set a hook via the query string parameters. - + If a body is supplied you can choose to include any first level fields which will fully replace the field in the existing template. """ # noqa: E501 if not self.BASE_URL: raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(templates\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(templates\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1099,7 +1069,7 @@ async def update_template(self, url: str, body: UpdateTemplateRequest) -> Update valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="patch", body=body) - + # transform response if status == 200: return resp @@ -1115,8 +1085,7 @@ async def delete_template(self, url: str) -> DeleteTemplateResponse: # noqa: E5 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(templates\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(templates\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1124,7 +1093,7 @@ async def delete_template(self, url: str) -> DeleteTemplateResponse: # noqa: E5 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="delete") - + # transform response if status == 204: return resp @@ -1138,8 +1107,7 @@ async def list_institutions(self, url: str = "/institutions") -> ListInstitution raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(institutions)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(institutions)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/institutions' @@ -1147,7 +1115,7 @@ async def list_institutions(self, url: str = "/institutions") -> ListInstitution valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -1161,8 +1129,7 @@ async def create_institution(self, body: CreateInstitutionRequest, url: str = "/ raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(institutions)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(institutions)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/institutions' @@ -1170,7 +1137,7 @@ async def create_institution(self, body: CreateInstitutionRequest, url: str = "/ valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post", body=body) - + # transform response if status == 201: return resp @@ -1184,8 +1151,7 @@ async def get_institution(self, url: str) -> GetInstitutionResponse: # noqa: E5 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(institutions\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(institutions\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1193,7 +1159,7 @@ async def get_institution(self, url: str) -> GetInstitutionResponse: # noqa: E5 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -1207,8 +1173,7 @@ async def update_institution(self, url: str, body: Optional[UpdateInstitutionReq raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(institutions\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(institutions\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1216,7 +1181,7 @@ async def update_institution(self, url: str, body: Optional[UpdateInstitutionReq valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="patch", body=body) - + # transform response if status == 200: return resp @@ -1230,8 +1195,7 @@ async def delete_institution(self, url: str) -> DeleteInstitutionResponse: # no raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(institutions\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(institutions\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1239,12 +1203,211 @@ async def delete_institution(self, url: str) -> DeleteInstitutionResponse: # no valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="delete") - + # transform response if status == 204: return resp raise Exception(f"Unexpected status code: {status}") + async def schedule(self, url: str = "/schedule", body: Optional[ScheduleRequest] = None) -> ScheduleResponse: # noqa: E501 + """ + Returns the free / booked times for given experiment. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(schedule)?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'/schedule' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="post", body=body) + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def newBooking(self, body: NewBookingRequest, url: str = "/booking") -> NewBookingResponse: # noqa: E501 + """ + Books an experiment. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(booking)?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'/booking' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="post", body=body) + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def updateBooking(self, url: str, body: UpdateBookingRequest) -> UpdateBookingResponse: # noqa: E501 + """ + Allows the addition of devices to a booking (removing of devices is not supportet) or the registration of callbacks. For adding devices, the scope 'booking:use' is required. + + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)()?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="patch", body=body) + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def deleteBooking(self, url: str) -> DeleteBookingResponse: # noqa: E501 + """ + Cancels a booking, as long as the booking was originally done by you. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)()?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="delete") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def getBooking(self, url: str) -> GetBookingResponse: # noqa: E501 + """ + Returns whether a list of devices is currently booked for a user. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)()?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="get") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def destroyBooking(self, url: str) -> DestroyBookingResponse: # noqa: E501 + """ + Allows selected persons (like lab manager) to remove a user booking. To avoid mistakes, this is a different path than normal delete. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)(\/destroy)?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'/destroy' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="delete") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def lockBooking(self, url: str) -> LockBookingResponse: # noqa: E501 + """ + Locks the current booking so the devices can be used. This sets the status to "active" This means that the booking can not be cancelled or (currently not implemented) the end time can not be set to a prior time. If called multiple times, the booking will be locked only once. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)(\/lock)?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'/lock' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="put") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def unlockBooking(self, url: str) -> UnlockBookingResponse: # noqa: E501 + """ + Unlocks all devices belonging to a booking, status will be set to 'booked'. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking\/[^?]*?)(\/lock)?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'/lock' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="delete") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + + async def bookingCallback(self, url: str) -> BookingCallbackResponse: # noqa: E501 + """ + Callback used for updating device info / booking info. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(booking_callback\/[^?]*?)()?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="post") + + # transform response + if status == 200: + return resp + raise Exception(f"Unexpected status code: {status}") + async def list_platform(self, url: str = "/lti/platform") -> ListPlatformResponse: # noqa: E501 """ List all platforms. @@ -1253,8 +1416,7 @@ async def list_platform(self, url: str = "/lti/platform") -> ListPlatformRespons raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(lti\/platform)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(lti\/platform)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/lti/platform' @@ -1262,7 +1424,7 @@ async def list_platform(self, url: str = "/lti/platform") -> ListPlatformRespons valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -1276,8 +1438,7 @@ async def register_platform(self, url: str = "/lti/platform") -> RegisterPlatfor raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(lti\/platform)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(lti\/platform)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/lti/platform' @@ -1285,7 +1446,7 @@ async def register_platform(self, url: str = "/lti/platform") -> RegisterPlatfor valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post") - + # transform response if status == 201: return resp @@ -1299,8 +1460,7 @@ async def get_platform(self, url: str) -> GetPlatformResponse: # noqa: E501 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/platform\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/platform\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1308,7 +1468,7 @@ async def get_platform(self, url: str) -> GetPlatformResponse: # noqa: E501 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -1322,8 +1482,7 @@ async def update_platform(self, url: str) -> UpdatePlatformResponse: # noqa: E5 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/platform\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/platform\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1331,7 +1490,7 @@ async def update_platform(self, url: str) -> UpdatePlatformResponse: # noqa: E5 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="patch") - + # transform response if status == 200: return resp @@ -1345,8 +1504,7 @@ async def delete_platform(self, url: str) -> DeletePlatformResponse: # noqa: E5 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/platform\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/platform\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1354,7 +1512,7 @@ async def delete_platform(self, url: str) -> DeletePlatformResponse: # noqa: E5 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="delete") - + # transform response if status == 204: return resp @@ -1368,8 +1526,7 @@ async def lti_login(self, url: str, body: LtiLoginRequest) -> LtiLoginResponse: raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/platform\/[^?]*?)(\/login)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/platform\/[^?]*?)(\/login)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/login' @@ -1377,7 +1534,7 @@ async def lti_login(self, url: str, body: LtiLoginRequest) -> LtiLoginResponse: valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post", body=body) - + # transform response if status == 200: return resp @@ -1391,8 +1548,7 @@ async def lti_launch(self, url: str, body: LtiLaunchRequest) -> LtiLaunchRespons raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/platform\/[^?]*?)(\/launch)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/platform\/[^?]*?)(\/launch)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/launch' @@ -1400,7 +1556,7 @@ async def lti_launch(self, url: str, body: LtiLaunchRequest) -> LtiLaunchRespons valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="post", body=body) - + # transform response if status == 200: return resp @@ -1414,8 +1570,7 @@ async def lti_jwks(self, url: str) -> LtiJwksResponse: # noqa: E501 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/platform\/[^?]*?)(\/jwks)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/platform\/[^?]*?)(\/jwks)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/jwks' @@ -1423,7 +1578,7 @@ async def lti_jwks(self, url: str) -> LtiJwksResponse: # noqa: E501 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -1437,8 +1592,7 @@ async def list_resource(self, url: str = "/lti/resource") -> ListResourceRespons raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?()(lti\/resource)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?()(lti\/resource)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/lti/resource' @@ -1446,7 +1600,7 @@ async def list_resource(self, url: str = "/lti/resource") -> ListResourceRespons valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -1460,8 +1614,7 @@ async def get_resource(self, url: str) -> GetResourceResponse: # noqa: E501 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/resource\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/resource\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1469,7 +1622,7 @@ async def get_resource(self, url: str) -> GetResourceResponse: # noqa: E501 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -1483,8 +1636,7 @@ async def update_resource(self, url: str, body: UpdateResourceRequest) -> Update raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/resource\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/resource\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1492,7 +1644,7 @@ async def update_resource(self, url: str, body: UpdateResourceRequest) -> Update valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="patch", body=body) - + # transform response if status == 200: return resp @@ -1506,8 +1658,7 @@ async def delete_resource(self, url: str) -> DeleteResourceResponse: # noqa: E5 raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/resource\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/resource\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1515,7 +1666,7 @@ async def delete_resource(self, url: str) -> DeleteResourceResponse: # noqa: E5 valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="delete") - + # transform response if status == 204: return resp @@ -1529,8 +1680,7 @@ async def list_resource_students(self, url: str) -> ListResourceStudentsResponse raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/resource\/[^?]*?)(\/students)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/resource\/[^?]*?)(\/students)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/students' @@ -1538,7 +1688,7 @@ async def list_resource_students(self, url: str) -> ListResourceStudentsResponse valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -1547,14 +1697,13 @@ async def list_resource_students(self, url: str) -> ListResourceStudentsResponse async def update_resource_students(self, url: str, body: UpdateResourceStudentsRequest) -> UpdateResourceStudentsResponse: # noqa: E501 """ Update the students of the resource. - + Update the students of the resource. Acts as you would call a PATCH on each student.""" # noqa: E501 if not self.BASE_URL: raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/resource\/[^?]*?)(\/students)?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/resource\/[^?]*?)(\/students)?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'/students' @@ -1562,7 +1711,7 @@ async def update_resource_students(self, url: str, body: UpdateResourceStudentsR valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="patch", body=body) - + # transform response if status == 200: return resp @@ -1576,8 +1725,7 @@ async def get_resource_student(self, url: str) -> GetResourceStudentResponse: # raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/resource\/[^?]*?\/students\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/resource\/[^?]*?\/students\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1585,7 +1733,7 @@ async def get_resource_student(self, url: str) -> GetResourceStudentResponse: # valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="get") - + # transform response if status == 200: return resp @@ -1599,8 +1747,7 @@ async def update_resource_student(self, url: str, body: UpdateResourceStudentReq raise Exception("No base url set") # match path to url schema - m = re.search(r'^('+re.escape(self.BASE_URL) + - r')?\/?(lti\/resource\/[^?]*?\/students\/[^?]*?)()?$', url) + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/resource\/[^?]*?\/students\/[^?]*?)()?$', url) if m is None: raise Exception("Invalid url") valid_url = '/'+m.group(2)+'' @@ -1608,8 +1755,30 @@ async def update_resource_student(self, url: str, body: UpdateResourceStudentReq valid_url = valid_url[1:] # make http call status, resp = await self._fetch(valid_url, method="patch", body=body) - + # transform response if status == 200: return resp raise Exception(f"Unexpected status code: {status}") + + async def update_lti_experiment(self, url: str, body: UpdateLtiExperimentRequest) -> UpdateLtiExperimentResponse: # noqa: E501 + """ + Update the LTI experiment settings. + """ # noqa: E501 + if not self.BASE_URL: + raise Exception("No base url set") + + # match path to url schema + m = re.search(r'^('+re.escape(self.BASE_URL)+r')?\/?(lti\/session\/[^?]*?)(\/experiment)?$', url) + if m is None: + raise Exception("Invalid url") + valid_url = '/'+m.group(2)+'/experiment' + if valid_url.startswith('//'): + valid_url = valid_url[1:] + # make http call + status, resp = await self._fetch(valid_url, method="patch", body=body) + + # transform response + if status == 201: + return resp + raise Exception(f"Unexpected status code: {status}") diff --git a/clients/api/python/src/crosslab/api_client/schemas.py b/clients/api/python/src/crosslab/api_client/schemas.py index e04aef53..ce8c9063 100644 --- a/clients/api/python/src/crosslab/api_client/schemas.py +++ b/clients/api/python/src/crosslab/api_client/schemas.py @@ -505,8 +505,7 @@ class CreateDeviceRequestAlt4(TypedDict): devices: List[CreateDeviceRequestAlt4DevicesItems] -CreateDeviceRequest = Union[CreateDeviceRequestAlt1, - CreateDeviceRequestAlt2, CreateDeviceRequestAlt3, CreateDeviceRequestAlt4] +CreateDeviceRequest = Union[CreateDeviceRequestAlt1, CreateDeviceRequestAlt2, CreateDeviceRequestAlt3, CreateDeviceRequestAlt4] class CreateDeviceResponse201Alt1ViewerItems(TypedDict): @@ -727,8 +726,7 @@ class CreateDeviceResponse201Alt4(TypedDict): devices: List[CreateDeviceResponse201Alt4DevicesItems] -CreateDeviceResponse201 = Union[CreateDeviceResponse201Alt1, - CreateDeviceResponse201Alt2, CreateDeviceResponse201Alt3, CreateDeviceResponse201Alt4] +CreateDeviceResponse201 = Union[CreateDeviceResponse201Alt1, CreateDeviceResponse201Alt2, CreateDeviceResponse201Alt3, CreateDeviceResponse201Alt4] CreateDeviceResponse: TypeAlias = CreateDeviceResponse201 @@ -952,8 +950,7 @@ class GetDeviceResponse200Alt4(TypedDict): devices: List[GetDeviceResponse200Alt4DevicesItems] -GetDeviceResponse200 = Union[GetDeviceResponse200Alt1, - GetDeviceResponse200Alt2, GetDeviceResponse200Alt3, GetDeviceResponse200Alt4] +GetDeviceResponse200 = Union[GetDeviceResponse200Alt1, GetDeviceResponse200Alt2, GetDeviceResponse200Alt3, GetDeviceResponse200Alt4] GetDeviceResponse: TypeAlias = GetDeviceResponse200 @@ -1153,8 +1150,7 @@ class UpdateDeviceRequestAlt4(TypedDict): devices: NotRequired[List[UpdateDeviceRequestAlt4DevicesItems]] -UpdateDeviceRequest = Union[UpdateDeviceRequestAlt1, - UpdateDeviceRequestAlt2, UpdateDeviceRequestAlt3, UpdateDeviceRequestAlt4] +UpdateDeviceRequest = Union[UpdateDeviceRequestAlt1, UpdateDeviceRequestAlt2, UpdateDeviceRequestAlt3, UpdateDeviceRequestAlt4] class UpdateDeviceResponse200Alt1ViewerItems(TypedDict): @@ -1375,8 +1371,7 @@ class UpdateDeviceResponse200Alt4(TypedDict): devices: List[UpdateDeviceResponse200Alt4DevicesItems] -UpdateDeviceResponse200 = Union[UpdateDeviceResponse200Alt1, - UpdateDeviceResponse200Alt2, UpdateDeviceResponse200Alt3, UpdateDeviceResponse200Alt4] +UpdateDeviceResponse200 = Union[UpdateDeviceResponse200Alt1, UpdateDeviceResponse200Alt2, UpdateDeviceResponse200Alt3, UpdateDeviceResponse200Alt4] UpdateDeviceResponse: TypeAlias = UpdateDeviceResponse200 @@ -1630,8 +1625,7 @@ class SendSignalingMessageRequestAlt6(TypedDict): content: SendSignalingMessageRequestAlt6Content -SendSignalingMessageRequest = Union[SendSignalingMessageRequestAlt1, SendSignalingMessageRequestAlt2, - SendSignalingMessageRequestAlt3, SendSignalingMessageRequestAlt4, SendSignalingMessageRequestAlt5, SendSignalingMessageRequestAlt6] +SendSignalingMessageRequest = Union[SendSignalingMessageRequestAlt1, SendSignalingMessageRequestAlt2, SendSignalingMessageRequestAlt3, SendSignalingMessageRequestAlt4, SendSignalingMessageRequestAlt5, SendSignalingMessageRequestAlt6] SendSignalingMessageResponse: TypeAlias = None @@ -1655,8 +1649,7 @@ class ListPeerconnectionsResponse200Items(TypedDict): """ url: str type: Literal["local", "webrtc"] - status: Literal["new", "connecting", "connected", - "disconnected", "failed", "closed"] + status: Literal["new", "connecting", "connected", "disconnected", "failed", "closed"] devices: List[ListPeerconnectionsResponse200ItemsDevicesItems] @@ -1706,8 +1699,7 @@ class CreatePeerconnectionRequest(TypedDict): """ url: str type: Literal["local", "webrtc"] - status: Literal["new", "connecting", "connected", - "disconnected", "failed", "closed"] + status: Literal["new", "connecting", "connected", "disconnected", "failed", "closed"] devices: List[CreatePeerconnectionRequestDevicesItems] @@ -1751,8 +1743,7 @@ class CreatePeerconnectionResponse201(TypedDict): """ url: str type: Literal["local", "webrtc"] - status: Literal["new", "connecting", "connected", - "disconnected", "failed", "closed"] + status: Literal["new", "connecting", "connected", "disconnected", "failed", "closed"] devices: List[CreatePeerconnectionResponse201DevicesItems] @@ -1796,13 +1787,11 @@ class CreatePeerconnectionResponse202(TypedDict): """ url: str type: Literal["local", "webrtc"] - status: Literal["new", "connecting", "connected", - "disconnected", "failed", "closed"] + status: Literal["new", "connecting", "connected", "disconnected", "failed", "closed"] devices: List[CreatePeerconnectionResponse202DevicesItems] -CreatePeerconnectionResponse: TypeAlias = Union[CreatePeerconnectionResponse201, - CreatePeerconnectionResponse202] +CreatePeerconnectionResponse: TypeAlias = Union[CreatePeerconnectionResponse201, CreatePeerconnectionResponse202] class GetPeerconnectionResponse200DevicesItemsConfigServicesItems(TypedDict): @@ -1845,8 +1834,7 @@ class GetPeerconnectionResponse200(TypedDict): """ url: str type: Literal["local", "webrtc"] - status: Literal["new", "connecting", "connected", - "disconnected", "failed", "closed"] + status: Literal["new", "connecting", "connected", "disconnected", "failed", "closed"] devices: List[GetPeerconnectionResponse200DevicesItems] @@ -1861,23 +1849,19 @@ class PatchPeerconnectionDeviceStatusRequest(TypedDict): Properties: - status: The status of the peerconnection. """ - status: Literal["new", "connecting", "connected", - "disconnected", "failed", "closed"] + status: Literal["new", "connecting", "connected", "disconnected", "failed", "closed"] PatchPeerconnectionDeviceStatusResponse: TypeAlias = None -ListExperimentsResponse200ItemsStatusAlt1: TypeAlias = Literal["created", - "booked", "setup", "running", "finished"] +ListExperimentsResponse200ItemsStatusAlt1: TypeAlias = Literal["created", "booked", "setup", "running", "finished"] -ListExperimentsResponse200ItemsStatusAlt2: TypeAlias = Literal["created", - "booked", "running", "finished"] +ListExperimentsResponse200ItemsStatusAlt2: TypeAlias = Literal["created", "booked", "running", "finished"] -ListExperimentsResponse200ItemsStatus = Union[ListExperimentsResponse200ItemsStatusAlt1, - ListExperimentsResponse200ItemsStatusAlt2] +ListExperimentsResponse200ItemsStatus = Union[ListExperimentsResponse200ItemsStatusAlt1, ListExperimentsResponse200ItemsStatusAlt2] class ListExperimentsResponse200Items(TypedDict): @@ -1896,16 +1880,13 @@ class ListExperimentsResponse200Items(TypedDict): ListExperimentsResponse: TypeAlias = ListExperimentsResponse200 -CreateExperimentRequestStatusAlt1: TypeAlias = Literal["created", - "booked", "setup", "running", "finished"] +CreateExperimentRequestStatusAlt1: TypeAlias = Literal["created", "booked", "setup", "running", "finished"] -CreateExperimentRequestStatusAlt2: TypeAlias = Literal["created", - "booked", "running", "finished"] +CreateExperimentRequestStatusAlt2: TypeAlias = Literal["created", "booked", "running", "finished"] -CreateExperimentRequestStatus = Union[CreateExperimentRequestStatusAlt1, - CreateExperimentRequestStatusAlt2] +CreateExperimentRequestStatus = Union[CreateExperimentRequestStatusAlt1, CreateExperimentRequestStatusAlt2] class CreateExperimentRequestBookingtime(TypedDict): @@ -1949,7 +1930,7 @@ class CreateExperimentRequestRolesItems(TypedDict): class CreateExperimentRequestServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -1958,7 +1939,7 @@ class CreateExperimentRequestServiceconfigurationsItemsConfiguration(TypedDict): class CreateExperimentRequestServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2030,16 +2011,13 @@ class CreateExperimentRequest(TypedDict): instantiatedDevices: List[CreateExperimentRequestInstantiateddevicesItems] -CreateExperimentResponse201StatusAlt1: TypeAlias = Literal["created", - "booked", "setup", "running", "finished"] +CreateExperimentResponse201StatusAlt1: TypeAlias = Literal["created", "booked", "setup", "running", "finished"] -CreateExperimentResponse201StatusAlt2: TypeAlias = Literal["created", - "booked", "running", "finished"] +CreateExperimentResponse201StatusAlt2: TypeAlias = Literal["created", "booked", "running", "finished"] -CreateExperimentResponse201Status = Union[CreateExperimentResponse201StatusAlt1, - CreateExperimentResponse201StatusAlt2] +CreateExperimentResponse201Status = Union[CreateExperimentResponse201StatusAlt1, CreateExperimentResponse201StatusAlt2] class CreateExperimentResponse201Bookingtime(TypedDict): @@ -2083,7 +2061,7 @@ class CreateExperimentResponse201RolesItems(TypedDict): class CreateExperimentResponse201ServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2092,7 +2070,7 @@ class CreateExperimentResponse201ServiceconfigurationsItemsConfiguration(TypedDi class CreateExperimentResponse201ServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2164,16 +2142,13 @@ class CreateExperimentResponse201(TypedDict): instantiatedDevices: List[CreateExperimentResponse201InstantiateddevicesItems] -CreateExperimentResponse202StatusAlt1: TypeAlias = Literal["created", - "booked", "setup", "running", "finished"] +CreateExperimentResponse202StatusAlt1: TypeAlias = Literal["created", "booked", "setup", "running", "finished"] -CreateExperimentResponse202StatusAlt2: TypeAlias = Literal["created", - "booked", "running", "finished"] +CreateExperimentResponse202StatusAlt2: TypeAlias = Literal["created", "booked", "running", "finished"] -CreateExperimentResponse202Status = Union[CreateExperimentResponse202StatusAlt1, - CreateExperimentResponse202StatusAlt2] +CreateExperimentResponse202Status = Union[CreateExperimentResponse202StatusAlt1, CreateExperimentResponse202StatusAlt2] class CreateExperimentResponse202Bookingtime(TypedDict): @@ -2217,7 +2192,7 @@ class CreateExperimentResponse202RolesItems(TypedDict): class CreateExperimentResponse202ServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2226,7 +2201,7 @@ class CreateExperimentResponse202ServiceconfigurationsItemsConfiguration(TypedDi class CreateExperimentResponse202ServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2298,20 +2273,16 @@ class CreateExperimentResponse202(TypedDict): instantiatedDevices: List[CreateExperimentResponse202InstantiateddevicesItems] -CreateExperimentResponse: TypeAlias = Union[CreateExperimentResponse201, - CreateExperimentResponse202] +CreateExperimentResponse: TypeAlias = Union[CreateExperimentResponse201, CreateExperimentResponse202] -GetExperimentResponse200StatusAlt1: TypeAlias = Literal["created", - "booked", "setup", "running", "finished"] +GetExperimentResponse200StatusAlt1: TypeAlias = Literal["created", "booked", "setup", "running", "finished"] -GetExperimentResponse200StatusAlt2: TypeAlias = Literal["created", - "booked", "running", "finished"] +GetExperimentResponse200StatusAlt2: TypeAlias = Literal["created", "booked", "running", "finished"] -GetExperimentResponse200Status = Union[GetExperimentResponse200StatusAlt1, - GetExperimentResponse200StatusAlt2] +GetExperimentResponse200Status = Union[GetExperimentResponse200StatusAlt1, GetExperimentResponse200StatusAlt2] class GetExperimentResponse200Bookingtime(TypedDict): @@ -2355,7 +2326,7 @@ class GetExperimentResponse200RolesItems(TypedDict): class GetExperimentResponse200ServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2364,7 +2335,7 @@ class GetExperimentResponse200ServiceconfigurationsItemsConfiguration(TypedDict) class GetExperimentResponse200ServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2439,16 +2410,13 @@ class GetExperimentResponse200(TypedDict): GetExperimentResponse: TypeAlias = GetExperimentResponse200 -UpdateExperimentRequestStatusAlt1: TypeAlias = Literal["created", - "booked", "setup", "running", "finished"] +UpdateExperimentRequestStatusAlt1: TypeAlias = Literal["created", "booked", "setup", "running", "finished"] -UpdateExperimentRequestStatusAlt2: TypeAlias = Literal["created", - "booked", "running", "finished"] +UpdateExperimentRequestStatusAlt2: TypeAlias = Literal["created", "booked", "running", "finished"] -UpdateExperimentRequestStatus = Union[UpdateExperimentRequestStatusAlt1, - UpdateExperimentRequestStatusAlt2] +UpdateExperimentRequestStatus = Union[UpdateExperimentRequestStatusAlt1, UpdateExperimentRequestStatusAlt2] class UpdateExperimentRequestBookingtime(TypedDict): @@ -2492,7 +2460,7 @@ class UpdateExperimentRequestRolesItems(TypedDict): class UpdateExperimentRequestServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2501,7 +2469,7 @@ class UpdateExperimentRequestServiceconfigurationsItemsConfiguration(TypedDict): class UpdateExperimentRequestServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2553,16 +2521,13 @@ class UpdateExperimentRequest(TypedDict): serviceConfigurations: NotRequired[List[UpdateExperimentRequestServiceconfigurationsItems]] -UpdateExperimentResponse200StatusAlt1: TypeAlias = Literal["created", - "booked", "setup", "running", "finished"] +UpdateExperimentResponse200StatusAlt1: TypeAlias = Literal["created", "booked", "setup", "running", "finished"] -UpdateExperimentResponse200StatusAlt2: TypeAlias = Literal["created", - "booked", "running", "finished"] +UpdateExperimentResponse200StatusAlt2: TypeAlias = Literal["created", "booked", "running", "finished"] -UpdateExperimentResponse200Status = Union[UpdateExperimentResponse200StatusAlt1, - UpdateExperimentResponse200StatusAlt2] +UpdateExperimentResponse200Status = Union[UpdateExperimentResponse200StatusAlt1, UpdateExperimentResponse200StatusAlt2] class UpdateExperimentResponse200Bookingtime(TypedDict): @@ -2606,7 +2571,7 @@ class UpdateExperimentResponse200RolesItems(TypedDict): class UpdateExperimentResponse200ServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2615,7 +2580,7 @@ class UpdateExperimentResponse200ServiceconfigurationsItemsConfiguration(TypedDi class UpdateExperimentResponse200ServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2687,16 +2652,13 @@ class UpdateExperimentResponse200(TypedDict): instantiatedDevices: List[UpdateExperimentResponse200InstantiateddevicesItems] -UpdateExperimentResponse202StatusAlt1: TypeAlias = Literal["created", - "booked", "setup", "running", "finished"] +UpdateExperimentResponse202StatusAlt1: TypeAlias = Literal["created", "booked", "setup", "running", "finished"] -UpdateExperimentResponse202StatusAlt2: TypeAlias = Literal["created", - "booked", "running", "finished"] +UpdateExperimentResponse202StatusAlt2: TypeAlias = Literal["created", "booked", "running", "finished"] -UpdateExperimentResponse202Status = Union[UpdateExperimentResponse202StatusAlt1, - UpdateExperimentResponse202StatusAlt2] +UpdateExperimentResponse202Status = Union[UpdateExperimentResponse202StatusAlt1, UpdateExperimentResponse202StatusAlt2] class UpdateExperimentResponse202Bookingtime(TypedDict): @@ -2740,7 +2702,7 @@ class UpdateExperimentResponse202RolesItems(TypedDict): class UpdateExperimentResponse202ServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2749,7 +2711,7 @@ class UpdateExperimentResponse202ServiceconfigurationsItemsConfiguration(TypedDi class UpdateExperimentResponse202ServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2821,8 +2783,7 @@ class UpdateExperimentResponse202(TypedDict): instantiatedDevices: List[UpdateExperimentResponse202InstantiateddevicesItems] -UpdateExperimentResponse: TypeAlias = Union[UpdateExperimentResponse200, - UpdateExperimentResponse202] +UpdateExperimentResponse: TypeAlias = Union[UpdateExperimentResponse200, UpdateExperimentResponse202] DeleteExperimentResponse: TypeAlias = None @@ -2877,7 +2838,7 @@ class CreateTemplateRequestConfigurationRolesItems(TypedDict): class CreateTemplateRequestConfigurationServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2886,7 +2847,7 @@ class CreateTemplateRequestConfigurationServiceconfigurationsItemsConfiguration( class CreateTemplateRequestConfigurationServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2979,7 +2940,7 @@ class CreateTemplateResponse201ConfigurationRolesItems(TypedDict): class CreateTemplateResponse201ConfigurationServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -2988,7 +2949,7 @@ class CreateTemplateResponse201ConfigurationServiceconfigurationsItemsConfigurat class CreateTemplateResponse201ConfigurationServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -3081,7 +3042,7 @@ class CreateTemplateResponse202ConfigurationRolesItems(TypedDict): class CreateTemplateResponse202ConfigurationServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -3090,7 +3051,7 @@ class CreateTemplateResponse202ConfigurationServiceconfigurationsItemsConfigurat class CreateTemplateResponse202ConfigurationServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -3152,8 +3113,7 @@ class CreateTemplateResponse202(TypedDict): configuration: CreateTemplateResponse202Configuration -CreateTemplateResponse: TypeAlias = Union[CreateTemplateResponse201, - CreateTemplateResponse202] +CreateTemplateResponse: TypeAlias = Union[CreateTemplateResponse201, CreateTemplateResponse202] class GetTemplateResponse200ConfigurationDevicesItems(TypedDict): @@ -3187,7 +3147,7 @@ class GetTemplateResponse200ConfigurationRolesItems(TypedDict): class GetTemplateResponse200ConfigurationServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -3196,7 +3156,7 @@ class GetTemplateResponse200ConfigurationServiceconfigurationsItemsConfiguration class GetTemplateResponse200ConfigurationServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -3292,7 +3252,7 @@ class UpdateTemplateRequestConfigurationRolesItems(TypedDict): class UpdateTemplateRequestConfigurationServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -3301,7 +3261,7 @@ class UpdateTemplateRequestConfigurationServiceconfigurationsItemsConfiguration( class UpdateTemplateRequestConfigurationServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -3392,7 +3352,7 @@ class UpdateTemplateResponse200ConfigurationRolesItems(TypedDict): class UpdateTemplateResponse200ConfigurationServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -3401,7 +3361,7 @@ class UpdateTemplateResponse200ConfigurationServiceconfigurationsItemsConfigurat class UpdateTemplateResponse200ConfigurationServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -3494,7 +3454,7 @@ class UpdateTemplateResponse202ConfigurationRolesItems(TypedDict): class UpdateTemplateResponse202ConfigurationServiceconfigurationsItemsConfiguration(TypedDict): """ Configuration of the service - + This configuration object will be merged with the participant configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -3503,7 +3463,7 @@ class UpdateTemplateResponse202ConfigurationServiceconfigurationsItemsConfigurat class UpdateTemplateResponse202ConfigurationServiceconfigurationsItemsParticipantsItemsConfig(TypedDict): """ Service configuration of the participant. - + This configuration object will be merged with the service configuration to become the service configuration send to the participant (fields of the participant configuration override the service configuration). Properties: """ @@ -3565,8 +3525,7 @@ class UpdateTemplateResponse202(TypedDict): configuration: UpdateTemplateResponse202Configuration -UpdateTemplateResponse: TypeAlias = Union[UpdateTemplateResponse200, - UpdateTemplateResponse202] +UpdateTemplateResponse: TypeAlias = Union[UpdateTemplateResponse200, UpdateTemplateResponse202] DeleteTemplateResponse: TypeAlias = None @@ -3686,6 +3645,278 @@ class UpdateInstitutionResponse200(TypedDict): DeleteInstitutionResponse: TypeAlias = None +class ScheduleRequestExperimentDevicesItems(TypedDict): + """ + A device might either be a physical/virtual device or a group of device.Properties: + - ID: Unique ID of the device. Contains the institution (by having an end point at that institution) + """ + ID: str + + +class ScheduleRequestExperiment(TypedDict): + """ + An experiment describes a set of devices and how they should be connected (potentially among other metadata).Properties: + - Devices: List of devices used in experiment. + - Description: User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + + """ + Devices: List[ScheduleRequestExperimentDevicesItems] + Description: NotRequired[str] + + +class ScheduleRequestTime(TypedDict): + """ + A time slot represents a slice of time used for bookings.Properties: + - Start: Start time of the booking. + - End: End time of the booking. + """ + Start: str + End: str + + +class ScheduleRequest(TypedDict): + """ + Properties: + - Experiment: An experiment describes a set of devices and how they should be connected (potentially among other metadata). + - Time: A time slot represents a slice of time used for bookings. + - Combined: If true, show only one timetable per device instead of one for all available physical devices. + - onlyOwn: (private) Show only devices of this institution. Give an error if a device of an other institution is requested. + """ + Experiment: ScheduleRequestExperiment + Time: ScheduleRequestTime + Combined: NotRequired[bool] + onlyOwn: NotRequired[bool] + + +class ScheduleResponse200ItemsBookedItems(TypedDict): + """ + A time slot represents a slice of time used for bookings.Properties: + - Start: Start time of the booking. + - End: End time of the booking. + """ + Start: str + End: str + + +class ScheduleResponse200ItemsFreeItems(TypedDict): + """ + A time slot represents a slice of time used for bookings.Properties: + - Start: Start time of the booking. + - End: End time of the booking. + """ + Start: str + End: str + + +class ScheduleResponse200Items(TypedDict): + """ + Properties: + - Device: ID of the device (or * if combined). + - Booked: Array of booked times. + - Free: Array of free times. + """ + Device: str + Booked: List[ScheduleResponse200ItemsBookedItems] + Free: List[ScheduleResponse200ItemsFreeItems] + + +ScheduleResponse200: TypeAlias = List[ScheduleResponse200Items] + + +ScheduleResponse404: TypeAlias = str + + +ScheduleResponse422: TypeAlias = str + + +ScheduleResponse500: TypeAlias = str + + +ScheduleResponse: TypeAlias = Union[ScheduleResponse200, ScheduleResponse404, ScheduleResponse422, ScheduleResponse500] + + +class NewBookingRequestDevicesItems(TypedDict): + """ + A device might either be a physical/virtual device or a group of device.Properties: + - ID: Unique ID of the device. Contains the institution (by having an end point at that institution) + """ + ID: str + + +class NewBookingRequestTime(TypedDict): + """ + A time slot represents a slice of time used for bookings.Properties: + - Start: Start time of the booking. + - End: End time of the booking. + """ + Start: str + End: str + + +class NewBookingRequest(TypedDict): + """ + Properties: + - Devices: List of devices which should be added. + - Time: A time slot represents a slice of time used for bookings. + - Type: Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + """ + Devices: List[NewBookingRequestDevicesItems] + Time: NewBookingRequestTime + Type: NotRequired[Literal["normal"]] + + +class NewBookingResponse200(TypedDict): + """ + Properties: + - BookingID: ID at which the booking can be managed. + """ + BookingID: str + + +NewBookingResponse500: TypeAlias = str + + +NewBookingResponse: TypeAlias = Union[NewBookingResponse200, NewBookingResponse500] + + +class UpdateBookingRequestAlt1DevicesItems(TypedDict): + """ + A device might either be a physical/virtual device or a group of device.Properties: + - ID: Unique ID of the device. Contains the institution (by having an end point at that institution) + """ + ID: str + + +class UpdateBookingRequestAlt1(TypedDict): + """ + Use this request for adding devices.Properties: + - Locked: Expresses whether the devices should be locked. Must match current status of booking. Is assumed to be false if not set. + - Devices: List of devices which should be added. + """ + Locked: NotRequired[bool] + Devices: NotRequired[List[UpdateBookingRequestAlt1DevicesItems]] + + +class UpdateBookingRequestAlt2(TypedDict): + """ + Use this request for adding callbacks.Properties: + - Callback: Callback which should be called at changes. + """ + Callback: NotRequired[str] + + +UpdateBookingRequest = Union[UpdateBookingRequestAlt1, UpdateBookingRequestAlt2] + + +class UpdateBookingResponse200(TypedDict): + """ + Properties: + - BookingID + """ + BookingID: str + + +UpdateBookingResponse400: TypeAlias = str + + +UpdateBookingResponse500: TypeAlias = str + + +UpdateBookingResponse: TypeAlias = Union[UpdateBookingResponse200, UpdateBookingResponse400, UpdateBookingResponse500] + + +DeleteBookingResponse500: TypeAlias = str + + +DeleteBookingResponse: TypeAlias = DeleteBookingResponse500 + + +class GetBookingResponse200BookingTime(TypedDict): + """ + A time slot represents a slice of time used for bookings.Properties: + - Start: Start time of the booking. + - End: End time of the booking. + """ + Start: str + End: str + + +class GetBookingResponse200Booking(TypedDict): + """ + A booking in the booking system.Properties: + - ID: Unique ID of the booking. + - Time: A time slot represents a slice of time used for bookings. + - Devices + - Type: Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + - Status: Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + + - You: If true, this booking was done by you. + - External: Shows whether the booking was done by an external institution. + - Message: User readable notes about the status of the booking (e.g. if devices are unknown). + """ + ID: str + Time: GetBookingResponse200BookingTime + Devices: List[str] + Type: NotRequired[Literal["normal"]] + Status: Literal["pending", "booked", "rejected", "cancelled", "active", "active-pending", "active-rejected"] + You: bool + External: bool + Message: NotRequired[str] + + +class GetBookingResponse200(TypedDict): + """ + Properties: + - Booking: A booking in the booking system. + - Locked: Shows if the booking is in a locked status. + """ + Booking: GetBookingResponse200Booking + Locked: bool + + +GetBookingResponse500: TypeAlias = str + + +GetBookingResponse: TypeAlias = Union[GetBookingResponse200, GetBookingResponse500] + + +DestroyBookingResponse500: TypeAlias = str + + +DestroyBookingResponse: TypeAlias = DestroyBookingResponse500 + + +class LockBookingResponse200Items(TypedDict): + """ + Properties: + - Requested + - Selected + """ + Requested: str + Selected: str + + +LockBookingResponse200: TypeAlias = List[LockBookingResponse200Items] + + +LockBookingResponse500: TypeAlias = str + + +LockBookingResponse: TypeAlias = Union[LockBookingResponse200, LockBookingResponse500] + + +UnlockBookingResponse500: TypeAlias = str + + +UnlockBookingResponse: TypeAlias = UnlockBookingResponse500 + + +BookingCallbackResponse500: TypeAlias = str + + +BookingCallbackResponse: TypeAlias = BookingCallbackResponse500 + + class ListPlatformResponse200ItemsRegistration(TypedDict): """ Properties: @@ -3871,18 +4102,41 @@ class LtiLaunchRequest(TypedDict): id_token: str +LtiLaunchResponse200SessionRole_mappingItemsDeviceAlt1: TypeAlias = Literal["GROUP"] + + +LtiLaunchResponse200SessionRole_mappingItemsDeviceAlt2: TypeAlias = str + + +LtiLaunchResponse200SessionRole_mappingItemsDevice = Union[LtiLaunchResponse200SessionRole_mappingItemsDeviceAlt1, LtiLaunchResponse200SessionRole_mappingItemsDeviceAlt2] + + +class LtiLaunchResponse200SessionRole_mappingItems(TypedDict): + """ + Properties: + - role + - device + """ + role: str + device: LtiLaunchResponse200SessionRole_mappingItemsDevice + + class LtiLaunchResponse200Session(TypedDict): """ Properties: - uri - resource_uri: The URI of the resource. - experiment_uri: The URI of the experiment. + - experiment_change_uri: The URI to change the experiment setting. - roles: The roles of the session. + - role_mapping """ uri: str resource_uri: str experiment_uri: NotRequired[str] + experiment_change_uri: NotRequired[str] roles: List[Literal["instructor", "student"]] + role_mapping: NotRequired[List[LtiLaunchResponse200SessionRole_mappingItems]] class LtiLaunchResponse200(TypedDict): @@ -3976,8 +4230,7 @@ class UpdateResourceResponse200(TypedDict): ListResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt2: TypeAlias = str -ListResourceStudentsResponse200ItemsRole_mappingItemsDevice = Union[ - ListResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt1, ListResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt2] +ListResourceStudentsResponse200ItemsRole_mappingItemsDevice = Union[ListResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt1, ListResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt2] class ListResourceStudentsResponse200ItemsRole_mappingItems(TypedDict): @@ -4012,15 +4265,13 @@ class ListResourceStudentsResponse200Items(TypedDict): ListResourceStudentsResponse: TypeAlias = ListResourceStudentsResponse200 -UpdateResourceStudentsRequestItemsDataRole_mappingItemsDeviceAlt1: TypeAlias = Literal[ - "GROUP"] +UpdateResourceStudentsRequestItemsDataRole_mappingItemsDeviceAlt1: TypeAlias = Literal["GROUP"] UpdateResourceStudentsRequestItemsDataRole_mappingItemsDeviceAlt2: TypeAlias = str -UpdateResourceStudentsRequestItemsDataRole_mappingItemsDevice = Union[ - UpdateResourceStudentsRequestItemsDataRole_mappingItemsDeviceAlt1, UpdateResourceStudentsRequestItemsDataRole_mappingItemsDeviceAlt2] +UpdateResourceStudentsRequestItemsDataRole_mappingItemsDevice = Union[UpdateResourceStudentsRequestItemsDataRole_mappingItemsDeviceAlt1, UpdateResourceStudentsRequestItemsDataRole_mappingItemsDeviceAlt2] class UpdateResourceStudentsRequestItemsDataRole_mappingItems(TypedDict): @@ -4062,15 +4313,13 @@ class UpdateResourceStudentsRequestItems(TypedDict): UpdateResourceStudentsRequest: TypeAlias = List[UpdateResourceStudentsRequestItems] -UpdateResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt1: TypeAlias = Literal[ - "GROUP"] +UpdateResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt1: TypeAlias = Literal["GROUP"] UpdateResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt2: TypeAlias = str -UpdateResourceStudentsResponse200ItemsRole_mappingItemsDevice = Union[ - UpdateResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt1, UpdateResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt2] +UpdateResourceStudentsResponse200ItemsRole_mappingItemsDevice = Union[UpdateResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt1, UpdateResourceStudentsResponse200ItemsRole_mappingItemsDeviceAlt2] class UpdateResourceStudentsResponse200ItemsRole_mappingItems(TypedDict): @@ -4111,8 +4360,7 @@ class UpdateResourceStudentsResponse200Items(TypedDict): GetResourceStudentResponse200Role_mappingItemsDeviceAlt2: TypeAlias = str -GetResourceStudentResponse200Role_mappingItemsDevice = Union[GetResourceStudentResponse200Role_mappingItemsDeviceAlt1, - GetResourceStudentResponse200Role_mappingItemsDeviceAlt2] +GetResourceStudentResponse200Role_mappingItemsDevice = Union[GetResourceStudentResponse200Role_mappingItemsDeviceAlt1, GetResourceStudentResponse200Role_mappingItemsDeviceAlt2] class GetResourceStudentResponse200Role_mappingItems(TypedDict): @@ -4150,8 +4398,7 @@ class GetResourceStudentResponse200(TypedDict): UpdateResourceStudentRequestRole_mappingItemsDeviceAlt2: TypeAlias = str -UpdateResourceStudentRequestRole_mappingItemsDevice = Union[UpdateResourceStudentRequestRole_mappingItemsDeviceAlt1, - UpdateResourceStudentRequestRole_mappingItemsDeviceAlt2] +UpdateResourceStudentRequestRole_mappingItemsDevice = Union[UpdateResourceStudentRequestRole_mappingItemsDeviceAlt1, UpdateResourceStudentRequestRole_mappingItemsDeviceAlt2] class UpdateResourceStudentRequestRole_mappingItems(TypedDict): @@ -4186,8 +4433,7 @@ class UpdateResourceStudentRequest(TypedDict): UpdateResourceStudentResponse200Role_mappingItemsDeviceAlt2: TypeAlias = str -UpdateResourceStudentResponse200Role_mappingItemsDevice = Union[UpdateResourceStudentResponse200Role_mappingItemsDeviceAlt1, - UpdateResourceStudentResponse200Role_mappingItemsDeviceAlt2] +UpdateResourceStudentResponse200Role_mappingItemsDevice = Union[UpdateResourceStudentResponse200Role_mappingItemsDeviceAlt1, UpdateResourceStudentResponse200Role_mappingItemsDeviceAlt2] class UpdateResourceStudentResponse200Role_mappingItems(TypedDict): @@ -4217,3 +4463,36 @@ class UpdateResourceStudentResponse200(TypedDict): UpdateResourceStudentResponse: TypeAlias = UpdateResourceStudentResponse200 + + +UpdateLtiExperimentRequestRole_mappingItemsDeviceAlt1: TypeAlias = Literal["GROUP"] + + +UpdateLtiExperimentRequestRole_mappingItemsDeviceAlt2: TypeAlias = str + + +UpdateLtiExperimentRequestRole_mappingItemsDevice = Union[UpdateLtiExperimentRequestRole_mappingItemsDeviceAlt1, UpdateLtiExperimentRequestRole_mappingItemsDeviceAlt2] + + +class UpdateLtiExperimentRequestRole_mappingItems(TypedDict): + """ + Properties: + - role + - device + """ + role: str + device: UpdateLtiExperimentRequestRole_mappingItemsDevice + + +class UpdateLtiExperimentRequest(TypedDict): + """ + Properties: + - impersonate: URI of the student to impersonate. + - role_mapping: Mapping of roles to devices. +This overwrites any existing role mapping possibles et by the student impersonation. + """ + impersonate: NotRequired[str] + role_mapping: NotRequired[List[UpdateLtiExperimentRequestRole_mappingItems]] + + +UpdateLtiExperimentResponse: TypeAlias = None diff --git a/clients/api/python/tests/test_openapi.py b/clients/api/python/tests/test_openapi.py index 8767a8a2..386e2680 100644 --- a/clients/api/python/tests/test_openapi.py +++ b/clients/api/python/tests/test_openapi.py @@ -20,8 +20,7 @@ def normalize_result(_dict): value = value.replace('Z', '+00:00') value = value.replace('.0+', '.000+') value = value.replace('.00+', '.000+') - _dict[key] = datetime.fromisoformat( - value).replace(tzinfo=None).isoformat() + _dict[key] = datetime.fromisoformat(value).replace(tzinfo=None).isoformat() except: # noqa: E722 normalize_result(value) elif isinstance(_dict, list): @@ -43,176 +42,148 @@ async def test_login(aioresponses: aioresponses): for parameters in parameter_list: response_201_dict = json.loads(r'"voluptate Ut nulla aliquip"') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.login(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'"voluptate Ut nulla aliquip"') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.login(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'"voluptate Ut nulla aliquip"') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.login(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'"voluptate Ut nulla aliquip"') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.login(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.login(url=full_url, body=request, **parameters) @@ -229,165 +200,141 @@ async def test_logout(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.logout(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.logout(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.logout(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.logout(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.logout(url=full_url, body=request, **parameters) @@ -403,176 +350,148 @@ async def test_list_users(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"https://ywksMQ.azJ,,Nw0l.t-ssD8N64Vnr-LNtJmyvZnPUSOeEw81kz","id":"eu","username":"tempor elit","admin":false,"password":"Ut mollit exercitation do"},{"url":"https://pYWBcACqOaHPIeqOIx.cmhtIFC54LRLzuPz-","id":"in dolore velit veniam","username":"cillum commodo et Lorem"},{"url":"http://DLrkvFgFhItukqdSMqaHFDU.khPqvmmSDErZDWIehH2x.u2jah1rirOUMOgrC-BQ","id":"ea","username":"cillum velit","admin":false,"password":"reprehenderit dolor magna"},{"url":"http://njFiEmNrTDWYVrgw.uodCtnJNyi.c+Iz4nSsuXZZKXNxP-g64GJ3Wu","id":"veniam ipsum eiusmod dolor","username":"in ut aliqua","admin":true,"password":"commodo Excepteur"},{"url":"http://MVdiprdrGwHgFEXwGogdRSLxKdMN.owKNXuL","id":"est aliqua proident et","username":"commodo elit ea et non"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_users(**parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"https://ywksMQ.azJ,,Nw0l.t-ssD8N64Vnr-LNtJmyvZnPUSOeEw81kz","id":"eu","username":"tempor elit","admin":false,"password":"Ut mollit exercitation do"},{"url":"https://pYWBcACqOaHPIeqOIx.cmhtIFC54LRLzuPz-","id":"in dolore velit veniam","username":"cillum commodo et Lorem"},{"url":"http://DLrkvFgFhItukqdSMqaHFDU.khPqvmmSDErZDWIehH2x.u2jah1rirOUMOgrC-BQ","id":"ea","username":"cillum velit","admin":false,"password":"reprehenderit dolor magna"},{"url":"http://njFiEmNrTDWYVrgw.uodCtnJNyi.c+Iz4nSsuXZZKXNxP-g64GJ3Wu","id":"veniam ipsum eiusmod dolor","username":"in ut aliqua","admin":true,"password":"commodo Excepteur"},{"url":"http://MVdiprdrGwHgFEXwGogdRSLxKdMN.owKNXuL","id":"est aliqua proident et","username":"commodo elit ea et non"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_users(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"https://ywksMQ.azJ,,Nw0l.t-ssD8N64Vnr-LNtJmyvZnPUSOeEw81kz","id":"eu","username":"tempor elit","admin":false,"password":"Ut mollit exercitation do"},{"url":"https://pYWBcACqOaHPIeqOIx.cmhtIFC54LRLzuPz-","id":"in dolore velit veniam","username":"cillum commodo et Lorem"},{"url":"http://DLrkvFgFhItukqdSMqaHFDU.khPqvmmSDErZDWIehH2x.u2jah1rirOUMOgrC-BQ","id":"ea","username":"cillum velit","admin":false,"password":"reprehenderit dolor magna"},{"url":"http://njFiEmNrTDWYVrgw.uodCtnJNyi.c+Iz4nSsuXZZKXNxP-g64GJ3Wu","id":"veniam ipsum eiusmod dolor","username":"in ut aliqua","admin":true,"password":"commodo Excepteur"},{"url":"http://MVdiprdrGwHgFEXwGogdRSLxKdMN.owKNXuL","id":"est aliqua proident et","username":"commodo elit ea et non"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_users(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"https://ywksMQ.azJ,,Nw0l.t-ssD8N64Vnr-LNtJmyvZnPUSOeEw81kz","id":"eu","username":"tempor elit","admin":false,"password":"Ut mollit exercitation do"},{"url":"https://pYWBcACqOaHPIeqOIx.cmhtIFC54LRLzuPz-","id":"in dolore velit veniam","username":"cillum commodo et Lorem"},{"url":"http://DLrkvFgFhItukqdSMqaHFDU.khPqvmmSDErZDWIehH2x.u2jah1rirOUMOgrC-BQ","id":"ea","username":"cillum velit","admin":false,"password":"reprehenderit dolor magna"},{"url":"http://njFiEmNrTDWYVrgw.uodCtnJNyi.c+Iz4nSsuXZZKXNxP-g64GJ3Wu","id":"veniam ipsum eiusmod dolor","username":"in ut aliqua","admin":true,"password":"commodo Excepteur"},{"url":"http://MVdiprdrGwHgFEXwGogdRSLxKdMN.owKNXuL","id":"est aliqua proident et","username":"commodo elit ea et non"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_users(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_users(url=full_url, **parameters) @@ -584,187 +503,154 @@ async def test_create_user(aioresponses: aioresponses): url_variant = r'users' full_url = BASE_URL+r'/users' - request = json.loads( - r'{"username":"dolor ad","password":"amet cupidatat","id":"voluptate","admin":false,"url":"http://FSBGBNvZnJ.jzPyMN+sJN3tB80puC-0lslw1H6lxXQtUGr.2"}') + request = json.loads(r'{"username":"dolor ad","password":"amet cupidatat","id":"voluptate","admin":false,"url":"http://FSBGBNvZnJ.jzPyMN+sJN3tB80puC-0lslw1H6lxXQtUGr.2"}') parameter_list = [{}, ] for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_user(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_user(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_user(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_user(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_user(url=full_url, body=request, **parameters) @@ -779,136 +665,112 @@ async def test_get_user(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_user(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_user(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_user(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_user(url=full_url, **parameters) @@ -925,136 +787,112 @@ async def test_update_user(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_user(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_user(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://GSmeOay.zuyvL9Yb23FIc2aCKGb0.AtYSOFTqM30gB5p34mXcT6N","id":"laborum aliqua","username":"pariatur anim et Lorem ipsum","password":"sed ipsum dolor laboris","admin":false}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_user(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_user(url=full_url, body=request, **parameters) @@ -1069,124 +907,106 @@ async def test_delete_user(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_user(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_user(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_user(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_user(url=full_url, **parameters) @@ -1202,176 +1022,148 @@ async def test_get_identity(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'{}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_identity(**parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_identity(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_identity(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_identity(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_identity(url=full_url, **parameters) @@ -1389,176 +1181,148 @@ async def test_update_identity(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'{}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_identity(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_identity(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_identity(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_identity(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_identity(url=full_url, body=request, **parameters) @@ -1576,39 +1340,31 @@ async def test_createToken(aioresponses: aioresponses): for parameters in parameter_list: response_201_dict = json.loads(r'"consectetur in do nisi"') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.createToken(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'"consectetur in do nisi"') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.createToken(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'"consectetur in do nisi"') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.createToken(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'"consectetur in do nisi"') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.createToken(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) @pytest.mark.asyncio @@ -1620,181 +1376,149 @@ async def test_list_devices(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"http://sAsYaDUmX.olkrnaJIJxN8ZMAcK","type":"cloud instantiable","name":"occaecat in non","isPublic":true,"description":"do voluptate id"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"http://sAsYaDUmX.olkrnaJIJxN8ZMAcK","type":"cloud instantiable","name":"occaecat in non","isPublic":true,"description":"do voluptate id"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_devices(**parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"http://sAsYaDUmX.olkrnaJIJxN8ZMAcK","type":"cloud instantiable","name":"occaecat in non","isPublic":true,"description":"do voluptate id"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"http://sAsYaDUmX.olkrnaJIJxN8ZMAcK","type":"cloud instantiable","name":"occaecat in non","isPublic":true,"description":"do voluptate id"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_devices(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"http://sAsYaDUmX.olkrnaJIJxN8ZMAcK","type":"cloud instantiable","name":"occaecat in non","isPublic":true,"description":"do voluptate id"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"http://sAsYaDUmX.olkrnaJIJxN8ZMAcK","type":"cloud instantiable","name":"occaecat in non","isPublic":true,"description":"do voluptate id"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_devices(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"http://sAsYaDUmX.olkrnaJIJxN8ZMAcK","type":"cloud instantiable","name":"occaecat in non","isPublic":true,"description":"do voluptate id"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"http://sAsYaDUmX.olkrnaJIJxN8ZMAcK","type":"cloud instantiable","name":"occaecat in non","isPublic":true,"description":"do voluptate id"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_devices(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_devices(url=full_url, **parameters) @@ -1811,181 +1535,149 @@ async def test_create_device(aioresponses: aioresponses): parameter_list = [{"changedUrl": "test_string", }, {}, ] for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_device(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_device(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_device(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_device(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_device(url=full_url, body=request, **parameters) @@ -2000,136 +1692,112 @@ async def test_get_device(aioresponses: aioresponses): parameter_list = [{"flat_group": True, }, {}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_device(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_device(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_device(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device(url=full_url, **parameters) @@ -2146,136 +1814,112 @@ async def test_update_device(aioresponses: aioresponses): parameter_list = [{"changedUrl": "test_string", }, {}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_device(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_device(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"https://KMlhNcfBAeYBDdlNWpqiS.uhisZnfxWisWyA346eVjpoeK4BZYjE6oK.ZDneOU1atITfp","type":"group","name":"deserunt est sint magna labore","isPublic":false,"devices":[{"url":"https://YOSZZLZEKMazHeFvjzy.gajTDGgI0e.7QLRAyQNvsosnxLXxQSwdSjMZxmIrHvBPiS307XfTFj"},{"url":"https://whIdyVWYlqjGvFh.laf9x.hv8W"},{"url":"https://ArxHAialfPGZWvcvzmXeBBci.qftdxpbzFf0kcgN3,iyJvCKIeH3"}],"description":"ullamco voluptate","owner":[{"url":"http://LzJabypElGcrYPpoRwUMrR.egvcVYYKiO3vR"},{"url":"https://pO.oyfalCavEYnWwwa"},{"url":"https://YaDyTldBsEGNQkRLRSJXERGYXt.eyRdoDLiiFKUzJ"},{"url":"https://MXGuntpubSQBEWaFeD.rnlWp4EV3uCrfkIbi4uyKVsM2f8Y.I.N+8VVCJDodc+0qPPltOEcKiJfWd"},{"url":"http://zkxkKeJlGcaYu.udivLLttm6JR"}],"viewer":[{"url":"http://AEyxcJP.swmuJJqo6Vy-HPro8lm3WqKE3XOIfbopdGzXwAOsfaxcOlmihCF5aqk,F2"},{"url":"https://uUYlDOKMyeYnpfdudQZJODtjcpYIno.dxovc.5ldQCWcwLC4eTyRTGL9UHyN+U9wDarJbTwAUPO4ZV+fxGmoG6vfXuPFI"}]}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_device(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_device(url=full_url, body=request, **parameters) @@ -2290,124 +1934,106 @@ async def test_delete_device(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device(url=full_url, **parameters) @@ -2423,132 +2049,111 @@ async def test_instantiate_device(aioresponses: aioresponses): for parameters in parameter_list: response_201_dict = json.loads(r'{"instance":{"url":"https://QXgchCqYONXUzAPMGRmTeYIQPH.teqoxG6A,","type":"device","name":"ut","isPublic":false,"services":[{"serviceDirection":"prosumer","serviceId":"qui"},{"serviceType":"https://farzjvMniZnNgZjFBlEPjd.xdcJlbVTd4ha7fdzBswHgBVXkun1bYFt4-W+cLaDmUm4NdFK5","serviceId":"fugiat commodo consectetur laborum officia","serviceDirection":"prosumer"},{"serviceId":"proident Lorem dolore enim eu","serviceType":"http://lGUlpUhSJkIblJFycFQKfNQXOXMnaGha.adqxair-Uw4wcN","serviceDirection":"producer"}],"viewer":[{"url":"https://rAgfDW.jeoReoqYH-ujUVRCNUQJl.H.DSGkgIf"}],"announcedAvailability":[{"start":"1962-06-24T01:12:14.0Z"},{"start":"1965-03-17T03:46:48.0Z"}],"connected":false,"description":"quis ad commodo nostrud dolor","owner":[{"url":"http://MOaPANKswMkLZU.gayowe-SJNQJJxwE91c"},{"url":"https://meHdIB.gtfohNXE2I.rYJB-M8lMOtQ.mNipN"},{"url":"http://LcMoQeSljZaYB.loz2engzXdRwWO"},{"url":"http://EhxkkgEUEzpVEW.tndkAtRmkLqm-llTcHmNW-xEQ4pZWb8DvDLtQyXJB1cSLVF4nQ-a3OPVNlMJjDnRSf2tBL"},{"url":"https://CFMhjTLrFIlCpjRPR.kdg3IhlruqyIIOwp6l6xrbCcT4slJ,15WIvaddW6qQCBVR5BG,KZj"}],"experiment":"http://tNjWjnLfGseMnTGbIPMHHQe.yyPMcOI"},"deviceToken":"Excepteur magna pariatur in"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.instantiate_device(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"instance":{"url":"https://QXgchCqYONXUzAPMGRmTeYIQPH.teqoxG6A,","type":"device","name":"ut","isPublic":false,"services":[{"serviceDirection":"prosumer","serviceId":"qui"},{"serviceType":"https://farzjvMniZnNgZjFBlEPjd.xdcJlbVTd4ha7fdzBswHgBVXkun1bYFt4-W+cLaDmUm4NdFK5","serviceId":"fugiat commodo consectetur laborum officia","serviceDirection":"prosumer"},{"serviceId":"proident Lorem dolore enim eu","serviceType":"http://lGUlpUhSJkIblJFycFQKfNQXOXMnaGha.adqxair-Uw4wcN","serviceDirection":"producer"}],"viewer":[{"url":"https://rAgfDW.jeoReoqYH-ujUVRCNUQJl.H.DSGkgIf"}],"announcedAvailability":[{"start":"1962-06-24T01:12:14.0Z"},{"start":"1965-03-17T03:46:48.0Z"}],"connected":false,"description":"quis ad commodo nostrud dolor","owner":[{"url":"http://MOaPANKswMkLZU.gayowe-SJNQJJxwE91c"},{"url":"https://meHdIB.gtfohNXE2I.rYJB-M8lMOtQ.mNipN"},{"url":"http://LcMoQeSljZaYB.loz2engzXdRwWO"},{"url":"http://EhxkkgEUEzpVEW.tndkAtRmkLqm-llTcHmNW-xEQ4pZWb8DvDLtQyXJB1cSLVF4nQ-a3OPVNlMJjDnRSf2tBL"},{"url":"https://CFMhjTLrFIlCpjRPR.kdg3IhlruqyIIOwp6l6xrbCcT4slJ,15WIvaddW6qQCBVR5BG,KZj"}],"experiment":"http://tNjWjnLfGseMnTGbIPMHHQe.yyPMcOI"},"deviceToken":"Excepteur magna pariatur in"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.instantiate_device(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"instance":{"url":"https://QXgchCqYONXUzAPMGRmTeYIQPH.teqoxG6A,","type":"device","name":"ut","isPublic":false,"services":[{"serviceDirection":"prosumer","serviceId":"qui"},{"serviceType":"https://farzjvMniZnNgZjFBlEPjd.xdcJlbVTd4ha7fdzBswHgBVXkun1bYFt4-W+cLaDmUm4NdFK5","serviceId":"fugiat commodo consectetur laborum officia","serviceDirection":"prosumer"},{"serviceId":"proident Lorem dolore enim eu","serviceType":"http://lGUlpUhSJkIblJFycFQKfNQXOXMnaGha.adqxair-Uw4wcN","serviceDirection":"producer"}],"viewer":[{"url":"https://rAgfDW.jeoReoqYH-ujUVRCNUQJl.H.DSGkgIf"}],"announcedAvailability":[{"start":"1962-06-24T01:12:14.0Z"},{"start":"1965-03-17T03:46:48.0Z"}],"connected":false,"description":"quis ad commodo nostrud dolor","owner":[{"url":"http://MOaPANKswMkLZU.gayowe-SJNQJJxwE91c"},{"url":"https://meHdIB.gtfohNXE2I.rYJB-M8lMOtQ.mNipN"},{"url":"http://LcMoQeSljZaYB.loz2engzXdRwWO"},{"url":"http://EhxkkgEUEzpVEW.tndkAtRmkLqm-llTcHmNW-xEQ4pZWb8DvDLtQyXJB1cSLVF4nQ-a3OPVNlMJjDnRSf2tBL"},{"url":"https://CFMhjTLrFIlCpjRPR.kdg3IhlruqyIIOwp6l6xrbCcT4slJ,15WIvaddW6qQCBVR5BG,KZj"}],"experiment":"http://tNjWjnLfGseMnTGbIPMHHQe.yyPMcOI"},"deviceToken":"Excepteur magna pariatur in"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.instantiate_device(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.instantiate_device(url=full_url, **parameters) @@ -2560,140 +2165,115 @@ async def test_get_device_availability(aioresponses: aioresponses): url_variant = r'devices/c799cc2e-cdc5-4143-973a-6f56a5afa82c/availability' full_url = BASE_URL+r'/devices/c799cc2e-cdc5-4143-973a-6f56a5afa82c/availability' - parameter_list = [{"startTime": "test_string", "endTime": "test_string", }, { - "endTime": "test_string", }, {"startTime": "test_string", }, {}, ] + parameter_list = [{"startTime": "test_string", "endTime": "test_string", }, {"endTime": "test_string", }, {"startTime": "test_string", }, {}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_device_availability(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_device_availability(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_device_availability(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_device_availability(url=full_url, **parameters) @@ -2708,124 +2288,106 @@ async def test_delete_device_availability_rules(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_device_availability_rules(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_device_availability_rules(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_device_availability_rules(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_device_availability_rules(url=full_url, **parameters) @@ -2842,136 +2404,112 @@ async def test_add_device_availability_rules(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.add_device_availability_rules(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.add_device_availability_rules(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"end":"1992-10-14T09:14:27.0Z"},{"start":"1978-02-16T19:07:22.0Z","end":"2008-06-15T01:24:43.0Z"},{"end":"1972-02-03T10:17:33.0Z"},{"start":"1973-01-02T03:15:47.0Z","end":"1987-10-14T09:42:59.0Z"},{"end":"1980-02-28T18:27:09.0Z","start":"1991-04-19T08:25:57.0Z"}]') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.add_device_availability_rules(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.add_device_availability_rules(url=full_url, body=request, **parameters) @@ -2987,132 +2525,111 @@ async def test_create_websocket_token(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'"consectetur in do nisi"') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.create_websocket_token(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'"consectetur in do nisi"') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.create_websocket_token(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'"consectetur in do nisi"') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.create_websocket_token(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_websocket_token(url=full_url, **parameters) @@ -3129,124 +2646,106 @@ async def test_send_signaling_message(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=200) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) async with APIClient(BASE_URL) as client: resp = await client.send_signaling_message(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=200) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) async with APIClient(BASE_URL) as client: resp = await client.send_signaling_message(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=200) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) async with APIClient(BASE_URL) as client: resp = await client.send_signaling_message(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.send_signaling_message(url=full_url, body=request, **parameters) @@ -3262,176 +2761,148 @@ async def test_list_peerconnections(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"http://KyoRQQYXuhRcWsIdHlKRtrJNQLyPcQVL.loyroBUNq2vo2FfhgDMRPF7JkHgaJe6P1agO5OeOpw3","type":"local","status":"new","devices":[{"url":"http://bxjqRiwE.pyoFSG4ANEBNkh15v6NcAvF3W+"},{"url":"https://owgXIbFEJIqVUszBtNaxcvsWHfkF.irvnNrOFl.LCXjM8qqRk6CwLRtjYsuVVBby3LIRM15oLcPZc"}]},{"url":"http://atiqKdIcgcdciNqJELLbebsHu.fwdijwlzUO6GliE,00NIKH18ukk+V4NymKPZckn7l5O6k11fQrKB8n5Vb+mpAhl2wTFMBCgvADfq4Zc","type":"webrtc","status":"closed","devices":[{"url":"https://xRQUlPQYzvcrakgdzTVIoAQnrb.cyxAtoN-TSrnv6gA9TAoimb+KfzslNXC1ACXLVvqZIqVxD.P8LQJdN"},{"url":"http://MfAlOZEDr.xesp,LQpxWsZb8hsnLtIMgHDzuy6CyZ-W"}]},{"url":"https://XIuyclfuimxfXPeEGIcDKNBA.wrysIrNUAtAOOLUIm,fyivTctJF4d6-P,PhOVokkT8DEl6H6E2wz8YGx5MVOsinjF","type":"local","status":"connecting","devices":[{"url":"https://iVljKwCoObDTwhQ.bqUTYErE,1ovLOXv-jv-Hfn3vfTb.VBpjQyEkuotIBsl8I-"},{"url":"https://iqxBcnpgrxqNks.xioyynXEHn4le2aIxURnGf7yU-xVT6GfYt6NCgSZxHT0zxLPX-wffwgvDZS7iTm"}]},{"url":"http://lQxLOheIR.wrdcGhkFofSBB0DjYRoxbhHZ5f90YT0TH7T1xRRWXeySaSQyoNjrk","type":"local","status":"new","devices":[{"url":"https://xEFDGdwGuJuQsUVJQSMlTBYiLwEMDPPbX.kpwat2zO6VQ0mUKSU6A5fLr-HwK90DYD31JE1dPz.MguVngRXo7TKyOBic7zw"},{"url":"http://FeNTUUJUyfAngKomi.jabuY-i"}]}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_peerconnections(**parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"http://KyoRQQYXuhRcWsIdHlKRtrJNQLyPcQVL.loyroBUNq2vo2FfhgDMRPF7JkHgaJe6P1agO5OeOpw3","type":"local","status":"new","devices":[{"url":"http://bxjqRiwE.pyoFSG4ANEBNkh15v6NcAvF3W+"},{"url":"https://owgXIbFEJIqVUszBtNaxcvsWHfkF.irvnNrOFl.LCXjM8qqRk6CwLRtjYsuVVBby3LIRM15oLcPZc"}]},{"url":"http://atiqKdIcgcdciNqJELLbebsHu.fwdijwlzUO6GliE,00NIKH18ukk+V4NymKPZckn7l5O6k11fQrKB8n5Vb+mpAhl2wTFMBCgvADfq4Zc","type":"webrtc","status":"closed","devices":[{"url":"https://xRQUlPQYzvcrakgdzTVIoAQnrb.cyxAtoN-TSrnv6gA9TAoimb+KfzslNXC1ACXLVvqZIqVxD.P8LQJdN"},{"url":"http://MfAlOZEDr.xesp,LQpxWsZb8hsnLtIMgHDzuy6CyZ-W"}]},{"url":"https://XIuyclfuimxfXPeEGIcDKNBA.wrysIrNUAtAOOLUIm,fyivTctJF4d6-P,PhOVokkT8DEl6H6E2wz8YGx5MVOsinjF","type":"local","status":"connecting","devices":[{"url":"https://iVljKwCoObDTwhQ.bqUTYErE,1ovLOXv-jv-Hfn3vfTb.VBpjQyEkuotIBsl8I-"},{"url":"https://iqxBcnpgrxqNks.xioyynXEHn4le2aIxURnGf7yU-xVT6GfYt6NCgSZxHT0zxLPX-wffwgvDZS7iTm"}]},{"url":"http://lQxLOheIR.wrdcGhkFofSBB0DjYRoxbhHZ5f90YT0TH7T1xRRWXeySaSQyoNjrk","type":"local","status":"new","devices":[{"url":"https://xEFDGdwGuJuQsUVJQSMlTBYiLwEMDPPbX.kpwat2zO6VQ0mUKSU6A5fLr-HwK90DYD31JE1dPz.MguVngRXo7TKyOBic7zw"},{"url":"http://FeNTUUJUyfAngKomi.jabuY-i"}]}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_peerconnections(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"http://KyoRQQYXuhRcWsIdHlKRtrJNQLyPcQVL.loyroBUNq2vo2FfhgDMRPF7JkHgaJe6P1agO5OeOpw3","type":"local","status":"new","devices":[{"url":"http://bxjqRiwE.pyoFSG4ANEBNkh15v6NcAvF3W+"},{"url":"https://owgXIbFEJIqVUszBtNaxcvsWHfkF.irvnNrOFl.LCXjM8qqRk6CwLRtjYsuVVBby3LIRM15oLcPZc"}]},{"url":"http://atiqKdIcgcdciNqJELLbebsHu.fwdijwlzUO6GliE,00NIKH18ukk+V4NymKPZckn7l5O6k11fQrKB8n5Vb+mpAhl2wTFMBCgvADfq4Zc","type":"webrtc","status":"closed","devices":[{"url":"https://xRQUlPQYzvcrakgdzTVIoAQnrb.cyxAtoN-TSrnv6gA9TAoimb+KfzslNXC1ACXLVvqZIqVxD.P8LQJdN"},{"url":"http://MfAlOZEDr.xesp,LQpxWsZb8hsnLtIMgHDzuy6CyZ-W"}]},{"url":"https://XIuyclfuimxfXPeEGIcDKNBA.wrysIrNUAtAOOLUIm,fyivTctJF4d6-P,PhOVokkT8DEl6H6E2wz8YGx5MVOsinjF","type":"local","status":"connecting","devices":[{"url":"https://iVljKwCoObDTwhQ.bqUTYErE,1ovLOXv-jv-Hfn3vfTb.VBpjQyEkuotIBsl8I-"},{"url":"https://iqxBcnpgrxqNks.xioyynXEHn4le2aIxURnGf7yU-xVT6GfYt6NCgSZxHT0zxLPX-wffwgvDZS7iTm"}]},{"url":"http://lQxLOheIR.wrdcGhkFofSBB0DjYRoxbhHZ5f90YT0TH7T1xRRWXeySaSQyoNjrk","type":"local","status":"new","devices":[{"url":"https://xEFDGdwGuJuQsUVJQSMlTBYiLwEMDPPbX.kpwat2zO6VQ0mUKSU6A5fLr-HwK90DYD31JE1dPz.MguVngRXo7TKyOBic7zw"},{"url":"http://FeNTUUJUyfAngKomi.jabuY-i"}]}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_peerconnections(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"http://KyoRQQYXuhRcWsIdHlKRtrJNQLyPcQVL.loyroBUNq2vo2FfhgDMRPF7JkHgaJe6P1agO5OeOpw3","type":"local","status":"new","devices":[{"url":"http://bxjqRiwE.pyoFSG4ANEBNkh15v6NcAvF3W+"},{"url":"https://owgXIbFEJIqVUszBtNaxcvsWHfkF.irvnNrOFl.LCXjM8qqRk6CwLRtjYsuVVBby3LIRM15oLcPZc"}]},{"url":"http://atiqKdIcgcdciNqJELLbebsHu.fwdijwlzUO6GliE,00NIKH18ukk+V4NymKPZckn7l5O6k11fQrKB8n5Vb+mpAhl2wTFMBCgvADfq4Zc","type":"webrtc","status":"closed","devices":[{"url":"https://xRQUlPQYzvcrakgdzTVIoAQnrb.cyxAtoN-TSrnv6gA9TAoimb+KfzslNXC1ACXLVvqZIqVxD.P8LQJdN"},{"url":"http://MfAlOZEDr.xesp,LQpxWsZb8hsnLtIMgHDzuy6CyZ-W"}]},{"url":"https://XIuyclfuimxfXPeEGIcDKNBA.wrysIrNUAtAOOLUIm,fyivTctJF4d6-P,PhOVokkT8DEl6H6E2wz8YGx5MVOsinjF","type":"local","status":"connecting","devices":[{"url":"https://iVljKwCoObDTwhQ.bqUTYErE,1ovLOXv-jv-Hfn3vfTb.VBpjQyEkuotIBsl8I-"},{"url":"https://iqxBcnpgrxqNks.xioyynXEHn4le2aIxURnGf7yU-xVT6GfYt6NCgSZxHT0zxLPX-wffwgvDZS7iTm"}]},{"url":"http://lQxLOheIR.wrdcGhkFofSBB0DjYRoxbhHZ5f90YT0TH7T1xRRWXeySaSQyoNjrk","type":"local","status":"new","devices":[{"url":"https://xEFDGdwGuJuQsUVJQSMlTBYiLwEMDPPbX.kpwat2zO6VQ0mUKSU6A5fLr-HwK90DYD31JE1dPz.MguVngRXo7TKyOBic7zw"},{"url":"http://FeNTUUJUyfAngKomi.jabuY-i"}]}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_peerconnections(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_peerconnections(url=full_url, **parameters) @@ -3445,217 +2916,180 @@ async def test_create_peerconnection(aioresponses: aioresponses): request = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - parameter_list = [{"closedUrl": "test_string", "statusChangedUrl": "test_string", }, { - "statusChangedUrl": "test_string", }, {"closedUrl": "test_string", }, {}, ] + parameter_list = [{"closedUrl": "test_string", "statusChangedUrl": "test_string", }, {"statusChangedUrl": "test_string", }, {"closedUrl": "test_string", }, {}, ] for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_peerconnection(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_peerconnection(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_peerconnection(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_peerconnection(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_peerconnection(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_peerconnection(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_peerconnection(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_peerconnection(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_peerconnection(url=full_url, body=request, **parameters) @@ -3671,132 +3105,111 @@ async def test_get_peerconnection(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_peerconnection(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_peerconnection(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"http://ZnmCaDwDZcwqHW.cgeHADwo0CkibZIG1zc","type":"local","status":"connected","devices":[{"url":"https://PEGrHOLQYcccMVdb.ipnlkFEXbKcWazfSNQFoKDjJ5Ws3N0-ygToGFAyhL6t9Z5kPfg7rqUCoSY9L","config":{"services":[{"serviceType":"https://iGIrSTp.bzworHEa0","serviceId":"aliqua cillum Excepteur laboris esse","remoteServiceId":"in sint"},{"serviceType":"https://VoymRVmLubggNTTFPrug.zoAJXL-VfGPB8uHe-rwssK91gVYcJBKz1u2ReUC52p","serviceId":"consectetur sint Excepteur sunt officia","remoteServiceId":"culpa non proident"},{"serviceType":"https://haJUSAKEUERVbgfpmAHvoyuJDCtqOvZw.rysHf3v3Sqbin-tFAcXUejgpwy1jEljshsePGHbXgNYg-P,D.CWrQTQavnZgMBdsEacpA5bS8OD9L,GQ0rD+I.sa","serviceId":"amet","remoteServiceId":"irure"},{"serviceType":"https://kzvRkiTrnnGqTPmFzc.mlBzYqtNIei+1Pp+.8HjiW5N3heOD,Lv.tk4ah-ULS.","serviceId":"dolor ad","remoteServiceId":"velit consectetur"},{"serviceType":"http://bumUiBhZlPqOdNyDAmecElfIp.faR5vf+JE96JSPBwTwNqDS4dyVolmK9RkXqa6mu8U","serviceId":"magna consequat dolore consectetur in","remoteServiceId":"Duis pariatur"}]}},{"url":"http://RCC.xnh9RqBp21NezRSBM9qBu.lYZ","config":{"services":[{"serviceType":"http://GkobAvGdWTGUkFMlsAQgzOS.cfhbmzyMaodW1PTYPnB1pv","serviceId":"amet pariatur","remoteServiceId":"ad aliquip culpa id ut"},{"serviceType":"https://olefbn.bhqYmlvv4LeXDAigedv5j9pFsXJ2AQHHqoo9BnjSZ4zbNN4iFgQi","serviceId":"eiusmod cillum consectetur","remoteServiceId":"nulla ullamco aliquip"},{"serviceType":"http://JWF.gmkADnB5hEoPtbJZPzYqcGada,dKkcp-nkfRmFXI529EIS.","serviceId":"aliquip cillum do fugiat","remoteServiceId":"Lorem"},{"serviceType":"https://CdFNRIuYfRAkxzvWuWSeiLlq.wsGakGAtuwXmkNAFqseNQ49Q1jy70afvQcAKID","serviceId":"nisi in dolore culpa","remoteServiceId":"dolore aliqua"},{"serviceType":"http://NtCgOQPenFkFCpBSmQvIWRbNaPEA.fwrX2H+Kg7fZBauVS5IwTMWpfJd8zw2Edu8azpFu-xukP+lJZgqPOaFf.gxISeK-","serviceId":"incididunt deserunt reprehenderit dolore non","remoteServiceId":"pariatur"}]}}]}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_peerconnection(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_peerconnection(url=full_url, **parameters) @@ -3811,142 +3224,121 @@ async def test_delete_peerconnection(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=202) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202) async with APIClient(BASE_URL) as client: resp = await client.delete_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=202) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202) async with APIClient(BASE_URL) as client: resp = await client.delete_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=202) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202) async with APIClient(BASE_URL) as client: resp = await client.delete_peerconnection(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_peerconnection(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_peerconnection(url=full_url, **parameters) @@ -3963,124 +3355,106 @@ async def test_patch_peerconnection_device_status(aioresponses: aioresponses): parameter_list = [{"device_url": "test_string", }, ] for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.patch_peerconnection_device_status(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.patch_peerconnection_device_status(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.patch_peerconnection_device_status(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.patch_peerconnection_device_status(url=full_url, body=request, **parameters) @@ -4095,181 +3469,149 @@ async def test_list_experiments(aioresponses: aioresponses): parameter_list = [{"experimentStatus": "test_string", }, {}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"http://NwclrXAIoAJHMVyKoIoS.xxfoad9OtNWxMyq2kGx5D4","status":"created"},{"url":"https://gpvQwLgrWBBvxozT.rdbpyyMAR8WSBkoXtkDeX7BysNkrZe.8SlFVwdKIGbmewpJjeU0ayCar6q74SqFK8vAvqSrmK1BfSqgJCQPcF","status":"created"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"http://NwclrXAIoAJHMVyKoIoS.xxfoad9OtNWxMyq2kGx5D4","status":"created"},{"url":"https://gpvQwLgrWBBvxozT.rdbpyyMAR8WSBkoXtkDeX7BysNkrZe.8SlFVwdKIGbmewpJjeU0ayCar6q74SqFK8vAvqSrmK1BfSqgJCQPcF","status":"created"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_experiments(**parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"http://NwclrXAIoAJHMVyKoIoS.xxfoad9OtNWxMyq2kGx5D4","status":"created"},{"url":"https://gpvQwLgrWBBvxozT.rdbpyyMAR8WSBkoXtkDeX7BysNkrZe.8SlFVwdKIGbmewpJjeU0ayCar6q74SqFK8vAvqSrmK1BfSqgJCQPcF","status":"created"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"http://NwclrXAIoAJHMVyKoIoS.xxfoad9OtNWxMyq2kGx5D4","status":"created"},{"url":"https://gpvQwLgrWBBvxozT.rdbpyyMAR8WSBkoXtkDeX7BysNkrZe.8SlFVwdKIGbmewpJjeU0ayCar6q74SqFK8vAvqSrmK1BfSqgJCQPcF","status":"created"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_experiments(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"http://NwclrXAIoAJHMVyKoIoS.xxfoad9OtNWxMyq2kGx5D4","status":"created"},{"url":"https://gpvQwLgrWBBvxozT.rdbpyyMAR8WSBkoXtkDeX7BysNkrZe.8SlFVwdKIGbmewpJjeU0ayCar6q74SqFK8vAvqSrmK1BfSqgJCQPcF","status":"created"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"http://NwclrXAIoAJHMVyKoIoS.xxfoad9OtNWxMyq2kGx5D4","status":"created"},{"url":"https://gpvQwLgrWBBvxozT.rdbpyyMAR8WSBkoXtkDeX7BysNkrZe.8SlFVwdKIGbmewpJjeU0ayCar6q74SqFK8vAvqSrmK1BfSqgJCQPcF","status":"created"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_experiments(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"http://NwclrXAIoAJHMVyKoIoS.xxfoad9OtNWxMyq2kGx5D4","status":"created"},{"url":"https://gpvQwLgrWBBvxozT.rdbpyyMAR8WSBkoXtkDeX7BysNkrZe.8SlFVwdKIGbmewpJjeU0ayCar6q74SqFK8vAvqSrmK1BfSqgJCQPcF","status":"created"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"http://NwclrXAIoAJHMVyKoIoS.xxfoad9OtNWxMyq2kGx5D4","status":"created"},{"url":"https://gpvQwLgrWBBvxozT.rdbpyyMAR8WSBkoXtkDeX7BysNkrZe.8SlFVwdKIGbmewpJjeU0ayCar6q74SqFK8vAvqSrmK1BfSqgJCQPcF","status":"created"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_experiments(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_experiments(url=full_url, **parameters) @@ -4287,212 +3629,176 @@ async def test_create_experiment(aioresponses: aioresponses): for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_experiment(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_experiment(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_experiment(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_experiment(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_experiment(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_experiment(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_experiment(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_experiment(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_experiment(url=full_url, body=request, **parameters) @@ -4508,132 +3814,111 @@ async def test_get_experiment(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_experiment(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_experiment(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_experiment(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_experiment(url=full_url, **parameters) @@ -4651,159 +3936,132 @@ async def test_update_experiment(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_experiment(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_experiment(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_experiment(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=202, payload=response_202_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.update_experiment(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=202, payload=response_202_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.update_experiment(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"http://sDsoOPRmkjI.fantp2-m6xNh1nbnRinYaY0StC.h8DVQ.HHlxgx8vbhcX7PGf4cDTebrE+MzJDU7O8tcZM","status":"finished","devices":[{"device":"http://XCSbVyX.blmlfg.yeMXbXPUXYN1sQ5J,V-l8yup-sQREU7Sl7CbxmawUZedWb0geUJsAEa","role":"enim Lorem eu Duis do"},{"device":"https://iwFlKRRwCqApZzrf.qoWRZdL,qLMoXL6WuVWyUg2zunyNJ5F","role":"tempor nulla"}],"roles":[{"name":"cillum culpa ad sed"},{"name":"eiusmod sunt ea sit"},{"name":"Lorem qui adipisicing pariatur","description":"aliquip adipisicing sit sint"},{"name":"aute eiusmod Duis qui officia"}],"serviceConfigurations":[{"serviceType":"https://eWogvyvrSzzkIVVzOeFDwkpWq.rcwyaHlTdACsCVArlrxltHGGplQEA-","participants":[{"role":"enim fugiat esse proident et","serviceId":"ad commodo esse exercitation"},{"role":"ea","serviceId":"eiusmod velit amet nisi ut"},{"role":"cupidatat proident laborum"},{"serviceId":"velit fugiat tempor officia deserunt","role":"laboris officia"}]}],"connections":["https://ByEhVICZNH.vkGHCVd1C0,fcvmuWSm6vS.3lTtzqv.ZQozV2dUvu"],"instantiatedDevices":[{"codeUrl":"https://LmeHCXSiRBoBpb.gpcdSUeIPMY3MNujB7qsa2ej4Rfuof","url":"https://dJrEFfM.esqiFDScB-quK6T","token":"culpa aute dolor","instanceOf":"https://wSsZqjtJZQORyVs.razHf8fAyahkFEXskHi4Z.n68iE7Wj3PzL+"},{"codeUrl":"http://QyCMnENVZCazMcVWnfbJRuipADOHFF.unFEX,+SQXRNgybZ6sqmow16LocOv+ORofQHAjfgBZGZ2BNJJF0,MEdxqjLbvnsK1RFGUtCvu","url":"https://OasRsrJ.eue,yoVQnpztVBcEakrMXt6DZxJ3gMQfezWUqhCs,Beuor4tVe-R","token":"irure","instanceOf":"http://ZrANaqicWqDeQVXiyFNLygHEmJ.lhxunzZohWBR,P4WsOhN"},{"codeUrl":"http://tqGvzZRYMnIpbEq.dfd3KzGqEbY7nGET,MIRa,4yA9Jcvp+w4JsvUVV5Xf6B3mbGN2EtFOIoUmRpQEcmPtprjPGoyDlfMa9","url":"http://aFiFOpAtCIkycbkjwlVufjwyFlIuq.yzmoDagHx,g+A","token":"velit est reprehenderit ullamco","instanceOf":"https://ABbqtDNNWcsjDbqMTUpcvchBr.ozkamzZi.YFMOM8uWkr6imPBIZZg6zpuN3WE+y"}],"bookingTime":{"startTime":"1966-10-04T13:42:57.0Z","endTime":"2014-06-20T19:58:45.0Z"}}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=202, payload=response_202_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.update_experiment(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_experiment(url=full_url, body=request, **parameters) @@ -4818,124 +4076,106 @@ async def test_delete_experiment(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_experiment(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_experiment(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_experiment(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_experiment(url=full_url, **parameters) @@ -4951,176 +4191,148 @@ async def test_list_template(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"https://dEnPTTaJuYsWuMSMJ.hzcOi3Oby3vCu6b5UG8s5jenJOlkxf","name":"amet","description":"cillum officia proident"},{"url":"https://Kc.qubPO,JL1ZSXkeu9GvR4G8l9s7.HDOqrfh,gvdfPn-MUBCBIBFXnev","name":"Excepteur incididunt pariatur non amet","description":"non id amet"},{"url":"http://InEoUuVomSJSUzLltNkjhcfmMepfy.hnYp2p-Uqd41mMSc-,4agJLIBuf0N9VKHHI+j2pfzB.+Sk7GMggGRkhVufnMtivMY","name":"laboris anim tempor"},{"url":"http://qCDKcSdOGBnYCFuiiuwNE.srsuitsZr1jRDYBu4jlPBJQQUBDp26Fih3xmsTxdzMJv","name":"non","description":"sit cillum qui"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_template(**parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"https://dEnPTTaJuYsWuMSMJ.hzcOi3Oby3vCu6b5UG8s5jenJOlkxf","name":"amet","description":"cillum officia proident"},{"url":"https://Kc.qubPO,JL1ZSXkeu9GvR4G8l9s7.HDOqrfh,gvdfPn-MUBCBIBFXnev","name":"Excepteur incididunt pariatur non amet","description":"non id amet"},{"url":"http://InEoUuVomSJSUzLltNkjhcfmMepfy.hnYp2p-Uqd41mMSc-,4agJLIBuf0N9VKHHI+j2pfzB.+Sk7GMggGRkhVufnMtivMY","name":"laboris anim tempor"},{"url":"http://qCDKcSdOGBnYCFuiiuwNE.srsuitsZr1jRDYBu4jlPBJQQUBDp26Fih3xmsTxdzMJv","name":"non","description":"sit cillum qui"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_template(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"https://dEnPTTaJuYsWuMSMJ.hzcOi3Oby3vCu6b5UG8s5jenJOlkxf","name":"amet","description":"cillum officia proident"},{"url":"https://Kc.qubPO,JL1ZSXkeu9GvR4G8l9s7.HDOqrfh,gvdfPn-MUBCBIBFXnev","name":"Excepteur incididunt pariatur non amet","description":"non id amet"},{"url":"http://InEoUuVomSJSUzLltNkjhcfmMepfy.hnYp2p-Uqd41mMSc-,4agJLIBuf0N9VKHHI+j2pfzB.+Sk7GMggGRkhVufnMtivMY","name":"laboris anim tempor"},{"url":"http://qCDKcSdOGBnYCFuiiuwNE.srsuitsZr1jRDYBu4jlPBJQQUBDp26Fih3xmsTxdzMJv","name":"non","description":"sit cillum qui"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_template(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"url":"https://dEnPTTaJuYsWuMSMJ.hzcOi3Oby3vCu6b5UG8s5jenJOlkxf","name":"amet","description":"cillum officia proident"},{"url":"https://Kc.qubPO,JL1ZSXkeu9GvR4G8l9s7.HDOqrfh,gvdfPn-MUBCBIBFXnev","name":"Excepteur incididunt pariatur non amet","description":"non id amet"},{"url":"http://InEoUuVomSJSUzLltNkjhcfmMepfy.hnYp2p-Uqd41mMSc-,4agJLIBuf0N9VKHHI+j2pfzB.+Sk7GMggGRkhVufnMtivMY","name":"laboris anim tempor"},{"url":"http://qCDKcSdOGBnYCFuiiuwNE.srsuitsZr1jRDYBu4jlPBJQQUBDp26Fih3xmsTxdzMJv","name":"non","description":"sit cillum qui"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_template(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_template(url=full_url, **parameters) @@ -5138,212 +4350,176 @@ async def test_create_template(aioresponses: aioresponses): for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_template(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_template(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_template(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_template(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_template(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_template(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_template(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=202, payload=response_202_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.create_template(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_template(url=full_url, body=request, **parameters) @@ -5359,132 +4535,111 @@ async def test_get_template(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_template(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_template(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_template(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_template(url=full_url, **parameters) @@ -5502,159 +4657,132 @@ async def test_update_template(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_template(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_template(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_template(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=202, payload=response_202_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.update_template(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=202, payload=response_202_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.update_template(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: response_202_dict = json.loads(r'{"url":"https://JSuXHAumyAeyFukMkfiyRDHDwU.xtqEVymni78ho8N0sJIk1SIx7EKNkXbNzTb-m2Xe","name":"in ut labore","configuration":{"devices":[{"device":"http://YcrwHnzlJbqvraJdPzskkpMAJ.lmknpOKwA76k","role":"in dolor"}],"roles":[{"name":"eiusmod est","description":"et dolor"}],"serviceConfigurations":[{"participants":[{"role":"ut cupidatat dolore","serviceId":"id reprehenderit dolor ut nulla"},{"role":"est","serviceId":"eu do magna consectetur ex"}],"serviceType":"https://w.dkhbdbztwqw3OP5q-nUFG3mE47ecnOztwA28qTxsoV7YnlGj"},{"serviceType":"http://kfLcbo.kpbseWMX+jtlWwpQK-zIT--o8x5y-B6Pb,WYRxi","participants":[{"serviceId":"eu id cupidatat voluptate laborum"}]},{"serviceType":"http://GqIOzEsKTsdPOuvbbmglqA.xdBikvJheG3+3saiSyZCbc+KdUxjgN3GR"},{"serviceType":"http://vHKHUZisVuOPjNtLXkxNjogAQ.mpqWznmMNn2K+qKQw","participants":[{"role":"culpa aliqua officia","serviceId":"tempor proident"},{"serviceId":"dolor pariatur","role":"ut eiusmod dolore"},{"role":"pariatur dolore Duis","serviceId":"culpa laboris nisi nostrud mollit"},{"role":"culpa","serviceId":"occaecat id"}]}]},"description":"exercitation Excepteur laborum ut laboris"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=202, payload=response_202_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=202, payload=response_202_dict) async with APIClient(BASE_URL) as client: resp = await client.update_template(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_202_dict) + assert normalize_result(resp) == normalize_result(response_202_dict) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_template(url=full_url, body=request, **parameters) @@ -5669,124 +4797,106 @@ async def test_delete_template(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_template(url=full_url, **parameters) @@ -5801,181 +4911,149 @@ async def test_list_institutions(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"velit ullamco","api":"https://OspHTToGIfAMsZZtpkYjoblfmZijZr.fvnzaLN9XLJ.l1g0uBjLN3g-+P8qUpSS2szVKv37SUuYc4mxJcKKTj.1DWBrTonGhQ","name":"velit","apiToken":"veniam consectetur dolor"},{"url":"aliquip labore laboris culpa"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"velit ullamco","api":"https://OspHTToGIfAMsZZtpkYjoblfmZijZr.fvnzaLN9XLJ.l1g0uBjLN3g-+P8qUpSS2szVKv37SUuYc4mxJcKKTj.1DWBrTonGhQ","name":"velit","apiToken":"veniam consectetur dolor"},{"url":"aliquip labore laboris culpa"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_institutions(**parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"velit ullamco","api":"https://OspHTToGIfAMsZZtpkYjoblfmZijZr.fvnzaLN9XLJ.l1g0uBjLN3g-+P8qUpSS2szVKv37SUuYc4mxJcKKTj.1DWBrTonGhQ","name":"velit","apiToken":"veniam consectetur dolor"},{"url":"aliquip labore laboris culpa"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"velit ullamco","api":"https://OspHTToGIfAMsZZtpkYjoblfmZijZr.fvnzaLN9XLJ.l1g0uBjLN3g-+P8qUpSS2szVKv37SUuYc4mxJcKKTj.1DWBrTonGhQ","name":"velit","apiToken":"veniam consectetur dolor"},{"url":"aliquip labore laboris culpa"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_institutions(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"velit ullamco","api":"https://OspHTToGIfAMsZZtpkYjoblfmZijZr.fvnzaLN9XLJ.l1g0uBjLN3g-+P8qUpSS2szVKv37SUuYc4mxJcKKTj.1DWBrTonGhQ","name":"velit","apiToken":"veniam consectetur dolor"},{"url":"aliquip labore laboris culpa"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"velit ullamco","api":"https://OspHTToGIfAMsZZtpkYjoblfmZijZr.fvnzaLN9XLJ.l1g0uBjLN3g-+P8qUpSS2szVKv37SUuYc4mxJcKKTj.1DWBrTonGhQ","name":"velit","apiToken":"veniam consectetur dolor"},{"url":"aliquip labore laboris culpa"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_institutions(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'[{"url":"velit ullamco","api":"https://OspHTToGIfAMsZZtpkYjoblfmZijZr.fvnzaLN9XLJ.l1g0uBjLN3g-+P8qUpSS2szVKv37SUuYc4mxJcKKTj.1DWBrTonGhQ","name":"velit","apiToken":"veniam consectetur dolor"},{"url":"aliquip labore laboris culpa"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'[{"url":"velit ullamco","api":"https://OspHTToGIfAMsZZtpkYjoblfmZijZr.fvnzaLN9XLJ.l1g0uBjLN3g-+P8qUpSS2szVKv37SUuYc4mxJcKKTj.1DWBrTonGhQ","name":"velit","apiToken":"veniam consectetur dolor"},{"url":"aliquip labore laboris culpa"}]') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_institutions(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_institutions(url=full_url, **parameters) @@ -5992,181 +5070,149 @@ async def test_create_institution(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_institution(body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_institution(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_institution(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - response_201_dict = json.loads( - r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + response_201_dict = json.loads(r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.create_institution(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.create_institution(url=full_url, body=request, **parameters) @@ -6181,136 +5227,112 @@ async def test_get_institution(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_institution(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_institution(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_institution(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_institution(url=full_url, **parameters) @@ -6327,136 +5349,112 @@ async def test_update_institution(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_institution(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_institution(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"url":"velit laborum veniam esse","name":"sit aute deserunt dolor laborum","homepage":"https://rLUUzVntQAYYuxFKofW.nsoW.sUJQUrn,eKn-An+bYSGB","api":"http://LTfWiqREaPgqMPvYgWDPM.nrtf+nU1HeZ,Oim7BUybJkQS.68OdFKFrFsscg,NXwpqHlYvGCbc,J7khIH16p2vB49epr8pAJQtzhj8j4nbH5k2","apiToken":"in"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_institution(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_institution(url=full_url, body=request, **parameters) @@ -6471,129 +5469,1383 @@ async def test_delete_institution(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_institution(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_institution(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_institution(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=403) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=404) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=500) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_institution(url=full_url, **parameters) +@pytest.mark.asyncio +async def test_schedule(aioresponses: aioresponses): + url = r'/schedule' + url_variant = r'schedule' + full_url = BASE_URL+r'/schedule' + + request = json.loads(r'{"Experiment":{"Devices":[{"ID":"https://eoKzcaLEO.jigrLrN,QtmSeOrwdDkjY4"},{"ID":"https://dJaL.omM0GRYOmeEyMOG8,lOwfYgxMRtEfPZWHiX,HISaF0nFZxn37U4ILuINMGozBLrh.aOLN8uc6"}],"Description":"in dolore pariatur ut"},"Time":{"Start":"1981-06-10T04:14:08.0Z","End":"1951-06-17T02:47:39.0Z"}}') + + parameter_list = [{}, ] + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Device":"deserunt","Booked":[{"Start":"1948-05-28T02:28:12.0Z","End":"2011-12-30T01:38:02.0Z"},{"Start":"1985-12-18T10:09:01.0Z","End":"1978-01-18T18:32:01.0Z"}],"Free":[{"Start":"1961-12-22T19:04:41.0Z","End":"2001-11-27T06:05:08.0Z"},{"Start":"2012-02-02T16:18:57.0Z","End":"1966-03-15T22:35:31.0Z"},{"Start":"1982-08-02T04:58:59.0Z","End":"1994-05-06T05:04:50.0Z"},{"Start":"2008-12-26T17:21:24.0Z","End":"1983-12-05T17:38:55.0Z"}]},{"Device":"voluptate sed","Booked":[{"Start":"2013-11-17T05:48:45.0Z","End":"1998-12-07T01:30:34.0Z"},{"Start":"1984-09-11T04:11:16.0Z","End":"1970-10-28T01:19:38.0Z"},{"Start":"1958-04-10T07:56:51.0Z","End":"1960-07-18T04:47:46.0Z"}],"Free":[{"Start":"1982-08-29T04:12:21.0Z","End":"1968-11-30T13:07:01.0Z"}]},{"Device":"irure laboris consequat minim","Booked":[{"Start":"2010-02-25T04:35:02.0Z","End":"1959-09-10T01:34:53.0Z"}],"Free":[{"Start":"2001-04-09T22:29:19.0Z","End":"2005-06-04T08:28:39.0Z"},{"Start":"1979-01-07T05:35:26.0Z","End":"2019-06-10T21:57:56.0Z"},{"Start":"1971-01-18T04:03:03.0Z","End":"1960-05-19T05:07:48.0Z"}]},{"Device":"est et","Booked":[{"Start":"1969-01-26T21:55:52.0Z","End":"2014-09-15T10:37:51.0Z"},{"Start":"1976-11-11T14:44:42.0Z","End":"2013-12-15T19:03:32.0Z"}],"Free":[{"Start":"1963-05-16T13:25:55.0Z","End":"2011-06-21T19:03:17.0Z"},{"Start":"1944-05-29T20:44:47.0Z","End":"1962-03-04T14:52:27.0Z"},{"Start":"1977-04-02T14:22:19.0Z","End":"2011-07-11T16:07:14.0Z"}]}]') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.schedule(body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Device":"deserunt","Booked":[{"Start":"1948-05-28T02:28:12.0Z","End":"2011-12-30T01:38:02.0Z"},{"Start":"1985-12-18T10:09:01.0Z","End":"1978-01-18T18:32:01.0Z"}],"Free":[{"Start":"1961-12-22T19:04:41.0Z","End":"2001-11-27T06:05:08.0Z"},{"Start":"2012-02-02T16:18:57.0Z","End":"1966-03-15T22:35:31.0Z"},{"Start":"1982-08-02T04:58:59.0Z","End":"1994-05-06T05:04:50.0Z"},{"Start":"2008-12-26T17:21:24.0Z","End":"1983-12-05T17:38:55.0Z"}]},{"Device":"voluptate sed","Booked":[{"Start":"2013-11-17T05:48:45.0Z","End":"1998-12-07T01:30:34.0Z"},{"Start":"1984-09-11T04:11:16.0Z","End":"1970-10-28T01:19:38.0Z"},{"Start":"1958-04-10T07:56:51.0Z","End":"1960-07-18T04:47:46.0Z"}],"Free":[{"Start":"1982-08-29T04:12:21.0Z","End":"1968-11-30T13:07:01.0Z"}]},{"Device":"irure laboris consequat minim","Booked":[{"Start":"2010-02-25T04:35:02.0Z","End":"1959-09-10T01:34:53.0Z"}],"Free":[{"Start":"2001-04-09T22:29:19.0Z","End":"2005-06-04T08:28:39.0Z"},{"Start":"1979-01-07T05:35:26.0Z","End":"2019-06-10T21:57:56.0Z"},{"Start":"1971-01-18T04:03:03.0Z","End":"1960-05-19T05:07:48.0Z"}]},{"Device":"est et","Booked":[{"Start":"1969-01-26T21:55:52.0Z","End":"2014-09-15T10:37:51.0Z"},{"Start":"1976-11-11T14:44:42.0Z","End":"2013-12-15T19:03:32.0Z"}],"Free":[{"Start":"1963-05-16T13:25:55.0Z","End":"2011-06-21T19:03:17.0Z"},{"Start":"1944-05-29T20:44:47.0Z","End":"1962-03-04T14:52:27.0Z"},{"Start":"1977-04-02T14:22:19.0Z","End":"2011-07-11T16:07:14.0Z"}]}]') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.schedule(url=url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Device":"deserunt","Booked":[{"Start":"1948-05-28T02:28:12.0Z","End":"2011-12-30T01:38:02.0Z"},{"Start":"1985-12-18T10:09:01.0Z","End":"1978-01-18T18:32:01.0Z"}],"Free":[{"Start":"1961-12-22T19:04:41.0Z","End":"2001-11-27T06:05:08.0Z"},{"Start":"2012-02-02T16:18:57.0Z","End":"1966-03-15T22:35:31.0Z"},{"Start":"1982-08-02T04:58:59.0Z","End":"1994-05-06T05:04:50.0Z"},{"Start":"2008-12-26T17:21:24.0Z","End":"1983-12-05T17:38:55.0Z"}]},{"Device":"voluptate sed","Booked":[{"Start":"2013-11-17T05:48:45.0Z","End":"1998-12-07T01:30:34.0Z"},{"Start":"1984-09-11T04:11:16.0Z","End":"1970-10-28T01:19:38.0Z"},{"Start":"1958-04-10T07:56:51.0Z","End":"1960-07-18T04:47:46.0Z"}],"Free":[{"Start":"1982-08-29T04:12:21.0Z","End":"1968-11-30T13:07:01.0Z"}]},{"Device":"irure laboris consequat minim","Booked":[{"Start":"2010-02-25T04:35:02.0Z","End":"1959-09-10T01:34:53.0Z"}],"Free":[{"Start":"2001-04-09T22:29:19.0Z","End":"2005-06-04T08:28:39.0Z"},{"Start":"1979-01-07T05:35:26.0Z","End":"2019-06-10T21:57:56.0Z"},{"Start":"1971-01-18T04:03:03.0Z","End":"1960-05-19T05:07:48.0Z"}]},{"Device":"est et","Booked":[{"Start":"1969-01-26T21:55:52.0Z","End":"2014-09-15T10:37:51.0Z"},{"Start":"1976-11-11T14:44:42.0Z","End":"2013-12-15T19:03:32.0Z"}],"Free":[{"Start":"1963-05-16T13:25:55.0Z","End":"2011-06-21T19:03:17.0Z"},{"Start":"1944-05-29T20:44:47.0Z","End":"1962-03-04T14:52:27.0Z"},{"Start":"1977-04-02T14:22:19.0Z","End":"2011-07-11T16:07:14.0Z"}]}]') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.schedule(url=url_variant, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Device":"deserunt","Booked":[{"Start":"1948-05-28T02:28:12.0Z","End":"2011-12-30T01:38:02.0Z"},{"Start":"1985-12-18T10:09:01.0Z","End":"1978-01-18T18:32:01.0Z"}],"Free":[{"Start":"1961-12-22T19:04:41.0Z","End":"2001-11-27T06:05:08.0Z"},{"Start":"2012-02-02T16:18:57.0Z","End":"1966-03-15T22:35:31.0Z"},{"Start":"1982-08-02T04:58:59.0Z","End":"1994-05-06T05:04:50.0Z"},{"Start":"2008-12-26T17:21:24.0Z","End":"1983-12-05T17:38:55.0Z"}]},{"Device":"voluptate sed","Booked":[{"Start":"2013-11-17T05:48:45.0Z","End":"1998-12-07T01:30:34.0Z"},{"Start":"1984-09-11T04:11:16.0Z","End":"1970-10-28T01:19:38.0Z"},{"Start":"1958-04-10T07:56:51.0Z","End":"1960-07-18T04:47:46.0Z"}],"Free":[{"Start":"1982-08-29T04:12:21.0Z","End":"1968-11-30T13:07:01.0Z"}]},{"Device":"irure laboris consequat minim","Booked":[{"Start":"2010-02-25T04:35:02.0Z","End":"1959-09-10T01:34:53.0Z"}],"Free":[{"Start":"2001-04-09T22:29:19.0Z","End":"2005-06-04T08:28:39.0Z"},{"Start":"1979-01-07T05:35:26.0Z","End":"2019-06-10T21:57:56.0Z"},{"Start":"1971-01-18T04:03:03.0Z","End":"1960-05-19T05:07:48.0Z"}]},{"Device":"est et","Booked":[{"Start":"1969-01-26T21:55:52.0Z","End":"2014-09-15T10:37:51.0Z"},{"Start":"1976-11-11T14:44:42.0Z","End":"2013-12-15T19:03:32.0Z"}],"Free":[{"Start":"1963-05-16T13:25:55.0Z","End":"2011-06-21T19:03:17.0Z"},{"Start":"1944-05-29T20:44:47.0Z","End":"1962-03-04T14:52:27.0Z"},{"Start":"1977-04-02T14:22:19.0Z","End":"2011-07-11T16:07:14.0Z"}]}]') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.schedule(url=full_url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + response_404_dict = json.loads(r'"commodo in"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404, payload=response_404_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + response_404_dict = json.loads(r'"commodo in"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404, payload=response_404_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_404_dict = json.loads(r'"commodo in"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404, payload=response_404_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_404_dict = json.loads(r'"commodo in"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404, payload=response_404_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + response_422_dict = json.loads(r'"mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=422, payload=response_422_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + response_422_dict = json.loads(r'"mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=422, payload=response_422_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_422_dict = json.loads(r'"mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=422, payload=response_422_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_422_dict = json.loads(r'"mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=422, payload=response_422_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.schedule(url=full_url, body=request, **parameters) + + +@pytest.mark.asyncio +async def test_newBooking(aioresponses: aioresponses): + url = r'/booking' + url_variant = r'booking' + full_url = BASE_URL+r'/booking' + + request = json.loads(r'{"Devices":[{"ID":"https://oCCTTNStvcBbcmLKslaSMmqVGx.auzBY3BJWu8x-QporrHYcC9bqsef8NDutN5ohOWawZbhZ8r"},{"ID":"http://fxAFgbruxuEEUzmlpkQyPQjTvbNrEUlw.dbgFCsvm,LZ+kIzgghTNqyNTtrGAlQq2MjmMn1grGk2ZkZRGoZxQ+A0N"}],"Time":{"Start":"1957-06-19T20:42:50.0Z","End":"2017-12-16T17:13:02.0Z"},"Type":"normal"}') + + parameter_list = [{}, ] + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"https://zurWHxnuNekdQetiawWc.uncovYoMyvENFntDMplEsNtcFgBUP17FfZ2Wkcx1SeQnu+iggAOfJGk"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.newBooking(body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"https://zurWHxnuNekdQetiawWc.uncovYoMyvENFntDMplEsNtcFgBUP17FfZ2Wkcx1SeQnu+iggAOfJGk"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.newBooking(url=url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"https://zurWHxnuNekdQetiawWc.uncovYoMyvENFntDMplEsNtcFgBUP17FfZ2Wkcx1SeQnu+iggAOfJGk"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.newBooking(url=url_variant, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"https://zurWHxnuNekdQetiawWc.uncovYoMyvENFntDMplEsNtcFgBUP17FfZ2Wkcx1SeQnu+iggAOfJGk"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.newBooking(url=full_url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ea mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ea mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ea mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ea mollit"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.newBooking(url=full_url, body=request, **parameters) + + +@pytest.mark.asyncio +async def test_updateBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + + request = json.loads(r'{"Locked":true,"Devices":[{"ID":"http://k.wgaOIBHxZfiNzV7AkaVuQ1UvsgVbtXmOHr3UacIqwT3BazSLm68y1Js"},{"ID":"https://ohlnuiclAHELGBqVjSlJNnwurIJTY.dfpkNwARhVGSLnPEP8jC7LYUNTZu-+lz9F5bZHXYqjq"}]}') + + parameter_list = [{}, ] + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"http://akJjTPgNsQCcPFMaZe.zlmvloXia0bqBjdT1Rfy3PSFGpCVkgqoAa9GgiZHg4r"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.updateBooking(url=url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"http://akJjTPgNsQCcPFMaZe.zlmvloXia0bqBjdT1Rfy3PSFGpCVkgqoAa9GgiZHg4r"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"BookingID":"http://akJjTPgNsQCcPFMaZe.zlmvloXia0bqBjdT1Rfy3PSFGpCVkgqoAa9GgiZHg4r"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.updateBooking(url=full_url, body=request, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_400_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400, payload=response_400_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_400_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400, payload=response_400_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_400_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400, payload=response_400_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.updateBooking(url=full_url, body=request, **parameters) + + +@pytest.mark.asyncio +async def test_deleteBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + + parameter_list = [{}, ] + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.deleteBooking(url=full_url, **parameters) + + +@pytest.mark.asyncio +async def test_getBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + + parameter_list = [{}, ] + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"Booking":{"ID":"https://qhQkiiruUxtUtbGmjaXwNC.neZld0VWn5OHMWi2rZ8oi-sv2W7RJlGiu6E4TtMQzwHyNISGmkg+CY2OCvHTxFBaYGO0u","Time":{"Start":"1964-12-11T17:12:39.0Z","End":"1983-03-23T22:36:39.0Z"},"Devices":["https://MSoPGR.qbojgUH2Y+tqKvMJEQorqAvvxtqCXZthUzmwJuZ-2MkJyv5WEWtPYwH9n,F","http://dvGWLhbJbQJ.ejdS","https://gVgJcnupaGdLWloiORp.eroxDq3cPowUmAwFkPcgEW,oivqBNl1+MGJFwwoJyw,Hn","http://ySSHqBm.dwyCPbuiqQ0Xmz-.4"],"Status":"rejected","You":false,"External":false,"Message":"adipisicing ad id pariatur nulla","Type":"normal"},"Locked":false}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.getBooking(url=url, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"Booking":{"ID":"https://qhQkiiruUxtUtbGmjaXwNC.neZld0VWn5OHMWi2rZ8oi-sv2W7RJlGiu6E4TtMQzwHyNISGmkg+CY2OCvHTxFBaYGO0u","Time":{"Start":"1964-12-11T17:12:39.0Z","End":"1983-03-23T22:36:39.0Z"},"Devices":["https://MSoPGR.qbojgUH2Y+tqKvMJEQorqAvvxtqCXZthUzmwJuZ-2MkJyv5WEWtPYwH9n,F","http://dvGWLhbJbQJ.ejdS","https://gVgJcnupaGdLWloiORp.eroxDq3cPowUmAwFkPcgEW,oivqBNl1+MGJFwwoJyw,Hn","http://ySSHqBm.dwyCPbuiqQ0Xmz-.4"],"Status":"rejected","You":false,"External":false,"Message":"adipisicing ad id pariatur nulla","Type":"normal"},"Locked":false}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.getBooking(url=url_variant, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'{"Booking":{"ID":"https://qhQkiiruUxtUtbGmjaXwNC.neZld0VWn5OHMWi2rZ8oi-sv2W7RJlGiu6E4TtMQzwHyNISGmkg+CY2OCvHTxFBaYGO0u","Time":{"Start":"1964-12-11T17:12:39.0Z","End":"1983-03-23T22:36:39.0Z"},"Devices":["https://MSoPGR.qbojgUH2Y+tqKvMJEQorqAvvxtqCXZthUzmwJuZ-2MkJyv5WEWtPYwH9n,F","http://dvGWLhbJbQJ.ejdS","https://gVgJcnupaGdLWloiORp.eroxDq3cPowUmAwFkPcgEW,oivqBNl1+MGJFwwoJyw,Hn","http://ySSHqBm.dwyCPbuiqQ0Xmz-.4"],"Status":"rejected","You":false,"External":false,"Message":"adipisicing ad id pariatur nulla","Type":"normal"},"Locked":false}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.getBooking(url=full_url, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"elit commodo minim eu"') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"elit commodo minim eu"') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"elit commodo minim eu"') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.getBooking(url=full_url, **parameters) + + +@pytest.mark.asyncio +async def test_destroyBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/destroy' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/destroy' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/destroy' + + parameter_list = [{}, ] + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=423) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"ad fugiat"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.destroyBooking(url=full_url, **parameters) + + +@pytest.mark.asyncio +async def test_lockBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + + parameter_list = [{}, ] + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Requested":"http://yiRyQY.upcxSE+-Dt+yeL","Selected":"https://aEfpYLsPzTiKHUjDdaZqyoDJwdYyi.rfmpCGiIatB7d6ON,0Wr2XkcBvhL3t6nyVirx8SDzb"},{"Requested":"https://toVVoQmUnSXuahwfeTRxpNnDE.yug7Zz9nBIdQhW2GZYygo31sewyh.G","Selected":"https://XQIUSphplmT.pubUJoCRaU9etAf0uivpRC0jsje"},{"Requested":"http://Kvsu.pyqaRVJ1uwJ8xaFz1uG4rpgnZCX9zyfTcIwWdiBhXpoISjdduhUDF7E.vDe","Selected":"https://zNdrBJZQW.dqqlUM1nRzvtbRxn7+Fb6zHE3eCJCd,5rMpCPM3tut64+SnKGZIOayPKVhIItvniaBYx5zat7b"},{"Requested":"https://fdZmspjHNxJbzMQYgWwCJpuojNSkAVlOa.ngfhBC3TgaCQn-pN,xiJngw3PjoMMmYluRriS33e","Selected":"https://VhHcokmycuzIDimdpNZcNDEwblRDme.fdciB9nT,qyP8szCg9nMT2EnE-lfj7LQEbLZ0owZ7Q,WJbT"},{"Requested":"https://JzNxIalMPxPXEijJi.uumgKo-dgJE","Selected":"https://tuN.faDII-kaqNvW"}]') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.lockBooking(url=url, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Requested":"http://yiRyQY.upcxSE+-Dt+yeL","Selected":"https://aEfpYLsPzTiKHUjDdaZqyoDJwdYyi.rfmpCGiIatB7d6ON,0Wr2XkcBvhL3t6nyVirx8SDzb"},{"Requested":"https://toVVoQmUnSXuahwfeTRxpNnDE.yug7Zz9nBIdQhW2GZYygo31sewyh.G","Selected":"https://XQIUSphplmT.pubUJoCRaU9etAf0uivpRC0jsje"},{"Requested":"http://Kvsu.pyqaRVJ1uwJ8xaFz1uG4rpgnZCX9zyfTcIwWdiBhXpoISjdduhUDF7E.vDe","Selected":"https://zNdrBJZQW.dqqlUM1nRzvtbRxn7+Fb6zHE3eCJCd,5rMpCPM3tut64+SnKGZIOayPKVhIItvniaBYx5zat7b"},{"Requested":"https://fdZmspjHNxJbzMQYgWwCJpuojNSkAVlOa.ngfhBC3TgaCQn-pN,xiJngw3PjoMMmYluRriS33e","Selected":"https://VhHcokmycuzIDimdpNZcNDEwblRDme.fdciB9nT,qyP8szCg9nMT2EnE-lfj7LQEbLZ0owZ7Q,WJbT"},{"Requested":"https://JzNxIalMPxPXEijJi.uumgKo-dgJE","Selected":"https://tuN.faDII-kaqNvW"}]') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.lockBooking(url=url_variant, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + response_200_dict = json.loads(r'[{"Requested":"http://yiRyQY.upcxSE+-Dt+yeL","Selected":"https://aEfpYLsPzTiKHUjDdaZqyoDJwdYyi.rfmpCGiIatB7d6ON,0Wr2XkcBvhL3t6nyVirx8SDzb"},{"Requested":"https://toVVoQmUnSXuahwfeTRxpNnDE.yug7Zz9nBIdQhW2GZYygo31sewyh.G","Selected":"https://XQIUSphplmT.pubUJoCRaU9etAf0uivpRC0jsje"},{"Requested":"http://Kvsu.pyqaRVJ1uwJ8xaFz1uG4rpgnZCX9zyfTcIwWdiBhXpoISjdduhUDF7E.vDe","Selected":"https://zNdrBJZQW.dqqlUM1nRzvtbRxn7+Fb6zHE3eCJCd,5rMpCPM3tut64+SnKGZIOayPKVhIItvniaBYx5zat7b"},{"Requested":"https://fdZmspjHNxJbzMQYgWwCJpuojNSkAVlOa.ngfhBC3TgaCQn-pN,xiJngw3PjoMMmYluRriS33e","Selected":"https://VhHcokmycuzIDimdpNZcNDEwblRDme.fdciB9nT,qyP8szCg9nMT2EnE-lfj7LQEbLZ0owZ7Q,WJbT"},{"Requested":"https://JzNxIalMPxPXEijJi.uumgKo-dgJE","Selected":"https://tuN.faDII-kaqNvW"}]') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) + async with APIClient(BASE_URL) as client: + resp = await client.lockBooking(url=full_url, **parameters) + assert normalize_result(resp) == normalize_result(response_200_dict) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"enim culpa"') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"enim culpa"') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"enim culpa"') + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.put(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.lockBooking(url=full_url, **parameters) + + +@pytest.mark.asyncio +async def test_unlockBooking(aioresponses: aioresponses): + url = r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + url_variant = r'booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + full_url = BASE_URL+r'/booking/c799cc2e-cdc5-4143-973a-6f56a5afa82c/lock' + + parameter_list = [{}, ] + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=403) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=412) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.unlockBooking(url=full_url, **parameters) + + +@pytest.mark.asyncio +async def test_bookingCallback(aioresponses: aioresponses): + url = r'/booking_callback/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + url_variant = r'booking_callback/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + full_url = BASE_URL+r'/booking_callback/c799cc2e-cdc5-4143-973a-6f56a5afa82c' + + parameter_list = [{}, ] + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.bookingCallback(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.bookingCallback(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200) + async with APIClient(BASE_URL) as client: + resp = await client.bookingCallback(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=404) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=full_url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url_variant, **parameters) + + for parameters in parameter_list: + response_500_dict = json.loads(r'"veniam ex eu"') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=500, payload=response_500_dict) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=full_url, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=url_variant, **parameters) + + for parameters in parameter_list: + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=503) + async with APIClient(BASE_URL) as client: + with pytest.raises(Exception): + resp = await client.bookingCallback(url=full_url, **parameters) + + @pytest.mark.asyncio async def test_list_platform(aioresponses: aioresponses): url = r'/lti/platform' @@ -6604,64 +6856,52 @@ async def test_list_platform(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"https://LkzZLxHUBtInyAGZVeLJqdfBoek.bvxstbiJTC3OsYQmTwBHRqzKwttFxZO035BBRM+","registration":{"state":"pending","token":"sunt sit"},"login_uri":"https://tcQLflOPfextPAiKtbSf.mnoH-XJpQpL-LWl1u,U0jMyb3Ip-FgtFJX1H9BEX,G7uk","launch_uri":"https://sQCw.hazVvwIeOiVdKssGZA8yZrJSTQnjKdnkL-CP9gQCLfsAyA","jwks_uri":"https://ZwnCkXWWqicYgLcgNidUjV.hjca4DAUSX,mV.DUt8p6rWMbyLTLXHkjX5qXZJWyDwYdhBEAEZ6qtS2y-q5CYMnBKWrYaH","issuer":"fugiat dolore","deployment_id":"esse in","client_id":"tempor eu sed voluptate deserunt"},{"uri":"http://UqQNcKmVOFHrxOgiyR.spnAnkmwtt4XTPxbVXpQhHqDFWotH-RPA9tmB","registration":{"state":"pending","token":"proident ex"},"login_uri":"http://wfUuMrVXymXDiOxiuvP.huvdIjKF3sO0-6zdfl9iIyudJNDRQfDjyRts5Z","launch_uri":"http://F.wnjUx+OvR.UgVr9PbNM,kjgY2BVZfRE1vDNw3hjJiY7P0+10rDcQHi.PEm","jwks_uri":"http://YPytYmKqleEON.cevomIfZswRdvgWJzW9Bysl4UebwWEjo42QcJRKKDSc1rCaeReMeV4wEALwZnrG6","issuer":"velit","deployment_id":"officia ipsum","client_id":"id commodo non ut"},{"uri":"http://keWYBOhFDbqASViNGnAAIoHQoSBWfO.jkkrz8v00mszfsjGaykgtJpensPS1qsekj","registration":{"state":"complete","token":"sit sint Lorem ullamco eu"},"login_uri":"http://cscceNTnmgdsBp.hdtoCJsz6v9ZS6xyNMyJdHN,JG.U7uHWAhDxtiz56.","launch_uri":"https://BPBa.ueufRMw1ygpAhlYD-FEjjkyf9GFqCualcfwrwvIf","jwks_uri":"http://aQHZMKClcURrLnXEmiSxJHBdQDb.eeof3MR+KL-jU,b+KQNCem","issuer":"sunt ad","client_id":"anim Lorem ullamco laboris","deployment_id":"adipisicing sint minim"},{"uri":"https://DRxLqKYIgJZgXKlfJBSwojxXcFlwBvM.snxhLX3Hd0YqddhhUNWrbqI-GVco7Uq4K3kyy2vBaRM+lv","registration":{"state":"pending","token":"dolore amet"},"login_uri":"http://TsFTbBDadENUDcwzNHKjaK.nnvkn73ig+F9lRtWMsn0vL32ib4,Jvf6oxbgtnt-rsjOHo","launch_uri":"https://pJeGetbMhjjvEDM.rbtgzrCFPhooPTVE4..eZPp+5p27L0BwLYG8eF0","jwks_uri":"https://SpRkGEVPEOd.pjxrKtYb0OmN0IWeeUiH3DbG+ogDWY.PTPj","deployment_id":"quis non nisi cillum occaecat","issuer":"in","client_id":"non Excepteur culpa"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_platform(**parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"https://LkzZLxHUBtInyAGZVeLJqdfBoek.bvxstbiJTC3OsYQmTwBHRqzKwttFxZO035BBRM+","registration":{"state":"pending","token":"sunt sit"},"login_uri":"https://tcQLflOPfextPAiKtbSf.mnoH-XJpQpL-LWl1u,U0jMyb3Ip-FgtFJX1H9BEX,G7uk","launch_uri":"https://sQCw.hazVvwIeOiVdKssGZA8yZrJSTQnjKdnkL-CP9gQCLfsAyA","jwks_uri":"https://ZwnCkXWWqicYgLcgNidUjV.hjca4DAUSX,mV.DUt8p6rWMbyLTLXHkjX5qXZJWyDwYdhBEAEZ6qtS2y-q5CYMnBKWrYaH","issuer":"fugiat dolore","deployment_id":"esse in","client_id":"tempor eu sed voluptate deserunt"},{"uri":"http://UqQNcKmVOFHrxOgiyR.spnAnkmwtt4XTPxbVXpQhHqDFWotH-RPA9tmB","registration":{"state":"pending","token":"proident ex"},"login_uri":"http://wfUuMrVXymXDiOxiuvP.huvdIjKF3sO0-6zdfl9iIyudJNDRQfDjyRts5Z","launch_uri":"http://F.wnjUx+OvR.UgVr9PbNM,kjgY2BVZfRE1vDNw3hjJiY7P0+10rDcQHi.PEm","jwks_uri":"http://YPytYmKqleEON.cevomIfZswRdvgWJzW9Bysl4UebwWEjo42QcJRKKDSc1rCaeReMeV4wEALwZnrG6","issuer":"velit","deployment_id":"officia ipsum","client_id":"id commodo non ut"},{"uri":"http://keWYBOhFDbqASViNGnAAIoHQoSBWfO.jkkrz8v00mszfsjGaykgtJpensPS1qsekj","registration":{"state":"complete","token":"sit sint Lorem ullamco eu"},"login_uri":"http://cscceNTnmgdsBp.hdtoCJsz6v9ZS6xyNMyJdHN,JG.U7uHWAhDxtiz56.","launch_uri":"https://BPBa.ueufRMw1ygpAhlYD-FEjjkyf9GFqCualcfwrwvIf","jwks_uri":"http://aQHZMKClcURrLnXEmiSxJHBdQDb.eeof3MR+KL-jU,b+KQNCem","issuer":"sunt ad","client_id":"anim Lorem ullamco laboris","deployment_id":"adipisicing sint minim"},{"uri":"https://DRxLqKYIgJZgXKlfJBSwojxXcFlwBvM.snxhLX3Hd0YqddhhUNWrbqI-GVco7Uq4K3kyy2vBaRM+lv","registration":{"state":"pending","token":"dolore amet"},"login_uri":"http://TsFTbBDadENUDcwzNHKjaK.nnvkn73ig+F9lRtWMsn0vL32ib4,Jvf6oxbgtnt-rsjOHo","launch_uri":"https://pJeGetbMhjjvEDM.rbtgzrCFPhooPTVE4..eZPp+5p27L0BwLYG8eF0","jwks_uri":"https://SpRkGEVPEOd.pjxrKtYb0OmN0IWeeUiH3DbG+ogDWY.PTPj","deployment_id":"quis non nisi cillum occaecat","issuer":"in","client_id":"non Excepteur culpa"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_platform(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"https://LkzZLxHUBtInyAGZVeLJqdfBoek.bvxstbiJTC3OsYQmTwBHRqzKwttFxZO035BBRM+","registration":{"state":"pending","token":"sunt sit"},"login_uri":"https://tcQLflOPfextPAiKtbSf.mnoH-XJpQpL-LWl1u,U0jMyb3Ip-FgtFJX1H9BEX,G7uk","launch_uri":"https://sQCw.hazVvwIeOiVdKssGZA8yZrJSTQnjKdnkL-CP9gQCLfsAyA","jwks_uri":"https://ZwnCkXWWqicYgLcgNidUjV.hjca4DAUSX,mV.DUt8p6rWMbyLTLXHkjX5qXZJWyDwYdhBEAEZ6qtS2y-q5CYMnBKWrYaH","issuer":"fugiat dolore","deployment_id":"esse in","client_id":"tempor eu sed voluptate deserunt"},{"uri":"http://UqQNcKmVOFHrxOgiyR.spnAnkmwtt4XTPxbVXpQhHqDFWotH-RPA9tmB","registration":{"state":"pending","token":"proident ex"},"login_uri":"http://wfUuMrVXymXDiOxiuvP.huvdIjKF3sO0-6zdfl9iIyudJNDRQfDjyRts5Z","launch_uri":"http://F.wnjUx+OvR.UgVr9PbNM,kjgY2BVZfRE1vDNw3hjJiY7P0+10rDcQHi.PEm","jwks_uri":"http://YPytYmKqleEON.cevomIfZswRdvgWJzW9Bysl4UebwWEjo42QcJRKKDSc1rCaeReMeV4wEALwZnrG6","issuer":"velit","deployment_id":"officia ipsum","client_id":"id commodo non ut"},{"uri":"http://keWYBOhFDbqASViNGnAAIoHQoSBWfO.jkkrz8v00mszfsjGaykgtJpensPS1qsekj","registration":{"state":"complete","token":"sit sint Lorem ullamco eu"},"login_uri":"http://cscceNTnmgdsBp.hdtoCJsz6v9ZS6xyNMyJdHN,JG.U7uHWAhDxtiz56.","launch_uri":"https://BPBa.ueufRMw1ygpAhlYD-FEjjkyf9GFqCualcfwrwvIf","jwks_uri":"http://aQHZMKClcURrLnXEmiSxJHBdQDb.eeof3MR+KL-jU,b+KQNCem","issuer":"sunt ad","client_id":"anim Lorem ullamco laboris","deployment_id":"adipisicing sint minim"},{"uri":"https://DRxLqKYIgJZgXKlfJBSwojxXcFlwBvM.snxhLX3Hd0YqddhhUNWrbqI-GVco7Uq4K3kyy2vBaRM+lv","registration":{"state":"pending","token":"dolore amet"},"login_uri":"http://TsFTbBDadENUDcwzNHKjaK.nnvkn73ig+F9lRtWMsn0vL32ib4,Jvf6oxbgtnt-rsjOHo","launch_uri":"https://pJeGetbMhjjvEDM.rbtgzrCFPhooPTVE4..eZPp+5p27L0BwLYG8eF0","jwks_uri":"https://SpRkGEVPEOd.pjxrKtYb0OmN0IWeeUiH3DbG+ogDWY.PTPj","deployment_id":"quis non nisi cillum occaecat","issuer":"in","client_id":"non Excepteur culpa"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_platform(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"https://LkzZLxHUBtInyAGZVeLJqdfBoek.bvxstbiJTC3OsYQmTwBHRqzKwttFxZO035BBRM+","registration":{"state":"pending","token":"sunt sit"},"login_uri":"https://tcQLflOPfextPAiKtbSf.mnoH-XJpQpL-LWl1u,U0jMyb3Ip-FgtFJX1H9BEX,G7uk","launch_uri":"https://sQCw.hazVvwIeOiVdKssGZA8yZrJSTQnjKdnkL-CP9gQCLfsAyA","jwks_uri":"https://ZwnCkXWWqicYgLcgNidUjV.hjca4DAUSX,mV.DUt8p6rWMbyLTLXHkjX5qXZJWyDwYdhBEAEZ6qtS2y-q5CYMnBKWrYaH","issuer":"fugiat dolore","deployment_id":"esse in","client_id":"tempor eu sed voluptate deserunt"},{"uri":"http://UqQNcKmVOFHrxOgiyR.spnAnkmwtt4XTPxbVXpQhHqDFWotH-RPA9tmB","registration":{"state":"pending","token":"proident ex"},"login_uri":"http://wfUuMrVXymXDiOxiuvP.huvdIjKF3sO0-6zdfl9iIyudJNDRQfDjyRts5Z","launch_uri":"http://F.wnjUx+OvR.UgVr9PbNM,kjgY2BVZfRE1vDNw3hjJiY7P0+10rDcQHi.PEm","jwks_uri":"http://YPytYmKqleEON.cevomIfZswRdvgWJzW9Bysl4UebwWEjo42QcJRKKDSc1rCaeReMeV4wEALwZnrG6","issuer":"velit","deployment_id":"officia ipsum","client_id":"id commodo non ut"},{"uri":"http://keWYBOhFDbqASViNGnAAIoHQoSBWfO.jkkrz8v00mszfsjGaykgtJpensPS1qsekj","registration":{"state":"complete","token":"sit sint Lorem ullamco eu"},"login_uri":"http://cscceNTnmgdsBp.hdtoCJsz6v9ZS6xyNMyJdHN,JG.U7uHWAhDxtiz56.","launch_uri":"https://BPBa.ueufRMw1ygpAhlYD-FEjjkyf9GFqCualcfwrwvIf","jwks_uri":"http://aQHZMKClcURrLnXEmiSxJHBdQDb.eeof3MR+KL-jU,b+KQNCem","issuer":"sunt ad","client_id":"anim Lorem ullamco laboris","deployment_id":"adipisicing sint minim"},{"uri":"https://DRxLqKYIgJZgXKlfJBSwojxXcFlwBvM.snxhLX3Hd0YqddhhUNWrbqI-GVco7Uq4K3kyy2vBaRM+lv","registration":{"state":"pending","token":"dolore amet"},"login_uri":"http://TsFTbBDadENUDcwzNHKjaK.nnvkn73ig+F9lRtWMsn0vL32ib4,Jvf6oxbgtnt-rsjOHo","launch_uri":"https://pJeGetbMhjjvEDM.rbtgzrCFPhooPTVE4..eZPp+5p27L0BwLYG8eF0","jwks_uri":"https://SpRkGEVPEOd.pjxrKtYb0OmN0IWeeUiH3DbG+ogDWY.PTPj","deployment_id":"quis non nisi cillum occaecat","issuer":"in","client_id":"non Excepteur culpa"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_platform(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_platform(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_platform(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_platform(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_platform(url=full_url, **parameters) @@ -6677,64 +6917,52 @@ async def test_register_platform(aioresponses: aioresponses): for parameters in parameter_list: response_201_dict = json.loads(r'{"uri":"https://FVLZoaTWIuNaQfAOtMsvbEuVPW.fjszk.r7pLbf4v-qkm.2U5BOdZjU3RfnLTtH1Ce6yBwm","registration":{"state":"complete","token":"in eiusmod labore"},"login_uri":"https://HAXEjyDaKa.thtsmBKQnx-","launch_uri":"http://sXNHTpJnB.kekhvPO.PhTGl1twaUdrkuLwFLt4WQKheCTMMOSpijkFKu31EXGdX8W4","jwks_uri":"http://CJzZsjNZBnBNuFNm.uiuV.I.NyL8sxdvM0HKgbuyfgL-wxrhOJ2C"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.register_platform(**parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"uri":"https://FVLZoaTWIuNaQfAOtMsvbEuVPW.fjszk.r7pLbf4v-qkm.2U5BOdZjU3RfnLTtH1Ce6yBwm","registration":{"state":"complete","token":"in eiusmod labore"},"login_uri":"https://HAXEjyDaKa.thtsmBKQnx-","launch_uri":"http://sXNHTpJnB.kekhvPO.PhTGl1twaUdrkuLwFLt4WQKheCTMMOSpijkFKu31EXGdX8W4","jwks_uri":"http://CJzZsjNZBnBNuFNm.uiuV.I.NyL8sxdvM0HKgbuyfgL-wxrhOJ2C"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.register_platform(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"uri":"https://FVLZoaTWIuNaQfAOtMsvbEuVPW.fjszk.r7pLbf4v-qkm.2U5BOdZjU3RfnLTtH1Ce6yBwm","registration":{"state":"complete","token":"in eiusmod labore"},"login_uri":"https://HAXEjyDaKa.thtsmBKQnx-","launch_uri":"http://sXNHTpJnB.kekhvPO.PhTGl1twaUdrkuLwFLt4WQKheCTMMOSpijkFKu31EXGdX8W4","jwks_uri":"http://CJzZsjNZBnBNuFNm.uiuV.I.NyL8sxdvM0HKgbuyfgL-wxrhOJ2C"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.register_platform(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: response_201_dict = json.loads(r'{"uri":"https://FVLZoaTWIuNaQfAOtMsvbEuVPW.fjszk.r7pLbf4v-qkm.2U5BOdZjU3RfnLTtH1Ce6yBwm","registration":{"state":"complete","token":"in eiusmod labore"},"login_uri":"https://HAXEjyDaKa.thtsmBKQnx-","launch_uri":"http://sXNHTpJnB.kekhvPO.PhTGl1twaUdrkuLwFLt4WQKheCTMMOSpijkFKu31EXGdX8W4","jwks_uri":"http://CJzZsjNZBnBNuFNm.uiuV.I.NyL8sxdvM0HKgbuyfgL-wxrhOJ2C"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=201, payload=response_201_dict) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201, payload=response_201_dict) async with APIClient(BASE_URL) as client: resp = await client.register_platform(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_201_dict) + assert normalize_result(resp) == normalize_result(response_201_dict) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.register_platform(**parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.register_platform(url=url, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.register_platform(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.post(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.register_platform(url=full_url, **parameters) @@ -6750,48 +6978,39 @@ async def test_get_platform(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'{"uri":"https://FVLZoaTWIuNaQfAOtMsvbEuVPW.fjszk.r7pLbf4v-qkm.2U5BOdZjU3RfnLTtH1Ce6yBwm","registration":{"state":"complete","token":"in eiusmod labore"},"login_uri":"https://HAXEjyDaKa.thtsmBKQnx-","launch_uri":"http://sXNHTpJnB.kekhvPO.PhTGl1twaUdrkuLwFLt4WQKheCTMMOSpijkFKu31EXGdX8W4","jwks_uri":"http://CJzZsjNZBnBNuFNm.uiuV.I.NyL8sxdvM0HKgbuyfgL-wxrhOJ2C"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_platform(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"uri":"https://FVLZoaTWIuNaQfAOtMsvbEuVPW.fjszk.r7pLbf4v-qkm.2U5BOdZjU3RfnLTtH1Ce6yBwm","registration":{"state":"complete","token":"in eiusmod labore"},"login_uri":"https://HAXEjyDaKa.thtsmBKQnx-","launch_uri":"http://sXNHTpJnB.kekhvPO.PhTGl1twaUdrkuLwFLt4WQKheCTMMOSpijkFKu31EXGdX8W4","jwks_uri":"http://CJzZsjNZBnBNuFNm.uiuV.I.NyL8sxdvM0HKgbuyfgL-wxrhOJ2C"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_platform(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"uri":"https://FVLZoaTWIuNaQfAOtMsvbEuVPW.fjszk.r7pLbf4v-qkm.2U5BOdZjU3RfnLTtH1Ce6yBwm","registration":{"state":"complete","token":"in eiusmod labore"},"login_uri":"https://HAXEjyDaKa.thtsmBKQnx-","launch_uri":"http://sXNHTpJnB.kekhvPO.PhTGl1twaUdrkuLwFLt4WQKheCTMMOSpijkFKu31EXGdX8W4","jwks_uri":"http://CJzZsjNZBnBNuFNm.uiuV.I.NyL8sxdvM0HKgbuyfgL-wxrhOJ2C"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_platform(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_platform(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_platform(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_platform(url=full_url, **parameters) @@ -6807,69 +7026,57 @@ async def test_update_platform(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'{"uri":"https://FVLZoaTWIuNaQfAOtMsvbEuVPW.fjszk.r7pLbf4v-qkm.2U5BOdZjU3RfnLTtH1Ce6yBwm","registration":{"state":"complete","token":"in eiusmod labore"},"login_uri":"https://HAXEjyDaKa.thtsmBKQnx-","launch_uri":"http://sXNHTpJnB.kekhvPO.PhTGl1twaUdrkuLwFLt4WQKheCTMMOSpijkFKu31EXGdX8W4","jwks_uri":"http://CJzZsjNZBnBNuFNm.uiuV.I.NyL8sxdvM0HKgbuyfgL-wxrhOJ2C"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_platform(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"uri":"https://FVLZoaTWIuNaQfAOtMsvbEuVPW.fjszk.r7pLbf4v-qkm.2U5BOdZjU3RfnLTtH1Ce6yBwm","registration":{"state":"complete","token":"in eiusmod labore"},"login_uri":"https://HAXEjyDaKa.thtsmBKQnx-","launch_uri":"http://sXNHTpJnB.kekhvPO.PhTGl1twaUdrkuLwFLt4WQKheCTMMOSpijkFKu31EXGdX8W4","jwks_uri":"http://CJzZsjNZBnBNuFNm.uiuV.I.NyL8sxdvM0HKgbuyfgL-wxrhOJ2C"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_platform(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{"uri":"https://FVLZoaTWIuNaQfAOtMsvbEuVPW.fjszk.r7pLbf4v-qkm.2U5BOdZjU3RfnLTtH1Ce6yBwm","registration":{"state":"complete","token":"in eiusmod labore"},"login_uri":"https://HAXEjyDaKa.thtsmBKQnx-","launch_uri":"http://sXNHTpJnB.kekhvPO.PhTGl1twaUdrkuLwFLt4WQKheCTMMOSpijkFKu31EXGdX8W4","jwks_uri":"http://CJzZsjNZBnBNuFNm.uiuV.I.NyL8sxdvM0HKgbuyfgL-wxrhOJ2C"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_platform(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_platform(url=url, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_platform(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_platform(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_platform(url=url, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_platform(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_platform(url=full_url, **parameters) @@ -6884,40 +7091,34 @@ async def test_delete_platform(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_platform(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_platform(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_platform(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_platform(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_platform(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_platform(url=full_url, **parameters) @@ -6929,40 +7130,30 @@ async def test_lti_login(aioresponses: aioresponses): url_variant = r'lti/platform/c799cc2e-cdc5-4143-973a-6f56a5afa82c/login' full_url = BASE_URL+r'/lti/platform/c799cc2e-cdc5-4143-973a-6f56a5afa82c/login' - request = json.loads( - r'{"iss":"ea dolore","client_id":"ut irure deserunt","target_link_uri":"magna et occaecat","login_hint":"id in amet consequat pariatur","lti_message_hint":"anim esse sed cillum","lti_deployment_id":"et"}') + request = json.loads(r'{"iss":"ea dolore","client_id":"ut irure deserunt","target_link_uri":"magna et occaecat","login_hint":"id in amet consequat pariatur","lti_message_hint":"anim esse sed cillum","lti_deployment_id":"et"}') parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"authentication_request_url":"aute amet"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"authentication_request_url":"aute amet"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.lti_login(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"authentication_request_url":"aute amet"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"authentication_request_url":"aute amet"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.lti_login(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"authentication_request_url":"aute amet"}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"authentication_request_url":"aute amet"}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.lti_login(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) @pytest.mark.asyncio @@ -6971,40 +7162,30 @@ async def test_lti_launch(aioresponses: aioresponses): url_variant = r'lti/platform/c799cc2e-cdc5-4143-973a-6f56a5afa82c/launch' full_url = BASE_URL+r'/lti/platform/c799cc2e-cdc5-4143-973a-6f56a5afa82c/launch' - request = json.loads( - r'{"state":"dolor","id_token":"deserunt ullamco magna proident id"}') + request = json.loads(r'{"state":"dolor","id_token":"deserunt ullamco magna proident id"}') parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"access_token":"minim","session":{"uri":"https://RaHMdQUboxqghjUtFSplBPrvNidOls.myV","resource_uri":"https://unb.ufgmP3sxpp-gC7-yhXWoorWGz8fBNDwHH4VVDXmRdYtm.5PAo4uH1nLz1,TXq","roles":["instructor","instructor","instructor"],"experiment_uri":"http://vidKQHGyOpDT.ponnbqWMqrfiVMc1FjcL"}}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"access_token":"minim","session":{"uri":"https://UAASLLwMkIdSNpj.wqkfaWe27csDqjjyN4uoI0wBNeOxjzZQ0L3sxpp-gC7-yhXWoorWGz8fBND","resource_uri":"https://n.piehX1nLz1YXqezrcYPqFxkDqpJn","roles":["instructor"],"role_mapping":[{"role":"nulla consectetur in deserunt","device":"https://zwhUGaSJTKpCDHkMQBSesScIRgPFcawXv.pdkplKNDxrdcet10LCf3UWFD-rpJQA0PvPxRm91vTppQ.X3cVcK"}],"experiment_change_uri":"https://hfRtAMwM.rwimFRW0jzG,d,fuZPtpckqvdsgkiZhTUXU4wXW","experiment_uri":"http://xSlTWCzgHiovQVtNPLskSop.nlflb35YtpaK8DY"}}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.lti_launch(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"access_token":"minim","session":{"uri":"https://RaHMdQUboxqghjUtFSplBPrvNidOls.myV","resource_uri":"https://unb.ufgmP3sxpp-gC7-yhXWoorWGz8fBNDwHH4VVDXmRdYtm.5PAo4uH1nLz1,TXq","roles":["instructor","instructor","instructor"],"experiment_uri":"http://vidKQHGyOpDT.ponnbqWMqrfiVMc1FjcL"}}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"access_token":"minim","session":{"uri":"https://UAASLLwMkIdSNpj.wqkfaWe27csDqjjyN4uoI0wBNeOxjzZQ0L3sxpp-gC7-yhXWoorWGz8fBND","resource_uri":"https://n.piehX1nLz1YXqezrcYPqFxkDqpJn","roles":["instructor"],"role_mapping":[{"role":"nulla consectetur in deserunt","device":"https://zwhUGaSJTKpCDHkMQBSesScIRgPFcawXv.pdkplKNDxrdcet10LCf3UWFD-rpJQA0PvPxRm91vTppQ.X3cVcK"}],"experiment_change_uri":"https://hfRtAMwM.rwimFRW0jzG,d,fuZPtpckqvdsgkiZhTUXU4wXW","experiment_uri":"http://xSlTWCzgHiovQVtNPLskSop.nlflb35YtpaK8DY"}}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.lti_launch(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"access_token":"minim","session":{"uri":"https://RaHMdQUboxqghjUtFSplBPrvNidOls.myV","resource_uri":"https://unb.ufgmP3sxpp-gC7-yhXWoorWGz8fBNDwHH4VVDXmRdYtm.5PAo4uH1nLz1,TXq","roles":["instructor","instructor","instructor"],"experiment_uri":"http://vidKQHGyOpDT.ponnbqWMqrfiVMc1FjcL"}}') - aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"access_token":"minim","session":{"uri":"https://UAASLLwMkIdSNpj.wqkfaWe27csDqjjyN4uoI0wBNeOxjzZQ0L3sxpp-gC7-yhXWoorWGz8fBND","resource_uri":"https://n.piehX1nLz1YXqezrcYPqFxkDqpJn","roles":["instructor"],"role_mapping":[{"role":"nulla consectetur in deserunt","device":"https://zwhUGaSJTKpCDHkMQBSesScIRgPFcawXv.pdkplKNDxrdcet10LCf3UWFD-rpJQA0PvPxRm91vTppQ.X3cVcK"}],"experiment_change_uri":"https://hfRtAMwM.rwimFRW0jzG,d,fuZPtpckqvdsgkiZhTUXU4wXW","experiment_uri":"http://xSlTWCzgHiovQVtNPLskSop.nlflb35YtpaK8DY"}}') + aioresponses.post(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.lti_launch(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) @pytest.mark.asyncio @@ -7017,30 +7198,24 @@ async def test_lti_jwks(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'{}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.lti_jwks(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.lti_jwks(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'{}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.lti_jwks(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) @pytest.mark.asyncio @@ -7053,64 +7228,52 @@ async def test_list_resource(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"http://ZpUggNuUtsxpeyVhCiBLJJB.dfpUDy2hSlMWzNd8SHLSlkfccCSpRyTl1","students_uri":"http://XkpxusyIaaSSHox.zneBBgWNk2g41"},{"uri":"https://qNWAjtYiKlHfyhvzcCHlHiwcceNwTK.uwooy-KTb1WeArCukYb1+AGg33ooiYECAnf","students_uri":"http://DXTaVWCJDVSRuzsWKduMBvt.ueqNfJi7qkzGSCPFkH","experiment_template_uri":"http://clhhk.nsrYN5j2-OyfN9v6Dk9w+Ffe9M74dI1Gr5DdNnKjR1zwPPkRhNTuvcqbYnHyTs2AwDG42v62S"},{"uri":"http://GiPhpwfbLdvQYrWSeHoJLGrgk.lehywPqSF6HlxJFrgYz","students_uri":"https://m.zgrScQfbPnT0fvyneAsJBQAblHPpJOC,Kgy"},{"uri":"https://dKlANHMIZKWgVMhDjVUgAOxIlUpS.uuflgkOIxk6bf3TTyAjGUvaaAjMZmQNU,+y1yMzkhk-B.xcuCcra6","students_uri":"https://qOghqoJaiIFCvb.dgbsZYtzQp71ihA-3MZ,sah7Nu.n9cQL3Nz0x","experiment_template_uri":"http://zsECFohsmJvhpo.xiudZX8.soolNeHVV"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_resource(**parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"http://ZpUggNuUtsxpeyVhCiBLJJB.dfpUDy2hSlMWzNd8SHLSlkfccCSpRyTl1","students_uri":"http://XkpxusyIaaSSHox.zneBBgWNk2g41"},{"uri":"https://qNWAjtYiKlHfyhvzcCHlHiwcceNwTK.uwooy-KTb1WeArCukYb1+AGg33ooiYECAnf","students_uri":"http://DXTaVWCJDVSRuzsWKduMBvt.ueqNfJi7qkzGSCPFkH","experiment_template_uri":"http://clhhk.nsrYN5j2-OyfN9v6Dk9w+Ffe9M74dI1Gr5DdNnKjR1zwPPkRhNTuvcqbYnHyTs2AwDG42v62S"},{"uri":"http://GiPhpwfbLdvQYrWSeHoJLGrgk.lehywPqSF6HlxJFrgYz","students_uri":"https://m.zgrScQfbPnT0fvyneAsJBQAblHPpJOC,Kgy"},{"uri":"https://dKlANHMIZKWgVMhDjVUgAOxIlUpS.uuflgkOIxk6bf3TTyAjGUvaaAjMZmQNU,+y1yMzkhk-B.xcuCcra6","students_uri":"https://qOghqoJaiIFCvb.dgbsZYtzQp71ihA-3MZ,sah7Nu.n9cQL3Nz0x","experiment_template_uri":"http://zsECFohsmJvhpo.xiudZX8.soolNeHVV"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_resource(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"http://ZpUggNuUtsxpeyVhCiBLJJB.dfpUDy2hSlMWzNd8SHLSlkfccCSpRyTl1","students_uri":"http://XkpxusyIaaSSHox.zneBBgWNk2g41"},{"uri":"https://qNWAjtYiKlHfyhvzcCHlHiwcceNwTK.uwooy-KTb1WeArCukYb1+AGg33ooiYECAnf","students_uri":"http://DXTaVWCJDVSRuzsWKduMBvt.ueqNfJi7qkzGSCPFkH","experiment_template_uri":"http://clhhk.nsrYN5j2-OyfN9v6Dk9w+Ffe9M74dI1Gr5DdNnKjR1zwPPkRhNTuvcqbYnHyTs2AwDG42v62S"},{"uri":"http://GiPhpwfbLdvQYrWSeHoJLGrgk.lehywPqSF6HlxJFrgYz","students_uri":"https://m.zgrScQfbPnT0fvyneAsJBQAblHPpJOC,Kgy"},{"uri":"https://dKlANHMIZKWgVMhDjVUgAOxIlUpS.uuflgkOIxk6bf3TTyAjGUvaaAjMZmQNU,+y1yMzkhk-B.xcuCcra6","students_uri":"https://qOghqoJaiIFCvb.dgbsZYtzQp71ihA-3MZ,sah7Nu.n9cQL3Nz0x","experiment_template_uri":"http://zsECFohsmJvhpo.xiudZX8.soolNeHVV"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_resource(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"http://ZpUggNuUtsxpeyVhCiBLJJB.dfpUDy2hSlMWzNd8SHLSlkfccCSpRyTl1","students_uri":"http://XkpxusyIaaSSHox.zneBBgWNk2g41"},{"uri":"https://qNWAjtYiKlHfyhvzcCHlHiwcceNwTK.uwooy-KTb1WeArCukYb1+AGg33ooiYECAnf","students_uri":"http://DXTaVWCJDVSRuzsWKduMBvt.ueqNfJi7qkzGSCPFkH","experiment_template_uri":"http://clhhk.nsrYN5j2-OyfN9v6Dk9w+Ffe9M74dI1Gr5DdNnKjR1zwPPkRhNTuvcqbYnHyTs2AwDG42v62S"},{"uri":"http://GiPhpwfbLdvQYrWSeHoJLGrgk.lehywPqSF6HlxJFrgYz","students_uri":"https://m.zgrScQfbPnT0fvyneAsJBQAblHPpJOC,Kgy"},{"uri":"https://dKlANHMIZKWgVMhDjVUgAOxIlUpS.uuflgkOIxk6bf3TTyAjGUvaaAjMZmQNU,+y1yMzkhk-B.xcuCcra6","students_uri":"https://qOghqoJaiIFCvb.dgbsZYtzQp71ihA-3MZ,sah7Nu.n9cQL3Nz0x","experiment_template_uri":"http://zsECFohsmJvhpo.xiudZX8.soolNeHVV"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_resource(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_resource(**parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_resource(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_resource(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_resource(url=full_url, **parameters) @@ -7125,52 +7288,40 @@ async def test_get_resource(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_resource(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_resource(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_resource(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_resource(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_resource(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_resource(url=full_url, **parameters) @@ -7187,73 +7338,58 @@ async def test_update_resource(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_resource(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_resource(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"http://hWOEYSCreXwQxFocRhKxvJloaIt.oxHgpJBNpI4uTAgE7yQ++VYBpok.pibIVuMTm.9Y,fyfUEW0n7xX2fvhBjNEa","students_uri":"https://WiBlta.gqHn3IGHXHFdlVxTQxPB8SOhj7KrENAyEceAkbd08Y-."}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_resource(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=400) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=400) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource(url=full_url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource(url=full_url, body=request, **parameters) @@ -7268,40 +7404,34 @@ async def test_delete_resource(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_resource(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_resource(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=204) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=204) async with APIClient(BASE_URL) as client: resp = await client.delete_resource(url=full_url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_resource(url=url, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_resource(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.delete(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.delete(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.delete_resource(url=full_url, **parameters) @@ -7317,48 +7447,39 @@ async def test_list_resource_students(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"http://awMwPNkwQBsQUqQhpAU.ouuAd3ByZLpTx8xWpiGyfEESgsiBbH9","external_id":"laboris non dolore qui","role_mapping":[{"role":"exercitation eiusmod cillum et veniam","device":"GROUP"},{"role":"officia aliqua ea","device":"GROUP"},{"role":"ea ipsum reprehenderit","device":"GROUP"}],"name":"ut","email":"KJUeSTFKr@gqPbsRrfDuUaiMsveMFD.djh"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_resource_students(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"http://awMwPNkwQBsQUqQhpAU.ouuAd3ByZLpTx8xWpiGyfEESgsiBbH9","external_id":"laboris non dolore qui","role_mapping":[{"role":"exercitation eiusmod cillum et veniam","device":"GROUP"},{"role":"officia aliqua ea","device":"GROUP"},{"role":"ea ipsum reprehenderit","device":"GROUP"}],"name":"ut","email":"KJUeSTFKr@gqPbsRrfDuUaiMsveMFD.djh"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_resource_students(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"http://awMwPNkwQBsQUqQhpAU.ouuAd3ByZLpTx8xWpiGyfEESgsiBbH9","external_id":"laboris non dolore qui","role_mapping":[{"role":"exercitation eiusmod cillum et veniam","device":"GROUP"},{"role":"officia aliqua ea","device":"GROUP"},{"role":"ea ipsum reprehenderit","device":"GROUP"}],"name":"ut","email":"KJUeSTFKr@gqPbsRrfDuUaiMsveMFD.djh"}]') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.list_resource_students(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_resource_students(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_resource_students(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.list_resource_students(url=full_url, **parameters) @@ -7376,48 +7497,39 @@ async def test_update_resource_students(aioresponses: aioresponses): for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"http://awMwPNkwQBsQUqQhpAU.ouuAd3ByZLpTx8xWpiGyfEESgsiBbH9","external_id":"laboris non dolore qui","role_mapping":[{"role":"exercitation eiusmod cillum et veniam","device":"GROUP"},{"role":"officia aliqua ea","device":"GROUP"},{"role":"ea ipsum reprehenderit","device":"GROUP"}],"name":"ut","email":"KJUeSTFKr@gqPbsRrfDuUaiMsveMFD.djh"}]') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_resource_students(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"http://awMwPNkwQBsQUqQhpAU.ouuAd3ByZLpTx8xWpiGyfEESgsiBbH9","external_id":"laboris non dolore qui","role_mapping":[{"role":"exercitation eiusmod cillum et veniam","device":"GROUP"},{"role":"officia aliqua ea","device":"GROUP"},{"role":"ea ipsum reprehenderit","device":"GROUP"}],"name":"ut","email":"KJUeSTFKr@gqPbsRrfDuUaiMsveMFD.djh"}]') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_resource_students(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: response_200_dict = json.loads(r'[{"uri":"http://awMwPNkwQBsQUqQhpAU.ouuAd3ByZLpTx8xWpiGyfEESgsiBbH9","external_id":"laboris non dolore qui","role_mapping":[{"role":"exercitation eiusmod cillum et veniam","device":"GROUP"},{"role":"officia aliqua ea","device":"GROUP"},{"role":"ea ipsum reprehenderit","device":"GROUP"}],"name":"ut","email":"KJUeSTFKr@gqPbsRrfDuUaiMsveMFD.djh"}]') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_resource_students(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource_students(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource_students(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource_students(url=full_url, body=request, **parameters) @@ -7432,52 +7544,40 @@ async def test_get_resource_student(aioresponses: aioresponses): parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_resource_student(url=url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_resource_student(url=url_variant, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') - aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), - status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.get_resource_student(url=full_url, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_resource_student(url=url, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_resource_student(url=url_variant, **parameters) for parameters in parameter_list: - aioresponses.get(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.get(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.get_resource_student(url=full_url, **parameters) @@ -7489,58 +7589,71 @@ async def test_update_resource_student(aioresponses: aioresponses): url_variant = r'lti/resource/c799cc2e-cdc5-4143-973a-6f56a5afa82c/students/c799cc2e-cdc5-4143-973a-6f56a5afa82c' full_url = BASE_URL+r'/lti/resource/c799cc2e-cdc5-4143-973a-6f56a5afa82c/students/c799cc2e-cdc5-4143-973a-6f56a5afa82c' - request = json.loads( - r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') + request = json.loads(r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') parameter_list = [{}, ] for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_resource_student(url=url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_resource_student(url=url_variant, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - response_200_dict = json.loads( - r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') - aioresponses.patch(re.compile(re.escape(full_url) + - r'(\?.*)?'), status=200, payload=response_200_dict) + response_200_dict = json.loads(r'{"uri":"https://VeT.enPcQCeeMcBRCP+2ZiaihiUG07stybyfoMHegzw0NOaPLQHY92Magk1GQxUYca0vYMUwbQSFVjCzY","external_id":"fugiat","role_mapping":[{"role":"nostrud","device":"GROUP"},{"role":"nulla","device":"GROUP"}],"name":"in ipsum cupidatat eiusmod tempor","email":"fZ2FB1@sVIkbtDjAVmOgSTlDERsDOtNoYklvu.tf"}') + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=200, payload=response_200_dict) async with APIClient(BASE_URL) as client: resp = await client.update_resource_student(url=full_url, body=request, **parameters) - assert normalize_result( - resp) == normalize_result(response_200_dict) + assert normalize_result(resp) == normalize_result(response_200_dict) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource_student(url=url, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource_student(url=url_variant, body=request, **parameters) for parameters in parameter_list: - aioresponses.patch(re.compile( - re.escape(full_url)+r'(\?.*)?'), status=401) + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=401) async with APIClient(BASE_URL) as client: with pytest.raises(Exception): resp = await client.update_resource_student(url=full_url, body=request, **parameters) + + +@pytest.mark.asyncio +async def test_update_lti_experiment(aioresponses: aioresponses): + url = r'/lti/session/c799cc2e-cdc5-4143-973a-6f56a5afa82c/experiment' + url_variant = r'lti/session/c799cc2e-cdc5-4143-973a-6f56a5afa82c/experiment' + full_url = BASE_URL+r'/lti/session/c799cc2e-cdc5-4143-973a-6f56a5afa82c/experiment' + + request = json.loads(r'{"impersonate":"http://WVWmSjaVXcayyefykFZxXlwcwg.eauGXvmp2rfcExQfpT.jVjvGD+VnPxNxbjw,YKqcKH5h72iJ4"}') + + parameter_list = [{}, ] + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201) + async with APIClient(BASE_URL) as client: + resp = await client.update_lti_experiment(url=url, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201) + async with APIClient(BASE_URL) as client: + resp = await client.update_lti_experiment(url=url_variant, body=request, **parameters) + + for parameters in parameter_list: + aioresponses.patch(re.compile(re.escape(full_url)+r'(\?.*)?'), status=201) + async with APIClient(BASE_URL) as client: + resp = await client.update_lti_experiment(url=full_url, body=request, **parameters) diff --git a/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk b/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk index dd425b5e..49917518 100644 --- a/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk +++ b/helper/crosslab-typescript-addon/templates/service-client/client.ts.njk @@ -1,6 +1,15 @@ {%- macro generateIndex() -%} {%- set schemas = (api | resolveSchemas) -%} {%- set operations = (api | resolveOperations) -%} +{%- set validateUrlNeeded = false -%} + +{% for operation in operations | selectattr("external") %} + {%- set requiredUrl = true if operation.parameters and operation.parameters | select("attrequalto", ["in", "path"]) | length > 0 else false %} + {%- set buildUrl = operation.buildUrl %} + {%- if requiredUrl and (not buildUrl) %} + {%- set validateUrlNeeded = true %} + {% endif %} +{% endfor %} /** * This file was automatically generated by openapi-codegeneration. @@ -84,6 +93,7 @@ async function parseResponse(response: Response): Promise { } } +{% if validateUrlNeeded -%} /** * This function checks if a string is a valid http url. * @param string The string to be checked. @@ -137,6 +147,7 @@ function validateUrl(url: string, endpoint: string): string[] { if (!isValidHttpUrl(url)) throw new InvalidUrlError('Provided url is not a valid http url') return parsePathParameters(url, endpoint) } +{%- endif %} /** * This function appends a given endpoint to an url. diff --git a/integration-test/docker-compose.yaml b/integration-test/docker-compose.yaml index 05011252..71404842 100644 --- a/integration-test/docker-compose.yaml +++ b/integration-test/docker-compose.yaml @@ -29,6 +29,7 @@ x-config: &common-config BOOKING_BACKEND_DOMAIN: 'localhost:3005' SCHEDULE_SERVICE_DOMAIN: 'localhost:3006' AUTHORIZATION_SERVICE_DOMAIN: 'localhost:3010' + LTI_SERVICE_DOMAIN: '127.0.0.2:3004' services: # Database diff --git a/services/booking/scripts/test.sh b/services/booking/scripts/test.sh index 0e906b27..12b2fe72 100755 --- a/services/booking/scripts/test.sh +++ b/services/booking/scripts/test.sh @@ -15,16 +15,20 @@ current=$(pwd) result=0 cd "$current/src/schedule-service" -bash ./scripts/test.sh +npm ci +npm test result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) cd "$current/src/booking-backend" -bash ./scripts/test.sh +npm ci +npm test result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) cd "$current/src/booking-frontend" -bash ./scripts/test.sh +npm ci +npm test result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) cd "$current/src/device-reservation" -bash ./scripts/test.sh +npm ci +npm test result=$(( $result == 0 ? ( $? == 0 ? 0 : 1 ) : 1 )) cd $current @@ -32,5 +36,5 @@ exit $result sudo mysql -e "DROP USER 'test'@localhost;" sudo mysql -e "DROP DATABASE unittest;" -sudo service mysql stop +sudo service mariadb stop sudo service rabbitmq-server stop \ No newline at end of file diff --git a/services/booking/src/booking-backend/package-lock.json b/services/booking/src/booking-backend/package-lock.json index ca18a71a..e93e90a5 100644 --- a/services/booking/src/booking-backend/package-lock.json +++ b/services/booking/src/booking-backend/package-lock.json @@ -25,8 +25,8 @@ "dayjs": "^1.11.5", "express": "^4.18.1", "lodash": "^4.17.21", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "mysql2": "^3.11.0", + "typescript": "^5.5.4" }, "bin": { "crosslab-booking-backend": "app/index.js" @@ -46,20 +46,21 @@ "name": "@cross-lab-project/api-client", "license": "ISC", "dependencies": { - "ajv-formats": "^2.1.1", + "ajv-formats": "^3.0.1", "cross-fetch": "^4.0.0" }, "devDependencies": { "@cross-lab-project/codegen-typescript-addon": "file:../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../helper/openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.34.0", - "prettier": "^3.0.3", - "typedoc": "^0.25.1", - "typescript": "^5.2.2" + "@eslint/js": "^9.9.0", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "@types/eslint__js": "^8.42.3", + "@types/node": "^22.1.0", + "eslint": "^9.8.0", + "prettier": "^3.3.3", + "typedoc": "^0.26.5", + "typescript": "^5.5.4", + "typescript-eslint": "^8.1.0" } }, "../../../../helper/crosslab-typescript-addon": { @@ -71,23 +72,24 @@ }, "devDependencies": { "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", + "@eslint/js": "^9.9.0", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "@types/eslint__js": "^8.42.3", + "@types/node": "^22.1.0", + "@types/nunjucks": "^3.2.6", + "@types/seedrandom": "^3.0.8", "copyfiles": "^2.4.1", - "eslint": "^8.48.0", + "eslint": "^9.8.0", "openapi-types": "^12.1.3", - "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" + "prettier": "^3.3.3", + "tsc-watch": "^6.2.0", + "typescript": "^5.5.4", + "typescript-eslint": "^8.1.0" }, "peerDependencies": { "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", "ajv": "^8.11.0", - "ajv-formats": "^2.1.1" + "ajv-formats": "^3.0.1" } }, "../../../../helper/openapi-codegeneration": { @@ -95,34 +97,35 @@ "license": "UNLICENSED", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", - "ajv": "^8.12.0", - "ajv-formats": "^2.1.1", - "commander": "^11.0.0", + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", + "commander": "^12.1.0", "deterministic-json-schema-faker": "^0.5.0-rcv.46", - "glob": "^10.3.4", + "glob": "^11.0.0", "json-schema-merge-allof": "^0.8.1", - "json-schema-to-typescript": "^13.1.1", + "json-schema-to-typescript": "^15.0.0", "nunjucks": "^3.2.4", - "quicktype-core": "^23.0.75", + "quicktype-core": "^23.0.170", "seedrandom": "^3.0.5", "tiny-typed-emitter": "^2.1.0", - "yaml": "^2.3.2" + "yaml": "^2.5.0" }, "bin": { "openapi-codegen": "lib/cjs/index.js" }, "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", + "@eslint/js": "^9.9.0", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "@types/eslint__js": "^8.42.3", + "@types/node": "^22.1.0", + "@types/nunjucks": "^3.2.6", + "@types/seedrandom": "^3.0.8", + "eslint": "^9.8.0", "openapi-types": "^12.1.3", "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" + "tsc-watch": "^6.2.0", + "typescript": "^5.5.4", + "typescript-eslint": "^8.1.0" } }, "../../../common": { @@ -131,27 +134,28 @@ "dependencies": { "express": "^4.18.1", "express-winston": "^4.2.0", - "fetch-retry": "^5.0.6", - "jose": "^4.14.6", + "fetch-retry": "^6.0.0", + "jose": "^5.6.3", "mysql": "^2.18.1", - "sqlite3": "^5.1.6", - "typeorm": "^0.3.17", - "uuid": "^9.0.0", - "winston": "^3.10.0", - "winston-loki": "^6.0.7" + "sqlite3": "^5.1.7", + "typeorm": "^0.3.20", + "uuid": "^10.0.0", + "winston": "^3.14.1", + "winston-loki": "^6.1.2" }, "devDependencies": { + "@eslint/js": "^9.9.0", "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/express": "^4.17.13", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.9", - "@types/uuid": "^9.0.3", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", - "mocha": "^10.2.0", - "prettier": "^3.0.3", - "typescript": "^5.2.2" + "@types/eslint__js": "^8.42.3", + "@types/express": "^4.17.21", + "@types/mocha": "^10.0.7", + "@types/node": "^22.1.0", + "@types/uuid": "^10.0.0", + "eslint": "^9.8.0", + "mocha": "^10.7.0", + "prettier": "^3.3.3", + "typescript": "^5.5.4", + "typescript-eslint": "^8.1.0" } }, "../common": { @@ -188,7 +192,7 @@ "async-mutex": "^0.5.0", "dayjs": "^1.11.5", "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "typescript": "^5.5.4" }, "bin": { "crosslab-device-reservation": "app/index.js" @@ -213,7 +217,7 @@ "dayjs": "^1.11.5", "express": "^4.18.1", "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "typescript": "^5.5.4" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.2.0", @@ -982,6 +986,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", + "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -2726,12 +2739,19 @@ "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, - "node_modules/lru-cache": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", - "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", + "node_modules/lru.min": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.1.tgz", + "integrity": "sha512-FbAj6lXil6t8z4z3j0E5mfRlPzxkySotzUHwRXjlpRh10vc6AI6WN62ehZj82VG7M20rqogJ0GLwar2Xa05a8Q==", + "license": "MIT", "engines": { - "node": ">=16.14" + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" } }, "node_modules/make-dir": { @@ -2951,15 +2971,17 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mysql2": { - "version": "3.10.2", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.2.tgz", - "integrity": "sha512-KCXPEvAkO0RcHPr362O5N8tFY2fXvbjfkPvRY/wGumh4EOemo9Hm5FjQZqv/pCmrnuxGu5OxnSENG0gTXqKMgQ==", + "version": "3.11.3", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.11.3.tgz", + "integrity": "sha512-Qpu2ADfbKzyLdwC/5d4W7+5Yz7yBzCU05YWt5npWzACST37wJsB23wgOSo00qi043urkiRwXtEvJc9UnuLX/MQ==", + "license": "MIT", "dependencies": { + "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.6.3", "long": "^5.2.1", - "lru-cache": "^8.0.0", + "lru.min": "^1.0.0", "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", "sqlstring": "^2.3.2" @@ -4187,9 +4209,10 @@ } }, "node_modules/typescript": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", - "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/services/booking/src/booking-backend/scripts/test.sh b/services/booking/src/booking-backend/scripts/test.sh index 2e5b18b7..3b22f459 100755 --- a/services/booking/src/booking-backend/scripts/test.sh +++ b/services/booking/src/booking-backend/scripts/test.sh @@ -1,4 +1,21 @@ #!/bin/sh +sudo service rabbitmq-server start +sudo service mariadb start +sudo mysql -e "DROP DATABASE IF EXISTS unittest;" +sudo mysql -e "CREATE DATABASE unittest DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;" +sudo mysql -e "DROP USER IF EXISTS 'test'@localhost;" +sudo mysql -e "CREATE USER 'test'@localhost IDENTIFIED BY 'test';" +sudo mysql -e "GRANT ALL PRIVILEGES ON unittest.* to 'test'@localhost;" +sudo mysql -e "FLUSH PRIVILEGES;" + npm ci -npm test \ No newline at end of file +npm test +result=$? + +sudo mysql -e "DROP USER 'test'@localhost;" +sudo mysql -e "DROP DATABASE unittest;" +sudo service mariadb stop +sudo service rabbitmq-server stop + +exit $result \ No newline at end of file diff --git a/services/booking/src/booking-frontend/package-lock.json b/services/booking/src/booking-frontend/package-lock.json index 0912e4af..9c01f16c 100644 --- a/services/booking/src/booking-frontend/package-lock.json +++ b/services/booking/src/booking-frontend/package-lock.json @@ -23,7 +23,7 @@ "dayjs": "^1.11.7", "express": "^4.18.1", "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "typescript": "^5.5.4" }, "bin": { "crosslab-booking-frontend": "app/index.js" @@ -46,23 +46,24 @@ }, "devDependencies": { "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", + "@eslint/js": "^9.9.0", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "@types/eslint__js": "^8.42.3", + "@types/node": "^22.1.0", + "@types/nunjucks": "^3.2.6", + "@types/seedrandom": "^3.0.8", "copyfiles": "^2.4.1", - "eslint": "^8.48.0", + "eslint": "^9.8.0", "openapi-types": "^12.1.3", - "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" + "prettier": "^3.3.3", + "tsc-watch": "^6.2.0", + "typescript": "^5.5.4", + "typescript-eslint": "^8.1.0" }, "peerDependencies": { "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", "ajv": "^8.11.0", - "ajv-formats": "^2.1.1" + "ajv-formats": "^3.0.1" } }, "../../../../helper/openapi-codegeneration": { @@ -70,34 +71,35 @@ "license": "UNLICENSED", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", - "ajv": "^8.12.0", - "ajv-formats": "^2.1.1", - "commander": "^11.0.0", + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", + "commander": "^12.1.0", "deterministic-json-schema-faker": "^0.5.0-rcv.46", - "glob": "^10.3.4", + "glob": "^11.0.0", "json-schema-merge-allof": "^0.8.1", - "json-schema-to-typescript": "^13.1.1", + "json-schema-to-typescript": "^15.0.0", "nunjucks": "^3.2.4", - "quicktype-core": "^23.0.75", + "quicktype-core": "^23.0.170", "seedrandom": "^3.0.5", "tiny-typed-emitter": "^2.1.0", - "yaml": "^2.3.2" + "yaml": "^2.5.0" }, "bin": { "openapi-codegen": "lib/cjs/index.js" }, "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", + "@eslint/js": "^9.9.0", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "@types/eslint__js": "^8.42.3", + "@types/node": "^22.1.0", + "@types/nunjucks": "^3.2.6", + "@types/seedrandom": "^3.0.8", + "eslint": "^9.8.0", "openapi-types": "^12.1.3", "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" + "tsc-watch": "^6.2.0", + "typescript": "^5.5.4", + "typescript-eslint": "^8.1.0" } }, "../../../common": { @@ -106,27 +108,28 @@ "dependencies": { "express": "^4.18.1", "express-winston": "^4.2.0", - "fetch-retry": "^5.0.6", - "jose": "^4.14.6", + "fetch-retry": "^6.0.0", + "jose": "^5.6.3", "mysql": "^2.18.1", - "sqlite3": "^5.1.6", - "typeorm": "^0.3.17", - "uuid": "^9.0.0", - "winston": "^3.10.0", - "winston-loki": "^6.0.7" + "sqlite3": "^5.1.7", + "typeorm": "^0.3.20", + "uuid": "^10.0.0", + "winston": "^3.14.1", + "winston-loki": "^6.1.2" }, "devDependencies": { + "@eslint/js": "^9.9.0", "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/express": "^4.17.13", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.9", - "@types/uuid": "^9.0.3", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", - "mocha": "^10.2.0", - "prettier": "^3.0.3", - "typescript": "^5.2.2" + "@types/eslint__js": "^8.42.3", + "@types/express": "^4.17.21", + "@types/mocha": "^10.0.7", + "@types/node": "^22.1.0", + "@types/uuid": "^10.0.0", + "eslint": "^9.8.0", + "mocha": "^10.7.0", + "prettier": "^3.3.3", + "typescript": "^5.5.4", + "typescript-eslint": "^8.1.0" } }, "../booking-backend": { @@ -150,8 +153,8 @@ "dayjs": "^1.11.5", "express": "^4.18.1", "lodash": "^4.17.21", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "mysql2": "^3.11.0", + "typescript": "^5.5.4" }, "bin": { "crosslab-booking-backend": "app/index.js" @@ -200,7 +203,7 @@ "dayjs": "^1.11.5", "express": "^4.18.1", "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "typescript": "^5.5.4" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.2.0", @@ -4143,9 +4146,10 @@ } }, "node_modules/typescript": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", - "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/services/booking/src/booking-frontend/scripts/test.sh b/services/booking/src/booking-frontend/scripts/test.sh index 2e5b18b7..3b22f459 100755 --- a/services/booking/src/booking-frontend/scripts/test.sh +++ b/services/booking/src/booking-frontend/scripts/test.sh @@ -1,4 +1,21 @@ #!/bin/sh +sudo service rabbitmq-server start +sudo service mariadb start +sudo mysql -e "DROP DATABASE IF EXISTS unittest;" +sudo mysql -e "CREATE DATABASE unittest DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;" +sudo mysql -e "DROP USER IF EXISTS 'test'@localhost;" +sudo mysql -e "CREATE USER 'test'@localhost IDENTIFIED BY 'test';" +sudo mysql -e "GRANT ALL PRIVILEGES ON unittest.* to 'test'@localhost;" +sudo mysql -e "FLUSH PRIVILEGES;" + npm ci -npm test \ No newline at end of file +npm test +result=$? + +sudo mysql -e "DROP USER 'test'@localhost;" +sudo mysql -e "DROP DATABASE unittest;" +sudo service mariadb stop +sudo service rabbitmq-server stop + +exit $result \ No newline at end of file diff --git a/services/booking/src/common/src/clients/booking-backend/client.ts b/services/booking/src/common/src/clients/booking-backend/client.ts index beb793aa..a7d1aee1 100644 --- a/services/booking/src/common/src/clients/booking-backend/client.ts +++ b/services/booking/src/common/src/clients/booking-backend/client.ts @@ -108,7 +108,7 @@ function isValidHttpUrl(string: string) { * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; + const parameterRegex = '([^/]+)'; const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); const matches = url.match(regex); diff --git a/services/booking/src/common/src/clients/booking-frontend/client.ts b/services/booking/src/common/src/clients/booking-frontend/client.ts index d1071f36..719ff403 100644 --- a/services/booking/src/common/src/clients/booking-frontend/client.ts +++ b/services/booking/src/common/src/clients/booking-frontend/client.ts @@ -108,7 +108,7 @@ function isValidHttpUrl(string: string) { * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; + const parameterRegex = '([^/]+)'; const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); const matches = url.match(regex); diff --git a/services/booking/src/common/src/clients/device/basicValidation.cjs b/services/booking/src/common/src/clients/device/basicValidation.cjs index c1a37652..4db8803d 100644 --- a/services/booking/src/common/src/clients/device/basicValidation.cjs +++ b/services/booking/src/common/src/clients/device/basicValidation.cjs @@ -23705,8 +23705,190 @@ function validate51( validate51.errors = vErrors; return errors === 0; } -exports.validateConnectionStatus = validate52; +exports.validateLoggingMessage = validate52; const schema37 = { + title: 'Logging Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'logging' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'content'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'LoggingMessage', + 'x-location': '#/components/schemas/logging_message', + 'x-schema-type': 'all', +}; +function validate52( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate52.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema37.allOf[0].required, + parentSchema: schema37.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate52.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema37.allOf[0].properties.messageType.type, + parentSchema: schema37.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate52.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema37.allOf[0].type, + parentSchema: schema37.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.content === undefined && (missing1 = 'content')) + ) { + validate52.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema37.allOf[1].required, + parentSchema: schema37.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('logging' !== data1) { + validate52.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'logging' }, + message: 'must be equal to constant', + schema: 'logging', + parentSchema: schema37.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.content !== undefined) { + let data2 = data.content; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + } else { + validate52.errors = [ + { + instancePath: instancePath + '/content', + schemaPath: '#/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema37.allOf[1].properties.content.type, + parentSchema: schema37.allOf[1].properties.content, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate52.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema37.allOf[1].type, + parentSchema: schema37.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate52.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStatus = validate53; +const schema38 = { title: 'Connection Status', type: 'string', description: 'The status of the peerconnection.', @@ -23716,22 +23898,22 @@ const schema37 = { 'x-location': '#/components/schemas/peerconnection_status', 'x-schema-type': 'all', }; -function validate52( +function validate53( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate52.errors = [ + validate53.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema37.type, - parentSchema: schema37, + schema: schema38.type, + parentSchema: schema38, data, }, ]; @@ -23747,25 +23929,25 @@ function validate52( data === 'closed' ) ) { - validate52.errors = [ + validate53.errors = [ { instancePath, schemaPath: '#/enum', keyword: 'enum', - params: { allowedValues: schema37.enum }, + params: { allowedValues: schema38.enum }, message: 'must be equal to one of the allowed values', - schema: schema37.enum, - parentSchema: schema37, + schema: schema38.enum, + parentSchema: schema38, data, }, ]; return false; } - validate52.errors = vErrors; + validate53.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionCommon = validate53; -const schema38 = { +exports.validatePeerconnectionCommon = validate54; +const schema39 = { type: 'object', title: 'Peerconnection Common', properties: { @@ -23794,7 +23976,7 @@ const schema38 = { 'x-location': '#/components/schemas/peerconnection_common', 'x-schema-type': 'all', }; -function validate53( +function validate54( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -23808,15 +23990,15 @@ function validate53( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate53.errors = [ + validate54.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema38.required, - parentSchema: schema38, + schema: schema39.required, + parentSchema: schema39, data, }, ]; @@ -23829,7 +24011,7 @@ function validate53( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate53.errors = [ + validate54.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/format', @@ -23837,22 +24019,22 @@ function validate53( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema38.properties.url, + parentSchema: schema39.properties.url, data: data0, }, ]; return false; } } else { - validate53.errors = [ + validate54.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema38.properties.url.type, - parentSchema: schema38.properties.url, + schema: schema39.properties.url.type, + parentSchema: schema39.properties.url, data: data0, }, ]; @@ -23869,30 +24051,30 @@ function validate53( let data1 = data.type; const _errs3 = errors; if (typeof data1 !== 'string') { - validate53.errors = [ + validate54.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema38.properties.type.type, - parentSchema: schema38.properties.type, + schema: schema39.properties.type.type, + parentSchema: schema39.properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate53.errors = [ + validate54.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema38.properties.type.enum }, + params: { allowedValues: schema39.properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema38.properties.type.enum, - parentSchema: schema38.properties.type, + schema: schema39.properties.type.enum, + parentSchema: schema39.properties.type, data: data1, }, ]; @@ -23907,15 +24089,15 @@ function validate53( let data2 = data.status; const _errs5 = errors; if (typeof data2 !== 'string') { - validate53.errors = [ + validate54.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema38.properties.status.type, - parentSchema: schema38.properties.status, + schema: schema39.properties.status.type, + parentSchema: schema39.properties.status, data: data2, }, ]; @@ -23931,15 +24113,15 @@ function validate53( data2 === 'closed' ) ) { - validate53.errors = [ + validate54.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema38.properties.status.enum }, + params: { allowedValues: schema39.properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema38.properties.status.enum, - parentSchema: schema38.properties.status, + schema: schema39.properties.status.enum, + parentSchema: schema39.properties.status, data: data2, }, ]; @@ -23953,26 +24135,26 @@ function validate53( } } } else { - validate53.errors = [ + validate54.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema38.type, - parentSchema: schema38, + schema: schema39.type, + parentSchema: schema39, data, }, ]; return false; } } - validate53.errors = vErrors; + validate54.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionOverview = validate54; -const schema39 = { +exports.validatePeerconnectionOverview = validate55; +const schema40 = { title: 'Peerconnection Overview', allOf: [ { @@ -24025,7 +24207,7 @@ const schema39 = { 'x-location': '#/components/schemas/peerconnection_overview', 'x-schema-type': 'all', }; -function validate54( +function validate55( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -24040,15 +24222,15 @@ function validate54( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate54.errors = [ + validate55.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema39.allOf[0].required, - parentSchema: schema39.allOf[0], + schema: schema40.allOf[0].required, + parentSchema: schema40.allOf[0], data, }, ]; @@ -24061,7 +24243,7 @@ function validate54( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -24069,22 +24251,22 @@ function validate54( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema39.allOf[0].properties.url, + parentSchema: schema40.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema39.allOf[0].properties.url.type, - parentSchema: schema39.allOf[0].properties.url, + schema: schema40.allOf[0].properties.url.type, + parentSchema: schema40.allOf[0].properties.url, data: data0, }, ]; @@ -24101,30 +24283,30 @@ function validate54( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema39.allOf[0].properties.type.type, - parentSchema: schema39.allOf[0].properties.type, + schema: schema40.allOf[0].properties.type.type, + parentSchema: schema40.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema39.allOf[0].properties.type.enum }, + params: { allowedValues: schema40.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema39.allOf[0].properties.type.enum, - parentSchema: schema39.allOf[0].properties.type, + schema: schema40.allOf[0].properties.type.enum, + parentSchema: schema40.allOf[0].properties.type, data: data1, }, ]; @@ -24139,15 +24321,15 @@ function validate54( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema39.allOf[0].properties.status.type, - parentSchema: schema39.allOf[0].properties.status, + schema: schema40.allOf[0].properties.status.type, + parentSchema: schema40.allOf[0].properties.status, data: data2, }, ]; @@ -24163,15 +24345,15 @@ function validate54( data2 === 'closed' ) ) { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema39.allOf[0].properties.status.enum }, + params: { allowedValues: schema40.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema39.allOf[0].properties.status.enum, - parentSchema: schema39.allOf[0].properties.status, + schema: schema40.allOf[0].properties.status.enum, + parentSchema: schema40.allOf[0].properties.status, data: data2, }, ]; @@ -24185,15 +24367,15 @@ function validate54( } } } else { - validate54.errors = [ + validate55.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema39.allOf[0].type, - parentSchema: schema39.allOf[0], + schema: schema40.allOf[0].type, + parentSchema: schema40.allOf[0], data, }, ]; @@ -24207,15 +24389,15 @@ function validate54( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate54.errors = [ + validate55.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema39.allOf[1].required, - parentSchema: schema39.allOf[1], + schema: schema40.allOf[1].required, + parentSchema: schema40.allOf[1], data, }, ]; @@ -24227,7 +24409,7 @@ function validate54( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -24235,14 +24417,14 @@ function validate54( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema39.allOf[1].properties.devices, + parentSchema: schema40.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -24250,7 +24432,7 @@ function validate54( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema39.allOf[1].properties.devices, + parentSchema: schema40.allOf[1].properties.devices, data: data3, }, ]; @@ -24265,7 +24447,7 @@ function validate54( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -24273,8 +24455,8 @@ function validate54( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema39.allOf[1].properties.devices.items.required, - parentSchema: schema39.allOf[1].properties.devices.items, + schema40.allOf[1].properties.devices.items.required, + parentSchema: schema40.allOf[1].properties.devices.items, data: data4, }, ]; @@ -24287,7 +24469,7 @@ function validate54( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -24298,7 +24480,7 @@ function validate54( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema39.allOf[1].properties.devices.items + schema40.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -24306,7 +24488,7 @@ function validate54( return false; } } else { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -24316,10 +24498,10 @@ function validate54( params: { type: 'string' }, message: 'must be string', schema: - schema39.allOf[1].properties.devices.items + schema40.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema39.allOf[1].properties.devices.items + schema40.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -24331,15 +24513,15 @@ function validate54( } } } else { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema39.allOf[1].properties.devices.items.type, - parentSchema: schema39.allOf[1].properties.devices.items, + schema: schema40.allOf[1].properties.devices.items.type, + parentSchema: schema40.allOf[1].properties.devices.items, data: data4, }, ]; @@ -24354,15 +24536,15 @@ function validate54( } } } else { - validate54.errors = [ + validate55.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema39.allOf[1].properties.devices.type, - parentSchema: schema39.allOf[1].properties.devices, + schema: schema40.allOf[1].properties.devices.type, + parentSchema: schema40.allOf[1].properties.devices, data: data3, }, ]; @@ -24372,15 +24554,15 @@ function validate54( } } } else { - validate54.errors = [ + validate55.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema39.allOf[1].type, - parentSchema: schema39.allOf[1], + schema: schema40.allOf[1].type, + parentSchema: schema40.allOf[1], data, }, ]; @@ -24389,11 +24571,11 @@ function validate54( } var valid0 = _errs8 === errors; } - validate54.errors = vErrors; + validate55.errors = vErrors; return errors === 0; } -exports.validateConfiguredDeviceReference = validate55; -const schema40 = { +exports.validateConfiguredDeviceReference = validate56; +const schema41 = { title: 'Configured Device Reference', type: 'object', properties: { @@ -24424,7 +24606,7 @@ const schema40 = { 'x-location': '#/components/schemas/configured_device_reference', 'x-schema-type': 'all', }; -function validate55( +function validate56( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -24434,15 +24616,15 @@ function validate55( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.url === undefined && (missing0 = 'url')) { - validate55.errors = [ + validate56.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema40.required, - parentSchema: schema40, + schema: schema41.required, + parentSchema: schema41, data, }, ]; @@ -24455,7 +24637,7 @@ function validate55( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate55.errors = [ + validate56.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/format', @@ -24463,22 +24645,22 @@ function validate55( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema40.properties.url, + parentSchema: schema41.properties.url, data: data0, }, ]; return false; } } else { - validate55.errors = [ + validate56.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema40.properties.url.type, - parentSchema: schema40.properties.url, + schema: schema41.properties.url.type, + parentSchema: schema41.properties.url, data: data0, }, ]; @@ -24521,7 +24703,7 @@ function validate55( (data3.remoteServiceId === undefined && (missing1 = 'remoteServiceId')) ) { - validate55.errors = [ + validate56.errors = [ { instancePath: instancePath + '/config/services/' + i0, schemaPath: @@ -24531,10 +24713,10 @@ function validate55( message: "must have required property '" + missing1 + "'", schema: - schema40.properties.config.properties.services.items + schema41.properties.config.properties.services.items .required, parentSchema: - schema40.properties.config.properties.services.items, + schema41.properties.config.properties.services.items, data: data3, }, ]; @@ -24547,7 +24729,7 @@ function validate55( if (errors === _errs10) { if (typeof data4 === 'string') { if (!formats0(data4)) { - validate55.errors = [ + validate56.errors = [ { instancePath: instancePath + @@ -24561,7 +24743,7 @@ function validate55( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema40.properties.config.properties + schema41.properties.config.properties .services.items.properties.serviceType, data: data4, }, @@ -24569,7 +24751,7 @@ function validate55( return false; } } else { - validate55.errors = [ + validate56.errors = [ { instancePath: instancePath + @@ -24582,10 +24764,10 @@ function validate55( params: { type: 'string' }, message: 'must be string', schema: - schema40.properties.config.properties.services + schema41.properties.config.properties.services .items.properties.serviceType.type, parentSchema: - schema40.properties.config.properties.services + schema41.properties.config.properties.services .items.properties.serviceType, data: data4, }, @@ -24603,7 +24785,7 @@ function validate55( let data5 = data3.serviceId; const _errs12 = errors; if (typeof data5 !== 'string') { - validate55.errors = [ + validate56.errors = [ { instancePath: instancePath + @@ -24616,10 +24798,10 @@ function validate55( params: { type: 'string' }, message: 'must be string', schema: - schema40.properties.config.properties.services + schema41.properties.config.properties.services .items.properties.serviceId.type, parentSchema: - schema40.properties.config.properties.services + schema41.properties.config.properties.services .items.properties.serviceId, data: data5, }, @@ -24635,7 +24817,7 @@ function validate55( let data6 = data3.remoteServiceId; const _errs14 = errors; if (typeof data6 !== 'string') { - validate55.errors = [ + validate56.errors = [ { instancePath: instancePath + @@ -24648,10 +24830,10 @@ function validate55( params: { type: 'string' }, message: 'must be string', schema: - schema40.properties.config.properties.services + schema41.properties.config.properties.services .items.properties.remoteServiceId.type, parentSchema: - schema40.properties.config.properties.services + schema41.properties.config.properties.services .items.properties.remoteServiceId, data: data6, }, @@ -24666,7 +24848,7 @@ function validate55( } } } else { - validate55.errors = [ + validate56.errors = [ { instancePath: instancePath + '/config/services/' + i0, schemaPath: @@ -24675,10 +24857,10 @@ function validate55( params: { type: 'object' }, message: 'must be object', schema: - schema40.properties.config.properties.services.items + schema41.properties.config.properties.services.items .type, parentSchema: - schema40.properties.config.properties.services.items, + schema41.properties.config.properties.services.items, data: data3, }, ]; @@ -24691,15 +24873,15 @@ function validate55( } } } else { - validate55.errors = [ + validate56.errors = [ { instancePath: instancePath + '/config/services', schemaPath: '#/properties/config/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema40.properties.config.properties.services.type, - parentSchema: schema40.properties.config.properties.services, + schema: schema41.properties.config.properties.services.type, + parentSchema: schema41.properties.config.properties.services, data: data2, }, ]; @@ -24708,15 +24890,15 @@ function validate55( } } } else { - validate55.errors = [ + validate56.errors = [ { instancePath: instancePath + '/config', schemaPath: '#/properties/config/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema40.properties.config.type, - parentSchema: schema40.properties.config, + schema: schema41.properties.config.type, + parentSchema: schema41.properties.config, data: data1, }, ]; @@ -24730,26 +24912,26 @@ function validate55( } } } else { - validate55.errors = [ + validate56.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema40.type, - parentSchema: schema40, + schema: schema41.type, + parentSchema: schema41, data, }, ]; return false; } } - validate55.errors = vErrors; + validate56.errors = vErrors; return errors === 0; } -exports.validatePeerconnection = validate56; -const schema41 = { +exports.validatePeerconnection = validate57; +const schema42 = { title: 'Peerconnection', allOf: [ { @@ -24822,7 +25004,7 @@ const schema41 = { 'x-location': '#/components/schemas/peerconnection', 'x-schema-type': 'all', }; -function validate56( +function validate57( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -24837,15 +25019,15 @@ function validate56( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate56.errors = [ + validate57.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema41.allOf[0].required, - parentSchema: schema41.allOf[0], + schema: schema42.allOf[0].required, + parentSchema: schema42.allOf[0], data, }, ]; @@ -24858,7 +25040,7 @@ function validate56( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -24866,22 +25048,22 @@ function validate56( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema41.allOf[0].properties.url, + parentSchema: schema42.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema41.allOf[0].properties.url.type, - parentSchema: schema41.allOf[0].properties.url, + schema: schema42.allOf[0].properties.url.type, + parentSchema: schema42.allOf[0].properties.url, data: data0, }, ]; @@ -24898,30 +25080,30 @@ function validate56( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema41.allOf[0].properties.type.type, - parentSchema: schema41.allOf[0].properties.type, + schema: schema42.allOf[0].properties.type.type, + parentSchema: schema42.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema41.allOf[0].properties.type.enum }, + params: { allowedValues: schema42.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema41.allOf[0].properties.type.enum, - parentSchema: schema41.allOf[0].properties.type, + schema: schema42.allOf[0].properties.type.enum, + parentSchema: schema42.allOf[0].properties.type, data: data1, }, ]; @@ -24936,15 +25118,15 @@ function validate56( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema41.allOf[0].properties.status.type, - parentSchema: schema41.allOf[0].properties.status, + schema: schema42.allOf[0].properties.status.type, + parentSchema: schema42.allOf[0].properties.status, data: data2, }, ]; @@ -24960,15 +25142,15 @@ function validate56( data2 === 'closed' ) ) { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema41.allOf[0].properties.status.enum }, + params: { allowedValues: schema42.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema41.allOf[0].properties.status.enum, - parentSchema: schema41.allOf[0].properties.status, + schema: schema42.allOf[0].properties.status.enum, + parentSchema: schema42.allOf[0].properties.status, data: data2, }, ]; @@ -24982,15 +25164,15 @@ function validate56( } } } else { - validate56.errors = [ + validate57.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema41.allOf[0].type, - parentSchema: schema41.allOf[0], + schema: schema42.allOf[0].type, + parentSchema: schema42.allOf[0], data, }, ]; @@ -25004,15 +25186,15 @@ function validate56( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate56.errors = [ + validate57.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema41.allOf[1].required, - parentSchema: schema41.allOf[1], + schema: schema42.allOf[1].required, + parentSchema: schema42.allOf[1], data, }, ]; @@ -25024,7 +25206,7 @@ function validate56( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -25032,14 +25214,14 @@ function validate56( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema41.allOf[1].properties.devices, + parentSchema: schema42.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -25047,7 +25229,7 @@ function validate56( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema41.allOf[1].properties.devices, + parentSchema: schema42.allOf[1].properties.devices, data: data3, }, ]; @@ -25062,7 +25244,7 @@ function validate56( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -25070,8 +25252,8 @@ function validate56( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema41.allOf[1].properties.devices.items.required, - parentSchema: schema41.allOf[1].properties.devices.items, + schema42.allOf[1].properties.devices.items.required, + parentSchema: schema42.allOf[1].properties.devices.items, data: data4, }, ]; @@ -25084,7 +25266,7 @@ function validate56( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -25095,7 +25277,7 @@ function validate56( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema41.allOf[1].properties.devices.items + schema42.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -25103,7 +25285,7 @@ function validate56( return false; } } else { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -25113,10 +25295,10 @@ function validate56( params: { type: 'string' }, message: 'must be string', schema: - schema41.allOf[1].properties.devices.items + schema42.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema41.allOf[1].properties.devices.items + schema42.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -25164,7 +25346,7 @@ function validate56( (data8.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + @@ -25183,12 +25365,12 @@ function validate56( missing3 + "'", schema: - schema41.allOf[1].properties + schema42.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema41.allOf[1].properties + schema42.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -25203,7 +25385,7 @@ function validate56( if (errors === _errs23) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + @@ -25222,7 +25404,7 @@ function validate56( '"', schema: 'uri', parentSchema: - schema41.allOf[1] + schema42.allOf[1] .properties.devices .items.properties .config.properties @@ -25235,7 +25417,7 @@ function validate56( return false; } } else { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + @@ -25250,14 +25432,14 @@ function validate56( params: { type: 'string' }, message: 'must be string', schema: - schema41.allOf[1] + schema42.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema41.allOf[1] + schema42.allOf[1] .properties.devices .items.properties.config .properties.services @@ -25279,7 +25461,7 @@ function validate56( let data10 = data8.serviceId; const _errs25 = errors; if (typeof data10 !== 'string') { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + @@ -25294,13 +25476,13 @@ function validate56( params: { type: 'string' }, message: 'must be string', schema: - schema41.allOf[1].properties + schema42.allOf[1].properties .devices.items.properties .config.properties .services.items.properties .serviceId.type, parentSchema: - schema41.allOf[1].properties + schema42.allOf[1].properties .devices.items.properties .config.properties .services.items.properties @@ -25323,7 +25505,7 @@ function validate56( data8.remoteServiceId; const _errs27 = errors; if (typeof data11 !== 'string') { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + @@ -25338,14 +25520,14 @@ function validate56( params: { type: 'string' }, message: 'must be string', schema: - schema41.allOf[1] + schema42.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema41.allOf[1] + schema42.allOf[1] .properties.devices .items.properties.config .properties.services @@ -25364,7 +25546,7 @@ function validate56( } } } else { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + @@ -25378,11 +25560,11 @@ function validate56( params: { type: 'object' }, message: 'must be object', schema: - schema41.allOf[1].properties.devices + schema42.allOf[1].properties.devices .items.properties.config .properties.services.items.type, parentSchema: - schema41.allOf[1].properties.devices + schema42.allOf[1].properties.devices .items.properties.config .properties.services.items, data: data8, @@ -25397,7 +25579,7 @@ function validate56( } } } else { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + @@ -25410,11 +25592,11 @@ function validate56( params: { type: 'array' }, message: 'must be array', schema: - schema41.allOf[1].properties.devices.items + schema42.allOf[1].properties.devices.items .properties.config.properties.services .type, parentSchema: - schema41.allOf[1].properties.devices.items + schema42.allOf[1].properties.devices.items .properties.config.properties.services, data: data7, }, @@ -25424,7 +25606,7 @@ function validate56( } } } else { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -25434,10 +25616,10 @@ function validate56( params: { type: 'object' }, message: 'must be object', schema: - schema41.allOf[1].properties.devices.items + schema42.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema41.allOf[1].properties.devices.items + schema42.allOf[1].properties.devices.items .properties.config, data: data6, }, @@ -25452,15 +25634,15 @@ function validate56( } } } else { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema41.allOf[1].properties.devices.items.type, - parentSchema: schema41.allOf[1].properties.devices.items, + schema: schema42.allOf[1].properties.devices.items.type, + parentSchema: schema42.allOf[1].properties.devices.items, data: data4, }, ]; @@ -25475,15 +25657,15 @@ function validate56( } } } else { - validate56.errors = [ + validate57.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema41.allOf[1].properties.devices.type, - parentSchema: schema41.allOf[1].properties.devices, + schema: schema42.allOf[1].properties.devices.type, + parentSchema: schema42.allOf[1].properties.devices, data: data3, }, ]; @@ -25493,15 +25675,15 @@ function validate56( } } } else { - validate56.errors = [ + validate57.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema41.allOf[1].type, - parentSchema: schema41.allOf[1], + schema: schema42.allOf[1].type, + parentSchema: schema42.allOf[1], data, }, ]; @@ -25510,11 +25692,11 @@ function validate56( } var valid0 = _errs8 === errors; } - validate56.errors = vErrors; + validate57.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionClosedEventCallback = validate57; -const schema42 = { +exports.validatePeerconnectionClosedEventCallback = validate58; +const schema43 = { title: 'Peerconnection Closed Event Callback', allOf: [ { @@ -25632,7 +25814,7 @@ const schema42 = { 'x-location': '#/components/schemas/peerconnection_closed', 'x-schema-type': 'all', }; -function validate57( +function validate58( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -25644,15 +25826,15 @@ function validate57( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate57.errors = [ + validate58.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema42.allOf[0].allOf[0].required, - parentSchema: schema42.allOf[0].allOf[0], + schema: schema43.allOf[0].allOf[0].required, + parentSchema: schema43.allOf[0].allOf[0], data, }, ]; @@ -25661,15 +25843,15 @@ function validate57( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema42.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema42.allOf[0].allOf[0].properties.callbackType, + schema: schema43.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema43.allOf[0].allOf[0].properties.callbackType, data: data0, }, ]; @@ -25678,15 +25860,15 @@ function validate57( } } } else { - validate57.errors = [ + validate58.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema42.allOf[0].allOf[0].type, - parentSchema: schema42.allOf[0].allOf[0], + schema: schema43.allOf[0].allOf[0].type, + parentSchema: schema43.allOf[0].allOf[0], data, }, ]; @@ -25703,15 +25885,15 @@ function validate57( (data.callbackType === undefined && (missing1 = 'callbackType')) || (data.eventType === undefined && (missing1 = 'eventType')) ) { - validate57.errors = [ + validate58.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema42.allOf[0].allOf[1].required, - parentSchema: schema42.allOf[0].allOf[1], + schema: schema43.allOf[0].allOf[1].required, + parentSchema: schema43.allOf[0].allOf[1], data, }, ]; @@ -25721,33 +25903,33 @@ function validate57( let data1 = data.callbackType; const _errs7 = errors; if (typeof data1 !== 'string') { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema42.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema42.allOf[0].allOf[1].properties.callbackType, + schema: schema43.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema43.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; return false; } if (!(data1 === 'event')) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', keyword: 'enum', params: { allowedValues: - schema42.allOf[0].allOf[1].properties.callbackType.enum, + schema43.allOf[0].allOf[1].properties.callbackType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema42.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema42.allOf[0].allOf[1].properties.callbackType, + schema: schema43.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema43.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; @@ -25762,15 +25944,15 @@ function validate57( let data2 = data.eventType; const _errs9 = errors; if (typeof data2 !== 'string') { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema42.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema42.allOf[0].allOf[1].properties.eventType, + schema: schema43.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema43.allOf[0].allOf[1].properties.eventType, data: data2, }, ]; @@ -25783,15 +25965,15 @@ function validate57( } } } else { - validate57.errors = [ + validate58.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema42.allOf[0].allOf[1].type, - parentSchema: schema42.allOf[0].allOf[1], + schema: schema43.allOf[0].allOf[1].type, + parentSchema: schema43.allOf[0].allOf[1], data, }, ]; @@ -25810,15 +25992,15 @@ function validate57( (data.eventType === undefined && (missing2 = 'eventType')) || (data.peerconnection === undefined && (missing2 = 'peerconnection')) ) { - validate57.errors = [ + validate58.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema42.allOf[1].required, - parentSchema: schema42.allOf[1], + schema: schema43.allOf[1].required, + parentSchema: schema43.allOf[1], data, }, ]; @@ -25828,30 +26010,30 @@ function validate57( let data3 = data.eventType; const _errs13 = errors; if (typeof data3 !== 'string') { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema42.allOf[1].properties.eventType.type, - parentSchema: schema42.allOf[1].properties.eventType, + schema: schema43.allOf[1].properties.eventType.type, + parentSchema: schema43.allOf[1].properties.eventType, data: data3, }, ]; return false; } if (!(data3 === 'peerconnection-closed')) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/enum', keyword: 'enum', - params: { allowedValues: schema42.allOf[1].properties.eventType.enum }, + params: { allowedValues: schema43.allOf[1].properties.eventType.enum }, message: 'must be equal to one of the allowed values', - schema: schema42.allOf[1].properties.eventType.enum, - parentSchema: schema42.allOf[1].properties.eventType, + schema: schema43.allOf[1].properties.eventType.enum, + parentSchema: schema43.allOf[1].properties.eventType, data: data3, }, ]; @@ -25874,7 +26056,7 @@ function validate57( (data4.type === undefined && (missing3 = 'type')) || (data4.status === undefined && (missing3 = 'status')) ) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -25883,9 +26065,9 @@ function validate57( params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", schema: - schema42.allOf[1].properties.peerconnection.allOf[0].required, + schema43.allOf[1].properties.peerconnection.allOf[0].required, parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0], + schema43.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -25898,7 +26080,7 @@ function validate57( if (errors === _errs18) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection/url', schemaPath: @@ -25908,7 +26090,7 @@ function validate57( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.url, data: data5, }, @@ -25916,7 +26098,7 @@ function validate57( return false; } } else { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection/url', schemaPath: @@ -25925,10 +26107,10 @@ function validate57( params: { type: 'string' }, message: 'must be string', schema: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.url.type, parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.url, data: data5, }, @@ -25946,7 +26128,7 @@ function validate57( let data6 = data4.type; const _errs20 = errors; if (typeof data6 !== 'string') { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -25955,10 +26137,10 @@ function validate57( params: { type: 'string' }, message: 'must be string', schema: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.type.type, parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data6, }, @@ -25966,7 +26148,7 @@ function validate57( return false; } if (!(data6 === 'local' || data6 === 'webrtc')) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -25974,15 +26156,15 @@ function validate57( keyword: 'enum', params: { allowedValues: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data6, }, @@ -25998,7 +26180,7 @@ function validate57( let data7 = data4.status; const _errs22 = errors; if (typeof data7 !== 'string') { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection/status', schemaPath: @@ -26007,10 +26189,10 @@ function validate57( params: { type: 'string' }, message: 'must be string', schema: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.status.type, parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.status, data: data7, }, @@ -26027,7 +26209,7 @@ function validate57( data7 === 'closed' ) ) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection/status', schemaPath: @@ -26035,15 +26217,15 @@ function validate57( keyword: 'enum', params: { allowedValues: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.status.enum, }, message: 'must be equal to one of the allowed values', schema: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.status.enum, parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[0] + schema43.allOf[1].properties.peerconnection.allOf[0] .properties.status, data: data7, }, @@ -26058,15 +26240,15 @@ function validate57( } } } else { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema42.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema42.allOf[1].properties.peerconnection.allOf[0], + schema: schema43.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema43.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -26080,7 +26262,7 @@ function validate57( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing4; if (data4.devices === undefined && (missing4 = 'devices')) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -26089,9 +26271,9 @@ function validate57( params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'", schema: - schema42.allOf[1].properties.peerconnection.allOf[1].required, + schema43.allOf[1].properties.peerconnection.allOf[1].required, parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[1], + schema43.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -26103,7 +26285,7 @@ function validate57( if (errors === _errs26) { if (Array.isArray(data8)) { if (data8.length > 2) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -26113,7 +26295,7 @@ function validate57( message: 'must NOT have more than 2 items', schema: 2, parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[1] + schema43.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data8, }, @@ -26121,7 +26303,7 @@ function validate57( return false; } else { if (data8.length < 2) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection/devices', @@ -26132,7 +26314,7 @@ function validate57( message: 'must NOT have fewer than 2 items', schema: 2, parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[1] + schema43.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data8, }, @@ -26152,7 +26334,7 @@ function validate57( ) { let missing5; if (data9.url === undefined && (missing5 = 'url')) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + @@ -26167,11 +26349,11 @@ function validate57( missing5 + "'", schema: - schema42.allOf[1].properties.peerconnection + schema43.allOf[1].properties.peerconnection .allOf[1].properties.devices.items .required, parentSchema: - schema42.allOf[1].properties.peerconnection + schema43.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data9, }, @@ -26185,7 +26367,7 @@ function validate57( if (errors === _errs30) { if (typeof data10 === 'string') { if (!formats0(data10)) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + @@ -26202,7 +26384,7 @@ function validate57( '"', schema: 'uri', parentSchema: - schema42.allOf[1].properties + schema43.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -26212,7 +26394,7 @@ function validate57( return false; } } else { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + @@ -26225,12 +26407,12 @@ function validate57( params: { type: 'string' }, message: 'must be string', schema: - schema42.allOf[1].properties + schema43.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url.type, parentSchema: - schema42.allOf[1].properties + schema43.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -26286,7 +26468,7 @@ function validate57( (missing6 = 'remoteServiceId')) ) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + @@ -26306,7 +26488,7 @@ function validate57( missing6 + "'", schema: - schema42.allOf[1] + schema43.allOf[1] .properties .peerconnection .allOf[1].properties @@ -26315,7 +26497,7 @@ function validate57( .properties.services .items.required, parentSchema: - schema42.allOf[1] + schema43.allOf[1] .properties .peerconnection .allOf[1].properties @@ -26346,7 +26528,7 @@ function validate57( if ( !formats0(data14) ) { - validate57.errors = + validate58.errors = [ { instancePath: @@ -26371,7 +26553,7 @@ function validate57( schema: 'uri', parentSchema: - schema42 + schema43 .allOf[1] .properties .peerconnection @@ -26392,7 +26574,7 @@ function validate57( return false; } } else { - validate57.errors = + validate58.errors = [ { instancePath: @@ -26412,7 +26594,7 @@ function validate57( message: 'must be string', schema: - schema42 + schema43 .allOf[1] .properties .peerconnection @@ -26429,7 +26611,7 @@ function validate57( .serviceType .type, parentSchema: - schema42 + schema43 .allOf[1] .properties .peerconnection @@ -26468,7 +26650,7 @@ function validate57( typeof data15 !== 'string' ) { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + @@ -26486,7 +26668,7 @@ function validate57( message: 'must be string', schema: - schema42 + schema43 .allOf[1] .properties .peerconnection @@ -26502,7 +26684,7 @@ function validate57( .serviceId .type, parentSchema: - schema42 + schema43 .allOf[1] .properties .peerconnection @@ -26539,7 +26721,7 @@ function validate57( typeof data16 !== 'string' ) { - validate57.errors = + validate58.errors = [ { instancePath: @@ -26559,7 +26741,7 @@ function validate57( message: 'must be string', schema: - schema42 + schema43 .allOf[1] .properties .peerconnection @@ -26576,7 +26758,7 @@ function validate57( .remoteServiceId .type, parentSchema: - schema42 + schema43 .allOf[1] .properties .peerconnection @@ -26605,7 +26787,7 @@ function validate57( } } } else { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + @@ -26621,7 +26803,7 @@ function validate57( }, message: 'must be object', schema: - schema42.allOf[1] + schema43.allOf[1] .properties .peerconnection .allOf[1].properties @@ -26630,7 +26812,7 @@ function validate57( .properties.services .items.type, parentSchema: - schema42.allOf[1] + schema43.allOf[1] .properties .peerconnection .allOf[1].properties @@ -26650,7 +26832,7 @@ function validate57( } } } else { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + @@ -26663,13 +26845,13 @@ function validate57( params: { type: 'array' }, message: 'must be array', schema: - schema42.allOf[1].properties + schema43.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config .properties.services.type, parentSchema: - schema42.allOf[1].properties + schema43.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config @@ -26682,7 +26864,7 @@ function validate57( } } } else { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + @@ -26695,12 +26877,12 @@ function validate57( params: { type: 'object' }, message: 'must be object', schema: - schema42.allOf[1].properties + schema43.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config.type, parentSchema: - schema42.allOf[1].properties + schema43.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config, @@ -26717,7 +26899,7 @@ function validate57( } } } else { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + @@ -26729,10 +26911,10 @@ function validate57( params: { type: 'object' }, message: 'must be object', schema: - schema42.allOf[1].properties.peerconnection + schema43.allOf[1].properties.peerconnection .allOf[1].properties.devices.items.type, parentSchema: - schema42.allOf[1].properties.peerconnection + schema43.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data9, }, @@ -26748,7 +26930,7 @@ function validate57( } } } else { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -26757,10 +26939,10 @@ function validate57( params: { type: 'array' }, message: 'must be array', schema: - schema42.allOf[1].properties.peerconnection.allOf[1] + schema43.allOf[1].properties.peerconnection.allOf[1] .properties.devices.type, parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[1] + schema43.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data8, }, @@ -26771,16 +26953,16 @@ function validate57( } } } else { - validate57.errors = [ + validate58.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema42.allOf[1].properties.peerconnection.allOf[1].type, + schema: schema43.allOf[1].properties.peerconnection.allOf[1].type, parentSchema: - schema42.allOf[1].properties.peerconnection.allOf[1], + schema43.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -26796,15 +26978,15 @@ function validate57( } } } else { - validate57.errors = [ + validate58.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema42.allOf[1].type, - parentSchema: schema42.allOf[1], + schema: schema43.allOf[1].type, + parentSchema: schema43.allOf[1], data, }, ]; @@ -26813,11 +26995,11 @@ function validate57( } var valid0 = _errs11 === errors; } - validate57.errors = vErrors; + validate58.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionStatusChangedEventCallback = validate58; -const schema43 = { +exports.validatePeerconnectionStatusChangedEventCallback = validate59; +const schema44 = { title: 'Peerconnection Status Changed Event Callback', allOf: [ { @@ -26935,7 +27117,7 @@ const schema43 = { 'x-location': '#/components/schemas/peerconnection_status_changed', 'x-schema-type': 'all', }; -function validate58( +function validate59( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -26947,15 +27129,15 @@ function validate58( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate58.errors = [ + validate59.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema43.allOf[0].allOf[0].required, - parentSchema: schema43.allOf[0].allOf[0], + schema: schema44.allOf[0].allOf[0].required, + parentSchema: schema44.allOf[0].allOf[0], data, }, ]; @@ -26964,15 +27146,15 @@ function validate58( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema43.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema43.allOf[0].allOf[0].properties.callbackType, + schema: schema44.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema44.allOf[0].allOf[0].properties.callbackType, data: data0, }, ]; @@ -26981,15 +27163,15 @@ function validate58( } } } else { - validate58.errors = [ + validate59.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema43.allOf[0].allOf[0].type, - parentSchema: schema43.allOf[0].allOf[0], + schema: schema44.allOf[0].allOf[0].type, + parentSchema: schema44.allOf[0].allOf[0], data, }, ]; @@ -27006,15 +27188,15 @@ function validate58( (data.callbackType === undefined && (missing1 = 'callbackType')) || (data.eventType === undefined && (missing1 = 'eventType')) ) { - validate58.errors = [ + validate59.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema43.allOf[0].allOf[1].required, - parentSchema: schema43.allOf[0].allOf[1], + schema: schema44.allOf[0].allOf[1].required, + parentSchema: schema44.allOf[0].allOf[1], data, }, ]; @@ -27024,33 +27206,33 @@ function validate58( let data1 = data.callbackType; const _errs7 = errors; if (typeof data1 !== 'string') { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema43.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema43.allOf[0].allOf[1].properties.callbackType, + schema: schema44.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema44.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; return false; } if (!(data1 === 'event')) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', keyword: 'enum', params: { allowedValues: - schema43.allOf[0].allOf[1].properties.callbackType.enum, + schema44.allOf[0].allOf[1].properties.callbackType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema43.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema43.allOf[0].allOf[1].properties.callbackType, + schema: schema44.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema44.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; @@ -27065,15 +27247,15 @@ function validate58( let data2 = data.eventType; const _errs9 = errors; if (typeof data2 !== 'string') { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema43.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema43.allOf[0].allOf[1].properties.eventType, + schema: schema44.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema44.allOf[0].allOf[1].properties.eventType, data: data2, }, ]; @@ -27086,15 +27268,15 @@ function validate58( } } } else { - validate58.errors = [ + validate59.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema43.allOf[0].allOf[1].type, - parentSchema: schema43.allOf[0].allOf[1], + schema: schema44.allOf[0].allOf[1].type, + parentSchema: schema44.allOf[0].allOf[1], data, }, ]; @@ -27113,15 +27295,15 @@ function validate58( (data.eventType === undefined && (missing2 = 'eventType')) || (data.peerconnection === undefined && (missing2 = 'peerconnection')) ) { - validate58.errors = [ + validate59.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema43.allOf[1].required, - parentSchema: schema43.allOf[1], + schema: schema44.allOf[1].required, + parentSchema: schema44.allOf[1], data, }, ]; @@ -27131,30 +27313,30 @@ function validate58( let data3 = data.eventType; const _errs13 = errors; if (typeof data3 !== 'string') { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema43.allOf[1].properties.eventType.type, - parentSchema: schema43.allOf[1].properties.eventType, + schema: schema44.allOf[1].properties.eventType.type, + parentSchema: schema44.allOf[1].properties.eventType, data: data3, }, ]; return false; } if (!(data3 === 'peerconnection-status-changed')) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/enum', keyword: 'enum', - params: { allowedValues: schema43.allOf[1].properties.eventType.enum }, + params: { allowedValues: schema44.allOf[1].properties.eventType.enum }, message: 'must be equal to one of the allowed values', - schema: schema43.allOf[1].properties.eventType.enum, - parentSchema: schema43.allOf[1].properties.eventType, + schema: schema44.allOf[1].properties.eventType.enum, + parentSchema: schema44.allOf[1].properties.eventType, data: data3, }, ]; @@ -27177,7 +27359,7 @@ function validate58( (data4.type === undefined && (missing3 = 'type')) || (data4.status === undefined && (missing3 = 'status')) ) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -27186,9 +27368,9 @@ function validate58( params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", schema: - schema43.allOf[1].properties.peerconnection.allOf[0].required, + schema44.allOf[1].properties.peerconnection.allOf[0].required, parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0], + schema44.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -27201,7 +27383,7 @@ function validate58( if (errors === _errs18) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection/url', schemaPath: @@ -27211,7 +27393,7 @@ function validate58( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.url, data: data5, }, @@ -27219,7 +27401,7 @@ function validate58( return false; } } else { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection/url', schemaPath: @@ -27228,10 +27410,10 @@ function validate58( params: { type: 'string' }, message: 'must be string', schema: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.url.type, parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.url, data: data5, }, @@ -27249,7 +27431,7 @@ function validate58( let data6 = data4.type; const _errs20 = errors; if (typeof data6 !== 'string') { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -27258,10 +27440,10 @@ function validate58( params: { type: 'string' }, message: 'must be string', schema: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.type.type, parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data6, }, @@ -27269,7 +27451,7 @@ function validate58( return false; } if (!(data6 === 'local' || data6 === 'webrtc')) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -27277,15 +27459,15 @@ function validate58( keyword: 'enum', params: { allowedValues: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data6, }, @@ -27301,7 +27483,7 @@ function validate58( let data7 = data4.status; const _errs22 = errors; if (typeof data7 !== 'string') { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection/status', schemaPath: @@ -27310,10 +27492,10 @@ function validate58( params: { type: 'string' }, message: 'must be string', schema: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.status.type, parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.status, data: data7, }, @@ -27330,7 +27512,7 @@ function validate58( data7 === 'closed' ) ) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection/status', schemaPath: @@ -27338,15 +27520,15 @@ function validate58( keyword: 'enum', params: { allowedValues: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.status.enum, }, message: 'must be equal to one of the allowed values', schema: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.status.enum, parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[0] + schema44.allOf[1].properties.peerconnection.allOf[0] .properties.status, data: data7, }, @@ -27361,15 +27543,15 @@ function validate58( } } } else { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema43.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema43.allOf[1].properties.peerconnection.allOf[0], + schema: schema44.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema44.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -27383,7 +27565,7 @@ function validate58( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing4; if (data4.devices === undefined && (missing4 = 'devices')) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -27392,9 +27574,9 @@ function validate58( params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'", schema: - schema43.allOf[1].properties.peerconnection.allOf[1].required, + schema44.allOf[1].properties.peerconnection.allOf[1].required, parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[1], + schema44.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -27406,7 +27588,7 @@ function validate58( if (errors === _errs26) { if (Array.isArray(data8)) { if (data8.length > 2) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -27416,7 +27598,7 @@ function validate58( message: 'must NOT have more than 2 items', schema: 2, parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[1] + schema44.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data8, }, @@ -27424,7 +27606,7 @@ function validate58( return false; } else { if (data8.length < 2) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection/devices', @@ -27435,7 +27617,7 @@ function validate58( message: 'must NOT have fewer than 2 items', schema: 2, parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[1] + schema44.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data8, }, @@ -27455,7 +27637,7 @@ function validate58( ) { let missing5; if (data9.url === undefined && (missing5 = 'url')) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + @@ -27470,11 +27652,11 @@ function validate58( missing5 + "'", schema: - schema43.allOf[1].properties.peerconnection + schema44.allOf[1].properties.peerconnection .allOf[1].properties.devices.items .required, parentSchema: - schema43.allOf[1].properties.peerconnection + schema44.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data9, }, @@ -27488,7 +27670,7 @@ function validate58( if (errors === _errs30) { if (typeof data10 === 'string') { if (!formats0(data10)) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + @@ -27505,7 +27687,7 @@ function validate58( '"', schema: 'uri', parentSchema: - schema43.allOf[1].properties + schema44.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -27515,7 +27697,7 @@ function validate58( return false; } } else { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + @@ -27528,12 +27710,12 @@ function validate58( params: { type: 'string' }, message: 'must be string', schema: - schema43.allOf[1].properties + schema44.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url.type, parentSchema: - schema43.allOf[1].properties + schema44.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -27589,7 +27771,7 @@ function validate58( (missing6 = 'remoteServiceId')) ) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + @@ -27609,7 +27791,7 @@ function validate58( missing6 + "'", schema: - schema43.allOf[1] + schema44.allOf[1] .properties .peerconnection .allOf[1].properties @@ -27618,7 +27800,7 @@ function validate58( .properties.services .items.required, parentSchema: - schema43.allOf[1] + schema44.allOf[1] .properties .peerconnection .allOf[1].properties @@ -27649,7 +27831,7 @@ function validate58( if ( !formats0(data14) ) { - validate58.errors = + validate59.errors = [ { instancePath: @@ -27674,7 +27856,7 @@ function validate58( schema: 'uri', parentSchema: - schema43 + schema44 .allOf[1] .properties .peerconnection @@ -27695,7 +27877,7 @@ function validate58( return false; } } else { - validate58.errors = + validate59.errors = [ { instancePath: @@ -27715,7 +27897,7 @@ function validate58( message: 'must be string', schema: - schema43 + schema44 .allOf[1] .properties .peerconnection @@ -27732,7 +27914,7 @@ function validate58( .serviceType .type, parentSchema: - schema43 + schema44 .allOf[1] .properties .peerconnection @@ -27771,7 +27953,7 @@ function validate58( typeof data15 !== 'string' ) { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + @@ -27789,7 +27971,7 @@ function validate58( message: 'must be string', schema: - schema43 + schema44 .allOf[1] .properties .peerconnection @@ -27805,7 +27987,7 @@ function validate58( .serviceId .type, parentSchema: - schema43 + schema44 .allOf[1] .properties .peerconnection @@ -27842,7 +28024,7 @@ function validate58( typeof data16 !== 'string' ) { - validate58.errors = + validate59.errors = [ { instancePath: @@ -27862,7 +28044,7 @@ function validate58( message: 'must be string', schema: - schema43 + schema44 .allOf[1] .properties .peerconnection @@ -27879,7 +28061,7 @@ function validate58( .remoteServiceId .type, parentSchema: - schema43 + schema44 .allOf[1] .properties .peerconnection @@ -27908,7 +28090,7 @@ function validate58( } } } else { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + @@ -27924,7 +28106,7 @@ function validate58( }, message: 'must be object', schema: - schema43.allOf[1] + schema44.allOf[1] .properties .peerconnection .allOf[1].properties @@ -27933,7 +28115,7 @@ function validate58( .properties.services .items.type, parentSchema: - schema43.allOf[1] + schema44.allOf[1] .properties .peerconnection .allOf[1].properties @@ -27953,7 +28135,7 @@ function validate58( } } } else { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + @@ -27966,13 +28148,13 @@ function validate58( params: { type: 'array' }, message: 'must be array', schema: - schema43.allOf[1].properties + schema44.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config .properties.services.type, parentSchema: - schema43.allOf[1].properties + schema44.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config @@ -27985,7 +28167,7 @@ function validate58( } } } else { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + @@ -27998,12 +28180,12 @@ function validate58( params: { type: 'object' }, message: 'must be object', schema: - schema43.allOf[1].properties + schema44.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config.type, parentSchema: - schema43.allOf[1].properties + schema44.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config, @@ -28020,7 +28202,7 @@ function validate58( } } } else { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + @@ -28032,10 +28214,10 @@ function validate58( params: { type: 'object' }, message: 'must be object', schema: - schema43.allOf[1].properties.peerconnection + schema44.allOf[1].properties.peerconnection .allOf[1].properties.devices.items.type, parentSchema: - schema43.allOf[1].properties.peerconnection + schema44.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data9, }, @@ -28051,7 +28233,7 @@ function validate58( } } } else { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -28060,10 +28242,10 @@ function validate58( params: { type: 'array' }, message: 'must be array', schema: - schema43.allOf[1].properties.peerconnection.allOf[1] + schema44.allOf[1].properties.peerconnection.allOf[1] .properties.devices.type, parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[1] + schema44.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data8, }, @@ -28074,16 +28256,16 @@ function validate58( } } } else { - validate58.errors = [ + validate59.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema43.allOf[1].properties.peerconnection.allOf[1].type, + schema: schema44.allOf[1].properties.peerconnection.allOf[1].type, parentSchema: - schema43.allOf[1].properties.peerconnection.allOf[1], + schema44.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -28099,15 +28281,15 @@ function validate58( } } } else { - validate58.errors = [ + validate59.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema43.allOf[1].type, - parentSchema: schema43.allOf[1], + schema: schema44.allOf[1].type, + parentSchema: schema44.allOf[1], data, }, ]; @@ -28116,11 +28298,11 @@ function validate58( } var valid0 = _errs11 === errors; } - validate58.errors = vErrors; + validate59.errors = vErrors; return errors === 0; } -exports.validateChangedUrl = validate59; -const schema44 = { +exports.validateChangedUrl = validate60; +const schema45 = { type: 'string', format: 'uri', 'x-standalone': false, @@ -28128,7 +28310,7 @@ const schema44 = { 'x-location': '#/components/parameters/device_changed_url/schema', 'x-schema-type': 'all', }; -function validate59( +function validate60( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -28138,7 +28320,7 @@ function validate59( if (errors === 0) { if (typeof data === 'string') { if (!formats0(data)) { - validate59.errors = [ + validate60.errors = [ { instancePath, schemaPath: '#/format', @@ -28146,60 +28328,6 @@ function validate59( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema44, - data, - }, - ]; - return false; - } - } else { - validate59.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema44.type, - parentSchema: schema44, - data, - }, - ]; - return false; - } - } - } - validate59.errors = vErrors; - return errors === 0; -} -exports.validateDeviceId = validate60; -const schema45 = { - type: 'string', - format: 'uuid', - 'x-standalone': false, - 'x-name': 'DeviceId', - 'x-location': '#/components/parameters/device_id/schema', - 'x-schema-type': 'all', -}; -const formats258 = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; -function validate60( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats258.test(data)) { - validate60.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uuid' }, - message: 'must match format "' + 'uuid' + '"', - schema: 'uuid', parentSchema: schema45, data, }, @@ -28226,8 +28354,62 @@ function validate60( validate60.errors = vErrors; return errors === 0; } -exports.validateFlatGroup = validate61; +exports.validateDeviceId = validate61; const schema46 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'DeviceId', + 'x-location': '#/components/parameters/device_id/schema', + 'x-schema-type': 'all', +}; +const formats258 = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +function validate61( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate61.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema46, + data, + }, + ]; + return false; + } + } else { + validate61.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema46.type, + parentSchema: schema46, + data, + }, + ]; + return false; + } + } + } + validate61.errors = vErrors; + return errors === 0; +} +exports.validateFlatGroup = validate62; +const schema47 = { type: 'boolean', default: false, 'x-standalone': false, @@ -28235,32 +28417,32 @@ const schema46 = { 'x-location': '#/components/parameters/flat_group/schema', 'x-schema-type': 'all', }; -function validate61( +function validate62( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'boolean') { - validate61.errors = [ + validate62.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema46.type, - parentSchema: schema46, + schema: schema47.type, + parentSchema: schema47, data, }, ]; return false; } - validate61.errors = vErrors; + validate62.errors = vErrors; return errors === 0; } -exports.validateStartTime = validate62; -const schema47 = { +exports.validateStartTime = validate63; +const schema48 = { type: 'string', format: 'date-time', 'x-standalone': false, @@ -28268,7 +28450,7 @@ const schema47 = { 'x-location': '#/components/parameters/start_time/schema', 'x-schema-type': 'all', }; -function validate62( +function validate63( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -28278,7 +28460,7 @@ function validate62( if (errors === 0) { if (typeof data === 'string') { if (!formats22.validate(data)) { - validate62.errors = [ + validate63.errors = [ { instancePath, schemaPath: '#/format', @@ -28286,22 +28468,22 @@ function validate62( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema47, + parentSchema: schema48, data, }, ]; return false; } } else { - validate62.errors = [ + validate63.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema47.type, - parentSchema: schema47, + schema: schema48.type, + parentSchema: schema48, data, }, ]; @@ -28309,11 +28491,11 @@ function validate62( } } } - validate62.errors = vErrors; + validate63.errors = vErrors; return errors === 0; } -exports.validateEndTime = validate63; -const schema48 = { +exports.validateEndTime = validate64; +const schema49 = { type: 'string', format: 'date-time', 'x-standalone': false, @@ -28321,7 +28503,7 @@ const schema48 = { 'x-location': '#/components/parameters/end_time/schema', 'x-schema-type': 'all', }; -function validate63( +function validate64( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -28331,7 +28513,7 @@ function validate63( if (errors === 0) { if (typeof data === 'string') { if (!formats22.validate(data)) { - validate63.errors = [ + validate64.errors = [ { instancePath, schemaPath: '#/format', @@ -28339,22 +28521,22 @@ function validate63( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema48, + parentSchema: schema49, data, }, ]; return false; } } else { - validate63.errors = [ + validate64.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema48.type, - parentSchema: schema48, + schema: schema49.type, + parentSchema: schema49, data, }, ]; @@ -28362,11 +28544,11 @@ function validate63( } } } - validate63.errors = vErrors; + validate64.errors = vErrors; return errors === 0; } -exports.validateClosedUrl = validate64; -const schema49 = { +exports.validateClosedUrl = validate65; +const schema50 = { type: 'string', format: 'uri', 'x-standalone': false, @@ -28374,7 +28556,7 @@ const schema49 = { 'x-location': '#/components/parameters/closed_url/schema', 'x-schema-type': 'all', }; -function validate64( +function validate65( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -28384,7 +28566,7 @@ function validate64( if (errors === 0) { if (typeof data === 'string') { if (!formats0(data)) { - validate64.errors = [ + validate65.errors = [ { instancePath, schemaPath: '#/format', @@ -28392,22 +28574,22 @@ function validate64( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema49, + parentSchema: schema50, data, }, ]; return false; } } else { - validate64.errors = [ + validate65.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema49.type, - parentSchema: schema49, + schema: schema50.type, + parentSchema: schema50, data, }, ]; @@ -28415,11 +28597,11 @@ function validate64( } } } - validate64.errors = vErrors; + validate65.errors = vErrors; return errors === 0; } -exports.validateStatusChangedUrl = validate65; -const schema50 = { +exports.validateStatusChangedUrl = validate66; +const schema51 = { type: 'string', format: 'uri', 'x-standalone': false, @@ -28427,7 +28609,7 @@ const schema50 = { 'x-location': '#/components/parameters/status_changed_url/schema', 'x-schema-type': 'all', }; -function validate65( +function validate66( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -28437,7 +28619,7 @@ function validate65( if (errors === 0) { if (typeof data === 'string') { if (!formats0(data)) { - validate65.errors = [ + validate66.errors = [ { instancePath, schemaPath: '#/format', @@ -28445,22 +28627,22 @@ function validate65( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema50, + parentSchema: schema51, data, }, ]; return false; } } else { - validate65.errors = [ + validate66.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema50.type, - parentSchema: schema50, + schema: schema51.type, + parentSchema: schema51, data, }, ]; @@ -28468,11 +28650,11 @@ function validate65( } } } - validate65.errors = vErrors; + validate66.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionId = validate66; -const schema51 = { +exports.validatePeerconnectionId = validate67; +const schema52 = { type: 'string', format: 'uuid', 'x-standalone': false, @@ -28480,7 +28662,7 @@ const schema51 = { 'x-location': '#/components/parameters/peerconnection_id/schema', 'x-schema-type': 'all', }; -function validate66( +function validate67( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -28490,7 +28672,7 @@ function validate66( if (errors === 0) { if (typeof data === 'string') { if (!formats258.test(data)) { - validate66.errors = [ + validate67.errors = [ { instancePath, schemaPath: '#/format', @@ -28498,22 +28680,22 @@ function validate66( params: { format: 'uuid' }, message: 'must match format "' + 'uuid' + '"', schema: 'uuid', - parentSchema: schema51, + parentSchema: schema52, data, }, ]; return false; } } else { - validate66.errors = [ + validate67.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema51.type, - parentSchema: schema51, + schema: schema52.type, + parentSchema: schema52, data, }, ]; @@ -28521,11 +28703,11 @@ function validate66( } } } - validate66.errors = vErrors; + validate67.errors = vErrors; return errors === 0; } -exports.validateDeviceUrl = validate67; -const schema52 = { +exports.validateDeviceUrl = validate68; +const schema53 = { type: 'string', format: 'uri', 'x-standalone': false, @@ -28533,7 +28715,7 @@ const schema52 = { 'x-location': '#/components/parameters/device_url/schema', 'x-schema-type': 'all', }; -function validate67( +function validate68( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -28543,7 +28725,7 @@ function validate67( if (errors === 0) { if (typeof data === 'string') { if (!formats0(data)) { - validate67.errors = [ + validate68.errors = [ { instancePath, schemaPath: '#/format', @@ -28551,22 +28733,22 @@ function validate67( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema52, + parentSchema: schema53, data, }, ]; return false; } } else { - validate67.errors = [ + validate68.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema52.type, - parentSchema: schema52, + schema: schema53.type, + parentSchema: schema53, data, }, ]; @@ -28574,11 +28756,11 @@ function validate67( } } } - validate67.errors = vErrors; + validate68.errors = vErrors; return errors === 0; } -exports.validateListDevicesResponse200 = validate68; -const schema53 = { +exports.validateListDevicesResponse200 = validate69; +const schema54 = { type: 'array', items: { title: 'Device Overview', @@ -28637,7 +28819,7 @@ const schema53 = { 'x-location': '#/paths//devices/get/responses/200/content/application/json/schema', 'x-schema-type': 'all', }; -function validate68( +function validate69( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -28659,15 +28841,15 @@ function validate68( (data0.name === undefined && (missing0 = 'name')) || (data0.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema53.items.required, - parentSchema: schema53.items, + schema: schema54.items.required, + parentSchema: schema54.items, data: data0, }, ]; @@ -28680,7 +28862,7 @@ function validate68( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats0(data1)) { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/url', schemaPath: '#/items/properties/url/format', @@ -28688,22 +28870,22 @@ function validate68( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema53.items.properties.url, + parentSchema: schema54.items.properties.url, data: data1, }, ]; return false; } } else { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/url', schemaPath: '#/items/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema53.items.properties.url.type, - parentSchema: schema53.items.properties.url, + schema: schema54.items.properties.url.type, + parentSchema: schema54.items.properties.url, data: data1, }, ]; @@ -28720,15 +28902,15 @@ function validate68( let data2 = data0.name; const _errs5 = errors; if (typeof data2 !== 'string') { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/name', schemaPath: '#/items/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema53.items.properties.name.type, - parentSchema: schema53.items.properties.name, + schema: schema54.items.properties.name.type, + parentSchema: schema54.items.properties.name, data: data2, }, ]; @@ -28743,15 +28925,15 @@ function validate68( let data3 = data0.description; const _errs7 = errors; if (typeof data3 !== 'string') { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/description', schemaPath: '#/items/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema53.items.properties.description.type, - parentSchema: schema53.items.properties.description, + schema: schema54.items.properties.description.type, + parentSchema: schema54.items.properties.description, data: data3, }, ]; @@ -28766,15 +28948,15 @@ function validate68( let data4 = data0.type; const _errs9 = errors; if (typeof data4 !== 'string') { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema53.items.properties.type.type, - parentSchema: schema53.items.properties.type, + schema: schema54.items.properties.type.type, + parentSchema: schema54.items.properties.type, data: data4, }, ]; @@ -28788,17 +28970,17 @@ function validate68( data4 === 'cloud instantiable' ) ) { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema53.items.properties.type.enum, + allowedValues: schema54.items.properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema53.items.properties.type.enum, - parentSchema: schema53.items.properties.type, + schema: schema54.items.properties.type.enum, + parentSchema: schema54.items.properties.type, data: data4, }, ]; @@ -28813,15 +28995,15 @@ function validate68( let data5 = data0.isPublic; const _errs11 = errors; if (typeof data5 !== 'boolean') { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/isPublic', schemaPath: '#/items/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema53.items.properties.isPublic.type, - parentSchema: schema53.items.properties.isPublic, + schema: schema54.items.properties.isPublic.type, + parentSchema: schema54.items.properties.isPublic, data: data5, }, ]; @@ -28850,7 +29032,7 @@ function validate68( ) { let missing1; if (data7.url === undefined && (missing1 = 'url')) { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/viewer/' + i1, @@ -28863,10 +29045,10 @@ function validate68( missing1 + "'", schema: - schema53.items.properties.viewer.items + schema54.items.properties.viewer.items .required, parentSchema: - schema53.items.properties.viewer.items, + schema54.items.properties.viewer.items, data: data7, }, ]; @@ -28879,7 +29061,7 @@ function validate68( if (errors === _errs17) { if (typeof data8 === 'string') { if (!formats0(data8)) { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + @@ -28896,7 +29078,7 @@ function validate68( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema53.items.properties.viewer + schema54.items.properties.viewer .items.properties.url, data: data8, }, @@ -28904,7 +29086,7 @@ function validate68( return false; } } else { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + @@ -28919,10 +29101,10 @@ function validate68( params: { type: 'string' }, message: 'must be string', schema: - schema53.items.properties.viewer.items + schema54.items.properties.viewer.items .properties.url.type, parentSchema: - schema53.items.properties.viewer.items + schema54.items.properties.viewer.items .properties.url, data: data8, }, @@ -28934,7 +29116,7 @@ function validate68( } } } else { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/viewer/' + i1, @@ -28944,9 +29126,9 @@ function validate68( params: { type: 'object' }, message: 'must be object', schema: - schema53.items.properties.viewer.items.type, + schema54.items.properties.viewer.items.type, parentSchema: - schema53.items.properties.viewer.items, + schema54.items.properties.viewer.items, data: data7, }, ]; @@ -28959,15 +29141,15 @@ function validate68( } } } else { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/viewer', schemaPath: '#/items/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema53.items.properties.viewer.type, - parentSchema: schema53.items.properties.viewer, + schema: schema54.items.properties.viewer.type, + parentSchema: schema54.items.properties.viewer, data: data6, }, ]; @@ -29000,7 +29182,7 @@ function validate68( data10.url === undefined && (missing2 = 'url') ) { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/owner/' + i2, @@ -29013,10 +29195,10 @@ function validate68( missing2 + "'", schema: - schema53.items.properties.owner.items + schema54.items.properties.owner.items .required, parentSchema: - schema53.items.properties.owner.items, + schema54.items.properties.owner.items, data: data10, }, ]; @@ -29029,7 +29211,7 @@ function validate68( if (errors === _errs23) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + @@ -29048,7 +29230,7 @@ function validate68( '"', schema: 'uri', parentSchema: - schema53.items.properties.owner + schema54.items.properties.owner .items.properties.url, data: data11, }, @@ -29056,7 +29238,7 @@ function validate68( return false; } } else { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + @@ -29071,10 +29253,10 @@ function validate68( params: { type: 'string' }, message: 'must be string', schema: - schema53.items.properties.owner + schema54.items.properties.owner .items.properties.url.type, parentSchema: - schema53.items.properties.owner + schema54.items.properties.owner .items.properties.url, data: data11, }, @@ -29086,7 +29268,7 @@ function validate68( } } } else { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/owner/' + i2, @@ -29096,9 +29278,9 @@ function validate68( params: { type: 'object' }, message: 'must be object', schema: - schema53.items.properties.owner.items.type, + schema54.items.properties.owner.items.type, parentSchema: - schema53.items.properties.owner.items, + schema54.items.properties.owner.items, data: data10, }, ]; @@ -29111,15 +29293,15 @@ function validate68( } } } else { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0 + '/owner', schemaPath: '#/items/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema53.items.properties.owner.type, - parentSchema: schema53.items.properties.owner, + schema: schema54.items.properties.owner.type, + parentSchema: schema54.items.properties.owner, data: data9, }, ]; @@ -29138,15 +29320,15 @@ function validate68( } } } else { - validate68.errors = [ + validate69.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema53.items.type, - parentSchema: schema53.items, + schema: schema54.items.type, + parentSchema: schema54.items, data: data0, }, ]; @@ -29159,26 +29341,26 @@ function validate68( } } } else { - validate68.errors = [ + validate69.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema53.type, - parentSchema: schema53, + schema: schema54.type, + parentSchema: schema54, data, }, ]; return false; } } - validate68.errors = vErrors; + validate69.errors = vErrors; return errors === 0; } -exports.validateCreateDeviceBody = validate69; -const schema54 = { +exports.validateCreateDeviceBody = validate70; +const schema55 = { title: 'Device', anyOf: [ { @@ -29532,7 +29714,7 @@ const schema54 = { 'x-location': '#/paths//devices/post/requestBody/content/application/json/schema', 'x-schema-type': 'all', }; -function validate69( +function validate70( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -29557,8 +29739,8 @@ function validate69( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema54.anyOf[0].allOf[0].required, - parentSchema: schema54.anyOf[0].allOf[0], + schema: schema55.anyOf[0].allOf[0].required, + parentSchema: schema55.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -29582,7 +29764,7 @@ function validate69( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema54.anyOf[0].allOf[0].properties.url, + parentSchema: schema55.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -29599,8 +29781,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.url, + schema: schema55.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -29627,8 +29809,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.name, + schema: schema55.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.name, data: data1, }; if (vErrors === null) { @@ -29653,8 +29835,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.description, + schema: schema55.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.description, data: data2, }; if (vErrors === null) { @@ -29679,8 +29861,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.type, + schema: schema55.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -29703,11 +29885,11 @@ function validate69( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema54.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema55.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema54.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema54.anyOf[0].allOf[0].properties.type, + schema: schema55.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -29732,8 +29914,8 @@ function validate69( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema54.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.isPublic, + schema: schema55.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.isPublic, data: data4, }; if (vErrors === null) { @@ -29775,10 +29957,10 @@ function validate69( message: "must have required property '" + missing1 + "'", schema: - schema54.anyOf[0].allOf[0].properties.viewer.items + schema55.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema54.anyOf[0].allOf[0].properties.viewer.items, + schema55.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -29805,7 +29987,7 @@ function validate69( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[0].allOf[0].properties.viewer + schema55.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -29826,10 +30008,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[0].allOf[0].properties.viewer + schema55.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema54.anyOf[0].allOf[0].properties.viewer + schema55.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -29853,9 +30035,9 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[0].allOf[0].properties.viewer.items.type, + schema55.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema54.anyOf[0].allOf[0].properties.viewer.items, + schema55.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -29878,8 +30060,8 @@ function validate69( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema54.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.viewer, + schema: schema55.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.viewer, data: data5, }; if (vErrors === null) { @@ -29922,10 +30104,10 @@ function validate69( message: "must have required property '" + missing2 + "'", schema: - schema54.anyOf[0].allOf[0].properties.owner.items + schema55.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema54.anyOf[0].allOf[0].properties.owner.items, + schema55.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -29953,7 +30135,7 @@ function validate69( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[0].allOf[0].properties + schema55.anyOf[0].allOf[0].properties .owner.items.properties.url, data: data10, }; @@ -29974,10 +30156,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[0].allOf[0].properties.owner + schema55.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema54.anyOf[0].allOf[0].properties.owner + schema55.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data10, }; @@ -30001,10 +30183,10 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[0].allOf[0].properties.owner.items + schema55.anyOf[0].allOf[0].properties.owner.items .type, parentSchema: - schema54.anyOf[0].allOf[0].properties.owner.items, + schema55.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -30027,8 +30209,8 @@ function validate69( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema54.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema54.anyOf[0].allOf[0].properties.owner, + schema: schema55.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema55.anyOf[0].allOf[0].properties.owner, data: data8, }; if (vErrors === null) { @@ -30057,8 +30239,8 @@ function validate69( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema54.anyOf[0].allOf[0].type, - parentSchema: schema54.anyOf[0].allOf[0], + schema: schema55.anyOf[0].allOf[0].type, + parentSchema: schema55.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -30085,7 +30267,7 @@ function validate69( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema54.anyOf[0].allOf[1].properties.type, + parentSchema: schema55.anyOf[0].allOf[1].properties.type, data: data11, }; if (vErrors === null) { @@ -30114,7 +30296,7 @@ function validate69( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema54.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema55.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -30131,8 +30313,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema54.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema55.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema55.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -30178,7 +30360,7 @@ function validate69( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items + schema55.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -30199,10 +30381,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[0].allOf[1].properties.services.items + schema55.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items + schema55.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -30233,10 +30415,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[0].allOf[1].properties.services.items + schema55.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items + schema55.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data16, }; @@ -30268,10 +30450,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[0].allOf[1].properties.services.items + schema55.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items + schema55.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -30300,15 +30482,15 @@ function validate69( keyword: 'enum', params: { allowedValues: - schema54.anyOf[0].allOf[1].properties.services.items + schema55.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema54.anyOf[0].allOf[1].properties.services.items + schema55.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items + schema55.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -30333,9 +30515,9 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[0].allOf[1].properties.services.items.type, + schema55.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema54.anyOf[0].allOf[1].properties.services.items, + schema55.anyOf[0].allOf[1].properties.services.items, data: data14, }; if (vErrors === null) { @@ -30358,8 +30540,8 @@ function validate69( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema54.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema54.anyOf[0].allOf[1].properties.services, + schema: schema55.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema55.anyOf[0].allOf[1].properties.services, data: data13, }; if (vErrors === null) { @@ -30383,8 +30565,8 @@ function validate69( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema54.anyOf[0].allOf[1].type, - parentSchema: schema54.anyOf[0].allOf[1], + schema: schema55.anyOf[0].allOf[1].type, + parentSchema: schema55.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -30417,8 +30599,8 @@ function validate69( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema54.anyOf[1].allOf[0].required, - parentSchema: schema54.anyOf[1].allOf[0], + schema: schema55.anyOf[1].allOf[0].required, + parentSchema: schema55.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -30442,7 +30624,7 @@ function validate69( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema54.anyOf[1].allOf[0].properties.url, + parentSchema: schema55.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -30459,8 +30641,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.url, + schema: schema55.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -30487,8 +30669,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.name, + schema: schema55.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.name, data: data19, }; if (vErrors === null) { @@ -30513,8 +30695,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.description, + schema: schema55.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.description, data: data20, }; if (vErrors === null) { @@ -30539,8 +30721,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.type, + schema: schema55.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -30563,11 +30745,11 @@ function validate69( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema54.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema55.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema54.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema54.anyOf[1].allOf[0].properties.type, + schema: schema55.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -30592,8 +30774,8 @@ function validate69( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema54.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.isPublic, + schema: schema55.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.isPublic, data: data22, }; if (vErrors === null) { @@ -30635,10 +30817,10 @@ function validate69( message: "must have required property '" + missing4 + "'", schema: - schema54.anyOf[1].allOf[0].properties.viewer.items + schema55.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema54.anyOf[1].allOf[0].properties.viewer.items, + schema55.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -30666,7 +30848,7 @@ function validate69( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[1].allOf[0].properties + schema55.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -30687,10 +30869,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[1].allOf[0].properties.viewer + schema55.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema54.anyOf[1].allOf[0].properties.viewer + schema55.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data25, }; @@ -30714,10 +30896,10 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[1].allOf[0].properties.viewer.items + schema55.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema54.anyOf[1].allOf[0].properties.viewer.items, + schema55.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -30740,8 +30922,8 @@ function validate69( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema54.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.viewer, + schema: schema55.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.viewer, data: data23, }; if (vErrors === null) { @@ -30784,10 +30966,10 @@ function validate69( message: "must have required property '" + missing5 + "'", schema: - schema54.anyOf[1].allOf[0].properties.owner.items + schema55.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema54.anyOf[1].allOf[0].properties.owner.items, + schema55.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -30815,7 +30997,7 @@ function validate69( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[1].allOf[0].properties + schema55.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -30836,10 +31018,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[1].allOf[0].properties + schema55.anyOf[1].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema54.anyOf[1].allOf[0].properties + schema55.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -30863,10 +31045,10 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[1].allOf[0].properties.owner.items + schema55.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema54.anyOf[1].allOf[0].properties.owner.items, + schema55.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -30889,8 +31071,8 @@ function validate69( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema54.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema54.anyOf[1].allOf[0].properties.owner, + schema: schema55.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema55.anyOf[1].allOf[0].properties.owner, data: data26, }; if (vErrors === null) { @@ -30919,8 +31101,8 @@ function validate69( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema54.anyOf[1].allOf[0].type, - parentSchema: schema54.anyOf[1].allOf[0], + schema: schema55.anyOf[1].allOf[0].type, + parentSchema: schema55.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -30947,7 +31129,7 @@ function validate69( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema54.anyOf[1].allOf[1].properties.type, + parentSchema: schema55.anyOf[1].allOf[1].properties.type, data: data29, }; if (vErrors === null) { @@ -30972,8 +31154,8 @@ function validate69( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema54.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema54.anyOf[1].allOf[1].properties.connected, + schema: schema55.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema55.anyOf[1].allOf[1].properties.connected, data: data30, }; if (vErrors === null) { @@ -31024,7 +31206,7 @@ function validate69( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema54.anyOf[1].allOf[1].properties + schema55.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -31048,11 +31230,11 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[1].allOf[1].properties + schema55.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start .type, parentSchema: - schema54.anyOf[1].allOf[1].properties + schema55.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -31091,7 +31273,7 @@ function validate69( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema54.anyOf[1].allOf[1].properties + schema55.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -31115,11 +31297,11 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[1].allOf[1].properties + schema55.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end .type, parentSchema: - schema54.anyOf[1].allOf[1].properties + schema55.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -31146,10 +31328,10 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[1].allOf[1].properties.announcedAvailability + schema55.anyOf[1].allOf[1].properties.announcedAvailability .items.type, parentSchema: - schema54.anyOf[1].allOf[1].properties.announcedAvailability + schema55.anyOf[1].allOf[1].properties.announcedAvailability .items, data: data32, }; @@ -31175,9 +31357,9 @@ function validate69( params: { type: 'array' }, message: 'must be array', schema: - schema54.anyOf[1].allOf[1].properties.announcedAvailability.type, + schema55.anyOf[1].allOf[1].properties.announcedAvailability.type, parentSchema: - schema54.anyOf[1].allOf[1].properties.announcedAvailability, + schema55.anyOf[1].allOf[1].properties.announcedAvailability, data: data31, }; if (vErrors === null) { @@ -31208,7 +31390,7 @@ function validate69( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[1].allOf[1].properties.experiment, + schema55.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -31225,8 +31407,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema54.anyOf[1].allOf[1].properties.experiment, + schema: schema55.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema55.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -31279,7 +31461,7 @@ function validate69( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[1].allOf[1].properties.services + schema55.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -31303,10 +31485,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[1].allOf[1].properties.services + schema55.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema54.anyOf[1].allOf[1].properties.services + schema55.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -31337,10 +31519,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[1].allOf[1].properties.services + schema55.anyOf[1].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema54.anyOf[1].allOf[1].properties.services + schema55.anyOf[1].allOf[1].properties.services .items.properties.serviceId, data: data39, }; @@ -31372,10 +31554,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[1].allOf[1].properties.services + schema55.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema54.anyOf[1].allOf[1].properties.services + schema55.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -31404,16 +31586,16 @@ function validate69( keyword: 'enum', params: { allowedValues: - schema54.anyOf[1].allOf[1].properties.services + schema55.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema54.anyOf[1].allOf[1].properties.services + schema55.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema54.anyOf[1].allOf[1].properties.services + schema55.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -31439,10 +31621,10 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[1].allOf[1].properties.services.items + schema55.anyOf[1].allOf[1].properties.services.items .type, parentSchema: - schema54.anyOf[1].allOf[1].properties.services.items, + schema55.anyOf[1].allOf[1].properties.services.items, data: data37, }; if (vErrors === null) { @@ -31465,8 +31647,8 @@ function validate69( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema54.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema54.anyOf[1].allOf[1].properties.services, + schema: schema55.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema55.anyOf[1].allOf[1].properties.services, data: data36, }; if (vErrors === null) { @@ -31492,8 +31674,8 @@ function validate69( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema54.anyOf[1].allOf[1].type, - parentSchema: schema54.anyOf[1].allOf[1], + schema: schema55.anyOf[1].allOf[1].type, + parentSchema: schema55.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -31526,8 +31708,8 @@ function validate69( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema54.anyOf[2].allOf[0].required, - parentSchema: schema54.anyOf[2].allOf[0], + schema: schema55.anyOf[2].allOf[0].required, + parentSchema: schema55.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -31551,7 +31733,7 @@ function validate69( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema54.anyOf[2].allOf[0].properties.url, + parentSchema: schema55.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -31568,8 +31750,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.url, + schema: schema55.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -31596,8 +31778,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.name, + schema: schema55.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.name, data: data42, }; if (vErrors === null) { @@ -31622,8 +31804,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.description, + schema: schema55.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.description, data: data43, }; if (vErrors === null) { @@ -31648,8 +31830,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.type, + schema: schema55.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -31672,11 +31854,11 @@ function validate69( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema54.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema55.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema54.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema54.anyOf[2].allOf[0].properties.type, + schema: schema55.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -31701,8 +31883,8 @@ function validate69( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema54.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.isPublic, + schema: schema55.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.isPublic, data: data45, }; if (vErrors === null) { @@ -31744,10 +31926,10 @@ function validate69( message: "must have required property '" + missing7 + "'", schema: - schema54.anyOf[2].allOf[0].properties.viewer.items + schema55.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema54.anyOf[2].allOf[0].properties.viewer + schema55.anyOf[2].allOf[0].properties.viewer .items, data: data47, }; @@ -31776,7 +31958,7 @@ function validate69( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[2].allOf[0].properties + schema55.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -31797,10 +31979,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[2].allOf[0].properties + schema55.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema54.anyOf[2].allOf[0].properties + schema55.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -31824,10 +32006,10 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[2].allOf[0].properties.viewer.items + schema55.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema54.anyOf[2].allOf[0].properties.viewer.items, + schema55.anyOf[2].allOf[0].properties.viewer.items, data: data47, }; if (vErrors === null) { @@ -31850,8 +32032,8 @@ function validate69( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema54.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.viewer, + schema: schema55.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.viewer, data: data46, }; if (vErrors === null) { @@ -31896,10 +32078,10 @@ function validate69( missing8 + "'", schema: - schema54.anyOf[2].allOf[0].properties.owner + schema55.anyOf[2].allOf[0].properties.owner .items.required, parentSchema: - schema54.anyOf[2].allOf[0].properties.owner + schema55.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -31931,7 +32113,7 @@ function validate69( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[2].allOf[0].properties + schema55.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -31952,10 +32134,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[2].allOf[0].properties + schema55.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema54.anyOf[2].allOf[0].properties + schema55.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -31979,10 +32161,10 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[2].allOf[0].properties.owner.items + schema55.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema54.anyOf[2].allOf[0].properties.owner.items, + schema55.anyOf[2].allOf[0].properties.owner.items, data: data50, }; if (vErrors === null) { @@ -32005,8 +32187,8 @@ function validate69( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema54.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema54.anyOf[2].allOf[0].properties.owner, + schema: schema55.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema55.anyOf[2].allOf[0].properties.owner, data: data49, }; if (vErrors === null) { @@ -32035,8 +32217,8 @@ function validate69( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema54.anyOf[2].allOf[0].type, - parentSchema: schema54.anyOf[2].allOf[0], + schema: schema55.anyOf[2].allOf[0].type, + parentSchema: schema55.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -32063,7 +32245,7 @@ function validate69( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema54.anyOf[2].allOf[1].properties.type, + parentSchema: schema55.anyOf[2].allOf[1].properties.type, data: data52, }; if (vErrors === null) { @@ -32092,7 +32274,7 @@ function validate69( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema54.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema55.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -32109,8 +32291,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema54.anyOf[2].allOf[1].properties.codeUrl, + schema: schema55.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema55.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -32163,7 +32345,7 @@ function validate69( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[2].allOf[1].properties.services + schema55.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -32184,10 +32366,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[2].allOf[1].properties.services + schema55.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema54.anyOf[2].allOf[1].properties.services + schema55.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -32218,10 +32400,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[2].allOf[1].properties.services.items + schema55.anyOf[2].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema54.anyOf[2].allOf[1].properties.services.items + schema55.anyOf[2].allOf[1].properties.services.items .properties.serviceId, data: data57, }; @@ -32253,10 +32435,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[2].allOf[1].properties.services + schema55.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema54.anyOf[2].allOf[1].properties.services + schema55.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -32285,16 +32467,16 @@ function validate69( keyword: 'enum', params: { allowedValues: - schema54.anyOf[2].allOf[1].properties.services + schema55.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema54.anyOf[2].allOf[1].properties.services + schema55.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema54.anyOf[2].allOf[1].properties.services + schema55.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -32320,9 +32502,9 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[2].allOf[1].properties.services.items.type, + schema55.anyOf[2].allOf[1].properties.services.items.type, parentSchema: - schema54.anyOf[2].allOf[1].properties.services.items, + schema55.anyOf[2].allOf[1].properties.services.items, data: data55, }; if (vErrors === null) { @@ -32345,8 +32527,8 @@ function validate69( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema54.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema54.anyOf[2].allOf[1].properties.services, + schema: schema55.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema55.anyOf[2].allOf[1].properties.services, data: data54, }; if (vErrors === null) { @@ -32370,8 +32552,8 @@ function validate69( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema54.anyOf[2].allOf[1].type, - parentSchema: schema54.anyOf[2].allOf[1], + schema: schema55.anyOf[2].allOf[1].type, + parentSchema: schema55.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -32404,8 +32586,8 @@ function validate69( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema54.anyOf[3].allOf[0].required, - parentSchema: schema54.anyOf[3].allOf[0], + schema: schema55.anyOf[3].allOf[0].required, + parentSchema: schema55.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -32429,7 +32611,7 @@ function validate69( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema54.anyOf[3].allOf[0].properties.url, + parentSchema: schema55.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -32446,8 +32628,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema54.anyOf[3].allOf[0].properties.url, + schema: schema55.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -32474,8 +32656,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema54.anyOf[3].allOf[0].properties.name, + schema: schema55.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.name, data: data60, }; if (vErrors === null) { @@ -32500,8 +32682,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema54.anyOf[3].allOf[0].properties.description, + schema: schema55.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.description, data: data61, }; if (vErrors === null) { @@ -32526,8 +32708,8 @@ function validate69( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema54.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema54.anyOf[3].allOf[0].properties.type, + schema: schema55.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -32551,11 +32733,11 @@ function validate69( keyword: 'enum', params: { allowedValues: - schema54.anyOf[3].allOf[0].properties.type.enum, + schema55.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema54.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema54.anyOf[3].allOf[0].properties.type, + schema: schema55.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema55.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -32580,8 +32762,8 @@ function validate69( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema54.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema54.anyOf[3].allOf[0].properties.isPublic, + schema: schema55.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema55.anyOf[3].allOf[0].properties.isPublic, data: data63, }; if (vErrors === null) { @@ -32625,10 +32807,10 @@ function validate69( missing10 + "'", schema: - schema54.anyOf[3].allOf[0].properties.viewer + schema55.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema54.anyOf[3].allOf[0].properties.viewer + schema55.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -32660,7 +32842,7 @@ function validate69( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[3].allOf[0].properties + schema55.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -32684,10 +32866,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[3].allOf[0].properties + schema55.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema54.anyOf[3].allOf[0].properties + schema55.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -32711,10 +32893,10 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[3].allOf[0].properties.viewer.items + schema55.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema54.anyOf[3].allOf[0].properties.viewer + schema55.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -32738,9 +32920,9 @@ function validate69( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema54.anyOf[3].allOf[0].properties.viewer.type, + schema: schema55.anyOf[3].allOf[0].properties.viewer.type, parentSchema: - schema54.anyOf[3].allOf[0].properties.viewer, + schema55.anyOf[3].allOf[0].properties.viewer, data: data64, }; if (vErrors === null) { @@ -32788,10 +32970,10 @@ function validate69( missing11 + "'", schema: - schema54.anyOf[3].allOf[0].properties.owner + schema55.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema54.anyOf[3].allOf[0].properties.owner + schema55.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -32823,7 +33005,7 @@ function validate69( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[3].allOf[0] + schema55.anyOf[3].allOf[0] .properties.owner.items.properties .url, data: data69, @@ -32848,10 +33030,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[3].allOf[0].properties + schema55.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema54.anyOf[3].allOf[0].properties + schema55.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data69, }; @@ -32875,10 +33057,10 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[3].allOf[0].properties.owner + schema55.anyOf[3].allOf[0].properties.owner .items.type, parentSchema: - schema54.anyOf[3].allOf[0].properties.owner + schema55.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -32903,9 +33085,9 @@ function validate69( params: { type: 'array' }, message: 'must be array', schema: - schema54.anyOf[3].allOf[0].properties.owner.type, + schema55.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema54.anyOf[3].allOf[0].properties.owner, + schema55.anyOf[3].allOf[0].properties.owner, data: data67, }; if (vErrors === null) { @@ -32934,8 +33116,8 @@ function validate69( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema54.anyOf[3].allOf[0].type, - parentSchema: schema54.anyOf[3].allOf[0], + schema: schema55.anyOf[3].allOf[0].type, + parentSchema: schema55.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -32959,8 +33141,8 @@ function validate69( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema54.anyOf[3].allOf[1].required, - parentSchema: schema54.anyOf[3].allOf[1], + schema: schema55.anyOf[3].allOf[1].required, + parentSchema: schema55.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -32981,7 +33163,7 @@ function validate69( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema54.anyOf[3].allOf[1].properties.type, + parentSchema: schema55.anyOf[3].allOf[1].properties.type, data: data70, }; if (vErrors === null) { @@ -33023,10 +33205,10 @@ function validate69( message: "must have required property '" + missing13 + "'", schema: - schema54.anyOf[3].allOf[1].properties.devices.items + schema55.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema54.anyOf[3].allOf[1].properties.devices.items, + schema55.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -33053,7 +33235,7 @@ function validate69( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema54.anyOf[3].allOf[1].properties + schema55.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data73, }; @@ -33074,10 +33256,10 @@ function validate69( params: { type: 'string' }, message: 'must be string', schema: - schema54.anyOf[3].allOf[1].properties.devices + schema55.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema54.anyOf[3].allOf[1].properties.devices + schema55.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data73, }; @@ -33101,10 +33283,10 @@ function validate69( params: { type: 'object' }, message: 'must be object', schema: - schema54.anyOf[3].allOf[1].properties.devices.items + schema55.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema54.anyOf[3].allOf[1].properties.devices.items, + schema55.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -33127,8 +33309,8 @@ function validate69( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema54.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema54.anyOf[3].allOf[1].properties.devices, + schema: schema55.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema55.anyOf[3].allOf[1].properties.devices, data: data71, }; if (vErrors === null) { @@ -33152,8 +33334,8 @@ function validate69( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema54.anyOf[3].allOf[1].type, - parentSchema: schema54.anyOf[3].allOf[1], + schema: schema55.anyOf[3].allOf[1].type, + parentSchema: schema55.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -33178,8 +33360,8 @@ function validate69( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema54.anyOf, - parentSchema: schema54, + schema: schema55.anyOf, + parentSchema: schema55, data, }; if (vErrors === null) { @@ -33188,7 +33370,7 @@ function validate69( vErrors.push(err124); } errors++; - validate69.errors = vErrors; + validate70.errors = vErrors; return false; } else { errors = _errs0; @@ -33200,11 +33382,11 @@ function validate69( } } } - validate69.errors = vErrors; + validate70.errors = vErrors; return errors === 0; } -exports.validateCreateDeviceResponse201 = validate70; -const schema55 = { +exports.validateCreateDeviceResponse201 = validate71; +const schema56 = { title: 'Device', anyOf: [ { @@ -33558,7 +33740,7 @@ const schema55 = { 'x-location': '#/paths//devices/post/responses/201/content/application/json/schema', 'x-schema-type': 'all', }; -function validate70( +function validate71( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -33583,8 +33765,8 @@ function validate70( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema55.anyOf[0].allOf[0].required, - parentSchema: schema55.anyOf[0].allOf[0], + schema: schema56.anyOf[0].allOf[0].required, + parentSchema: schema56.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -33608,7 +33790,7 @@ function validate70( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema55.anyOf[0].allOf[0].properties.url, + parentSchema: schema56.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -33625,8 +33807,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.url, + schema: schema56.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -33653,8 +33835,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.name, + schema: schema56.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.name, data: data1, }; if (vErrors === null) { @@ -33679,8 +33861,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.description, + schema: schema56.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.description, data: data2, }; if (vErrors === null) { @@ -33705,8 +33887,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.type, + schema: schema56.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -33729,11 +33911,11 @@ function validate70( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema55.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema56.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema55.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema55.anyOf[0].allOf[0].properties.type, + schema: schema56.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -33758,8 +33940,8 @@ function validate70( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema55.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.isPublic, + schema: schema56.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.isPublic, data: data4, }; if (vErrors === null) { @@ -33801,10 +33983,10 @@ function validate70( message: "must have required property '" + missing1 + "'", schema: - schema55.anyOf[0].allOf[0].properties.viewer.items + schema56.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema55.anyOf[0].allOf[0].properties.viewer.items, + schema56.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -33831,7 +34013,7 @@ function validate70( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[0].allOf[0].properties.viewer + schema56.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -33852,10 +34034,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[0].allOf[0].properties.viewer + schema56.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema55.anyOf[0].allOf[0].properties.viewer + schema56.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -33879,9 +34061,9 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[0].allOf[0].properties.viewer.items.type, + schema56.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema55.anyOf[0].allOf[0].properties.viewer.items, + schema56.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -33904,8 +34086,8 @@ function validate70( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema55.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.viewer, + schema: schema56.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.viewer, data: data5, }; if (vErrors === null) { @@ -33948,10 +34130,10 @@ function validate70( message: "must have required property '" + missing2 + "'", schema: - schema55.anyOf[0].allOf[0].properties.owner.items + schema56.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema55.anyOf[0].allOf[0].properties.owner.items, + schema56.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -33979,7 +34161,7 @@ function validate70( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[0].allOf[0].properties + schema56.anyOf[0].allOf[0].properties .owner.items.properties.url, data: data10, }; @@ -34000,10 +34182,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[0].allOf[0].properties.owner + schema56.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema55.anyOf[0].allOf[0].properties.owner + schema56.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data10, }; @@ -34027,10 +34209,10 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[0].allOf[0].properties.owner.items + schema56.anyOf[0].allOf[0].properties.owner.items .type, parentSchema: - schema55.anyOf[0].allOf[0].properties.owner.items, + schema56.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -34053,8 +34235,8 @@ function validate70( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema55.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema55.anyOf[0].allOf[0].properties.owner, + schema: schema56.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema56.anyOf[0].allOf[0].properties.owner, data: data8, }; if (vErrors === null) { @@ -34083,8 +34265,8 @@ function validate70( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema55.anyOf[0].allOf[0].type, - parentSchema: schema55.anyOf[0].allOf[0], + schema: schema56.anyOf[0].allOf[0].type, + parentSchema: schema56.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -34111,7 +34293,7 @@ function validate70( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema55.anyOf[0].allOf[1].properties.type, + parentSchema: schema56.anyOf[0].allOf[1].properties.type, data: data11, }; if (vErrors === null) { @@ -34140,7 +34322,7 @@ function validate70( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema55.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema56.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -34157,8 +34339,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema55.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema56.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema56.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -34204,7 +34386,7 @@ function validate70( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items + schema56.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -34225,10 +34407,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[0].allOf[1].properties.services.items + schema56.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items + schema56.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -34259,10 +34441,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[0].allOf[1].properties.services.items + schema56.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items + schema56.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data16, }; @@ -34294,10 +34476,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[0].allOf[1].properties.services.items + schema56.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items + schema56.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -34326,15 +34508,15 @@ function validate70( keyword: 'enum', params: { allowedValues: - schema55.anyOf[0].allOf[1].properties.services.items + schema56.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema55.anyOf[0].allOf[1].properties.services.items + schema56.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items + schema56.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -34359,9 +34541,9 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[0].allOf[1].properties.services.items.type, + schema56.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema55.anyOf[0].allOf[1].properties.services.items, + schema56.anyOf[0].allOf[1].properties.services.items, data: data14, }; if (vErrors === null) { @@ -34384,8 +34566,8 @@ function validate70( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema55.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema55.anyOf[0].allOf[1].properties.services, + schema: schema56.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema56.anyOf[0].allOf[1].properties.services, data: data13, }; if (vErrors === null) { @@ -34409,8 +34591,8 @@ function validate70( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema55.anyOf[0].allOf[1].type, - parentSchema: schema55.anyOf[0].allOf[1], + schema: schema56.anyOf[0].allOf[1].type, + parentSchema: schema56.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -34443,8 +34625,8 @@ function validate70( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema55.anyOf[1].allOf[0].required, - parentSchema: schema55.anyOf[1].allOf[0], + schema: schema56.anyOf[1].allOf[0].required, + parentSchema: schema56.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -34468,7 +34650,7 @@ function validate70( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema55.anyOf[1].allOf[0].properties.url, + parentSchema: schema56.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -34485,8 +34667,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.url, + schema: schema56.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -34513,8 +34695,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.name, + schema: schema56.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.name, data: data19, }; if (vErrors === null) { @@ -34539,8 +34721,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.description, + schema: schema56.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.description, data: data20, }; if (vErrors === null) { @@ -34565,8 +34747,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.type, + schema: schema56.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -34589,11 +34771,11 @@ function validate70( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema55.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema56.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema55.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema55.anyOf[1].allOf[0].properties.type, + schema: schema56.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -34618,8 +34800,8 @@ function validate70( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema55.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.isPublic, + schema: schema56.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.isPublic, data: data22, }; if (vErrors === null) { @@ -34661,10 +34843,10 @@ function validate70( message: "must have required property '" + missing4 + "'", schema: - schema55.anyOf[1].allOf[0].properties.viewer.items + schema56.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema55.anyOf[1].allOf[0].properties.viewer.items, + schema56.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -34692,7 +34874,7 @@ function validate70( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[1].allOf[0].properties + schema56.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -34713,10 +34895,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[1].allOf[0].properties.viewer + schema56.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema55.anyOf[1].allOf[0].properties.viewer + schema56.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data25, }; @@ -34740,10 +34922,10 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[1].allOf[0].properties.viewer.items + schema56.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema55.anyOf[1].allOf[0].properties.viewer.items, + schema56.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -34766,8 +34948,8 @@ function validate70( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema55.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.viewer, + schema: schema56.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.viewer, data: data23, }; if (vErrors === null) { @@ -34810,10 +34992,10 @@ function validate70( message: "must have required property '" + missing5 + "'", schema: - schema55.anyOf[1].allOf[0].properties.owner.items + schema56.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema55.anyOf[1].allOf[0].properties.owner.items, + schema56.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -34841,7 +35023,7 @@ function validate70( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[1].allOf[0].properties + schema56.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -34862,10 +35044,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[1].allOf[0].properties + schema56.anyOf[1].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema55.anyOf[1].allOf[0].properties + schema56.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -34889,10 +35071,10 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[1].allOf[0].properties.owner.items + schema56.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema55.anyOf[1].allOf[0].properties.owner.items, + schema56.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -34915,8 +35097,8 @@ function validate70( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema55.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema55.anyOf[1].allOf[0].properties.owner, + schema: schema56.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema56.anyOf[1].allOf[0].properties.owner, data: data26, }; if (vErrors === null) { @@ -34945,8 +35127,8 @@ function validate70( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema55.anyOf[1].allOf[0].type, - parentSchema: schema55.anyOf[1].allOf[0], + schema: schema56.anyOf[1].allOf[0].type, + parentSchema: schema56.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -34973,7 +35155,7 @@ function validate70( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema55.anyOf[1].allOf[1].properties.type, + parentSchema: schema56.anyOf[1].allOf[1].properties.type, data: data29, }; if (vErrors === null) { @@ -34998,8 +35180,8 @@ function validate70( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema55.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema55.anyOf[1].allOf[1].properties.connected, + schema: schema56.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema56.anyOf[1].allOf[1].properties.connected, data: data30, }; if (vErrors === null) { @@ -35050,7 +35232,7 @@ function validate70( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema55.anyOf[1].allOf[1].properties + schema56.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -35074,11 +35256,11 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[1].allOf[1].properties + schema56.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start .type, parentSchema: - schema55.anyOf[1].allOf[1].properties + schema56.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -35117,7 +35299,7 @@ function validate70( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema55.anyOf[1].allOf[1].properties + schema56.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -35141,11 +35323,11 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[1].allOf[1].properties + schema56.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end .type, parentSchema: - schema55.anyOf[1].allOf[1].properties + schema56.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -35172,10 +35354,10 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[1].allOf[1].properties.announcedAvailability + schema56.anyOf[1].allOf[1].properties.announcedAvailability .items.type, parentSchema: - schema55.anyOf[1].allOf[1].properties.announcedAvailability + schema56.anyOf[1].allOf[1].properties.announcedAvailability .items, data: data32, }; @@ -35201,9 +35383,9 @@ function validate70( params: { type: 'array' }, message: 'must be array', schema: - schema55.anyOf[1].allOf[1].properties.announcedAvailability.type, + schema56.anyOf[1].allOf[1].properties.announcedAvailability.type, parentSchema: - schema55.anyOf[1].allOf[1].properties.announcedAvailability, + schema56.anyOf[1].allOf[1].properties.announcedAvailability, data: data31, }; if (vErrors === null) { @@ -35234,7 +35416,7 @@ function validate70( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[1].allOf[1].properties.experiment, + schema56.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -35251,8 +35433,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema55.anyOf[1].allOf[1].properties.experiment, + schema: schema56.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema56.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -35305,7 +35487,7 @@ function validate70( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[1].allOf[1].properties.services + schema56.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -35329,10 +35511,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[1].allOf[1].properties.services + schema56.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema55.anyOf[1].allOf[1].properties.services + schema56.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -35363,10 +35545,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[1].allOf[1].properties.services + schema56.anyOf[1].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema55.anyOf[1].allOf[1].properties.services + schema56.anyOf[1].allOf[1].properties.services .items.properties.serviceId, data: data39, }; @@ -35398,10 +35580,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[1].allOf[1].properties.services + schema56.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema55.anyOf[1].allOf[1].properties.services + schema56.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -35430,16 +35612,16 @@ function validate70( keyword: 'enum', params: { allowedValues: - schema55.anyOf[1].allOf[1].properties.services + schema56.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema55.anyOf[1].allOf[1].properties.services + schema56.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema55.anyOf[1].allOf[1].properties.services + schema56.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -35465,10 +35647,10 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[1].allOf[1].properties.services.items + schema56.anyOf[1].allOf[1].properties.services.items .type, parentSchema: - schema55.anyOf[1].allOf[1].properties.services.items, + schema56.anyOf[1].allOf[1].properties.services.items, data: data37, }; if (vErrors === null) { @@ -35491,8 +35673,8 @@ function validate70( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema55.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema55.anyOf[1].allOf[1].properties.services, + schema: schema56.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema56.anyOf[1].allOf[1].properties.services, data: data36, }; if (vErrors === null) { @@ -35518,8 +35700,8 @@ function validate70( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema55.anyOf[1].allOf[1].type, - parentSchema: schema55.anyOf[1].allOf[1], + schema: schema56.anyOf[1].allOf[1].type, + parentSchema: schema56.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -35552,8 +35734,8 @@ function validate70( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema55.anyOf[2].allOf[0].required, - parentSchema: schema55.anyOf[2].allOf[0], + schema: schema56.anyOf[2].allOf[0].required, + parentSchema: schema56.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -35577,7 +35759,7 @@ function validate70( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema55.anyOf[2].allOf[0].properties.url, + parentSchema: schema56.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -35594,8 +35776,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.url, + schema: schema56.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -35622,8 +35804,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.name, + schema: schema56.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.name, data: data42, }; if (vErrors === null) { @@ -35648,8 +35830,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.description, + schema: schema56.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.description, data: data43, }; if (vErrors === null) { @@ -35674,8 +35856,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.type, + schema: schema56.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -35698,11 +35880,11 @@ function validate70( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema55.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema56.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema55.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema55.anyOf[2].allOf[0].properties.type, + schema: schema56.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -35727,8 +35909,8 @@ function validate70( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema55.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.isPublic, + schema: schema56.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.isPublic, data: data45, }; if (vErrors === null) { @@ -35770,10 +35952,10 @@ function validate70( message: "must have required property '" + missing7 + "'", schema: - schema55.anyOf[2].allOf[0].properties.viewer.items + schema56.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema55.anyOf[2].allOf[0].properties.viewer + schema56.anyOf[2].allOf[0].properties.viewer .items, data: data47, }; @@ -35802,7 +35984,7 @@ function validate70( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[2].allOf[0].properties + schema56.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -35823,10 +36005,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[2].allOf[0].properties + schema56.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema55.anyOf[2].allOf[0].properties + schema56.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -35850,10 +36032,10 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[2].allOf[0].properties.viewer.items + schema56.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema55.anyOf[2].allOf[0].properties.viewer.items, + schema56.anyOf[2].allOf[0].properties.viewer.items, data: data47, }; if (vErrors === null) { @@ -35876,8 +36058,8 @@ function validate70( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema55.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.viewer, + schema: schema56.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.viewer, data: data46, }; if (vErrors === null) { @@ -35922,10 +36104,10 @@ function validate70( missing8 + "'", schema: - schema55.anyOf[2].allOf[0].properties.owner + schema56.anyOf[2].allOf[0].properties.owner .items.required, parentSchema: - schema55.anyOf[2].allOf[0].properties.owner + schema56.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -35957,7 +36139,7 @@ function validate70( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[2].allOf[0].properties + schema56.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -35978,10 +36160,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[2].allOf[0].properties + schema56.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema55.anyOf[2].allOf[0].properties + schema56.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -36005,10 +36187,10 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[2].allOf[0].properties.owner.items + schema56.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema55.anyOf[2].allOf[0].properties.owner.items, + schema56.anyOf[2].allOf[0].properties.owner.items, data: data50, }; if (vErrors === null) { @@ -36031,8 +36213,8 @@ function validate70( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema55.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema55.anyOf[2].allOf[0].properties.owner, + schema: schema56.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema56.anyOf[2].allOf[0].properties.owner, data: data49, }; if (vErrors === null) { @@ -36061,8 +36243,8 @@ function validate70( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema55.anyOf[2].allOf[0].type, - parentSchema: schema55.anyOf[2].allOf[0], + schema: schema56.anyOf[2].allOf[0].type, + parentSchema: schema56.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -36089,7 +36271,7 @@ function validate70( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema55.anyOf[2].allOf[1].properties.type, + parentSchema: schema56.anyOf[2].allOf[1].properties.type, data: data52, }; if (vErrors === null) { @@ -36118,7 +36300,7 @@ function validate70( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema55.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema56.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -36135,8 +36317,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema55.anyOf[2].allOf[1].properties.codeUrl, + schema: schema56.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema56.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -36189,7 +36371,7 @@ function validate70( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[2].allOf[1].properties.services + schema56.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -36210,10 +36392,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[2].allOf[1].properties.services + schema56.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema55.anyOf[2].allOf[1].properties.services + schema56.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -36244,10 +36426,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[2].allOf[1].properties.services.items + schema56.anyOf[2].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema55.anyOf[2].allOf[1].properties.services.items + schema56.anyOf[2].allOf[1].properties.services.items .properties.serviceId, data: data57, }; @@ -36279,10 +36461,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[2].allOf[1].properties.services + schema56.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema55.anyOf[2].allOf[1].properties.services + schema56.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -36311,16 +36493,16 @@ function validate70( keyword: 'enum', params: { allowedValues: - schema55.anyOf[2].allOf[1].properties.services + schema56.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema55.anyOf[2].allOf[1].properties.services + schema56.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema55.anyOf[2].allOf[1].properties.services + schema56.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -36346,9 +36528,9 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[2].allOf[1].properties.services.items.type, + schema56.anyOf[2].allOf[1].properties.services.items.type, parentSchema: - schema55.anyOf[2].allOf[1].properties.services.items, + schema56.anyOf[2].allOf[1].properties.services.items, data: data55, }; if (vErrors === null) { @@ -36371,8 +36553,8 @@ function validate70( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema55.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema55.anyOf[2].allOf[1].properties.services, + schema: schema56.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema56.anyOf[2].allOf[1].properties.services, data: data54, }; if (vErrors === null) { @@ -36396,8 +36578,8 @@ function validate70( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema55.anyOf[2].allOf[1].type, - parentSchema: schema55.anyOf[2].allOf[1], + schema: schema56.anyOf[2].allOf[1].type, + parentSchema: schema56.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -36430,8 +36612,8 @@ function validate70( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema55.anyOf[3].allOf[0].required, - parentSchema: schema55.anyOf[3].allOf[0], + schema: schema56.anyOf[3].allOf[0].required, + parentSchema: schema56.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -36455,7 +36637,7 @@ function validate70( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema55.anyOf[3].allOf[0].properties.url, + parentSchema: schema56.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -36472,8 +36654,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema55.anyOf[3].allOf[0].properties.url, + schema: schema56.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -36500,8 +36682,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema55.anyOf[3].allOf[0].properties.name, + schema: schema56.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.name, data: data60, }; if (vErrors === null) { @@ -36526,8 +36708,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema55.anyOf[3].allOf[0].properties.description, + schema: schema56.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.description, data: data61, }; if (vErrors === null) { @@ -36552,8 +36734,8 @@ function validate70( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema55.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema55.anyOf[3].allOf[0].properties.type, + schema: schema56.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -36577,11 +36759,11 @@ function validate70( keyword: 'enum', params: { allowedValues: - schema55.anyOf[3].allOf[0].properties.type.enum, + schema56.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema55.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema55.anyOf[3].allOf[0].properties.type, + schema: schema56.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema56.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -36606,8 +36788,8 @@ function validate70( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema55.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema55.anyOf[3].allOf[0].properties.isPublic, + schema: schema56.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema56.anyOf[3].allOf[0].properties.isPublic, data: data63, }; if (vErrors === null) { @@ -36651,10 +36833,10 @@ function validate70( missing10 + "'", schema: - schema55.anyOf[3].allOf[0].properties.viewer + schema56.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema55.anyOf[3].allOf[0].properties.viewer + schema56.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -36686,7 +36868,7 @@ function validate70( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[3].allOf[0].properties + schema56.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -36710,10 +36892,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[3].allOf[0].properties + schema56.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema55.anyOf[3].allOf[0].properties + schema56.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -36737,10 +36919,10 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[3].allOf[0].properties.viewer.items + schema56.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema55.anyOf[3].allOf[0].properties.viewer + schema56.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -36764,9 +36946,9 @@ function validate70( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema55.anyOf[3].allOf[0].properties.viewer.type, + schema: schema56.anyOf[3].allOf[0].properties.viewer.type, parentSchema: - schema55.anyOf[3].allOf[0].properties.viewer, + schema56.anyOf[3].allOf[0].properties.viewer, data: data64, }; if (vErrors === null) { @@ -36814,10 +36996,10 @@ function validate70( missing11 + "'", schema: - schema55.anyOf[3].allOf[0].properties.owner + schema56.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema55.anyOf[3].allOf[0].properties.owner + schema56.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -36849,7 +37031,7 @@ function validate70( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[3].allOf[0] + schema56.anyOf[3].allOf[0] .properties.owner.items.properties .url, data: data69, @@ -36874,10 +37056,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[3].allOf[0].properties + schema56.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema55.anyOf[3].allOf[0].properties + schema56.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data69, }; @@ -36901,10 +37083,10 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[3].allOf[0].properties.owner + schema56.anyOf[3].allOf[0].properties.owner .items.type, parentSchema: - schema55.anyOf[3].allOf[0].properties.owner + schema56.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -36929,9 +37111,9 @@ function validate70( params: { type: 'array' }, message: 'must be array', schema: - schema55.anyOf[3].allOf[0].properties.owner.type, + schema56.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema55.anyOf[3].allOf[0].properties.owner, + schema56.anyOf[3].allOf[0].properties.owner, data: data67, }; if (vErrors === null) { @@ -36960,8 +37142,8 @@ function validate70( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema55.anyOf[3].allOf[0].type, - parentSchema: schema55.anyOf[3].allOf[0], + schema: schema56.anyOf[3].allOf[0].type, + parentSchema: schema56.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -36985,8 +37167,8 @@ function validate70( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema55.anyOf[3].allOf[1].required, - parentSchema: schema55.anyOf[3].allOf[1], + schema: schema56.anyOf[3].allOf[1].required, + parentSchema: schema56.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -37007,7 +37189,7 @@ function validate70( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema55.anyOf[3].allOf[1].properties.type, + parentSchema: schema56.anyOf[3].allOf[1].properties.type, data: data70, }; if (vErrors === null) { @@ -37049,10 +37231,10 @@ function validate70( message: "must have required property '" + missing13 + "'", schema: - schema55.anyOf[3].allOf[1].properties.devices.items + schema56.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema55.anyOf[3].allOf[1].properties.devices.items, + schema56.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -37079,7 +37261,7 @@ function validate70( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema55.anyOf[3].allOf[1].properties + schema56.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data73, }; @@ -37100,10 +37282,10 @@ function validate70( params: { type: 'string' }, message: 'must be string', schema: - schema55.anyOf[3].allOf[1].properties.devices + schema56.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema55.anyOf[3].allOf[1].properties.devices + schema56.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data73, }; @@ -37127,10 +37309,10 @@ function validate70( params: { type: 'object' }, message: 'must be object', schema: - schema55.anyOf[3].allOf[1].properties.devices.items + schema56.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema55.anyOf[3].allOf[1].properties.devices.items, + schema56.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -37153,8 +37335,8 @@ function validate70( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema55.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema55.anyOf[3].allOf[1].properties.devices, + schema: schema56.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema56.anyOf[3].allOf[1].properties.devices, data: data71, }; if (vErrors === null) { @@ -37178,8 +37360,8 @@ function validate70( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema55.anyOf[3].allOf[1].type, - parentSchema: schema55.anyOf[3].allOf[1], + schema: schema56.anyOf[3].allOf[1].type, + parentSchema: schema56.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -37204,8 +37386,8 @@ function validate70( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema55.anyOf, - parentSchema: schema55, + schema: schema56.anyOf, + parentSchema: schema56, data, }; if (vErrors === null) { @@ -37214,7 +37396,7 @@ function validate70( vErrors.push(err124); } errors++; - validate70.errors = vErrors; + validate71.errors = vErrors; return false; } else { errors = _errs0; @@ -37226,11 +37408,11 @@ function validate70( } } } - validate70.errors = vErrors; + validate71.errors = vErrors; return errors === 0; } -exports.validateGetDeviceResponse200 = validate71; -const schema56 = { +exports.validateGetDeviceResponse200 = validate72; +const schema57 = { title: 'Device', anyOf: [ { @@ -37585,7 +37767,7 @@ const schema56 = { '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema', 'x-schema-type': 'all', }; -function validate71( +function validate72( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -37610,8 +37792,8 @@ function validate71( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema56.anyOf[0].allOf[0].required, - parentSchema: schema56.anyOf[0].allOf[0], + schema: schema57.anyOf[0].allOf[0].required, + parentSchema: schema57.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -37635,7 +37817,7 @@ function validate71( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema56.anyOf[0].allOf[0].properties.url, + parentSchema: schema57.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -37652,8 +37834,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.url, + schema: schema57.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -37680,8 +37862,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.name, + schema: schema57.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.name, data: data1, }; if (vErrors === null) { @@ -37706,8 +37888,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.description, + schema: schema57.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.description, data: data2, }; if (vErrors === null) { @@ -37732,8 +37914,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.type, + schema: schema57.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -37756,11 +37938,11 @@ function validate71( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema56.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema57.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema56.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema56.anyOf[0].allOf[0].properties.type, + schema: schema57.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -37785,8 +37967,8 @@ function validate71( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema56.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.isPublic, + schema: schema57.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.isPublic, data: data4, }; if (vErrors === null) { @@ -37828,10 +38010,10 @@ function validate71( message: "must have required property '" + missing1 + "'", schema: - schema56.anyOf[0].allOf[0].properties.viewer.items + schema57.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema56.anyOf[0].allOf[0].properties.viewer.items, + schema57.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -37858,7 +38040,7 @@ function validate71( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[0].allOf[0].properties.viewer + schema57.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -37879,10 +38061,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[0].allOf[0].properties.viewer + schema57.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema56.anyOf[0].allOf[0].properties.viewer + schema57.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -37906,9 +38088,9 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[0].allOf[0].properties.viewer.items.type, + schema57.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema56.anyOf[0].allOf[0].properties.viewer.items, + schema57.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -37931,8 +38113,8 @@ function validate71( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema56.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.viewer, + schema: schema57.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.viewer, data: data5, }; if (vErrors === null) { @@ -37975,10 +38157,10 @@ function validate71( message: "must have required property '" + missing2 + "'", schema: - schema56.anyOf[0].allOf[0].properties.owner.items + schema57.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema56.anyOf[0].allOf[0].properties.owner.items, + schema57.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -38006,7 +38188,7 @@ function validate71( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[0].allOf[0].properties + schema57.anyOf[0].allOf[0].properties .owner.items.properties.url, data: data10, }; @@ -38027,10 +38209,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[0].allOf[0].properties.owner + schema57.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema56.anyOf[0].allOf[0].properties.owner + schema57.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data10, }; @@ -38054,10 +38236,10 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[0].allOf[0].properties.owner.items + schema57.anyOf[0].allOf[0].properties.owner.items .type, parentSchema: - schema56.anyOf[0].allOf[0].properties.owner.items, + schema57.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -38080,8 +38262,8 @@ function validate71( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema56.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema56.anyOf[0].allOf[0].properties.owner, + schema: schema57.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema57.anyOf[0].allOf[0].properties.owner, data: data8, }; if (vErrors === null) { @@ -38110,8 +38292,8 @@ function validate71( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema56.anyOf[0].allOf[0].type, - parentSchema: schema56.anyOf[0].allOf[0], + schema: schema57.anyOf[0].allOf[0].type, + parentSchema: schema57.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -38138,7 +38320,7 @@ function validate71( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema56.anyOf[0].allOf[1].properties.type, + parentSchema: schema57.anyOf[0].allOf[1].properties.type, data: data11, }; if (vErrors === null) { @@ -38167,7 +38349,7 @@ function validate71( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema56.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema57.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -38184,8 +38366,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema56.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema57.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema57.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -38231,7 +38413,7 @@ function validate71( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items + schema57.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -38252,10 +38434,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[0].allOf[1].properties.services.items + schema57.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items + schema57.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -38286,10 +38468,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[0].allOf[1].properties.services.items + schema57.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items + schema57.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data16, }; @@ -38321,10 +38503,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[0].allOf[1].properties.services.items + schema57.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items + schema57.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -38353,15 +38535,15 @@ function validate71( keyword: 'enum', params: { allowedValues: - schema56.anyOf[0].allOf[1].properties.services.items + schema57.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema56.anyOf[0].allOf[1].properties.services.items + schema57.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items + schema57.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -38386,9 +38568,9 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[0].allOf[1].properties.services.items.type, + schema57.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema56.anyOf[0].allOf[1].properties.services.items, + schema57.anyOf[0].allOf[1].properties.services.items, data: data14, }; if (vErrors === null) { @@ -38411,8 +38593,8 @@ function validate71( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema56.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema56.anyOf[0].allOf[1].properties.services, + schema: schema57.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema57.anyOf[0].allOf[1].properties.services, data: data13, }; if (vErrors === null) { @@ -38436,8 +38618,8 @@ function validate71( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema56.anyOf[0].allOf[1].type, - parentSchema: schema56.anyOf[0].allOf[1], + schema: schema57.anyOf[0].allOf[1].type, + parentSchema: schema57.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -38470,8 +38652,8 @@ function validate71( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema56.anyOf[1].allOf[0].required, - parentSchema: schema56.anyOf[1].allOf[0], + schema: schema57.anyOf[1].allOf[0].required, + parentSchema: schema57.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -38495,7 +38677,7 @@ function validate71( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema56.anyOf[1].allOf[0].properties.url, + parentSchema: schema57.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -38512,8 +38694,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.url, + schema: schema57.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -38540,8 +38722,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.name, + schema: schema57.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.name, data: data19, }; if (vErrors === null) { @@ -38566,8 +38748,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.description, + schema: schema57.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.description, data: data20, }; if (vErrors === null) { @@ -38592,8 +38774,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.type, + schema: schema57.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -38616,11 +38798,11 @@ function validate71( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema56.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema57.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema56.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema56.anyOf[1].allOf[0].properties.type, + schema: schema57.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -38645,8 +38827,8 @@ function validate71( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema56.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.isPublic, + schema: schema57.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.isPublic, data: data22, }; if (vErrors === null) { @@ -38688,10 +38870,10 @@ function validate71( message: "must have required property '" + missing4 + "'", schema: - schema56.anyOf[1].allOf[0].properties.viewer.items + schema57.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema56.anyOf[1].allOf[0].properties.viewer.items, + schema57.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -38719,7 +38901,7 @@ function validate71( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[1].allOf[0].properties + schema57.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -38740,10 +38922,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[1].allOf[0].properties.viewer + schema57.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema56.anyOf[1].allOf[0].properties.viewer + schema57.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data25, }; @@ -38767,10 +38949,10 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[1].allOf[0].properties.viewer.items + schema57.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema56.anyOf[1].allOf[0].properties.viewer.items, + schema57.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -38793,8 +38975,8 @@ function validate71( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema56.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.viewer, + schema: schema57.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.viewer, data: data23, }; if (vErrors === null) { @@ -38837,10 +39019,10 @@ function validate71( message: "must have required property '" + missing5 + "'", schema: - schema56.anyOf[1].allOf[0].properties.owner.items + schema57.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema56.anyOf[1].allOf[0].properties.owner.items, + schema57.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -38868,7 +39050,7 @@ function validate71( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[1].allOf[0].properties + schema57.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -38889,10 +39071,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[1].allOf[0].properties + schema57.anyOf[1].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema56.anyOf[1].allOf[0].properties + schema57.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -38916,10 +39098,10 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[1].allOf[0].properties.owner.items + schema57.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema56.anyOf[1].allOf[0].properties.owner.items, + schema57.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -38942,8 +39124,8 @@ function validate71( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema56.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema56.anyOf[1].allOf[0].properties.owner, + schema: schema57.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema57.anyOf[1].allOf[0].properties.owner, data: data26, }; if (vErrors === null) { @@ -38972,8 +39154,8 @@ function validate71( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema56.anyOf[1].allOf[0].type, - parentSchema: schema56.anyOf[1].allOf[0], + schema: schema57.anyOf[1].allOf[0].type, + parentSchema: schema57.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -39000,7 +39182,7 @@ function validate71( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema56.anyOf[1].allOf[1].properties.type, + parentSchema: schema57.anyOf[1].allOf[1].properties.type, data: data29, }; if (vErrors === null) { @@ -39025,8 +39207,8 @@ function validate71( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema56.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema56.anyOf[1].allOf[1].properties.connected, + schema: schema57.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema57.anyOf[1].allOf[1].properties.connected, data: data30, }; if (vErrors === null) { @@ -39077,7 +39259,7 @@ function validate71( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema56.anyOf[1].allOf[1].properties + schema57.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -39101,11 +39283,11 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[1].allOf[1].properties + schema57.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start .type, parentSchema: - schema56.anyOf[1].allOf[1].properties + schema57.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -39144,7 +39326,7 @@ function validate71( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema56.anyOf[1].allOf[1].properties + schema57.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -39168,11 +39350,11 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[1].allOf[1].properties + schema57.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end .type, parentSchema: - schema56.anyOf[1].allOf[1].properties + schema57.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -39199,10 +39381,10 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[1].allOf[1].properties.announcedAvailability + schema57.anyOf[1].allOf[1].properties.announcedAvailability .items.type, parentSchema: - schema56.anyOf[1].allOf[1].properties.announcedAvailability + schema57.anyOf[1].allOf[1].properties.announcedAvailability .items, data: data32, }; @@ -39228,9 +39410,9 @@ function validate71( params: { type: 'array' }, message: 'must be array', schema: - schema56.anyOf[1].allOf[1].properties.announcedAvailability.type, + schema57.anyOf[1].allOf[1].properties.announcedAvailability.type, parentSchema: - schema56.anyOf[1].allOf[1].properties.announcedAvailability, + schema57.anyOf[1].allOf[1].properties.announcedAvailability, data: data31, }; if (vErrors === null) { @@ -39261,7 +39443,7 @@ function validate71( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[1].allOf[1].properties.experiment, + schema57.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -39278,8 +39460,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema56.anyOf[1].allOf[1].properties.experiment, + schema: schema57.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema57.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -39332,7 +39514,7 @@ function validate71( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[1].allOf[1].properties.services + schema57.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -39356,10 +39538,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[1].allOf[1].properties.services + schema57.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema56.anyOf[1].allOf[1].properties.services + schema57.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -39390,10 +39572,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[1].allOf[1].properties.services + schema57.anyOf[1].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema56.anyOf[1].allOf[1].properties.services + schema57.anyOf[1].allOf[1].properties.services .items.properties.serviceId, data: data39, }; @@ -39425,10 +39607,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[1].allOf[1].properties.services + schema57.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema56.anyOf[1].allOf[1].properties.services + schema57.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -39457,16 +39639,16 @@ function validate71( keyword: 'enum', params: { allowedValues: - schema56.anyOf[1].allOf[1].properties.services + schema57.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema56.anyOf[1].allOf[1].properties.services + schema57.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema56.anyOf[1].allOf[1].properties.services + schema57.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -39492,10 +39674,10 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[1].allOf[1].properties.services.items + schema57.anyOf[1].allOf[1].properties.services.items .type, parentSchema: - schema56.anyOf[1].allOf[1].properties.services.items, + schema57.anyOf[1].allOf[1].properties.services.items, data: data37, }; if (vErrors === null) { @@ -39518,8 +39700,8 @@ function validate71( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema56.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema56.anyOf[1].allOf[1].properties.services, + schema: schema57.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema57.anyOf[1].allOf[1].properties.services, data: data36, }; if (vErrors === null) { @@ -39545,8 +39727,8 @@ function validate71( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema56.anyOf[1].allOf[1].type, - parentSchema: schema56.anyOf[1].allOf[1], + schema: schema57.anyOf[1].allOf[1].type, + parentSchema: schema57.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -39579,8 +39761,8 @@ function validate71( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema56.anyOf[2].allOf[0].required, - parentSchema: schema56.anyOf[2].allOf[0], + schema: schema57.anyOf[2].allOf[0].required, + parentSchema: schema57.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -39604,7 +39786,7 @@ function validate71( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema56.anyOf[2].allOf[0].properties.url, + parentSchema: schema57.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -39621,8 +39803,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.url, + schema: schema57.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -39649,8 +39831,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.name, + schema: schema57.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.name, data: data42, }; if (vErrors === null) { @@ -39675,8 +39857,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.description, + schema: schema57.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.description, data: data43, }; if (vErrors === null) { @@ -39701,8 +39883,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.type, + schema: schema57.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -39725,11 +39907,11 @@ function validate71( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema56.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema57.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema56.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema56.anyOf[2].allOf[0].properties.type, + schema: schema57.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -39754,8 +39936,8 @@ function validate71( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema56.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.isPublic, + schema: schema57.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.isPublic, data: data45, }; if (vErrors === null) { @@ -39797,10 +39979,10 @@ function validate71( message: "must have required property '" + missing7 + "'", schema: - schema56.anyOf[2].allOf[0].properties.viewer.items + schema57.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema56.anyOf[2].allOf[0].properties.viewer + schema57.anyOf[2].allOf[0].properties.viewer .items, data: data47, }; @@ -39829,7 +40011,7 @@ function validate71( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[2].allOf[0].properties + schema57.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -39850,10 +40032,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[2].allOf[0].properties + schema57.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema56.anyOf[2].allOf[0].properties + schema57.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -39877,10 +40059,10 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[2].allOf[0].properties.viewer.items + schema57.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema56.anyOf[2].allOf[0].properties.viewer.items, + schema57.anyOf[2].allOf[0].properties.viewer.items, data: data47, }; if (vErrors === null) { @@ -39903,8 +40085,8 @@ function validate71( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema56.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.viewer, + schema: schema57.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.viewer, data: data46, }; if (vErrors === null) { @@ -39949,10 +40131,10 @@ function validate71( missing8 + "'", schema: - schema56.anyOf[2].allOf[0].properties.owner + schema57.anyOf[2].allOf[0].properties.owner .items.required, parentSchema: - schema56.anyOf[2].allOf[0].properties.owner + schema57.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -39984,7 +40166,7 @@ function validate71( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[2].allOf[0].properties + schema57.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -40005,10 +40187,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[2].allOf[0].properties + schema57.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema56.anyOf[2].allOf[0].properties + schema57.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -40032,10 +40214,10 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[2].allOf[0].properties.owner.items + schema57.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema56.anyOf[2].allOf[0].properties.owner.items, + schema57.anyOf[2].allOf[0].properties.owner.items, data: data50, }; if (vErrors === null) { @@ -40058,8 +40240,8 @@ function validate71( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema56.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema56.anyOf[2].allOf[0].properties.owner, + schema: schema57.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema57.anyOf[2].allOf[0].properties.owner, data: data49, }; if (vErrors === null) { @@ -40088,8 +40270,8 @@ function validate71( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema56.anyOf[2].allOf[0].type, - parentSchema: schema56.anyOf[2].allOf[0], + schema: schema57.anyOf[2].allOf[0].type, + parentSchema: schema57.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -40116,7 +40298,7 @@ function validate71( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema56.anyOf[2].allOf[1].properties.type, + parentSchema: schema57.anyOf[2].allOf[1].properties.type, data: data52, }; if (vErrors === null) { @@ -40145,7 +40327,7 @@ function validate71( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema56.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema57.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -40162,8 +40344,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema56.anyOf[2].allOf[1].properties.codeUrl, + schema: schema57.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema57.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -40216,7 +40398,7 @@ function validate71( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[2].allOf[1].properties.services + schema57.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -40237,10 +40419,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[2].allOf[1].properties.services + schema57.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema56.anyOf[2].allOf[1].properties.services + schema57.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -40271,10 +40453,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[2].allOf[1].properties.services.items + schema57.anyOf[2].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema56.anyOf[2].allOf[1].properties.services.items + schema57.anyOf[2].allOf[1].properties.services.items .properties.serviceId, data: data57, }; @@ -40306,10 +40488,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[2].allOf[1].properties.services + schema57.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema56.anyOf[2].allOf[1].properties.services + schema57.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -40338,16 +40520,16 @@ function validate71( keyword: 'enum', params: { allowedValues: - schema56.anyOf[2].allOf[1].properties.services + schema57.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema56.anyOf[2].allOf[1].properties.services + schema57.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema56.anyOf[2].allOf[1].properties.services + schema57.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -40373,9 +40555,9 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[2].allOf[1].properties.services.items.type, + schema57.anyOf[2].allOf[1].properties.services.items.type, parentSchema: - schema56.anyOf[2].allOf[1].properties.services.items, + schema57.anyOf[2].allOf[1].properties.services.items, data: data55, }; if (vErrors === null) { @@ -40398,8 +40580,8 @@ function validate71( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema56.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema56.anyOf[2].allOf[1].properties.services, + schema: schema57.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema57.anyOf[2].allOf[1].properties.services, data: data54, }; if (vErrors === null) { @@ -40423,8 +40605,8 @@ function validate71( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema56.anyOf[2].allOf[1].type, - parentSchema: schema56.anyOf[2].allOf[1], + schema: schema57.anyOf[2].allOf[1].type, + parentSchema: schema57.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -40457,8 +40639,8 @@ function validate71( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema56.anyOf[3].allOf[0].required, - parentSchema: schema56.anyOf[3].allOf[0], + schema: schema57.anyOf[3].allOf[0].required, + parentSchema: schema57.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -40482,7 +40664,7 @@ function validate71( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema56.anyOf[3].allOf[0].properties.url, + parentSchema: schema57.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -40499,8 +40681,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema56.anyOf[3].allOf[0].properties.url, + schema: schema57.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -40527,8 +40709,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema56.anyOf[3].allOf[0].properties.name, + schema: schema57.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.name, data: data60, }; if (vErrors === null) { @@ -40553,8 +40735,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema56.anyOf[3].allOf[0].properties.description, + schema: schema57.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.description, data: data61, }; if (vErrors === null) { @@ -40579,8 +40761,8 @@ function validate71( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema56.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema56.anyOf[3].allOf[0].properties.type, + schema: schema57.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -40604,11 +40786,11 @@ function validate71( keyword: 'enum', params: { allowedValues: - schema56.anyOf[3].allOf[0].properties.type.enum, + schema57.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema56.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema56.anyOf[3].allOf[0].properties.type, + schema: schema57.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema57.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -40633,8 +40815,8 @@ function validate71( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema56.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema56.anyOf[3].allOf[0].properties.isPublic, + schema: schema57.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema57.anyOf[3].allOf[0].properties.isPublic, data: data63, }; if (vErrors === null) { @@ -40678,10 +40860,10 @@ function validate71( missing10 + "'", schema: - schema56.anyOf[3].allOf[0].properties.viewer + schema57.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema56.anyOf[3].allOf[0].properties.viewer + schema57.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -40713,7 +40895,7 @@ function validate71( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[3].allOf[0].properties + schema57.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -40737,10 +40919,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[3].allOf[0].properties + schema57.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema56.anyOf[3].allOf[0].properties + schema57.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -40764,10 +40946,10 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[3].allOf[0].properties.viewer.items + schema57.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema56.anyOf[3].allOf[0].properties.viewer + schema57.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -40791,9 +40973,9 @@ function validate71( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema56.anyOf[3].allOf[0].properties.viewer.type, + schema: schema57.anyOf[3].allOf[0].properties.viewer.type, parentSchema: - schema56.anyOf[3].allOf[0].properties.viewer, + schema57.anyOf[3].allOf[0].properties.viewer, data: data64, }; if (vErrors === null) { @@ -40841,10 +41023,10 @@ function validate71( missing11 + "'", schema: - schema56.anyOf[3].allOf[0].properties.owner + schema57.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema56.anyOf[3].allOf[0].properties.owner + schema57.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -40876,7 +41058,7 @@ function validate71( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[3].allOf[0] + schema57.anyOf[3].allOf[0] .properties.owner.items.properties .url, data: data69, @@ -40901,10 +41083,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[3].allOf[0].properties + schema57.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema56.anyOf[3].allOf[0].properties + schema57.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data69, }; @@ -40928,10 +41110,10 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[3].allOf[0].properties.owner + schema57.anyOf[3].allOf[0].properties.owner .items.type, parentSchema: - schema56.anyOf[3].allOf[0].properties.owner + schema57.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -40956,9 +41138,9 @@ function validate71( params: { type: 'array' }, message: 'must be array', schema: - schema56.anyOf[3].allOf[0].properties.owner.type, + schema57.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema56.anyOf[3].allOf[0].properties.owner, + schema57.anyOf[3].allOf[0].properties.owner, data: data67, }; if (vErrors === null) { @@ -40987,8 +41169,8 @@ function validate71( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema56.anyOf[3].allOf[0].type, - parentSchema: schema56.anyOf[3].allOf[0], + schema: schema57.anyOf[3].allOf[0].type, + parentSchema: schema57.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -41012,8 +41194,8 @@ function validate71( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema56.anyOf[3].allOf[1].required, - parentSchema: schema56.anyOf[3].allOf[1], + schema: schema57.anyOf[3].allOf[1].required, + parentSchema: schema57.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -41034,7 +41216,7 @@ function validate71( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema56.anyOf[3].allOf[1].properties.type, + parentSchema: schema57.anyOf[3].allOf[1].properties.type, data: data70, }; if (vErrors === null) { @@ -41076,10 +41258,10 @@ function validate71( message: "must have required property '" + missing13 + "'", schema: - schema56.anyOf[3].allOf[1].properties.devices.items + schema57.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema56.anyOf[3].allOf[1].properties.devices.items, + schema57.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -41106,7 +41288,7 @@ function validate71( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema56.anyOf[3].allOf[1].properties + schema57.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data73, }; @@ -41127,10 +41309,10 @@ function validate71( params: { type: 'string' }, message: 'must be string', schema: - schema56.anyOf[3].allOf[1].properties.devices + schema57.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema56.anyOf[3].allOf[1].properties.devices + schema57.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data73, }; @@ -41154,10 +41336,10 @@ function validate71( params: { type: 'object' }, message: 'must be object', schema: - schema56.anyOf[3].allOf[1].properties.devices.items + schema57.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema56.anyOf[3].allOf[1].properties.devices.items, + schema57.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -41180,8 +41362,8 @@ function validate71( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema56.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema56.anyOf[3].allOf[1].properties.devices, + schema: schema57.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema57.anyOf[3].allOf[1].properties.devices, data: data71, }; if (vErrors === null) { @@ -41205,8 +41387,8 @@ function validate71( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema56.anyOf[3].allOf[1].type, - parentSchema: schema56.anyOf[3].allOf[1], + schema: schema57.anyOf[3].allOf[1].type, + parentSchema: schema57.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -41231,8 +41413,8 @@ function validate71( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema56.anyOf, - parentSchema: schema56, + schema: schema57.anyOf, + parentSchema: schema57, data, }; if (vErrors === null) { @@ -41241,7 +41423,7 @@ function validate71( vErrors.push(err124); } errors++; - validate71.errors = vErrors; + validate72.errors = vErrors; return false; } else { errors = _errs0; @@ -41253,11 +41435,11 @@ function validate71( } } } - validate71.errors = vErrors; + validate72.errors = vErrors; return errors === 0; } -exports.validateUpdateDeviceBody = validate72; -const schema57 = { +exports.validateUpdateDeviceBody = validate73; +const schema58 = { title: 'Device Update', anyOf: [ { @@ -41557,7 +41739,7 @@ const schema57 = { '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema', 'x-schema-type': 'all', }; -function validate72( +function validate73( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -41577,8 +41759,8 @@ function validate72( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema57.anyOf[0].allOf[0].required, - parentSchema: schema57.anyOf[0].allOf[0], + schema: schema58.anyOf[0].allOf[0].required, + parentSchema: schema58.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -41598,8 +41780,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.name, + schema: schema58.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.name, data: data0, }; if (vErrors === null) { @@ -41624,8 +41806,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.description, + schema: schema58.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.description, data: data1, }; if (vErrors === null) { @@ -41650,8 +41832,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.type, + schema: schema58.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -41674,11 +41856,11 @@ function validate72( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema57.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema58.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema57.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema57.anyOf[0].allOf[0].properties.type, + schema: schema58.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -41703,8 +41885,8 @@ function validate72( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema57.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.isPublic, + schema: schema58.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.isPublic, data: data3, }; if (vErrors === null) { @@ -41745,10 +41927,10 @@ function validate72( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", schema: - schema57.anyOf[0].allOf[0].properties.viewer.items + schema58.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema57.anyOf[0].allOf[0].properties.viewer.items, + schema58.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -41775,7 +41957,7 @@ function validate72( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[0].allOf[0].properties.viewer + schema58.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -41796,10 +41978,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[0].allOf[0].properties.viewer + schema58.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema57.anyOf[0].allOf[0].properties.viewer + schema58.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -41823,9 +42005,9 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[0].allOf[0].properties.viewer.items.type, + schema58.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema57.anyOf[0].allOf[0].properties.viewer.items, + schema58.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -41848,8 +42030,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.viewer, + schema: schema58.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.viewer, data: data4, }; if (vErrors === null) { @@ -41892,10 +42074,10 @@ function validate72( message: "must have required property '" + missing2 + "'", schema: - schema57.anyOf[0].allOf[0].properties.owner.items + schema58.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema57.anyOf[0].allOf[0].properties.owner.items, + schema58.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -41922,7 +42104,7 @@ function validate72( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[0].allOf[0].properties.owner + schema58.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -41943,10 +42125,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[0].allOf[0].properties.owner + schema58.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema57.anyOf[0].allOf[0].properties.owner + schema58.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -41970,9 +42152,9 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[0].allOf[0].properties.owner.items.type, + schema58.anyOf[0].allOf[0].properties.owner.items.type, parentSchema: - schema57.anyOf[0].allOf[0].properties.owner.items, + schema58.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -41995,8 +42177,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema57.anyOf[0].allOf[0].properties.owner, + schema: schema58.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema58.anyOf[0].allOf[0].properties.owner, data: data7, }; if (vErrors === null) { @@ -42024,8 +42206,8 @@ function validate72( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema57.anyOf[0].allOf[0].type, - parentSchema: schema57.anyOf[0].allOf[0], + schema: schema58.anyOf[0].allOf[0].type, + parentSchema: schema58.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -42052,7 +42234,7 @@ function validate72( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema57.anyOf[0].allOf[1].properties.type, + parentSchema: schema58.anyOf[0].allOf[1].properties.type, data: data10, }; if (vErrors === null) { @@ -42081,7 +42263,7 @@ function validate72( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema57.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema58.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -42098,8 +42280,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema57.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema58.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema58.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -42145,7 +42327,7 @@ function validate72( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items + schema58.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -42166,10 +42348,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[0].allOf[1].properties.services.items + schema58.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items + schema58.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -42200,10 +42382,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[0].allOf[1].properties.services.items + schema58.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items + schema58.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data15, }; @@ -42235,10 +42417,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[0].allOf[1].properties.services.items + schema58.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items + schema58.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -42267,15 +42449,15 @@ function validate72( keyword: 'enum', params: { allowedValues: - schema57.anyOf[0].allOf[1].properties.services.items + schema58.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema57.anyOf[0].allOf[1].properties.services.items + schema58.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items + schema58.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -42300,9 +42482,9 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[0].allOf[1].properties.services.items.type, + schema58.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema57.anyOf[0].allOf[1].properties.services.items, + schema58.anyOf[0].allOf[1].properties.services.items, data: data13, }; if (vErrors === null) { @@ -42325,8 +42507,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema57.anyOf[0].allOf[1].properties.services, + schema: schema58.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema58.anyOf[0].allOf[1].properties.services, data: data12, }; if (vErrors === null) { @@ -42350,8 +42532,8 @@ function validate72( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema57.anyOf[0].allOf[1].type, - parentSchema: schema57.anyOf[0].allOf[1], + schema: schema58.anyOf[0].allOf[1].type, + parentSchema: schema58.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -42379,8 +42561,8 @@ function validate72( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema57.anyOf[1].allOf[0].required, - parentSchema: schema57.anyOf[1].allOf[0], + schema: schema58.anyOf[1].allOf[0].required, + parentSchema: schema58.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -42400,8 +42582,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.name, + schema: schema58.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.name, data: data17, }; if (vErrors === null) { @@ -42426,8 +42608,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.description, + schema: schema58.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.description, data: data18, }; if (vErrors === null) { @@ -42452,8 +42634,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.type, + schema: schema58.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -42476,11 +42658,11 @@ function validate72( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema57.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema58.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema57.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema57.anyOf[1].allOf[0].properties.type, + schema: schema58.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -42505,8 +42687,8 @@ function validate72( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema57.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.isPublic, + schema: schema58.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.isPublic, data: data20, }; if (vErrors === null) { @@ -42548,10 +42730,10 @@ function validate72( message: "must have required property '" + missing4 + "'", schema: - schema57.anyOf[1].allOf[0].properties.viewer.items + schema58.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema57.anyOf[1].allOf[0].properties.viewer.items, + schema58.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -42578,7 +42760,7 @@ function validate72( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[1].allOf[0].properties.viewer + schema58.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -42599,10 +42781,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[1].allOf[0].properties.viewer + schema58.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema57.anyOf[1].allOf[0].properties.viewer + schema58.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -42626,9 +42808,9 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[1].allOf[0].properties.viewer.items.type, + schema58.anyOf[1].allOf[0].properties.viewer.items.type, parentSchema: - schema57.anyOf[1].allOf[0].properties.viewer.items, + schema58.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -42651,8 +42833,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.viewer, + schema: schema58.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.viewer, data: data21, }; if (vErrors === null) { @@ -42695,10 +42877,10 @@ function validate72( message: "must have required property '" + missing5 + "'", schema: - schema57.anyOf[1].allOf[0].properties.owner.items + schema58.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema57.anyOf[1].allOf[0].properties.owner.items, + schema58.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -42726,7 +42908,7 @@ function validate72( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[1].allOf[0].properties + schema58.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data26, }; @@ -42747,10 +42929,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[1].allOf[0].properties.owner + schema58.anyOf[1].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema57.anyOf[1].allOf[0].properties.owner + schema58.anyOf[1].allOf[0].properties.owner .items.properties.url, data: data26, }; @@ -42774,10 +42956,10 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[1].allOf[0].properties.owner.items + schema58.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema57.anyOf[1].allOf[0].properties.owner.items, + schema58.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -42800,8 +42982,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema57.anyOf[1].allOf[0].properties.owner, + schema: schema58.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema58.anyOf[1].allOf[0].properties.owner, data: data24, }; if (vErrors === null) { @@ -42829,8 +43011,8 @@ function validate72( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema57.anyOf[1].allOf[0].type, - parentSchema: schema57.anyOf[1].allOf[0], + schema: schema58.anyOf[1].allOf[0].type, + parentSchema: schema58.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -42857,7 +43039,7 @@ function validate72( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema57.anyOf[1].allOf[1].properties.type, + parentSchema: schema58.anyOf[1].allOf[1].properties.type, data: data27, }; if (vErrors === null) { @@ -42886,7 +43068,7 @@ function validate72( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema57.anyOf[1].allOf[1].properties.experiment, + parentSchema: schema58.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -42903,8 +43085,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema57.anyOf[1].allOf[1].properties.experiment, + schema: schema58.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema58.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -42954,7 +43136,7 @@ function validate72( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[1].allOf[1].properties.services + schema58.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -42975,10 +43157,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[1].allOf[1].properties.services.items + schema58.anyOf[1].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema57.anyOf[1].allOf[1].properties.services.items + schema58.anyOf[1].allOf[1].properties.services.items .properties.serviceType, data: data31, }; @@ -43009,10 +43191,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[1].allOf[1].properties.services.items + schema58.anyOf[1].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema57.anyOf[1].allOf[1].properties.services.items + schema58.anyOf[1].allOf[1].properties.services.items .properties.serviceId, data: data32, }; @@ -43044,10 +43226,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[1].allOf[1].properties.services.items + schema58.anyOf[1].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema57.anyOf[1].allOf[1].properties.services.items + schema58.anyOf[1].allOf[1].properties.services.items .properties.serviceDirection, data: data33, }; @@ -43076,15 +43258,15 @@ function validate72( keyword: 'enum', params: { allowedValues: - schema57.anyOf[1].allOf[1].properties.services + schema58.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema57.anyOf[1].allOf[1].properties.services.items + schema58.anyOf[1].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema57.anyOf[1].allOf[1].properties.services.items + schema58.anyOf[1].allOf[1].properties.services.items .properties.serviceDirection, data: data33, }; @@ -43110,9 +43292,9 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[1].allOf[1].properties.services.items.type, + schema58.anyOf[1].allOf[1].properties.services.items.type, parentSchema: - schema57.anyOf[1].allOf[1].properties.services.items, + schema58.anyOf[1].allOf[1].properties.services.items, data: data30, }; if (vErrors === null) { @@ -43135,8 +43317,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema57.anyOf[1].allOf[1].properties.services, + schema: schema58.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema58.anyOf[1].allOf[1].properties.services, data: data29, }; if (vErrors === null) { @@ -43160,8 +43342,8 @@ function validate72( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema57.anyOf[1].allOf[1].type, - parentSchema: schema57.anyOf[1].allOf[1], + schema: schema58.anyOf[1].allOf[1].type, + parentSchema: schema58.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -43189,8 +43371,8 @@ function validate72( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema57.anyOf[2].allOf[0].required, - parentSchema: schema57.anyOf[2].allOf[0], + schema: schema58.anyOf[2].allOf[0].required, + parentSchema: schema58.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -43210,8 +43392,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.name, + schema: schema58.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.name, data: data34, }; if (vErrors === null) { @@ -43236,8 +43418,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.description, + schema: schema58.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.description, data: data35, }; if (vErrors === null) { @@ -43262,8 +43444,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.type, + schema: schema58.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -43286,11 +43468,11 @@ function validate72( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema57.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema58.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema57.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema57.anyOf[2].allOf[0].properties.type, + schema: schema58.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -43315,8 +43497,8 @@ function validate72( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema57.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.isPublic, + schema: schema58.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.isPublic, data: data37, }; if (vErrors === null) { @@ -43358,10 +43540,10 @@ function validate72( message: "must have required property '" + missing7 + "'", schema: - schema57.anyOf[2].allOf[0].properties.viewer.items + schema58.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema57.anyOf[2].allOf[0].properties.viewer.items, + schema58.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -43389,7 +43571,7 @@ function validate72( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[2].allOf[0].properties + schema58.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -43410,10 +43592,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[2].allOf[0].properties.viewer + schema58.anyOf[2].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema57.anyOf[2].allOf[0].properties.viewer + schema58.anyOf[2].allOf[0].properties.viewer .items.properties.url, data: data40, }; @@ -43437,10 +43619,10 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[2].allOf[0].properties.viewer.items + schema58.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema57.anyOf[2].allOf[0].properties.viewer.items, + schema58.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -43463,8 +43645,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.viewer, + schema: schema58.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.viewer, data: data38, }; if (vErrors === null) { @@ -43507,10 +43689,10 @@ function validate72( message: "must have required property '" + missing8 + "'", schema: - schema57.anyOf[2].allOf[0].properties.owner.items + schema58.anyOf[2].allOf[0].properties.owner.items .required, parentSchema: - schema57.anyOf[2].allOf[0].properties.owner.items, + schema58.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -43538,7 +43720,7 @@ function validate72( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[2].allOf[0].properties + schema58.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -43559,10 +43741,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[2].allOf[0].properties + schema58.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema57.anyOf[2].allOf[0].properties + schema58.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -43586,10 +43768,10 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[2].allOf[0].properties.owner.items + schema58.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema57.anyOf[2].allOf[0].properties.owner.items, + schema58.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -43612,8 +43794,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema57.anyOf[2].allOf[0].properties.owner, + schema: schema58.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema58.anyOf[2].allOf[0].properties.owner, data: data41, }; if (vErrors === null) { @@ -43641,8 +43823,8 @@ function validate72( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema57.anyOf[2].allOf[0].type, - parentSchema: schema57.anyOf[2].allOf[0], + schema: schema58.anyOf[2].allOf[0].type, + parentSchema: schema58.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -43669,7 +43851,7 @@ function validate72( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema57.anyOf[2].allOf[1].properties.type, + parentSchema: schema58.anyOf[2].allOf[1].properties.type, data: data44, }; if (vErrors === null) { @@ -43698,7 +43880,7 @@ function validate72( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema57.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema58.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -43715,8 +43897,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema57.anyOf[2].allOf[1].properties.codeUrl, + schema: schema58.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema58.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -43769,7 +43951,7 @@ function validate72( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[2].allOf[1].properties.services + schema58.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -43790,10 +43972,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[2].allOf[1].properties.services + schema58.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema57.anyOf[2].allOf[1].properties.services + schema58.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -43824,10 +44006,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[2].allOf[1].properties.services.items + schema58.anyOf[2].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema57.anyOf[2].allOf[1].properties.services.items + schema58.anyOf[2].allOf[1].properties.services.items .properties.serviceId, data: data49, }; @@ -43859,10 +44041,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[2].allOf[1].properties.services + schema58.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema57.anyOf[2].allOf[1].properties.services + schema58.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -43891,16 +44073,16 @@ function validate72( keyword: 'enum', params: { allowedValues: - schema57.anyOf[2].allOf[1].properties.services + schema58.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema57.anyOf[2].allOf[1].properties.services + schema58.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema57.anyOf[2].allOf[1].properties.services + schema58.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -43926,9 +44108,9 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[2].allOf[1].properties.services.items.type, + schema58.anyOf[2].allOf[1].properties.services.items.type, parentSchema: - schema57.anyOf[2].allOf[1].properties.services.items, + schema58.anyOf[2].allOf[1].properties.services.items, data: data47, }; if (vErrors === null) { @@ -43951,8 +44133,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema57.anyOf[2].allOf[1].properties.services, + schema: schema58.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema58.anyOf[2].allOf[1].properties.services, data: data46, }; if (vErrors === null) { @@ -43976,8 +44158,8 @@ function validate72( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema57.anyOf[2].allOf[1].type, - parentSchema: schema57.anyOf[2].allOf[1], + schema: schema58.anyOf[2].allOf[1].type, + parentSchema: schema58.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -44005,8 +44187,8 @@ function validate72( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema57.anyOf[3].allOf[0].required, - parentSchema: schema57.anyOf[3].allOf[0], + schema: schema58.anyOf[3].allOf[0].required, + parentSchema: schema58.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -44026,8 +44208,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.name, + schema: schema58.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.name, data: data51, }; if (vErrors === null) { @@ -44052,8 +44234,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.description, + schema: schema58.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.description, data: data52, }; if (vErrors === null) { @@ -44078,8 +44260,8 @@ function validate72( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema57.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.type, + schema: schema58.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -44102,11 +44284,11 @@ function validate72( schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema57.anyOf[3].allOf[0].properties.type.enum, + allowedValues: schema58.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema57.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema57.anyOf[3].allOf[0].properties.type, + schema: schema58.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema58.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -44131,8 +44313,8 @@ function validate72( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema57.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.isPublic, + schema: schema58.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.isPublic, data: data54, }; if (vErrors === null) { @@ -44174,10 +44356,10 @@ function validate72( message: "must have required property '" + missing10 + "'", schema: - schema57.anyOf[3].allOf[0].properties.viewer.items + schema58.anyOf[3].allOf[0].properties.viewer.items .required, parentSchema: - schema57.anyOf[3].allOf[0].properties.viewer + schema58.anyOf[3].allOf[0].properties.viewer .items, data: data56, }; @@ -44206,7 +44388,7 @@ function validate72( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[3].allOf[0].properties + schema58.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -44227,10 +44409,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[3].allOf[0].properties + schema58.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema57.anyOf[3].allOf[0].properties + schema58.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -44254,10 +44436,10 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[3].allOf[0].properties.viewer.items + schema58.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema57.anyOf[3].allOf[0].properties.viewer.items, + schema58.anyOf[3].allOf[0].properties.viewer.items, data: data56, }; if (vErrors === null) { @@ -44280,8 +44462,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.viewer, + schema: schema58.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.viewer, data: data55, }; if (vErrors === null) { @@ -44326,10 +44508,10 @@ function validate72( missing11 + "'", schema: - schema57.anyOf[3].allOf[0].properties.owner + schema58.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema57.anyOf[3].allOf[0].properties.owner + schema58.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -44361,7 +44543,7 @@ function validate72( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[3].allOf[0].properties + schema58.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -44382,10 +44564,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[3].allOf[0].properties + schema58.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema57.anyOf[3].allOf[0].properties + schema58.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -44409,10 +44591,10 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[3].allOf[0].properties.owner.items + schema58.anyOf[3].allOf[0].properties.owner.items .type, parentSchema: - schema57.anyOf[3].allOf[0].properties.owner.items, + schema58.anyOf[3].allOf[0].properties.owner.items, data: data59, }; if (vErrors === null) { @@ -44435,8 +44617,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[3].allOf[0].properties.owner.type, - parentSchema: schema57.anyOf[3].allOf[0].properties.owner, + schema: schema58.anyOf[3].allOf[0].properties.owner.type, + parentSchema: schema58.anyOf[3].allOf[0].properties.owner, data: data58, }; if (vErrors === null) { @@ -44464,8 +44646,8 @@ function validate72( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema57.anyOf[3].allOf[0].type, - parentSchema: schema57.anyOf[3].allOf[0], + schema: schema58.anyOf[3].allOf[0].type, + parentSchema: schema58.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -44492,7 +44674,7 @@ function validate72( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema57.anyOf[3].allOf[1].properties.type, + parentSchema: schema58.anyOf[3].allOf[1].properties.type, data: data61, }; if (vErrors === null) { @@ -44534,10 +44716,10 @@ function validate72( message: "must have required property '" + missing12 + "'", schema: - schema57.anyOf[3].allOf[1].properties.devices.items + schema58.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema57.anyOf[3].allOf[1].properties.devices.items, + schema58.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -44564,7 +44746,7 @@ function validate72( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema57.anyOf[3].allOf[1].properties.devices + schema58.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -44585,10 +44767,10 @@ function validate72( params: { type: 'string' }, message: 'must be string', schema: - schema57.anyOf[3].allOf[1].properties.devices + schema58.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema57.anyOf[3].allOf[1].properties.devices + schema58.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -44612,9 +44794,9 @@ function validate72( params: { type: 'object' }, message: 'must be object', schema: - schema57.anyOf[3].allOf[1].properties.devices.items.type, + schema58.anyOf[3].allOf[1].properties.devices.items.type, parentSchema: - schema57.anyOf[3].allOf[1].properties.devices.items, + schema58.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -44637,8 +44819,8 @@ function validate72( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema57.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema57.anyOf[3].allOf[1].properties.devices, + schema: schema58.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema58.anyOf[3].allOf[1].properties.devices, data: data62, }; if (vErrors === null) { @@ -44661,8 +44843,8 @@ function validate72( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema57.anyOf[3].allOf[1].type, - parentSchema: schema57.anyOf[3].allOf[1], + schema: schema58.anyOf[3].allOf[1].type, + parentSchema: schema58.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -44687,8 +44869,8 @@ function validate72( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema57.anyOf, - parentSchema: schema57, + schema: schema58.anyOf, + parentSchema: schema58, data, }; if (vErrors === null) { @@ -44697,7 +44879,7 @@ function validate72( vErrors.push(err108); } errors++; - validate72.errors = vErrors; + validate73.errors = vErrors; return false; } else { errors = _errs0; @@ -44709,11 +44891,11 @@ function validate72( } } } - validate72.errors = vErrors; + validate73.errors = vErrors; return errors === 0; } -exports.validateUpdateDeviceResponse200 = validate73; -const schema58 = { +exports.validateUpdateDeviceResponse200 = validate74; +const schema59 = { title: 'Device', anyOf: [ { @@ -45068,7 +45250,7 @@ const schema58 = { '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema', 'x-schema-type': 'all', }; -function validate73( +function validate74( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -45093,8 +45275,8 @@ function validate73( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema58.anyOf[0].allOf[0].required, - parentSchema: schema58.anyOf[0].allOf[0], + schema: schema59.anyOf[0].allOf[0].required, + parentSchema: schema59.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -45118,7 +45300,7 @@ function validate73( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema58.anyOf[0].allOf[0].properties.url, + parentSchema: schema59.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -45135,8 +45317,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.url, + schema: schema59.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema59.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -45163,8 +45345,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.name, + schema: schema59.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema59.anyOf[0].allOf[0].properties.name, data: data1, }; if (vErrors === null) { @@ -45189,8 +45371,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.description, + schema: schema59.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema59.anyOf[0].allOf[0].properties.description, data: data2, }; if (vErrors === null) { @@ -45215,8 +45397,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.type, + schema: schema59.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema59.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -45239,11 +45421,11 @@ function validate73( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema58.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema59.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema58.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema58.anyOf[0].allOf[0].properties.type, + schema: schema59.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema59.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -45268,8 +45450,8 @@ function validate73( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema58.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.isPublic, + schema: schema59.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema59.anyOf[0].allOf[0].properties.isPublic, data: data4, }; if (vErrors === null) { @@ -45311,10 +45493,10 @@ function validate73( message: "must have required property '" + missing1 + "'", schema: - schema58.anyOf[0].allOf[0].properties.viewer.items + schema59.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema58.anyOf[0].allOf[0].properties.viewer.items, + schema59.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -45341,7 +45523,7 @@ function validate73( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[0].allOf[0].properties.viewer + schema59.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -45362,10 +45544,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[0].allOf[0].properties.viewer + schema59.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema58.anyOf[0].allOf[0].properties.viewer + schema59.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -45389,9 +45571,9 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[0].allOf[0].properties.viewer.items.type, + schema59.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema58.anyOf[0].allOf[0].properties.viewer.items, + schema59.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -45414,8 +45596,8 @@ function validate73( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema58.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.viewer, + schema: schema59.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema59.anyOf[0].allOf[0].properties.viewer, data: data5, }; if (vErrors === null) { @@ -45458,10 +45640,10 @@ function validate73( message: "must have required property '" + missing2 + "'", schema: - schema58.anyOf[0].allOf[0].properties.owner.items + schema59.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema58.anyOf[0].allOf[0].properties.owner.items, + schema59.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -45489,7 +45671,7 @@ function validate73( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[0].allOf[0].properties + schema59.anyOf[0].allOf[0].properties .owner.items.properties.url, data: data10, }; @@ -45510,10 +45692,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[0].allOf[0].properties.owner + schema59.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema58.anyOf[0].allOf[0].properties.owner + schema59.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data10, }; @@ -45537,10 +45719,10 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[0].allOf[0].properties.owner.items + schema59.anyOf[0].allOf[0].properties.owner.items .type, parentSchema: - schema58.anyOf[0].allOf[0].properties.owner.items, + schema59.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -45563,8 +45745,8 @@ function validate73( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema58.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema58.anyOf[0].allOf[0].properties.owner, + schema: schema59.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema59.anyOf[0].allOf[0].properties.owner, data: data8, }; if (vErrors === null) { @@ -45593,8 +45775,8 @@ function validate73( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema58.anyOf[0].allOf[0].type, - parentSchema: schema58.anyOf[0].allOf[0], + schema: schema59.anyOf[0].allOf[0].type, + parentSchema: schema59.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -45621,7 +45803,7 @@ function validate73( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema58.anyOf[0].allOf[1].properties.type, + parentSchema: schema59.anyOf[0].allOf[1].properties.type, data: data11, }; if (vErrors === null) { @@ -45650,7 +45832,7 @@ function validate73( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema58.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema59.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -45667,8 +45849,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema58.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema59.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema59.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -45714,7 +45896,7 @@ function validate73( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items + schema59.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -45735,10 +45917,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[0].allOf[1].properties.services.items + schema59.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items + schema59.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -45769,10 +45951,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[0].allOf[1].properties.services.items + schema59.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items + schema59.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data16, }; @@ -45804,10 +45986,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[0].allOf[1].properties.services.items + schema59.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items + schema59.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -45836,15 +46018,15 @@ function validate73( keyword: 'enum', params: { allowedValues: - schema58.anyOf[0].allOf[1].properties.services.items + schema59.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema58.anyOf[0].allOf[1].properties.services.items + schema59.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items + schema59.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -45869,9 +46051,9 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[0].allOf[1].properties.services.items.type, + schema59.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema58.anyOf[0].allOf[1].properties.services.items, + schema59.anyOf[0].allOf[1].properties.services.items, data: data14, }; if (vErrors === null) { @@ -45894,8 +46076,8 @@ function validate73( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema58.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema58.anyOf[0].allOf[1].properties.services, + schema: schema59.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema59.anyOf[0].allOf[1].properties.services, data: data13, }; if (vErrors === null) { @@ -45919,8 +46101,8 @@ function validate73( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema58.anyOf[0].allOf[1].type, - parentSchema: schema58.anyOf[0].allOf[1], + schema: schema59.anyOf[0].allOf[1].type, + parentSchema: schema59.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -45953,8 +46135,8 @@ function validate73( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema58.anyOf[1].allOf[0].required, - parentSchema: schema58.anyOf[1].allOf[0], + schema: schema59.anyOf[1].allOf[0].required, + parentSchema: schema59.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -45978,7 +46160,7 @@ function validate73( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema58.anyOf[1].allOf[0].properties.url, + parentSchema: schema59.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -45995,8 +46177,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.url, + schema: schema59.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema59.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -46023,8 +46205,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.name, + schema: schema59.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema59.anyOf[1].allOf[0].properties.name, data: data19, }; if (vErrors === null) { @@ -46049,8 +46231,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.description, + schema: schema59.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema59.anyOf[1].allOf[0].properties.description, data: data20, }; if (vErrors === null) { @@ -46075,8 +46257,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.type, + schema: schema59.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema59.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -46099,11 +46281,11 @@ function validate73( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema58.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema59.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema58.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema58.anyOf[1].allOf[0].properties.type, + schema: schema59.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema59.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -46128,8 +46310,8 @@ function validate73( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema58.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.isPublic, + schema: schema59.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema59.anyOf[1].allOf[0].properties.isPublic, data: data22, }; if (vErrors === null) { @@ -46171,10 +46353,10 @@ function validate73( message: "must have required property '" + missing4 + "'", schema: - schema58.anyOf[1].allOf[0].properties.viewer.items + schema59.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema58.anyOf[1].allOf[0].properties.viewer.items, + schema59.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -46202,7 +46384,7 @@ function validate73( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[1].allOf[0].properties + schema59.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -46223,10 +46405,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[1].allOf[0].properties.viewer + schema59.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema58.anyOf[1].allOf[0].properties.viewer + schema59.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data25, }; @@ -46250,10 +46432,10 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[1].allOf[0].properties.viewer.items + schema59.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema58.anyOf[1].allOf[0].properties.viewer.items, + schema59.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -46276,8 +46458,8 @@ function validate73( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema58.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.viewer, + schema: schema59.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema59.anyOf[1].allOf[0].properties.viewer, data: data23, }; if (vErrors === null) { @@ -46320,10 +46502,10 @@ function validate73( message: "must have required property '" + missing5 + "'", schema: - schema58.anyOf[1].allOf[0].properties.owner.items + schema59.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema58.anyOf[1].allOf[0].properties.owner.items, + schema59.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -46351,7 +46533,7 @@ function validate73( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[1].allOf[0].properties + schema59.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -46372,10 +46554,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[1].allOf[0].properties + schema59.anyOf[1].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema58.anyOf[1].allOf[0].properties + schema59.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -46399,10 +46581,10 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[1].allOf[0].properties.owner.items + schema59.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema58.anyOf[1].allOf[0].properties.owner.items, + schema59.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -46425,8 +46607,8 @@ function validate73( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema58.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema58.anyOf[1].allOf[0].properties.owner, + schema: schema59.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema59.anyOf[1].allOf[0].properties.owner, data: data26, }; if (vErrors === null) { @@ -46455,8 +46637,8 @@ function validate73( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema58.anyOf[1].allOf[0].type, - parentSchema: schema58.anyOf[1].allOf[0], + schema: schema59.anyOf[1].allOf[0].type, + parentSchema: schema59.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -46483,7 +46665,7 @@ function validate73( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema58.anyOf[1].allOf[1].properties.type, + parentSchema: schema59.anyOf[1].allOf[1].properties.type, data: data29, }; if (vErrors === null) { @@ -46508,8 +46690,8 @@ function validate73( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema58.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema58.anyOf[1].allOf[1].properties.connected, + schema: schema59.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema59.anyOf[1].allOf[1].properties.connected, data: data30, }; if (vErrors === null) { @@ -46560,7 +46742,7 @@ function validate73( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema58.anyOf[1].allOf[1].properties + schema59.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -46584,11 +46766,11 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[1].allOf[1].properties + schema59.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start .type, parentSchema: - schema58.anyOf[1].allOf[1].properties + schema59.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -46627,7 +46809,7 @@ function validate73( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema58.anyOf[1].allOf[1].properties + schema59.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -46651,11 +46833,11 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[1].allOf[1].properties + schema59.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end .type, parentSchema: - schema58.anyOf[1].allOf[1].properties + schema59.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -46682,10 +46864,10 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[1].allOf[1].properties.announcedAvailability + schema59.anyOf[1].allOf[1].properties.announcedAvailability .items.type, parentSchema: - schema58.anyOf[1].allOf[1].properties.announcedAvailability + schema59.anyOf[1].allOf[1].properties.announcedAvailability .items, data: data32, }; @@ -46711,9 +46893,9 @@ function validate73( params: { type: 'array' }, message: 'must be array', schema: - schema58.anyOf[1].allOf[1].properties.announcedAvailability.type, + schema59.anyOf[1].allOf[1].properties.announcedAvailability.type, parentSchema: - schema58.anyOf[1].allOf[1].properties.announcedAvailability, + schema59.anyOf[1].allOf[1].properties.announcedAvailability, data: data31, }; if (vErrors === null) { @@ -46744,7 +46926,7 @@ function validate73( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[1].allOf[1].properties.experiment, + schema59.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -46761,8 +46943,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema58.anyOf[1].allOf[1].properties.experiment, + schema: schema59.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema59.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -46815,7 +46997,7 @@ function validate73( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[1].allOf[1].properties.services + schema59.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -46839,10 +47021,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[1].allOf[1].properties.services + schema59.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema58.anyOf[1].allOf[1].properties.services + schema59.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -46873,10 +47055,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[1].allOf[1].properties.services + schema59.anyOf[1].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema58.anyOf[1].allOf[1].properties.services + schema59.anyOf[1].allOf[1].properties.services .items.properties.serviceId, data: data39, }; @@ -46908,10 +47090,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[1].allOf[1].properties.services + schema59.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema58.anyOf[1].allOf[1].properties.services + schema59.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -46940,16 +47122,16 @@ function validate73( keyword: 'enum', params: { allowedValues: - schema58.anyOf[1].allOf[1].properties.services + schema59.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema58.anyOf[1].allOf[1].properties.services + schema59.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema58.anyOf[1].allOf[1].properties.services + schema59.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -46975,10 +47157,10 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[1].allOf[1].properties.services.items + schema59.anyOf[1].allOf[1].properties.services.items .type, parentSchema: - schema58.anyOf[1].allOf[1].properties.services.items, + schema59.anyOf[1].allOf[1].properties.services.items, data: data37, }; if (vErrors === null) { @@ -47001,8 +47183,8 @@ function validate73( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema58.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema58.anyOf[1].allOf[1].properties.services, + schema: schema59.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema59.anyOf[1].allOf[1].properties.services, data: data36, }; if (vErrors === null) { @@ -47028,8 +47210,8 @@ function validate73( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema58.anyOf[1].allOf[1].type, - parentSchema: schema58.anyOf[1].allOf[1], + schema: schema59.anyOf[1].allOf[1].type, + parentSchema: schema59.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -47062,8 +47244,8 @@ function validate73( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema58.anyOf[2].allOf[0].required, - parentSchema: schema58.anyOf[2].allOf[0], + schema: schema59.anyOf[2].allOf[0].required, + parentSchema: schema59.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -47087,7 +47269,7 @@ function validate73( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema58.anyOf[2].allOf[0].properties.url, + parentSchema: schema59.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -47104,8 +47286,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.url, + schema: schema59.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema59.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -47132,8 +47314,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.name, + schema: schema59.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema59.anyOf[2].allOf[0].properties.name, data: data42, }; if (vErrors === null) { @@ -47158,8 +47340,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.description, + schema: schema59.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema59.anyOf[2].allOf[0].properties.description, data: data43, }; if (vErrors === null) { @@ -47184,8 +47366,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.type, + schema: schema59.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema59.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -47208,11 +47390,11 @@ function validate73( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema58.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema59.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema58.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema58.anyOf[2].allOf[0].properties.type, + schema: schema59.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema59.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -47237,8 +47419,8 @@ function validate73( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema58.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.isPublic, + schema: schema59.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema59.anyOf[2].allOf[0].properties.isPublic, data: data45, }; if (vErrors === null) { @@ -47280,10 +47462,10 @@ function validate73( message: "must have required property '" + missing7 + "'", schema: - schema58.anyOf[2].allOf[0].properties.viewer.items + schema59.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema58.anyOf[2].allOf[0].properties.viewer + schema59.anyOf[2].allOf[0].properties.viewer .items, data: data47, }; @@ -47312,7 +47494,7 @@ function validate73( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[2].allOf[0].properties + schema59.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -47333,10 +47515,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[2].allOf[0].properties + schema59.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema58.anyOf[2].allOf[0].properties + schema59.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -47360,10 +47542,10 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[2].allOf[0].properties.viewer.items + schema59.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema58.anyOf[2].allOf[0].properties.viewer.items, + schema59.anyOf[2].allOf[0].properties.viewer.items, data: data47, }; if (vErrors === null) { @@ -47386,8 +47568,8 @@ function validate73( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema58.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.viewer, + schema: schema59.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema59.anyOf[2].allOf[0].properties.viewer, data: data46, }; if (vErrors === null) { @@ -47432,10 +47614,10 @@ function validate73( missing8 + "'", schema: - schema58.anyOf[2].allOf[0].properties.owner + schema59.anyOf[2].allOf[0].properties.owner .items.required, parentSchema: - schema58.anyOf[2].allOf[0].properties.owner + schema59.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -47467,7 +47649,7 @@ function validate73( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[2].allOf[0].properties + schema59.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -47488,10 +47670,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[2].allOf[0].properties + schema59.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema58.anyOf[2].allOf[0].properties + schema59.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -47515,10 +47697,10 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[2].allOf[0].properties.owner.items + schema59.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema58.anyOf[2].allOf[0].properties.owner.items, + schema59.anyOf[2].allOf[0].properties.owner.items, data: data50, }; if (vErrors === null) { @@ -47541,8 +47723,8 @@ function validate73( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema58.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema58.anyOf[2].allOf[0].properties.owner, + schema: schema59.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema59.anyOf[2].allOf[0].properties.owner, data: data49, }; if (vErrors === null) { @@ -47571,8 +47753,8 @@ function validate73( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema58.anyOf[2].allOf[0].type, - parentSchema: schema58.anyOf[2].allOf[0], + schema: schema59.anyOf[2].allOf[0].type, + parentSchema: schema59.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -47599,7 +47781,7 @@ function validate73( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema58.anyOf[2].allOf[1].properties.type, + parentSchema: schema59.anyOf[2].allOf[1].properties.type, data: data52, }; if (vErrors === null) { @@ -47628,7 +47810,7 @@ function validate73( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema58.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema59.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -47645,8 +47827,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema58.anyOf[2].allOf[1].properties.codeUrl, + schema: schema59.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema59.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -47699,7 +47881,7 @@ function validate73( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[2].allOf[1].properties.services + schema59.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -47720,10 +47902,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[2].allOf[1].properties.services + schema59.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema58.anyOf[2].allOf[1].properties.services + schema59.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -47754,10 +47936,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[2].allOf[1].properties.services.items + schema59.anyOf[2].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema58.anyOf[2].allOf[1].properties.services.items + schema59.anyOf[2].allOf[1].properties.services.items .properties.serviceId, data: data57, }; @@ -47789,10 +47971,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[2].allOf[1].properties.services + schema59.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema58.anyOf[2].allOf[1].properties.services + schema59.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -47821,16 +48003,16 @@ function validate73( keyword: 'enum', params: { allowedValues: - schema58.anyOf[2].allOf[1].properties.services + schema59.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema58.anyOf[2].allOf[1].properties.services + schema59.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema58.anyOf[2].allOf[1].properties.services + schema59.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -47856,9 +48038,9 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[2].allOf[1].properties.services.items.type, + schema59.anyOf[2].allOf[1].properties.services.items.type, parentSchema: - schema58.anyOf[2].allOf[1].properties.services.items, + schema59.anyOf[2].allOf[1].properties.services.items, data: data55, }; if (vErrors === null) { @@ -47881,8 +48063,8 @@ function validate73( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema58.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema58.anyOf[2].allOf[1].properties.services, + schema: schema59.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema59.anyOf[2].allOf[1].properties.services, data: data54, }; if (vErrors === null) { @@ -47906,8 +48088,8 @@ function validate73( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema58.anyOf[2].allOf[1].type, - parentSchema: schema58.anyOf[2].allOf[1], + schema: schema59.anyOf[2].allOf[1].type, + parentSchema: schema59.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -47940,8 +48122,8 @@ function validate73( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema58.anyOf[3].allOf[0].required, - parentSchema: schema58.anyOf[3].allOf[0], + schema: schema59.anyOf[3].allOf[0].required, + parentSchema: schema59.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -47965,7 +48147,7 @@ function validate73( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema58.anyOf[3].allOf[0].properties.url, + parentSchema: schema59.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -47982,8 +48164,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema58.anyOf[3].allOf[0].properties.url, + schema: schema59.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema59.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -48010,8 +48192,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema58.anyOf[3].allOf[0].properties.name, + schema: schema59.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema59.anyOf[3].allOf[0].properties.name, data: data60, }; if (vErrors === null) { @@ -48036,8 +48218,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema58.anyOf[3].allOf[0].properties.description, + schema: schema59.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema59.anyOf[3].allOf[0].properties.description, data: data61, }; if (vErrors === null) { @@ -48062,8 +48244,8 @@ function validate73( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema58.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema58.anyOf[3].allOf[0].properties.type, + schema: schema59.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema59.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -48087,11 +48269,11 @@ function validate73( keyword: 'enum', params: { allowedValues: - schema58.anyOf[3].allOf[0].properties.type.enum, + schema59.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema58.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema58.anyOf[3].allOf[0].properties.type, + schema: schema59.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema59.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -48116,8 +48298,8 @@ function validate73( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema58.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema58.anyOf[3].allOf[0].properties.isPublic, + schema: schema59.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema59.anyOf[3].allOf[0].properties.isPublic, data: data63, }; if (vErrors === null) { @@ -48161,10 +48343,10 @@ function validate73( missing10 + "'", schema: - schema58.anyOf[3].allOf[0].properties.viewer + schema59.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema58.anyOf[3].allOf[0].properties.viewer + schema59.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -48196,7 +48378,7 @@ function validate73( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[3].allOf[0].properties + schema59.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -48220,10 +48402,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[3].allOf[0].properties + schema59.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema58.anyOf[3].allOf[0].properties + schema59.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -48247,10 +48429,10 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[3].allOf[0].properties.viewer.items + schema59.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema58.anyOf[3].allOf[0].properties.viewer + schema59.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -48274,9 +48456,9 @@ function validate73( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema58.anyOf[3].allOf[0].properties.viewer.type, + schema: schema59.anyOf[3].allOf[0].properties.viewer.type, parentSchema: - schema58.anyOf[3].allOf[0].properties.viewer, + schema59.anyOf[3].allOf[0].properties.viewer, data: data64, }; if (vErrors === null) { @@ -48324,10 +48506,10 @@ function validate73( missing11 + "'", schema: - schema58.anyOf[3].allOf[0].properties.owner + schema59.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema58.anyOf[3].allOf[0].properties.owner + schema59.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -48359,7 +48541,7 @@ function validate73( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[3].allOf[0] + schema59.anyOf[3].allOf[0] .properties.owner.items.properties .url, data: data69, @@ -48384,10 +48566,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[3].allOf[0].properties + schema59.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema58.anyOf[3].allOf[0].properties + schema59.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data69, }; @@ -48411,10 +48593,10 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[3].allOf[0].properties.owner + schema59.anyOf[3].allOf[0].properties.owner .items.type, parentSchema: - schema58.anyOf[3].allOf[0].properties.owner + schema59.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -48439,9 +48621,9 @@ function validate73( params: { type: 'array' }, message: 'must be array', schema: - schema58.anyOf[3].allOf[0].properties.owner.type, + schema59.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema58.anyOf[3].allOf[0].properties.owner, + schema59.anyOf[3].allOf[0].properties.owner, data: data67, }; if (vErrors === null) { @@ -48470,8 +48652,8 @@ function validate73( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema58.anyOf[3].allOf[0].type, - parentSchema: schema58.anyOf[3].allOf[0], + schema: schema59.anyOf[3].allOf[0].type, + parentSchema: schema59.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -48495,8 +48677,8 @@ function validate73( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema58.anyOf[3].allOf[1].required, - parentSchema: schema58.anyOf[3].allOf[1], + schema: schema59.anyOf[3].allOf[1].required, + parentSchema: schema59.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -48517,7 +48699,7 @@ function validate73( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema58.anyOf[3].allOf[1].properties.type, + parentSchema: schema59.anyOf[3].allOf[1].properties.type, data: data70, }; if (vErrors === null) { @@ -48559,10 +48741,10 @@ function validate73( message: "must have required property '" + missing13 + "'", schema: - schema58.anyOf[3].allOf[1].properties.devices.items + schema59.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema58.anyOf[3].allOf[1].properties.devices.items, + schema59.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -48589,7 +48771,7 @@ function validate73( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema58.anyOf[3].allOf[1].properties + schema59.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data73, }; @@ -48610,10 +48792,10 @@ function validate73( params: { type: 'string' }, message: 'must be string', schema: - schema58.anyOf[3].allOf[1].properties.devices + schema59.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema58.anyOf[3].allOf[1].properties.devices + schema59.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data73, }; @@ -48637,10 +48819,10 @@ function validate73( params: { type: 'object' }, message: 'must be object', schema: - schema58.anyOf[3].allOf[1].properties.devices.items + schema59.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema58.anyOf[3].allOf[1].properties.devices.items, + schema59.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -48663,8 +48845,8 @@ function validate73( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema58.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema58.anyOf[3].allOf[1].properties.devices, + schema: schema59.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema59.anyOf[3].allOf[1].properties.devices, data: data71, }; if (vErrors === null) { @@ -48688,8 +48870,8 @@ function validate73( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema58.anyOf[3].allOf[1].type, - parentSchema: schema58.anyOf[3].allOf[1], + schema: schema59.anyOf[3].allOf[1].type, + parentSchema: schema59.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -48714,8 +48896,8 @@ function validate73( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema58.anyOf, - parentSchema: schema58, + schema: schema59.anyOf, + parentSchema: schema59, data, }; if (vErrors === null) { @@ -48724,7 +48906,7 @@ function validate73( vErrors.push(err124); } errors++; - validate73.errors = vErrors; + validate74.errors = vErrors; return false; } else { errors = _errs0; @@ -48736,11 +48918,11 @@ function validate73( } } } - validate73.errors = vErrors; + validate74.errors = vErrors; return errors === 0; } -exports.validateInstantiateDeviceResponse201 = validate74; -const schema59 = { +exports.validateInstantiateDeviceResponse201 = validate75; +const schema60 = { type: 'object', properties: { instance: { @@ -48854,7 +49036,7 @@ const schema59 = { '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema', 'x-schema-type': 'all', }; -function validate74( +function validate75( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -48867,15 +49049,15 @@ function validate74( (data.instance === undefined && (missing0 = 'instance')) || (data.deviceToken === undefined && (missing0 = 'deviceToken')) ) { - validate74.errors = [ + validate75.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema59.required, - parentSchema: schema59, + schema: schema60.required, + parentSchema: schema60, data, }, ]; @@ -48894,15 +49076,15 @@ function validate74( (data0.name === undefined && (missing1 = 'name')) || (data0.isPublic === undefined && (missing1 = 'isPublic')) ) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance', schemaPath: '#/properties/instance/allOf/0/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema59.properties.instance.allOf[0].required, - parentSchema: schema59.properties.instance.allOf[0], + schema: schema60.properties.instance.allOf[0].required, + parentSchema: schema60.properties.instance.allOf[0], data: data0, }, ]; @@ -48915,7 +49097,7 @@ function validate74( if (errors === _errs4) { if (typeof data1 === 'string') { if (!formats0(data1)) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/url', schemaPath: @@ -48925,14 +49107,14 @@ function validate74( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema59.properties.instance.allOf[0].properties.url, + schema60.properties.instance.allOf[0].properties.url, data: data1, }, ]; return false; } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/url', schemaPath: @@ -48941,9 +49123,9 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance.allOf[0].properties.url.type, + schema60.properties.instance.allOf[0].properties.url.type, parentSchema: - schema59.properties.instance.allOf[0].properties.url, + schema60.properties.instance.allOf[0].properties.url, data: data1, }, ]; @@ -48960,7 +49142,7 @@ function validate74( let data2 = data0.name; const _errs6 = errors; if (typeof data2 !== 'string') { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/name', schemaPath: @@ -48969,9 +49151,9 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance.allOf[0].properties.name.type, + schema60.properties.instance.allOf[0].properties.name.type, parentSchema: - schema59.properties.instance.allOf[0].properties.name, + schema60.properties.instance.allOf[0].properties.name, data: data2, }, ]; @@ -48986,7 +49168,7 @@ function validate74( let data3 = data0.description; const _errs8 = errors; if (typeof data3 !== 'string') { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/description', schemaPath: @@ -48995,10 +49177,10 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance.allOf[0].properties.description + schema60.properties.instance.allOf[0].properties.description .type, parentSchema: - schema59.properties.instance.allOf[0].properties + schema60.properties.instance.allOf[0].properties .description, data: data3, }, @@ -49014,7 +49196,7 @@ function validate74( let data4 = data0.type; const _errs10 = errors; if (typeof data4 !== 'string') { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/type', schemaPath: @@ -49023,10 +49205,10 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance.allOf[0].properties.type + schema60.properties.instance.allOf[0].properties.type .type, parentSchema: - schema59.properties.instance.allOf[0].properties.type, + schema60.properties.instance.allOf[0].properties.type, data: data4, }, ]; @@ -49040,7 +49222,7 @@ function validate74( data4 === 'cloud instantiable' ) ) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/type', schemaPath: @@ -49048,15 +49230,15 @@ function validate74( keyword: 'enum', params: { allowedValues: - schema59.properties.instance.allOf[0].properties.type + schema60.properties.instance.allOf[0].properties.type .enum, }, message: 'must be equal to one of the allowed values', schema: - schema59.properties.instance.allOf[0].properties.type + schema60.properties.instance.allOf[0].properties.type .enum, parentSchema: - schema59.properties.instance.allOf[0].properties.type, + schema60.properties.instance.allOf[0].properties.type, data: data4, }, ]; @@ -49071,7 +49253,7 @@ function validate74( let data5 = data0.isPublic; const _errs12 = errors; if (typeof data5 !== 'boolean') { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/isPublic', schemaPath: @@ -49080,10 +49262,10 @@ function validate74( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema59.properties.instance.allOf[0].properties + schema60.properties.instance.allOf[0].properties .isPublic.type, parentSchema: - schema59.properties.instance.allOf[0].properties + schema60.properties.instance.allOf[0].properties .isPublic, data: data5, }, @@ -49113,7 +49295,7 @@ function validate74( ) { let missing2; if (data7.url === undefined && (missing2 = 'url')) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/viewer/' + i0, @@ -49126,10 +49308,10 @@ function validate74( missing2 + "'", schema: - schema59.properties.instance.allOf[0] + schema60.properties.instance.allOf[0] .properties.viewer.items.required, parentSchema: - schema59.properties.instance.allOf[0] + schema60.properties.instance.allOf[0] .properties.viewer.items, data: data7, }, @@ -49143,7 +49325,7 @@ function validate74( if (errors === _errs18) { if (typeof data8 === 'string') { if (!formats0(data8)) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49160,7 +49342,7 @@ function validate74( '"', schema: 'uri', parentSchema: - schema59.properties.instance + schema60.properties.instance .allOf[0].properties.viewer .items.properties.url, data: data8, @@ -49169,7 +49351,7 @@ function validate74( return false; } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49182,11 +49364,11 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance + schema60.properties.instance .allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema59.properties.instance + schema60.properties.instance .allOf[0].properties.viewer.items .properties.url, data: data8, @@ -49199,7 +49381,7 @@ function validate74( } } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/viewer/' + i0, @@ -49209,10 +49391,10 @@ function validate74( params: { type: 'object' }, message: 'must be object', schema: - schema59.properties.instance.allOf[0] + schema60.properties.instance.allOf[0] .properties.viewer.items.type, parentSchema: - schema59.properties.instance.allOf[0] + schema60.properties.instance.allOf[0] .properties.viewer.items, data: data7, }, @@ -49226,7 +49408,7 @@ function validate74( } } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/viewer', schemaPath: @@ -49235,10 +49417,10 @@ function validate74( params: { type: 'array' }, message: 'must be array', schema: - schema59.properties.instance.allOf[0].properties + schema60.properties.instance.allOf[0].properties .viewer.type, parentSchema: - schema59.properties.instance.allOf[0].properties + schema60.properties.instance.allOf[0].properties .viewer, data: data6, }, @@ -49272,7 +49454,7 @@ function validate74( data10.url === undefined && (missing3 = 'url') ) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/owner/' + i1, @@ -49285,10 +49467,10 @@ function validate74( missing3 + "'", schema: - schema59.properties.instance.allOf[0] + schema60.properties.instance.allOf[0] .properties.owner.items.required, parentSchema: - schema59.properties.instance.allOf[0] + schema60.properties.instance.allOf[0] .properties.owner.items, data: data10, }, @@ -49302,7 +49484,7 @@ function validate74( if (errors === _errs24) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49319,7 +49501,7 @@ function validate74( '"', schema: 'uri', parentSchema: - schema59.properties.instance + schema60.properties.instance .allOf[0].properties.owner .items.properties.url, data: data11, @@ -49328,7 +49510,7 @@ function validate74( return false; } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49341,11 +49523,11 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance + schema60.properties.instance .allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema59.properties.instance + schema60.properties.instance .allOf[0].properties.owner.items .properties.url, data: data11, @@ -49358,7 +49540,7 @@ function validate74( } } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/owner/' + i1, @@ -49368,10 +49550,10 @@ function validate74( params: { type: 'object' }, message: 'must be object', schema: - schema59.properties.instance.allOf[0] + schema60.properties.instance.allOf[0] .properties.owner.items.type, parentSchema: - schema59.properties.instance.allOf[0] + schema60.properties.instance.allOf[0] .properties.owner.items, data: data10, }, @@ -49385,7 +49567,7 @@ function validate74( } } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/owner', schemaPath: @@ -49394,10 +49576,10 @@ function validate74( params: { type: 'array' }, message: 'must be array', schema: - schema59.properties.instance.allOf[0].properties + schema60.properties.instance.allOf[0].properties .owner.type, parentSchema: - schema59.properties.instance.allOf[0].properties + schema60.properties.instance.allOf[0].properties .owner, data: data9, }, @@ -49417,15 +49599,15 @@ function validate74( } } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance', schemaPath: '#/properties/instance/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema59.properties.instance.allOf[0].type, - parentSchema: schema59.properties.instance.allOf[0], + schema: schema60.properties.instance.allOf[0].type, + parentSchema: schema60.properties.instance.allOf[0], data: data0, }, ]; @@ -49441,7 +49623,7 @@ function validate74( let data12 = data0.type; const _errs28 = errors; if ('device' !== data12) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/type', schemaPath: '#/properties/instance/allOf/1/properties/type/const', @@ -49450,7 +49632,7 @@ function validate74( message: 'must be equal to constant', schema: 'device', parentSchema: - schema59.properties.instance.allOf[1].properties.type, + schema60.properties.instance.allOf[1].properties.type, data: data12, }, ]; @@ -49465,7 +49647,7 @@ function validate74( let data13 = data0.connected; const _errs29 = errors; if (typeof data13 !== 'boolean') { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/connected', schemaPath: @@ -49474,10 +49656,10 @@ function validate74( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema59.properties.instance.allOf[1].properties.connected + schema60.properties.instance.allOf[1].properties.connected .type, parentSchema: - schema59.properties.instance.allOf[1].properties.connected, + schema60.properties.instance.allOf[1].properties.connected, data: data13, }, ]; @@ -49511,7 +49693,7 @@ function validate74( if (errors === _errs35) { if (typeof data16 === 'string') { if (!formats22.validate(data16)) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49526,7 +49708,7 @@ function validate74( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.announcedAvailability.items .properties.start, data: data16, @@ -49535,7 +49717,7 @@ function validate74( return false; } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49548,11 +49730,11 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.announcedAvailability.items .properties.start.type, parentSchema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.announcedAvailability.items .properties.start, data: data16, @@ -49574,7 +49756,7 @@ function validate74( if (errors === _errs37) { if (typeof data17 === 'string') { if (!formats22.validate(data17)) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49591,7 +49773,7 @@ function validate74( '"', schema: 'date-time', parentSchema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.announcedAvailability .items.properties.end, data: data17, @@ -49600,7 +49782,7 @@ function validate74( return false; } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49613,11 +49795,11 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.announcedAvailability.items .properties.end.type, parentSchema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.announcedAvailability.items .properties.end, data: data17, @@ -49633,7 +49815,7 @@ function validate74( } } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49645,10 +49827,10 @@ function validate74( params: { type: 'object' }, message: 'must be object', schema: - schema59.properties.instance.allOf[1].properties + schema60.properties.instance.allOf[1].properties .announcedAvailability.items.type, parentSchema: - schema59.properties.instance.allOf[1].properties + schema60.properties.instance.allOf[1].properties .announcedAvailability.items, data: data15, }, @@ -49662,7 +49844,7 @@ function validate74( } } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/announcedAvailability', @@ -49672,10 +49854,10 @@ function validate74( params: { type: 'array' }, message: 'must be array', schema: - schema59.properties.instance.allOf[1].properties + schema60.properties.instance.allOf[1].properties .announcedAvailability.type, parentSchema: - schema59.properties.instance.allOf[1].properties + schema60.properties.instance.allOf[1].properties .announcedAvailability, data: data14, }, @@ -49695,7 +49877,7 @@ function validate74( if (errors === _errs39) { if (typeof data18 === 'string') { if (!formats0(data18)) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/experiment', schemaPath: @@ -49705,7 +49887,7 @@ function validate74( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema59.properties.instance.allOf[1].properties + schema60.properties.instance.allOf[1].properties .experiment, data: data18, }, @@ -49713,7 +49895,7 @@ function validate74( return false; } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/experiment', schemaPath: @@ -49722,10 +49904,10 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance.allOf[1].properties + schema60.properties.instance.allOf[1].properties .experiment.type, parentSchema: - schema59.properties.instance.allOf[1].properties + schema60.properties.instance.allOf[1].properties .experiment, data: data18, }, @@ -49762,7 +49944,7 @@ function validate74( if (errors === _errs46) { if (typeof data21 === 'string') { if (!formats0(data21)) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49777,7 +49959,7 @@ function validate74( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.services.items .properties.serviceType, data: data21, @@ -49786,7 +49968,7 @@ function validate74( return false; } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49799,11 +49981,11 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.services.items.properties .serviceType.type, parentSchema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.services.items.properties .serviceType, data: data21, @@ -49822,7 +50004,7 @@ function validate74( let data22 = data20.serviceId; const _errs48 = errors; if (typeof data22 !== 'string') { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49835,11 +50017,11 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.services.items.properties .serviceId.type, parentSchema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.services.items.properties .serviceId, data: data22, @@ -49856,7 +50038,7 @@ function validate74( let data23 = data20.serviceDirection; const _errs50 = errors; if (typeof data23 !== 'string') { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49869,11 +50051,11 @@ function validate74( params: { type: 'string' }, message: 'must be string', schema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection.type, parentSchema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection, data: data23, @@ -49888,7 +50070,7 @@ function validate74( data23 === 'prosumer' ) ) { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + @@ -49900,18 +50082,18 @@ function validate74( keyword: 'enum', params: { allowedValues: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection.enum, parentSchema: - schema59.properties.instance.allOf[1] + schema60.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection, data: data23, @@ -49926,7 +50108,7 @@ function validate74( } } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/services/' + i3, @@ -49936,10 +50118,10 @@ function validate74( params: { type: 'object' }, message: 'must be object', schema: - schema59.properties.instance.allOf[1].properties + schema60.properties.instance.allOf[1].properties .services.items.type, parentSchema: - schema59.properties.instance.allOf[1].properties + schema60.properties.instance.allOf[1].properties .services.items, data: data20, }, @@ -49953,7 +50135,7 @@ function validate74( } } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance/services', schemaPath: @@ -49962,10 +50144,10 @@ function validate74( params: { type: 'array' }, message: 'must be array', schema: - schema59.properties.instance.allOf[1].properties + schema60.properties.instance.allOf[1].properties .services.type, parentSchema: - schema59.properties.instance.allOf[1].properties + schema60.properties.instance.allOf[1].properties .services, data: data19, }, @@ -49982,15 +50164,15 @@ function validate74( } } } else { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/instance', schemaPath: '#/properties/instance/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema59.properties.instance.allOf[1].type, - parentSchema: schema59.properties.instance.allOf[1], + schema: schema60.properties.instance.allOf[1].type, + parentSchema: schema60.properties.instance.allOf[1], data: data0, }, ]; @@ -50008,15 +50190,15 @@ function validate74( let data24 = data.deviceToken; const _errs52 = errors; if (typeof data24 !== 'string') { - validate74.errors = [ + validate75.errors = [ { instancePath: instancePath + '/deviceToken', schemaPath: '#/properties/deviceToken/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema59.properties.deviceToken.type, - parentSchema: schema59.properties.deviceToken, + schema: schema60.properties.deviceToken.type, + parentSchema: schema60.properties.deviceToken, data: data24, }, ]; @@ -50029,26 +50211,26 @@ function validate74( } } } else { - validate74.errors = [ + validate75.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema59.type, - parentSchema: schema59, + schema: schema60.type, + parentSchema: schema60, data, }, ]; return false; } } - validate74.errors = vErrors; + validate75.errors = vErrors; return errors === 0; } -exports.validateGetDeviceAvailabilityResponse200 = validate75; -const schema60 = { +exports.validateGetDeviceAvailabilityResponse200 = validate76; +const schema61 = { title: 'Availability', description: 'A list of time slots that the maintainer of the device announced it is available\n', @@ -50067,7 +50249,7 @@ const schema60 = { '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema', 'x-schema-type': 'all', }; -function validate75( +function validate76( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -50089,7 +50271,7 @@ function validate75( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate75.errors = [ + validate76.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/format', @@ -50097,22 +50279,22 @@ function validate75( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema60.items.properties.start, + parentSchema: schema61.items.properties.start, data: data1, }, ]; return false; } } else { - validate75.errors = [ + validate76.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema60.items.properties.start.type, - parentSchema: schema60.items.properties.start, + schema: schema61.items.properties.start.type, + parentSchema: schema61.items.properties.start, data: data1, }, ]; @@ -50132,7 +50314,7 @@ function validate75( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats22.validate(data2)) { - validate75.errors = [ + validate76.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/format', @@ -50140,22 +50322,22 @@ function validate75( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema60.items.properties.end, + parentSchema: schema61.items.properties.end, data: data2, }, ]; return false; } } else { - validate75.errors = [ + validate76.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema60.items.properties.end.type, - parentSchema: schema60.items.properties.end, + schema: schema61.items.properties.end.type, + parentSchema: schema61.items.properties.end, data: data2, }, ]; @@ -50169,15 +50351,15 @@ function validate75( } } } else { - validate75.errors = [ + validate76.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema60.items.type, - parentSchema: schema60.items, + schema: schema61.items.type, + parentSchema: schema61.items, data: data0, }, ]; @@ -50190,26 +50372,26 @@ function validate75( } } } else { - validate75.errors = [ + validate76.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema60.type, - parentSchema: schema60, + schema: schema61.type, + parentSchema: schema61, data, }, ]; return false; } } - validate75.errors = vErrors; + validate76.errors = vErrors; return errors === 0; } -exports.validateAddDeviceAvailabilityRulesBody = validate76; -const schema61 = { +exports.validateAddDeviceAvailabilityRulesBody = validate77; +const schema62 = { title: 'Availability Rules', description: 'The availability rule to be applied.', type: 'array', @@ -50257,7 +50439,7 @@ const schema61 = { '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema', 'x-schema-type': 'all', }; -function validate76( +function validate77( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -50271,15 +50453,15 @@ function validate76( let data0 = data[i0]; const _errs1 = errors; if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema61.items.type, - parentSchema: schema61.items, + schema: schema62.items.type, + parentSchema: schema62.items, data: data0, }, ]; @@ -50295,7 +50477,7 @@ function validate76( if (errors === _errs5) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/allOf/0/properties/start/format', @@ -50303,22 +50485,22 @@ function validate76( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema61.items.allOf[0].properties.start, + parentSchema: schema62.items.allOf[0].properties.start, data: data1, }, ]; return false; } } else { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/allOf/0/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema61.items.allOf[0].properties.start.type, - parentSchema: schema61.items.allOf[0].properties.start, + schema: schema62.items.allOf[0].properties.start.type, + parentSchema: schema62.items.allOf[0].properties.start, data: data1, }, ]; @@ -50338,7 +50520,7 @@ function validate76( if (errors === _errs7) { if (typeof data2 === 'string') { if (!formats22.validate(data2)) { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/allOf/0/properties/end/format', @@ -50346,22 +50528,22 @@ function validate76( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema61.items.allOf[0].properties.end, + parentSchema: schema62.items.allOf[0].properties.end, data: data2, }, ]; return false; } } else { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/allOf/0/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema61.items.allOf[0].properties.end.type, - parentSchema: schema61.items.allOf[0].properties.end, + schema: schema62.items.allOf[0].properties.end.type, + parentSchema: schema62.items.allOf[0].properties.end, data: data2, }, ]; @@ -50375,15 +50557,15 @@ function validate76( } } } else { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema61.items.allOf[0].type, - parentSchema: schema61.items.allOf[0], + schema: schema62.items.allOf[0].type, + parentSchema: schema62.items.allOf[0], data: data0, }, ]; @@ -50399,15 +50581,15 @@ function validate76( let data3 = data0.available; const _errs11 = errors; if (typeof data3 !== 'boolean') { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/available', schemaPath: '#/items/allOf/1/properties/available/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema61.items.allOf[1].properties.available.type, - parentSchema: schema61.items.allOf[1].properties.available, + schema: schema62.items.allOf[1].properties.available.type, + parentSchema: schema62.items.allOf[1].properties.available, data: data3, }, ]; @@ -50425,15 +50607,15 @@ function validate76( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing0; if (data4.frequency === undefined && (missing0 = 'frequency')) { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat', schemaPath: '#/items/allOf/1/properties/repeat/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema61.items.allOf[1].properties.repeat.required, - parentSchema: schema61.items.allOf[1].properties.repeat, + schema: schema62.items.allOf[1].properties.repeat.required, + parentSchema: schema62.items.allOf[1].properties.repeat, data: data4, }, ]; @@ -50443,7 +50625,7 @@ function validate76( let data5 = data4.frequency; const _errs15 = errors; if (typeof data5 !== 'string') { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/frequency', @@ -50453,10 +50635,10 @@ function validate76( params: { type: 'string' }, message: 'must be string', schema: - schema61.items.allOf[1].properties.repeat.properties + schema62.items.allOf[1].properties.repeat.properties .frequency.type, parentSchema: - schema61.items.allOf[1].properties.repeat.properties + schema62.items.allOf[1].properties.repeat.properties .frequency, data: data5, }, @@ -50470,7 +50652,7 @@ function validate76( data5 === 'WEEKLY' ) ) { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/frequency', @@ -50479,15 +50661,15 @@ function validate76( keyword: 'enum', params: { allowedValues: - schema61.items.allOf[1].properties.repeat.properties + schema62.items.allOf[1].properties.repeat.properties .frequency.enum, }, message: 'must be equal to one of the allowed values', schema: - schema61.items.allOf[1].properties.repeat.properties + schema62.items.allOf[1].properties.repeat.properties .frequency.enum, parentSchema: - schema61.items.allOf[1].properties.repeat.properties + schema62.items.allOf[1].properties.repeat.properties .frequency, data: data5, }, @@ -50506,7 +50688,7 @@ function validate76( if (errors === _errs17) { if (typeof data6 === 'string') { if (!formats22.validate(data6)) { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/until', @@ -50518,7 +50700,7 @@ function validate76( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema61.items.allOf[1].properties.repeat + schema62.items.allOf[1].properties.repeat .properties.until, data: data6, }, @@ -50526,7 +50708,7 @@ function validate76( return false; } } else { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/until', @@ -50536,10 +50718,10 @@ function validate76( params: { type: 'string' }, message: 'must be string', schema: - schema61.items.allOf[1].properties.repeat + schema62.items.allOf[1].properties.repeat .properties.until.type, parentSchema: - schema61.items.allOf[1].properties.repeat + schema62.items.allOf[1].properties.repeat .properties.until, data: data6, }, @@ -50564,7 +50746,7 @@ function validate76( isFinite(data7) ) ) { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/count', @@ -50574,10 +50756,10 @@ function validate76( params: { type: 'integer' }, message: 'must be integer', schema: - schema61.items.allOf[1].properties.repeat.properties + schema62.items.allOf[1].properties.repeat.properties .count.type, parentSchema: - schema61.items.allOf[1].properties.repeat.properties + schema62.items.allOf[1].properties.repeat.properties .count, data: data7, }, @@ -50592,15 +50774,15 @@ function validate76( } } } else { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat', schemaPath: '#/items/allOf/1/properties/repeat/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema61.items.allOf[1].properties.repeat.type, - parentSchema: schema61.items.allOf[1].properties.repeat, + schema: schema62.items.allOf[1].properties.repeat.type, + parentSchema: schema62.items.allOf[1].properties.repeat, data: data4, }, ]; @@ -50613,15 +50795,15 @@ function validate76( } } } else { - validate76.errors = [ + validate77.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema61.items.allOf[1].type, - parentSchema: schema61.items.allOf[1], + schema: schema62.items.allOf[1].type, + parentSchema: schema62.items.allOf[1], data: data0, }, ]; @@ -50636,26 +50818,26 @@ function validate76( } } } else { - validate76.errors = [ + validate77.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema61.type, - parentSchema: schema61, + schema: schema62.type, + parentSchema: schema62, data, }, ]; return false; } } - validate76.errors = vErrors; + validate77.errors = vErrors; return errors === 0; } -exports.validateAddDeviceAvailabilityRulesResponse200 = validate77; -const schema62 = { +exports.validateAddDeviceAvailabilityRulesResponse200 = validate78; +const schema63 = { title: 'Availability', description: 'A list of time slots that the maintainer of the device announced it is available\n', @@ -50674,7 +50856,7 @@ const schema62 = { '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema', 'x-schema-type': 'all', }; -function validate77( +function validate78( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -50696,7 +50878,7 @@ function validate77( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate77.errors = [ + validate78.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/format', @@ -50704,22 +50886,22 @@ function validate77( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema62.items.properties.start, + parentSchema: schema63.items.properties.start, data: data1, }, ]; return false; } } else { - validate77.errors = [ + validate78.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema62.items.properties.start.type, - parentSchema: schema62.items.properties.start, + schema: schema63.items.properties.start.type, + parentSchema: schema63.items.properties.start, data: data1, }, ]; @@ -50739,7 +50921,7 @@ function validate77( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats22.validate(data2)) { - validate77.errors = [ + validate78.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/format', @@ -50747,22 +50929,22 @@ function validate77( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema62.items.properties.end, + parentSchema: schema63.items.properties.end, data: data2, }, ]; return false; } } else { - validate77.errors = [ + validate78.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema62.items.properties.end.type, - parentSchema: schema62.items.properties.end, + schema: schema63.items.properties.end.type, + parentSchema: schema63.items.properties.end, data: data2, }, ]; @@ -50776,15 +50958,15 @@ function validate77( } } } else { - validate77.errors = [ + validate78.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema62.items.type, - parentSchema: schema62.items, + schema: schema63.items.type, + parentSchema: schema63.items, data: data0, }, ]; @@ -50797,26 +50979,26 @@ function validate77( } } } else { - validate77.errors = [ + validate78.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema62.type, - parentSchema: schema62, + schema: schema63.type, + parentSchema: schema63, data, }, ]; return false; } } - validate77.errors = vErrors; + validate78.errors = vErrors; return errors === 0; } -exports.validateCreateWebsocketTokenResponse200 = validate78; -const schema63 = { +exports.validateCreateWebsocketTokenResponse200 = validate79; +const schema64 = { type: 'string', 'x-standalone': false, 'x-name': 'createWebsocketTokenResponse200', @@ -50824,32 +51006,32 @@ const schema63 = { '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema', 'x-schema-type': 'all', }; -function validate78( +function validate79( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate78.errors = [ + validate79.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema63.type, - parentSchema: schema63, + schema: schema64.type, + parentSchema: schema64, data, }, ]; return false; } - validate78.errors = vErrors; + validate79.errors = vErrors; return errors === 0; } -exports.validateSendSignalingMessageBody = validate79; -const schema64 = { +exports.validateSendSignalingMessageBody = validate80; +const schema65 = { title: 'Sig Message', anyOf: [ { @@ -51016,6 +51198,28 @@ const schema64 = { ], 'x-typeguard': true, }, + { + title: 'Logging Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'logging' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'content'], + }, + ], + 'x-typeguard': true, + }, ], 'x-standalone': false, 'x-name': 'sendSignalingMessageBody', @@ -51023,7 +51227,7 @@ const schema64 = { '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema', 'x-schema-type': 'all', }; -function validate79( +function validate80( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -51044,8 +51248,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema64.anyOf[0].allOf[0].allOf[0].required, - parentSchema: schema64.anyOf[0].allOf[0].allOf[0], + schema: schema65.anyOf[0].allOf[0].allOf[0].required, + parentSchema: schema65.anyOf[0].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -51064,8 +51268,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[0].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema64.anyOf[0].allOf[0].allOf[0].properties.messageType, + schema: schema65.anyOf[0].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema65.anyOf[0].allOf[0].allOf[0].properties.messageType, data: data0, }; if (vErrors === null) { @@ -51084,8 +51288,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[0].allOf[0].allOf[0].type, - parentSchema: schema64.anyOf[0].allOf[0].allOf[0], + schema: schema65.anyOf[0].allOf[0].allOf[0].type, + parentSchema: schema65.anyOf[0].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -51112,8 +51316,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema64.anyOf[0].allOf[0].allOf[1].required, - parentSchema: schema64.anyOf[0].allOf[0].allOf[1], + schema: schema65.anyOf[0].allOf[0].allOf[1].required, + parentSchema: schema65.anyOf[0].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -51134,7 +51338,7 @@ function validate79( params: { allowedValue: 'command' }, message: 'must be equal to constant', schema: 'command', - parentSchema: schema64.anyOf[0].allOf[0].allOf[1].properties.messageType, + parentSchema: schema65.anyOf[0].allOf[0].allOf[1].properties.messageType, data: data1, }; if (vErrors === null) { @@ -51159,8 +51363,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[0].allOf[0].allOf[1].properties.command.type, - parentSchema: schema64.anyOf[0].allOf[0].allOf[1].properties.command, + schema: schema65.anyOf[0].allOf[0].allOf[1].properties.command.type, + parentSchema: schema65.anyOf[0].allOf[0].allOf[1].properties.command, data: data2, }; if (vErrors === null) { @@ -51183,8 +51387,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[0].allOf[0].allOf[1].type, - parentSchema: schema64.anyOf[0].allOf[0].allOf[1], + schema: schema65.anyOf[0].allOf[0].allOf[1].type, + parentSchema: schema65.anyOf[0].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -51216,8 +51420,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema64.anyOf[0].allOf[1].required, - parentSchema: schema64.anyOf[0].allOf[1], + schema: schema65.anyOf[0].allOf[1].required, + parentSchema: schema65.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -51238,7 +51442,7 @@ function validate79( params: { allowedValue: 'createPeerconnection' }, message: 'must be equal to constant', schema: 'createPeerconnection', - parentSchema: schema64.anyOf[0].allOf[1].properties.command, + parentSchema: schema65.anyOf[0].allOf[1].properties.command, data: data3, }; if (vErrors === null) { @@ -51263,8 +51467,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[0].allOf[1].properties.connectionType.type, - parentSchema: schema64.anyOf[0].allOf[1].properties.connectionType, + schema: schema65.anyOf[0].allOf[1].properties.connectionType.type, + parentSchema: schema65.anyOf[0].allOf[1].properties.connectionType, data: data4, }; if (vErrors === null) { @@ -51281,11 +51485,11 @@ function validate79( keyword: 'enum', params: { allowedValues: - schema64.anyOf[0].allOf[1].properties.connectionType.enum, + schema65.anyOf[0].allOf[1].properties.connectionType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema64.anyOf[0].allOf[1].properties.connectionType.enum, - parentSchema: schema64.anyOf[0].allOf[1].properties.connectionType, + schema: schema65.anyOf[0].allOf[1].properties.connectionType.enum, + parentSchema: schema65.anyOf[0].allOf[1].properties.connectionType, data: data4, }; if (vErrors === null) { @@ -51315,7 +51519,7 @@ function validate79( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema64.anyOf[0].allOf[1].properties.connectionUrl, + schema65.anyOf[0].allOf[1].properties.connectionUrl, data: data5, }; if (vErrors === null) { @@ -51332,8 +51536,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[0].allOf[1].properties.connectionUrl.type, - parentSchema: schema64.anyOf[0].allOf[1].properties.connectionUrl, + schema: schema65.anyOf[0].allOf[1].properties.connectionUrl.type, + parentSchema: schema65.anyOf[0].allOf[1].properties.connectionUrl, data: data5, }; if (vErrors === null) { @@ -51383,10 +51587,10 @@ function validate79( params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", schema: - schema64.anyOf[0].allOf[1].properties.services.items + schema65.anyOf[0].allOf[1].properties.services.items .required, parentSchema: - schema64.anyOf[0].allOf[1].properties.services.items, + schema65.anyOf[0].allOf[1].properties.services.items, data: data7, }; if (vErrors === null) { @@ -51416,7 +51620,7 @@ function validate79( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema64.anyOf[0].allOf[1].properties.services + schema65.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data8, }; @@ -51440,10 +51644,10 @@ function validate79( params: { type: 'string' }, message: 'must be string', schema: - schema64.anyOf[0].allOf[1].properties.services + schema65.anyOf[0].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema64.anyOf[0].allOf[1].properties.services + schema65.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data8, }; @@ -51474,10 +51678,10 @@ function validate79( params: { type: 'string' }, message: 'must be string', schema: - schema64.anyOf[0].allOf[1].properties.services + schema65.anyOf[0].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema64.anyOf[0].allOf[1].properties.services + schema65.anyOf[0].allOf[1].properties.services .items.properties.serviceId, data: data9, }; @@ -51509,10 +51713,10 @@ function validate79( params: { type: 'string' }, message: 'must be string', schema: - schema64.anyOf[0].allOf[1].properties.services + schema65.anyOf[0].allOf[1].properties.services .items.properties.remoteServiceId.type, parentSchema: - schema64.anyOf[0].allOf[1].properties.services + schema65.anyOf[0].allOf[1].properties.services .items.properties.remoteServiceId, data: data10, }; @@ -51539,9 +51743,9 @@ function validate79( params: { type: 'object' }, message: 'must be object', schema: - schema64.anyOf[0].allOf[1].properties.services.items.type, + schema65.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema64.anyOf[0].allOf[1].properties.services.items, + schema65.anyOf[0].allOf[1].properties.services.items, data: data7, }; if (vErrors === null) { @@ -51564,8 +51768,8 @@ function validate79( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema64.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema64.anyOf[0].allOf[1].properties.services, + schema: schema65.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema65.anyOf[0].allOf[1].properties.services, data: data6, }; if (vErrors === null) { @@ -51591,8 +51795,8 @@ function validate79( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema64.anyOf[0].allOf[1].properties.tiebreaker.type, - parentSchema: schema64.anyOf[0].allOf[1].properties.tiebreaker, + schema: schema65.anyOf[0].allOf[1].properties.tiebreaker.type, + parentSchema: schema65.anyOf[0].allOf[1].properties.tiebreaker, data: data11, }; if (vErrors === null) { @@ -51623,8 +51827,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[0].allOf[1].properties.config.type, - parentSchema: schema64.anyOf[0].allOf[1].properties.config, + schema: schema65.anyOf[0].allOf[1].properties.config.type, + parentSchema: schema65.anyOf[0].allOf[1].properties.config, data: data12, }; if (vErrors === null) { @@ -51652,8 +51856,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[0].allOf[1].type, - parentSchema: schema64.anyOf[0].allOf[1], + schema: schema65.anyOf[0].allOf[1].type, + parentSchema: schema65.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -51682,8 +51886,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'", - schema: schema64.anyOf[1].allOf[0].allOf[0].required, - parentSchema: schema64.anyOf[1].allOf[0].allOf[0], + schema: schema65.anyOf[1].allOf[0].allOf[0].required, + parentSchema: schema65.anyOf[1].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -51702,8 +51906,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[1].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema64.anyOf[1].allOf[0].allOf[0].properties.messageType, + schema: schema65.anyOf[1].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema65.anyOf[1].allOf[0].allOf[0].properties.messageType, data: data13, }; if (vErrors === null) { @@ -51722,8 +51926,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[1].allOf[0].allOf[0].type, - parentSchema: schema64.anyOf[1].allOf[0].allOf[0], + schema: schema65.anyOf[1].allOf[0].allOf[0].type, + parentSchema: schema65.anyOf[1].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -51750,8 +51954,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'", - schema: schema64.anyOf[1].allOf[0].allOf[1].required, - parentSchema: schema64.anyOf[1].allOf[0].allOf[1], + schema: schema65.anyOf[1].allOf[0].allOf[1].required, + parentSchema: schema65.anyOf[1].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -51773,7 +51977,7 @@ function validate79( message: 'must be equal to constant', schema: 'command', parentSchema: - schema64.anyOf[1].allOf[0].allOf[1].properties.messageType, + schema65.anyOf[1].allOf[0].allOf[1].properties.messageType, data: data14, }; if (vErrors === null) { @@ -51798,8 +52002,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[1].allOf[0].allOf[1].properties.command.type, - parentSchema: schema64.anyOf[1].allOf[0].allOf[1].properties.command, + schema: schema65.anyOf[1].allOf[0].allOf[1].properties.command.type, + parentSchema: schema65.anyOf[1].allOf[0].allOf[1].properties.command, data: data15, }; if (vErrors === null) { @@ -51822,8 +52026,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[1].allOf[0].allOf[1].type, - parentSchema: schema64.anyOf[1].allOf[0].allOf[1], + schema: schema65.anyOf[1].allOf[0].allOf[1].type, + parentSchema: schema65.anyOf[1].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -51852,8 +52056,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema64.anyOf[1].allOf[1].required, - parentSchema: schema64.anyOf[1].allOf[1], + schema: schema65.anyOf[1].allOf[1].required, + parentSchema: schema65.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -51874,7 +52078,7 @@ function validate79( params: { allowedValue: 'closePeerconnection' }, message: 'must be equal to constant', schema: 'closePeerconnection', - parentSchema: schema64.anyOf[1].allOf[1].properties.command, + parentSchema: schema65.anyOf[1].allOf[1].properties.command, data: data16, }; if (vErrors === null) { @@ -51904,7 +52108,7 @@ function validate79( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema64.anyOf[1].allOf[1].properties.connectionUrl, + schema65.anyOf[1].allOf[1].properties.connectionUrl, data: data17, }; if (vErrors === null) { @@ -51921,8 +52125,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[1].allOf[1].properties.connectionUrl.type, - parentSchema: schema64.anyOf[1].allOf[1].properties.connectionUrl, + schema: schema65.anyOf[1].allOf[1].properties.connectionUrl.type, + parentSchema: schema65.anyOf[1].allOf[1].properties.connectionUrl, data: data17, }; if (vErrors === null) { @@ -51947,8 +52151,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[1].allOf[1].type, - parentSchema: schema64.anyOf[1].allOf[1], + schema: schema65.anyOf[1].allOf[1].type, + parentSchema: schema65.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -51976,8 +52180,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'", - schema: schema64.anyOf[2].allOf[0].required, - parentSchema: schema64.anyOf[2].allOf[0], + schema: schema65.anyOf[2].allOf[0].required, + parentSchema: schema65.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -51996,8 +52200,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[2].allOf[0].properties.messageType.type, - parentSchema: schema64.anyOf[2].allOf[0].properties.messageType, + schema: schema65.anyOf[2].allOf[0].properties.messageType.type, + parentSchema: schema65.anyOf[2].allOf[0].properties.messageType, data: data18, }; if (vErrors === null) { @@ -52016,8 +52220,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[2].allOf[0].type, - parentSchema: schema64.anyOf[2].allOf[0], + schema: schema65.anyOf[2].allOf[0].type, + parentSchema: schema65.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -52046,8 +52250,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'", - schema: schema64.anyOf[2].allOf[1].required, - parentSchema: schema64.anyOf[2].allOf[1], + schema: schema65.anyOf[2].allOf[1].required, + parentSchema: schema65.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -52068,7 +52272,7 @@ function validate79( params: { allowedValue: 'signaling' }, message: 'must be equal to constant', schema: 'signaling', - parentSchema: schema64.anyOf[2].allOf[1].properties.messageType, + parentSchema: schema65.anyOf[2].allOf[1].properties.messageType, data: data19, }; if (vErrors === null) { @@ -52093,8 +52297,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[2].allOf[1].properties.signalingType.type, - parentSchema: schema64.anyOf[2].allOf[1].properties.signalingType, + schema: schema65.anyOf[2].allOf[1].properties.signalingType.type, + parentSchema: schema65.anyOf[2].allOf[1].properties.signalingType, data: data20, }; if (vErrors === null) { @@ -52125,7 +52329,7 @@ function validate79( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema64.anyOf[2].allOf[1].properties.connectionUrl, + schema65.anyOf[2].allOf[1].properties.connectionUrl, data: data21, }; if (vErrors === null) { @@ -52143,9 +52347,9 @@ function validate79( params: { type: 'string' }, message: 'must be string', schema: - schema64.anyOf[2].allOf[1].properties.connectionUrl.type, + schema65.anyOf[2].allOf[1].properties.connectionUrl.type, parentSchema: - schema64.anyOf[2].allOf[1].properties.connectionUrl, + schema65.anyOf[2].allOf[1].properties.connectionUrl, data: data21, }; if (vErrors === null) { @@ -52178,8 +52382,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[2].allOf[1].properties.content.type, - parentSchema: schema64.anyOf[2].allOf[1].properties.content, + schema: schema65.anyOf[2].allOf[1].properties.content.type, + parentSchema: schema65.anyOf[2].allOf[1].properties.content, data: data22, }; if (vErrors === null) { @@ -52205,8 +52409,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[2].allOf[1].type, - parentSchema: schema64.anyOf[2].allOf[1], + schema: schema65.anyOf[2].allOf[1].type, + parentSchema: schema65.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -52234,8 +52438,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema64.anyOf[3].allOf[0].required, - parentSchema: schema64.anyOf[3].allOf[0], + schema: schema65.anyOf[3].allOf[0].required, + parentSchema: schema65.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -52254,8 +52458,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[3].allOf[0].properties.messageType.type, - parentSchema: schema64.anyOf[3].allOf[0].properties.messageType, + schema: schema65.anyOf[3].allOf[0].properties.messageType.type, + parentSchema: schema65.anyOf[3].allOf[0].properties.messageType, data: data23, }; if (vErrors === null) { @@ -52274,8 +52478,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[3].allOf[0].type, - parentSchema: schema64.anyOf[3].allOf[0], + schema: schema65.anyOf[3].allOf[0].type, + parentSchema: schema65.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -52302,8 +52506,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'", - schema: schema64.anyOf[3].allOf[1].required, - parentSchema: schema64.anyOf[3].allOf[1], + schema: schema65.anyOf[3].allOf[1].required, + parentSchema: schema65.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -52324,7 +52528,7 @@ function validate79( params: { allowedValue: 'configuration' }, message: 'must be equal to constant', schema: 'configuration', - parentSchema: schema64.anyOf[3].allOf[1].properties.messageType, + parentSchema: schema65.anyOf[3].allOf[1].properties.messageType, data: data24, }; if (vErrors === null) { @@ -52352,9 +52556,9 @@ function validate79( params: { type: 'object' }, message: 'must be object', schema: - schema64.anyOf[3].allOf[1].properties.configuration.type, + schema65.anyOf[3].allOf[1].properties.configuration.type, parentSchema: - schema64.anyOf[3].allOf[1].properties.configuration, + schema65.anyOf[3].allOf[1].properties.configuration, data: data25, }; if (vErrors === null) { @@ -52378,8 +52582,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[3].allOf[1].type, - parentSchema: schema64.anyOf[3].allOf[1], + schema: schema65.anyOf[3].allOf[1].type, + parentSchema: schema65.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -52407,8 +52611,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing11 }, message: "must have required property '" + missing11 + "'", - schema: schema64.anyOf[4].allOf[0].required, - parentSchema: schema64.anyOf[4].allOf[0], + schema: schema65.anyOf[4].allOf[0].required, + parentSchema: schema65.anyOf[4].allOf[0], data, }; if (vErrors === null) { @@ -52427,8 +52631,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[4].allOf[0].properties.messageType.type, - parentSchema: schema64.anyOf[4].allOf[0].properties.messageType, + schema: schema65.anyOf[4].allOf[0].properties.messageType.type, + parentSchema: schema65.anyOf[4].allOf[0].properties.messageType, data: data26, }; if (vErrors === null) { @@ -52447,8 +52651,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[4].allOf[0].type, - parentSchema: schema64.anyOf[4].allOf[0], + schema: schema65.anyOf[4].allOf[0].type, + parentSchema: schema65.anyOf[4].allOf[0], data, }; if (vErrors === null) { @@ -52475,8 +52679,8 @@ function validate79( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema64.anyOf[4].allOf[1].required, - parentSchema: schema64.anyOf[4].allOf[1], + schema: schema65.anyOf[4].allOf[1].required, + parentSchema: schema65.anyOf[4].allOf[1], data, }; if (vErrors === null) { @@ -52497,7 +52701,7 @@ function validate79( params: { allowedValue: 'experiment-status-changed' }, message: 'must be equal to constant', schema: 'experiment-status-changed', - parentSchema: schema64.anyOf[4].allOf[1].properties.messageType, + parentSchema: schema65.anyOf[4].allOf[1].properties.messageType, data: data27, }; if (vErrors === null) { @@ -52522,8 +52726,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[4].allOf[1].properties.status.type, - parentSchema: schema64.anyOf[4].allOf[1].properties.status, + schema: schema65.anyOf[4].allOf[1].properties.status.type, + parentSchema: schema65.anyOf[4].allOf[1].properties.status, data: data28, }; if (vErrors === null) { @@ -52548,8 +52752,8 @@ function validate79( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema64.anyOf[4].allOf[1].properties.message.type, - parentSchema: schema64.anyOf[4].allOf[1].properties.message, + schema: schema65.anyOf[4].allOf[1].properties.message.type, + parentSchema: schema65.anyOf[4].allOf[1].properties.message, data: data29, }; if (vErrors === null) { @@ -52573,8 +52777,8 @@ function validate79( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema64.anyOf[4].allOf[1].type, - parentSchema: schema64.anyOf[4].allOf[1], + schema: schema65.anyOf[4].allOf[1].type, + parentSchema: schema65.anyOf[4].allOf[1], data, }; if (vErrors === null) { @@ -52589,28 +52793,204 @@ function validate79( } var _valid0 = _errs81 === errors; valid0 = valid0 || _valid0; + if (!valid0) { + const _errs94 = errors; + const _errs95 = errors; + if (errors === _errs95) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing13; + if (data.messageType === undefined && (missing13 = 'messageType')) { + const err60 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: "must have required property '" + missing13 + "'", + schema: schema65.anyOf[5].allOf[0].required, + parentSchema: schema65.anyOf[5].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data30 = data.messageType; + if (typeof data30 !== 'string') { + const err61 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/5/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema65.anyOf[5].allOf[0].properties.messageType.type, + parentSchema: schema65.anyOf[5].allOf[0].properties.messageType, + data: data30, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + } + } + } else { + const err62 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema65.anyOf[5].allOf[0].type, + parentSchema: schema65.anyOf[5].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + } + var valid22 = _errs95 === errors; + if (valid22) { + const _errs100 = errors; + if (errors === _errs100) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing14; + if ( + (data.messageType === undefined && (missing14 = 'messageType')) || + (data.content === undefined && (missing14 = 'content')) + ) { + const err63 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing14 }, + message: "must have required property '" + missing14 + "'", + schema: schema65.anyOf[5].allOf[1].required, + parentSchema: schema65.anyOf[5].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data31 = data.messageType; + const _errs102 = errors; + if ('logging' !== data31) { + const err64 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/5/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'logging' }, + message: 'must be equal to constant', + schema: 'logging', + parentSchema: schema65.anyOf[5].allOf[1].properties.messageType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + var valid24 = _errs102 === errors; + } else { + var valid24 = true; + } + if (valid24) { + if (data.content !== undefined) { + let data32 = data.content; + const _errs103 = errors; + if (errors === _errs103) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + } else { + const err65 = { + instancePath: instancePath + '/content', + schemaPath: '#/anyOf/5/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema65.anyOf[5].allOf[1].properties.content.type, + parentSchema: schema65.anyOf[5].allOf[1].properties.content, + data: data32, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid24 = _errs103 === errors; + } else { + var valid24 = true; + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema65.anyOf[5].allOf[1].type, + parentSchema: schema65.anyOf[5].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid22 = _errs100 === errors; + } + var _valid0 = _errs94 === errors; + valid0 = valid0 || _valid0; + } } } } } if (!valid0) { - const err60 = { + const err67 = { instancePath, schemaPath: '#/anyOf', keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema64.anyOf, - parentSchema: schema64, + schema: schema65.anyOf, + parentSchema: schema65, data, }; if (vErrors === null) { - vErrors = [err60]; + vErrors = [err67]; } else { - vErrors.push(err60); + vErrors.push(err67); } errors++; - validate79.errors = vErrors; + validate80.errors = vErrors; return false; } else { errors = _errs0; @@ -52622,11 +53002,11 @@ function validate79( } } } - validate79.errors = vErrors; + validate80.errors = vErrors; return errors === 0; } -exports.validateListPeerconnectionsResponse200 = validate80; -const schema65 = { +exports.validateListPeerconnectionsResponse200 = validate81; +const schema66 = { type: 'array', items: { title: 'Peerconnection Overview', @@ -52683,7 +53063,7 @@ const schema65 = { '#/paths//peerconnections/get/responses/200/content/application/json/schema', 'x-schema-type': 'all', }; -function validate80( +function validate81( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -52705,15 +53085,15 @@ function validate80( (data0.type === undefined && (missing0 = 'type')) || (data0.status === undefined && (missing0 = 'status')) ) { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema65.items.allOf[0].required, - parentSchema: schema65.items.allOf[0], + schema: schema66.items.allOf[0].required, + parentSchema: schema66.items.allOf[0], data: data0, }, ]; @@ -52726,7 +53106,7 @@ function validate80( if (errors === _errs4) { if (typeof data1 === 'string') { if (!formats0(data1)) { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0 + '/url', schemaPath: '#/items/allOf/0/properties/url/format', @@ -52734,22 +53114,22 @@ function validate80( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema65.items.allOf[0].properties.url, + parentSchema: schema66.items.allOf[0].properties.url, data: data1, }, ]; return false; } } else { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0 + '/url', schemaPath: '#/items/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema65.items.allOf[0].properties.url.type, - parentSchema: schema65.items.allOf[0].properties.url, + schema: schema66.items.allOf[0].properties.url.type, + parentSchema: schema66.items.allOf[0].properties.url, data: data1, }, ]; @@ -52766,32 +53146,32 @@ function validate80( let data2 = data0.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema65.items.allOf[0].properties.type.type, - parentSchema: schema65.items.allOf[0].properties.type, + schema: schema66.items.allOf[0].properties.type.type, + parentSchema: schema66.items.allOf[0].properties.type, data: data2, }, ]; return false; } if (!(data2 === 'local' || data2 === 'webrtc')) { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema65.items.allOf[0].properties.type.enum, + allowedValues: schema66.items.allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema65.items.allOf[0].properties.type.enum, - parentSchema: schema65.items.allOf[0].properties.type, + schema: schema66.items.allOf[0].properties.type.enum, + parentSchema: schema66.items.allOf[0].properties.type, data: data2, }, ]; @@ -52806,15 +53186,15 @@ function validate80( let data3 = data0.status; const _errs8 = errors; if (typeof data3 !== 'string') { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0 + '/status', schemaPath: '#/items/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema65.items.allOf[0].properties.status.type, - parentSchema: schema65.items.allOf[0].properties.status, + schema: schema66.items.allOf[0].properties.status.type, + parentSchema: schema66.items.allOf[0].properties.status, data: data3, }, ]; @@ -52830,17 +53210,17 @@ function validate80( data3 === 'closed' ) ) { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0 + '/status', schemaPath: '#/items/allOf/0/properties/status/enum', keyword: 'enum', params: { - allowedValues: schema65.items.allOf[0].properties.status.enum, + allowedValues: schema66.items.allOf[0].properties.status.enum, }, message: 'must be equal to one of the allowed values', - schema: schema65.items.allOf[0].properties.status.enum, - parentSchema: schema65.items.allOf[0].properties.status, + schema: schema66.items.allOf[0].properties.status.enum, + parentSchema: schema66.items.allOf[0].properties.status, data: data3, }, ]; @@ -52854,15 +53234,15 @@ function validate80( } } } else { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema65.items.allOf[0].type, - parentSchema: schema65.items.allOf[0], + schema: schema66.items.allOf[0].type, + parentSchema: schema66.items.allOf[0], data: data0, }, ]; @@ -52876,15 +53256,15 @@ function validate80( if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { let missing1; if (data0.devices === undefined && (missing1 = 'devices')) { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema65.items.allOf[1].required, - parentSchema: schema65.items.allOf[1], + schema: schema66.items.allOf[1].required, + parentSchema: schema66.items.allOf[1], data: data0, }, ]; @@ -52896,7 +53276,7 @@ function validate80( if (errors === _errs12) { if (Array.isArray(data4)) { if (data4.length > 2) { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0 + '/devices', schemaPath: '#/items/allOf/1/properties/devices/maxItems', @@ -52904,14 +53284,14 @@ function validate80( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema65.items.allOf[1].properties.devices, + parentSchema: schema66.items.allOf[1].properties.devices, data: data4, }, ]; return false; } else { if (data4.length < 2) { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0 + '/devices', schemaPath: '#/items/allOf/1/properties/devices/minItems', @@ -52919,7 +53299,7 @@ function validate80( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema65.items.allOf[1].properties.devices, + parentSchema: schema66.items.allOf[1].properties.devices, data: data4, }, ]; @@ -52938,7 +53318,7 @@ function validate80( ) { let missing2; if (data5.url === undefined && (missing2 = 'url')) { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0 + '/devices/' + i1, @@ -52949,10 +53329,10 @@ function validate80( message: "must have required property '" + missing2 + "'", schema: - schema65.items.allOf[1].properties.devices.items + schema66.items.allOf[1].properties.devices.items .required, parentSchema: - schema65.items.allOf[1].properties.devices.items, + schema66.items.allOf[1].properties.devices.items, data: data5, }, ]; @@ -52965,7 +53345,7 @@ function validate80( if (errors === _errs16) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + @@ -52982,7 +53362,7 @@ function validate80( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema65.items.allOf[1].properties + schema66.items.allOf[1].properties .devices.items.properties.url, data: data6, }, @@ -52990,7 +53370,7 @@ function validate80( return false; } } else { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + @@ -53005,10 +53385,10 @@ function validate80( params: { type: 'string' }, message: 'must be string', schema: - schema65.items.allOf[1].properties.devices + schema66.items.allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema65.items.allOf[1].properties.devices + schema66.items.allOf[1].properties.devices .items.properties.url, data: data6, }, @@ -53020,7 +53400,7 @@ function validate80( } } } else { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0 + '/devices/' + i1, @@ -53030,10 +53410,10 @@ function validate80( params: { type: 'object' }, message: 'must be object', schema: - schema65.items.allOf[1].properties.devices.items + schema66.items.allOf[1].properties.devices.items .type, parentSchema: - schema65.items.allOf[1].properties.devices.items, + schema66.items.allOf[1].properties.devices.items, data: data5, }, ]; @@ -53048,15 +53428,15 @@ function validate80( } } } else { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0 + '/devices', schemaPath: '#/items/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema65.items.allOf[1].properties.devices.type, - parentSchema: schema65.items.allOf[1].properties.devices, + schema: schema66.items.allOf[1].properties.devices.type, + parentSchema: schema66.items.allOf[1].properties.devices, data: data4, }, ]; @@ -53066,15 +53446,15 @@ function validate80( } } } else { - validate80.errors = [ + validate81.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema65.items.allOf[1].type, - parentSchema: schema65.items.allOf[1], + schema: schema66.items.allOf[1].type, + parentSchema: schema66.items.allOf[1], data: data0, }, ]; @@ -53089,26 +53469,26 @@ function validate80( } } } else { - validate80.errors = [ + validate81.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema65.type, - parentSchema: schema65, + schema: schema66.type, + parentSchema: schema66, data, }, ]; return false; } } - validate80.errors = vErrors; + validate81.errors = vErrors; return errors === 0; } -exports.validateCreatePeerconnectionBody = validate81; -const schema66 = { +exports.validateCreatePeerconnectionBody = validate82; +const schema67 = { title: 'Peerconnection', allOf: [ { @@ -53182,7 +53562,7 @@ const schema66 = { '#/paths//peerconnections/post/requestBody/content/application/json/schema', 'x-schema-type': 'all', }; -function validate81( +function validate82( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -53197,15 +53577,15 @@ function validate81( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate81.errors = [ + validate82.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema66.allOf[0].required, - parentSchema: schema66.allOf[0], + schema: schema67.allOf[0].required, + parentSchema: schema67.allOf[0], data, }, ]; @@ -53218,7 +53598,7 @@ function validate81( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -53226,22 +53606,22 @@ function validate81( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema66.allOf[0].properties.url, + parentSchema: schema67.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema66.allOf[0].properties.url.type, - parentSchema: schema66.allOf[0].properties.url, + schema: schema67.allOf[0].properties.url.type, + parentSchema: schema67.allOf[0].properties.url, data: data0, }, ]; @@ -53258,30 +53638,30 @@ function validate81( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema66.allOf[0].properties.type.type, - parentSchema: schema66.allOf[0].properties.type, + schema: schema67.allOf[0].properties.type.type, + parentSchema: schema67.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema66.allOf[0].properties.type.enum }, + params: { allowedValues: schema67.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema66.allOf[0].properties.type.enum, - parentSchema: schema66.allOf[0].properties.type, + schema: schema67.allOf[0].properties.type.enum, + parentSchema: schema67.allOf[0].properties.type, data: data1, }, ]; @@ -53296,15 +53676,15 @@ function validate81( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema66.allOf[0].properties.status.type, - parentSchema: schema66.allOf[0].properties.status, + schema: schema67.allOf[0].properties.status.type, + parentSchema: schema67.allOf[0].properties.status, data: data2, }, ]; @@ -53320,15 +53700,15 @@ function validate81( data2 === 'closed' ) ) { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema66.allOf[0].properties.status.enum }, + params: { allowedValues: schema67.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema66.allOf[0].properties.status.enum, - parentSchema: schema66.allOf[0].properties.status, + schema: schema67.allOf[0].properties.status.enum, + parentSchema: schema67.allOf[0].properties.status, data: data2, }, ]; @@ -53342,15 +53722,15 @@ function validate81( } } } else { - validate81.errors = [ + validate82.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema66.allOf[0].type, - parentSchema: schema66.allOf[0], + schema: schema67.allOf[0].type, + parentSchema: schema67.allOf[0], data, }, ]; @@ -53364,15 +53744,15 @@ function validate81( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate81.errors = [ + validate82.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema66.allOf[1].required, - parentSchema: schema66.allOf[1], + schema: schema67.allOf[1].required, + parentSchema: schema67.allOf[1], data, }, ]; @@ -53384,7 +53764,7 @@ function validate81( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -53392,14 +53772,14 @@ function validate81( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema66.allOf[1].properties.devices, + parentSchema: schema67.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -53407,7 +53787,7 @@ function validate81( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema66.allOf[1].properties.devices, + parentSchema: schema67.allOf[1].properties.devices, data: data3, }, ]; @@ -53422,7 +53802,7 @@ function validate81( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -53430,8 +53810,8 @@ function validate81( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema66.allOf[1].properties.devices.items.required, - parentSchema: schema66.allOf[1].properties.devices.items, + schema67.allOf[1].properties.devices.items.required, + parentSchema: schema67.allOf[1].properties.devices.items, data: data4, }, ]; @@ -53444,7 +53824,7 @@ function validate81( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -53455,7 +53835,7 @@ function validate81( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema66.allOf[1].properties.devices.items + schema67.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -53463,7 +53843,7 @@ function validate81( return false; } } else { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -53473,10 +53853,10 @@ function validate81( params: { type: 'string' }, message: 'must be string', schema: - schema66.allOf[1].properties.devices.items + schema67.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema66.allOf[1].properties.devices.items + schema67.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -53524,7 +53904,7 @@ function validate81( (data8.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + @@ -53543,12 +53923,12 @@ function validate81( missing3 + "'", schema: - schema66.allOf[1].properties + schema67.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema66.allOf[1].properties + schema67.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -53563,7 +53943,7 @@ function validate81( if (errors === _errs23) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + @@ -53582,7 +53962,7 @@ function validate81( '"', schema: 'uri', parentSchema: - schema66.allOf[1] + schema67.allOf[1] .properties.devices .items.properties .config.properties @@ -53595,7 +53975,7 @@ function validate81( return false; } } else { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + @@ -53610,14 +53990,14 @@ function validate81( params: { type: 'string' }, message: 'must be string', schema: - schema66.allOf[1] + schema67.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema66.allOf[1] + schema67.allOf[1] .properties.devices .items.properties.config .properties.services @@ -53639,7 +54019,7 @@ function validate81( let data10 = data8.serviceId; const _errs25 = errors; if (typeof data10 !== 'string') { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + @@ -53654,13 +54034,13 @@ function validate81( params: { type: 'string' }, message: 'must be string', schema: - schema66.allOf[1].properties + schema67.allOf[1].properties .devices.items.properties .config.properties .services.items.properties .serviceId.type, parentSchema: - schema66.allOf[1].properties + schema67.allOf[1].properties .devices.items.properties .config.properties .services.items.properties @@ -53683,7 +54063,7 @@ function validate81( data8.remoteServiceId; const _errs27 = errors; if (typeof data11 !== 'string') { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + @@ -53698,14 +54078,14 @@ function validate81( params: { type: 'string' }, message: 'must be string', schema: - schema66.allOf[1] + schema67.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema66.allOf[1] + schema67.allOf[1] .properties.devices .items.properties.config .properties.services @@ -53724,7 +54104,7 @@ function validate81( } } } else { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + @@ -53738,11 +54118,11 @@ function validate81( params: { type: 'object' }, message: 'must be object', schema: - schema66.allOf[1].properties.devices + schema67.allOf[1].properties.devices .items.properties.config .properties.services.items.type, parentSchema: - schema66.allOf[1].properties.devices + schema67.allOf[1].properties.devices .items.properties.config .properties.services.items, data: data8, @@ -53757,7 +54137,7 @@ function validate81( } } } else { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + @@ -53770,11 +54150,11 @@ function validate81( params: { type: 'array' }, message: 'must be array', schema: - schema66.allOf[1].properties.devices.items + schema67.allOf[1].properties.devices.items .properties.config.properties.services .type, parentSchema: - schema66.allOf[1].properties.devices.items + schema67.allOf[1].properties.devices.items .properties.config.properties.services, data: data7, }, @@ -53784,7 +54164,7 @@ function validate81( } } } else { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -53794,10 +54174,10 @@ function validate81( params: { type: 'object' }, message: 'must be object', schema: - schema66.allOf[1].properties.devices.items + schema67.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema66.allOf[1].properties.devices.items + schema67.allOf[1].properties.devices.items .properties.config, data: data6, }, @@ -53812,15 +54192,15 @@ function validate81( } } } else { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema66.allOf[1].properties.devices.items.type, - parentSchema: schema66.allOf[1].properties.devices.items, + schema: schema67.allOf[1].properties.devices.items.type, + parentSchema: schema67.allOf[1].properties.devices.items, data: data4, }, ]; @@ -53835,15 +54215,15 @@ function validate81( } } } else { - validate81.errors = [ + validate82.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema66.allOf[1].properties.devices.type, - parentSchema: schema66.allOf[1].properties.devices, + schema: schema67.allOf[1].properties.devices.type, + parentSchema: schema67.allOf[1].properties.devices, data: data3, }, ]; @@ -53853,15 +54233,15 @@ function validate81( } } } else { - validate81.errors = [ + validate82.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema66.allOf[1].type, - parentSchema: schema66.allOf[1], + schema: schema67.allOf[1].type, + parentSchema: schema67.allOf[1], data, }, ]; @@ -53870,11 +54250,11 @@ function validate81( } var valid0 = _errs8 === errors; } - validate81.errors = vErrors; + validate82.errors = vErrors; return errors === 0; } -exports.validateCreatePeerconnectionResponse201 = validate82; -const schema67 = { +exports.validateCreatePeerconnectionResponse201 = validate83; +const schema68 = { title: 'Peerconnection', allOf: [ { @@ -53948,7 +54328,7 @@ const schema67 = { '#/paths//peerconnections/post/responses/201/content/application/json/schema', 'x-schema-type': 'all', }; -function validate82( +function validate83( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -53963,15 +54343,15 @@ function validate82( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate82.errors = [ + validate83.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema67.allOf[0].required, - parentSchema: schema67.allOf[0], + schema: schema68.allOf[0].required, + parentSchema: schema68.allOf[0], data, }, ]; @@ -53984,7 +54364,7 @@ function validate82( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -53992,22 +54372,22 @@ function validate82( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema67.allOf[0].properties.url, + parentSchema: schema68.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema67.allOf[0].properties.url.type, - parentSchema: schema67.allOf[0].properties.url, + schema: schema68.allOf[0].properties.url.type, + parentSchema: schema68.allOf[0].properties.url, data: data0, }, ]; @@ -54024,30 +54404,30 @@ function validate82( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema67.allOf[0].properties.type.type, - parentSchema: schema67.allOf[0].properties.type, + schema: schema68.allOf[0].properties.type.type, + parentSchema: schema68.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema67.allOf[0].properties.type.enum }, + params: { allowedValues: schema68.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema67.allOf[0].properties.type.enum, - parentSchema: schema67.allOf[0].properties.type, + schema: schema68.allOf[0].properties.type.enum, + parentSchema: schema68.allOf[0].properties.type, data: data1, }, ]; @@ -54062,15 +54442,15 @@ function validate82( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema67.allOf[0].properties.status.type, - parentSchema: schema67.allOf[0].properties.status, + schema: schema68.allOf[0].properties.status.type, + parentSchema: schema68.allOf[0].properties.status, data: data2, }, ]; @@ -54086,15 +54466,15 @@ function validate82( data2 === 'closed' ) ) { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema67.allOf[0].properties.status.enum }, + params: { allowedValues: schema68.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema67.allOf[0].properties.status.enum, - parentSchema: schema67.allOf[0].properties.status, + schema: schema68.allOf[0].properties.status.enum, + parentSchema: schema68.allOf[0].properties.status, data: data2, }, ]; @@ -54108,15 +54488,15 @@ function validate82( } } } else { - validate82.errors = [ + validate83.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema67.allOf[0].type, - parentSchema: schema67.allOf[0], + schema: schema68.allOf[0].type, + parentSchema: schema68.allOf[0], data, }, ]; @@ -54130,15 +54510,15 @@ function validate82( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate82.errors = [ + validate83.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema67.allOf[1].required, - parentSchema: schema67.allOf[1], + schema: schema68.allOf[1].required, + parentSchema: schema68.allOf[1], data, }, ]; @@ -54150,7 +54530,7 @@ function validate82( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -54158,14 +54538,14 @@ function validate82( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema67.allOf[1].properties.devices, + parentSchema: schema68.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -54173,7 +54553,7 @@ function validate82( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema67.allOf[1].properties.devices, + parentSchema: schema68.allOf[1].properties.devices, data: data3, }, ]; @@ -54188,7 +54568,7 @@ function validate82( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -54196,8 +54576,8 @@ function validate82( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema67.allOf[1].properties.devices.items.required, - parentSchema: schema67.allOf[1].properties.devices.items, + schema68.allOf[1].properties.devices.items.required, + parentSchema: schema68.allOf[1].properties.devices.items, data: data4, }, ]; @@ -54210,7 +54590,7 @@ function validate82( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -54221,7 +54601,7 @@ function validate82( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema67.allOf[1].properties.devices.items + schema68.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -54229,7 +54609,7 @@ function validate82( return false; } } else { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -54239,10 +54619,10 @@ function validate82( params: { type: 'string' }, message: 'must be string', schema: - schema67.allOf[1].properties.devices.items + schema68.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema67.allOf[1].properties.devices.items + schema68.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -54290,7 +54670,7 @@ function validate82( (data8.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + @@ -54309,12 +54689,12 @@ function validate82( missing3 + "'", schema: - schema67.allOf[1].properties + schema68.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema67.allOf[1].properties + schema68.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -54329,7 +54709,7 @@ function validate82( if (errors === _errs23) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + @@ -54348,7 +54728,7 @@ function validate82( '"', schema: 'uri', parentSchema: - schema67.allOf[1] + schema68.allOf[1] .properties.devices .items.properties .config.properties @@ -54361,7 +54741,7 @@ function validate82( return false; } } else { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + @@ -54376,14 +54756,14 @@ function validate82( params: { type: 'string' }, message: 'must be string', schema: - schema67.allOf[1] + schema68.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema67.allOf[1] + schema68.allOf[1] .properties.devices .items.properties.config .properties.services @@ -54405,7 +54785,7 @@ function validate82( let data10 = data8.serviceId; const _errs25 = errors; if (typeof data10 !== 'string') { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + @@ -54420,13 +54800,13 @@ function validate82( params: { type: 'string' }, message: 'must be string', schema: - schema67.allOf[1].properties + schema68.allOf[1].properties .devices.items.properties .config.properties .services.items.properties .serviceId.type, parentSchema: - schema67.allOf[1].properties + schema68.allOf[1].properties .devices.items.properties .config.properties .services.items.properties @@ -54449,7 +54829,7 @@ function validate82( data8.remoteServiceId; const _errs27 = errors; if (typeof data11 !== 'string') { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + @@ -54464,14 +54844,14 @@ function validate82( params: { type: 'string' }, message: 'must be string', schema: - schema67.allOf[1] + schema68.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema67.allOf[1] + schema68.allOf[1] .properties.devices .items.properties.config .properties.services @@ -54490,7 +54870,7 @@ function validate82( } } } else { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + @@ -54504,11 +54884,11 @@ function validate82( params: { type: 'object' }, message: 'must be object', schema: - schema67.allOf[1].properties.devices + schema68.allOf[1].properties.devices .items.properties.config .properties.services.items.type, parentSchema: - schema67.allOf[1].properties.devices + schema68.allOf[1].properties.devices .items.properties.config .properties.services.items, data: data8, @@ -54523,7 +54903,7 @@ function validate82( } } } else { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + @@ -54536,11 +54916,11 @@ function validate82( params: { type: 'array' }, message: 'must be array', schema: - schema67.allOf[1].properties.devices.items + schema68.allOf[1].properties.devices.items .properties.config.properties.services .type, parentSchema: - schema67.allOf[1].properties.devices.items + schema68.allOf[1].properties.devices.items .properties.config.properties.services, data: data7, }, @@ -54550,7 +54930,7 @@ function validate82( } } } else { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -54560,10 +54940,10 @@ function validate82( params: { type: 'object' }, message: 'must be object', schema: - schema67.allOf[1].properties.devices.items + schema68.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema67.allOf[1].properties.devices.items + schema68.allOf[1].properties.devices.items .properties.config, data: data6, }, @@ -54578,15 +54958,15 @@ function validate82( } } } else { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema67.allOf[1].properties.devices.items.type, - parentSchema: schema67.allOf[1].properties.devices.items, + schema: schema68.allOf[1].properties.devices.items.type, + parentSchema: schema68.allOf[1].properties.devices.items, data: data4, }, ]; @@ -54601,15 +54981,15 @@ function validate82( } } } else { - validate82.errors = [ + validate83.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema67.allOf[1].properties.devices.type, - parentSchema: schema67.allOf[1].properties.devices, + schema: schema68.allOf[1].properties.devices.type, + parentSchema: schema68.allOf[1].properties.devices, data: data3, }, ]; @@ -54619,15 +54999,15 @@ function validate82( } } } else { - validate82.errors = [ + validate83.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema67.allOf[1].type, - parentSchema: schema67.allOf[1], + schema: schema68.allOf[1].type, + parentSchema: schema68.allOf[1], data, }, ]; @@ -54636,11 +55016,11 @@ function validate82( } var valid0 = _errs8 === errors; } - validate82.errors = vErrors; + validate83.errors = vErrors; return errors === 0; } -exports.validateCreatePeerconnectionResponse202 = validate83; -const schema68 = { +exports.validateCreatePeerconnectionResponse202 = validate84; +const schema69 = { title: 'Peerconnection', allOf: [ { @@ -54714,7 +55094,7 @@ const schema68 = { '#/paths//peerconnections/post/responses/202/content/application/json/schema', 'x-schema-type': 'all', }; -function validate83( +function validate84( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -54729,15 +55109,15 @@ function validate83( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate83.errors = [ + validate84.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema68.allOf[0].required, - parentSchema: schema68.allOf[0], + schema: schema69.allOf[0].required, + parentSchema: schema69.allOf[0], data, }, ]; @@ -54750,7 +55130,7 @@ function validate83( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -54758,22 +55138,22 @@ function validate83( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema68.allOf[0].properties.url, + parentSchema: schema69.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema68.allOf[0].properties.url.type, - parentSchema: schema68.allOf[0].properties.url, + schema: schema69.allOf[0].properties.url.type, + parentSchema: schema69.allOf[0].properties.url, data: data0, }, ]; @@ -54790,30 +55170,30 @@ function validate83( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema68.allOf[0].properties.type.type, - parentSchema: schema68.allOf[0].properties.type, + schema: schema69.allOf[0].properties.type.type, + parentSchema: schema69.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema68.allOf[0].properties.type.enum }, + params: { allowedValues: schema69.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema68.allOf[0].properties.type.enum, - parentSchema: schema68.allOf[0].properties.type, + schema: schema69.allOf[0].properties.type.enum, + parentSchema: schema69.allOf[0].properties.type, data: data1, }, ]; @@ -54828,15 +55208,15 @@ function validate83( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema68.allOf[0].properties.status.type, - parentSchema: schema68.allOf[0].properties.status, + schema: schema69.allOf[0].properties.status.type, + parentSchema: schema69.allOf[0].properties.status, data: data2, }, ]; @@ -54852,15 +55232,15 @@ function validate83( data2 === 'closed' ) ) { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema68.allOf[0].properties.status.enum }, + params: { allowedValues: schema69.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema68.allOf[0].properties.status.enum, - parentSchema: schema68.allOf[0].properties.status, + schema: schema69.allOf[0].properties.status.enum, + parentSchema: schema69.allOf[0].properties.status, data: data2, }, ]; @@ -54874,15 +55254,15 @@ function validate83( } } } else { - validate83.errors = [ + validate84.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema68.allOf[0].type, - parentSchema: schema68.allOf[0], + schema: schema69.allOf[0].type, + parentSchema: schema69.allOf[0], data, }, ]; @@ -54896,15 +55276,15 @@ function validate83( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate83.errors = [ + validate84.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema68.allOf[1].required, - parentSchema: schema68.allOf[1], + schema: schema69.allOf[1].required, + parentSchema: schema69.allOf[1], data, }, ]; @@ -54916,7 +55296,7 @@ function validate83( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -54924,14 +55304,14 @@ function validate83( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema68.allOf[1].properties.devices, + parentSchema: schema69.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -54939,7 +55319,7 @@ function validate83( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema68.allOf[1].properties.devices, + parentSchema: schema69.allOf[1].properties.devices, data: data3, }, ]; @@ -54954,7 +55334,7 @@ function validate83( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -54962,8 +55342,8 @@ function validate83( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema68.allOf[1].properties.devices.items.required, - parentSchema: schema68.allOf[1].properties.devices.items, + schema69.allOf[1].properties.devices.items.required, + parentSchema: schema69.allOf[1].properties.devices.items, data: data4, }, ]; @@ -54976,7 +55356,7 @@ function validate83( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -54987,7 +55367,7 @@ function validate83( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema68.allOf[1].properties.devices.items + schema69.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -54995,7 +55375,7 @@ function validate83( return false; } } else { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -55005,10 +55385,10 @@ function validate83( params: { type: 'string' }, message: 'must be string', schema: - schema68.allOf[1].properties.devices.items + schema69.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema68.allOf[1].properties.devices.items + schema69.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -55056,7 +55436,7 @@ function validate83( (data8.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + @@ -55075,12 +55455,12 @@ function validate83( missing3 + "'", schema: - schema68.allOf[1].properties + schema69.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema68.allOf[1].properties + schema69.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -55095,7 +55475,7 @@ function validate83( if (errors === _errs23) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + @@ -55114,7 +55494,7 @@ function validate83( '"', schema: 'uri', parentSchema: - schema68.allOf[1] + schema69.allOf[1] .properties.devices .items.properties .config.properties @@ -55127,7 +55507,7 @@ function validate83( return false; } } else { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + @@ -55142,14 +55522,14 @@ function validate83( params: { type: 'string' }, message: 'must be string', schema: - schema68.allOf[1] + schema69.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema68.allOf[1] + schema69.allOf[1] .properties.devices .items.properties.config .properties.services @@ -55171,7 +55551,7 @@ function validate83( let data10 = data8.serviceId; const _errs25 = errors; if (typeof data10 !== 'string') { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + @@ -55186,13 +55566,13 @@ function validate83( params: { type: 'string' }, message: 'must be string', schema: - schema68.allOf[1].properties + schema69.allOf[1].properties .devices.items.properties .config.properties .services.items.properties .serviceId.type, parentSchema: - schema68.allOf[1].properties + schema69.allOf[1].properties .devices.items.properties .config.properties .services.items.properties @@ -55215,7 +55595,7 @@ function validate83( data8.remoteServiceId; const _errs27 = errors; if (typeof data11 !== 'string') { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + @@ -55230,14 +55610,14 @@ function validate83( params: { type: 'string' }, message: 'must be string', schema: - schema68.allOf[1] + schema69.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema68.allOf[1] + schema69.allOf[1] .properties.devices .items.properties.config .properties.services @@ -55256,7 +55636,7 @@ function validate83( } } } else { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + @@ -55270,11 +55650,11 @@ function validate83( params: { type: 'object' }, message: 'must be object', schema: - schema68.allOf[1].properties.devices + schema69.allOf[1].properties.devices .items.properties.config .properties.services.items.type, parentSchema: - schema68.allOf[1].properties.devices + schema69.allOf[1].properties.devices .items.properties.config .properties.services.items, data: data8, @@ -55289,7 +55669,7 @@ function validate83( } } } else { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + @@ -55302,11 +55682,11 @@ function validate83( params: { type: 'array' }, message: 'must be array', schema: - schema68.allOf[1].properties.devices.items + schema69.allOf[1].properties.devices.items .properties.config.properties.services .type, parentSchema: - schema68.allOf[1].properties.devices.items + schema69.allOf[1].properties.devices.items .properties.config.properties.services, data: data7, }, @@ -55316,7 +55696,7 @@ function validate83( } } } else { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -55326,10 +55706,10 @@ function validate83( params: { type: 'object' }, message: 'must be object', schema: - schema68.allOf[1].properties.devices.items + schema69.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema68.allOf[1].properties.devices.items + schema69.allOf[1].properties.devices.items .properties.config, data: data6, }, @@ -55344,15 +55724,15 @@ function validate83( } } } else { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema68.allOf[1].properties.devices.items.type, - parentSchema: schema68.allOf[1].properties.devices.items, + schema: schema69.allOf[1].properties.devices.items.type, + parentSchema: schema69.allOf[1].properties.devices.items, data: data4, }, ]; @@ -55367,15 +55747,15 @@ function validate83( } } } else { - validate83.errors = [ + validate84.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema68.allOf[1].properties.devices.type, - parentSchema: schema68.allOf[1].properties.devices, + schema: schema69.allOf[1].properties.devices.type, + parentSchema: schema69.allOf[1].properties.devices, data: data3, }, ]; @@ -55385,15 +55765,15 @@ function validate83( } } } else { - validate83.errors = [ + validate84.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema68.allOf[1].type, - parentSchema: schema68.allOf[1], + schema: schema69.allOf[1].type, + parentSchema: schema69.allOf[1], data, }, ]; @@ -55402,11 +55782,11 @@ function validate83( } var valid0 = _errs8 === errors; } - validate83.errors = vErrors; + validate84.errors = vErrors; return errors === 0; } -exports.validateGetPeerconnectionResponse200 = validate84; -const schema69 = { +exports.validateGetPeerconnectionResponse200 = validate85; +const schema70 = { title: 'Peerconnection', allOf: [ { @@ -55480,7 +55860,7 @@ const schema69 = { '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema', 'x-schema-type': 'all', }; -function validate84( +function validate85( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -55495,15 +55875,15 @@ function validate84( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate84.errors = [ + validate85.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema69.allOf[0].required, - parentSchema: schema69.allOf[0], + schema: schema70.allOf[0].required, + parentSchema: schema70.allOf[0], data, }, ]; @@ -55516,7 +55896,7 @@ function validate84( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -55524,22 +55904,22 @@ function validate84( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema69.allOf[0].properties.url, + parentSchema: schema70.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema69.allOf[0].properties.url.type, - parentSchema: schema69.allOf[0].properties.url, + schema: schema70.allOf[0].properties.url.type, + parentSchema: schema70.allOf[0].properties.url, data: data0, }, ]; @@ -55556,30 +55936,30 @@ function validate84( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema69.allOf[0].properties.type.type, - parentSchema: schema69.allOf[0].properties.type, + schema: schema70.allOf[0].properties.type.type, + parentSchema: schema70.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema69.allOf[0].properties.type.enum }, + params: { allowedValues: schema70.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema69.allOf[0].properties.type.enum, - parentSchema: schema69.allOf[0].properties.type, + schema: schema70.allOf[0].properties.type.enum, + parentSchema: schema70.allOf[0].properties.type, data: data1, }, ]; @@ -55594,15 +55974,15 @@ function validate84( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema69.allOf[0].properties.status.type, - parentSchema: schema69.allOf[0].properties.status, + schema: schema70.allOf[0].properties.status.type, + parentSchema: schema70.allOf[0].properties.status, data: data2, }, ]; @@ -55618,15 +55998,15 @@ function validate84( data2 === 'closed' ) ) { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema69.allOf[0].properties.status.enum }, + params: { allowedValues: schema70.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema69.allOf[0].properties.status.enum, - parentSchema: schema69.allOf[0].properties.status, + schema: schema70.allOf[0].properties.status.enum, + parentSchema: schema70.allOf[0].properties.status, data: data2, }, ]; @@ -55640,15 +56020,15 @@ function validate84( } } } else { - validate84.errors = [ + validate85.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema69.allOf[0].type, - parentSchema: schema69.allOf[0], + schema: schema70.allOf[0].type, + parentSchema: schema70.allOf[0], data, }, ]; @@ -55662,15 +56042,15 @@ function validate84( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate84.errors = [ + validate85.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema69.allOf[1].required, - parentSchema: schema69.allOf[1], + schema: schema70.allOf[1].required, + parentSchema: schema70.allOf[1], data, }, ]; @@ -55682,7 +56062,7 @@ function validate84( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -55690,14 +56070,14 @@ function validate84( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema69.allOf[1].properties.devices, + parentSchema: schema70.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -55705,7 +56085,7 @@ function validate84( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema69.allOf[1].properties.devices, + parentSchema: schema70.allOf[1].properties.devices, data: data3, }, ]; @@ -55720,7 +56100,7 @@ function validate84( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -55728,8 +56108,8 @@ function validate84( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema69.allOf[1].properties.devices.items.required, - parentSchema: schema69.allOf[1].properties.devices.items, + schema70.allOf[1].properties.devices.items.required, + parentSchema: schema70.allOf[1].properties.devices.items, data: data4, }, ]; @@ -55742,7 +56122,7 @@ function validate84( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -55753,7 +56133,7 @@ function validate84( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema69.allOf[1].properties.devices.items + schema70.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -55761,7 +56141,7 @@ function validate84( return false; } } else { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -55771,10 +56151,10 @@ function validate84( params: { type: 'string' }, message: 'must be string', schema: - schema69.allOf[1].properties.devices.items + schema70.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema69.allOf[1].properties.devices.items + schema70.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -55822,7 +56202,7 @@ function validate84( (data8.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + @@ -55841,12 +56221,12 @@ function validate84( missing3 + "'", schema: - schema69.allOf[1].properties + schema70.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema69.allOf[1].properties + schema70.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -55861,7 +56241,7 @@ function validate84( if (errors === _errs23) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + @@ -55880,7 +56260,7 @@ function validate84( '"', schema: 'uri', parentSchema: - schema69.allOf[1] + schema70.allOf[1] .properties.devices .items.properties .config.properties @@ -55893,7 +56273,7 @@ function validate84( return false; } } else { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + @@ -55908,14 +56288,14 @@ function validate84( params: { type: 'string' }, message: 'must be string', schema: - schema69.allOf[1] + schema70.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema69.allOf[1] + schema70.allOf[1] .properties.devices .items.properties.config .properties.services @@ -55937,7 +56317,7 @@ function validate84( let data10 = data8.serviceId; const _errs25 = errors; if (typeof data10 !== 'string') { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + @@ -55952,13 +56332,13 @@ function validate84( params: { type: 'string' }, message: 'must be string', schema: - schema69.allOf[1].properties + schema70.allOf[1].properties .devices.items.properties .config.properties .services.items.properties .serviceId.type, parentSchema: - schema69.allOf[1].properties + schema70.allOf[1].properties .devices.items.properties .config.properties .services.items.properties @@ -55981,7 +56361,7 @@ function validate84( data8.remoteServiceId; const _errs27 = errors; if (typeof data11 !== 'string') { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + @@ -55996,14 +56376,14 @@ function validate84( params: { type: 'string' }, message: 'must be string', schema: - schema69.allOf[1] + schema70.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema69.allOf[1] + schema70.allOf[1] .properties.devices .items.properties.config .properties.services @@ -56022,7 +56402,7 @@ function validate84( } } } else { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + @@ -56036,11 +56416,11 @@ function validate84( params: { type: 'object' }, message: 'must be object', schema: - schema69.allOf[1].properties.devices + schema70.allOf[1].properties.devices .items.properties.config .properties.services.items.type, parentSchema: - schema69.allOf[1].properties.devices + schema70.allOf[1].properties.devices .items.properties.config .properties.services.items, data: data8, @@ -56055,7 +56435,7 @@ function validate84( } } } else { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + @@ -56068,11 +56448,11 @@ function validate84( params: { type: 'array' }, message: 'must be array', schema: - schema69.allOf[1].properties.devices.items + schema70.allOf[1].properties.devices.items .properties.config.properties.services .type, parentSchema: - schema69.allOf[1].properties.devices.items + schema70.allOf[1].properties.devices.items .properties.config.properties.services, data: data7, }, @@ -56082,7 +56462,7 @@ function validate84( } } } else { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -56092,10 +56472,10 @@ function validate84( params: { type: 'object' }, message: 'must be object', schema: - schema69.allOf[1].properties.devices.items + schema70.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema69.allOf[1].properties.devices.items + schema70.allOf[1].properties.devices.items .properties.config, data: data6, }, @@ -56110,15 +56490,15 @@ function validate84( } } } else { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema69.allOf[1].properties.devices.items.type, - parentSchema: schema69.allOf[1].properties.devices.items, + schema: schema70.allOf[1].properties.devices.items.type, + parentSchema: schema70.allOf[1].properties.devices.items, data: data4, }, ]; @@ -56133,15 +56513,15 @@ function validate84( } } } else { - validate84.errors = [ + validate85.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema69.allOf[1].properties.devices.type, - parentSchema: schema69.allOf[1].properties.devices, + schema: schema70.allOf[1].properties.devices.type, + parentSchema: schema70.allOf[1].properties.devices, data: data3, }, ]; @@ -56151,15 +56531,15 @@ function validate84( } } } else { - validate84.errors = [ + validate85.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema69.allOf[1].type, - parentSchema: schema69.allOf[1], + schema: schema70.allOf[1].type, + parentSchema: schema70.allOf[1], data, }, ]; @@ -56168,11 +56548,11 @@ function validate84( } var valid0 = _errs8 === errors; } - validate84.errors = vErrors; + validate85.errors = vErrors; return errors === 0; } -exports.validatePatchPeerconnectionDeviceStatusBody = validate85; -const schema70 = { +exports.validatePatchPeerconnectionDeviceStatusBody = validate86; +const schema71 = { type: 'object', properties: { status: { @@ -56189,7 +56569,7 @@ const schema70 = { '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema', 'x-schema-type': 'all', }; -function validate85( +function validate86( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -56199,15 +56579,15 @@ function validate85( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.status === undefined && (missing0 = 'status')) { - validate85.errors = [ + validate86.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema70.required, - parentSchema: schema70, + schema: schema71.required, + parentSchema: schema71, data, }, ]; @@ -56216,15 +56596,15 @@ function validate85( if (data.status !== undefined) { let data0 = data.status; if (typeof data0 !== 'string') { - validate85.errors = [ + validate86.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema70.properties.status.type, - parentSchema: schema70.properties.status, + schema: schema71.properties.status.type, + parentSchema: schema71.properties.status, data: data0, }, ]; @@ -56240,106 +56620,15 @@ function validate85( data0 === 'closed' ) ) { - validate85.errors = [ + validate86.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema70.properties.status.enum }, + params: { allowedValues: schema71.properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema70.properties.status.enum, - parentSchema: schema70.properties.status, - data: data0, - }, - ]; - return false; - } - } - } - } else { - validate85.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema70.type, - parentSchema: schema70, - data, - }, - ]; - return false; - } - } - validate85.errors = vErrors; - return errors === 0; -} -exports.validateAuthenticationMessageRequest = validate86; -const schema71 = { - title: 'Authentication Message', - allOf: [ - { - title: 'Message', - type: 'object', - properties: { messageType: { type: 'string' } }, - required: ['messageType'], - additionalProperties: true, - 'x-typeguard': true, - }, - { - type: 'object', - properties: { - messageType: { const: 'authenticate' }, - token: { type: 'string' }, - authenticated: { type: 'boolean' }, - }, - required: ['messageType'], - }, - ], - 'x-typeguard': true, - 'x-standalone': true, - 'x-name': 'AuthenticationMessageRequest', - 'x-location': '#/components/schemas/authentication_message_request', - 'x-schema-type': 'request', -}; -function validate86( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - const _errs0 = errors; - if (errors === _errs0) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing0; - if (data.messageType === undefined && (missing0 = 'messageType')) { - validate86.errors = [ - { - instancePath, - schemaPath: '#/allOf/0/required', - keyword: 'required', - params: { missingProperty: missing0 }, - message: "must have required property '" + missing0 + "'", - schema: schema71.allOf[0].required, - parentSchema: schema71.allOf[0], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data0 = data.messageType; - if (typeof data0 !== 'string') { - validate86.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/0/properties/messageType/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema71.allOf[0].properties.messageType.type, - parentSchema: schema71.allOf[0].properties.messageType, + schema: schema71.properties.status.enum, + parentSchema: schema71.properties.status, data: data0, }, ]; @@ -56351,132 +56640,22 @@ function validate86( validate86.errors = [ { instancePath, - schemaPath: '#/allOf/0/type', + schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema71.allOf[0].type, - parentSchema: schema71.allOf[0], + schema: schema71.type, + parentSchema: schema71, data, }, ]; return false; } } - var valid0 = _errs0 === errors; - if (valid0) { - const _errs5 = errors; - if (errors === _errs5) { - if (data && typeof data == 'object' && !Array.isArray(data)) { - let missing1; - if (data.messageType === undefined && (missing1 = 'messageType')) { - validate86.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/required', - keyword: 'required', - params: { missingProperty: missing1 }, - message: "must have required property '" + missing1 + "'", - schema: schema71.allOf[1].required, - parentSchema: schema71.allOf[1], - data, - }, - ]; - return false; - } else { - if (data.messageType !== undefined) { - let data1 = data.messageType; - const _errs7 = errors; - if ('authenticate' !== data1) { - validate86.errors = [ - { - instancePath: instancePath + '/messageType', - schemaPath: '#/allOf/1/properties/messageType/const', - keyword: 'const', - params: { allowedValue: 'authenticate' }, - message: 'must be equal to constant', - schema: 'authenticate', - parentSchema: schema71.allOf[1].properties.messageType, - data: data1, - }, - ]; - return false; - } - var valid2 = _errs7 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.token !== undefined) { - let data2 = data.token; - const _errs8 = errors; - if (typeof data2 !== 'string') { - validate86.errors = [ - { - instancePath: instancePath + '/token', - schemaPath: '#/allOf/1/properties/token/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema71.allOf[1].properties.token.type, - parentSchema: schema71.allOf[1].properties.token, - data: data2, - }, - ]; - return false; - } - var valid2 = _errs8 === errors; - } else { - var valid2 = true; - } - if (valid2) { - if (data.authenticated !== undefined) { - let data3 = data.authenticated; - const _errs10 = errors; - if (typeof data3 !== 'boolean') { - validate86.errors = [ - { - instancePath: instancePath + '/authenticated', - schemaPath: '#/allOf/1/properties/authenticated/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema71.allOf[1].properties.authenticated.type, - parentSchema: schema71.allOf[1].properties.authenticated, - data: data3, - }, - ]; - return false; - } - var valid2 = _errs10 === errors; - } else { - var valid2 = true; - } - } - } - } - } else { - validate86.errors = [ - { - instancePath, - schemaPath: '#/allOf/1/type', - keyword: 'type', - params: { type: 'object' }, - message: 'must be object', - schema: schema71.allOf[1].type, - parentSchema: schema71.allOf[1], - data, - }, - ]; - return false; - } - } - var valid0 = _errs5 === errors; - } validate86.errors = vErrors; return errors === 0; } -exports.validateAuthenticationMessageResponse = validate87; +exports.validateAuthenticationMessageRequest = validate87; const schema72 = { title: 'Authentication Message', allOf: [ @@ -56500,9 +56679,9 @@ const schema72 = { ], 'x-typeguard': true, 'x-standalone': true, - 'x-name': 'AuthenticationMessageResponse', - 'x-location': '#/components/schemas/authentication_message_response', - 'x-schema-type': 'response', + 'x-name': 'AuthenticationMessageRequest', + 'x-location': '#/components/schemas/authentication_message_request', + 'x-schema-type': 'request', }; function validate87( data, @@ -56677,8 +56856,209 @@ function validate87( validate87.errors = vErrors; return errors === 0; } -exports.validateConnectionStateChangedMessageRequest = validate88; +exports.validateAuthenticationMessageResponse = validate88; const schema73 = { + title: 'Authentication Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'authenticate' }, + token: { type: 'string' }, + authenticated: { type: 'boolean' }, + }, + required: ['messageType'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'AuthenticationMessageResponse', + 'x-location': '#/components/schemas/authentication_message_response', + 'x-schema-type': 'response', +}; +function validate88( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema73.allOf[0].required, + parentSchema: schema73.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate88.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema73.allOf[0].properties.messageType.type, + parentSchema: schema73.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema73.allOf[0].type, + parentSchema: schema73.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if (data.messageType === undefined && (missing1 = 'messageType')) { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema73.allOf[1].required, + parentSchema: schema73.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('authenticate' !== data1) { + validate88.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'authenticate' }, + message: 'must be equal to constant', + schema: 'authenticate', + parentSchema: schema73.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.token !== undefined) { + let data2 = data.token; + const _errs8 = errors; + if (typeof data2 !== 'string') { + validate88.errors = [ + { + instancePath: instancePath + '/token', + schemaPath: '#/allOf/1/properties/token/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema73.allOf[1].properties.token.type, + parentSchema: schema73.allOf[1].properties.token, + data: data2, + }, + ]; + return false; + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.authenticated !== undefined) { + let data3 = data.authenticated; + const _errs10 = errors; + if (typeof data3 !== 'boolean') { + validate88.errors = [ + { + instancePath: instancePath + '/authenticated', + schemaPath: '#/allOf/1/properties/authenticated/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema73.allOf[1].properties.authenticated.type, + parentSchema: schema73.allOf[1].properties.authenticated, + data: data3, + }, + ]; + return false; + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + } + } + } + } else { + validate88.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema73.allOf[1].type, + parentSchema: schema73.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate88.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStateChangedMessageRequest = validate89; +const schema74 = { title: 'Connection State Changed Message', allOf: [ { @@ -56710,7 +57090,7 @@ const schema73 = { 'x-location': '#/components/schemas/connection_state_changed_message_request', 'x-schema-type': 'request', }; -function validate88( +function validate89( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -56721,15 +57101,15 @@ function validate88( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate88.errors = [ + validate89.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema73.allOf[0].required, - parentSchema: schema73.allOf[0], + schema: schema74.allOf[0].required, + parentSchema: schema74.allOf[0], data, }, ]; @@ -56738,15 +57118,15 @@ function validate88( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate88.errors = [ + validate89.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema73.allOf[0].properties.messageType.type, - parentSchema: schema73.allOf[0].properties.messageType, + schema: schema74.allOf[0].properties.messageType.type, + parentSchema: schema74.allOf[0].properties.messageType, data: data0, }, ]; @@ -56755,15 +57135,15 @@ function validate88( } } } else { - validate88.errors = [ + validate89.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema73.allOf[0].type, - parentSchema: schema73.allOf[0], + schema: schema74.allOf[0].type, + parentSchema: schema74.allOf[0], data, }, ]; @@ -56780,15 +57160,15 @@ function validate88( (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || (data.status === undefined && (missing1 = 'status')) ) { - validate88.errors = [ + validate89.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema73.allOf[1].required, - parentSchema: schema73.allOf[1], + schema: schema74.allOf[1].required, + parentSchema: schema74.allOf[1], data, }, ]; @@ -56798,7 +57178,7 @@ function validate88( let data1 = data.messageType; const _errs7 = errors; if ('connection-state-changed' !== data1) { - validate88.errors = [ + validate89.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/1/properties/messageType/const', @@ -56806,7 +57186,7 @@ function validate88( params: { allowedValue: 'connection-state-changed' }, message: 'must be equal to constant', schema: 'connection-state-changed', - parentSchema: schema73.allOf[1].properties.messageType, + parentSchema: schema74.allOf[1].properties.messageType, data: data1, }, ]; @@ -56824,7 +57204,7 @@ function validate88( if (errors === _errs8) { if (typeof data2 === 'string') { if (!formats0(data2)) { - validate88.errors = [ + validate89.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/format', @@ -56832,22 +57212,22 @@ function validate88( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema73.allOf[1].properties.connectionUrl, + parentSchema: schema74.allOf[1].properties.connectionUrl, data: data2, }, ]; return false; } } else { - validate88.errors = [ + validate89.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema73.allOf[1].properties.connectionUrl.type, - parentSchema: schema73.allOf[1].properties.connectionUrl, + schema: schema74.allOf[1].properties.connectionUrl.type, + parentSchema: schema74.allOf[1].properties.connectionUrl, data: data2, }, ]; @@ -56864,15 +57244,15 @@ function validate88( let data3 = data.status; const _errs10 = errors; if (typeof data3 !== 'string') { - validate88.errors = [ + validate89.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/1/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema73.allOf[1].properties.status.type, - parentSchema: schema73.allOf[1].properties.status, + schema: schema74.allOf[1].properties.status.type, + parentSchema: schema74.allOf[1].properties.status, data: data3, }, ]; @@ -56888,15 +57268,15 @@ function validate88( data3 === 'closed' ) ) { - validate88.errors = [ + validate89.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/1/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema73.allOf[1].properties.status.enum }, + params: { allowedValues: schema74.allOf[1].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema73.allOf[1].properties.status.enum, - parentSchema: schema73.allOf[1].properties.status, + schema: schema74.allOf[1].properties.status.enum, + parentSchema: schema74.allOf[1].properties.status, data: data3, }, ]; @@ -56910,15 +57290,15 @@ function validate88( } } } else { - validate88.errors = [ + validate89.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema73.allOf[1].type, - parentSchema: schema73.allOf[1], + schema: schema74.allOf[1].type, + parentSchema: schema74.allOf[1], data, }, ]; @@ -56927,11 +57307,11 @@ function validate88( } var valid0 = _errs5 === errors; } - validate88.errors = vErrors; + validate89.errors = vErrors; return errors === 0; } -exports.validateConnectionStateChangedMessageResponse = validate89; -const schema74 = { +exports.validateConnectionStateChangedMessageResponse = validate90; +const schema75 = { title: 'Connection State Changed Message', allOf: [ { @@ -56963,7 +57343,7 @@ const schema74 = { 'x-location': '#/components/schemas/connection_state_changed_message_response', 'x-schema-type': 'response', }; -function validate89( +function validate90( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -56974,15 +57354,15 @@ function validate89( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate89.errors = [ + validate90.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema74.allOf[0].required, - parentSchema: schema74.allOf[0], + schema: schema75.allOf[0].required, + parentSchema: schema75.allOf[0], data, }, ]; @@ -56991,15 +57371,15 @@ function validate89( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate89.errors = [ + validate90.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema74.allOf[0].properties.messageType.type, - parentSchema: schema74.allOf[0].properties.messageType, + schema: schema75.allOf[0].properties.messageType.type, + parentSchema: schema75.allOf[0].properties.messageType, data: data0, }, ]; @@ -57008,15 +57388,15 @@ function validate89( } } } else { - validate89.errors = [ + validate90.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema74.allOf[0].type, - parentSchema: schema74.allOf[0], + schema: schema75.allOf[0].type, + parentSchema: schema75.allOf[0], data, }, ]; @@ -57033,15 +57413,15 @@ function validate89( (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || (data.status === undefined && (missing1 = 'status')) ) { - validate89.errors = [ + validate90.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema74.allOf[1].required, - parentSchema: schema74.allOf[1], + schema: schema75.allOf[1].required, + parentSchema: schema75.allOf[1], data, }, ]; @@ -57051,7 +57431,7 @@ function validate89( let data1 = data.messageType; const _errs7 = errors; if ('connection-state-changed' !== data1) { - validate89.errors = [ + validate90.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/1/properties/messageType/const', @@ -57059,7 +57439,7 @@ function validate89( params: { allowedValue: 'connection-state-changed' }, message: 'must be equal to constant', schema: 'connection-state-changed', - parentSchema: schema74.allOf[1].properties.messageType, + parentSchema: schema75.allOf[1].properties.messageType, data: data1, }, ]; @@ -57077,7 +57457,7 @@ function validate89( if (errors === _errs8) { if (typeof data2 === 'string') { if (!formats0(data2)) { - validate89.errors = [ + validate90.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/format', @@ -57085,22 +57465,22 @@ function validate89( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema74.allOf[1].properties.connectionUrl, + parentSchema: schema75.allOf[1].properties.connectionUrl, data: data2, }, ]; return false; } } else { - validate89.errors = [ + validate90.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema74.allOf[1].properties.connectionUrl.type, - parentSchema: schema74.allOf[1].properties.connectionUrl, + schema: schema75.allOf[1].properties.connectionUrl.type, + parentSchema: schema75.allOf[1].properties.connectionUrl, data: data2, }, ]; @@ -57117,15 +57497,15 @@ function validate89( let data3 = data.status; const _errs10 = errors; if (typeof data3 !== 'string') { - validate89.errors = [ + validate90.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/1/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema74.allOf[1].properties.status.type, - parentSchema: schema74.allOf[1].properties.status, + schema: schema75.allOf[1].properties.status.type, + parentSchema: schema75.allOf[1].properties.status, data: data3, }, ]; @@ -57141,15 +57521,15 @@ function validate89( data3 === 'closed' ) ) { - validate89.errors = [ + validate90.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/1/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema74.allOf[1].properties.status.enum }, + params: { allowedValues: schema75.allOf[1].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema74.allOf[1].properties.status.enum, - parentSchema: schema74.allOf[1].properties.status, + schema: schema75.allOf[1].properties.status.enum, + parentSchema: schema75.allOf[1].properties.status, data: data3, }, ]; @@ -57163,15 +57543,15 @@ function validate89( } } } else { - validate89.errors = [ + validate90.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema74.allOf[1].type, - parentSchema: schema74.allOf[1], + schema: schema75.allOf[1].type, + parentSchema: schema75.allOf[1], data, }, ]; @@ -57180,11 +57560,11 @@ function validate89( } var valid0 = _errs5 === errors; } - validate89.errors = vErrors; + validate90.errors = vErrors; return errors === 0; } -exports.validateUserReferenceRequest = validate90; -const schema75 = { +exports.validateUserReferenceRequest = validate91; +const schema76 = { title: 'User Reference', type: 'object', properties: { url: { type: 'string', description: 'URL of the user', format: 'uri' } }, @@ -57194,7 +57574,7 @@ const schema75 = { 'x-location': '#/components/schemas/user_reference_request', 'x-schema-type': 'request', }; -function validate90( +function validate91( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -57204,15 +57584,15 @@ function validate90( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.url === undefined && (missing0 = 'url')) { - validate90.errors = [ + validate91.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema75.required, - parentSchema: schema75, + schema: schema76.required, + parentSchema: schema76, data, }, ]; @@ -57225,7 +57605,7 @@ function validate90( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate90.errors = [ + validate91.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/format', @@ -57233,22 +57613,22 @@ function validate90( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema75.properties.url, + parentSchema: schema76.properties.url, data: data0, }, ]; return false; } } else { - validate90.errors = [ + validate91.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema75.properties.url.type, - parentSchema: schema75.properties.url, + schema: schema76.properties.url.type, + parentSchema: schema76.properties.url, data: data0, }, ]; @@ -57259,26 +57639,26 @@ function validate90( } } } else { - validate90.errors = [ + validate91.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema75.type, - parentSchema: schema75, + schema: schema76.type, + parentSchema: schema76, data, }, ]; return false; } } - validate90.errors = vErrors; + validate91.errors = vErrors; return errors === 0; } -exports.validateUserReferenceResponse = validate91; -const schema76 = { +exports.validateUserReferenceResponse = validate92; +const schema77 = { title: 'User Reference', type: 'object', properties: { url: { type: 'string', description: 'URL of the user', format: 'uri' } }, @@ -57288,7 +57668,7 @@ const schema76 = { 'x-location': '#/components/schemas/user_reference_response', 'x-schema-type': 'response', }; -function validate91( +function validate92( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -57298,15 +57678,15 @@ function validate91( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.url === undefined && (missing0 = 'url')) { - validate91.errors = [ + validate92.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema76.required, - parentSchema: schema76, + schema: schema77.required, + parentSchema: schema77, data, }, ]; @@ -57319,7 +57699,7 @@ function validate91( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate91.errors = [ + validate92.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/format', @@ -57327,22 +57707,22 @@ function validate91( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema76.properties.url, + parentSchema: schema77.properties.url, data: data0, }, ]; return false; } } else { - validate91.errors = [ + validate92.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema76.properties.url.type, - parentSchema: schema76.properties.url, + schema: schema77.properties.url.type, + parentSchema: schema77.properties.url, data: data0, }, ]; @@ -57353,26 +57733,26 @@ function validate91( } } } else { - validate91.errors = [ + validate92.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema76.type, - parentSchema: schema76, + schema: schema77.type, + parentSchema: schema77, data, }, ]; return false; } } - validate91.errors = vErrors; + validate92.errors = vErrors; return errors === 0; } -exports.validateDeviceOverviewRequest = validate92; -const schema77 = { +exports.validateDeviceOverviewRequest = validate93; +const schema78 = { title: 'Device Overview', type: 'object', properties: { @@ -57422,7 +57802,7 @@ const schema77 = { 'x-location': '#/components/schemas/device_overview_request', 'x-schema-type': 'request', }; -function validate92( +function validate93( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -57436,15 +57816,15 @@ function validate92( (data.name === undefined && (missing0 = 'name')) || (data.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate92.errors = [ + validate93.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema77.required, - parentSchema: schema77, + schema: schema78.required, + parentSchema: schema78, data, }, ]; @@ -57454,15 +57834,15 @@ function validate92( let data0 = data.name; const _errs1 = errors; if (typeof data0 !== 'string') { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema77.properties.name.type, - parentSchema: schema77.properties.name, + schema: schema78.properties.name.type, + parentSchema: schema78.properties.name, data: data0, }, ]; @@ -57477,15 +57857,15 @@ function validate92( let data1 = data.description; const _errs3 = errors; if (typeof data1 !== 'string') { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema77.properties.description.type, - parentSchema: schema77.properties.description, + schema: schema78.properties.description.type, + parentSchema: schema78.properties.description, data: data1, }, ]; @@ -57500,15 +57880,15 @@ function validate92( let data2 = data.type; const _errs5 = errors; if (typeof data2 !== 'string') { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema77.properties.type.type, - parentSchema: schema77.properties.type, + schema: schema78.properties.type.type, + parentSchema: schema78.properties.type, data: data2, }, ]; @@ -57522,15 +57902,15 @@ function validate92( data2 === 'cloud instantiable' ) ) { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema77.properties.type.enum }, + params: { allowedValues: schema78.properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema77.properties.type.enum, - parentSchema: schema77.properties.type, + schema: schema78.properties.type.enum, + parentSchema: schema78.properties.type, data: data2, }, ]; @@ -57545,15 +57925,15 @@ function validate92( let data3 = data.isPublic; const _errs7 = errors; if (typeof data3 !== 'boolean') { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema77.properties.isPublic.type, - parentSchema: schema77.properties.isPublic, + schema: schema78.properties.isPublic.type, + parentSchema: schema78.properties.isPublic, data: data3, }, ]; @@ -57582,7 +57962,7 @@ function validate92( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/properties/viewer/items/required', @@ -57590,8 +57970,8 @@ function validate92( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema77.properties.viewer.items.required, - parentSchema: schema77.properties.viewer.items, + schema: schema78.properties.viewer.items.required, + parentSchema: schema78.properties.viewer.items, data: data5, }, ]; @@ -57604,7 +57984,7 @@ function validate92( if (errors === _errs13) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -57615,7 +57995,7 @@ function validate92( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema77.properties.viewer.items.properties + schema78.properties.viewer.items.properties .url, data: data6, }, @@ -57623,7 +58003,7 @@ function validate92( return false; } } else { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -57633,10 +58013,10 @@ function validate92( params: { type: 'string' }, message: 'must be string', schema: - schema77.properties.viewer.items.properties + schema78.properties.viewer.items.properties .url.type, parentSchema: - schema77.properties.viewer.items.properties + schema78.properties.viewer.items.properties .url, data: data6, }, @@ -57648,15 +58028,15 @@ function validate92( } } } else { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema77.properties.viewer.items.type, - parentSchema: schema77.properties.viewer.items, + schema: schema78.properties.viewer.items.type, + parentSchema: schema78.properties.viewer.items, data: data5, }, ]; @@ -57669,15 +58049,15 @@ function validate92( } } } else { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema77.properties.viewer.type, - parentSchema: schema77.properties.viewer, + schema: schema78.properties.viewer.type, + parentSchema: schema78.properties.viewer, data: data4, }, ]; @@ -57707,7 +58087,7 @@ function validate92( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/properties/owner/items/required', @@ -57715,8 +58095,8 @@ function validate92( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema77.properties.owner.items.required, - parentSchema: schema77.properties.owner.items, + schema: schema78.properties.owner.items.required, + parentSchema: schema78.properties.owner.items, data: data8, }, ]; @@ -57729,7 +58109,7 @@ function validate92( if (errors === _errs19) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -57741,7 +58121,7 @@ function validate92( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema77.properties.owner.items.properties + schema78.properties.owner.items.properties .url, data: data9, }, @@ -57749,7 +58129,7 @@ function validate92( return false; } } else { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -57759,10 +58139,10 @@ function validate92( params: { type: 'string' }, message: 'must be string', schema: - schema77.properties.owner.items.properties + schema78.properties.owner.items.properties .url.type, parentSchema: - schema77.properties.owner.items.properties + schema78.properties.owner.items.properties .url, data: data9, }, @@ -57774,15 +58154,15 @@ function validate92( } } } else { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema77.properties.owner.items.type, - parentSchema: schema77.properties.owner.items, + schema: schema78.properties.owner.items.type, + parentSchema: schema78.properties.owner.items, data: data8, }, ]; @@ -57795,15 +58175,15 @@ function validate92( } } } else { - validate92.errors = [ + validate93.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema77.properties.owner.type, - parentSchema: schema77.properties.owner, + schema: schema78.properties.owner.type, + parentSchema: schema78.properties.owner, data: data7, }, ]; @@ -57821,26 +58201,26 @@ function validate92( } } } else { - validate92.errors = [ + validate93.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema77.type, - parentSchema: schema77, + schema: schema78.type, + parentSchema: schema78, data, }, ]; return false; } } - validate92.errors = vErrors; + validate93.errors = vErrors; return errors === 0; } -exports.validateDeviceOverviewResponse = validate93; -const schema78 = { +exports.validateDeviceOverviewResponse = validate94; +const schema79 = { title: 'Device Overview', type: 'object', properties: { @@ -57896,7 +58276,7 @@ const schema78 = { 'x-location': '#/components/schemas/device_overview_response', 'x-schema-type': 'response', }; -function validate93( +function validate94( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -57911,15 +58291,15 @@ function validate93( (data.name === undefined && (missing0 = 'name')) || (data.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate93.errors = [ + validate94.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema78.required, - parentSchema: schema78, + schema: schema79.required, + parentSchema: schema79, data, }, ]; @@ -57932,7 +58312,7 @@ function validate93( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/format', @@ -57940,22 +58320,22 @@ function validate93( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema78.properties.url, + parentSchema: schema79.properties.url, data: data0, }, ]; return false; } } else { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema78.properties.url.type, - parentSchema: schema78.properties.url, + schema: schema79.properties.url.type, + parentSchema: schema79.properties.url, data: data0, }, ]; @@ -57972,15 +58352,15 @@ function validate93( let data1 = data.name; const _errs3 = errors; if (typeof data1 !== 'string') { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema78.properties.name.type, - parentSchema: schema78.properties.name, + schema: schema79.properties.name.type, + parentSchema: schema79.properties.name, data: data1, }, ]; @@ -57995,15 +58375,15 @@ function validate93( let data2 = data.description; const _errs5 = errors; if (typeof data2 !== 'string') { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema78.properties.description.type, - parentSchema: schema78.properties.description, + schema: schema79.properties.description.type, + parentSchema: schema79.properties.description, data: data2, }, ]; @@ -58018,15 +58398,15 @@ function validate93( let data3 = data.type; const _errs7 = errors; if (typeof data3 !== 'string') { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema78.properties.type.type, - parentSchema: schema78.properties.type, + schema: schema79.properties.type.type, + parentSchema: schema79.properties.type, data: data3, }, ]; @@ -58040,15 +58420,15 @@ function validate93( data3 === 'cloud instantiable' ) ) { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema78.properties.type.enum }, + params: { allowedValues: schema79.properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema78.properties.type.enum, - parentSchema: schema78.properties.type, + schema: schema79.properties.type.enum, + parentSchema: schema79.properties.type, data: data3, }, ]; @@ -58063,15 +58443,15 @@ function validate93( let data4 = data.isPublic; const _errs9 = errors; if (typeof data4 !== 'boolean') { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema78.properties.isPublic.type, - parentSchema: schema78.properties.isPublic, + schema: schema79.properties.isPublic.type, + parentSchema: schema79.properties.isPublic, data: data4, }, ]; @@ -58100,7 +58480,7 @@ function validate93( ) { let missing1; if (data6.url === undefined && (missing1 = 'url')) { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/properties/viewer/items/required', @@ -58108,8 +58488,8 @@ function validate93( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema78.properties.viewer.items.required, - parentSchema: schema78.properties.viewer.items, + schema: schema79.properties.viewer.items.required, + parentSchema: schema79.properties.viewer.items, data: data6, }, ]; @@ -58122,7 +58502,7 @@ function validate93( if (errors === _errs15) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -58134,7 +58514,7 @@ function validate93( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema78.properties.viewer.items + schema79.properties.viewer.items .properties.url, data: data7, }, @@ -58142,7 +58522,7 @@ function validate93( return false; } } else { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -58152,10 +58532,10 @@ function validate93( params: { type: 'string' }, message: 'must be string', schema: - schema78.properties.viewer.items.properties + schema79.properties.viewer.items.properties .url.type, parentSchema: - schema78.properties.viewer.items.properties + schema79.properties.viewer.items.properties .url, data: data7, }, @@ -58167,15 +58547,15 @@ function validate93( } } } else { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema78.properties.viewer.items.type, - parentSchema: schema78.properties.viewer.items, + schema: schema79.properties.viewer.items.type, + parentSchema: schema79.properties.viewer.items, data: data6, }, ]; @@ -58188,15 +58568,15 @@ function validate93( } } } else { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema78.properties.viewer.type, - parentSchema: schema78.properties.viewer, + schema: schema79.properties.viewer.type, + parentSchema: schema79.properties.viewer, data: data5, }, ]; @@ -58226,7 +58606,7 @@ function validate93( ) { let missing2; if (data9.url === undefined && (missing2 = 'url')) { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/properties/owner/items/required', @@ -58234,8 +58614,8 @@ function validate93( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema78.properties.owner.items.required, - parentSchema: schema78.properties.owner.items, + schema: schema79.properties.owner.items.required, + parentSchema: schema79.properties.owner.items, data: data9, }, ]; @@ -58248,7 +58628,7 @@ function validate93( if (errors === _errs21) { if (typeof data10 === 'string') { if (!formats0(data10)) { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -58260,7 +58640,7 @@ function validate93( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema78.properties.owner.items + schema79.properties.owner.items .properties.url, data: data10, }, @@ -58268,7 +58648,7 @@ function validate93( return false; } } else { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -58278,10 +58658,10 @@ function validate93( params: { type: 'string' }, message: 'must be string', schema: - schema78.properties.owner.items.properties + schema79.properties.owner.items.properties .url.type, parentSchema: - schema78.properties.owner.items.properties + schema79.properties.owner.items.properties .url, data: data10, }, @@ -58293,15 +58673,15 @@ function validate93( } } } else { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema78.properties.owner.items.type, - parentSchema: schema78.properties.owner.items, + schema: schema79.properties.owner.items.type, + parentSchema: schema79.properties.owner.items, data: data9, }, ]; @@ -58314,15 +58694,15 @@ function validate93( } } } else { - validate93.errors = [ + validate94.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema78.properties.owner.type, - parentSchema: schema78.properties.owner, + schema: schema79.properties.owner.type, + parentSchema: schema79.properties.owner, data: data8, }, ]; @@ -58341,26 +58721,26 @@ function validate93( } } } else { - validate93.errors = [ + validate94.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema78.type, - parentSchema: schema78, + schema: schema79.type, + parentSchema: schema79, data, }, ]; return false; } } - validate93.errors = vErrors; + validate94.errors = vErrors; return errors === 0; } -exports.validateServiceDescriptionRequest = validate94; -const schema79 = { +exports.validateServiceDescriptionRequest = validate95; +const schema80 = { title: 'Service Description', type: 'object', properties: { @@ -58374,7 +58754,7 @@ const schema79 = { 'x-location': '#/components/schemas/service_description_request', 'x-schema-type': 'request', }; -function validate94( +function validate95( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -58389,7 +58769,7 @@ function validate94( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate94.errors = [ + validate95.errors = [ { instancePath: instancePath + '/serviceType', schemaPath: '#/properties/serviceType/format', @@ -58397,22 +58777,22 @@ function validate94( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema79.properties.serviceType, + parentSchema: schema80.properties.serviceType, data: data0, }, ]; return false; } } else { - validate94.errors = [ + validate95.errors = [ { instancePath: instancePath + '/serviceType', schemaPath: '#/properties/serviceType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema79.properties.serviceType.type, - parentSchema: schema79.properties.serviceType, + schema: schema80.properties.serviceType.type, + parentSchema: schema80.properties.serviceType, data: data0, }, ]; @@ -58429,15 +58809,15 @@ function validate94( let data1 = data.serviceId; const _errs4 = errors; if (typeof data1 !== 'string') { - validate94.errors = [ + validate95.errors = [ { instancePath: instancePath + '/serviceId', schemaPath: '#/properties/serviceId/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema79.properties.serviceId.type, - parentSchema: schema79.properties.serviceId, + schema: schema80.properties.serviceId.type, + parentSchema: schema80.properties.serviceId, data: data1, }, ]; @@ -58452,30 +58832,30 @@ function validate94( let data2 = data.serviceDirection; const _errs6 = errors; if (typeof data2 !== 'string') { - validate94.errors = [ + validate95.errors = [ { instancePath: instancePath + '/serviceDirection', schemaPath: '#/properties/serviceDirection/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema79.properties.serviceDirection.type, - parentSchema: schema79.properties.serviceDirection, + schema: schema80.properties.serviceDirection.type, + parentSchema: schema80.properties.serviceDirection, data: data2, }, ]; return false; } if (!(data2 === 'consumer' || data2 === 'producer' || data2 === 'prosumer')) { - validate94.errors = [ + validate95.errors = [ { instancePath: instancePath + '/serviceDirection', schemaPath: '#/properties/serviceDirection/enum', keyword: 'enum', - params: { allowedValues: schema79.properties.serviceDirection.enum }, + params: { allowedValues: schema80.properties.serviceDirection.enum }, message: 'must be equal to one of the allowed values', - schema: schema79.properties.serviceDirection.enum, - parentSchema: schema79.properties.serviceDirection, + schema: schema80.properties.serviceDirection.enum, + parentSchema: schema80.properties.serviceDirection, data: data2, }, ]; @@ -58488,26 +58868,26 @@ function validate94( } } } else { - validate94.errors = [ + validate95.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema79.type, - parentSchema: schema79, + schema: schema80.type, + parentSchema: schema80, data, }, ]; return false; } } - validate94.errors = vErrors; + validate95.errors = vErrors; return errors === 0; } -exports.validateServiceDescriptionResponse = validate95; -const schema80 = { +exports.validateServiceDescriptionResponse = validate96; +const schema81 = { title: 'Service Description', type: 'object', properties: { @@ -58521,7 +58901,7 @@ const schema80 = { 'x-location': '#/components/schemas/service_description_response', 'x-schema-type': 'response', }; -function validate95( +function validate96( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -58536,7 +58916,7 @@ function validate95( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate95.errors = [ + validate96.errors = [ { instancePath: instancePath + '/serviceType', schemaPath: '#/properties/serviceType/format', @@ -58544,22 +58924,22 @@ function validate95( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema80.properties.serviceType, + parentSchema: schema81.properties.serviceType, data: data0, }, ]; return false; } } else { - validate95.errors = [ + validate96.errors = [ { instancePath: instancePath + '/serviceType', schemaPath: '#/properties/serviceType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema80.properties.serviceType.type, - parentSchema: schema80.properties.serviceType, + schema: schema81.properties.serviceType.type, + parentSchema: schema81.properties.serviceType, data: data0, }, ]; @@ -58576,15 +58956,15 @@ function validate95( let data1 = data.serviceId; const _errs4 = errors; if (typeof data1 !== 'string') { - validate95.errors = [ + validate96.errors = [ { instancePath: instancePath + '/serviceId', schemaPath: '#/properties/serviceId/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema80.properties.serviceId.type, - parentSchema: schema80.properties.serviceId, + schema: schema81.properties.serviceId.type, + parentSchema: schema81.properties.serviceId, data: data1, }, ]; @@ -58599,30 +58979,30 @@ function validate95( let data2 = data.serviceDirection; const _errs6 = errors; if (typeof data2 !== 'string') { - validate95.errors = [ + validate96.errors = [ { instancePath: instancePath + '/serviceDirection', schemaPath: '#/properties/serviceDirection/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema80.properties.serviceDirection.type, - parentSchema: schema80.properties.serviceDirection, + schema: schema81.properties.serviceDirection.type, + parentSchema: schema81.properties.serviceDirection, data: data2, }, ]; return false; } if (!(data2 === 'consumer' || data2 === 'producer' || data2 === 'prosumer')) { - validate95.errors = [ + validate96.errors = [ { instancePath: instancePath + '/serviceDirection', schemaPath: '#/properties/serviceDirection/enum', keyword: 'enum', - params: { allowedValues: schema80.properties.serviceDirection.enum }, + params: { allowedValues: schema81.properties.serviceDirection.enum }, message: 'must be equal to one of the allowed values', - schema: schema80.properties.serviceDirection.enum, - parentSchema: schema80.properties.serviceDirection, + schema: schema81.properties.serviceDirection.enum, + parentSchema: schema81.properties.serviceDirection, data: data2, }, ]; @@ -58635,26 +59015,26 @@ function validate95( } } } else { - validate95.errors = [ + validate96.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema80.type, - parentSchema: schema80, + schema: schema81.type, + parentSchema: schema81, data, }, ]; return false; } } - validate95.errors = vErrors; + validate96.errors = vErrors; return errors === 0; } -exports.validateInstantiableCloudDeviceRequest = validate96; -const schema81 = { +exports.validateInstantiableCloudDeviceRequest = validate97; +const schema82 = { title: 'Instantiable Cloud Device', allOf: [ { @@ -58733,7 +59113,7 @@ const schema81 = { 'x-location': '#/components/schemas/device_cloud_instantiable_request', 'x-schema-type': 'request', }; -function validate96( +function validate97( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -58748,15 +59128,15 @@ function validate96( (data.name === undefined && (missing0 = 'name')) || (data.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate96.errors = [ + validate97.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema81.allOf[0].required, - parentSchema: schema81.allOf[0], + schema: schema82.allOf[0].required, + parentSchema: schema82.allOf[0], data, }, ]; @@ -58766,15 +59146,15 @@ function validate96( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema81.allOf[0].properties.name.type, - parentSchema: schema81.allOf[0].properties.name, + schema: schema82.allOf[0].properties.name.type, + parentSchema: schema82.allOf[0].properties.name, data: data0, }, ]; @@ -58789,15 +59169,15 @@ function validate96( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema81.allOf[0].properties.description.type, - parentSchema: schema81.allOf[0].properties.description, + schema: schema82.allOf[0].properties.description.type, + parentSchema: schema82.allOf[0].properties.description, data: data1, }, ]; @@ -58812,15 +59192,15 @@ function validate96( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema81.allOf[0].properties.type.type, - parentSchema: schema81.allOf[0].properties.type, + schema: schema82.allOf[0].properties.type.type, + parentSchema: schema82.allOf[0].properties.type, data: data2, }, ]; @@ -58834,15 +59214,15 @@ function validate96( data2 === 'cloud instantiable' ) ) { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema81.allOf[0].properties.type.enum }, + params: { allowedValues: schema82.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema81.allOf[0].properties.type.enum, - parentSchema: schema81.allOf[0].properties.type, + schema: schema82.allOf[0].properties.type.enum, + parentSchema: schema82.allOf[0].properties.type, data: data2, }, ]; @@ -58857,15 +59237,15 @@ function validate96( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema81.allOf[0].properties.isPublic.type, - parentSchema: schema81.allOf[0].properties.isPublic, + schema: schema82.allOf[0].properties.isPublic.type, + parentSchema: schema82.allOf[0].properties.isPublic, data: data3, }, ]; @@ -58894,7 +59274,7 @@ function validate96( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -58904,8 +59284,8 @@ function validate96( message: "must have required property '" + missing1 + "'", schema: - schema81.allOf[0].properties.viewer.items.required, - parentSchema: schema81.allOf[0].properties.viewer.items, + schema82.allOf[0].properties.viewer.items.required, + parentSchema: schema82.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -58918,7 +59298,7 @@ function validate96( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -58929,7 +59309,7 @@ function validate96( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema81.allOf[0].properties.viewer.items + schema82.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -58937,7 +59317,7 @@ function validate96( return false; } } else { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -58947,10 +59327,10 @@ function validate96( params: { type: 'string' }, message: 'must be string', schema: - schema81.allOf[0].properties.viewer.items + schema82.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema81.allOf[0].properties.viewer.items + schema82.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -58962,15 +59342,15 @@ function validate96( } } } else { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema81.allOf[0].properties.viewer.items.type, - parentSchema: schema81.allOf[0].properties.viewer.items, + schema: schema82.allOf[0].properties.viewer.items.type, + parentSchema: schema82.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -58983,15 +59363,15 @@ function validate96( } } } else { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema81.allOf[0].properties.viewer.type, - parentSchema: schema81.allOf[0].properties.viewer, + schema: schema82.allOf[0].properties.viewer.type, + parentSchema: schema82.allOf[0].properties.viewer, data: data4, }, ]; @@ -59021,7 +59401,7 @@ function validate96( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -59031,9 +59411,9 @@ function validate96( message: "must have required property '" + missing2 + "'", schema: - schema81.allOf[0].properties.owner.items.required, + schema82.allOf[0].properties.owner.items.required, parentSchema: - schema81.allOf[0].properties.owner.items, + schema82.allOf[0].properties.owner.items, data: data8, }, ]; @@ -59046,7 +59426,7 @@ function validate96( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -59058,7 +59438,7 @@ function validate96( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema81.allOf[0].properties.owner.items + schema82.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -59066,7 +59446,7 @@ function validate96( return false; } } else { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -59076,10 +59456,10 @@ function validate96( params: { type: 'string' }, message: 'must be string', schema: - schema81.allOf[0].properties.owner.items + schema82.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema81.allOf[0].properties.owner.items + schema82.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -59091,15 +59471,15 @@ function validate96( } } } else { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema81.allOf[0].properties.owner.items.type, - parentSchema: schema81.allOf[0].properties.owner.items, + schema: schema82.allOf[0].properties.owner.items.type, + parentSchema: schema82.allOf[0].properties.owner.items, data: data8, }, ]; @@ -59112,15 +59492,15 @@ function validate96( } } } else { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema81.allOf[0].properties.owner.type, - parentSchema: schema81.allOf[0].properties.owner, + schema: schema82.allOf[0].properties.owner.type, + parentSchema: schema82.allOf[0].properties.owner, data: data7, }, ]; @@ -59138,15 +59518,15 @@ function validate96( } } } else { - validate96.errors = [ + validate97.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema81.allOf[0].type, - parentSchema: schema81.allOf[0], + schema: schema82.allOf[0].type, + parentSchema: schema82.allOf[0], data, }, ]; @@ -59162,7 +59542,7 @@ function validate96( let data10 = data.type; const _errs24 = errors; if ('cloud instantiable' !== data10) { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -59170,7 +59550,7 @@ function validate96( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema81.allOf[1].properties.type, + parentSchema: schema82.allOf[1].properties.type, data: data10, }, ]; @@ -59188,7 +59568,7 @@ function validate96( if (errors === _errs25) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/instantiateUrl', schemaPath: '#/allOf/1/properties/instantiateUrl/format', @@ -59196,22 +59576,22 @@ function validate96( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema81.allOf[1].properties.instantiateUrl, + parentSchema: schema82.allOf[1].properties.instantiateUrl, data: data11, }, ]; return false; } } else { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/instantiateUrl', schemaPath: '#/allOf/1/properties/instantiateUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema81.allOf[1].properties.instantiateUrl.type, - parentSchema: schema81.allOf[1].properties.instantiateUrl, + schema: schema82.allOf[1].properties.instantiateUrl.type, + parentSchema: schema82.allOf[1].properties.instantiateUrl, data: data11, }, ]; @@ -59243,7 +59623,7 @@ function validate96( if (errors === _errs32) { if (typeof data14 === 'string') { if (!formats0(data14)) { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -59254,7 +59634,7 @@ function validate96( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema81.allOf[1].properties.services.items + schema82.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -59262,7 +59642,7 @@ function validate96( return false; } } else { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -59272,10 +59652,10 @@ function validate96( params: { type: 'string' }, message: 'must be string', schema: - schema81.allOf[1].properties.services.items + schema82.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema81.allOf[1].properties.services.items + schema82.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -59293,7 +59673,7 @@ function validate96( let data15 = data13.serviceId; const _errs34 = errors; if (typeof data15 !== 'string') { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceId', @@ -59303,10 +59683,10 @@ function validate96( params: { type: 'string' }, message: 'must be string', schema: - schema81.allOf[1].properties.services.items.properties + schema82.allOf[1].properties.services.items.properties .serviceId.type, parentSchema: - schema81.allOf[1].properties.services.items.properties + schema82.allOf[1].properties.services.items.properties .serviceId, data: data15, }, @@ -59322,7 +59702,7 @@ function validate96( let data16 = data13.serviceDirection; const _errs36 = errors; if (typeof data16 !== 'string') { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + @@ -59335,10 +59715,10 @@ function validate96( params: { type: 'string' }, message: 'must be string', schema: - schema81.allOf[1].properties.services.items + schema82.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema81.allOf[1].properties.services.items + schema82.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -59352,7 +59732,7 @@ function validate96( data16 === 'prosumer' ) ) { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + @@ -59364,15 +59744,15 @@ function validate96( keyword: 'enum', params: { allowedValues: - schema81.allOf[1].properties.services.items + schema82.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema81.allOf[1].properties.services.items + schema82.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema81.allOf[1].properties.services.items + schema82.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -59386,15 +59766,15 @@ function validate96( } } } else { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/services/' + i2, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema81.allOf[1].properties.services.items.type, - parentSchema: schema81.allOf[1].properties.services.items, + schema: schema82.allOf[1].properties.services.items.type, + parentSchema: schema82.allOf[1].properties.services.items, data: data13, }, ]; @@ -59407,15 +59787,15 @@ function validate96( } } } else { - validate96.errors = [ + validate97.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema81.allOf[1].properties.services.type, - parentSchema: schema81.allOf[1].properties.services, + schema: schema82.allOf[1].properties.services.type, + parentSchema: schema82.allOf[1].properties.services, data: data12, }, ]; @@ -59429,15 +59809,15 @@ function validate96( } } } else { - validate96.errors = [ + validate97.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema81.allOf[1].type, - parentSchema: schema81.allOf[1], + schema: schema82.allOf[1].type, + parentSchema: schema82.allOf[1], data, }, ]; @@ -59446,11 +59826,11 @@ function validate96( } var valid0 = _errs22 === errors; } - validate96.errors = vErrors; + validate97.errors = vErrors; return errors === 0; } -exports.validateInstantiableCloudDeviceResponse = validate97; -const schema82 = { +exports.validateInstantiableCloudDeviceResponse = validate98; +const schema83 = { title: 'Instantiable Cloud Device', allOf: [ { @@ -59535,7 +59915,7 @@ const schema82 = { 'x-location': '#/components/schemas/device_cloud_instantiable_response', 'x-schema-type': 'response', }; -function validate97( +function validate98( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -59551,15 +59931,15 @@ function validate97( (data.name === undefined && (missing0 = 'name')) || (data.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate97.errors = [ + validate98.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema82.allOf[0].required, - parentSchema: schema82.allOf[0], + schema: schema83.allOf[0].required, + parentSchema: schema83.allOf[0], data, }, ]; @@ -59572,7 +59952,7 @@ function validate97( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -59580,22 +59960,22 @@ function validate97( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema82.allOf[0].properties.url, + parentSchema: schema83.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema82.allOf[0].properties.url.type, - parentSchema: schema82.allOf[0].properties.url, + schema: schema83.allOf[0].properties.url.type, + parentSchema: schema83.allOf[0].properties.url, data: data0, }, ]; @@ -59612,15 +59992,15 @@ function validate97( let data1 = data.name; const _errs4 = errors; if (typeof data1 !== 'string') { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema82.allOf[0].properties.name.type, - parentSchema: schema82.allOf[0].properties.name, + schema: schema83.allOf[0].properties.name.type, + parentSchema: schema83.allOf[0].properties.name, data: data1, }, ]; @@ -59635,15 +60015,15 @@ function validate97( let data2 = data.description; const _errs6 = errors; if (typeof data2 !== 'string') { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema82.allOf[0].properties.description.type, - parentSchema: schema82.allOf[0].properties.description, + schema: schema83.allOf[0].properties.description.type, + parentSchema: schema83.allOf[0].properties.description, data: data2, }, ]; @@ -59658,15 +60038,15 @@ function validate97( let data3 = data.type; const _errs8 = errors; if (typeof data3 !== 'string') { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema82.allOf[0].properties.type.type, - parentSchema: schema82.allOf[0].properties.type, + schema: schema83.allOf[0].properties.type.type, + parentSchema: schema83.allOf[0].properties.type, data: data3, }, ]; @@ -59680,15 +60060,15 @@ function validate97( data3 === 'cloud instantiable' ) ) { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema82.allOf[0].properties.type.enum }, + params: { allowedValues: schema83.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema82.allOf[0].properties.type.enum, - parentSchema: schema82.allOf[0].properties.type, + schema: schema83.allOf[0].properties.type.enum, + parentSchema: schema83.allOf[0].properties.type, data: data3, }, ]; @@ -59703,15 +60083,15 @@ function validate97( let data4 = data.isPublic; const _errs10 = errors; if (typeof data4 !== 'boolean') { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema82.allOf[0].properties.isPublic.type, - parentSchema: schema82.allOf[0].properties.isPublic, + schema: schema83.allOf[0].properties.isPublic.type, + parentSchema: schema83.allOf[0].properties.isPublic, data: data4, }, ]; @@ -59740,7 +60120,7 @@ function validate97( ) { let missing1; if (data6.url === undefined && (missing1 = 'url')) { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -59750,9 +60130,9 @@ function validate97( message: "must have required property '" + missing1 + "'", schema: - schema82.allOf[0].properties.viewer.items.required, + schema83.allOf[0].properties.viewer.items.required, parentSchema: - schema82.allOf[0].properties.viewer.items, + schema83.allOf[0].properties.viewer.items, data: data6, }, ]; @@ -59765,7 +60145,7 @@ function validate97( if (errors === _errs16) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -59777,7 +60157,7 @@ function validate97( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema82.allOf[0].properties.viewer.items + schema83.allOf[0].properties.viewer.items .properties.url, data: data7, }, @@ -59785,7 +60165,7 @@ function validate97( return false; } } else { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -59795,10 +60175,10 @@ function validate97( params: { type: 'string' }, message: 'must be string', schema: - schema82.allOf[0].properties.viewer.items + schema83.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema82.allOf[0].properties.viewer.items + schema83.allOf[0].properties.viewer.items .properties.url, data: data7, }, @@ -59810,15 +60190,15 @@ function validate97( } } } else { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema82.allOf[0].properties.viewer.items.type, - parentSchema: schema82.allOf[0].properties.viewer.items, + schema: schema83.allOf[0].properties.viewer.items.type, + parentSchema: schema83.allOf[0].properties.viewer.items, data: data6, }, ]; @@ -59831,15 +60211,15 @@ function validate97( } } } else { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema82.allOf[0].properties.viewer.type, - parentSchema: schema82.allOf[0].properties.viewer, + schema: schema83.allOf[0].properties.viewer.type, + parentSchema: schema83.allOf[0].properties.viewer, data: data5, }, ]; @@ -59869,7 +60249,7 @@ function validate97( ) { let missing2; if (data9.url === undefined && (missing2 = 'url')) { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -59879,9 +60259,9 @@ function validate97( message: "must have required property '" + missing2 + "'", schema: - schema82.allOf[0].properties.owner.items.required, + schema83.allOf[0].properties.owner.items.required, parentSchema: - schema82.allOf[0].properties.owner.items, + schema83.allOf[0].properties.owner.items, data: data9, }, ]; @@ -59894,7 +60274,7 @@ function validate97( if (errors === _errs22) { if (typeof data10 === 'string') { if (!formats0(data10)) { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -59906,7 +60286,7 @@ function validate97( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema82.allOf[0].properties.owner.items + schema83.allOf[0].properties.owner.items .properties.url, data: data10, }, @@ -59914,7 +60294,7 @@ function validate97( return false; } } else { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -59924,10 +60304,10 @@ function validate97( params: { type: 'string' }, message: 'must be string', schema: - schema82.allOf[0].properties.owner.items + schema83.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema82.allOf[0].properties.owner.items + schema83.allOf[0].properties.owner.items .properties.url, data: data10, }, @@ -59939,16 +60319,16 @@ function validate97( } } } else { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema82.allOf[0].properties.owner.items.type, + schema: schema83.allOf[0].properties.owner.items.type, parentSchema: - schema82.allOf[0].properties.owner.items, + schema83.allOf[0].properties.owner.items, data: data9, }, ]; @@ -59961,15 +60341,15 @@ function validate97( } } } else { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema82.allOf[0].properties.owner.type, - parentSchema: schema82.allOf[0].properties.owner, + schema: schema83.allOf[0].properties.owner.type, + parentSchema: schema83.allOf[0].properties.owner, data: data8, }, ]; @@ -59988,15 +60368,15 @@ function validate97( } } } else { - validate97.errors = [ + validate98.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema82.allOf[0].type, - parentSchema: schema82.allOf[0], + schema: schema83.allOf[0].type, + parentSchema: schema83.allOf[0], data, }, ]; @@ -60012,7 +60392,7 @@ function validate97( let data11 = data.type; const _errs26 = errors; if ('cloud instantiable' !== data11) { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -60020,7 +60400,7 @@ function validate97( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema82.allOf[1].properties.type, + parentSchema: schema83.allOf[1].properties.type, data: data11, }, ]; @@ -60038,7 +60418,7 @@ function validate97( if (errors === _errs27) { if (typeof data12 === 'string') { if (!formats0(data12)) { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/instantiateUrl', schemaPath: '#/allOf/1/properties/instantiateUrl/format', @@ -60046,22 +60426,22 @@ function validate97( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema82.allOf[1].properties.instantiateUrl, + parentSchema: schema83.allOf[1].properties.instantiateUrl, data: data12, }, ]; return false; } } else { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/instantiateUrl', schemaPath: '#/allOf/1/properties/instantiateUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema82.allOf[1].properties.instantiateUrl.type, - parentSchema: schema82.allOf[1].properties.instantiateUrl, + schema: schema83.allOf[1].properties.instantiateUrl.type, + parentSchema: schema83.allOf[1].properties.instantiateUrl, data: data12, }, ]; @@ -60093,7 +60473,7 @@ function validate97( if (errors === _errs34) { if (typeof data15 === 'string') { if (!formats0(data15)) { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -60104,7 +60484,7 @@ function validate97( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema82.allOf[1].properties.services.items + schema83.allOf[1].properties.services.items .properties.serviceType, data: data15, }, @@ -60112,7 +60492,7 @@ function validate97( return false; } } else { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -60122,10 +60502,10 @@ function validate97( params: { type: 'string' }, message: 'must be string', schema: - schema82.allOf[1].properties.services.items + schema83.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema82.allOf[1].properties.services.items + schema83.allOf[1].properties.services.items .properties.serviceType, data: data15, }, @@ -60143,7 +60523,7 @@ function validate97( let data16 = data14.serviceId; const _errs36 = errors; if (typeof data16 !== 'string') { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceId', @@ -60153,10 +60533,10 @@ function validate97( params: { type: 'string' }, message: 'must be string', schema: - schema82.allOf[1].properties.services.items.properties + schema83.allOf[1].properties.services.items.properties .serviceId.type, parentSchema: - schema82.allOf[1].properties.services.items.properties + schema83.allOf[1].properties.services.items.properties .serviceId, data: data16, }, @@ -60172,7 +60552,7 @@ function validate97( let data17 = data14.serviceDirection; const _errs38 = errors; if (typeof data17 !== 'string') { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + @@ -60185,10 +60565,10 @@ function validate97( params: { type: 'string' }, message: 'must be string', schema: - schema82.allOf[1].properties.services.items + schema83.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema82.allOf[1].properties.services.items + schema83.allOf[1].properties.services.items .properties.serviceDirection, data: data17, }, @@ -60202,7 +60582,7 @@ function validate97( data17 === 'prosumer' ) ) { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + @@ -60214,15 +60594,15 @@ function validate97( keyword: 'enum', params: { allowedValues: - schema82.allOf[1].properties.services.items + schema83.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema82.allOf[1].properties.services.items + schema83.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema82.allOf[1].properties.services.items + schema83.allOf[1].properties.services.items .properties.serviceDirection, data: data17, }, @@ -60236,15 +60616,15 @@ function validate97( } } } else { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/services/' + i2, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema82.allOf[1].properties.services.items.type, - parentSchema: schema82.allOf[1].properties.services.items, + schema: schema83.allOf[1].properties.services.items.type, + parentSchema: schema83.allOf[1].properties.services.items, data: data14, }, ]; @@ -60257,15 +60637,15 @@ function validate97( } } } else { - validate97.errors = [ + validate98.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema82.allOf[1].properties.services.type, - parentSchema: schema82.allOf[1].properties.services, + schema: schema83.allOf[1].properties.services.type, + parentSchema: schema83.allOf[1].properties.services, data: data13, }, ]; @@ -60279,15 +60659,15 @@ function validate97( } } } else { - validate97.errors = [ + validate98.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema82.allOf[1].type, - parentSchema: schema82.allOf[1], + schema: schema83.allOf[1].type, + parentSchema: schema83.allOf[1], data, }, ]; @@ -60296,11 +60676,11 @@ function validate97( } var valid0 = _errs24 === errors; } - validate97.errors = vErrors; + validate98.errors = vErrors; return errors === 0; } -exports.validateTimeSlotRequest = validate98; -const schema83 = { +exports.validateTimeSlotRequest = validate99; +const schema84 = { title: 'Time Slot', type: 'object', properties: { @@ -60312,7 +60692,7 @@ const schema83 = { 'x-location': '#/components/schemas/time_slot_request', 'x-schema-type': 'request', }; -function validate98( +function validate99( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -60327,7 +60707,7 @@ function validate98( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats22.validate(data0)) { - validate98.errors = [ + validate99.errors = [ { instancePath: instancePath + '/start', schemaPath: '#/properties/start/format', @@ -60335,22 +60715,22 @@ function validate98( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema83.properties.start, + parentSchema: schema84.properties.start, data: data0, }, ]; return false; } } else { - validate98.errors = [ + validate99.errors = [ { instancePath: instancePath + '/start', schemaPath: '#/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema83.properties.start.type, - parentSchema: schema83.properties.start, + schema: schema84.properties.start.type, + parentSchema: schema84.properties.start, data: data0, }, ]; @@ -60370,7 +60750,7 @@ function validate98( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate98.errors = [ + validate99.errors = [ { instancePath: instancePath + '/end', schemaPath: '#/properties/end/format', @@ -60378,22 +60758,22 @@ function validate98( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema83.properties.end, + parentSchema: schema84.properties.end, data: data1, }, ]; return false; } } else { - validate98.errors = [ + validate99.errors = [ { instancePath: instancePath + '/end', schemaPath: '#/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema83.properties.end.type, - parentSchema: schema83.properties.end, + schema: schema84.properties.end.type, + parentSchema: schema84.properties.end, data: data1, }, ]; @@ -60407,26 +60787,26 @@ function validate98( } } } else { - validate98.errors = [ + validate99.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema83.type, - parentSchema: schema83, + schema: schema84.type, + parentSchema: schema84, data, }, ]; return false; } } - validate98.errors = vErrors; + validate99.errors = vErrors; return errors === 0; } -exports.validateTimeSlotResponse = validate99; -const schema84 = { +exports.validateTimeSlotResponse = validate100; +const schema85 = { title: 'Time Slot', type: 'object', properties: { @@ -60438,7 +60818,7 @@ const schema84 = { 'x-location': '#/components/schemas/time_slot_response', 'x-schema-type': 'response', }; -function validate99( +function validate100( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -60453,7 +60833,7 @@ function validate99( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats22.validate(data0)) { - validate99.errors = [ + validate100.errors = [ { instancePath: instancePath + '/start', schemaPath: '#/properties/start/format', @@ -60461,22 +60841,22 @@ function validate99( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema84.properties.start, + parentSchema: schema85.properties.start, data: data0, }, ]; return false; } } else { - validate99.errors = [ + validate100.errors = [ { instancePath: instancePath + '/start', schemaPath: '#/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema84.properties.start.type, - parentSchema: schema84.properties.start, + schema: schema85.properties.start.type, + parentSchema: schema85.properties.start, data: data0, }, ]; @@ -60496,7 +60876,7 @@ function validate99( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate99.errors = [ + validate100.errors = [ { instancePath: instancePath + '/end', schemaPath: '#/properties/end/format', @@ -60504,22 +60884,22 @@ function validate99( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema84.properties.end, + parentSchema: schema85.properties.end, data: data1, }, ]; return false; } } else { - validate99.errors = [ + validate100.errors = [ { instancePath: instancePath + '/end', schemaPath: '#/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema84.properties.end.type, - parentSchema: schema84.properties.end, + schema: schema85.properties.end.type, + parentSchema: schema85.properties.end, data: data1, }, ]; @@ -60533,26 +60913,26 @@ function validate99( } } } else { - validate99.errors = [ + validate100.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema84.type, - parentSchema: schema84, + schema: schema85.type, + parentSchema: schema85, data, }, ]; return false; } } - validate99.errors = vErrors; + validate100.errors = vErrors; return errors === 0; } -exports.validateAvailabilityRequest = validate100; -const schema85 = { +exports.validateAvailabilityRequest = validate101; +const schema86 = { title: 'Availability', description: 'A list of time slots that the maintainer of the device announced it is available\n', @@ -60570,7 +60950,7 @@ const schema85 = { 'x-location': '#/components/schemas/availability_request', 'x-schema-type': 'request', }; -function validate100( +function validate101( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -60592,7 +60972,7 @@ function validate100( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate100.errors = [ + validate101.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/format', @@ -60600,22 +60980,22 @@ function validate100( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema85.items.properties.start, + parentSchema: schema86.items.properties.start, data: data1, }, ]; return false; } } else { - validate100.errors = [ + validate101.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema85.items.properties.start.type, - parentSchema: schema85.items.properties.start, + schema: schema86.items.properties.start.type, + parentSchema: schema86.items.properties.start, data: data1, }, ]; @@ -60635,7 +61015,7 @@ function validate100( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats22.validate(data2)) { - validate100.errors = [ + validate101.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/format', @@ -60643,22 +61023,22 @@ function validate100( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema85.items.properties.end, + parentSchema: schema86.items.properties.end, data: data2, }, ]; return false; } } else { - validate100.errors = [ + validate101.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema85.items.properties.end.type, - parentSchema: schema85.items.properties.end, + schema: schema86.items.properties.end.type, + parentSchema: schema86.items.properties.end, data: data2, }, ]; @@ -60672,15 +61052,15 @@ function validate100( } } } else { - validate100.errors = [ + validate101.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema85.items.type, - parentSchema: schema85.items, + schema: schema86.items.type, + parentSchema: schema86.items, data: data0, }, ]; @@ -60693,26 +61073,26 @@ function validate100( } } } else { - validate100.errors = [ + validate101.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema85.type, - parentSchema: schema85, + schema: schema86.type, + parentSchema: schema86, data, }, ]; return false; } } - validate100.errors = vErrors; + validate101.errors = vErrors; return errors === 0; } -exports.validateAvailabilityResponse = validate101; -const schema86 = { +exports.validateAvailabilityResponse = validate102; +const schema87 = { title: 'Availability', description: 'A list of time slots that the maintainer of the device announced it is available\n', @@ -60730,7 +61110,7 @@ const schema86 = { 'x-location': '#/components/schemas/availability_response', 'x-schema-type': 'response', }; -function validate101( +function validate102( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -60752,7 +61132,7 @@ function validate101( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate101.errors = [ + validate102.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/format', @@ -60760,22 +61140,22 @@ function validate101( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema86.items.properties.start, + parentSchema: schema87.items.properties.start, data: data1, }, ]; return false; } } else { - validate101.errors = [ + validate102.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema86.items.properties.start.type, - parentSchema: schema86.items.properties.start, + schema: schema87.items.properties.start.type, + parentSchema: schema87.items.properties.start, data: data1, }, ]; @@ -60795,7 +61175,7 @@ function validate101( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats22.validate(data2)) { - validate101.errors = [ + validate102.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/format', @@ -60803,22 +61183,22 @@ function validate101( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema86.items.properties.end, + parentSchema: schema87.items.properties.end, data: data2, }, ]; return false; } } else { - validate101.errors = [ + validate102.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema86.items.properties.end.type, - parentSchema: schema86.items.properties.end, + schema: schema87.items.properties.end.type, + parentSchema: schema87.items.properties.end, data: data2, }, ]; @@ -60832,15 +61212,15 @@ function validate101( } } } else { - validate101.errors = [ + validate102.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema86.items.type, - parentSchema: schema86.items, + schema: schema87.items.type, + parentSchema: schema87.items, data: data0, }, ]; @@ -60853,26 +61233,26 @@ function validate101( } } } else { - validate101.errors = [ + validate102.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema86.type, - parentSchema: schema86, + schema: schema87.type, + parentSchema: schema87, data, }, ]; return false; } } - validate101.errors = vErrors; + validate102.errors = vErrors; return errors === 0; } -exports.validateConcreteDeviceRequest = validate102; -const schema87 = { +exports.validateConcreteDeviceRequest = validate103; +const schema88 = { title: 'Concrete Device', allOf: [ { @@ -60951,7 +61331,7 @@ const schema87 = { 'x-location': '#/components/schemas/device_concrete_request', 'x-schema-type': 'request', }; -function validate102( +function validate103( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -60966,15 +61346,15 @@ function validate102( (data.name === undefined && (missing0 = 'name')) || (data.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate102.errors = [ + validate103.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema87.allOf[0].required, - parentSchema: schema87.allOf[0], + schema: schema88.allOf[0].required, + parentSchema: schema88.allOf[0], data, }, ]; @@ -60984,15 +61364,15 @@ function validate102( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema87.allOf[0].properties.name.type, - parentSchema: schema87.allOf[0].properties.name, + schema: schema88.allOf[0].properties.name.type, + parentSchema: schema88.allOf[0].properties.name, data: data0, }, ]; @@ -61007,15 +61387,15 @@ function validate102( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema87.allOf[0].properties.description.type, - parentSchema: schema87.allOf[0].properties.description, + schema: schema88.allOf[0].properties.description.type, + parentSchema: schema88.allOf[0].properties.description, data: data1, }, ]; @@ -61030,15 +61410,15 @@ function validate102( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema87.allOf[0].properties.type.type, - parentSchema: schema87.allOf[0].properties.type, + schema: schema88.allOf[0].properties.type.type, + parentSchema: schema88.allOf[0].properties.type, data: data2, }, ]; @@ -61052,15 +61432,15 @@ function validate102( data2 === 'cloud instantiable' ) ) { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema87.allOf[0].properties.type.enum }, + params: { allowedValues: schema88.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema87.allOf[0].properties.type.enum, - parentSchema: schema87.allOf[0].properties.type, + schema: schema88.allOf[0].properties.type.enum, + parentSchema: schema88.allOf[0].properties.type, data: data2, }, ]; @@ -61075,15 +61455,15 @@ function validate102( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema87.allOf[0].properties.isPublic.type, - parentSchema: schema87.allOf[0].properties.isPublic, + schema: schema88.allOf[0].properties.isPublic.type, + parentSchema: schema88.allOf[0].properties.isPublic, data: data3, }, ]; @@ -61112,7 +61492,7 @@ function validate102( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -61122,8 +61502,8 @@ function validate102( message: "must have required property '" + missing1 + "'", schema: - schema87.allOf[0].properties.viewer.items.required, - parentSchema: schema87.allOf[0].properties.viewer.items, + schema88.allOf[0].properties.viewer.items.required, + parentSchema: schema88.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -61136,7 +61516,7 @@ function validate102( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -61147,7 +61527,7 @@ function validate102( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema87.allOf[0].properties.viewer.items + schema88.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -61155,7 +61535,7 @@ function validate102( return false; } } else { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -61165,10 +61545,10 @@ function validate102( params: { type: 'string' }, message: 'must be string', schema: - schema87.allOf[0].properties.viewer.items + schema88.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema87.allOf[0].properties.viewer.items + schema88.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -61180,15 +61560,15 @@ function validate102( } } } else { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema87.allOf[0].properties.viewer.items.type, - parentSchema: schema87.allOf[0].properties.viewer.items, + schema: schema88.allOf[0].properties.viewer.items.type, + parentSchema: schema88.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -61201,15 +61581,15 @@ function validate102( } } } else { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema87.allOf[0].properties.viewer.type, - parentSchema: schema87.allOf[0].properties.viewer, + schema: schema88.allOf[0].properties.viewer.type, + parentSchema: schema88.allOf[0].properties.viewer, data: data4, }, ]; @@ -61239,7 +61619,7 @@ function validate102( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -61249,9 +61629,9 @@ function validate102( message: "must have required property '" + missing2 + "'", schema: - schema87.allOf[0].properties.owner.items.required, + schema88.allOf[0].properties.owner.items.required, parentSchema: - schema87.allOf[0].properties.owner.items, + schema88.allOf[0].properties.owner.items, data: data8, }, ]; @@ -61264,7 +61644,7 @@ function validate102( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -61276,7 +61656,7 @@ function validate102( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema87.allOf[0].properties.owner.items + schema88.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -61284,7 +61664,7 @@ function validate102( return false; } } else { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -61294,10 +61674,10 @@ function validate102( params: { type: 'string' }, message: 'must be string', schema: - schema87.allOf[0].properties.owner.items + schema88.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema87.allOf[0].properties.owner.items + schema88.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -61309,15 +61689,15 @@ function validate102( } } } else { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema87.allOf[0].properties.owner.items.type, - parentSchema: schema87.allOf[0].properties.owner.items, + schema: schema88.allOf[0].properties.owner.items.type, + parentSchema: schema88.allOf[0].properties.owner.items, data: data8, }, ]; @@ -61330,15 +61710,15 @@ function validate102( } } } else { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema87.allOf[0].properties.owner.type, - parentSchema: schema87.allOf[0].properties.owner, + schema: schema88.allOf[0].properties.owner.type, + parentSchema: schema88.allOf[0].properties.owner, data: data7, }, ]; @@ -61356,15 +61736,15 @@ function validate102( } } } else { - validate102.errors = [ + validate103.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema87.allOf[0].type, - parentSchema: schema87.allOf[0], + schema: schema88.allOf[0].type, + parentSchema: schema88.allOf[0], data, }, ]; @@ -61380,7 +61760,7 @@ function validate102( let data10 = data.type; const _errs24 = errors; if ('device' !== data10) { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -61388,7 +61768,7 @@ function validate102( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema87.allOf[1].properties.type, + parentSchema: schema88.allOf[1].properties.type, data: data10, }, ]; @@ -61406,7 +61786,7 @@ function validate102( if (errors === _errs25) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/experiment', schemaPath: '#/allOf/1/properties/experiment/format', @@ -61414,22 +61794,22 @@ function validate102( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema87.allOf[1].properties.experiment, + parentSchema: schema88.allOf[1].properties.experiment, data: data11, }, ]; return false; } } else { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/experiment', schemaPath: '#/allOf/1/properties/experiment/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema87.allOf[1].properties.experiment.type, - parentSchema: schema87.allOf[1].properties.experiment, + schema: schema88.allOf[1].properties.experiment.type, + parentSchema: schema88.allOf[1].properties.experiment, data: data11, }, ]; @@ -61461,7 +61841,7 @@ function validate102( if (errors === _errs32) { if (typeof data14 === 'string') { if (!formats0(data14)) { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -61472,7 +61852,7 @@ function validate102( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema87.allOf[1].properties.services.items + schema88.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -61480,7 +61860,7 @@ function validate102( return false; } } else { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -61490,10 +61870,10 @@ function validate102( params: { type: 'string' }, message: 'must be string', schema: - schema87.allOf[1].properties.services.items + schema88.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema87.allOf[1].properties.services.items + schema88.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -61511,7 +61891,7 @@ function validate102( let data15 = data13.serviceId; const _errs34 = errors; if (typeof data15 !== 'string') { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceId', @@ -61521,10 +61901,10 @@ function validate102( params: { type: 'string' }, message: 'must be string', schema: - schema87.allOf[1].properties.services.items.properties + schema88.allOf[1].properties.services.items.properties .serviceId.type, parentSchema: - schema87.allOf[1].properties.services.items.properties + schema88.allOf[1].properties.services.items.properties .serviceId, data: data15, }, @@ -61540,7 +61920,7 @@ function validate102( let data16 = data13.serviceDirection; const _errs36 = errors; if (typeof data16 !== 'string') { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + @@ -61553,10 +61933,10 @@ function validate102( params: { type: 'string' }, message: 'must be string', schema: - schema87.allOf[1].properties.services.items + schema88.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema87.allOf[1].properties.services.items + schema88.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -61570,7 +61950,7 @@ function validate102( data16 === 'prosumer' ) ) { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + @@ -61582,15 +61962,15 @@ function validate102( keyword: 'enum', params: { allowedValues: - schema87.allOf[1].properties.services.items + schema88.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema87.allOf[1].properties.services.items + schema88.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema87.allOf[1].properties.services.items + schema88.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -61604,15 +61984,15 @@ function validate102( } } } else { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/services/' + i2, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema87.allOf[1].properties.services.items.type, - parentSchema: schema87.allOf[1].properties.services.items, + schema: schema88.allOf[1].properties.services.items.type, + parentSchema: schema88.allOf[1].properties.services.items, data: data13, }, ]; @@ -61625,15 +62005,15 @@ function validate102( } } } else { - validate102.errors = [ + validate103.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema87.allOf[1].properties.services.type, - parentSchema: schema87.allOf[1].properties.services, + schema: schema88.allOf[1].properties.services.type, + parentSchema: schema88.allOf[1].properties.services, data: data12, }, ]; @@ -61647,15 +62027,15 @@ function validate102( } } } else { - validate102.errors = [ + validate103.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema87.allOf[1].type, - parentSchema: schema87.allOf[1], + schema: schema88.allOf[1].type, + parentSchema: schema88.allOf[1], data, }, ]; @@ -61664,11 +62044,11 @@ function validate102( } var valid0 = _errs22 === errors; } - validate102.errors = vErrors; + validate103.errors = vErrors; return errors === 0; } -exports.validateConcreteDeviceResponse = validate103; -const schema88 = { +exports.validateConcreteDeviceResponse = validate104; +const schema89 = { title: 'Concrete Device', allOf: [ { @@ -61774,7 +62154,7 @@ const schema88 = { 'x-location': '#/components/schemas/device_concrete_response', 'x-schema-type': 'response', }; -function validate103( +function validate104( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -61790,15 +62170,15 @@ function validate103( (data.name === undefined && (missing0 = 'name')) || (data.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate103.errors = [ + validate104.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema88.allOf[0].required, - parentSchema: schema88.allOf[0], + schema: schema89.allOf[0].required, + parentSchema: schema89.allOf[0], data, }, ]; @@ -61811,7 +62191,7 @@ function validate103( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -61819,22 +62199,22 @@ function validate103( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema88.allOf[0].properties.url, + parentSchema: schema89.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema88.allOf[0].properties.url.type, - parentSchema: schema88.allOf[0].properties.url, + schema: schema89.allOf[0].properties.url.type, + parentSchema: schema89.allOf[0].properties.url, data: data0, }, ]; @@ -61851,15 +62231,15 @@ function validate103( let data1 = data.name; const _errs4 = errors; if (typeof data1 !== 'string') { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema88.allOf[0].properties.name.type, - parentSchema: schema88.allOf[0].properties.name, + schema: schema89.allOf[0].properties.name.type, + parentSchema: schema89.allOf[0].properties.name, data: data1, }, ]; @@ -61874,15 +62254,15 @@ function validate103( let data2 = data.description; const _errs6 = errors; if (typeof data2 !== 'string') { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema88.allOf[0].properties.description.type, - parentSchema: schema88.allOf[0].properties.description, + schema: schema89.allOf[0].properties.description.type, + parentSchema: schema89.allOf[0].properties.description, data: data2, }, ]; @@ -61897,15 +62277,15 @@ function validate103( let data3 = data.type; const _errs8 = errors; if (typeof data3 !== 'string') { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema88.allOf[0].properties.type.type, - parentSchema: schema88.allOf[0].properties.type, + schema: schema89.allOf[0].properties.type.type, + parentSchema: schema89.allOf[0].properties.type, data: data3, }, ]; @@ -61919,15 +62299,15 @@ function validate103( data3 === 'cloud instantiable' ) ) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema88.allOf[0].properties.type.enum }, + params: { allowedValues: schema89.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema88.allOf[0].properties.type.enum, - parentSchema: schema88.allOf[0].properties.type, + schema: schema89.allOf[0].properties.type.enum, + parentSchema: schema89.allOf[0].properties.type, data: data3, }, ]; @@ -61942,15 +62322,15 @@ function validate103( let data4 = data.isPublic; const _errs10 = errors; if (typeof data4 !== 'boolean') { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema88.allOf[0].properties.isPublic.type, - parentSchema: schema88.allOf[0].properties.isPublic, + schema: schema89.allOf[0].properties.isPublic.type, + parentSchema: schema89.allOf[0].properties.isPublic, data: data4, }, ]; @@ -61979,7 +62359,7 @@ function validate103( ) { let missing1; if (data6.url === undefined && (missing1 = 'url')) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -61989,9 +62369,9 @@ function validate103( message: "must have required property '" + missing1 + "'", schema: - schema88.allOf[0].properties.viewer.items.required, + schema89.allOf[0].properties.viewer.items.required, parentSchema: - schema88.allOf[0].properties.viewer.items, + schema89.allOf[0].properties.viewer.items, data: data6, }, ]; @@ -62004,7 +62384,7 @@ function validate103( if (errors === _errs16) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -62016,7 +62396,7 @@ function validate103( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema88.allOf[0].properties.viewer.items + schema89.allOf[0].properties.viewer.items .properties.url, data: data7, }, @@ -62024,7 +62404,7 @@ function validate103( return false; } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -62034,10 +62414,10 @@ function validate103( params: { type: 'string' }, message: 'must be string', schema: - schema88.allOf[0].properties.viewer.items + schema89.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema88.allOf[0].properties.viewer.items + schema89.allOf[0].properties.viewer.items .properties.url, data: data7, }, @@ -62049,15 +62429,15 @@ function validate103( } } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema88.allOf[0].properties.viewer.items.type, - parentSchema: schema88.allOf[0].properties.viewer.items, + schema: schema89.allOf[0].properties.viewer.items.type, + parentSchema: schema89.allOf[0].properties.viewer.items, data: data6, }, ]; @@ -62070,15 +62450,15 @@ function validate103( } } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema88.allOf[0].properties.viewer.type, - parentSchema: schema88.allOf[0].properties.viewer, + schema: schema89.allOf[0].properties.viewer.type, + parentSchema: schema89.allOf[0].properties.viewer, data: data5, }, ]; @@ -62108,7 +62488,7 @@ function validate103( ) { let missing2; if (data9.url === undefined && (missing2 = 'url')) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -62118,9 +62498,9 @@ function validate103( message: "must have required property '" + missing2 + "'", schema: - schema88.allOf[0].properties.owner.items.required, + schema89.allOf[0].properties.owner.items.required, parentSchema: - schema88.allOf[0].properties.owner.items, + schema89.allOf[0].properties.owner.items, data: data9, }, ]; @@ -62133,7 +62513,7 @@ function validate103( if (errors === _errs22) { if (typeof data10 === 'string') { if (!formats0(data10)) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -62145,7 +62525,7 @@ function validate103( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema88.allOf[0].properties.owner.items + schema89.allOf[0].properties.owner.items .properties.url, data: data10, }, @@ -62153,7 +62533,7 @@ function validate103( return false; } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -62163,10 +62543,10 @@ function validate103( params: { type: 'string' }, message: 'must be string', schema: - schema88.allOf[0].properties.owner.items + schema89.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema88.allOf[0].properties.owner.items + schema89.allOf[0].properties.owner.items .properties.url, data: data10, }, @@ -62178,16 +62558,16 @@ function validate103( } } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema88.allOf[0].properties.owner.items.type, + schema: schema89.allOf[0].properties.owner.items.type, parentSchema: - schema88.allOf[0].properties.owner.items, + schema89.allOf[0].properties.owner.items, data: data9, }, ]; @@ -62200,15 +62580,15 @@ function validate103( } } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema88.allOf[0].properties.owner.type, - parentSchema: schema88.allOf[0].properties.owner, + schema: schema89.allOf[0].properties.owner.type, + parentSchema: schema89.allOf[0].properties.owner, data: data8, }, ]; @@ -62227,15 +62607,15 @@ function validate103( } } } else { - validate103.errors = [ + validate104.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema88.allOf[0].type, - parentSchema: schema88.allOf[0], + schema: schema89.allOf[0].type, + parentSchema: schema89.allOf[0], data, }, ]; @@ -62251,7 +62631,7 @@ function validate103( let data11 = data.type; const _errs26 = errors; if ('device' !== data11) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -62259,7 +62639,7 @@ function validate103( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema88.allOf[1].properties.type, + parentSchema: schema89.allOf[1].properties.type, data: data11, }, ]; @@ -62274,15 +62654,15 @@ function validate103( let data12 = data.connected; const _errs27 = errors; if (typeof data12 !== 'boolean') { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/connected', schemaPath: '#/allOf/1/properties/connected/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema88.allOf[1].properties.connected.type, - parentSchema: schema88.allOf[1].properties.connected, + schema: schema89.allOf[1].properties.connected.type, + parentSchema: schema89.allOf[1].properties.connected, data: data12, }, ]; @@ -62312,7 +62692,7 @@ function validate103( if (errors === _errs33) { if (typeof data15 === 'string') { if (!formats22.validate(data15)) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + @@ -62326,7 +62706,7 @@ function validate103( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema88.allOf[1].properties.announcedAvailability + schema89.allOf[1].properties.announcedAvailability .items.properties.start, data: data15, }, @@ -62334,7 +62714,7 @@ function validate103( return false; } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + @@ -62347,10 +62727,10 @@ function validate103( params: { type: 'string' }, message: 'must be string', schema: - schema88.allOf[1].properties.announcedAvailability + schema89.allOf[1].properties.announcedAvailability .items.properties.start.type, parentSchema: - schema88.allOf[1].properties.announcedAvailability + schema89.allOf[1].properties.announcedAvailability .items.properties.start, data: data15, }, @@ -62371,7 +62751,7 @@ function validate103( if (errors === _errs35) { if (typeof data16 === 'string') { if (!formats22.validate(data16)) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + @@ -62386,7 +62766,7 @@ function validate103( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema88.allOf[1].properties + schema89.allOf[1].properties .announcedAvailability.items.properties.end, data: data16, }, @@ -62394,7 +62774,7 @@ function validate103( return false; } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + @@ -62407,10 +62787,10 @@ function validate103( params: { type: 'string' }, message: 'must be string', schema: - schema88.allOf[1].properties.announcedAvailability + schema89.allOf[1].properties.announcedAvailability .items.properties.end.type, parentSchema: - schema88.allOf[1].properties.announcedAvailability + schema89.allOf[1].properties.announcedAvailability .items.properties.end, data: data16, }, @@ -62425,7 +62805,7 @@ function validate103( } } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/announcedAvailability/' + i2, schemaPath: @@ -62434,10 +62814,10 @@ function validate103( params: { type: 'object' }, message: 'must be object', schema: - schema88.allOf[1].properties.announcedAvailability.items + schema89.allOf[1].properties.announcedAvailability.items .type, parentSchema: - schema88.allOf[1].properties.announcedAvailability.items, + schema89.allOf[1].properties.announcedAvailability.items, data: data14, }, ]; @@ -62450,15 +62830,15 @@ function validate103( } } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/announcedAvailability', schemaPath: '#/allOf/1/properties/announcedAvailability/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema88.allOf[1].properties.announcedAvailability.type, - parentSchema: schema88.allOf[1].properties.announcedAvailability, + schema: schema89.allOf[1].properties.announcedAvailability.type, + parentSchema: schema89.allOf[1].properties.announcedAvailability, data: data13, }, ]; @@ -62477,7 +62857,7 @@ function validate103( if (errors === _errs37) { if (typeof data17 === 'string') { if (!formats0(data17)) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/experiment', schemaPath: '#/allOf/1/properties/experiment/format', @@ -62485,22 +62865,22 @@ function validate103( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema88.allOf[1].properties.experiment, + parentSchema: schema89.allOf[1].properties.experiment, data: data17, }, ]; return false; } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/experiment', schemaPath: '#/allOf/1/properties/experiment/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema88.allOf[1].properties.experiment.type, - parentSchema: schema88.allOf[1].properties.experiment, + schema: schema89.allOf[1].properties.experiment.type, + parentSchema: schema89.allOf[1].properties.experiment, data: data17, }, ]; @@ -62536,7 +62916,7 @@ function validate103( if (errors === _errs44) { if (typeof data20 === 'string') { if (!formats0(data20)) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + @@ -62550,7 +62930,7 @@ function validate103( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema88.allOf[1].properties.services.items + schema89.allOf[1].properties.services.items .properties.serviceType, data: data20, }, @@ -62558,7 +62938,7 @@ function validate103( return false; } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + @@ -62571,10 +62951,10 @@ function validate103( params: { type: 'string' }, message: 'must be string', schema: - schema88.allOf[1].properties.services.items + schema89.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema88.allOf[1].properties.services.items + schema89.allOf[1].properties.services.items .properties.serviceType, data: data20, }, @@ -62592,7 +62972,7 @@ function validate103( let data21 = data19.serviceId; const _errs46 = errors; if (typeof data21 !== 'string') { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/services/' + i3 + '/serviceId', @@ -62602,10 +62982,10 @@ function validate103( params: { type: 'string' }, message: 'must be string', schema: - schema88.allOf[1].properties.services.items + schema89.allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema88.allOf[1].properties.services.items + schema89.allOf[1].properties.services.items .properties.serviceId, data: data21, }, @@ -62621,7 +63001,7 @@ function validate103( let data22 = data19.serviceDirection; const _errs48 = errors; if (typeof data22 !== 'string') { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + @@ -62634,10 +63014,10 @@ function validate103( params: { type: 'string' }, message: 'must be string', schema: - schema88.allOf[1].properties.services.items + schema89.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema88.allOf[1].properties.services.items + schema89.allOf[1].properties.services.items .properties.serviceDirection, data: data22, }, @@ -62651,7 +63031,7 @@ function validate103( data22 === 'prosumer' ) ) { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + @@ -62663,16 +63043,16 @@ function validate103( keyword: 'enum', params: { allowedValues: - schema88.allOf[1].properties.services.items + schema89.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema88.allOf[1].properties.services.items + schema89.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema88.allOf[1].properties.services.items + schema89.allOf[1].properties.services.items .properties.serviceDirection, data: data22, }, @@ -62686,15 +63066,15 @@ function validate103( } } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/services/' + i3, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema88.allOf[1].properties.services.items.type, - parentSchema: schema88.allOf[1].properties.services.items, + schema: schema89.allOf[1].properties.services.items.type, + parentSchema: schema89.allOf[1].properties.services.items, data: data19, }, ]; @@ -62707,15 +63087,15 @@ function validate103( } } } else { - validate103.errors = [ + validate104.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema88.allOf[1].properties.services.type, - parentSchema: schema88.allOf[1].properties.services, + schema: schema89.allOf[1].properties.services.type, + parentSchema: schema89.allOf[1].properties.services, data: data18, }, ]; @@ -62731,15 +63111,15 @@ function validate103( } } } else { - validate103.errors = [ + validate104.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema88.allOf[1].type, - parentSchema: schema88.allOf[1], + schema: schema89.allOf[1].type, + parentSchema: schema89.allOf[1], data, }, ]; @@ -62748,11 +63128,11 @@ function validate103( } var valid0 = _errs24 === errors; } - validate103.errors = vErrors; + validate104.errors = vErrors; return errors === 0; } -exports.validateInstantiableBrowserDeviceRequest = validate104; -const schema89 = { +exports.validateInstantiableBrowserDeviceRequest = validate105; +const schema90 = { title: 'Instantiable Browser Device', allOf: [ { @@ -62831,7 +63211,7 @@ const schema89 = { 'x-location': '#/components/schemas/device_edge_instantiable_request', 'x-schema-type': 'request', }; -function validate104( +function validate105( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -62846,15 +63226,15 @@ function validate104( (data.name === undefined && (missing0 = 'name')) || (data.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate104.errors = [ + validate105.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema89.allOf[0].required, - parentSchema: schema89.allOf[0], + schema: schema90.allOf[0].required, + parentSchema: schema90.allOf[0], data, }, ]; @@ -62864,15 +63244,15 @@ function validate104( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema89.allOf[0].properties.name.type, - parentSchema: schema89.allOf[0].properties.name, + schema: schema90.allOf[0].properties.name.type, + parentSchema: schema90.allOf[0].properties.name, data: data0, }, ]; @@ -62887,15 +63267,15 @@ function validate104( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema89.allOf[0].properties.description.type, - parentSchema: schema89.allOf[0].properties.description, + schema: schema90.allOf[0].properties.description.type, + parentSchema: schema90.allOf[0].properties.description, data: data1, }, ]; @@ -62910,15 +63290,15 @@ function validate104( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema89.allOf[0].properties.type.type, - parentSchema: schema89.allOf[0].properties.type, + schema: schema90.allOf[0].properties.type.type, + parentSchema: schema90.allOf[0].properties.type, data: data2, }, ]; @@ -62932,15 +63312,15 @@ function validate104( data2 === 'cloud instantiable' ) ) { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema89.allOf[0].properties.type.enum }, + params: { allowedValues: schema90.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema89.allOf[0].properties.type.enum, - parentSchema: schema89.allOf[0].properties.type, + schema: schema90.allOf[0].properties.type.enum, + parentSchema: schema90.allOf[0].properties.type, data: data2, }, ]; @@ -62955,15 +63335,15 @@ function validate104( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema89.allOf[0].properties.isPublic.type, - parentSchema: schema89.allOf[0].properties.isPublic, + schema: schema90.allOf[0].properties.isPublic.type, + parentSchema: schema90.allOf[0].properties.isPublic, data: data3, }, ]; @@ -62992,7 +63372,7 @@ function validate104( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -63002,8 +63382,8 @@ function validate104( message: "must have required property '" + missing1 + "'", schema: - schema89.allOf[0].properties.viewer.items.required, - parentSchema: schema89.allOf[0].properties.viewer.items, + schema90.allOf[0].properties.viewer.items.required, + parentSchema: schema90.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -63016,7 +63396,7 @@ function validate104( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -63027,7 +63407,7 @@ function validate104( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema89.allOf[0].properties.viewer.items + schema90.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -63035,7 +63415,7 @@ function validate104( return false; } } else { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -63045,10 +63425,10 @@ function validate104( params: { type: 'string' }, message: 'must be string', schema: - schema89.allOf[0].properties.viewer.items + schema90.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema89.allOf[0].properties.viewer.items + schema90.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -63060,15 +63440,15 @@ function validate104( } } } else { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema89.allOf[0].properties.viewer.items.type, - parentSchema: schema89.allOf[0].properties.viewer.items, + schema: schema90.allOf[0].properties.viewer.items.type, + parentSchema: schema90.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -63081,15 +63461,15 @@ function validate104( } } } else { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema89.allOf[0].properties.viewer.type, - parentSchema: schema89.allOf[0].properties.viewer, + schema: schema90.allOf[0].properties.viewer.type, + parentSchema: schema90.allOf[0].properties.viewer, data: data4, }, ]; @@ -63119,7 +63499,7 @@ function validate104( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -63129,9 +63509,9 @@ function validate104( message: "must have required property '" + missing2 + "'", schema: - schema89.allOf[0].properties.owner.items.required, + schema90.allOf[0].properties.owner.items.required, parentSchema: - schema89.allOf[0].properties.owner.items, + schema90.allOf[0].properties.owner.items, data: data8, }, ]; @@ -63144,7 +63524,7 @@ function validate104( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -63156,7 +63536,7 @@ function validate104( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema89.allOf[0].properties.owner.items + schema90.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -63164,7 +63544,7 @@ function validate104( return false; } } else { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -63174,10 +63554,10 @@ function validate104( params: { type: 'string' }, message: 'must be string', schema: - schema89.allOf[0].properties.owner.items + schema90.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema89.allOf[0].properties.owner.items + schema90.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -63189,15 +63569,15 @@ function validate104( } } } else { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema89.allOf[0].properties.owner.items.type, - parentSchema: schema89.allOf[0].properties.owner.items, + schema: schema90.allOf[0].properties.owner.items.type, + parentSchema: schema90.allOf[0].properties.owner.items, data: data8, }, ]; @@ -63210,15 +63590,15 @@ function validate104( } } } else { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema89.allOf[0].properties.owner.type, - parentSchema: schema89.allOf[0].properties.owner, + schema: schema90.allOf[0].properties.owner.type, + parentSchema: schema90.allOf[0].properties.owner, data: data7, }, ]; @@ -63236,15 +63616,15 @@ function validate104( } } } else { - validate104.errors = [ + validate105.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema89.allOf[0].type, - parentSchema: schema89.allOf[0], + schema: schema90.allOf[0].type, + parentSchema: schema90.allOf[0], data, }, ]; @@ -63260,7 +63640,7 @@ function validate104( let data10 = data.type; const _errs24 = errors; if ('edge instantiable' !== data10) { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -63268,7 +63648,7 @@ function validate104( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema89.allOf[1].properties.type, + parentSchema: schema90.allOf[1].properties.type, data: data10, }, ]; @@ -63286,7 +63666,7 @@ function validate104( if (errors === _errs25) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/codeUrl', schemaPath: '#/allOf/1/properties/codeUrl/format', @@ -63294,22 +63674,22 @@ function validate104( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema89.allOf[1].properties.codeUrl, + parentSchema: schema90.allOf[1].properties.codeUrl, data: data11, }, ]; return false; } } else { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/codeUrl', schemaPath: '#/allOf/1/properties/codeUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema89.allOf[1].properties.codeUrl.type, - parentSchema: schema89.allOf[1].properties.codeUrl, + schema: schema90.allOf[1].properties.codeUrl.type, + parentSchema: schema90.allOf[1].properties.codeUrl, data: data11, }, ]; @@ -63341,7 +63721,7 @@ function validate104( if (errors === _errs32) { if (typeof data14 === 'string') { if (!formats0(data14)) { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -63352,7 +63732,7 @@ function validate104( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema89.allOf[1].properties.services.items + schema90.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -63360,7 +63740,7 @@ function validate104( return false; } } else { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -63370,10 +63750,10 @@ function validate104( params: { type: 'string' }, message: 'must be string', schema: - schema89.allOf[1].properties.services.items + schema90.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema89.allOf[1].properties.services.items + schema90.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -63391,7 +63771,7 @@ function validate104( let data15 = data13.serviceId; const _errs34 = errors; if (typeof data15 !== 'string') { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceId', @@ -63401,10 +63781,10 @@ function validate104( params: { type: 'string' }, message: 'must be string', schema: - schema89.allOf[1].properties.services.items.properties + schema90.allOf[1].properties.services.items.properties .serviceId.type, parentSchema: - schema89.allOf[1].properties.services.items.properties + schema90.allOf[1].properties.services.items.properties .serviceId, data: data15, }, @@ -63420,7 +63800,7 @@ function validate104( let data16 = data13.serviceDirection; const _errs36 = errors; if (typeof data16 !== 'string') { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + @@ -63433,10 +63813,10 @@ function validate104( params: { type: 'string' }, message: 'must be string', schema: - schema89.allOf[1].properties.services.items + schema90.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema89.allOf[1].properties.services.items + schema90.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -63450,7 +63830,7 @@ function validate104( data16 === 'prosumer' ) ) { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + @@ -63462,15 +63842,15 @@ function validate104( keyword: 'enum', params: { allowedValues: - schema89.allOf[1].properties.services.items + schema90.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema89.allOf[1].properties.services.items + schema90.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema89.allOf[1].properties.services.items + schema90.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -63484,15 +63864,15 @@ function validate104( } } } else { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/services/' + i2, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema89.allOf[1].properties.services.items.type, - parentSchema: schema89.allOf[1].properties.services.items, + schema: schema90.allOf[1].properties.services.items.type, + parentSchema: schema90.allOf[1].properties.services.items, data: data13, }, ]; @@ -63505,15 +63885,15 @@ function validate104( } } } else { - validate104.errors = [ + validate105.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema89.allOf[1].properties.services.type, - parentSchema: schema89.allOf[1].properties.services, + schema: schema90.allOf[1].properties.services.type, + parentSchema: schema90.allOf[1].properties.services, data: data12, }, ]; @@ -63527,15 +63907,15 @@ function validate104( } } } else { - validate104.errors = [ + validate105.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema89.allOf[1].type, - parentSchema: schema89.allOf[1], + schema: schema90.allOf[1].type, + parentSchema: schema90.allOf[1], data, }, ]; @@ -63544,11 +63924,11 @@ function validate104( } var valid0 = _errs22 === errors; } - validate104.errors = vErrors; + validate105.errors = vErrors; return errors === 0; } -exports.validateInstantiableBrowserDeviceResponse = validate105; -const schema90 = { +exports.validateInstantiableBrowserDeviceResponse = validate106; +const schema91 = { title: 'Instantiable Browser Device', allOf: [ { @@ -63633,7 +64013,7 @@ const schema90 = { 'x-location': '#/components/schemas/device_edge_instantiable_response', 'x-schema-type': 'response', }; -function validate105( +function validate106( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -63649,15 +64029,15 @@ function validate105( (data.name === undefined && (missing0 = 'name')) || (data.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate105.errors = [ + validate106.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema90.allOf[0].required, - parentSchema: schema90.allOf[0], + schema: schema91.allOf[0].required, + parentSchema: schema91.allOf[0], data, }, ]; @@ -63670,7 +64050,7 @@ function validate105( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -63678,22 +64058,22 @@ function validate105( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema90.allOf[0].properties.url, + parentSchema: schema91.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema90.allOf[0].properties.url.type, - parentSchema: schema90.allOf[0].properties.url, + schema: schema91.allOf[0].properties.url.type, + parentSchema: schema91.allOf[0].properties.url, data: data0, }, ]; @@ -63710,15 +64090,15 @@ function validate105( let data1 = data.name; const _errs4 = errors; if (typeof data1 !== 'string') { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema90.allOf[0].properties.name.type, - parentSchema: schema90.allOf[0].properties.name, + schema: schema91.allOf[0].properties.name.type, + parentSchema: schema91.allOf[0].properties.name, data: data1, }, ]; @@ -63733,15 +64113,15 @@ function validate105( let data2 = data.description; const _errs6 = errors; if (typeof data2 !== 'string') { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema90.allOf[0].properties.description.type, - parentSchema: schema90.allOf[0].properties.description, + schema: schema91.allOf[0].properties.description.type, + parentSchema: schema91.allOf[0].properties.description, data: data2, }, ]; @@ -63756,15 +64136,15 @@ function validate105( let data3 = data.type; const _errs8 = errors; if (typeof data3 !== 'string') { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema90.allOf[0].properties.type.type, - parentSchema: schema90.allOf[0].properties.type, + schema: schema91.allOf[0].properties.type.type, + parentSchema: schema91.allOf[0].properties.type, data: data3, }, ]; @@ -63778,15 +64158,15 @@ function validate105( data3 === 'cloud instantiable' ) ) { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema90.allOf[0].properties.type.enum }, + params: { allowedValues: schema91.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema90.allOf[0].properties.type.enum, - parentSchema: schema90.allOf[0].properties.type, + schema: schema91.allOf[0].properties.type.enum, + parentSchema: schema91.allOf[0].properties.type, data: data3, }, ]; @@ -63801,15 +64181,15 @@ function validate105( let data4 = data.isPublic; const _errs10 = errors; if (typeof data4 !== 'boolean') { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema90.allOf[0].properties.isPublic.type, - parentSchema: schema90.allOf[0].properties.isPublic, + schema: schema91.allOf[0].properties.isPublic.type, + parentSchema: schema91.allOf[0].properties.isPublic, data: data4, }, ]; @@ -63838,7 +64218,7 @@ function validate105( ) { let missing1; if (data6.url === undefined && (missing1 = 'url')) { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -63848,9 +64228,9 @@ function validate105( message: "must have required property '" + missing1 + "'", schema: - schema90.allOf[0].properties.viewer.items.required, + schema91.allOf[0].properties.viewer.items.required, parentSchema: - schema90.allOf[0].properties.viewer.items, + schema91.allOf[0].properties.viewer.items, data: data6, }, ]; @@ -63863,7 +64243,7 @@ function validate105( if (errors === _errs16) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -63875,7 +64255,7 @@ function validate105( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema90.allOf[0].properties.viewer.items + schema91.allOf[0].properties.viewer.items .properties.url, data: data7, }, @@ -63883,7 +64263,7 @@ function validate105( return false; } } else { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -63893,10 +64273,10 @@ function validate105( params: { type: 'string' }, message: 'must be string', schema: - schema90.allOf[0].properties.viewer.items + schema91.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema90.allOf[0].properties.viewer.items + schema91.allOf[0].properties.viewer.items .properties.url, data: data7, }, @@ -63908,15 +64288,15 @@ function validate105( } } } else { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema90.allOf[0].properties.viewer.items.type, - parentSchema: schema90.allOf[0].properties.viewer.items, + schema: schema91.allOf[0].properties.viewer.items.type, + parentSchema: schema91.allOf[0].properties.viewer.items, data: data6, }, ]; @@ -63929,15 +64309,15 @@ function validate105( } } } else { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema90.allOf[0].properties.viewer.type, - parentSchema: schema90.allOf[0].properties.viewer, + schema: schema91.allOf[0].properties.viewer.type, + parentSchema: schema91.allOf[0].properties.viewer, data: data5, }, ]; @@ -63967,7 +64347,7 @@ function validate105( ) { let missing2; if (data9.url === undefined && (missing2 = 'url')) { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -63977,9 +64357,9 @@ function validate105( message: "must have required property '" + missing2 + "'", schema: - schema90.allOf[0].properties.owner.items.required, + schema91.allOf[0].properties.owner.items.required, parentSchema: - schema90.allOf[0].properties.owner.items, + schema91.allOf[0].properties.owner.items, data: data9, }, ]; @@ -63992,7 +64372,7 @@ function validate105( if (errors === _errs22) { if (typeof data10 === 'string') { if (!formats0(data10)) { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -64004,7 +64384,7 @@ function validate105( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema90.allOf[0].properties.owner.items + schema91.allOf[0].properties.owner.items .properties.url, data: data10, }, @@ -64012,7 +64392,7 @@ function validate105( return false; } } else { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -64022,10 +64402,10 @@ function validate105( params: { type: 'string' }, message: 'must be string', schema: - schema90.allOf[0].properties.owner.items + schema91.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema90.allOf[0].properties.owner.items + schema91.allOf[0].properties.owner.items .properties.url, data: data10, }, @@ -64037,16 +64417,16 @@ function validate105( } } } else { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema90.allOf[0].properties.owner.items.type, + schema: schema91.allOf[0].properties.owner.items.type, parentSchema: - schema90.allOf[0].properties.owner.items, + schema91.allOf[0].properties.owner.items, data: data9, }, ]; @@ -64059,15 +64439,15 @@ function validate105( } } } else { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema90.allOf[0].properties.owner.type, - parentSchema: schema90.allOf[0].properties.owner, + schema: schema91.allOf[0].properties.owner.type, + parentSchema: schema91.allOf[0].properties.owner, data: data8, }, ]; @@ -64086,15 +64466,15 @@ function validate105( } } } else { - validate105.errors = [ + validate106.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema90.allOf[0].type, - parentSchema: schema90.allOf[0], + schema: schema91.allOf[0].type, + parentSchema: schema91.allOf[0], data, }, ]; @@ -64110,7 +64490,7 @@ function validate105( let data11 = data.type; const _errs26 = errors; if ('edge instantiable' !== data11) { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -64118,7 +64498,7 @@ function validate105( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema90.allOf[1].properties.type, + parentSchema: schema91.allOf[1].properties.type, data: data11, }, ]; @@ -64136,7 +64516,7 @@ function validate105( if (errors === _errs27) { if (typeof data12 === 'string') { if (!formats0(data12)) { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/codeUrl', schemaPath: '#/allOf/1/properties/codeUrl/format', @@ -64144,22 +64524,22 @@ function validate105( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema90.allOf[1].properties.codeUrl, + parentSchema: schema91.allOf[1].properties.codeUrl, data: data12, }, ]; return false; } } else { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/codeUrl', schemaPath: '#/allOf/1/properties/codeUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema90.allOf[1].properties.codeUrl.type, - parentSchema: schema90.allOf[1].properties.codeUrl, + schema: schema91.allOf[1].properties.codeUrl.type, + parentSchema: schema91.allOf[1].properties.codeUrl, data: data12, }, ]; @@ -64191,7 +64571,7 @@ function validate105( if (errors === _errs34) { if (typeof data15 === 'string') { if (!formats0(data15)) { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -64202,7 +64582,7 @@ function validate105( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema90.allOf[1].properties.services.items + schema91.allOf[1].properties.services.items .properties.serviceType, data: data15, }, @@ -64210,7 +64590,7 @@ function validate105( return false; } } else { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -64220,10 +64600,10 @@ function validate105( params: { type: 'string' }, message: 'must be string', schema: - schema90.allOf[1].properties.services.items + schema91.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema90.allOf[1].properties.services.items + schema91.allOf[1].properties.services.items .properties.serviceType, data: data15, }, @@ -64241,7 +64621,7 @@ function validate105( let data16 = data14.serviceId; const _errs36 = errors; if (typeof data16 !== 'string') { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceId', @@ -64251,10 +64631,10 @@ function validate105( params: { type: 'string' }, message: 'must be string', schema: - schema90.allOf[1].properties.services.items.properties + schema91.allOf[1].properties.services.items.properties .serviceId.type, parentSchema: - schema90.allOf[1].properties.services.items.properties + schema91.allOf[1].properties.services.items.properties .serviceId, data: data16, }, @@ -64270,7 +64650,7 @@ function validate105( let data17 = data14.serviceDirection; const _errs38 = errors; if (typeof data17 !== 'string') { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + @@ -64283,10 +64663,10 @@ function validate105( params: { type: 'string' }, message: 'must be string', schema: - schema90.allOf[1].properties.services.items + schema91.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema90.allOf[1].properties.services.items + schema91.allOf[1].properties.services.items .properties.serviceDirection, data: data17, }, @@ -64300,7 +64680,7 @@ function validate105( data17 === 'prosumer' ) ) { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + @@ -64312,15 +64692,15 @@ function validate105( keyword: 'enum', params: { allowedValues: - schema90.allOf[1].properties.services.items + schema91.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema90.allOf[1].properties.services.items + schema91.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema90.allOf[1].properties.services.items + schema91.allOf[1].properties.services.items .properties.serviceDirection, data: data17, }, @@ -64334,15 +64714,15 @@ function validate105( } } } else { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/services/' + i2, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema90.allOf[1].properties.services.items.type, - parentSchema: schema90.allOf[1].properties.services.items, + schema: schema91.allOf[1].properties.services.items.type, + parentSchema: schema91.allOf[1].properties.services.items, data: data14, }, ]; @@ -64355,15 +64735,15 @@ function validate105( } } } else { - validate105.errors = [ + validate106.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema90.allOf[1].properties.services.type, - parentSchema: schema90.allOf[1].properties.services, + schema: schema91.allOf[1].properties.services.type, + parentSchema: schema91.allOf[1].properties.services, data: data13, }, ]; @@ -64377,15 +64757,15 @@ function validate105( } } } else { - validate105.errors = [ + validate106.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema90.allOf[1].type, - parentSchema: schema90.allOf[1], + schema: schema91.allOf[1].type, + parentSchema: schema91.allOf[1], data, }, ]; @@ -64394,11 +64774,11 @@ function validate105( } var valid0 = _errs24 === errors; } - validate105.errors = vErrors; + validate106.errors = vErrors; return errors === 0; } -exports.validateDeviceReferenceRequest = validate106; -const schema91 = { +exports.validateDeviceReferenceRequest = validate107; +const schema92 = { title: 'Device Reference', type: 'object', properties: { @@ -64410,7 +64790,7 @@ const schema91 = { 'x-location': '#/components/schemas/device_reference_request', 'x-schema-type': 'request', }; -function validate106( +function validate107( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -64420,15 +64800,15 @@ function validate106( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.url === undefined && (missing0 = 'url')) { - validate106.errors = [ + validate107.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema91.required, - parentSchema: schema91, + schema: schema92.required, + parentSchema: schema92, data, }, ]; @@ -64441,7 +64821,7 @@ function validate106( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate106.errors = [ + validate107.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/format', @@ -64449,22 +64829,22 @@ function validate106( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema91.properties.url, + parentSchema: schema92.properties.url, data: data0, }, ]; return false; } } else { - validate106.errors = [ + validate107.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema91.properties.url.type, - parentSchema: schema91.properties.url, + schema: schema92.properties.url.type, + parentSchema: schema92.properties.url, data: data0, }, ]; @@ -64475,26 +64855,26 @@ function validate106( } } } else { - validate106.errors = [ + validate107.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema91.type, - parentSchema: schema91, + schema: schema92.type, + parentSchema: schema92, data, }, ]; return false; } } - validate106.errors = vErrors; + validate107.errors = vErrors; return errors === 0; } -exports.validateDeviceReferenceResponse = validate107; -const schema92 = { +exports.validateDeviceReferenceResponse = validate108; +const schema93 = { title: 'Device Reference', type: 'object', properties: { @@ -64506,7 +64886,7 @@ const schema92 = { 'x-location': '#/components/schemas/device_reference_response', 'x-schema-type': 'response', }; -function validate107( +function validate108( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -64516,15 +64896,15 @@ function validate107( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.url === undefined && (missing0 = 'url')) { - validate107.errors = [ + validate108.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema92.required, - parentSchema: schema92, + schema: schema93.required, + parentSchema: schema93, data, }, ]; @@ -64537,7 +64917,7 @@ function validate107( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate107.errors = [ + validate108.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/format', @@ -64545,22 +64925,22 @@ function validate107( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema92.properties.url, + parentSchema: schema93.properties.url, data: data0, }, ]; return false; } } else { - validate107.errors = [ + validate108.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema92.properties.url.type, - parentSchema: schema92.properties.url, + schema: schema93.properties.url.type, + parentSchema: schema93.properties.url, data: data0, }, ]; @@ -64571,26 +64951,26 @@ function validate107( } } } else { - validate107.errors = [ + validate108.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema92.type, - parentSchema: schema92, + schema: schema93.type, + parentSchema: schema93, data, }, ]; return false; } } - validate107.errors = vErrors; + validate108.errors = vErrors; return errors === 0; } -exports.validateDeviceGroupRequest = validate108; -const schema93 = { +exports.validateDeviceGroupRequest = validate109; +const schema94 = { title: 'Device Group', allOf: [ { @@ -64664,7 +65044,7 @@ const schema93 = { 'x-location': '#/components/schemas/device_group_request', 'x-schema-type': 'request', }; -function validate108( +function validate109( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -64679,15 +65059,15 @@ function validate108( (data.name === undefined && (missing0 = 'name')) || (data.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate108.errors = [ + validate109.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema93.allOf[0].required, - parentSchema: schema93.allOf[0], + schema: schema94.allOf[0].required, + parentSchema: schema94.allOf[0], data, }, ]; @@ -64697,15 +65077,15 @@ function validate108( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema93.allOf[0].properties.name.type, - parentSchema: schema93.allOf[0].properties.name, + schema: schema94.allOf[0].properties.name.type, + parentSchema: schema94.allOf[0].properties.name, data: data0, }, ]; @@ -64720,15 +65100,15 @@ function validate108( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema93.allOf[0].properties.description.type, - parentSchema: schema93.allOf[0].properties.description, + schema: schema94.allOf[0].properties.description.type, + parentSchema: schema94.allOf[0].properties.description, data: data1, }, ]; @@ -64743,15 +65123,15 @@ function validate108( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema93.allOf[0].properties.type.type, - parentSchema: schema93.allOf[0].properties.type, + schema: schema94.allOf[0].properties.type.type, + parentSchema: schema94.allOf[0].properties.type, data: data2, }, ]; @@ -64765,15 +65145,15 @@ function validate108( data2 === 'cloud instantiable' ) ) { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema93.allOf[0].properties.type.enum }, + params: { allowedValues: schema94.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema93.allOf[0].properties.type.enum, - parentSchema: schema93.allOf[0].properties.type, + schema: schema94.allOf[0].properties.type.enum, + parentSchema: schema94.allOf[0].properties.type, data: data2, }, ]; @@ -64788,15 +65168,15 @@ function validate108( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema93.allOf[0].properties.isPublic.type, - parentSchema: schema93.allOf[0].properties.isPublic, + schema: schema94.allOf[0].properties.isPublic.type, + parentSchema: schema94.allOf[0].properties.isPublic, data: data3, }, ]; @@ -64825,7 +65205,7 @@ function validate108( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -64835,8 +65215,8 @@ function validate108( message: "must have required property '" + missing1 + "'", schema: - schema93.allOf[0].properties.viewer.items.required, - parentSchema: schema93.allOf[0].properties.viewer.items, + schema94.allOf[0].properties.viewer.items.required, + parentSchema: schema94.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -64849,7 +65229,7 @@ function validate108( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -64860,7 +65240,7 @@ function validate108( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema93.allOf[0].properties.viewer.items + schema94.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -64868,7 +65248,7 @@ function validate108( return false; } } else { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -64878,10 +65258,10 @@ function validate108( params: { type: 'string' }, message: 'must be string', schema: - schema93.allOf[0].properties.viewer.items + schema94.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema93.allOf[0].properties.viewer.items + schema94.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -64893,15 +65273,15 @@ function validate108( } } } else { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema93.allOf[0].properties.viewer.items.type, - parentSchema: schema93.allOf[0].properties.viewer.items, + schema: schema94.allOf[0].properties.viewer.items.type, + parentSchema: schema94.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -64914,15 +65294,15 @@ function validate108( } } } else { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema93.allOf[0].properties.viewer.type, - parentSchema: schema93.allOf[0].properties.viewer, + schema: schema94.allOf[0].properties.viewer.type, + parentSchema: schema94.allOf[0].properties.viewer, data: data4, }, ]; @@ -64952,7 +65332,7 @@ function validate108( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -64962,9 +65342,9 @@ function validate108( message: "must have required property '" + missing2 + "'", schema: - schema93.allOf[0].properties.owner.items.required, + schema94.allOf[0].properties.owner.items.required, parentSchema: - schema93.allOf[0].properties.owner.items, + schema94.allOf[0].properties.owner.items, data: data8, }, ]; @@ -64977,7 +65357,7 @@ function validate108( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -64989,7 +65369,7 @@ function validate108( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema93.allOf[0].properties.owner.items + schema94.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -64997,7 +65377,7 @@ function validate108( return false; } } else { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -65007,10 +65387,10 @@ function validate108( params: { type: 'string' }, message: 'must be string', schema: - schema93.allOf[0].properties.owner.items + schema94.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema93.allOf[0].properties.owner.items + schema94.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -65022,15 +65402,15 @@ function validate108( } } } else { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema93.allOf[0].properties.owner.items.type, - parentSchema: schema93.allOf[0].properties.owner.items, + schema: schema94.allOf[0].properties.owner.items.type, + parentSchema: schema94.allOf[0].properties.owner.items, data: data8, }, ]; @@ -65043,15 +65423,15 @@ function validate108( } } } else { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema93.allOf[0].properties.owner.type, - parentSchema: schema93.allOf[0].properties.owner, + schema: schema94.allOf[0].properties.owner.type, + parentSchema: schema94.allOf[0].properties.owner, data: data7, }, ]; @@ -65069,15 +65449,15 @@ function validate108( } } } else { - validate108.errors = [ + validate109.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema93.allOf[0].type, - parentSchema: schema93.allOf[0], + schema: schema94.allOf[0].type, + parentSchema: schema94.allOf[0], data, }, ]; @@ -65091,15 +65471,15 @@ function validate108( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing3; if (data.devices === undefined && (missing3 = 'devices')) { - validate108.errors = [ + validate109.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema93.allOf[1].required, - parentSchema: schema93.allOf[1], + schema: schema94.allOf[1].required, + parentSchema: schema94.allOf[1], data, }, ]; @@ -65109,7 +65489,7 @@ function validate108( let data10 = data.type; const _errs24 = errors; if ('group' !== data10) { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -65117,7 +65497,7 @@ function validate108( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema93.allOf[1].properties.type, + parentSchema: schema94.allOf[1].properties.type, data: data10, }, ]; @@ -65142,15 +65522,15 @@ function validate108( if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { let missing4; if (data12.url === undefined && (missing4 = 'url')) { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/devices/' + i2, schemaPath: '#/allOf/1/properties/devices/items/required', keyword: 'required', params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'", - schema: schema93.allOf[1].properties.devices.items.required, - parentSchema: schema93.allOf[1].properties.devices.items, + schema: schema94.allOf[1].properties.devices.items.required, + parentSchema: schema94.allOf[1].properties.devices.items, data: data12, }, ]; @@ -65163,7 +65543,7 @@ function validate108( if (errors === _errs29) { if (typeof data13 === 'string') { if (!formats0(data13)) { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/devices/' + i2 + '/url', @@ -65174,7 +65554,7 @@ function validate108( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema93.allOf[1].properties.devices.items + schema94.allOf[1].properties.devices.items .properties.url, data: data13, }, @@ -65182,7 +65562,7 @@ function validate108( return false; } } else { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/devices/' + i2 + '/url', @@ -65192,10 +65572,10 @@ function validate108( params: { type: 'string' }, message: 'must be string', schema: - schema93.allOf[1].properties.devices.items + schema94.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema93.allOf[1].properties.devices.items + schema94.allOf[1].properties.devices.items .properties.url, data: data13, }, @@ -65207,15 +65587,15 @@ function validate108( } } } else { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/devices/' + i2, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema93.allOf[1].properties.devices.items.type, - parentSchema: schema93.allOf[1].properties.devices.items, + schema: schema94.allOf[1].properties.devices.items.type, + parentSchema: schema94.allOf[1].properties.devices.items, data: data12, }, ]; @@ -65228,15 +65608,15 @@ function validate108( } } } else { - validate108.errors = [ + validate109.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema93.allOf[1].properties.devices.type, - parentSchema: schema93.allOf[1].properties.devices, + schema: schema94.allOf[1].properties.devices.type, + parentSchema: schema94.allOf[1].properties.devices, data: data11, }, ]; @@ -65250,15 +65630,15 @@ function validate108( } } } else { - validate108.errors = [ + validate109.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema93.allOf[1].type, - parentSchema: schema93.allOf[1], + schema: schema94.allOf[1].type, + parentSchema: schema94.allOf[1], data, }, ]; @@ -65267,11 +65647,11 @@ function validate108( } var valid0 = _errs22 === errors; } - validate108.errors = vErrors; + validate109.errors = vErrors; return errors === 0; } -exports.validateDeviceGroupResponse = validate109; -const schema94 = { +exports.validateDeviceGroupResponse = validate110; +const schema95 = { title: 'Device Group', allOf: [ { @@ -65351,7 +65731,7 @@ const schema94 = { 'x-location': '#/components/schemas/device_group_response', 'x-schema-type': 'response', }; -function validate109( +function validate110( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -65367,15 +65747,15 @@ function validate109( (data.name === undefined && (missing0 = 'name')) || (data.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate109.errors = [ + validate110.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema94.allOf[0].required, - parentSchema: schema94.allOf[0], + schema: schema95.allOf[0].required, + parentSchema: schema95.allOf[0], data, }, ]; @@ -65388,7 +65768,7 @@ function validate109( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -65396,22 +65776,22 @@ function validate109( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema94.allOf[0].properties.url, + parentSchema: schema95.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema94.allOf[0].properties.url.type, - parentSchema: schema94.allOf[0].properties.url, + schema: schema95.allOf[0].properties.url.type, + parentSchema: schema95.allOf[0].properties.url, data: data0, }, ]; @@ -65428,15 +65808,15 @@ function validate109( let data1 = data.name; const _errs4 = errors; if (typeof data1 !== 'string') { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema94.allOf[0].properties.name.type, - parentSchema: schema94.allOf[0].properties.name, + schema: schema95.allOf[0].properties.name.type, + parentSchema: schema95.allOf[0].properties.name, data: data1, }, ]; @@ -65451,15 +65831,15 @@ function validate109( let data2 = data.description; const _errs6 = errors; if (typeof data2 !== 'string') { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema94.allOf[0].properties.description.type, - parentSchema: schema94.allOf[0].properties.description, + schema: schema95.allOf[0].properties.description.type, + parentSchema: schema95.allOf[0].properties.description, data: data2, }, ]; @@ -65474,15 +65854,15 @@ function validate109( let data3 = data.type; const _errs8 = errors; if (typeof data3 !== 'string') { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema94.allOf[0].properties.type.type, - parentSchema: schema94.allOf[0].properties.type, + schema: schema95.allOf[0].properties.type.type, + parentSchema: schema95.allOf[0].properties.type, data: data3, }, ]; @@ -65496,15 +65876,15 @@ function validate109( data3 === 'cloud instantiable' ) ) { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema94.allOf[0].properties.type.enum }, + params: { allowedValues: schema95.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema94.allOf[0].properties.type.enum, - parentSchema: schema94.allOf[0].properties.type, + schema: schema95.allOf[0].properties.type.enum, + parentSchema: schema95.allOf[0].properties.type, data: data3, }, ]; @@ -65519,15 +65899,15 @@ function validate109( let data4 = data.isPublic; const _errs10 = errors; if (typeof data4 !== 'boolean') { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema94.allOf[0].properties.isPublic.type, - parentSchema: schema94.allOf[0].properties.isPublic, + schema: schema95.allOf[0].properties.isPublic.type, + parentSchema: schema95.allOf[0].properties.isPublic, data: data4, }, ]; @@ -65556,7 +65936,7 @@ function validate109( ) { let missing1; if (data6.url === undefined && (missing1 = 'url')) { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -65566,9 +65946,9 @@ function validate109( message: "must have required property '" + missing1 + "'", schema: - schema94.allOf[0].properties.viewer.items.required, + schema95.allOf[0].properties.viewer.items.required, parentSchema: - schema94.allOf[0].properties.viewer.items, + schema95.allOf[0].properties.viewer.items, data: data6, }, ]; @@ -65581,7 +65961,7 @@ function validate109( if (errors === _errs16) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -65593,7 +65973,7 @@ function validate109( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema94.allOf[0].properties.viewer.items + schema95.allOf[0].properties.viewer.items .properties.url, data: data7, }, @@ -65601,7 +65981,7 @@ function validate109( return false; } } else { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -65611,10 +65991,10 @@ function validate109( params: { type: 'string' }, message: 'must be string', schema: - schema94.allOf[0].properties.viewer.items + schema95.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema94.allOf[0].properties.viewer.items + schema95.allOf[0].properties.viewer.items .properties.url, data: data7, }, @@ -65626,15 +66006,15 @@ function validate109( } } } else { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema94.allOf[0].properties.viewer.items.type, - parentSchema: schema94.allOf[0].properties.viewer.items, + schema: schema95.allOf[0].properties.viewer.items.type, + parentSchema: schema95.allOf[0].properties.viewer.items, data: data6, }, ]; @@ -65647,15 +66027,15 @@ function validate109( } } } else { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema94.allOf[0].properties.viewer.type, - parentSchema: schema94.allOf[0].properties.viewer, + schema: schema95.allOf[0].properties.viewer.type, + parentSchema: schema95.allOf[0].properties.viewer, data: data5, }, ]; @@ -65685,7 +66065,7 @@ function validate109( ) { let missing2; if (data9.url === undefined && (missing2 = 'url')) { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -65695,9 +66075,9 @@ function validate109( message: "must have required property '" + missing2 + "'", schema: - schema94.allOf[0].properties.owner.items.required, + schema95.allOf[0].properties.owner.items.required, parentSchema: - schema94.allOf[0].properties.owner.items, + schema95.allOf[0].properties.owner.items, data: data9, }, ]; @@ -65710,7 +66090,7 @@ function validate109( if (errors === _errs22) { if (typeof data10 === 'string') { if (!formats0(data10)) { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -65722,7 +66102,7 @@ function validate109( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema94.allOf[0].properties.owner.items + schema95.allOf[0].properties.owner.items .properties.url, data: data10, }, @@ -65730,7 +66110,7 @@ function validate109( return false; } } else { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -65740,10 +66120,10 @@ function validate109( params: { type: 'string' }, message: 'must be string', schema: - schema94.allOf[0].properties.owner.items + schema95.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema94.allOf[0].properties.owner.items + schema95.allOf[0].properties.owner.items .properties.url, data: data10, }, @@ -65755,16 +66135,16 @@ function validate109( } } } else { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema94.allOf[0].properties.owner.items.type, + schema: schema95.allOf[0].properties.owner.items.type, parentSchema: - schema94.allOf[0].properties.owner.items, + schema95.allOf[0].properties.owner.items, data: data9, }, ]; @@ -65777,15 +66157,15 @@ function validate109( } } } else { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema94.allOf[0].properties.owner.type, - parentSchema: schema94.allOf[0].properties.owner, + schema: schema95.allOf[0].properties.owner.type, + parentSchema: schema95.allOf[0].properties.owner, data: data8, }, ]; @@ -65804,15 +66184,15 @@ function validate109( } } } else { - validate109.errors = [ + validate110.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema94.allOf[0].type, - parentSchema: schema94.allOf[0], + schema: schema95.allOf[0].type, + parentSchema: schema95.allOf[0], data, }, ]; @@ -65826,15 +66206,15 @@ function validate109( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing3; if (data.devices === undefined && (missing3 = 'devices')) { - validate109.errors = [ + validate110.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema94.allOf[1].required, - parentSchema: schema94.allOf[1], + schema: schema95.allOf[1].required, + parentSchema: schema95.allOf[1], data, }, ]; @@ -65844,7 +66224,7 @@ function validate109( let data11 = data.type; const _errs26 = errors; if ('group' !== data11) { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -65852,7 +66232,7 @@ function validate109( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema94.allOf[1].properties.type, + parentSchema: schema95.allOf[1].properties.type, data: data11, }, ]; @@ -65877,15 +66257,15 @@ function validate109( if (data13 && typeof data13 == 'object' && !Array.isArray(data13)) { let missing4; if (data13.url === undefined && (missing4 = 'url')) { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/devices/' + i2, schemaPath: '#/allOf/1/properties/devices/items/required', keyword: 'required', params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'", - schema: schema94.allOf[1].properties.devices.items.required, - parentSchema: schema94.allOf[1].properties.devices.items, + schema: schema95.allOf[1].properties.devices.items.required, + parentSchema: schema95.allOf[1].properties.devices.items, data: data13, }, ]; @@ -65898,7 +66278,7 @@ function validate109( if (errors === _errs31) { if (typeof data14 === 'string') { if (!formats0(data14)) { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/devices/' + i2 + '/url', @@ -65909,7 +66289,7 @@ function validate109( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema94.allOf[1].properties.devices.items + schema95.allOf[1].properties.devices.items .properties.url, data: data14, }, @@ -65917,7 +66297,7 @@ function validate109( return false; } } else { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/devices/' + i2 + '/url', @@ -65927,10 +66307,10 @@ function validate109( params: { type: 'string' }, message: 'must be string', schema: - schema94.allOf[1].properties.devices.items + schema95.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema94.allOf[1].properties.devices.items + schema95.allOf[1].properties.devices.items .properties.url, data: data14, }, @@ -65942,15 +66322,15 @@ function validate109( } } } else { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/devices/' + i2, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema94.allOf[1].properties.devices.items.type, - parentSchema: schema94.allOf[1].properties.devices.items, + schema: schema95.allOf[1].properties.devices.items.type, + parentSchema: schema95.allOf[1].properties.devices.items, data: data13, }, ]; @@ -65963,15 +66343,15 @@ function validate109( } } } else { - validate109.errors = [ + validate110.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema94.allOf[1].properties.devices.type, - parentSchema: schema94.allOf[1].properties.devices, + schema: schema95.allOf[1].properties.devices.type, + parentSchema: schema95.allOf[1].properties.devices, data: data12, }, ]; @@ -65985,15 +66365,15 @@ function validate109( } } } else { - validate109.errors = [ + validate110.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema94.allOf[1].type, - parentSchema: schema94.allOf[1], + schema: schema95.allOf[1].type, + parentSchema: schema95.allOf[1], data, }, ]; @@ -66002,11 +66382,11 @@ function validate109( } var valid0 = _errs24 === errors; } - validate109.errors = vErrors; + validate110.errors = vErrors; return errors === 0; } -exports.validateDeviceRequest = validate110; -const schema95 = { +exports.validateDeviceRequest = validate111; +const schema96 = { title: 'Device', anyOf: [ { @@ -66315,7 +66695,7 @@ const schema95 = { 'x-location': '#/components/schemas/device_request', 'x-schema-type': 'request', }; -function validate110( +function validate111( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -66339,8 +66719,8 @@ function validate110( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema95.anyOf[0].allOf[0].required, - parentSchema: schema95.anyOf[0].allOf[0], + schema: schema96.anyOf[0].allOf[0].required, + parentSchema: schema96.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -66360,8 +66740,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.name, + schema: schema96.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.name, data: data0, }; if (vErrors === null) { @@ -66386,8 +66766,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.description, + schema: schema96.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.description, data: data1, }; if (vErrors === null) { @@ -66412,8 +66792,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.type, + schema: schema96.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -66436,11 +66816,11 @@ function validate110( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema95.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema96.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema95.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema95.anyOf[0].allOf[0].properties.type, + schema: schema96.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -66465,8 +66845,8 @@ function validate110( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema95.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.isPublic, + schema: schema96.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.isPublic, data: data3, }; if (vErrors === null) { @@ -66507,10 +66887,10 @@ function validate110( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", schema: - schema95.anyOf[0].allOf[0].properties.viewer.items + schema96.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema95.anyOf[0].allOf[0].properties.viewer.items, + schema96.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -66537,7 +66917,7 @@ function validate110( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[0].allOf[0].properties.viewer + schema96.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -66558,10 +66938,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[0].allOf[0].properties.viewer + schema96.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema95.anyOf[0].allOf[0].properties.viewer + schema96.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -66585,9 +66965,9 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[0].allOf[0].properties.viewer.items.type, + schema96.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema95.anyOf[0].allOf[0].properties.viewer.items, + schema96.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -66610,8 +66990,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.viewer, + schema: schema96.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.viewer, data: data4, }; if (vErrors === null) { @@ -66654,10 +67034,10 @@ function validate110( message: "must have required property '" + missing2 + "'", schema: - schema95.anyOf[0].allOf[0].properties.owner.items + schema96.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema95.anyOf[0].allOf[0].properties.owner.items, + schema96.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -66684,7 +67064,7 @@ function validate110( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[0].allOf[0].properties.owner + schema96.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -66705,10 +67085,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[0].allOf[0].properties.owner + schema96.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema95.anyOf[0].allOf[0].properties.owner + schema96.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -66732,9 +67112,9 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[0].allOf[0].properties.owner.items.type, + schema96.anyOf[0].allOf[0].properties.owner.items.type, parentSchema: - schema95.anyOf[0].allOf[0].properties.owner.items, + schema96.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -66757,8 +67137,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema95.anyOf[0].allOf[0].properties.owner, + schema: schema96.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema96.anyOf[0].allOf[0].properties.owner, data: data7, }; if (vErrors === null) { @@ -66786,8 +67166,8 @@ function validate110( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema95.anyOf[0].allOf[0].type, - parentSchema: schema95.anyOf[0].allOf[0], + schema: schema96.anyOf[0].allOf[0].type, + parentSchema: schema96.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -66814,7 +67194,7 @@ function validate110( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema95.anyOf[0].allOf[1].properties.type, + parentSchema: schema96.anyOf[0].allOf[1].properties.type, data: data10, }; if (vErrors === null) { @@ -66843,7 +67223,7 @@ function validate110( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema95.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema96.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -66860,8 +67240,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema95.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema96.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema96.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -66907,7 +67287,7 @@ function validate110( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items + schema96.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -66928,10 +67308,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[0].allOf[1].properties.services.items + schema96.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items + schema96.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -66962,10 +67342,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[0].allOf[1].properties.services.items + schema96.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items + schema96.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data15, }; @@ -66997,10 +67377,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[0].allOf[1].properties.services.items + schema96.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items + schema96.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -67029,15 +67409,15 @@ function validate110( keyword: 'enum', params: { allowedValues: - schema95.anyOf[0].allOf[1].properties.services.items + schema96.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema95.anyOf[0].allOf[1].properties.services.items + schema96.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items + schema96.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -67062,9 +67442,9 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[0].allOf[1].properties.services.items.type, + schema96.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema95.anyOf[0].allOf[1].properties.services.items, + schema96.anyOf[0].allOf[1].properties.services.items, data: data13, }; if (vErrors === null) { @@ -67087,8 +67467,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema95.anyOf[0].allOf[1].properties.services, + schema: schema96.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema96.anyOf[0].allOf[1].properties.services, data: data12, }; if (vErrors === null) { @@ -67112,8 +67492,8 @@ function validate110( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema95.anyOf[0].allOf[1].type, - parentSchema: schema95.anyOf[0].allOf[1], + schema: schema96.anyOf[0].allOf[1].type, + parentSchema: schema96.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -67145,8 +67525,8 @@ function validate110( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema95.anyOf[1].allOf[0].required, - parentSchema: schema95.anyOf[1].allOf[0], + schema: schema96.anyOf[1].allOf[0].required, + parentSchema: schema96.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -67166,8 +67546,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.name, + schema: schema96.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.name, data: data17, }; if (vErrors === null) { @@ -67192,8 +67572,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.description, + schema: schema96.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.description, data: data18, }; if (vErrors === null) { @@ -67218,8 +67598,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.type, + schema: schema96.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -67242,11 +67622,11 @@ function validate110( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema95.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema96.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema95.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema95.anyOf[1].allOf[0].properties.type, + schema: schema96.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -67271,8 +67651,8 @@ function validate110( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema95.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.isPublic, + schema: schema96.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.isPublic, data: data20, }; if (vErrors === null) { @@ -67314,10 +67694,10 @@ function validate110( message: "must have required property '" + missing4 + "'", schema: - schema95.anyOf[1].allOf[0].properties.viewer.items + schema96.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema95.anyOf[1].allOf[0].properties.viewer.items, + schema96.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -67344,7 +67724,7 @@ function validate110( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[1].allOf[0].properties.viewer + schema96.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -67365,10 +67745,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[1].allOf[0].properties.viewer + schema96.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema95.anyOf[1].allOf[0].properties.viewer + schema96.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -67392,9 +67772,9 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[1].allOf[0].properties.viewer.items.type, + schema96.anyOf[1].allOf[0].properties.viewer.items.type, parentSchema: - schema95.anyOf[1].allOf[0].properties.viewer.items, + schema96.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -67417,8 +67797,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.viewer, + schema: schema96.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.viewer, data: data21, }; if (vErrors === null) { @@ -67461,10 +67841,10 @@ function validate110( message: "must have required property '" + missing5 + "'", schema: - schema95.anyOf[1].allOf[0].properties.owner.items + schema96.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema95.anyOf[1].allOf[0].properties.owner.items, + schema96.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -67492,7 +67872,7 @@ function validate110( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[1].allOf[0].properties + schema96.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data26, }; @@ -67513,10 +67893,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[1].allOf[0].properties.owner + schema96.anyOf[1].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema95.anyOf[1].allOf[0].properties.owner + schema96.anyOf[1].allOf[0].properties.owner .items.properties.url, data: data26, }; @@ -67540,10 +67920,10 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[1].allOf[0].properties.owner.items + schema96.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema95.anyOf[1].allOf[0].properties.owner.items, + schema96.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -67566,8 +67946,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema95.anyOf[1].allOf[0].properties.owner, + schema: schema96.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema96.anyOf[1].allOf[0].properties.owner, data: data24, }; if (vErrors === null) { @@ -67595,8 +67975,8 @@ function validate110( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema95.anyOf[1].allOf[0].type, - parentSchema: schema95.anyOf[1].allOf[0], + schema: schema96.anyOf[1].allOf[0].type, + parentSchema: schema96.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -67623,7 +68003,7 @@ function validate110( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema95.anyOf[1].allOf[1].properties.type, + parentSchema: schema96.anyOf[1].allOf[1].properties.type, data: data27, }; if (vErrors === null) { @@ -67652,7 +68032,7 @@ function validate110( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema95.anyOf[1].allOf[1].properties.experiment, + parentSchema: schema96.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -67669,8 +68049,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema95.anyOf[1].allOf[1].properties.experiment, + schema: schema96.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema96.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -67720,7 +68100,7 @@ function validate110( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[1].allOf[1].properties.services + schema96.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -67741,10 +68121,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[1].allOf[1].properties.services.items + schema96.anyOf[1].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema95.anyOf[1].allOf[1].properties.services.items + schema96.anyOf[1].allOf[1].properties.services.items .properties.serviceType, data: data31, }; @@ -67775,10 +68155,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[1].allOf[1].properties.services.items + schema96.anyOf[1].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema95.anyOf[1].allOf[1].properties.services.items + schema96.anyOf[1].allOf[1].properties.services.items .properties.serviceId, data: data32, }; @@ -67810,10 +68190,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[1].allOf[1].properties.services.items + schema96.anyOf[1].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema95.anyOf[1].allOf[1].properties.services.items + schema96.anyOf[1].allOf[1].properties.services.items .properties.serviceDirection, data: data33, }; @@ -67842,15 +68222,15 @@ function validate110( keyword: 'enum', params: { allowedValues: - schema95.anyOf[1].allOf[1].properties.services + schema96.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema95.anyOf[1].allOf[1].properties.services.items + schema96.anyOf[1].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema95.anyOf[1].allOf[1].properties.services.items + schema96.anyOf[1].allOf[1].properties.services.items .properties.serviceDirection, data: data33, }; @@ -67876,9 +68256,9 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[1].allOf[1].properties.services.items.type, + schema96.anyOf[1].allOf[1].properties.services.items.type, parentSchema: - schema95.anyOf[1].allOf[1].properties.services.items, + schema96.anyOf[1].allOf[1].properties.services.items, data: data30, }; if (vErrors === null) { @@ -67901,8 +68281,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema95.anyOf[1].allOf[1].properties.services, + schema: schema96.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema96.anyOf[1].allOf[1].properties.services, data: data29, }; if (vErrors === null) { @@ -67926,8 +68306,8 @@ function validate110( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema95.anyOf[1].allOf[1].type, - parentSchema: schema95.anyOf[1].allOf[1], + schema: schema96.anyOf[1].allOf[1].type, + parentSchema: schema96.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -67959,8 +68339,8 @@ function validate110( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema95.anyOf[2].allOf[0].required, - parentSchema: schema95.anyOf[2].allOf[0], + schema: schema96.anyOf[2].allOf[0].required, + parentSchema: schema96.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -67980,8 +68360,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.name, + schema: schema96.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.name, data: data34, }; if (vErrors === null) { @@ -68006,8 +68386,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.description, + schema: schema96.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.description, data: data35, }; if (vErrors === null) { @@ -68032,8 +68412,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.type, + schema: schema96.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -68056,11 +68436,11 @@ function validate110( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema95.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema96.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema95.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema95.anyOf[2].allOf[0].properties.type, + schema: schema96.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -68085,8 +68465,8 @@ function validate110( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema95.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.isPublic, + schema: schema96.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.isPublic, data: data37, }; if (vErrors === null) { @@ -68128,10 +68508,10 @@ function validate110( message: "must have required property '" + missing7 + "'", schema: - schema95.anyOf[2].allOf[0].properties.viewer.items + schema96.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema95.anyOf[2].allOf[0].properties.viewer.items, + schema96.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -68159,7 +68539,7 @@ function validate110( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[2].allOf[0].properties + schema96.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -68180,10 +68560,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[2].allOf[0].properties.viewer + schema96.anyOf[2].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema95.anyOf[2].allOf[0].properties.viewer + schema96.anyOf[2].allOf[0].properties.viewer .items.properties.url, data: data40, }; @@ -68207,10 +68587,10 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[2].allOf[0].properties.viewer.items + schema96.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema95.anyOf[2].allOf[0].properties.viewer.items, + schema96.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -68233,8 +68613,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.viewer, + schema: schema96.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.viewer, data: data38, }; if (vErrors === null) { @@ -68277,10 +68657,10 @@ function validate110( message: "must have required property '" + missing8 + "'", schema: - schema95.anyOf[2].allOf[0].properties.owner.items + schema96.anyOf[2].allOf[0].properties.owner.items .required, parentSchema: - schema95.anyOf[2].allOf[0].properties.owner.items, + schema96.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -68308,7 +68688,7 @@ function validate110( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[2].allOf[0].properties + schema96.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -68329,10 +68709,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[2].allOf[0].properties + schema96.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema95.anyOf[2].allOf[0].properties + schema96.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -68356,10 +68736,10 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[2].allOf[0].properties.owner.items + schema96.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema95.anyOf[2].allOf[0].properties.owner.items, + schema96.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -68382,8 +68762,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema95.anyOf[2].allOf[0].properties.owner, + schema: schema96.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema96.anyOf[2].allOf[0].properties.owner, data: data41, }; if (vErrors === null) { @@ -68411,8 +68791,8 @@ function validate110( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema95.anyOf[2].allOf[0].type, - parentSchema: schema95.anyOf[2].allOf[0], + schema: schema96.anyOf[2].allOf[0].type, + parentSchema: schema96.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -68439,7 +68819,7 @@ function validate110( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema95.anyOf[2].allOf[1].properties.type, + parentSchema: schema96.anyOf[2].allOf[1].properties.type, data: data44, }; if (vErrors === null) { @@ -68468,7 +68848,7 @@ function validate110( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema95.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema96.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -68485,8 +68865,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema95.anyOf[2].allOf[1].properties.codeUrl, + schema: schema96.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema96.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -68539,7 +68919,7 @@ function validate110( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[2].allOf[1].properties.services + schema96.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -68560,10 +68940,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[2].allOf[1].properties.services + schema96.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema95.anyOf[2].allOf[1].properties.services + schema96.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -68594,10 +68974,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[2].allOf[1].properties.services.items + schema96.anyOf[2].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema95.anyOf[2].allOf[1].properties.services.items + schema96.anyOf[2].allOf[1].properties.services.items .properties.serviceId, data: data49, }; @@ -68629,10 +69009,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[2].allOf[1].properties.services + schema96.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema95.anyOf[2].allOf[1].properties.services + schema96.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -68661,16 +69041,16 @@ function validate110( keyword: 'enum', params: { allowedValues: - schema95.anyOf[2].allOf[1].properties.services + schema96.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema95.anyOf[2].allOf[1].properties.services + schema96.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema95.anyOf[2].allOf[1].properties.services + schema96.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -68696,9 +69076,9 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[2].allOf[1].properties.services.items.type, + schema96.anyOf[2].allOf[1].properties.services.items.type, parentSchema: - schema95.anyOf[2].allOf[1].properties.services.items, + schema96.anyOf[2].allOf[1].properties.services.items, data: data47, }; if (vErrors === null) { @@ -68721,8 +69101,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema95.anyOf[2].allOf[1].properties.services, + schema: schema96.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema96.anyOf[2].allOf[1].properties.services, data: data46, }; if (vErrors === null) { @@ -68746,8 +69126,8 @@ function validate110( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema95.anyOf[2].allOf[1].type, - parentSchema: schema95.anyOf[2].allOf[1], + schema: schema96.anyOf[2].allOf[1].type, + parentSchema: schema96.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -68779,8 +69159,8 @@ function validate110( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema95.anyOf[3].allOf[0].required, - parentSchema: schema95.anyOf[3].allOf[0], + schema: schema96.anyOf[3].allOf[0].required, + parentSchema: schema96.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -68800,8 +69180,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.name, + schema: schema96.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.name, data: data51, }; if (vErrors === null) { @@ -68826,8 +69206,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.description, + schema: schema96.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.description, data: data52, }; if (vErrors === null) { @@ -68852,8 +69232,8 @@ function validate110( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema95.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.type, + schema: schema96.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -68876,11 +69256,11 @@ function validate110( schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema95.anyOf[3].allOf[0].properties.type.enum, + allowedValues: schema96.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema95.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema95.anyOf[3].allOf[0].properties.type, + schema: schema96.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema96.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -68905,8 +69285,8 @@ function validate110( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema95.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.isPublic, + schema: schema96.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.isPublic, data: data54, }; if (vErrors === null) { @@ -68948,10 +69328,10 @@ function validate110( message: "must have required property '" + missing10 + "'", schema: - schema95.anyOf[3].allOf[0].properties.viewer.items + schema96.anyOf[3].allOf[0].properties.viewer.items .required, parentSchema: - schema95.anyOf[3].allOf[0].properties.viewer + schema96.anyOf[3].allOf[0].properties.viewer .items, data: data56, }; @@ -68980,7 +69360,7 @@ function validate110( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[3].allOf[0].properties + schema96.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -69001,10 +69381,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[3].allOf[0].properties + schema96.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema95.anyOf[3].allOf[0].properties + schema96.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -69028,10 +69408,10 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[3].allOf[0].properties.viewer.items + schema96.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema95.anyOf[3].allOf[0].properties.viewer.items, + schema96.anyOf[3].allOf[0].properties.viewer.items, data: data56, }; if (vErrors === null) { @@ -69054,8 +69434,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.viewer, + schema: schema96.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.viewer, data: data55, }; if (vErrors === null) { @@ -69100,10 +69480,10 @@ function validate110( missing11 + "'", schema: - schema95.anyOf[3].allOf[0].properties.owner + schema96.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema95.anyOf[3].allOf[0].properties.owner + schema96.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -69135,7 +69515,7 @@ function validate110( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[3].allOf[0].properties + schema96.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -69156,10 +69536,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[3].allOf[0].properties + schema96.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema95.anyOf[3].allOf[0].properties + schema96.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -69183,10 +69563,10 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[3].allOf[0].properties.owner.items + schema96.anyOf[3].allOf[0].properties.owner.items .type, parentSchema: - schema95.anyOf[3].allOf[0].properties.owner.items, + schema96.anyOf[3].allOf[0].properties.owner.items, data: data59, }; if (vErrors === null) { @@ -69209,8 +69589,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[3].allOf[0].properties.owner.type, - parentSchema: schema95.anyOf[3].allOf[0].properties.owner, + schema: schema96.anyOf[3].allOf[0].properties.owner.type, + parentSchema: schema96.anyOf[3].allOf[0].properties.owner, data: data58, }; if (vErrors === null) { @@ -69238,8 +69618,8 @@ function validate110( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema95.anyOf[3].allOf[0].type, - parentSchema: schema95.anyOf[3].allOf[0], + schema: schema96.anyOf[3].allOf[0].type, + parentSchema: schema96.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -69263,8 +69643,8 @@ function validate110( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema95.anyOf[3].allOf[1].required, - parentSchema: schema95.anyOf[3].allOf[1], + schema: schema96.anyOf[3].allOf[1].required, + parentSchema: schema96.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -69285,7 +69665,7 @@ function validate110( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema95.anyOf[3].allOf[1].properties.type, + parentSchema: schema96.anyOf[3].allOf[1].properties.type, data: data61, }; if (vErrors === null) { @@ -69327,10 +69707,10 @@ function validate110( message: "must have required property '" + missing13 + "'", schema: - schema95.anyOf[3].allOf[1].properties.devices.items + schema96.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema95.anyOf[3].allOf[1].properties.devices.items, + schema96.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -69357,7 +69737,7 @@ function validate110( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema95.anyOf[3].allOf[1].properties + schema96.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data64, }; @@ -69378,10 +69758,10 @@ function validate110( params: { type: 'string' }, message: 'must be string', schema: - schema95.anyOf[3].allOf[1].properties.devices + schema96.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema95.anyOf[3].allOf[1].properties.devices + schema96.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -69405,10 +69785,10 @@ function validate110( params: { type: 'object' }, message: 'must be object', schema: - schema95.anyOf[3].allOf[1].properties.devices.items + schema96.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema95.anyOf[3].allOf[1].properties.devices.items, + schema96.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -69431,8 +69811,8 @@ function validate110( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema95.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema95.anyOf[3].allOf[1].properties.devices, + schema: schema96.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema96.anyOf[3].allOf[1].properties.devices, data: data62, }; if (vErrors === null) { @@ -69456,8 +69836,8 @@ function validate110( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema95.anyOf[3].allOf[1].type, - parentSchema: schema95.anyOf[3].allOf[1], + schema: schema96.anyOf[3].allOf[1].type, + parentSchema: schema96.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -69482,8 +69862,8 @@ function validate110( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema95.anyOf, - parentSchema: schema95, + schema: schema96.anyOf, + parentSchema: schema96, data, }; if (vErrors === null) { @@ -69492,7 +69872,7 @@ function validate110( vErrors.push(err109); } errors++; - validate110.errors = vErrors; + validate111.errors = vErrors; return false; } else { errors = _errs0; @@ -69504,11 +69884,11 @@ function validate110( } } } - validate110.errors = vErrors; + validate111.errors = vErrors; return errors === 0; } -exports.validateDeviceResponse = validate111; -const schema96 = { +exports.validateDeviceResponse = validate112; +const schema97 = { title: 'Device', anyOf: [ { @@ -69862,7 +70242,7 @@ const schema96 = { 'x-location': '#/components/schemas/device_response', 'x-schema-type': 'response', }; -function validate111( +function validate112( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -69887,8 +70267,8 @@ function validate111( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema96.anyOf[0].allOf[0].required, - parentSchema: schema96.anyOf[0].allOf[0], + schema: schema97.anyOf[0].allOf[0].required, + parentSchema: schema97.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -69912,7 +70292,7 @@ function validate111( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema96.anyOf[0].allOf[0].properties.url, + parentSchema: schema97.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -69929,8 +70309,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.url, + schema: schema97.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema97.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -69957,8 +70337,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.name, + schema: schema97.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema97.anyOf[0].allOf[0].properties.name, data: data1, }; if (vErrors === null) { @@ -69983,8 +70363,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.description, + schema: schema97.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema97.anyOf[0].allOf[0].properties.description, data: data2, }; if (vErrors === null) { @@ -70009,8 +70389,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.type, + schema: schema97.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema97.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -70033,11 +70413,11 @@ function validate111( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema96.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema97.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema96.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema96.anyOf[0].allOf[0].properties.type, + schema: schema97.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema97.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -70062,8 +70442,8 @@ function validate111( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema96.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.isPublic, + schema: schema97.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema97.anyOf[0].allOf[0].properties.isPublic, data: data4, }; if (vErrors === null) { @@ -70105,10 +70485,10 @@ function validate111( message: "must have required property '" + missing1 + "'", schema: - schema96.anyOf[0].allOf[0].properties.viewer.items + schema97.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema96.anyOf[0].allOf[0].properties.viewer.items, + schema97.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -70135,7 +70515,7 @@ function validate111( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[0].allOf[0].properties.viewer + schema97.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -70156,10 +70536,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[0].allOf[0].properties.viewer + schema97.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema96.anyOf[0].allOf[0].properties.viewer + schema97.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -70183,9 +70563,9 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[0].allOf[0].properties.viewer.items.type, + schema97.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema96.anyOf[0].allOf[0].properties.viewer.items, + schema97.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -70208,8 +70588,8 @@ function validate111( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema96.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.viewer, + schema: schema97.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema97.anyOf[0].allOf[0].properties.viewer, data: data5, }; if (vErrors === null) { @@ -70252,10 +70632,10 @@ function validate111( message: "must have required property '" + missing2 + "'", schema: - schema96.anyOf[0].allOf[0].properties.owner.items + schema97.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema96.anyOf[0].allOf[0].properties.owner.items, + schema97.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -70283,7 +70663,7 @@ function validate111( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[0].allOf[0].properties + schema97.anyOf[0].allOf[0].properties .owner.items.properties.url, data: data10, }; @@ -70304,10 +70684,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[0].allOf[0].properties.owner + schema97.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema96.anyOf[0].allOf[0].properties.owner + schema97.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data10, }; @@ -70331,10 +70711,10 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[0].allOf[0].properties.owner.items + schema97.anyOf[0].allOf[0].properties.owner.items .type, parentSchema: - schema96.anyOf[0].allOf[0].properties.owner.items, + schema97.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -70357,8 +70737,8 @@ function validate111( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema96.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema96.anyOf[0].allOf[0].properties.owner, + schema: schema97.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema97.anyOf[0].allOf[0].properties.owner, data: data8, }; if (vErrors === null) { @@ -70387,8 +70767,8 @@ function validate111( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema96.anyOf[0].allOf[0].type, - parentSchema: schema96.anyOf[0].allOf[0], + schema: schema97.anyOf[0].allOf[0].type, + parentSchema: schema97.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -70415,7 +70795,7 @@ function validate111( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema96.anyOf[0].allOf[1].properties.type, + parentSchema: schema97.anyOf[0].allOf[1].properties.type, data: data11, }; if (vErrors === null) { @@ -70444,7 +70824,7 @@ function validate111( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema96.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema97.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -70461,8 +70841,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema96.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema97.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema97.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -70508,7 +70888,7 @@ function validate111( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items + schema97.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -70529,10 +70909,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[0].allOf[1].properties.services.items + schema97.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items + schema97.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -70563,10 +70943,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[0].allOf[1].properties.services.items + schema97.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items + schema97.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data16, }; @@ -70598,10 +70978,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[0].allOf[1].properties.services.items + schema97.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items + schema97.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -70630,15 +71010,15 @@ function validate111( keyword: 'enum', params: { allowedValues: - schema96.anyOf[0].allOf[1].properties.services.items + schema97.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema96.anyOf[0].allOf[1].properties.services.items + schema97.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items + schema97.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -70663,9 +71043,9 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[0].allOf[1].properties.services.items.type, + schema97.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema96.anyOf[0].allOf[1].properties.services.items, + schema97.anyOf[0].allOf[1].properties.services.items, data: data14, }; if (vErrors === null) { @@ -70688,8 +71068,8 @@ function validate111( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema96.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema96.anyOf[0].allOf[1].properties.services, + schema: schema97.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema97.anyOf[0].allOf[1].properties.services, data: data13, }; if (vErrors === null) { @@ -70713,8 +71093,8 @@ function validate111( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema96.anyOf[0].allOf[1].type, - parentSchema: schema96.anyOf[0].allOf[1], + schema: schema97.anyOf[0].allOf[1].type, + parentSchema: schema97.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -70747,8 +71127,8 @@ function validate111( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema96.anyOf[1].allOf[0].required, - parentSchema: schema96.anyOf[1].allOf[0], + schema: schema97.anyOf[1].allOf[0].required, + parentSchema: schema97.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -70772,7 +71152,7 @@ function validate111( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema96.anyOf[1].allOf[0].properties.url, + parentSchema: schema97.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -70789,8 +71169,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.url, + schema: schema97.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema97.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -70817,8 +71197,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.name, + schema: schema97.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema97.anyOf[1].allOf[0].properties.name, data: data19, }; if (vErrors === null) { @@ -70843,8 +71223,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.description, + schema: schema97.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema97.anyOf[1].allOf[0].properties.description, data: data20, }; if (vErrors === null) { @@ -70869,8 +71249,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.type, + schema: schema97.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema97.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -70893,11 +71273,11 @@ function validate111( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema96.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema97.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema96.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema96.anyOf[1].allOf[0].properties.type, + schema: schema97.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema97.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -70922,8 +71302,8 @@ function validate111( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema96.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.isPublic, + schema: schema97.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema97.anyOf[1].allOf[0].properties.isPublic, data: data22, }; if (vErrors === null) { @@ -70965,10 +71345,10 @@ function validate111( message: "must have required property '" + missing4 + "'", schema: - schema96.anyOf[1].allOf[0].properties.viewer.items + schema97.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema96.anyOf[1].allOf[0].properties.viewer.items, + schema97.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -70996,7 +71376,7 @@ function validate111( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[1].allOf[0].properties + schema97.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -71017,10 +71397,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[1].allOf[0].properties.viewer + schema97.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema96.anyOf[1].allOf[0].properties.viewer + schema97.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data25, }; @@ -71044,10 +71424,10 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[1].allOf[0].properties.viewer.items + schema97.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema96.anyOf[1].allOf[0].properties.viewer.items, + schema97.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -71070,8 +71450,8 @@ function validate111( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema96.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.viewer, + schema: schema97.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema97.anyOf[1].allOf[0].properties.viewer, data: data23, }; if (vErrors === null) { @@ -71114,10 +71494,10 @@ function validate111( message: "must have required property '" + missing5 + "'", schema: - schema96.anyOf[1].allOf[0].properties.owner.items + schema97.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema96.anyOf[1].allOf[0].properties.owner.items, + schema97.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -71145,7 +71525,7 @@ function validate111( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[1].allOf[0].properties + schema97.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -71166,10 +71546,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[1].allOf[0].properties + schema97.anyOf[1].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema96.anyOf[1].allOf[0].properties + schema97.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -71193,10 +71573,10 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[1].allOf[0].properties.owner.items + schema97.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema96.anyOf[1].allOf[0].properties.owner.items, + schema97.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -71219,8 +71599,8 @@ function validate111( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema96.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema96.anyOf[1].allOf[0].properties.owner, + schema: schema97.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema97.anyOf[1].allOf[0].properties.owner, data: data26, }; if (vErrors === null) { @@ -71249,8 +71629,8 @@ function validate111( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema96.anyOf[1].allOf[0].type, - parentSchema: schema96.anyOf[1].allOf[0], + schema: schema97.anyOf[1].allOf[0].type, + parentSchema: schema97.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -71277,7 +71657,7 @@ function validate111( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema96.anyOf[1].allOf[1].properties.type, + parentSchema: schema97.anyOf[1].allOf[1].properties.type, data: data29, }; if (vErrors === null) { @@ -71302,8 +71682,8 @@ function validate111( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema96.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema96.anyOf[1].allOf[1].properties.connected, + schema: schema97.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema97.anyOf[1].allOf[1].properties.connected, data: data30, }; if (vErrors === null) { @@ -71354,7 +71734,7 @@ function validate111( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema96.anyOf[1].allOf[1].properties + schema97.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -71378,11 +71758,11 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[1].allOf[1].properties + schema97.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start .type, parentSchema: - schema96.anyOf[1].allOf[1].properties + schema97.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -71421,7 +71801,7 @@ function validate111( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema96.anyOf[1].allOf[1].properties + schema97.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -71445,11 +71825,11 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[1].allOf[1].properties + schema97.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end .type, parentSchema: - schema96.anyOf[1].allOf[1].properties + schema97.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -71476,10 +71856,10 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[1].allOf[1].properties.announcedAvailability + schema97.anyOf[1].allOf[1].properties.announcedAvailability .items.type, parentSchema: - schema96.anyOf[1].allOf[1].properties.announcedAvailability + schema97.anyOf[1].allOf[1].properties.announcedAvailability .items, data: data32, }; @@ -71505,9 +71885,9 @@ function validate111( params: { type: 'array' }, message: 'must be array', schema: - schema96.anyOf[1].allOf[1].properties.announcedAvailability.type, + schema97.anyOf[1].allOf[1].properties.announcedAvailability.type, parentSchema: - schema96.anyOf[1].allOf[1].properties.announcedAvailability, + schema97.anyOf[1].allOf[1].properties.announcedAvailability, data: data31, }; if (vErrors === null) { @@ -71538,7 +71918,7 @@ function validate111( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[1].allOf[1].properties.experiment, + schema97.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -71555,8 +71935,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema96.anyOf[1].allOf[1].properties.experiment, + schema: schema97.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema97.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -71609,7 +71989,7 @@ function validate111( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[1].allOf[1].properties.services + schema97.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -71633,10 +72013,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[1].allOf[1].properties.services + schema97.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema96.anyOf[1].allOf[1].properties.services + schema97.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -71667,10 +72047,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[1].allOf[1].properties.services + schema97.anyOf[1].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema96.anyOf[1].allOf[1].properties.services + schema97.anyOf[1].allOf[1].properties.services .items.properties.serviceId, data: data39, }; @@ -71702,10 +72082,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[1].allOf[1].properties.services + schema97.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema96.anyOf[1].allOf[1].properties.services + schema97.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -71734,16 +72114,16 @@ function validate111( keyword: 'enum', params: { allowedValues: - schema96.anyOf[1].allOf[1].properties.services + schema97.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema96.anyOf[1].allOf[1].properties.services + schema97.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema96.anyOf[1].allOf[1].properties.services + schema97.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -71769,10 +72149,10 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[1].allOf[1].properties.services.items + schema97.anyOf[1].allOf[1].properties.services.items .type, parentSchema: - schema96.anyOf[1].allOf[1].properties.services.items, + schema97.anyOf[1].allOf[1].properties.services.items, data: data37, }; if (vErrors === null) { @@ -71795,8 +72175,8 @@ function validate111( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema96.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema96.anyOf[1].allOf[1].properties.services, + schema: schema97.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema97.anyOf[1].allOf[1].properties.services, data: data36, }; if (vErrors === null) { @@ -71822,8 +72202,8 @@ function validate111( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema96.anyOf[1].allOf[1].type, - parentSchema: schema96.anyOf[1].allOf[1], + schema: schema97.anyOf[1].allOf[1].type, + parentSchema: schema97.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -71856,8 +72236,8 @@ function validate111( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema96.anyOf[2].allOf[0].required, - parentSchema: schema96.anyOf[2].allOf[0], + schema: schema97.anyOf[2].allOf[0].required, + parentSchema: schema97.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -71881,7 +72261,7 @@ function validate111( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema96.anyOf[2].allOf[0].properties.url, + parentSchema: schema97.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -71898,8 +72278,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.url, + schema: schema97.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema97.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -71926,8 +72306,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.name, + schema: schema97.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema97.anyOf[2].allOf[0].properties.name, data: data42, }; if (vErrors === null) { @@ -71952,8 +72332,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.description, + schema: schema97.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema97.anyOf[2].allOf[0].properties.description, data: data43, }; if (vErrors === null) { @@ -71978,8 +72358,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.type, + schema: schema97.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema97.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -72002,11 +72382,11 @@ function validate111( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema96.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema97.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema96.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema96.anyOf[2].allOf[0].properties.type, + schema: schema97.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema97.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -72031,8 +72411,8 @@ function validate111( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema96.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.isPublic, + schema: schema97.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema97.anyOf[2].allOf[0].properties.isPublic, data: data45, }; if (vErrors === null) { @@ -72074,10 +72454,10 @@ function validate111( message: "must have required property '" + missing7 + "'", schema: - schema96.anyOf[2].allOf[0].properties.viewer.items + schema97.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema96.anyOf[2].allOf[0].properties.viewer + schema97.anyOf[2].allOf[0].properties.viewer .items, data: data47, }; @@ -72106,7 +72486,7 @@ function validate111( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[2].allOf[0].properties + schema97.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -72127,10 +72507,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[2].allOf[0].properties + schema97.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema96.anyOf[2].allOf[0].properties + schema97.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -72154,10 +72534,10 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[2].allOf[0].properties.viewer.items + schema97.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema96.anyOf[2].allOf[0].properties.viewer.items, + schema97.anyOf[2].allOf[0].properties.viewer.items, data: data47, }; if (vErrors === null) { @@ -72180,8 +72560,8 @@ function validate111( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema96.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.viewer, + schema: schema97.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema97.anyOf[2].allOf[0].properties.viewer, data: data46, }; if (vErrors === null) { @@ -72226,10 +72606,10 @@ function validate111( missing8 + "'", schema: - schema96.anyOf[2].allOf[0].properties.owner + schema97.anyOf[2].allOf[0].properties.owner .items.required, parentSchema: - schema96.anyOf[2].allOf[0].properties.owner + schema97.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -72261,7 +72641,7 @@ function validate111( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[2].allOf[0].properties + schema97.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -72282,10 +72662,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[2].allOf[0].properties + schema97.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema96.anyOf[2].allOf[0].properties + schema97.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -72309,10 +72689,10 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[2].allOf[0].properties.owner.items + schema97.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema96.anyOf[2].allOf[0].properties.owner.items, + schema97.anyOf[2].allOf[0].properties.owner.items, data: data50, }; if (vErrors === null) { @@ -72335,8 +72715,8 @@ function validate111( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema96.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema96.anyOf[2].allOf[0].properties.owner, + schema: schema97.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema97.anyOf[2].allOf[0].properties.owner, data: data49, }; if (vErrors === null) { @@ -72365,8 +72745,8 @@ function validate111( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema96.anyOf[2].allOf[0].type, - parentSchema: schema96.anyOf[2].allOf[0], + schema: schema97.anyOf[2].allOf[0].type, + parentSchema: schema97.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -72393,7 +72773,7 @@ function validate111( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema96.anyOf[2].allOf[1].properties.type, + parentSchema: schema97.anyOf[2].allOf[1].properties.type, data: data52, }; if (vErrors === null) { @@ -72422,7 +72802,7 @@ function validate111( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema96.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema97.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -72439,8 +72819,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema96.anyOf[2].allOf[1].properties.codeUrl, + schema: schema97.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema97.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -72493,7 +72873,7 @@ function validate111( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[2].allOf[1].properties.services + schema97.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -72514,10 +72894,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[2].allOf[1].properties.services + schema97.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema96.anyOf[2].allOf[1].properties.services + schema97.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -72548,10 +72928,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[2].allOf[1].properties.services.items + schema97.anyOf[2].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema96.anyOf[2].allOf[1].properties.services.items + schema97.anyOf[2].allOf[1].properties.services.items .properties.serviceId, data: data57, }; @@ -72583,10 +72963,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[2].allOf[1].properties.services + schema97.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema96.anyOf[2].allOf[1].properties.services + schema97.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -72615,16 +72995,16 @@ function validate111( keyword: 'enum', params: { allowedValues: - schema96.anyOf[2].allOf[1].properties.services + schema97.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema96.anyOf[2].allOf[1].properties.services + schema97.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema96.anyOf[2].allOf[1].properties.services + schema97.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -72650,9 +73030,9 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[2].allOf[1].properties.services.items.type, + schema97.anyOf[2].allOf[1].properties.services.items.type, parentSchema: - schema96.anyOf[2].allOf[1].properties.services.items, + schema97.anyOf[2].allOf[1].properties.services.items, data: data55, }; if (vErrors === null) { @@ -72675,8 +73055,8 @@ function validate111( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema96.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema96.anyOf[2].allOf[1].properties.services, + schema: schema97.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema97.anyOf[2].allOf[1].properties.services, data: data54, }; if (vErrors === null) { @@ -72700,8 +73080,8 @@ function validate111( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema96.anyOf[2].allOf[1].type, - parentSchema: schema96.anyOf[2].allOf[1], + schema: schema97.anyOf[2].allOf[1].type, + parentSchema: schema97.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -72734,8 +73114,8 @@ function validate111( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema96.anyOf[3].allOf[0].required, - parentSchema: schema96.anyOf[3].allOf[0], + schema: schema97.anyOf[3].allOf[0].required, + parentSchema: schema97.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -72759,7 +73139,7 @@ function validate111( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema96.anyOf[3].allOf[0].properties.url, + parentSchema: schema97.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -72776,8 +73156,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema96.anyOf[3].allOf[0].properties.url, + schema: schema97.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema97.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -72804,8 +73184,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema96.anyOf[3].allOf[0].properties.name, + schema: schema97.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema97.anyOf[3].allOf[0].properties.name, data: data60, }; if (vErrors === null) { @@ -72830,8 +73210,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema96.anyOf[3].allOf[0].properties.description, + schema: schema97.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema97.anyOf[3].allOf[0].properties.description, data: data61, }; if (vErrors === null) { @@ -72856,8 +73236,8 @@ function validate111( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema96.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema96.anyOf[3].allOf[0].properties.type, + schema: schema97.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema97.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -72881,11 +73261,11 @@ function validate111( keyword: 'enum', params: { allowedValues: - schema96.anyOf[3].allOf[0].properties.type.enum, + schema97.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema96.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema96.anyOf[3].allOf[0].properties.type, + schema: schema97.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema97.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -72910,8 +73290,8 @@ function validate111( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema96.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema96.anyOf[3].allOf[0].properties.isPublic, + schema: schema97.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema97.anyOf[3].allOf[0].properties.isPublic, data: data63, }; if (vErrors === null) { @@ -72955,10 +73335,10 @@ function validate111( missing10 + "'", schema: - schema96.anyOf[3].allOf[0].properties.viewer + schema97.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema96.anyOf[3].allOf[0].properties.viewer + schema97.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -72990,7 +73370,7 @@ function validate111( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[3].allOf[0].properties + schema97.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -73014,10 +73394,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[3].allOf[0].properties + schema97.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema96.anyOf[3].allOf[0].properties + schema97.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -73041,10 +73421,10 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[3].allOf[0].properties.viewer.items + schema97.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema96.anyOf[3].allOf[0].properties.viewer + schema97.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -73068,9 +73448,9 @@ function validate111( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema96.anyOf[3].allOf[0].properties.viewer.type, + schema: schema97.anyOf[3].allOf[0].properties.viewer.type, parentSchema: - schema96.anyOf[3].allOf[0].properties.viewer, + schema97.anyOf[3].allOf[0].properties.viewer, data: data64, }; if (vErrors === null) { @@ -73118,10 +73498,10 @@ function validate111( missing11 + "'", schema: - schema96.anyOf[3].allOf[0].properties.owner + schema97.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema96.anyOf[3].allOf[0].properties.owner + schema97.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -73153,7 +73533,7 @@ function validate111( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[3].allOf[0] + schema97.anyOf[3].allOf[0] .properties.owner.items.properties .url, data: data69, @@ -73178,10 +73558,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[3].allOf[0].properties + schema97.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema96.anyOf[3].allOf[0].properties + schema97.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data69, }; @@ -73205,10 +73585,10 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[3].allOf[0].properties.owner + schema97.anyOf[3].allOf[0].properties.owner .items.type, parentSchema: - schema96.anyOf[3].allOf[0].properties.owner + schema97.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -73233,9 +73613,9 @@ function validate111( params: { type: 'array' }, message: 'must be array', schema: - schema96.anyOf[3].allOf[0].properties.owner.type, + schema97.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema96.anyOf[3].allOf[0].properties.owner, + schema97.anyOf[3].allOf[0].properties.owner, data: data67, }; if (vErrors === null) { @@ -73264,8 +73644,8 @@ function validate111( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema96.anyOf[3].allOf[0].type, - parentSchema: schema96.anyOf[3].allOf[0], + schema: schema97.anyOf[3].allOf[0].type, + parentSchema: schema97.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -73289,8 +73669,8 @@ function validate111( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema96.anyOf[3].allOf[1].required, - parentSchema: schema96.anyOf[3].allOf[1], + schema: schema97.anyOf[3].allOf[1].required, + parentSchema: schema97.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -73311,7 +73691,7 @@ function validate111( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema96.anyOf[3].allOf[1].properties.type, + parentSchema: schema97.anyOf[3].allOf[1].properties.type, data: data70, }; if (vErrors === null) { @@ -73353,10 +73733,10 @@ function validate111( message: "must have required property '" + missing13 + "'", schema: - schema96.anyOf[3].allOf[1].properties.devices.items + schema97.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema96.anyOf[3].allOf[1].properties.devices.items, + schema97.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -73383,7 +73763,7 @@ function validate111( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema96.anyOf[3].allOf[1].properties + schema97.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data73, }; @@ -73404,10 +73784,10 @@ function validate111( params: { type: 'string' }, message: 'must be string', schema: - schema96.anyOf[3].allOf[1].properties.devices + schema97.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema96.anyOf[3].allOf[1].properties.devices + schema97.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data73, }; @@ -73431,10 +73811,10 @@ function validate111( params: { type: 'object' }, message: 'must be object', schema: - schema96.anyOf[3].allOf[1].properties.devices.items + schema97.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema96.anyOf[3].allOf[1].properties.devices.items, + schema97.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -73457,8 +73837,8 @@ function validate111( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema96.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema96.anyOf[3].allOf[1].properties.devices, + schema: schema97.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema97.anyOf[3].allOf[1].properties.devices, data: data71, }; if (vErrors === null) { @@ -73482,8 +73862,8 @@ function validate111( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema96.anyOf[3].allOf[1].type, - parentSchema: schema96.anyOf[3].allOf[1], + schema: schema97.anyOf[3].allOf[1].type, + parentSchema: schema97.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -73508,8 +73888,8 @@ function validate111( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema96.anyOf, - parentSchema: schema96, + schema: schema97.anyOf, + parentSchema: schema97, data, }; if (vErrors === null) { @@ -73518,7 +73898,7 @@ function validate111( vErrors.push(err124); } errors++; - validate111.errors = vErrors; + validate112.errors = vErrors; return false; } else { errors = _errs0; @@ -73530,11 +73910,11 @@ function validate111( } } } - validate111.errors = vErrors; + validate112.errors = vErrors; return errors === 0; } -exports.validateCallbackRequest = validate112; -const schema97 = { +exports.validateCallbackRequest = validate113; +const schema98 = { title: 'Callback', type: 'object', properties: { callbackType: { type: 'string' } }, @@ -73545,7 +73925,7 @@ const schema97 = { 'x-location': '#/components/schemas/callback_request', 'x-schema-type': 'request', }; -function validate112( +function validate113( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -73555,15 +73935,15 @@ function validate112( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate112.errors = [ + validate113.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema97.required, - parentSchema: schema97, + schema: schema98.required, + parentSchema: schema98, data, }, ]; @@ -73572,15 +73952,15 @@ function validate112( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate112.errors = [ + validate113.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema97.properties.callbackType.type, - parentSchema: schema97.properties.callbackType, + schema: schema98.properties.callbackType.type, + parentSchema: schema98.properties.callbackType, data: data0, }, ]; @@ -73589,26 +73969,26 @@ function validate112( } } } else { - validate112.errors = [ + validate113.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema97.type, - parentSchema: schema97, + schema: schema98.type, + parentSchema: schema98, data, }, ]; return false; } } - validate112.errors = vErrors; + validate113.errors = vErrors; return errors === 0; } -exports.validateCallbackResponse = validate113; -const schema98 = { +exports.validateCallbackResponse = validate114; +const schema99 = { title: 'Callback', type: 'object', properties: { callbackType: { type: 'string' } }, @@ -73619,7 +73999,7 @@ const schema98 = { 'x-location': '#/components/schemas/callback_response', 'x-schema-type': 'response', }; -function validate113( +function validate114( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -73629,15 +74009,15 @@ function validate113( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate113.errors = [ + validate114.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema98.required, - parentSchema: schema98, + schema: schema99.required, + parentSchema: schema99, data, }, ]; @@ -73646,15 +74026,15 @@ function validate113( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate113.errors = [ + validate114.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema98.properties.callbackType.type, - parentSchema: schema98.properties.callbackType, + schema: schema99.properties.callbackType.type, + parentSchema: schema99.properties.callbackType, data: data0, }, ]; @@ -73663,26 +74043,26 @@ function validate113( } } } else { - validate113.errors = [ + validate114.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema98.type, - parentSchema: schema98, + schema: schema99.type, + parentSchema: schema99, data, }, ]; return false; } } - validate113.errors = vErrors; + validate114.errors = vErrors; return errors === 0; } -exports.validateEventCallbackRequest = validate114; -const schema99 = { +exports.validateEventCallbackRequest = validate115; +const schema100 = { title: 'Event Callback', allOf: [ { @@ -73707,7 +74087,7 @@ const schema99 = { 'x-location': '#/components/schemas/event_callback_request', 'x-schema-type': 'request', }; -function validate114( +function validate115( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -73718,15 +74098,15 @@ function validate114( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate114.errors = [ + validate115.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema99.allOf[0].required, - parentSchema: schema99.allOf[0], + schema: schema100.allOf[0].required, + parentSchema: schema100.allOf[0], data, }, ]; @@ -73735,15 +74115,15 @@ function validate114( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate114.errors = [ + validate115.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema99.allOf[0].properties.callbackType.type, - parentSchema: schema99.allOf[0].properties.callbackType, + schema: schema100.allOf[0].properties.callbackType.type, + parentSchema: schema100.allOf[0].properties.callbackType, data: data0, }, ]; @@ -73752,15 +74132,15 @@ function validate114( } } } else { - validate114.errors = [ + validate115.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema99.allOf[0].type, - parentSchema: schema99.allOf[0], + schema: schema100.allOf[0].type, + parentSchema: schema100.allOf[0], data, }, ]; @@ -73777,15 +74157,15 @@ function validate114( (data.callbackType === undefined && (missing1 = 'callbackType')) || (data.eventType === undefined && (missing1 = 'eventType')) ) { - validate114.errors = [ + validate115.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema99.allOf[1].required, - parentSchema: schema99.allOf[1], + schema: schema100.allOf[1].required, + parentSchema: schema100.allOf[1], data, }, ]; @@ -73795,32 +74175,32 @@ function validate114( let data1 = data.callbackType; const _errs6 = errors; if (typeof data1 !== 'string') { - validate114.errors = [ + validate115.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/1/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema99.allOf[1].properties.callbackType.type, - parentSchema: schema99.allOf[1].properties.callbackType, + schema: schema100.allOf[1].properties.callbackType.type, + parentSchema: schema100.allOf[1].properties.callbackType, data: data1, }, ]; return false; } if (!(data1 === 'event')) { - validate114.errors = [ + validate115.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/1/properties/callbackType/enum', keyword: 'enum', params: { - allowedValues: schema99.allOf[1].properties.callbackType.enum, + allowedValues: schema100.allOf[1].properties.callbackType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema99.allOf[1].properties.callbackType.enum, - parentSchema: schema99.allOf[1].properties.callbackType, + schema: schema100.allOf[1].properties.callbackType.enum, + parentSchema: schema100.allOf[1].properties.callbackType, data: data1, }, ]; @@ -73835,15 +74215,15 @@ function validate114( let data2 = data.eventType; const _errs8 = errors; if (typeof data2 !== 'string') { - validate114.errors = [ + validate115.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema99.allOf[1].properties.eventType.type, - parentSchema: schema99.allOf[1].properties.eventType, + schema: schema100.allOf[1].properties.eventType.type, + parentSchema: schema100.allOf[1].properties.eventType, data: data2, }, ]; @@ -73856,15 +74236,15 @@ function validate114( } } } else { - validate114.errors = [ + validate115.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema99.allOf[1].type, - parentSchema: schema99.allOf[1], + schema: schema100.allOf[1].type, + parentSchema: schema100.allOf[1], data, }, ]; @@ -73873,11 +74253,11 @@ function validate114( } var valid0 = _errs4 === errors; } - validate114.errors = vErrors; + validate115.errors = vErrors; return errors === 0; } -exports.validateEventCallbackResponse = validate115; -const schema100 = { +exports.validateEventCallbackResponse = validate116; +const schema101 = { title: 'Event Callback', allOf: [ { @@ -73902,7 +74282,7 @@ const schema100 = { 'x-location': '#/components/schemas/event_callback_response', 'x-schema-type': 'response', }; -function validate115( +function validate116( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -73913,15 +74293,15 @@ function validate115( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate115.errors = [ + validate116.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema100.allOf[0].required, - parentSchema: schema100.allOf[0], + schema: schema101.allOf[0].required, + parentSchema: schema101.allOf[0], data, }, ]; @@ -73930,15 +74310,15 @@ function validate115( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate115.errors = [ + validate116.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema100.allOf[0].properties.callbackType.type, - parentSchema: schema100.allOf[0].properties.callbackType, + schema: schema101.allOf[0].properties.callbackType.type, + parentSchema: schema101.allOf[0].properties.callbackType, data: data0, }, ]; @@ -73947,15 +74327,15 @@ function validate115( } } } else { - validate115.errors = [ + validate116.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema100.allOf[0].type, - parentSchema: schema100.allOf[0], + schema: schema101.allOf[0].type, + parentSchema: schema101.allOf[0], data, }, ]; @@ -73972,15 +74352,15 @@ function validate115( (data.callbackType === undefined && (missing1 = 'callbackType')) || (data.eventType === undefined && (missing1 = 'eventType')) ) { - validate115.errors = [ + validate116.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema100.allOf[1].required, - parentSchema: schema100.allOf[1], + schema: schema101.allOf[1].required, + parentSchema: schema101.allOf[1], data, }, ]; @@ -73990,32 +74370,32 @@ function validate115( let data1 = data.callbackType; const _errs6 = errors; if (typeof data1 !== 'string') { - validate115.errors = [ + validate116.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/1/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema100.allOf[1].properties.callbackType.type, - parentSchema: schema100.allOf[1].properties.callbackType, + schema: schema101.allOf[1].properties.callbackType.type, + parentSchema: schema101.allOf[1].properties.callbackType, data: data1, }, ]; return false; } if (!(data1 === 'event')) { - validate115.errors = [ + validate116.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/1/properties/callbackType/enum', keyword: 'enum', params: { - allowedValues: schema100.allOf[1].properties.callbackType.enum, + allowedValues: schema101.allOf[1].properties.callbackType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema100.allOf[1].properties.callbackType.enum, - parentSchema: schema100.allOf[1].properties.callbackType, + schema: schema101.allOf[1].properties.callbackType.enum, + parentSchema: schema101.allOf[1].properties.callbackType, data: data1, }, ]; @@ -74030,15 +74410,15 @@ function validate115( let data2 = data.eventType; const _errs8 = errors; if (typeof data2 !== 'string') { - validate115.errors = [ + validate116.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema100.allOf[1].properties.eventType.type, - parentSchema: schema100.allOf[1].properties.eventType, + schema: schema101.allOf[1].properties.eventType.type, + parentSchema: schema101.allOf[1].properties.eventType, data: data2, }, ]; @@ -74051,15 +74431,15 @@ function validate115( } } } else { - validate115.errors = [ + validate116.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema100.allOf[1].type, - parentSchema: schema100.allOf[1], + schema: schema101.allOf[1].type, + parentSchema: schema101.allOf[1], data, }, ]; @@ -74068,11 +74448,11 @@ function validate115( } var valid0 = _errs4 === errors; } - validate115.errors = vErrors; + validate116.errors = vErrors; return errors === 0; } -exports.validateDeviceChangedEventCallbackRequest = validate116; -const schema101 = { +exports.validateDeviceChangedEventCallbackRequest = validate117; +const schema102 = { title: 'Device Changed Event Callback', allOf: [ { @@ -74471,7 +74851,7 @@ const schema101 = { 'x-location': '#/components/schemas/device_changed_request', 'x-schema-type': 'request', }; -function validate116( +function validate117( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -74483,15 +74863,15 @@ function validate116( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate116.errors = [ + validate117.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema101.allOf[0].allOf[0].required, - parentSchema: schema101.allOf[0].allOf[0], + schema: schema102.allOf[0].allOf[0].required, + parentSchema: schema102.allOf[0].allOf[0], data, }, ]; @@ -74500,15 +74880,15 @@ function validate116( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate116.errors = [ + validate117.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema101.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema101.allOf[0].allOf[0].properties.callbackType, + schema: schema102.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema102.allOf[0].allOf[0].properties.callbackType, data: data0, }, ]; @@ -74517,15 +74897,15 @@ function validate116( } } } else { - validate116.errors = [ + validate117.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema101.allOf[0].allOf[0].type, - parentSchema: schema101.allOf[0].allOf[0], + schema: schema102.allOf[0].allOf[0].type, + parentSchema: schema102.allOf[0].allOf[0], data, }, ]; @@ -74542,15 +74922,15 @@ function validate116( (data.callbackType === undefined && (missing1 = 'callbackType')) || (data.eventType === undefined && (missing1 = 'eventType')) ) { - validate116.errors = [ + validate117.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema101.allOf[0].allOf[1].required, - parentSchema: schema101.allOf[0].allOf[1], + schema: schema102.allOf[0].allOf[1].required, + parentSchema: schema102.allOf[0].allOf[1], data, }, ]; @@ -74560,33 +74940,33 @@ function validate116( let data1 = data.callbackType; const _errs7 = errors; if (typeof data1 !== 'string') { - validate116.errors = [ + validate117.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema101.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema101.allOf[0].allOf[1].properties.callbackType, + schema: schema102.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema102.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; return false; } if (!(data1 === 'event')) { - validate116.errors = [ + validate117.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', keyword: 'enum', params: { allowedValues: - schema101.allOf[0].allOf[1].properties.callbackType.enum, + schema102.allOf[0].allOf[1].properties.callbackType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema101.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema101.allOf[0].allOf[1].properties.callbackType, + schema: schema102.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema102.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; @@ -74601,15 +74981,15 @@ function validate116( let data2 = data.eventType; const _errs9 = errors; if (typeof data2 !== 'string') { - validate116.errors = [ + validate117.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema101.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema101.allOf[0].allOf[1].properties.eventType, + schema: schema102.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema102.allOf[0].allOf[1].properties.eventType, data: data2, }, ]; @@ -74622,15 +75002,15 @@ function validate116( } } } else { - validate116.errors = [ + validate117.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema101.allOf[0].allOf[1].type, - parentSchema: schema101.allOf[0].allOf[1], + schema: schema102.allOf[0].allOf[1].type, + parentSchema: schema102.allOf[0].allOf[1], data, }, ]; @@ -74649,15 +75029,15 @@ function validate116( (data.eventType === undefined && (missing2 = 'eventType')) || (data.device === undefined && (missing2 = 'device')) ) { - validate116.errors = [ + validate117.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema101.allOf[1].required, - parentSchema: schema101.allOf[1], + schema: schema102.allOf[1].required, + parentSchema: schema102.allOf[1], data, }, ]; @@ -74667,30 +75047,30 @@ function validate116( let data3 = data.eventType; const _errs13 = errors; if (typeof data3 !== 'string') { - validate116.errors = [ + validate117.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema101.allOf[1].properties.eventType.type, - parentSchema: schema101.allOf[1].properties.eventType, + schema: schema102.allOf[1].properties.eventType.type, + parentSchema: schema102.allOf[1].properties.eventType, data: data3, }, ]; return false; } if (!(data3 === 'device-changed')) { - validate116.errors = [ + validate117.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/enum', keyword: 'enum', - params: { allowedValues: schema101.allOf[1].properties.eventType.enum }, + params: { allowedValues: schema102.allOf[1].properties.eventType.enum }, message: 'must be equal to one of the allowed values', - schema: schema101.allOf[1].properties.eventType.enum, - parentSchema: schema101.allOf[1].properties.eventType, + schema: schema102.allOf[1].properties.eventType.enum, + parentSchema: schema102.allOf[1].properties.eventType, data: data3, }, ]; @@ -74723,9 +75103,9 @@ function validate116( params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0].required, + schema102.allOf[1].properties.device.anyOf[0].allOf[0].required, parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0], + schema102.allOf[1].properties.device.anyOf[0].allOf[0], data: data4, }; if (vErrors === null) { @@ -74747,10 +75127,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] + schema102.allOf[1].properties.device.anyOf[0].allOf[0] .properties.name.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] + schema102.allOf[1].properties.device.anyOf[0].allOf[0] .properties.name, data: data5, }; @@ -74778,10 +75158,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] + schema102.allOf[1].properties.device.anyOf[0].allOf[0] .properties.description.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] + schema102.allOf[1].properties.device.anyOf[0].allOf[0] .properties.description, data: data6, }; @@ -74809,10 +75189,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] + schema102.allOf[1].properties.device.anyOf[0].allOf[0] .properties.type.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] + schema102.allOf[1].properties.device.anyOf[0].allOf[0] .properties.type, data: data7, }; @@ -74838,15 +75218,15 @@ function validate116( keyword: 'enum', params: { allowedValues: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] + schema102.allOf[1].properties.device.anyOf[0].allOf[0] .properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] + schema102.allOf[1].properties.device.anyOf[0].allOf[0] .properties.type.enum, parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] + schema102.allOf[1].properties.device.anyOf[0].allOf[0] .properties.type, data: data7, }; @@ -74874,10 +75254,10 @@ function validate116( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] + schema102.allOf[1].properties.device.anyOf[0].allOf[0] .properties.isPublic.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[0] + schema102.allOf[1].properties.device.anyOf[0].allOf[0] .properties.isPublic, data: data8, }; @@ -74926,11 +75306,11 @@ function validate116( missing4 + "'", schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[0].properties.viewer .items, data: data10, @@ -74965,7 +75345,7 @@ function validate116( '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[0].allOf[0] .properties.viewer.items .properties.url, @@ -74991,11 +75371,11 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[0].properties .viewer.items.properties.url, data: data11, @@ -75021,10 +75401,10 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device.anyOf[0] + schema102.allOf[1].properties.device.anyOf[0] .allOf[0].properties.viewer.items.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[0] + schema102.allOf[1].properties.device.anyOf[0] .allOf[0].properties.viewer.items, data: data10, }; @@ -75050,10 +75430,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device.anyOf[0] + schema102.allOf[1].properties.device.anyOf[0] .allOf[0].properties.viewer.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[0] + schema102.allOf[1].properties.device.anyOf[0] .allOf[0].properties.viewer, data: data9, }; @@ -75103,11 +75483,11 @@ function validate116( missing5 + "'", schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[0].properties.owner .items.required, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[0].properties.owner .items, data: data13, @@ -75142,7 +75522,7 @@ function validate116( '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[0].allOf[0] .properties.owner.items .properties.url, @@ -75168,12 +75548,12 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[0].allOf[0] .properties.owner.items .properties.url.type, parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[0].allOf[0] .properties.owner.items .properties.url, @@ -75200,11 +75580,11 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[0].properties.owner.items .type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[0].properties.owner.items, data: data13, }; @@ -75230,10 +75610,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device.anyOf[0] + schema102.allOf[1].properties.device.anyOf[0] .allOf[0].properties.owner.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[0] + schema102.allOf[1].properties.device.anyOf[0] .allOf[0].properties.owner, data: data12, }; @@ -75262,8 +75642,8 @@ function validate116( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema101.allOf[1].properties.device.anyOf[0].allOf[0].type, - parentSchema: schema101.allOf[1].properties.device.anyOf[0].allOf[0], + schema: schema102.allOf[1].properties.device.anyOf[0].allOf[0].type, + parentSchema: schema102.allOf[1].properties.device.anyOf[0].allOf[0], data: data4, }; if (vErrors === null) { @@ -75292,7 +75672,7 @@ function validate116( message: 'must be equal to constant', schema: 'cloud instantiable', parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] + schema102.allOf[1].properties.device.anyOf[0].allOf[1] .properties.type, data: data15, }; @@ -75324,7 +75704,7 @@ function validate116( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] + schema102.allOf[1].properties.device.anyOf[0].allOf[1] .properties.instantiateUrl, data: data16, }; @@ -75344,10 +75724,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] + schema102.allOf[1].properties.device.anyOf[0].allOf[1] .properties.instantiateUrl.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] + schema102.allOf[1].properties.device.anyOf[0].allOf[1] .properties.instantiateUrl, data: data16, }; @@ -75402,7 +75782,7 @@ function validate116( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data19, @@ -75427,11 +75807,11 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data19, @@ -75466,11 +75846,11 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceId, data: data20, @@ -75503,11 +75883,11 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceDirection, data: data21, @@ -75537,7 +75917,7 @@ function validate116( keyword: 'enum', params: { allowedValues: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceDirection .enum, @@ -75545,11 +75925,11 @@ function validate116( message: 'must be equal to one of the allowed values', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceDirection, data: data21, @@ -75577,10 +75957,10 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device.anyOf[0] + schema102.allOf[1].properties.device.anyOf[0] .allOf[1].properties.services.items.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[0] + schema102.allOf[1].properties.device.anyOf[0] .allOf[1].properties.services.items, data: data18, }; @@ -75606,10 +75986,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] + schema102.allOf[1].properties.device.anyOf[0].allOf[1] .properties.services.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1] + schema102.allOf[1].properties.device.anyOf[0].allOf[1] .properties.services, data: data17, }; @@ -75634,9 +76014,9 @@ function validate116( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema101.allOf[1].properties.device.anyOf[0].allOf[1].type, + schema: schema102.allOf[1].properties.device.anyOf[0].allOf[1].type, parentSchema: - schema101.allOf[1].properties.device.anyOf[0].allOf[1], + schema102.allOf[1].properties.device.anyOf[0].allOf[1], data: data4, }; if (vErrors === null) { @@ -75670,9 +76050,9 @@ function validate116( params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0].required, + schema102.allOf[1].properties.device.anyOf[1].allOf[0].required, parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0], + schema102.allOf[1].properties.device.anyOf[1].allOf[0], data: data4, }; if (vErrors === null) { @@ -75694,10 +76074,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] + schema102.allOf[1].properties.device.anyOf[1].allOf[0] .properties.name.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] + schema102.allOf[1].properties.device.anyOf[1].allOf[0] .properties.name, data: data22, }; @@ -75725,10 +76105,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] + schema102.allOf[1].properties.device.anyOf[1].allOf[0] .properties.description.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] + schema102.allOf[1].properties.device.anyOf[1].allOf[0] .properties.description, data: data23, }; @@ -75756,10 +76136,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] + schema102.allOf[1].properties.device.anyOf[1].allOf[0] .properties.type.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] + schema102.allOf[1].properties.device.anyOf[1].allOf[0] .properties.type, data: data24, }; @@ -75785,15 +76165,15 @@ function validate116( keyword: 'enum', params: { allowedValues: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] + schema102.allOf[1].properties.device.anyOf[1].allOf[0] .properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] + schema102.allOf[1].properties.device.anyOf[1].allOf[0] .properties.type.enum, parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] + schema102.allOf[1].properties.device.anyOf[1].allOf[0] .properties.type, data: data24, }; @@ -75821,10 +76201,10 @@ function validate116( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] + schema102.allOf[1].properties.device.anyOf[1].allOf[0] .properties.isPublic.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0] + schema102.allOf[1].properties.device.anyOf[1].allOf[0] .properties.isPublic, data: data25, }; @@ -75873,11 +76253,11 @@ function validate116( missing7 + "'", schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[0].properties.viewer .items.required, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[0].properties.viewer .items, data: data27, @@ -75912,7 +76292,7 @@ function validate116( '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[1].allOf[0] .properties.viewer.items .properties.url, @@ -75938,12 +76318,12 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[1].allOf[0] .properties.viewer.items .properties.url.type, parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[1].allOf[0] .properties.viewer.items .properties.url, @@ -75970,11 +76350,11 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[0].properties.viewer .items, data: data27, @@ -76001,10 +76381,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device.anyOf[1] + schema102.allOf[1].properties.device.anyOf[1] .allOf[0].properties.viewer.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[1] + schema102.allOf[1].properties.device.anyOf[1] .allOf[0].properties.viewer, data: data26, }; @@ -76054,11 +76434,11 @@ function validate116( missing8 + "'", schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[0].properties.owner .items.required, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[0].properties.owner .items, data: data30, @@ -76093,7 +76473,7 @@ function validate116( '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[1].allOf[0] .properties.owner.items .properties.url, @@ -76119,12 +76499,12 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[1].allOf[0] .properties.owner.items .properties.url.type, parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[1].allOf[0] .properties.owner.items .properties.url, @@ -76151,11 +76531,11 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[0].properties.owner .items.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[0].properties.owner .items, data: data30, @@ -76182,10 +76562,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device.anyOf[1] + schema102.allOf[1].properties.device.anyOf[1] .allOf[0].properties.owner.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[1] + schema102.allOf[1].properties.device.anyOf[1] .allOf[0].properties.owner, data: data29, }; @@ -76214,9 +76594,9 @@ function validate116( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema101.allOf[1].properties.device.anyOf[1].allOf[0].type, + schema: schema102.allOf[1].properties.device.anyOf[1].allOf[0].type, parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[0], + schema102.allOf[1].properties.device.anyOf[1].allOf[0], data: data4, }; if (vErrors === null) { @@ -76245,7 +76625,7 @@ function validate116( message: 'must be equal to constant', schema: 'device', parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1] + schema102.allOf[1].properties.device.anyOf[1].allOf[1] .properties.type, data: data32, }; @@ -76277,7 +76657,7 @@ function validate116( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties.device.anyOf[1] + schema102.allOf[1].properties.device.anyOf[1] .allOf[1].properties.experiment, data: data33, }; @@ -76297,10 +76677,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1] + schema102.allOf[1].properties.device.anyOf[1].allOf[1] .properties.experiment.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1] + schema102.allOf[1].properties.device.anyOf[1].allOf[1] .properties.experiment, data: data33, }; @@ -76355,7 +76735,7 @@ function validate116( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[1].properties .services.items.properties .serviceType, @@ -76381,11 +76761,11 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data36, @@ -76420,11 +76800,11 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[1].properties.services .items.properties.serviceId, data: data37, @@ -76457,12 +76837,12 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[1].properties.services .items.properties.serviceDirection .type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data38, @@ -76492,7 +76872,7 @@ function validate116( keyword: 'enum', params: { allowedValues: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[1].properties .services.items.properties .serviceDirection.enum, @@ -76500,12 +76880,12 @@ function validate116( message: 'must be equal to one of the allowed values', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[1].properties.services .items.properties.serviceDirection .enum, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data38, @@ -76533,10 +76913,10 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device.anyOf[1] + schema102.allOf[1].properties.device.anyOf[1] .allOf[1].properties.services.items.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[1] + schema102.allOf[1].properties.device.anyOf[1] .allOf[1].properties.services.items, data: data35, }; @@ -76562,10 +76942,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1] + schema102.allOf[1].properties.device.anyOf[1].allOf[1] .properties.services.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1] + schema102.allOf[1].properties.device.anyOf[1].allOf[1] .properties.services, data: data34, }; @@ -76591,9 +76971,9 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1].type, + schema102.allOf[1].properties.device.anyOf[1].allOf[1].type, parentSchema: - schema101.allOf[1].properties.device.anyOf[1].allOf[1], + schema102.allOf[1].properties.device.anyOf[1].allOf[1], data: data4, }; if (vErrors === null) { @@ -76627,10 +77007,10 @@ function validate116( params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] + schema102.allOf[1].properties.device.anyOf[2].allOf[0] .required, parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0], + schema102.allOf[1].properties.device.anyOf[2].allOf[0], data: data4, }; if (vErrors === null) { @@ -76652,10 +77032,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] + schema102.allOf[1].properties.device.anyOf[2].allOf[0] .properties.name.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] + schema102.allOf[1].properties.device.anyOf[2].allOf[0] .properties.name, data: data39, }; @@ -76683,10 +77063,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] + schema102.allOf[1].properties.device.anyOf[2].allOf[0] .properties.description.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] + schema102.allOf[1].properties.device.anyOf[2].allOf[0] .properties.description, data: data40, }; @@ -76714,10 +77094,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] + schema102.allOf[1].properties.device.anyOf[2].allOf[0] .properties.type.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] + schema102.allOf[1].properties.device.anyOf[2].allOf[0] .properties.type, data: data41, }; @@ -76743,15 +77123,15 @@ function validate116( keyword: 'enum', params: { allowedValues: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] + schema102.allOf[1].properties.device.anyOf[2].allOf[0] .properties.type.enum, parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0] + schema102.allOf[1].properties.device.anyOf[2].allOf[0] .properties.type, data: data41, }; @@ -76779,10 +77159,10 @@ function validate116( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[0].properties.isPublic.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[0].properties.isPublic, data: data42, }; @@ -76831,11 +77211,11 @@ function validate116( missing10 + "'", schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[0].properties.viewer .items.required, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[0].properties.viewer .items, data: data44, @@ -76870,7 +77250,7 @@ function validate116( '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[2].allOf[0] .properties.viewer.items .properties.url, @@ -76896,12 +77276,12 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[2].allOf[0] .properties.viewer.items .properties.url.type, parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[2].allOf[0] .properties.viewer.items .properties.url, @@ -76928,11 +77308,11 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[0].properties.viewer .items.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[0].properties.viewer .items, data: data44, @@ -76959,10 +77339,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[0].properties.viewer.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[0].properties.viewer, data: data43, }; @@ -77012,11 +77392,11 @@ function validate116( missing11 + "'", schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[0].properties.owner .items.required, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[0].properties.owner .items, data: data47, @@ -77051,7 +77431,7 @@ function validate116( '"', schema: 'uri', parentSchema: - schema101.allOf[1] + schema102.allOf[1] .properties.device .anyOf[2].allOf[0] .properties.owner.items @@ -77078,12 +77458,12 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[2].allOf[0] .properties.owner.items .properties.url.type, parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[2].allOf[0] .properties.owner.items .properties.url, @@ -77110,11 +77490,11 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[0].properties.owner .items.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[0].properties.owner .items, data: data47, @@ -77141,10 +77521,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[0].properties.owner.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[0].properties.owner, data: data46, }; @@ -77174,9 +77554,9 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0].type, + schema102.allOf[1].properties.device.anyOf[2].allOf[0].type, parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[0], + schema102.allOf[1].properties.device.anyOf[2].allOf[0], data: data4, }; if (vErrors === null) { @@ -77205,7 +77585,7 @@ function validate116( message: 'must be equal to constant', schema: 'edge instantiable', parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[1] + schema102.allOf[1].properties.device.anyOf[2].allOf[1] .properties.type, data: data49, }; @@ -77237,7 +77617,7 @@ function validate116( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[1].properties.codeUrl, data: data50, }; @@ -77257,10 +77637,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[1].properties.codeUrl.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[1].properties.codeUrl, data: data50, }; @@ -77315,7 +77695,7 @@ function validate116( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceType, @@ -77341,12 +77721,12 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceType.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceType, @@ -77382,11 +77762,11 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data54, @@ -77419,12 +77799,12 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceDirection.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceDirection, @@ -77455,7 +77835,7 @@ function validate116( keyword: 'enum', params: { allowedValues: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceDirection.enum, @@ -77463,12 +77843,12 @@ function validate116( message: 'must be equal to one of the allowed values', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceDirection.enum, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceDirection, @@ -77497,10 +77877,10 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[1].properties.services.items.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[1].properties.services.items, data: data52, }; @@ -77526,10 +77906,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[1].properties.services.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[2] + schema102.allOf[1].properties.device.anyOf[2] .allOf[1].properties.services, data: data51, }; @@ -77555,9 +77935,9 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device.anyOf[2].allOf[1].type, + schema102.allOf[1].properties.device.anyOf[2].allOf[1].type, parentSchema: - schema101.allOf[1].properties.device.anyOf[2].allOf[1], + schema102.allOf[1].properties.device.anyOf[2].allOf[1], data: data4, }; if (vErrors === null) { @@ -77591,10 +77971,10 @@ function validate116( params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0] + schema102.allOf[1].properties.device.anyOf[3].allOf[0] .required, parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0], + schema102.allOf[1].properties.device.anyOf[3].allOf[0], data: data4, }; if (vErrors === null) { @@ -77616,10 +77996,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0] + schema102.allOf[1].properties.device.anyOf[3].allOf[0] .properties.name.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0] + schema102.allOf[1].properties.device.anyOf[3].allOf[0] .properties.name, data: data56, }; @@ -77647,10 +78027,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0] + schema102.allOf[1].properties.device.anyOf[3].allOf[0] .properties.description.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0] + schema102.allOf[1].properties.device.anyOf[3].allOf[0] .properties.description, data: data57, }; @@ -77678,10 +78058,10 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties.device.anyOf[3] + schema102.allOf[1].properties.device.anyOf[3] .allOf[0].properties.type.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[3] + schema102.allOf[1].properties.device.anyOf[3] .allOf[0].properties.type, data: data58, }; @@ -77707,15 +78087,15 @@ function validate116( keyword: 'enum', params: { allowedValues: - schema101.allOf[1].properties.device.anyOf[3] + schema102.allOf[1].properties.device.anyOf[3] .allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema101.allOf[1].properties.device.anyOf[3] + schema102.allOf[1].properties.device.anyOf[3] .allOf[0].properties.type.enum, parentSchema: - schema101.allOf[1].properties.device.anyOf[3] + schema102.allOf[1].properties.device.anyOf[3] .allOf[0].properties.type, data: data58, }; @@ -77743,10 +78123,10 @@ function validate116( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema101.allOf[1].properties.device.anyOf[3] + schema102.allOf[1].properties.device.anyOf[3] .allOf[0].properties.isPublic.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[3] + schema102.allOf[1].properties.device.anyOf[3] .allOf[0].properties.isPublic, data: data59, }; @@ -77795,11 +78175,11 @@ function validate116( missing13 + "'", schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[0].properties.viewer .items, data: data61, @@ -77834,7 +78214,7 @@ function validate116( '"', schema: 'uri', parentSchema: - schema101.allOf[1] + schema102.allOf[1] .properties.device .anyOf[3].allOf[0] .properties.viewer.items @@ -77861,12 +78241,12 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[3].allOf[0] .properties.viewer.items .properties.url.type, parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[3].allOf[0] .properties.viewer.items .properties.url, @@ -77893,11 +78273,11 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[0].properties.viewer .items.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[0].properties.viewer .items, data: data61, @@ -77924,10 +78304,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device.anyOf[3] + schema102.allOf[1].properties.device.anyOf[3] .allOf[0].properties.viewer.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[3] + schema102.allOf[1].properties.device.anyOf[3] .allOf[0].properties.viewer, data: data60, }; @@ -77981,11 +78361,11 @@ function validate116( missing14 + "'", schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[0].properties .owner.items.required, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[0].properties .owner.items, data: data64, @@ -78020,7 +78400,7 @@ function validate116( '"', schema: 'uri', parentSchema: - schema101.allOf[1] + schema102.allOf[1] .properties.device .anyOf[3].allOf[0] .properties.owner.items @@ -78047,13 +78427,13 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1] + schema102.allOf[1] .properties.device .anyOf[3].allOf[0] .properties.owner.items .properties.url.type, parentSchema: - schema101.allOf[1] + schema102.allOf[1] .properties.device .anyOf[3].allOf[0] .properties.owner.items @@ -78081,11 +78461,11 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[0].properties.owner .items.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[0].properties.owner .items, data: data64, @@ -78112,10 +78492,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[0].properties.owner, data: data63, }; @@ -78145,9 +78525,9 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0].type, + schema102.allOf[1].properties.device.anyOf[3].allOf[0].type, parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[0], + schema102.allOf[1].properties.device.anyOf[3].allOf[0], data: data4, }; if (vErrors === null) { @@ -78173,10 +78553,10 @@ function validate116( params: { missingProperty: missing15 }, message: "must have required property '" + missing15 + "'", schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[1] + schema102.allOf[1].properties.device.anyOf[3].allOf[1] .required, parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[1], + schema102.allOf[1].properties.device.anyOf[3].allOf[1], data: data4, }; if (vErrors === null) { @@ -78199,7 +78579,7 @@ function validate116( message: 'must be equal to constant', schema: 'group', parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[1] + schema102.allOf[1].properties.device.anyOf[3].allOf[1] .properties.type, data: data66, }; @@ -78248,11 +78628,11 @@ function validate116( missing16 + "'", schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[1].properties.devices .items.required, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[1].properties.devices .items, data: data68, @@ -78287,7 +78667,7 @@ function validate116( '"', schema: 'uri', parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[3].allOf[1] .properties.devices.items .properties.url, @@ -78313,12 +78693,12 @@ function validate116( params: { type: 'string' }, message: 'must be string', schema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[3].allOf[1] .properties.devices.items .properties.url.type, parentSchema: - schema101.allOf[1].properties + schema102.allOf[1].properties .device.anyOf[3].allOf[1] .properties.devices.items .properties.url, @@ -78345,11 +78725,11 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[1].properties.devices .items.type, parentSchema: - schema101.allOf[1].properties.device + schema102.allOf[1].properties.device .anyOf[3].allOf[1].properties.devices .items, data: data68, @@ -78376,10 +78756,10 @@ function validate116( params: { type: 'array' }, message: 'must be array', schema: - schema101.allOf[1].properties.device.anyOf[3] + schema102.allOf[1].properties.device.anyOf[3] .allOf[1].properties.devices.type, parentSchema: - schema101.allOf[1].properties.device.anyOf[3] + schema102.allOf[1].properties.device.anyOf[3] .allOf[1].properties.devices, data: data67, }; @@ -78406,9 +78786,9 @@ function validate116( params: { type: 'object' }, message: 'must be object', schema: - schema101.allOf[1].properties.device.anyOf[3].allOf[1].type, + schema102.allOf[1].properties.device.anyOf[3].allOf[1].type, parentSchema: - schema101.allOf[1].properties.device.anyOf[3].allOf[1], + schema102.allOf[1].properties.device.anyOf[3].allOf[1], data: data4, }; if (vErrors === null) { @@ -78433,8 +78813,8 @@ function validate116( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema101.allOf[1].properties.device.anyOf, - parentSchema: schema101.allOf[1].properties.device, + schema: schema102.allOf[1].properties.device.anyOf, + parentSchema: schema102.allOf[1].properties.device, data: data4, }; if (vErrors === null) { @@ -78443,7 +78823,7 @@ function validate116( vErrors.push(err109); } errors++; - validate116.errors = vErrors; + validate117.errors = vErrors; return false; } else { errors = _errs16; @@ -78462,15 +78842,15 @@ function validate116( } } } else { - validate116.errors = [ + validate117.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema101.allOf[1].type, - parentSchema: schema101.allOf[1], + schema: schema102.allOf[1].type, + parentSchema: schema102.allOf[1], data, }, ]; @@ -78479,11 +78859,11 @@ function validate116( } var valid0 = _errs11 === errors; } - validate116.errors = vErrors; + validate117.errors = vErrors; return errors === 0; } -exports.validateDeviceChangedEventCallbackResponse = validate117; -const schema102 = { +exports.validateDeviceChangedEventCallbackResponse = validate118; +const schema103 = { title: 'Device Changed Event Callback', allOf: [ { @@ -78927,7 +79307,7 @@ const schema102 = { 'x-location': '#/components/schemas/device_changed_response', 'x-schema-type': 'response', }; -function validate117( +function validate118( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -78939,15 +79319,15 @@ function validate117( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate117.errors = [ + validate118.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema102.allOf[0].allOf[0].required, - parentSchema: schema102.allOf[0].allOf[0], + schema: schema103.allOf[0].allOf[0].required, + parentSchema: schema103.allOf[0].allOf[0], data, }, ]; @@ -78956,15 +79336,15 @@ function validate117( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate117.errors = [ + validate118.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema102.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema102.allOf[0].allOf[0].properties.callbackType, + schema: schema103.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema103.allOf[0].allOf[0].properties.callbackType, data: data0, }, ]; @@ -78973,15 +79353,15 @@ function validate117( } } } else { - validate117.errors = [ + validate118.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema102.allOf[0].allOf[0].type, - parentSchema: schema102.allOf[0].allOf[0], + schema: schema103.allOf[0].allOf[0].type, + parentSchema: schema103.allOf[0].allOf[0], data, }, ]; @@ -78998,15 +79378,15 @@ function validate117( (data.callbackType === undefined && (missing1 = 'callbackType')) || (data.eventType === undefined && (missing1 = 'eventType')) ) { - validate117.errors = [ + validate118.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema102.allOf[0].allOf[1].required, - parentSchema: schema102.allOf[0].allOf[1], + schema: schema103.allOf[0].allOf[1].required, + parentSchema: schema103.allOf[0].allOf[1], data, }, ]; @@ -79016,33 +79396,33 @@ function validate117( let data1 = data.callbackType; const _errs7 = errors; if (typeof data1 !== 'string') { - validate117.errors = [ + validate118.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema102.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema102.allOf[0].allOf[1].properties.callbackType, + schema: schema103.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema103.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; return false; } if (!(data1 === 'event')) { - validate117.errors = [ + validate118.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', keyword: 'enum', params: { allowedValues: - schema102.allOf[0].allOf[1].properties.callbackType.enum, + schema103.allOf[0].allOf[1].properties.callbackType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema102.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema102.allOf[0].allOf[1].properties.callbackType, + schema: schema103.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema103.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; @@ -79057,15 +79437,15 @@ function validate117( let data2 = data.eventType; const _errs9 = errors; if (typeof data2 !== 'string') { - validate117.errors = [ + validate118.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema102.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema102.allOf[0].allOf[1].properties.eventType, + schema: schema103.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema103.allOf[0].allOf[1].properties.eventType, data: data2, }, ]; @@ -79078,15 +79458,15 @@ function validate117( } } } else { - validate117.errors = [ + validate118.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema102.allOf[0].allOf[1].type, - parentSchema: schema102.allOf[0].allOf[1], + schema: schema103.allOf[0].allOf[1].type, + parentSchema: schema103.allOf[0].allOf[1], data, }, ]; @@ -79105,15 +79485,15 @@ function validate117( (data.eventType === undefined && (missing2 = 'eventType')) || (data.device === undefined && (missing2 = 'device')) ) { - validate117.errors = [ + validate118.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema102.allOf[1].required, - parentSchema: schema102.allOf[1], + schema: schema103.allOf[1].required, + parentSchema: schema103.allOf[1], data, }, ]; @@ -79123,30 +79503,30 @@ function validate117( let data3 = data.eventType; const _errs13 = errors; if (typeof data3 !== 'string') { - validate117.errors = [ + validate118.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema102.allOf[1].properties.eventType.type, - parentSchema: schema102.allOf[1].properties.eventType, + schema: schema103.allOf[1].properties.eventType.type, + parentSchema: schema103.allOf[1].properties.eventType, data: data3, }, ]; return false; } if (!(data3 === 'device-changed')) { - validate117.errors = [ + validate118.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/enum', keyword: 'enum', - params: { allowedValues: schema102.allOf[1].properties.eventType.enum }, + params: { allowedValues: schema103.allOf[1].properties.eventType.enum }, message: 'must be equal to one of the allowed values', - schema: schema102.allOf[1].properties.eventType.enum, - parentSchema: schema102.allOf[1].properties.eventType, + schema: schema103.allOf[1].properties.eventType.enum, + parentSchema: schema103.allOf[1].properties.eventType, data: data3, }, ]; @@ -79180,9 +79560,9 @@ function validate117( params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0].required, + schema103.allOf[1].properties.device.anyOf[0].allOf[0].required, parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0], + schema103.allOf[1].properties.device.anyOf[0].allOf[0], data: data4, }; if (vErrors === null) { @@ -79208,7 +79588,7 @@ function validate117( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.url, data: data5, }; @@ -79228,10 +79608,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.url.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.url, data: data5, }; @@ -79261,10 +79641,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.name.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.name, data: data6, }; @@ -79292,10 +79672,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.description.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.description, data: data7, }; @@ -79323,10 +79703,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.type.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.type, data: data8, }; @@ -79352,15 +79732,15 @@ function validate117( keyword: 'enum', params: { allowedValues: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.type.enum, parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.type, data: data8, }; @@ -79388,10 +79768,10 @@ function validate117( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.isPublic.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[0] + schema103.allOf[1].properties.device.anyOf[0].allOf[0] .properties.isPublic, data: data9, }; @@ -79440,11 +79820,11 @@ function validate117( missing4 + "'", schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[0].properties.viewer .items.required, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[0].properties.viewer .items, data: data11, @@ -79479,7 +79859,7 @@ function validate117( '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[0].allOf[0] .properties.viewer.items .properties.url, @@ -79505,12 +79885,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[0].allOf[0] .properties.viewer.items .properties.url.type, parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[0].allOf[0] .properties.viewer.items .properties.url, @@ -79537,11 +79917,11 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[0].properties.viewer.items .type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[0].properties.viewer .items, data: data11, @@ -79568,10 +79948,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device.anyOf[0] + schema103.allOf[1].properties.device.anyOf[0] .allOf[0].properties.viewer.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[0] + schema103.allOf[1].properties.device.anyOf[0] .allOf[0].properties.viewer, data: data10, }; @@ -79621,11 +80001,11 @@ function validate117( missing5 + "'", schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[0].properties.owner .items.required, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[0].properties.owner .items, data: data14, @@ -79660,7 +80040,7 @@ function validate117( '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[0].allOf[0] .properties.owner.items .properties.url, @@ -79686,12 +80066,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[0].allOf[0] .properties.owner.items .properties.url.type, parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[0].allOf[0] .properties.owner.items .properties.url, @@ -79718,11 +80098,11 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[0].properties.owner .items.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[0].properties.owner .items, data: data14, @@ -79749,10 +80129,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device.anyOf[0] + schema103.allOf[1].properties.device.anyOf[0] .allOf[0].properties.owner.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[0] + schema103.allOf[1].properties.device.anyOf[0] .allOf[0].properties.owner, data: data13, }; @@ -79782,8 +80162,8 @@ function validate117( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema102.allOf[1].properties.device.anyOf[0].allOf[0].type, - parentSchema: schema102.allOf[1].properties.device.anyOf[0].allOf[0], + schema: schema103.allOf[1].properties.device.anyOf[0].allOf[0].type, + parentSchema: schema103.allOf[1].properties.device.anyOf[0].allOf[0], data: data4, }; if (vErrors === null) { @@ -79812,7 +80192,7 @@ function validate117( message: 'must be equal to constant', schema: 'cloud instantiable', parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] + schema103.allOf[1].properties.device.anyOf[0].allOf[1] .properties.type, data: data16, }; @@ -79844,7 +80224,7 @@ function validate117( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] + schema103.allOf[1].properties.device.anyOf[0].allOf[1] .properties.instantiateUrl, data: data17, }; @@ -79864,10 +80244,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] + schema103.allOf[1].properties.device.anyOf[0].allOf[1] .properties.instantiateUrl.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] + schema103.allOf[1].properties.device.anyOf[0].allOf[1] .properties.instantiateUrl, data: data17, }; @@ -79922,7 +80302,7 @@ function validate117( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data20, @@ -79947,11 +80327,11 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data20, @@ -79986,11 +80366,11 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceId, data: data21, @@ -80023,11 +80403,11 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceDirection, data: data22, @@ -80057,7 +80437,7 @@ function validate117( keyword: 'enum', params: { allowedValues: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceDirection .enum, @@ -80065,11 +80445,11 @@ function validate117( message: 'must be equal to one of the allowed values', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[0].allOf[1].properties.services .items.properties.serviceDirection, data: data22, @@ -80097,10 +80477,10 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device.anyOf[0] + schema103.allOf[1].properties.device.anyOf[0] .allOf[1].properties.services.items.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[0] + schema103.allOf[1].properties.device.anyOf[0] .allOf[1].properties.services.items, data: data19, }; @@ -80126,10 +80506,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] + schema103.allOf[1].properties.device.anyOf[0].allOf[1] .properties.services.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1] + schema103.allOf[1].properties.device.anyOf[0].allOf[1] .properties.services, data: data18, }; @@ -80154,9 +80534,9 @@ function validate117( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema102.allOf[1].properties.device.anyOf[0].allOf[1].type, + schema: schema103.allOf[1].properties.device.anyOf[0].allOf[1].type, parentSchema: - schema102.allOf[1].properties.device.anyOf[0].allOf[1], + schema103.allOf[1].properties.device.anyOf[0].allOf[1], data: data4, }; if (vErrors === null) { @@ -80191,9 +80571,9 @@ function validate117( params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0].required, + schema103.allOf[1].properties.device.anyOf[1].allOf[0].required, parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0], + schema103.allOf[1].properties.device.anyOf[1].allOf[0], data: data4, }; if (vErrors === null) { @@ -80219,7 +80599,7 @@ function validate117( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] + schema103.allOf[1].properties.device.anyOf[1].allOf[0] .properties.url, data: data23, }; @@ -80239,10 +80619,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] + schema103.allOf[1].properties.device.anyOf[1].allOf[0] .properties.url.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] + schema103.allOf[1].properties.device.anyOf[1].allOf[0] .properties.url, data: data23, }; @@ -80272,10 +80652,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] + schema103.allOf[1].properties.device.anyOf[1].allOf[0] .properties.name.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] + schema103.allOf[1].properties.device.anyOf[1].allOf[0] .properties.name, data: data24, }; @@ -80303,10 +80683,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] + schema103.allOf[1].properties.device.anyOf[1].allOf[0] .properties.description.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] + schema103.allOf[1].properties.device.anyOf[1].allOf[0] .properties.description, data: data25, }; @@ -80334,10 +80714,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] + schema103.allOf[1].properties.device.anyOf[1].allOf[0] .properties.type.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] + schema103.allOf[1].properties.device.anyOf[1].allOf[0] .properties.type, data: data26, }; @@ -80363,15 +80743,15 @@ function validate117( keyword: 'enum', params: { allowedValues: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] + schema103.allOf[1].properties.device.anyOf[1].allOf[0] .properties.type.enum, parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0] + schema103.allOf[1].properties.device.anyOf[1].allOf[0] .properties.type, data: data26, }; @@ -80399,10 +80779,10 @@ function validate117( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[0].properties.isPublic.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[0].properties.isPublic, data: data27, }; @@ -80451,11 +80831,11 @@ function validate117( missing7 + "'", schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[0].properties.viewer .items.required, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[0].properties.viewer .items, data: data29, @@ -80490,7 +80870,7 @@ function validate117( '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[1].allOf[0] .properties.viewer.items .properties.url, @@ -80516,12 +80896,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[1].allOf[0] .properties.viewer.items .properties.url.type, parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[1].allOf[0] .properties.viewer.items .properties.url, @@ -80548,11 +80928,11 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[0].properties.viewer .items.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[0].properties.viewer .items, data: data29, @@ -80579,10 +80959,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[0].properties.viewer.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[0].properties.viewer, data: data28, }; @@ -80632,11 +81012,11 @@ function validate117( missing8 + "'", schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[0].properties.owner .items.required, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[0].properties.owner .items, data: data32, @@ -80671,7 +81051,7 @@ function validate117( '"', schema: 'uri', parentSchema: - schema102.allOf[1] + schema103.allOf[1] .properties.device .anyOf[1].allOf[0] .properties.owner.items @@ -80698,12 +81078,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[1].allOf[0] .properties.owner.items .properties.url.type, parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[1].allOf[0] .properties.owner.items .properties.url, @@ -80730,11 +81110,11 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[0].properties.owner .items.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[0].properties.owner .items, data: data32, @@ -80761,10 +81141,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[0].properties.owner.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[0].properties.owner, data: data31, }; @@ -80794,9 +81174,9 @@ function validate117( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema102.allOf[1].properties.device.anyOf[1].allOf[0].type, + schema: schema103.allOf[1].properties.device.anyOf[1].allOf[0].type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[0], + schema103.allOf[1].properties.device.anyOf[1].allOf[0], data: data4, }; if (vErrors === null) { @@ -80825,7 +81205,7 @@ function validate117( message: 'must be equal to constant', schema: 'device', parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1] + schema103.allOf[1].properties.device.anyOf[1].allOf[1] .properties.type, data: data34, }; @@ -80853,10 +81233,10 @@ function validate117( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1] + schema103.allOf[1].properties.device.anyOf[1].allOf[1] .properties.connected.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1] + schema103.allOf[1].properties.device.anyOf[1].allOf[1] .properties.connected, data: data35, }; @@ -80911,7 +81291,7 @@ function validate117( '"', schema: 'date-time', parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .announcedAvailability.items .properties.start, @@ -80937,12 +81317,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .announcedAvailability.items .properties.start.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .announcedAvailability.items .properties.start, @@ -80985,7 +81365,7 @@ function validate117( '"', schema: 'date-time', parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .announcedAvailability.items .properties.end, @@ -81011,12 +81391,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .announcedAvailability.items .properties.end.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .announcedAvailability.items .properties.end, @@ -81048,11 +81428,11 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[1].properties.announcedAvailability .items.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[1].properties.announcedAvailability .items, data: data37, @@ -81080,10 +81460,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1] + schema103.allOf[1].properties.device.anyOf[1].allOf[1] .properties.announcedAvailability.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1] + schema103.allOf[1].properties.device.anyOf[1].allOf[1] .properties.announcedAvailability, data: data36, }; @@ -81116,7 +81496,7 @@ function validate117( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[1].properties.experiment, data: data40, }; @@ -81136,10 +81516,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[1].properties.experiment.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[1].properties.experiment, data: data40, }; @@ -81196,7 +81576,7 @@ function validate117( '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[1].allOf[1] .properties.services.items .properties.serviceType, @@ -81222,12 +81602,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .services.items.properties .serviceType.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .services.items.properties .serviceType, @@ -81263,12 +81643,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .services.items.properties.serviceId .type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .services.items.properties .serviceId, @@ -81302,12 +81682,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .services.items.properties .serviceDirection.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .services.items.properties .serviceDirection, @@ -81338,7 +81718,7 @@ function validate117( keyword: 'enum', params: { allowedValues: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[1].allOf[1] .properties.services.items .properties.serviceDirection @@ -81347,12 +81727,12 @@ function validate117( message: 'must be equal to one of the allowed values', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .services.items.properties .serviceDirection.enum, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties .services.items.properties .serviceDirection, @@ -81381,11 +81761,11 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties.services .items.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[1].allOf[1].properties.services .items, data: data42, @@ -81412,10 +81792,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[1].properties.services.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1] + schema103.allOf[1].properties.device.anyOf[1] .allOf[1].properties.services, data: data41, }; @@ -81443,9 +81823,9 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1].type, + schema103.allOf[1].properties.device.anyOf[1].allOf[1].type, parentSchema: - schema102.allOf[1].properties.device.anyOf[1].allOf[1], + schema103.allOf[1].properties.device.anyOf[1].allOf[1], data: data4, }; if (vErrors === null) { @@ -81480,10 +81860,10 @@ function validate117( params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] + schema103.allOf[1].properties.device.anyOf[2].allOf[0] .required, parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0], + schema103.allOf[1].properties.device.anyOf[2].allOf[0], data: data4, }; if (vErrors === null) { @@ -81509,7 +81889,7 @@ function validate117( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[0].properties.url, data: data46, }; @@ -81529,10 +81909,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] + schema103.allOf[1].properties.device.anyOf[2].allOf[0] .properties.url.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] + schema103.allOf[1].properties.device.anyOf[2].allOf[0] .properties.url, data: data46, }; @@ -81562,10 +81942,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] + schema103.allOf[1].properties.device.anyOf[2].allOf[0] .properties.name.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] + schema103.allOf[1].properties.device.anyOf[2].allOf[0] .properties.name, data: data47, }; @@ -81593,10 +81973,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] + schema103.allOf[1].properties.device.anyOf[2].allOf[0] .properties.description.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0] + schema103.allOf[1].properties.device.anyOf[2].allOf[0] .properties.description, data: data48, }; @@ -81624,10 +82004,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[0].properties.type.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[0].properties.type, data: data49, }; @@ -81653,15 +82033,15 @@ function validate117( keyword: 'enum', params: { allowedValues: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[0].properties.type.enum, parentSchema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[0].properties.type, data: data49, }; @@ -81689,10 +82069,10 @@ function validate117( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[0].properties.isPublic.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[0].properties.isPublic, data: data50, }; @@ -81741,11 +82121,11 @@ function validate117( missing10 + "'", schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[0].properties.viewer .items.required, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[0].properties.viewer .items, data: data52, @@ -81780,7 +82160,7 @@ function validate117( '"', schema: 'uri', parentSchema: - schema102.allOf[1] + schema103.allOf[1] .properties.device .anyOf[2].allOf[0] .properties.viewer.items @@ -81807,12 +82187,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[2].allOf[0] .properties.viewer.items .properties.url.type, parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[2].allOf[0] .properties.viewer.items .properties.url, @@ -81839,11 +82219,11 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[0].properties.viewer .items.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[0].properties.viewer .items, data: data52, @@ -81870,10 +82250,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[0].properties.viewer.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[0].properties.viewer, data: data51, }; @@ -81927,11 +82307,11 @@ function validate117( missing11 + "'", schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[0].properties .owner.items.required, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[0].properties .owner.items, data: data55, @@ -81966,7 +82346,7 @@ function validate117( '"', schema: 'uri', parentSchema: - schema102.allOf[1] + schema103.allOf[1] .properties.device .anyOf[2].allOf[0] .properties.owner.items @@ -81993,13 +82373,13 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1] + schema103.allOf[1] .properties.device .anyOf[2].allOf[0] .properties.owner.items .properties.url.type, parentSchema: - schema102.allOf[1] + schema103.allOf[1] .properties.device .anyOf[2].allOf[0] .properties.owner.items @@ -82027,11 +82407,11 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[0].properties.owner .items.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[0].properties.owner .items, data: data55, @@ -82058,10 +82438,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[0].properties.owner.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[0].properties.owner, data: data54, }; @@ -82092,9 +82472,9 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0].type, + schema103.allOf[1].properties.device.anyOf[2].allOf[0].type, parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[0], + schema103.allOf[1].properties.device.anyOf[2].allOf[0], data: data4, }; if (vErrors === null) { @@ -82123,7 +82503,7 @@ function validate117( message: 'must be equal to constant', schema: 'edge instantiable', parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[1] + schema103.allOf[1].properties.device.anyOf[2].allOf[1] .properties.type, data: data57, }; @@ -82155,7 +82535,7 @@ function validate117( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[1].properties.codeUrl, data: data58, }; @@ -82175,10 +82555,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[1].properties.codeUrl.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[1].properties.codeUrl, data: data58, }; @@ -82233,7 +82613,7 @@ function validate117( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceType, @@ -82259,12 +82639,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceType.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceType, @@ -82300,11 +82680,11 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data62, @@ -82337,12 +82717,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceDirection.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceDirection, @@ -82373,7 +82753,7 @@ function validate117( keyword: 'enum', params: { allowedValues: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceDirection.enum, @@ -82381,12 +82761,12 @@ function validate117( message: 'must be equal to one of the allowed values', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceDirection.enum, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[2].allOf[1].properties .services.items.properties .serviceDirection, @@ -82415,10 +82795,10 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[1].properties.services.items.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[1].properties.services.items, data: data60, }; @@ -82444,10 +82824,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[1].properties.services.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[2] + schema103.allOf[1].properties.device.anyOf[2] .allOf[1].properties.services, data: data59, }; @@ -82473,9 +82853,9 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device.anyOf[2].allOf[1].type, + schema103.allOf[1].properties.device.anyOf[2].allOf[1].type, parentSchema: - schema102.allOf[1].properties.device.anyOf[2].allOf[1], + schema103.allOf[1].properties.device.anyOf[2].allOf[1], data: data4, }; if (vErrors === null) { @@ -82510,10 +82890,10 @@ function validate117( params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", schema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0] + schema103.allOf[1].properties.device.anyOf[3].allOf[0] .required, parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0], + schema103.allOf[1].properties.device.anyOf[3].allOf[0], data: data4, }; if (vErrors === null) { @@ -82539,7 +82919,7 @@ function validate117( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.url, data: data64, }; @@ -82559,10 +82939,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.url.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.url, data: data64, }; @@ -82592,10 +82972,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0] + schema103.allOf[1].properties.device.anyOf[3].allOf[0] .properties.name.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0] + schema103.allOf[1].properties.device.anyOf[3].allOf[0] .properties.name, data: data65, }; @@ -82623,10 +83003,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.description.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.description, data: data66, }; @@ -82654,10 +83034,10 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.type.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.type, data: data67, }; @@ -82683,16 +83063,16 @@ function validate117( keyword: 'enum', params: { allowedValues: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.type.enum, parentSchema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.type, data: data67, }; @@ -82720,10 +83100,10 @@ function validate117( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.isPublic.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[0].properties.isPublic, data: data68, }; @@ -82776,11 +83156,11 @@ function validate117( missing13 + "'", schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[0].properties .viewer.items.required, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[0].properties .viewer.items, data: data70, @@ -82815,7 +83195,7 @@ function validate117( '"', schema: 'uri', parentSchema: - schema102.allOf[1] + schema103.allOf[1] .properties.device .anyOf[3].allOf[0] .properties.viewer.items @@ -82842,13 +83222,13 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1] + schema103.allOf[1] .properties.device .anyOf[3].allOf[0] .properties.viewer.items .properties.url.type, parentSchema: - schema102.allOf[1] + schema103.allOf[1] .properties.device .anyOf[3].allOf[0] .properties.viewer.items @@ -82878,11 +83258,11 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[0].properties.viewer .items.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[0].properties.viewer .items, data: data70, @@ -82909,10 +83289,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[0].properties.viewer.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[0].properties.viewer, data: data69, }; @@ -82966,12 +83346,12 @@ function validate117( missing14 + "'", schema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[3].allOf[0] .properties.owner.items .required, parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[3].allOf[0] .properties.owner.items, data: data73, @@ -83008,7 +83388,7 @@ function validate117( '"', schema: 'uri', parentSchema: - schema102.allOf[1] + schema103.allOf[1] .properties.device .anyOf[3].allOf[0] .properties.owner @@ -83035,13 +83415,13 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1] + schema103.allOf[1] .properties.device .anyOf[3].allOf[0] .properties.owner.items .properties.url.type, parentSchema: - schema102.allOf[1] + schema103.allOf[1] .properties.device .anyOf[3].allOf[0] .properties.owner.items @@ -83071,11 +83451,11 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[0].properties .owner.items.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[0].properties .owner.items, data: data73, @@ -83103,11 +83483,11 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[0].properties.owner .type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[0].properties.owner, data: data72, }; @@ -83138,9 +83518,9 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0].type, + schema103.allOf[1].properties.device.anyOf[3].allOf[0].type, parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[0], + schema103.allOf[1].properties.device.anyOf[3].allOf[0], data: data4, }; if (vErrors === null) { @@ -83166,10 +83546,10 @@ function validate117( params: { missingProperty: missing15 }, message: "must have required property '" + missing15 + "'", schema: - schema102.allOf[1].properties.device.anyOf[3].allOf[1] + schema103.allOf[1].properties.device.anyOf[3].allOf[1] .required, parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[1], + schema103.allOf[1].properties.device.anyOf[3].allOf[1], data: data4, }; if (vErrors === null) { @@ -83192,7 +83572,7 @@ function validate117( message: 'must be equal to constant', schema: 'group', parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[1] + schema103.allOf[1].properties.device.anyOf[3].allOf[1] .properties.type, data: data75, }; @@ -83241,11 +83621,11 @@ function validate117( missing16 + "'", schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[1].properties.devices .items.required, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[1].properties.devices .items, data: data77, @@ -83280,7 +83660,7 @@ function validate117( '"', schema: 'uri', parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[3].allOf[1] .properties.devices.items .properties.url, @@ -83306,12 +83686,12 @@ function validate117( params: { type: 'string' }, message: 'must be string', schema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[3].allOf[1] .properties.devices.items .properties.url.type, parentSchema: - schema102.allOf[1].properties + schema103.allOf[1].properties .device.anyOf[3].allOf[1] .properties.devices.items .properties.url, @@ -83338,11 +83718,11 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[1].properties.devices .items.type, parentSchema: - schema102.allOf[1].properties.device + schema103.allOf[1].properties.device .anyOf[3].allOf[1].properties.devices .items, data: data77, @@ -83369,10 +83749,10 @@ function validate117( params: { type: 'array' }, message: 'must be array', schema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[1].properties.devices.type, parentSchema: - schema102.allOf[1].properties.device.anyOf[3] + schema103.allOf[1].properties.device.anyOf[3] .allOf[1].properties.devices, data: data76, }; @@ -83399,9 +83779,9 @@ function validate117( params: { type: 'object' }, message: 'must be object', schema: - schema102.allOf[1].properties.device.anyOf[3].allOf[1].type, + schema103.allOf[1].properties.device.anyOf[3].allOf[1].type, parentSchema: - schema102.allOf[1].properties.device.anyOf[3].allOf[1], + schema103.allOf[1].properties.device.anyOf[3].allOf[1], data: data4, }; if (vErrors === null) { @@ -83426,8 +83806,8 @@ function validate117( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema102.allOf[1].properties.device.anyOf, - parentSchema: schema102.allOf[1].properties.device, + schema: schema103.allOf[1].properties.device.anyOf, + parentSchema: schema103.allOf[1].properties.device, data: data4, }; if (vErrors === null) { @@ -83436,7 +83816,7 @@ function validate117( vErrors.push(err124); } errors++; - validate117.errors = vErrors; + validate118.errors = vErrors; return false; } else { errors = _errs16; @@ -83455,15 +83835,15 @@ function validate117( } } } else { - validate117.errors = [ + validate118.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema102.allOf[1].type, - parentSchema: schema102.allOf[1], + schema: schema103.allOf[1].type, + parentSchema: schema103.allOf[1], data, }, ]; @@ -83472,11 +83852,11 @@ function validate117( } var valid0 = _errs11 === errors; } - validate117.errors = vErrors; + validate118.errors = vErrors; return errors === 0; } -exports.validateDeviceOverviewUpdateRequest = validate118; -const schema103 = { +exports.validateDeviceOverviewUpdateRequest = validate119; +const schema104 = { title: 'Device Overview Update', type: 'object', properties: { @@ -83525,7 +83905,7 @@ const schema103 = { 'x-location': '#/components/schemas/device_overview_update_request', 'x-schema-type': 'request', }; -function validate118( +function validate119( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -83535,15 +83915,15 @@ function validate118( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate118.errors = [ + validate119.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema103.required, - parentSchema: schema103, + schema: schema104.required, + parentSchema: schema104, data, }, ]; @@ -83553,15 +83933,15 @@ function validate118( let data0 = data.name; const _errs1 = errors; if (typeof data0 !== 'string') { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema103.properties.name.type, - parentSchema: schema103.properties.name, + schema: schema104.properties.name.type, + parentSchema: schema104.properties.name, data: data0, }, ]; @@ -83576,15 +83956,15 @@ function validate118( let data1 = data.description; const _errs3 = errors; if (typeof data1 !== 'string') { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema103.properties.description.type, - parentSchema: schema103.properties.description, + schema: schema104.properties.description.type, + parentSchema: schema104.properties.description, data: data1, }, ]; @@ -83599,15 +83979,15 @@ function validate118( let data2 = data.type; const _errs5 = errors; if (typeof data2 !== 'string') { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema103.properties.type.type, - parentSchema: schema103.properties.type, + schema: schema104.properties.type.type, + parentSchema: schema104.properties.type, data: data2, }, ]; @@ -83621,15 +84001,15 @@ function validate118( data2 === 'cloud instantiable' ) ) { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema103.properties.type.enum }, + params: { allowedValues: schema104.properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema103.properties.type.enum, - parentSchema: schema103.properties.type, + schema: schema104.properties.type.enum, + parentSchema: schema104.properties.type, data: data2, }, ]; @@ -83644,15 +84024,15 @@ function validate118( let data3 = data.isPublic; const _errs7 = errors; if (typeof data3 !== 'boolean') { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema103.properties.isPublic.type, - parentSchema: schema103.properties.isPublic, + schema: schema104.properties.isPublic.type, + parentSchema: schema104.properties.isPublic, data: data3, }, ]; @@ -83681,7 +84061,7 @@ function validate118( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/properties/viewer/items/required', @@ -83689,8 +84069,8 @@ function validate118( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema103.properties.viewer.items.required, - parentSchema: schema103.properties.viewer.items, + schema: schema104.properties.viewer.items.required, + parentSchema: schema104.properties.viewer.items, data: data5, }, ]; @@ -83703,7 +84083,7 @@ function validate118( if (errors === _errs13) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -83714,7 +84094,7 @@ function validate118( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema103.properties.viewer.items.properties + schema104.properties.viewer.items.properties .url, data: data6, }, @@ -83722,7 +84102,7 @@ function validate118( return false; } } else { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -83732,10 +84112,10 @@ function validate118( params: { type: 'string' }, message: 'must be string', schema: - schema103.properties.viewer.items.properties + schema104.properties.viewer.items.properties .url.type, parentSchema: - schema103.properties.viewer.items.properties + schema104.properties.viewer.items.properties .url, data: data6, }, @@ -83747,15 +84127,15 @@ function validate118( } } } else { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema103.properties.viewer.items.type, - parentSchema: schema103.properties.viewer.items, + schema: schema104.properties.viewer.items.type, + parentSchema: schema104.properties.viewer.items, data: data5, }, ]; @@ -83768,15 +84148,15 @@ function validate118( } } } else { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema103.properties.viewer.type, - parentSchema: schema103.properties.viewer, + schema: schema104.properties.viewer.type, + parentSchema: schema104.properties.viewer, data: data4, }, ]; @@ -83806,7 +84186,7 @@ function validate118( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/properties/owner/items/required', @@ -83814,8 +84194,8 @@ function validate118( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema103.properties.owner.items.required, - parentSchema: schema103.properties.owner.items, + schema: schema104.properties.owner.items.required, + parentSchema: schema104.properties.owner.items, data: data8, }, ]; @@ -83828,7 +84208,7 @@ function validate118( if (errors === _errs19) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -83840,7 +84220,7 @@ function validate118( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema103.properties.owner.items + schema104.properties.owner.items .properties.url, data: data9, }, @@ -83848,7 +84228,7 @@ function validate118( return false; } } else { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -83858,10 +84238,10 @@ function validate118( params: { type: 'string' }, message: 'must be string', schema: - schema103.properties.owner.items.properties + schema104.properties.owner.items.properties .url.type, parentSchema: - schema103.properties.owner.items.properties + schema104.properties.owner.items.properties .url, data: data9, }, @@ -83873,15 +84253,15 @@ function validate118( } } } else { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema103.properties.owner.items.type, - parentSchema: schema103.properties.owner.items, + schema: schema104.properties.owner.items.type, + parentSchema: schema104.properties.owner.items, data: data8, }, ]; @@ -83894,15 +84274,15 @@ function validate118( } } } else { - validate118.errors = [ + validate119.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema103.properties.owner.type, - parentSchema: schema103.properties.owner, + schema: schema104.properties.owner.type, + parentSchema: schema104.properties.owner, data: data7, }, ]; @@ -83920,26 +84300,26 @@ function validate118( } } } else { - validate118.errors = [ + validate119.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema103.type, - parentSchema: schema103, + schema: schema104.type, + parentSchema: schema104, data, }, ]; return false; } } - validate118.errors = vErrors; + validate119.errors = vErrors; return errors === 0; } -exports.validateDeviceOverviewUpdateResponse = validate119; -const schema104 = { +exports.validateDeviceOverviewUpdateResponse = validate120; +const schema105 = { title: 'Device Overview Update', type: 'object', properties: { @@ -83988,7 +84368,7 @@ const schema104 = { 'x-location': '#/components/schemas/device_overview_update_response', 'x-schema-type': 'response', }; -function validate119( +function validate120( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -83998,15 +84378,15 @@ function validate119( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate119.errors = [ + validate120.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema104.required, - parentSchema: schema104, + schema: schema105.required, + parentSchema: schema105, data, }, ]; @@ -84016,15 +84396,15 @@ function validate119( let data0 = data.name; const _errs1 = errors; if (typeof data0 !== 'string') { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema104.properties.name.type, - parentSchema: schema104.properties.name, + schema: schema105.properties.name.type, + parentSchema: schema105.properties.name, data: data0, }, ]; @@ -84039,15 +84419,15 @@ function validate119( let data1 = data.description; const _errs3 = errors; if (typeof data1 !== 'string') { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema104.properties.description.type, - parentSchema: schema104.properties.description, + schema: schema105.properties.description.type, + parentSchema: schema105.properties.description, data: data1, }, ]; @@ -84062,15 +84442,15 @@ function validate119( let data2 = data.type; const _errs5 = errors; if (typeof data2 !== 'string') { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema104.properties.type.type, - parentSchema: schema104.properties.type, + schema: schema105.properties.type.type, + parentSchema: schema105.properties.type, data: data2, }, ]; @@ -84084,15 +84464,15 @@ function validate119( data2 === 'cloud instantiable' ) ) { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema104.properties.type.enum }, + params: { allowedValues: schema105.properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema104.properties.type.enum, - parentSchema: schema104.properties.type, + schema: schema105.properties.type.enum, + parentSchema: schema105.properties.type, data: data2, }, ]; @@ -84107,15 +84487,15 @@ function validate119( let data3 = data.isPublic; const _errs7 = errors; if (typeof data3 !== 'boolean') { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema104.properties.isPublic.type, - parentSchema: schema104.properties.isPublic, + schema: schema105.properties.isPublic.type, + parentSchema: schema105.properties.isPublic, data: data3, }, ]; @@ -84144,7 +84524,7 @@ function validate119( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/properties/viewer/items/required', @@ -84152,8 +84532,8 @@ function validate119( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema104.properties.viewer.items.required, - parentSchema: schema104.properties.viewer.items, + schema: schema105.properties.viewer.items.required, + parentSchema: schema105.properties.viewer.items, data: data5, }, ]; @@ -84166,7 +84546,7 @@ function validate119( if (errors === _errs13) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -84177,7 +84557,7 @@ function validate119( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema104.properties.viewer.items.properties + schema105.properties.viewer.items.properties .url, data: data6, }, @@ -84185,7 +84565,7 @@ function validate119( return false; } } else { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -84195,10 +84575,10 @@ function validate119( params: { type: 'string' }, message: 'must be string', schema: - schema104.properties.viewer.items.properties + schema105.properties.viewer.items.properties .url.type, parentSchema: - schema104.properties.viewer.items.properties + schema105.properties.viewer.items.properties .url, data: data6, }, @@ -84210,15 +84590,15 @@ function validate119( } } } else { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema104.properties.viewer.items.type, - parentSchema: schema104.properties.viewer.items, + schema: schema105.properties.viewer.items.type, + parentSchema: schema105.properties.viewer.items, data: data5, }, ]; @@ -84231,15 +84611,15 @@ function validate119( } } } else { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema104.properties.viewer.type, - parentSchema: schema104.properties.viewer, + schema: schema105.properties.viewer.type, + parentSchema: schema105.properties.viewer, data: data4, }, ]; @@ -84269,7 +84649,7 @@ function validate119( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/properties/owner/items/required', @@ -84277,8 +84657,8 @@ function validate119( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema104.properties.owner.items.required, - parentSchema: schema104.properties.owner.items, + schema: schema105.properties.owner.items.required, + parentSchema: schema105.properties.owner.items, data: data8, }, ]; @@ -84291,7 +84671,7 @@ function validate119( if (errors === _errs19) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -84303,7 +84683,7 @@ function validate119( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema104.properties.owner.items + schema105.properties.owner.items .properties.url, data: data9, }, @@ -84311,7 +84691,7 @@ function validate119( return false; } } else { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -84321,10 +84701,10 @@ function validate119( params: { type: 'string' }, message: 'must be string', schema: - schema104.properties.owner.items.properties + schema105.properties.owner.items.properties .url.type, parentSchema: - schema104.properties.owner.items.properties + schema105.properties.owner.items.properties .url, data: data9, }, @@ -84336,15 +84716,15 @@ function validate119( } } } else { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema104.properties.owner.items.type, - parentSchema: schema104.properties.owner.items, + schema: schema105.properties.owner.items.type, + parentSchema: schema105.properties.owner.items, data: data8, }, ]; @@ -84357,15 +84737,15 @@ function validate119( } } } else { - validate119.errors = [ + validate120.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema104.properties.owner.type, - parentSchema: schema104.properties.owner, + schema: schema105.properties.owner.type, + parentSchema: schema105.properties.owner, data: data7, }, ]; @@ -84383,26 +84763,26 @@ function validate119( } } } else { - validate119.errors = [ + validate120.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema104.type, - parentSchema: schema104, + schema: schema105.type, + parentSchema: schema105, data, }, ]; return false; } } - validate119.errors = vErrors; + validate120.errors = vErrors; return errors === 0; } -exports.validateInstantiableCloudDeviceUpdateRequest = validate120; -const schema105 = { +exports.validateInstantiableCloudDeviceUpdateRequest = validate121; +const schema106 = { title: 'Instantiable Cloud Device Update', allOf: [ { @@ -84479,7 +84859,7 @@ const schema105 = { 'x-location': '#/components/schemas/device_cloud_instantiable_update_request', 'x-schema-type': 'request', }; -function validate120( +function validate121( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -84490,15 +84870,15 @@ function validate120( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate120.errors = [ + validate121.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema105.allOf[0].required, - parentSchema: schema105.allOf[0], + schema: schema106.allOf[0].required, + parentSchema: schema106.allOf[0], data, }, ]; @@ -84508,15 +84888,15 @@ function validate120( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema105.allOf[0].properties.name.type, - parentSchema: schema105.allOf[0].properties.name, + schema: schema106.allOf[0].properties.name.type, + parentSchema: schema106.allOf[0].properties.name, data: data0, }, ]; @@ -84531,15 +84911,15 @@ function validate120( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema105.allOf[0].properties.description.type, - parentSchema: schema105.allOf[0].properties.description, + schema: schema106.allOf[0].properties.description.type, + parentSchema: schema106.allOf[0].properties.description, data: data1, }, ]; @@ -84554,15 +84934,15 @@ function validate120( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema105.allOf[0].properties.type.type, - parentSchema: schema105.allOf[0].properties.type, + schema: schema106.allOf[0].properties.type.type, + parentSchema: schema106.allOf[0].properties.type, data: data2, }, ]; @@ -84576,15 +84956,15 @@ function validate120( data2 === 'cloud instantiable' ) ) { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema105.allOf[0].properties.type.enum }, + params: { allowedValues: schema106.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema105.allOf[0].properties.type.enum, - parentSchema: schema105.allOf[0].properties.type, + schema: schema106.allOf[0].properties.type.enum, + parentSchema: schema106.allOf[0].properties.type, data: data2, }, ]; @@ -84599,15 +84979,15 @@ function validate120( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema105.allOf[0].properties.isPublic.type, - parentSchema: schema105.allOf[0].properties.isPublic, + schema: schema106.allOf[0].properties.isPublic.type, + parentSchema: schema106.allOf[0].properties.isPublic, data: data3, }, ]; @@ -84636,7 +85016,7 @@ function validate120( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -84646,9 +85026,9 @@ function validate120( message: "must have required property '" + missing1 + "'", schema: - schema105.allOf[0].properties.viewer.items.required, + schema106.allOf[0].properties.viewer.items.required, parentSchema: - schema105.allOf[0].properties.viewer.items, + schema106.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -84661,7 +85041,7 @@ function validate120( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -84672,7 +85052,7 @@ function validate120( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema105.allOf[0].properties.viewer.items + schema106.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -84680,7 +85060,7 @@ function validate120( return false; } } else { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -84690,10 +85070,10 @@ function validate120( params: { type: 'string' }, message: 'must be string', schema: - schema105.allOf[0].properties.viewer.items + schema106.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema105.allOf[0].properties.viewer.items + schema106.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -84705,15 +85085,15 @@ function validate120( } } } else { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema105.allOf[0].properties.viewer.items.type, - parentSchema: schema105.allOf[0].properties.viewer.items, + schema: schema106.allOf[0].properties.viewer.items.type, + parentSchema: schema106.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -84726,15 +85106,15 @@ function validate120( } } } else { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema105.allOf[0].properties.viewer.type, - parentSchema: schema105.allOf[0].properties.viewer, + schema: schema106.allOf[0].properties.viewer.type, + parentSchema: schema106.allOf[0].properties.viewer, data: data4, }, ]; @@ -84764,7 +85144,7 @@ function validate120( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -84774,9 +85154,9 @@ function validate120( message: "must have required property '" + missing2 + "'", schema: - schema105.allOf[0].properties.owner.items.required, + schema106.allOf[0].properties.owner.items.required, parentSchema: - schema105.allOf[0].properties.owner.items, + schema106.allOf[0].properties.owner.items, data: data8, }, ]; @@ -84789,7 +85169,7 @@ function validate120( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -84801,7 +85181,7 @@ function validate120( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema105.allOf[0].properties.owner.items + schema106.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -84809,7 +85189,7 @@ function validate120( return false; } } else { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -84819,10 +85199,10 @@ function validate120( params: { type: 'string' }, message: 'must be string', schema: - schema105.allOf[0].properties.owner.items + schema106.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema105.allOf[0].properties.owner.items + schema106.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -84834,15 +85214,15 @@ function validate120( } } } else { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema105.allOf[0].properties.owner.items.type, - parentSchema: schema105.allOf[0].properties.owner.items, + schema: schema106.allOf[0].properties.owner.items.type, + parentSchema: schema106.allOf[0].properties.owner.items, data: data8, }, ]; @@ -84855,15 +85235,15 @@ function validate120( } } } else { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema105.allOf[0].properties.owner.type, - parentSchema: schema105.allOf[0].properties.owner, + schema: schema106.allOf[0].properties.owner.type, + parentSchema: schema106.allOf[0].properties.owner, data: data7, }, ]; @@ -84881,15 +85261,15 @@ function validate120( } } } else { - validate120.errors = [ + validate121.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema105.allOf[0].type, - parentSchema: schema105.allOf[0], + schema: schema106.allOf[0].type, + parentSchema: schema106.allOf[0], data, }, ]; @@ -84905,7 +85285,7 @@ function validate120( let data10 = data.type; const _errs24 = errors; if ('cloud instantiable' !== data10) { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -84913,7 +85293,7 @@ function validate120( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema105.allOf[1].properties.type, + parentSchema: schema106.allOf[1].properties.type, data: data10, }, ]; @@ -84931,7 +85311,7 @@ function validate120( if (errors === _errs25) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/instantiateUrl', schemaPath: '#/allOf/1/properties/instantiateUrl/format', @@ -84939,22 +85319,22 @@ function validate120( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema105.allOf[1].properties.instantiateUrl, + parentSchema: schema106.allOf[1].properties.instantiateUrl, data: data11, }, ]; return false; } } else { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/instantiateUrl', schemaPath: '#/allOf/1/properties/instantiateUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema105.allOf[1].properties.instantiateUrl.type, - parentSchema: schema105.allOf[1].properties.instantiateUrl, + schema: schema106.allOf[1].properties.instantiateUrl.type, + parentSchema: schema106.allOf[1].properties.instantiateUrl, data: data11, }, ]; @@ -84986,7 +85366,7 @@ function validate120( if (errors === _errs32) { if (typeof data14 === 'string') { if (!formats0(data14)) { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -84997,7 +85377,7 @@ function validate120( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema105.allOf[1].properties.services.items + schema106.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -85005,7 +85385,7 @@ function validate120( return false; } } else { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -85015,10 +85395,10 @@ function validate120( params: { type: 'string' }, message: 'must be string', schema: - schema105.allOf[1].properties.services.items + schema106.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema105.allOf[1].properties.services.items + schema106.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -85036,7 +85416,7 @@ function validate120( let data15 = data13.serviceId; const _errs34 = errors; if (typeof data15 !== 'string') { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceId', @@ -85046,10 +85426,10 @@ function validate120( params: { type: 'string' }, message: 'must be string', schema: - schema105.allOf[1].properties.services.items + schema106.allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema105.allOf[1].properties.services.items + schema106.allOf[1].properties.services.items .properties.serviceId, data: data15, }, @@ -85065,7 +85445,7 @@ function validate120( let data16 = data13.serviceDirection; const _errs36 = errors; if (typeof data16 !== 'string') { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + @@ -85078,10 +85458,10 @@ function validate120( params: { type: 'string' }, message: 'must be string', schema: - schema105.allOf[1].properties.services.items + schema106.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema105.allOf[1].properties.services.items + schema106.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -85095,7 +85475,7 @@ function validate120( data16 === 'prosumer' ) ) { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + @@ -85107,15 +85487,15 @@ function validate120( keyword: 'enum', params: { allowedValues: - schema105.allOf[1].properties.services.items + schema106.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema105.allOf[1].properties.services.items + schema106.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema105.allOf[1].properties.services.items + schema106.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -85129,15 +85509,15 @@ function validate120( } } } else { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/services/' + i2, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema105.allOf[1].properties.services.items.type, - parentSchema: schema105.allOf[1].properties.services.items, + schema: schema106.allOf[1].properties.services.items.type, + parentSchema: schema106.allOf[1].properties.services.items, data: data13, }, ]; @@ -85150,15 +85530,15 @@ function validate120( } } } else { - validate120.errors = [ + validate121.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema105.allOf[1].properties.services.type, - parentSchema: schema105.allOf[1].properties.services, + schema: schema106.allOf[1].properties.services.type, + parentSchema: schema106.allOf[1].properties.services, data: data12, }, ]; @@ -85172,15 +85552,15 @@ function validate120( } } } else { - validate120.errors = [ + validate121.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema105.allOf[1].type, - parentSchema: schema105.allOf[1], + schema: schema106.allOf[1].type, + parentSchema: schema106.allOf[1], data, }, ]; @@ -85189,11 +85569,11 @@ function validate120( } var valid0 = _errs22 === errors; } - validate120.errors = vErrors; + validate121.errors = vErrors; return errors === 0; } -exports.validateInstantiableCloudDeviceUpdateResponse = validate121; -const schema106 = { +exports.validateInstantiableCloudDeviceUpdateResponse = validate122; +const schema107 = { title: 'Instantiable Cloud Device Update', allOf: [ { @@ -85270,7 +85650,7 @@ const schema106 = { 'x-location': '#/components/schemas/device_cloud_instantiable_update_response', 'x-schema-type': 'response', }; -function validate121( +function validate122( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -85281,15 +85661,15 @@ function validate121( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate121.errors = [ + validate122.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema106.allOf[0].required, - parentSchema: schema106.allOf[0], + schema: schema107.allOf[0].required, + parentSchema: schema107.allOf[0], data, }, ]; @@ -85299,15 +85679,15 @@ function validate121( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema106.allOf[0].properties.name.type, - parentSchema: schema106.allOf[0].properties.name, + schema: schema107.allOf[0].properties.name.type, + parentSchema: schema107.allOf[0].properties.name, data: data0, }, ]; @@ -85322,15 +85702,15 @@ function validate121( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema106.allOf[0].properties.description.type, - parentSchema: schema106.allOf[0].properties.description, + schema: schema107.allOf[0].properties.description.type, + parentSchema: schema107.allOf[0].properties.description, data: data1, }, ]; @@ -85345,15 +85725,15 @@ function validate121( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema106.allOf[0].properties.type.type, - parentSchema: schema106.allOf[0].properties.type, + schema: schema107.allOf[0].properties.type.type, + parentSchema: schema107.allOf[0].properties.type, data: data2, }, ]; @@ -85367,15 +85747,15 @@ function validate121( data2 === 'cloud instantiable' ) ) { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema106.allOf[0].properties.type.enum }, + params: { allowedValues: schema107.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema106.allOf[0].properties.type.enum, - parentSchema: schema106.allOf[0].properties.type, + schema: schema107.allOf[0].properties.type.enum, + parentSchema: schema107.allOf[0].properties.type, data: data2, }, ]; @@ -85390,15 +85770,15 @@ function validate121( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema106.allOf[0].properties.isPublic.type, - parentSchema: schema106.allOf[0].properties.isPublic, + schema: schema107.allOf[0].properties.isPublic.type, + parentSchema: schema107.allOf[0].properties.isPublic, data: data3, }, ]; @@ -85427,7 +85807,7 @@ function validate121( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -85437,9 +85817,9 @@ function validate121( message: "must have required property '" + missing1 + "'", schema: - schema106.allOf[0].properties.viewer.items.required, + schema107.allOf[0].properties.viewer.items.required, parentSchema: - schema106.allOf[0].properties.viewer.items, + schema107.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -85452,7 +85832,7 @@ function validate121( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -85463,7 +85843,7 @@ function validate121( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema106.allOf[0].properties.viewer.items + schema107.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -85471,7 +85851,7 @@ function validate121( return false; } } else { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -85481,10 +85861,10 @@ function validate121( params: { type: 'string' }, message: 'must be string', schema: - schema106.allOf[0].properties.viewer.items + schema107.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema106.allOf[0].properties.viewer.items + schema107.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -85496,15 +85876,15 @@ function validate121( } } } else { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema106.allOf[0].properties.viewer.items.type, - parentSchema: schema106.allOf[0].properties.viewer.items, + schema: schema107.allOf[0].properties.viewer.items.type, + parentSchema: schema107.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -85517,15 +85897,15 @@ function validate121( } } } else { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema106.allOf[0].properties.viewer.type, - parentSchema: schema106.allOf[0].properties.viewer, + schema: schema107.allOf[0].properties.viewer.type, + parentSchema: schema107.allOf[0].properties.viewer, data: data4, }, ]; @@ -85555,7 +85935,7 @@ function validate121( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -85565,9 +85945,9 @@ function validate121( message: "must have required property '" + missing2 + "'", schema: - schema106.allOf[0].properties.owner.items.required, + schema107.allOf[0].properties.owner.items.required, parentSchema: - schema106.allOf[0].properties.owner.items, + schema107.allOf[0].properties.owner.items, data: data8, }, ]; @@ -85580,7 +85960,7 @@ function validate121( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -85592,7 +85972,7 @@ function validate121( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema106.allOf[0].properties.owner.items + schema107.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -85600,7 +85980,7 @@ function validate121( return false; } } else { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -85610,10 +85990,10 @@ function validate121( params: { type: 'string' }, message: 'must be string', schema: - schema106.allOf[0].properties.owner.items + schema107.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema106.allOf[0].properties.owner.items + schema107.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -85625,15 +86005,15 @@ function validate121( } } } else { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema106.allOf[0].properties.owner.items.type, - parentSchema: schema106.allOf[0].properties.owner.items, + schema: schema107.allOf[0].properties.owner.items.type, + parentSchema: schema107.allOf[0].properties.owner.items, data: data8, }, ]; @@ -85646,15 +86026,15 @@ function validate121( } } } else { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema106.allOf[0].properties.owner.type, - parentSchema: schema106.allOf[0].properties.owner, + schema: schema107.allOf[0].properties.owner.type, + parentSchema: schema107.allOf[0].properties.owner, data: data7, }, ]; @@ -85672,15 +86052,15 @@ function validate121( } } } else { - validate121.errors = [ + validate122.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema106.allOf[0].type, - parentSchema: schema106.allOf[0], + schema: schema107.allOf[0].type, + parentSchema: schema107.allOf[0], data, }, ]; @@ -85696,7 +86076,7 @@ function validate121( let data10 = data.type; const _errs24 = errors; if ('cloud instantiable' !== data10) { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -85704,7 +86084,7 @@ function validate121( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema106.allOf[1].properties.type, + parentSchema: schema107.allOf[1].properties.type, data: data10, }, ]; @@ -85722,7 +86102,7 @@ function validate121( if (errors === _errs25) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/instantiateUrl', schemaPath: '#/allOf/1/properties/instantiateUrl/format', @@ -85730,22 +86110,22 @@ function validate121( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema106.allOf[1].properties.instantiateUrl, + parentSchema: schema107.allOf[1].properties.instantiateUrl, data: data11, }, ]; return false; } } else { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/instantiateUrl', schemaPath: '#/allOf/1/properties/instantiateUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema106.allOf[1].properties.instantiateUrl.type, - parentSchema: schema106.allOf[1].properties.instantiateUrl, + schema: schema107.allOf[1].properties.instantiateUrl.type, + parentSchema: schema107.allOf[1].properties.instantiateUrl, data: data11, }, ]; @@ -85777,7 +86157,7 @@ function validate121( if (errors === _errs32) { if (typeof data14 === 'string') { if (!formats0(data14)) { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -85788,7 +86168,7 @@ function validate121( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema106.allOf[1].properties.services.items + schema107.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -85796,7 +86176,7 @@ function validate121( return false; } } else { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -85806,10 +86186,10 @@ function validate121( params: { type: 'string' }, message: 'must be string', schema: - schema106.allOf[1].properties.services.items + schema107.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema106.allOf[1].properties.services.items + schema107.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -85827,7 +86207,7 @@ function validate121( let data15 = data13.serviceId; const _errs34 = errors; if (typeof data15 !== 'string') { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceId', @@ -85837,10 +86217,10 @@ function validate121( params: { type: 'string' }, message: 'must be string', schema: - schema106.allOf[1].properties.services.items + schema107.allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema106.allOf[1].properties.services.items + schema107.allOf[1].properties.services.items .properties.serviceId, data: data15, }, @@ -85856,7 +86236,7 @@ function validate121( let data16 = data13.serviceDirection; const _errs36 = errors; if (typeof data16 !== 'string') { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + @@ -85869,10 +86249,10 @@ function validate121( params: { type: 'string' }, message: 'must be string', schema: - schema106.allOf[1].properties.services.items + schema107.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema106.allOf[1].properties.services.items + schema107.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -85886,7 +86266,7 @@ function validate121( data16 === 'prosumer' ) ) { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + @@ -85898,15 +86278,15 @@ function validate121( keyword: 'enum', params: { allowedValues: - schema106.allOf[1].properties.services.items + schema107.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema106.allOf[1].properties.services.items + schema107.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema106.allOf[1].properties.services.items + schema107.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -85920,15 +86300,15 @@ function validate121( } } } else { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/services/' + i2, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema106.allOf[1].properties.services.items.type, - parentSchema: schema106.allOf[1].properties.services.items, + schema: schema107.allOf[1].properties.services.items.type, + parentSchema: schema107.allOf[1].properties.services.items, data: data13, }, ]; @@ -85941,15 +86321,15 @@ function validate121( } } } else { - validate121.errors = [ + validate122.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema106.allOf[1].properties.services.type, - parentSchema: schema106.allOf[1].properties.services, + schema: schema107.allOf[1].properties.services.type, + parentSchema: schema107.allOf[1].properties.services, data: data12, }, ]; @@ -85963,15 +86343,15 @@ function validate121( } } } else { - validate121.errors = [ + validate122.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema106.allOf[1].type, - parentSchema: schema106.allOf[1], + schema: schema107.allOf[1].type, + parentSchema: schema107.allOf[1], data, }, ]; @@ -85980,11 +86360,11 @@ function validate121( } var valid0 = _errs22 === errors; } - validate121.errors = vErrors; + validate122.errors = vErrors; return errors === 0; } -exports.validateConcreteDeviceUpdateRequest = validate122; -const schema107 = { +exports.validateConcreteDeviceUpdateRequest = validate123; +const schema108 = { title: 'Concrete Device Update', allOf: [ { @@ -86061,7 +86441,7 @@ const schema107 = { 'x-location': '#/components/schemas/device_concrete_update_request', 'x-schema-type': 'request', }; -function validate122( +function validate123( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -86072,15 +86452,15 @@ function validate122( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate122.errors = [ + validate123.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema107.allOf[0].required, - parentSchema: schema107.allOf[0], + schema: schema108.allOf[0].required, + parentSchema: schema108.allOf[0], data, }, ]; @@ -86090,15 +86470,15 @@ function validate122( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema107.allOf[0].properties.name.type, - parentSchema: schema107.allOf[0].properties.name, + schema: schema108.allOf[0].properties.name.type, + parentSchema: schema108.allOf[0].properties.name, data: data0, }, ]; @@ -86113,15 +86493,15 @@ function validate122( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema107.allOf[0].properties.description.type, - parentSchema: schema107.allOf[0].properties.description, + schema: schema108.allOf[0].properties.description.type, + parentSchema: schema108.allOf[0].properties.description, data: data1, }, ]; @@ -86136,15 +86516,15 @@ function validate122( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema107.allOf[0].properties.type.type, - parentSchema: schema107.allOf[0].properties.type, + schema: schema108.allOf[0].properties.type.type, + parentSchema: schema108.allOf[0].properties.type, data: data2, }, ]; @@ -86158,15 +86538,15 @@ function validate122( data2 === 'cloud instantiable' ) ) { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema107.allOf[0].properties.type.enum }, + params: { allowedValues: schema108.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema107.allOf[0].properties.type.enum, - parentSchema: schema107.allOf[0].properties.type, + schema: schema108.allOf[0].properties.type.enum, + parentSchema: schema108.allOf[0].properties.type, data: data2, }, ]; @@ -86181,15 +86561,15 @@ function validate122( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema107.allOf[0].properties.isPublic.type, - parentSchema: schema107.allOf[0].properties.isPublic, + schema: schema108.allOf[0].properties.isPublic.type, + parentSchema: schema108.allOf[0].properties.isPublic, data: data3, }, ]; @@ -86218,7 +86598,7 @@ function validate122( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -86228,9 +86608,9 @@ function validate122( message: "must have required property '" + missing1 + "'", schema: - schema107.allOf[0].properties.viewer.items.required, + schema108.allOf[0].properties.viewer.items.required, parentSchema: - schema107.allOf[0].properties.viewer.items, + schema108.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -86243,7 +86623,7 @@ function validate122( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -86254,7 +86634,7 @@ function validate122( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema107.allOf[0].properties.viewer.items + schema108.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -86262,7 +86642,7 @@ function validate122( return false; } } else { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -86272,10 +86652,10 @@ function validate122( params: { type: 'string' }, message: 'must be string', schema: - schema107.allOf[0].properties.viewer.items + schema108.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema107.allOf[0].properties.viewer.items + schema108.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -86287,15 +86667,15 @@ function validate122( } } } else { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema107.allOf[0].properties.viewer.items.type, - parentSchema: schema107.allOf[0].properties.viewer.items, + schema: schema108.allOf[0].properties.viewer.items.type, + parentSchema: schema108.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -86308,15 +86688,15 @@ function validate122( } } } else { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema107.allOf[0].properties.viewer.type, - parentSchema: schema107.allOf[0].properties.viewer, + schema: schema108.allOf[0].properties.viewer.type, + parentSchema: schema108.allOf[0].properties.viewer, data: data4, }, ]; @@ -86346,7 +86726,7 @@ function validate122( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -86356,9 +86736,9 @@ function validate122( message: "must have required property '" + missing2 + "'", schema: - schema107.allOf[0].properties.owner.items.required, + schema108.allOf[0].properties.owner.items.required, parentSchema: - schema107.allOf[0].properties.owner.items, + schema108.allOf[0].properties.owner.items, data: data8, }, ]; @@ -86371,7 +86751,7 @@ function validate122( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -86383,7 +86763,7 @@ function validate122( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema107.allOf[0].properties.owner.items + schema108.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -86391,7 +86771,7 @@ function validate122( return false; } } else { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -86401,10 +86781,10 @@ function validate122( params: { type: 'string' }, message: 'must be string', schema: - schema107.allOf[0].properties.owner.items + schema108.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema107.allOf[0].properties.owner.items + schema108.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -86416,15 +86796,15 @@ function validate122( } } } else { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema107.allOf[0].properties.owner.items.type, - parentSchema: schema107.allOf[0].properties.owner.items, + schema: schema108.allOf[0].properties.owner.items.type, + parentSchema: schema108.allOf[0].properties.owner.items, data: data8, }, ]; @@ -86437,15 +86817,15 @@ function validate122( } } } else { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema107.allOf[0].properties.owner.type, - parentSchema: schema107.allOf[0].properties.owner, + schema: schema108.allOf[0].properties.owner.type, + parentSchema: schema108.allOf[0].properties.owner, data: data7, }, ]; @@ -86463,15 +86843,15 @@ function validate122( } } } else { - validate122.errors = [ + validate123.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema107.allOf[0].type, - parentSchema: schema107.allOf[0], + schema: schema108.allOf[0].type, + parentSchema: schema108.allOf[0], data, }, ]; @@ -86487,7 +86867,7 @@ function validate122( let data10 = data.type; const _errs24 = errors; if ('device' !== data10) { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -86495,7 +86875,7 @@ function validate122( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema107.allOf[1].properties.type, + parentSchema: schema108.allOf[1].properties.type, data: data10, }, ]; @@ -86513,7 +86893,7 @@ function validate122( if (errors === _errs25) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/experiment', schemaPath: '#/allOf/1/properties/experiment/format', @@ -86521,22 +86901,22 @@ function validate122( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema107.allOf[1].properties.experiment, + parentSchema: schema108.allOf[1].properties.experiment, data: data11, }, ]; return false; } } else { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/experiment', schemaPath: '#/allOf/1/properties/experiment/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema107.allOf[1].properties.experiment.type, - parentSchema: schema107.allOf[1].properties.experiment, + schema: schema108.allOf[1].properties.experiment.type, + parentSchema: schema108.allOf[1].properties.experiment, data: data11, }, ]; @@ -86568,7 +86948,7 @@ function validate122( if (errors === _errs32) { if (typeof data14 === 'string') { if (!formats0(data14)) { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -86579,7 +86959,7 @@ function validate122( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema107.allOf[1].properties.services.items + schema108.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -86587,7 +86967,7 @@ function validate122( return false; } } else { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -86597,10 +86977,10 @@ function validate122( params: { type: 'string' }, message: 'must be string', schema: - schema107.allOf[1].properties.services.items + schema108.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema107.allOf[1].properties.services.items + schema108.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -86618,7 +86998,7 @@ function validate122( let data15 = data13.serviceId; const _errs34 = errors; if (typeof data15 !== 'string') { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceId', @@ -86628,10 +87008,10 @@ function validate122( params: { type: 'string' }, message: 'must be string', schema: - schema107.allOf[1].properties.services.items + schema108.allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema107.allOf[1].properties.services.items + schema108.allOf[1].properties.services.items .properties.serviceId, data: data15, }, @@ -86647,7 +87027,7 @@ function validate122( let data16 = data13.serviceDirection; const _errs36 = errors; if (typeof data16 !== 'string') { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + @@ -86660,10 +87040,10 @@ function validate122( params: { type: 'string' }, message: 'must be string', schema: - schema107.allOf[1].properties.services.items + schema108.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema107.allOf[1].properties.services.items + schema108.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -86677,7 +87057,7 @@ function validate122( data16 === 'prosumer' ) ) { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + @@ -86689,15 +87069,15 @@ function validate122( keyword: 'enum', params: { allowedValues: - schema107.allOf[1].properties.services.items + schema108.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema107.allOf[1].properties.services.items + schema108.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema107.allOf[1].properties.services.items + schema108.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -86711,15 +87091,15 @@ function validate122( } } } else { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/services/' + i2, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema107.allOf[1].properties.services.items.type, - parentSchema: schema107.allOf[1].properties.services.items, + schema: schema108.allOf[1].properties.services.items.type, + parentSchema: schema108.allOf[1].properties.services.items, data: data13, }, ]; @@ -86732,15 +87112,15 @@ function validate122( } } } else { - validate122.errors = [ + validate123.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema107.allOf[1].properties.services.type, - parentSchema: schema107.allOf[1].properties.services, + schema: schema108.allOf[1].properties.services.type, + parentSchema: schema108.allOf[1].properties.services, data: data12, }, ]; @@ -86754,15 +87134,15 @@ function validate122( } } } else { - validate122.errors = [ + validate123.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema107.allOf[1].type, - parentSchema: schema107.allOf[1], + schema: schema108.allOf[1].type, + parentSchema: schema108.allOf[1], data, }, ]; @@ -86771,11 +87151,11 @@ function validate122( } var valid0 = _errs22 === errors; } - validate122.errors = vErrors; + validate123.errors = vErrors; return errors === 0; } -exports.validateConcreteDeviceUpdateResponse = validate123; -const schema108 = { +exports.validateConcreteDeviceUpdateResponse = validate124; +const schema109 = { title: 'Concrete Device Update', allOf: [ { @@ -86852,7 +87232,7 @@ const schema108 = { 'x-location': '#/components/schemas/device_concrete_update_response', 'x-schema-type': 'response', }; -function validate123( +function validate124( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -86863,15 +87243,15 @@ function validate123( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate123.errors = [ + validate124.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema108.allOf[0].required, - parentSchema: schema108.allOf[0], + schema: schema109.allOf[0].required, + parentSchema: schema109.allOf[0], data, }, ]; @@ -86881,15 +87261,15 @@ function validate123( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema108.allOf[0].properties.name.type, - parentSchema: schema108.allOf[0].properties.name, + schema: schema109.allOf[0].properties.name.type, + parentSchema: schema109.allOf[0].properties.name, data: data0, }, ]; @@ -86904,15 +87284,15 @@ function validate123( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema108.allOf[0].properties.description.type, - parentSchema: schema108.allOf[0].properties.description, + schema: schema109.allOf[0].properties.description.type, + parentSchema: schema109.allOf[0].properties.description, data: data1, }, ]; @@ -86927,15 +87307,15 @@ function validate123( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema108.allOf[0].properties.type.type, - parentSchema: schema108.allOf[0].properties.type, + schema: schema109.allOf[0].properties.type.type, + parentSchema: schema109.allOf[0].properties.type, data: data2, }, ]; @@ -86949,15 +87329,15 @@ function validate123( data2 === 'cloud instantiable' ) ) { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema108.allOf[0].properties.type.enum }, + params: { allowedValues: schema109.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema108.allOf[0].properties.type.enum, - parentSchema: schema108.allOf[0].properties.type, + schema: schema109.allOf[0].properties.type.enum, + parentSchema: schema109.allOf[0].properties.type, data: data2, }, ]; @@ -86972,15 +87352,15 @@ function validate123( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema108.allOf[0].properties.isPublic.type, - parentSchema: schema108.allOf[0].properties.isPublic, + schema: schema109.allOf[0].properties.isPublic.type, + parentSchema: schema109.allOf[0].properties.isPublic, data: data3, }, ]; @@ -87009,7 +87389,7 @@ function validate123( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -87019,9 +87399,9 @@ function validate123( message: "must have required property '" + missing1 + "'", schema: - schema108.allOf[0].properties.viewer.items.required, + schema109.allOf[0].properties.viewer.items.required, parentSchema: - schema108.allOf[0].properties.viewer.items, + schema109.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -87034,7 +87414,7 @@ function validate123( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -87045,7 +87425,7 @@ function validate123( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema108.allOf[0].properties.viewer.items + schema109.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -87053,7 +87433,7 @@ function validate123( return false; } } else { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -87063,10 +87443,10 @@ function validate123( params: { type: 'string' }, message: 'must be string', schema: - schema108.allOf[0].properties.viewer.items + schema109.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema108.allOf[0].properties.viewer.items + schema109.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -87078,15 +87458,15 @@ function validate123( } } } else { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema108.allOf[0].properties.viewer.items.type, - parentSchema: schema108.allOf[0].properties.viewer.items, + schema: schema109.allOf[0].properties.viewer.items.type, + parentSchema: schema109.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -87099,15 +87479,15 @@ function validate123( } } } else { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema108.allOf[0].properties.viewer.type, - parentSchema: schema108.allOf[0].properties.viewer, + schema: schema109.allOf[0].properties.viewer.type, + parentSchema: schema109.allOf[0].properties.viewer, data: data4, }, ]; @@ -87137,7 +87517,7 @@ function validate123( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -87147,9 +87527,9 @@ function validate123( message: "must have required property '" + missing2 + "'", schema: - schema108.allOf[0].properties.owner.items.required, + schema109.allOf[0].properties.owner.items.required, parentSchema: - schema108.allOf[0].properties.owner.items, + schema109.allOf[0].properties.owner.items, data: data8, }, ]; @@ -87162,7 +87542,7 @@ function validate123( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -87174,7 +87554,7 @@ function validate123( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema108.allOf[0].properties.owner.items + schema109.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -87182,7 +87562,7 @@ function validate123( return false; } } else { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -87192,10 +87572,10 @@ function validate123( params: { type: 'string' }, message: 'must be string', schema: - schema108.allOf[0].properties.owner.items + schema109.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema108.allOf[0].properties.owner.items + schema109.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -87207,15 +87587,15 @@ function validate123( } } } else { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema108.allOf[0].properties.owner.items.type, - parentSchema: schema108.allOf[0].properties.owner.items, + schema: schema109.allOf[0].properties.owner.items.type, + parentSchema: schema109.allOf[0].properties.owner.items, data: data8, }, ]; @@ -87228,15 +87608,15 @@ function validate123( } } } else { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema108.allOf[0].properties.owner.type, - parentSchema: schema108.allOf[0].properties.owner, + schema: schema109.allOf[0].properties.owner.type, + parentSchema: schema109.allOf[0].properties.owner, data: data7, }, ]; @@ -87254,15 +87634,15 @@ function validate123( } } } else { - validate123.errors = [ + validate124.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema108.allOf[0].type, - parentSchema: schema108.allOf[0], + schema: schema109.allOf[0].type, + parentSchema: schema109.allOf[0], data, }, ]; @@ -87278,7 +87658,7 @@ function validate123( let data10 = data.type; const _errs24 = errors; if ('device' !== data10) { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -87286,7 +87666,7 @@ function validate123( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema108.allOf[1].properties.type, + parentSchema: schema109.allOf[1].properties.type, data: data10, }, ]; @@ -87304,7 +87684,7 @@ function validate123( if (errors === _errs25) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/experiment', schemaPath: '#/allOf/1/properties/experiment/format', @@ -87312,22 +87692,22 @@ function validate123( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema108.allOf[1].properties.experiment, + parentSchema: schema109.allOf[1].properties.experiment, data: data11, }, ]; return false; } } else { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/experiment', schemaPath: '#/allOf/1/properties/experiment/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema108.allOf[1].properties.experiment.type, - parentSchema: schema108.allOf[1].properties.experiment, + schema: schema109.allOf[1].properties.experiment.type, + parentSchema: schema109.allOf[1].properties.experiment, data: data11, }, ]; @@ -87359,7 +87739,7 @@ function validate123( if (errors === _errs32) { if (typeof data14 === 'string') { if (!formats0(data14)) { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -87370,7 +87750,7 @@ function validate123( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema108.allOf[1].properties.services.items + schema109.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -87378,7 +87758,7 @@ function validate123( return false; } } else { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -87388,10 +87768,10 @@ function validate123( params: { type: 'string' }, message: 'must be string', schema: - schema108.allOf[1].properties.services.items + schema109.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema108.allOf[1].properties.services.items + schema109.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -87409,7 +87789,7 @@ function validate123( let data15 = data13.serviceId; const _errs34 = errors; if (typeof data15 !== 'string') { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceId', @@ -87419,10 +87799,10 @@ function validate123( params: { type: 'string' }, message: 'must be string', schema: - schema108.allOf[1].properties.services.items + schema109.allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema108.allOf[1].properties.services.items + schema109.allOf[1].properties.services.items .properties.serviceId, data: data15, }, @@ -87438,7 +87818,7 @@ function validate123( let data16 = data13.serviceDirection; const _errs36 = errors; if (typeof data16 !== 'string') { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + @@ -87451,10 +87831,10 @@ function validate123( params: { type: 'string' }, message: 'must be string', schema: - schema108.allOf[1].properties.services.items + schema109.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema108.allOf[1].properties.services.items + schema109.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -87468,7 +87848,7 @@ function validate123( data16 === 'prosumer' ) ) { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + @@ -87480,15 +87860,15 @@ function validate123( keyword: 'enum', params: { allowedValues: - schema108.allOf[1].properties.services.items + schema109.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema108.allOf[1].properties.services.items + schema109.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema108.allOf[1].properties.services.items + schema109.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -87502,15 +87882,15 @@ function validate123( } } } else { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/services/' + i2, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema108.allOf[1].properties.services.items.type, - parentSchema: schema108.allOf[1].properties.services.items, + schema: schema109.allOf[1].properties.services.items.type, + parentSchema: schema109.allOf[1].properties.services.items, data: data13, }, ]; @@ -87523,15 +87903,15 @@ function validate123( } } } else { - validate123.errors = [ + validate124.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema108.allOf[1].properties.services.type, - parentSchema: schema108.allOf[1].properties.services, + schema: schema109.allOf[1].properties.services.type, + parentSchema: schema109.allOf[1].properties.services, data: data12, }, ]; @@ -87545,15 +87925,15 @@ function validate123( } } } else { - validate123.errors = [ + validate124.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema108.allOf[1].type, - parentSchema: schema108.allOf[1], + schema: schema109.allOf[1].type, + parentSchema: schema109.allOf[1], data, }, ]; @@ -87562,11 +87942,11 @@ function validate123( } var valid0 = _errs22 === errors; } - validate123.errors = vErrors; + validate124.errors = vErrors; return errors === 0; } -exports.validateInstantiableBrowserDeviceUpdateRequest = validate124; -const schema109 = { +exports.validateInstantiableBrowserDeviceUpdateRequest = validate125; +const schema110 = { title: 'Instantiable Browser Device Update', allOf: [ { @@ -87643,7 +88023,7 @@ const schema109 = { 'x-location': '#/components/schemas/device_edge_instantiable_update_request', 'x-schema-type': 'request', }; -function validate124( +function validate125( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -87654,15 +88034,15 @@ function validate124( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate124.errors = [ + validate125.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema109.allOf[0].required, - parentSchema: schema109.allOf[0], + schema: schema110.allOf[0].required, + parentSchema: schema110.allOf[0], data, }, ]; @@ -87672,15 +88052,15 @@ function validate124( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema109.allOf[0].properties.name.type, - parentSchema: schema109.allOf[0].properties.name, + schema: schema110.allOf[0].properties.name.type, + parentSchema: schema110.allOf[0].properties.name, data: data0, }, ]; @@ -87695,15 +88075,15 @@ function validate124( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema109.allOf[0].properties.description.type, - parentSchema: schema109.allOf[0].properties.description, + schema: schema110.allOf[0].properties.description.type, + parentSchema: schema110.allOf[0].properties.description, data: data1, }, ]; @@ -87718,15 +88098,15 @@ function validate124( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema109.allOf[0].properties.type.type, - parentSchema: schema109.allOf[0].properties.type, + schema: schema110.allOf[0].properties.type.type, + parentSchema: schema110.allOf[0].properties.type, data: data2, }, ]; @@ -87740,15 +88120,15 @@ function validate124( data2 === 'cloud instantiable' ) ) { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema109.allOf[0].properties.type.enum }, + params: { allowedValues: schema110.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema109.allOf[0].properties.type.enum, - parentSchema: schema109.allOf[0].properties.type, + schema: schema110.allOf[0].properties.type.enum, + parentSchema: schema110.allOf[0].properties.type, data: data2, }, ]; @@ -87763,15 +88143,15 @@ function validate124( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema109.allOf[0].properties.isPublic.type, - parentSchema: schema109.allOf[0].properties.isPublic, + schema: schema110.allOf[0].properties.isPublic.type, + parentSchema: schema110.allOf[0].properties.isPublic, data: data3, }, ]; @@ -87800,7 +88180,7 @@ function validate124( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -87810,9 +88190,9 @@ function validate124( message: "must have required property '" + missing1 + "'", schema: - schema109.allOf[0].properties.viewer.items.required, + schema110.allOf[0].properties.viewer.items.required, parentSchema: - schema109.allOf[0].properties.viewer.items, + schema110.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -87825,7 +88205,7 @@ function validate124( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -87836,7 +88216,7 @@ function validate124( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema109.allOf[0].properties.viewer.items + schema110.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -87844,7 +88224,7 @@ function validate124( return false; } } else { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -87854,10 +88234,10 @@ function validate124( params: { type: 'string' }, message: 'must be string', schema: - schema109.allOf[0].properties.viewer.items + schema110.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema109.allOf[0].properties.viewer.items + schema110.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -87869,15 +88249,15 @@ function validate124( } } } else { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema109.allOf[0].properties.viewer.items.type, - parentSchema: schema109.allOf[0].properties.viewer.items, + schema: schema110.allOf[0].properties.viewer.items.type, + parentSchema: schema110.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -87890,15 +88270,15 @@ function validate124( } } } else { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema109.allOf[0].properties.viewer.type, - parentSchema: schema109.allOf[0].properties.viewer, + schema: schema110.allOf[0].properties.viewer.type, + parentSchema: schema110.allOf[0].properties.viewer, data: data4, }, ]; @@ -87928,7 +88308,7 @@ function validate124( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -87938,9 +88318,9 @@ function validate124( message: "must have required property '" + missing2 + "'", schema: - schema109.allOf[0].properties.owner.items.required, + schema110.allOf[0].properties.owner.items.required, parentSchema: - schema109.allOf[0].properties.owner.items, + schema110.allOf[0].properties.owner.items, data: data8, }, ]; @@ -87953,7 +88333,7 @@ function validate124( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -87965,7 +88345,7 @@ function validate124( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema109.allOf[0].properties.owner.items + schema110.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -87973,7 +88353,7 @@ function validate124( return false; } } else { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -87983,10 +88363,10 @@ function validate124( params: { type: 'string' }, message: 'must be string', schema: - schema109.allOf[0].properties.owner.items + schema110.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema109.allOf[0].properties.owner.items + schema110.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -87998,15 +88378,15 @@ function validate124( } } } else { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema109.allOf[0].properties.owner.items.type, - parentSchema: schema109.allOf[0].properties.owner.items, + schema: schema110.allOf[0].properties.owner.items.type, + parentSchema: schema110.allOf[0].properties.owner.items, data: data8, }, ]; @@ -88019,15 +88399,15 @@ function validate124( } } } else { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema109.allOf[0].properties.owner.type, - parentSchema: schema109.allOf[0].properties.owner, + schema: schema110.allOf[0].properties.owner.type, + parentSchema: schema110.allOf[0].properties.owner, data: data7, }, ]; @@ -88045,15 +88425,15 @@ function validate124( } } } else { - validate124.errors = [ + validate125.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema109.allOf[0].type, - parentSchema: schema109.allOf[0], + schema: schema110.allOf[0].type, + parentSchema: schema110.allOf[0], data, }, ]; @@ -88069,7 +88449,7 @@ function validate124( let data10 = data.type; const _errs24 = errors; if ('edge instantiable' !== data10) { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -88077,7 +88457,7 @@ function validate124( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema109.allOf[1].properties.type, + parentSchema: schema110.allOf[1].properties.type, data: data10, }, ]; @@ -88095,7 +88475,7 @@ function validate124( if (errors === _errs25) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/codeUrl', schemaPath: '#/allOf/1/properties/codeUrl/format', @@ -88103,22 +88483,22 @@ function validate124( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema109.allOf[1].properties.codeUrl, + parentSchema: schema110.allOf[1].properties.codeUrl, data: data11, }, ]; return false; } } else { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/codeUrl', schemaPath: '#/allOf/1/properties/codeUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema109.allOf[1].properties.codeUrl.type, - parentSchema: schema109.allOf[1].properties.codeUrl, + schema: schema110.allOf[1].properties.codeUrl.type, + parentSchema: schema110.allOf[1].properties.codeUrl, data: data11, }, ]; @@ -88150,7 +88530,7 @@ function validate124( if (errors === _errs32) { if (typeof data14 === 'string') { if (!formats0(data14)) { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -88161,7 +88541,7 @@ function validate124( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema109.allOf[1].properties.services.items + schema110.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -88169,7 +88549,7 @@ function validate124( return false; } } else { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -88179,10 +88559,10 @@ function validate124( params: { type: 'string' }, message: 'must be string', schema: - schema109.allOf[1].properties.services.items + schema110.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema109.allOf[1].properties.services.items + schema110.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -88200,7 +88580,7 @@ function validate124( let data15 = data13.serviceId; const _errs34 = errors; if (typeof data15 !== 'string') { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceId', @@ -88210,10 +88590,10 @@ function validate124( params: { type: 'string' }, message: 'must be string', schema: - schema109.allOf[1].properties.services.items + schema110.allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema109.allOf[1].properties.services.items + schema110.allOf[1].properties.services.items .properties.serviceId, data: data15, }, @@ -88229,7 +88609,7 @@ function validate124( let data16 = data13.serviceDirection; const _errs36 = errors; if (typeof data16 !== 'string') { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + @@ -88242,10 +88622,10 @@ function validate124( params: { type: 'string' }, message: 'must be string', schema: - schema109.allOf[1].properties.services.items + schema110.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema109.allOf[1].properties.services.items + schema110.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -88259,7 +88639,7 @@ function validate124( data16 === 'prosumer' ) ) { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + @@ -88271,15 +88651,15 @@ function validate124( keyword: 'enum', params: { allowedValues: - schema109.allOf[1].properties.services.items + schema110.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema109.allOf[1].properties.services.items + schema110.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema109.allOf[1].properties.services.items + schema110.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -88293,15 +88673,15 @@ function validate124( } } } else { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/services/' + i2, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema109.allOf[1].properties.services.items.type, - parentSchema: schema109.allOf[1].properties.services.items, + schema: schema110.allOf[1].properties.services.items.type, + parentSchema: schema110.allOf[1].properties.services.items, data: data13, }, ]; @@ -88314,15 +88694,15 @@ function validate124( } } } else { - validate124.errors = [ + validate125.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema109.allOf[1].properties.services.type, - parentSchema: schema109.allOf[1].properties.services, + schema: schema110.allOf[1].properties.services.type, + parentSchema: schema110.allOf[1].properties.services, data: data12, }, ]; @@ -88336,15 +88716,15 @@ function validate124( } } } else { - validate124.errors = [ + validate125.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema109.allOf[1].type, - parentSchema: schema109.allOf[1], + schema: schema110.allOf[1].type, + parentSchema: schema110.allOf[1], data, }, ]; @@ -88353,11 +88733,11 @@ function validate124( } var valid0 = _errs22 === errors; } - validate124.errors = vErrors; + validate125.errors = vErrors; return errors === 0; } -exports.validateInstantiableBrowserDeviceUpdateResponse = validate125; -const schema110 = { +exports.validateInstantiableBrowserDeviceUpdateResponse = validate126; +const schema111 = { title: 'Instantiable Browser Device Update', allOf: [ { @@ -88434,7 +88814,7 @@ const schema110 = { 'x-location': '#/components/schemas/device_edge_instantiable_update_response', 'x-schema-type': 'response', }; -function validate125( +function validate126( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -88445,15 +88825,15 @@ function validate125( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate125.errors = [ + validate126.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema110.allOf[0].required, - parentSchema: schema110.allOf[0], + schema: schema111.allOf[0].required, + parentSchema: schema111.allOf[0], data, }, ]; @@ -88463,15 +88843,15 @@ function validate125( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema110.allOf[0].properties.name.type, - parentSchema: schema110.allOf[0].properties.name, + schema: schema111.allOf[0].properties.name.type, + parentSchema: schema111.allOf[0].properties.name, data: data0, }, ]; @@ -88486,15 +88866,15 @@ function validate125( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema110.allOf[0].properties.description.type, - parentSchema: schema110.allOf[0].properties.description, + schema: schema111.allOf[0].properties.description.type, + parentSchema: schema111.allOf[0].properties.description, data: data1, }, ]; @@ -88509,15 +88889,15 @@ function validate125( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema110.allOf[0].properties.type.type, - parentSchema: schema110.allOf[0].properties.type, + schema: schema111.allOf[0].properties.type.type, + parentSchema: schema111.allOf[0].properties.type, data: data2, }, ]; @@ -88531,15 +88911,15 @@ function validate125( data2 === 'cloud instantiable' ) ) { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema110.allOf[0].properties.type.enum }, + params: { allowedValues: schema111.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema110.allOf[0].properties.type.enum, - parentSchema: schema110.allOf[0].properties.type, + schema: schema111.allOf[0].properties.type.enum, + parentSchema: schema111.allOf[0].properties.type, data: data2, }, ]; @@ -88554,15 +88934,15 @@ function validate125( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema110.allOf[0].properties.isPublic.type, - parentSchema: schema110.allOf[0].properties.isPublic, + schema: schema111.allOf[0].properties.isPublic.type, + parentSchema: schema111.allOf[0].properties.isPublic, data: data3, }, ]; @@ -88591,7 +88971,7 @@ function validate125( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -88601,9 +88981,9 @@ function validate125( message: "must have required property '" + missing1 + "'", schema: - schema110.allOf[0].properties.viewer.items.required, + schema111.allOf[0].properties.viewer.items.required, parentSchema: - schema110.allOf[0].properties.viewer.items, + schema111.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -88616,7 +88996,7 @@ function validate125( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -88627,7 +89007,7 @@ function validate125( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema110.allOf[0].properties.viewer.items + schema111.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -88635,7 +89015,7 @@ function validate125( return false; } } else { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -88645,10 +89025,10 @@ function validate125( params: { type: 'string' }, message: 'must be string', schema: - schema110.allOf[0].properties.viewer.items + schema111.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema110.allOf[0].properties.viewer.items + schema111.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -88660,15 +89040,15 @@ function validate125( } } } else { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema110.allOf[0].properties.viewer.items.type, - parentSchema: schema110.allOf[0].properties.viewer.items, + schema: schema111.allOf[0].properties.viewer.items.type, + parentSchema: schema111.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -88681,15 +89061,15 @@ function validate125( } } } else { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema110.allOf[0].properties.viewer.type, - parentSchema: schema110.allOf[0].properties.viewer, + schema: schema111.allOf[0].properties.viewer.type, + parentSchema: schema111.allOf[0].properties.viewer, data: data4, }, ]; @@ -88719,7 +89099,7 @@ function validate125( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -88729,9 +89109,9 @@ function validate125( message: "must have required property '" + missing2 + "'", schema: - schema110.allOf[0].properties.owner.items.required, + schema111.allOf[0].properties.owner.items.required, parentSchema: - schema110.allOf[0].properties.owner.items, + schema111.allOf[0].properties.owner.items, data: data8, }, ]; @@ -88744,7 +89124,7 @@ function validate125( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -88756,7 +89136,7 @@ function validate125( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema110.allOf[0].properties.owner.items + schema111.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -88764,7 +89144,7 @@ function validate125( return false; } } else { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -88774,10 +89154,10 @@ function validate125( params: { type: 'string' }, message: 'must be string', schema: - schema110.allOf[0].properties.owner.items + schema111.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema110.allOf[0].properties.owner.items + schema111.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -88789,15 +89169,15 @@ function validate125( } } } else { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema110.allOf[0].properties.owner.items.type, - parentSchema: schema110.allOf[0].properties.owner.items, + schema: schema111.allOf[0].properties.owner.items.type, + parentSchema: schema111.allOf[0].properties.owner.items, data: data8, }, ]; @@ -88810,15 +89190,15 @@ function validate125( } } } else { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema110.allOf[0].properties.owner.type, - parentSchema: schema110.allOf[0].properties.owner, + schema: schema111.allOf[0].properties.owner.type, + parentSchema: schema111.allOf[0].properties.owner, data: data7, }, ]; @@ -88836,15 +89216,15 @@ function validate125( } } } else { - validate125.errors = [ + validate126.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema110.allOf[0].type, - parentSchema: schema110.allOf[0], + schema: schema111.allOf[0].type, + parentSchema: schema111.allOf[0], data, }, ]; @@ -88860,7 +89240,7 @@ function validate125( let data10 = data.type; const _errs24 = errors; if ('edge instantiable' !== data10) { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -88868,7 +89248,7 @@ function validate125( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema110.allOf[1].properties.type, + parentSchema: schema111.allOf[1].properties.type, data: data10, }, ]; @@ -88886,7 +89266,7 @@ function validate125( if (errors === _errs25) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/codeUrl', schemaPath: '#/allOf/1/properties/codeUrl/format', @@ -88894,22 +89274,22 @@ function validate125( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema110.allOf[1].properties.codeUrl, + parentSchema: schema111.allOf[1].properties.codeUrl, data: data11, }, ]; return false; } } else { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/codeUrl', schemaPath: '#/allOf/1/properties/codeUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema110.allOf[1].properties.codeUrl.type, - parentSchema: schema110.allOf[1].properties.codeUrl, + schema: schema111.allOf[1].properties.codeUrl.type, + parentSchema: schema111.allOf[1].properties.codeUrl, data: data11, }, ]; @@ -88941,7 +89321,7 @@ function validate125( if (errors === _errs32) { if (typeof data14 === 'string') { if (!formats0(data14)) { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -88952,7 +89332,7 @@ function validate125( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema110.allOf[1].properties.services.items + schema111.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -88960,7 +89340,7 @@ function validate125( return false; } } else { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceType', @@ -88970,10 +89350,10 @@ function validate125( params: { type: 'string' }, message: 'must be string', schema: - schema110.allOf[1].properties.services.items + schema111.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema110.allOf[1].properties.services.items + schema111.allOf[1].properties.services.items .properties.serviceType, data: data14, }, @@ -88991,7 +89371,7 @@ function validate125( let data15 = data13.serviceId; const _errs34 = errors; if (typeof data15 !== 'string') { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/services/' + i2 + '/serviceId', @@ -89001,10 +89381,10 @@ function validate125( params: { type: 'string' }, message: 'must be string', schema: - schema110.allOf[1].properties.services.items + schema111.allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema110.allOf[1].properties.services.items + schema111.allOf[1].properties.services.items .properties.serviceId, data: data15, }, @@ -89020,7 +89400,7 @@ function validate125( let data16 = data13.serviceDirection; const _errs36 = errors; if (typeof data16 !== 'string') { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + @@ -89033,10 +89413,10 @@ function validate125( params: { type: 'string' }, message: 'must be string', schema: - schema110.allOf[1].properties.services.items + schema111.allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema110.allOf[1].properties.services.items + schema111.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -89050,7 +89430,7 @@ function validate125( data16 === 'prosumer' ) ) { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + @@ -89062,15 +89442,15 @@ function validate125( keyword: 'enum', params: { allowedValues: - schema110.allOf[1].properties.services.items + schema111.allOf[1].properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema110.allOf[1].properties.services.items + schema111.allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema110.allOf[1].properties.services.items + schema111.allOf[1].properties.services.items .properties.serviceDirection, data: data16, }, @@ -89084,15 +89464,15 @@ function validate125( } } } else { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/services/' + i2, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema110.allOf[1].properties.services.items.type, - parentSchema: schema110.allOf[1].properties.services.items, + schema: schema111.allOf[1].properties.services.items.type, + parentSchema: schema111.allOf[1].properties.services.items, data: data13, }, ]; @@ -89105,15 +89485,15 @@ function validate125( } } } else { - validate125.errors = [ + validate126.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema110.allOf[1].properties.services.type, - parentSchema: schema110.allOf[1].properties.services, + schema: schema111.allOf[1].properties.services.type, + parentSchema: schema111.allOf[1].properties.services, data: data12, }, ]; @@ -89127,15 +89507,15 @@ function validate125( } } } else { - validate125.errors = [ + validate126.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema110.allOf[1].type, - parentSchema: schema110.allOf[1], + schema: schema111.allOf[1].type, + parentSchema: schema111.allOf[1], data, }, ]; @@ -89144,11 +89524,11 @@ function validate125( } var valid0 = _errs22 === errors; } - validate125.errors = vErrors; + validate126.errors = vErrors; return errors === 0; } -exports.validateDeviceGroupUpdateRequest = validate126; -const schema111 = { +exports.validateDeviceGroupUpdateRequest = validate127; +const schema112 = { title: 'Device Group Update', allOf: [ { @@ -89219,7 +89599,7 @@ const schema111 = { 'x-location': '#/components/schemas/device_group_update_request', 'x-schema-type': 'request', }; -function validate126( +function validate127( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -89230,15 +89610,15 @@ function validate126( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate126.errors = [ + validate127.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema111.allOf[0].required, - parentSchema: schema111.allOf[0], + schema: schema112.allOf[0].required, + parentSchema: schema112.allOf[0], data, }, ]; @@ -89248,15 +89628,15 @@ function validate126( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema111.allOf[0].properties.name.type, - parentSchema: schema111.allOf[0].properties.name, + schema: schema112.allOf[0].properties.name.type, + parentSchema: schema112.allOf[0].properties.name, data: data0, }, ]; @@ -89271,15 +89651,15 @@ function validate126( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema111.allOf[0].properties.description.type, - parentSchema: schema111.allOf[0].properties.description, + schema: schema112.allOf[0].properties.description.type, + parentSchema: schema112.allOf[0].properties.description, data: data1, }, ]; @@ -89294,15 +89674,15 @@ function validate126( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema111.allOf[0].properties.type.type, - parentSchema: schema111.allOf[0].properties.type, + schema: schema112.allOf[0].properties.type.type, + parentSchema: schema112.allOf[0].properties.type, data: data2, }, ]; @@ -89316,15 +89696,15 @@ function validate126( data2 === 'cloud instantiable' ) ) { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema111.allOf[0].properties.type.enum }, + params: { allowedValues: schema112.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema111.allOf[0].properties.type.enum, - parentSchema: schema111.allOf[0].properties.type, + schema: schema112.allOf[0].properties.type.enum, + parentSchema: schema112.allOf[0].properties.type, data: data2, }, ]; @@ -89339,15 +89719,15 @@ function validate126( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema111.allOf[0].properties.isPublic.type, - parentSchema: schema111.allOf[0].properties.isPublic, + schema: schema112.allOf[0].properties.isPublic.type, + parentSchema: schema112.allOf[0].properties.isPublic, data: data3, }, ]; @@ -89376,7 +89756,7 @@ function validate126( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -89386,9 +89766,9 @@ function validate126( message: "must have required property '" + missing1 + "'", schema: - schema111.allOf[0].properties.viewer.items.required, + schema112.allOf[0].properties.viewer.items.required, parentSchema: - schema111.allOf[0].properties.viewer.items, + schema112.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -89401,7 +89781,7 @@ function validate126( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -89412,7 +89792,7 @@ function validate126( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema111.allOf[0].properties.viewer.items + schema112.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -89420,7 +89800,7 @@ function validate126( return false; } } else { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -89430,10 +89810,10 @@ function validate126( params: { type: 'string' }, message: 'must be string', schema: - schema111.allOf[0].properties.viewer.items + schema112.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema111.allOf[0].properties.viewer.items + schema112.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -89445,15 +89825,15 @@ function validate126( } } } else { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema111.allOf[0].properties.viewer.items.type, - parentSchema: schema111.allOf[0].properties.viewer.items, + schema: schema112.allOf[0].properties.viewer.items.type, + parentSchema: schema112.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -89466,15 +89846,15 @@ function validate126( } } } else { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema111.allOf[0].properties.viewer.type, - parentSchema: schema111.allOf[0].properties.viewer, + schema: schema112.allOf[0].properties.viewer.type, + parentSchema: schema112.allOf[0].properties.viewer, data: data4, }, ]; @@ -89504,7 +89884,7 @@ function validate126( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -89514,9 +89894,9 @@ function validate126( message: "must have required property '" + missing2 + "'", schema: - schema111.allOf[0].properties.owner.items.required, + schema112.allOf[0].properties.owner.items.required, parentSchema: - schema111.allOf[0].properties.owner.items, + schema112.allOf[0].properties.owner.items, data: data8, }, ]; @@ -89529,7 +89909,7 @@ function validate126( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -89541,7 +89921,7 @@ function validate126( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema111.allOf[0].properties.owner.items + schema112.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -89549,7 +89929,7 @@ function validate126( return false; } } else { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -89559,10 +89939,10 @@ function validate126( params: { type: 'string' }, message: 'must be string', schema: - schema111.allOf[0].properties.owner.items + schema112.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema111.allOf[0].properties.owner.items + schema112.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -89574,15 +89954,15 @@ function validate126( } } } else { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema111.allOf[0].properties.owner.items.type, - parentSchema: schema111.allOf[0].properties.owner.items, + schema: schema112.allOf[0].properties.owner.items.type, + parentSchema: schema112.allOf[0].properties.owner.items, data: data8, }, ]; @@ -89595,15 +89975,15 @@ function validate126( } } } else { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema111.allOf[0].properties.owner.type, - parentSchema: schema111.allOf[0].properties.owner, + schema: schema112.allOf[0].properties.owner.type, + parentSchema: schema112.allOf[0].properties.owner, data: data7, }, ]; @@ -89621,15 +90001,15 @@ function validate126( } } } else { - validate126.errors = [ + validate127.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema111.allOf[0].type, - parentSchema: schema111.allOf[0], + schema: schema112.allOf[0].type, + parentSchema: schema112.allOf[0], data, }, ]; @@ -89645,7 +90025,7 @@ function validate126( let data10 = data.type; const _errs24 = errors; if ('group' !== data10) { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -89653,7 +90033,7 @@ function validate126( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema111.allOf[1].properties.type, + parentSchema: schema112.allOf[1].properties.type, data: data10, }, ]; @@ -89678,15 +90058,15 @@ function validate126( if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { let missing3; if (data12.url === undefined && (missing3 = 'url')) { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/devices/' + i2, schemaPath: '#/allOf/1/properties/devices/items/required', keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema111.allOf[1].properties.devices.items.required, - parentSchema: schema111.allOf[1].properties.devices.items, + schema: schema112.allOf[1].properties.devices.items.required, + parentSchema: schema112.allOf[1].properties.devices.items, data: data12, }, ]; @@ -89699,7 +90079,7 @@ function validate126( if (errors === _errs29) { if (typeof data13 === 'string') { if (!formats0(data13)) { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/devices/' + i2 + '/url', @@ -89710,7 +90090,7 @@ function validate126( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema111.allOf[1].properties.devices.items + schema112.allOf[1].properties.devices.items .properties.url, data: data13, }, @@ -89718,7 +90098,7 @@ function validate126( return false; } } else { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/devices/' + i2 + '/url', @@ -89728,10 +90108,10 @@ function validate126( params: { type: 'string' }, message: 'must be string', schema: - schema111.allOf[1].properties.devices.items + schema112.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema111.allOf[1].properties.devices.items + schema112.allOf[1].properties.devices.items .properties.url, data: data13, }, @@ -89743,15 +90123,15 @@ function validate126( } } } else { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/devices/' + i2, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema111.allOf[1].properties.devices.items.type, - parentSchema: schema111.allOf[1].properties.devices.items, + schema: schema112.allOf[1].properties.devices.items.type, + parentSchema: schema112.allOf[1].properties.devices.items, data: data12, }, ]; @@ -89764,15 +90144,15 @@ function validate126( } } } else { - validate126.errors = [ + validate127.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema111.allOf[1].properties.devices.type, - parentSchema: schema111.allOf[1].properties.devices, + schema: schema112.allOf[1].properties.devices.type, + parentSchema: schema112.allOf[1].properties.devices, data: data11, }, ]; @@ -89785,15 +90165,15 @@ function validate126( } } } else { - validate126.errors = [ + validate127.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema111.allOf[1].type, - parentSchema: schema111.allOf[1], + schema: schema112.allOf[1].type, + parentSchema: schema112.allOf[1], data, }, ]; @@ -89802,11 +90182,11 @@ function validate126( } var valid0 = _errs22 === errors; } - validate126.errors = vErrors; + validate127.errors = vErrors; return errors === 0; } -exports.validateDeviceGroupUpdateResponse = validate127; -const schema112 = { +exports.validateDeviceGroupUpdateResponse = validate128; +const schema113 = { title: 'Device Group Update', allOf: [ { @@ -89877,7 +90257,7 @@ const schema112 = { 'x-location': '#/components/schemas/device_group_update_response', 'x-schema-type': 'response', }; -function validate127( +function validate128( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -89888,15 +90268,15 @@ function validate127( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate127.errors = [ + validate128.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema112.allOf[0].required, - parentSchema: schema112.allOf[0], + schema: schema113.allOf[0].required, + parentSchema: schema113.allOf[0], data, }, ]; @@ -89906,15 +90286,15 @@ function validate127( let data0 = data.name; const _errs2 = errors; if (typeof data0 !== 'string') { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/name', schemaPath: '#/allOf/0/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema112.allOf[0].properties.name.type, - parentSchema: schema112.allOf[0].properties.name, + schema: schema113.allOf[0].properties.name.type, + parentSchema: schema113.allOf[0].properties.name, data: data0, }, ]; @@ -89929,15 +90309,15 @@ function validate127( let data1 = data.description; const _errs4 = errors; if (typeof data1 !== 'string') { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/description', schemaPath: '#/allOf/0/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema112.allOf[0].properties.description.type, - parentSchema: schema112.allOf[0].properties.description, + schema: schema113.allOf[0].properties.description.type, + parentSchema: schema113.allOf[0].properties.description, data: data1, }, ]; @@ -89952,15 +90332,15 @@ function validate127( let data2 = data.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema112.allOf[0].properties.type.type, - parentSchema: schema112.allOf[0].properties.type, + schema: schema113.allOf[0].properties.type.type, + parentSchema: schema113.allOf[0].properties.type, data: data2, }, ]; @@ -89974,15 +90354,15 @@ function validate127( data2 === 'cloud instantiable' ) ) { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema112.allOf[0].properties.type.enum }, + params: { allowedValues: schema113.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema112.allOf[0].properties.type.enum, - parentSchema: schema112.allOf[0].properties.type, + schema: schema113.allOf[0].properties.type.enum, + parentSchema: schema113.allOf[0].properties.type, data: data2, }, ]; @@ -89997,15 +90377,15 @@ function validate127( let data3 = data.isPublic; const _errs8 = errors; if (typeof data3 !== 'boolean') { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/isPublic', schemaPath: '#/allOf/0/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema112.allOf[0].properties.isPublic.type, - parentSchema: schema112.allOf[0].properties.isPublic, + schema: schema113.allOf[0].properties.isPublic.type, + parentSchema: schema113.allOf[0].properties.isPublic, data: data3, }, ]; @@ -90034,7 +90414,7 @@ function validate127( ) { let missing1; if (data5.url === undefined && (missing1 = 'url')) { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: @@ -90044,9 +90424,9 @@ function validate127( message: "must have required property '" + missing1 + "'", schema: - schema112.allOf[0].properties.viewer.items.required, + schema113.allOf[0].properties.viewer.items.required, parentSchema: - schema112.allOf[0].properties.viewer.items, + schema113.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -90059,7 +90439,7 @@ function validate127( if (errors === _errs14) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -90070,7 +90450,7 @@ function validate127( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema112.allOf[0].properties.viewer.items + schema113.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -90078,7 +90458,7 @@ function validate127( return false; } } else { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/viewer/' + i0 + '/url', @@ -90088,10 +90468,10 @@ function validate127( params: { type: 'string' }, message: 'must be string', schema: - schema112.allOf[0].properties.viewer.items + schema113.allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema112.allOf[0].properties.viewer.items + schema113.allOf[0].properties.viewer.items .properties.url, data: data6, }, @@ -90103,15 +90483,15 @@ function validate127( } } } else { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/viewer/' + i0, schemaPath: '#/allOf/0/properties/viewer/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema112.allOf[0].properties.viewer.items.type, - parentSchema: schema112.allOf[0].properties.viewer.items, + schema: schema113.allOf[0].properties.viewer.items.type, + parentSchema: schema113.allOf[0].properties.viewer.items, data: data5, }, ]; @@ -90124,15 +90504,15 @@ function validate127( } } } else { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/viewer', schemaPath: '#/allOf/0/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema112.allOf[0].properties.viewer.type, - parentSchema: schema112.allOf[0].properties.viewer, + schema: schema113.allOf[0].properties.viewer.type, + parentSchema: schema113.allOf[0].properties.viewer, data: data4, }, ]; @@ -90162,7 +90542,7 @@ function validate127( ) { let missing2; if (data8.url === undefined && (missing2 = 'url')) { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: @@ -90172,9 +90552,9 @@ function validate127( message: "must have required property '" + missing2 + "'", schema: - schema112.allOf[0].properties.owner.items.required, + schema113.allOf[0].properties.owner.items.required, parentSchema: - schema112.allOf[0].properties.owner.items, + schema113.allOf[0].properties.owner.items, data: data8, }, ]; @@ -90187,7 +90567,7 @@ function validate127( if (errors === _errs20) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -90199,7 +90579,7 @@ function validate127( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema112.allOf[0].properties.owner.items + schema113.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -90207,7 +90587,7 @@ function validate127( return false; } } else { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/owner/' + i1 + '/url', @@ -90217,10 +90597,10 @@ function validate127( params: { type: 'string' }, message: 'must be string', schema: - schema112.allOf[0].properties.owner.items + schema113.allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema112.allOf[0].properties.owner.items + schema113.allOf[0].properties.owner.items .properties.url, data: data9, }, @@ -90232,15 +90612,15 @@ function validate127( } } } else { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/owner/' + i1, schemaPath: '#/allOf/0/properties/owner/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema112.allOf[0].properties.owner.items.type, - parentSchema: schema112.allOf[0].properties.owner.items, + schema: schema113.allOf[0].properties.owner.items.type, + parentSchema: schema113.allOf[0].properties.owner.items, data: data8, }, ]; @@ -90253,15 +90633,15 @@ function validate127( } } } else { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/owner', schemaPath: '#/allOf/0/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema112.allOf[0].properties.owner.type, - parentSchema: schema112.allOf[0].properties.owner, + schema: schema113.allOf[0].properties.owner.type, + parentSchema: schema113.allOf[0].properties.owner, data: data7, }, ]; @@ -90279,15 +90659,15 @@ function validate127( } } } else { - validate127.errors = [ + validate128.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema112.allOf[0].type, - parentSchema: schema112.allOf[0], + schema: schema113.allOf[0].type, + parentSchema: schema113.allOf[0], data, }, ]; @@ -90303,7 +90683,7 @@ function validate127( let data10 = data.type; const _errs24 = errors; if ('group' !== data10) { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/1/properties/type/const', @@ -90311,7 +90691,7 @@ function validate127( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema112.allOf[1].properties.type, + parentSchema: schema113.allOf[1].properties.type, data: data10, }, ]; @@ -90336,15 +90716,15 @@ function validate127( if (data12 && typeof data12 == 'object' && !Array.isArray(data12)) { let missing3; if (data12.url === undefined && (missing3 = 'url')) { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/devices/' + i2, schemaPath: '#/allOf/1/properties/devices/items/required', keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema112.allOf[1].properties.devices.items.required, - parentSchema: schema112.allOf[1].properties.devices.items, + schema: schema113.allOf[1].properties.devices.items.required, + parentSchema: schema113.allOf[1].properties.devices.items, data: data12, }, ]; @@ -90357,7 +90737,7 @@ function validate127( if (errors === _errs29) { if (typeof data13 === 'string') { if (!formats0(data13)) { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/devices/' + i2 + '/url', @@ -90368,7 +90748,7 @@ function validate127( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema112.allOf[1].properties.devices.items + schema113.allOf[1].properties.devices.items .properties.url, data: data13, }, @@ -90376,7 +90756,7 @@ function validate127( return false; } } else { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/devices/' + i2 + '/url', @@ -90386,10 +90766,10 @@ function validate127( params: { type: 'string' }, message: 'must be string', schema: - schema112.allOf[1].properties.devices.items + schema113.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema112.allOf[1].properties.devices.items + schema113.allOf[1].properties.devices.items .properties.url, data: data13, }, @@ -90401,15 +90781,15 @@ function validate127( } } } else { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/devices/' + i2, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema112.allOf[1].properties.devices.items.type, - parentSchema: schema112.allOf[1].properties.devices.items, + schema: schema113.allOf[1].properties.devices.items.type, + parentSchema: schema113.allOf[1].properties.devices.items, data: data12, }, ]; @@ -90422,15 +90802,15 @@ function validate127( } } } else { - validate127.errors = [ + validate128.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema112.allOf[1].properties.devices.type, - parentSchema: schema112.allOf[1].properties.devices, + schema: schema113.allOf[1].properties.devices.type, + parentSchema: schema113.allOf[1].properties.devices, data: data11, }, ]; @@ -90443,15 +90823,15 @@ function validate127( } } } else { - validate127.errors = [ + validate128.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema112.allOf[1].type, - parentSchema: schema112.allOf[1], + schema: schema113.allOf[1].type, + parentSchema: schema113.allOf[1], data, }, ]; @@ -90460,11 +90840,11 @@ function validate127( } var valid0 = _errs22 === errors; } - validate127.errors = vErrors; + validate128.errors = vErrors; return errors === 0; } -exports.validateDeviceUpdateRequest = validate128; -const schema113 = { +exports.validateDeviceUpdateRequest = validate129; +const schema114 = { title: 'Device Update', anyOf: [ { @@ -90763,7 +91143,7 @@ const schema113 = { 'x-location': '#/components/schemas/device_update_request', 'x-schema-type': 'request', }; -function validate128( +function validate129( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -90783,8 +91163,8 @@ function validate128( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema113.anyOf[0].allOf[0].required, - parentSchema: schema113.anyOf[0].allOf[0], + schema: schema114.anyOf[0].allOf[0].required, + parentSchema: schema114.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -90804,8 +91184,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.name, + schema: schema114.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.name, data: data0, }; if (vErrors === null) { @@ -90830,8 +91210,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.description, + schema: schema114.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.description, data: data1, }; if (vErrors === null) { @@ -90856,8 +91236,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.type, + schema: schema114.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -90880,11 +91260,11 @@ function validate128( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema113.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema114.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema113.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema113.anyOf[0].allOf[0].properties.type, + schema: schema114.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -90909,8 +91289,8 @@ function validate128( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema113.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.isPublic, + schema: schema114.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.isPublic, data: data3, }; if (vErrors === null) { @@ -90951,10 +91331,10 @@ function validate128( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", schema: - schema113.anyOf[0].allOf[0].properties.viewer.items + schema114.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema113.anyOf[0].allOf[0].properties.viewer.items, + schema114.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -90981,7 +91361,7 @@ function validate128( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[0].allOf[0].properties.viewer + schema114.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -91002,10 +91382,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[0].allOf[0].properties.viewer + schema114.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema113.anyOf[0].allOf[0].properties.viewer + schema114.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -91029,9 +91409,9 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[0].allOf[0].properties.viewer.items.type, + schema114.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema113.anyOf[0].allOf[0].properties.viewer.items, + schema114.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -91054,8 +91434,8 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.viewer, + schema: schema114.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.viewer, data: data4, }; if (vErrors === null) { @@ -91098,10 +91478,10 @@ function validate128( message: "must have required property '" + missing2 + "'", schema: - schema113.anyOf[0].allOf[0].properties.owner.items + schema114.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema113.anyOf[0].allOf[0].properties.owner.items, + schema114.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -91128,7 +91508,7 @@ function validate128( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[0].allOf[0].properties.owner + schema114.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -91149,10 +91529,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[0].allOf[0].properties.owner + schema114.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema113.anyOf[0].allOf[0].properties.owner + schema114.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -91176,9 +91556,9 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[0].allOf[0].properties.owner.items.type, + schema114.anyOf[0].allOf[0].properties.owner.items.type, parentSchema: - schema113.anyOf[0].allOf[0].properties.owner.items, + schema114.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -91201,8 +91581,8 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema113.anyOf[0].allOf[0].properties.owner, + schema: schema114.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema114.anyOf[0].allOf[0].properties.owner, data: data7, }; if (vErrors === null) { @@ -91230,8 +91610,8 @@ function validate128( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema113.anyOf[0].allOf[0].type, - parentSchema: schema113.anyOf[0].allOf[0], + schema: schema114.anyOf[0].allOf[0].type, + parentSchema: schema114.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -91258,7 +91638,7 @@ function validate128( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema113.anyOf[0].allOf[1].properties.type, + parentSchema: schema114.anyOf[0].allOf[1].properties.type, data: data10, }; if (vErrors === null) { @@ -91287,7 +91667,7 @@ function validate128( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema113.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema114.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -91304,8 +91684,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema113.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema114.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema114.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -91351,7 +91731,7 @@ function validate128( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[0].allOf[1].properties.services + schema114.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data14, }; @@ -91372,10 +91752,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[0].allOf[1].properties.services.items + schema114.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema113.anyOf[0].allOf[1].properties.services.items + schema114.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -91406,10 +91786,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[0].allOf[1].properties.services.items + schema114.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema113.anyOf[0].allOf[1].properties.services.items + schema114.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data15, }; @@ -91441,10 +91821,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[0].allOf[1].properties.services.items + schema114.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema113.anyOf[0].allOf[1].properties.services.items + schema114.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -91473,15 +91853,15 @@ function validate128( keyword: 'enum', params: { allowedValues: - schema113.anyOf[0].allOf[1].properties.services + schema114.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema113.anyOf[0].allOf[1].properties.services.items + schema114.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema113.anyOf[0].allOf[1].properties.services.items + schema114.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -91506,9 +91886,9 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[0].allOf[1].properties.services.items.type, + schema114.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema113.anyOf[0].allOf[1].properties.services.items, + schema114.anyOf[0].allOf[1].properties.services.items, data: data13, }; if (vErrors === null) { @@ -91531,8 +91911,8 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema113.anyOf[0].allOf[1].properties.services, + schema: schema114.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema114.anyOf[0].allOf[1].properties.services, data: data12, }; if (vErrors === null) { @@ -91556,8 +91936,8 @@ function validate128( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema113.anyOf[0].allOf[1].type, - parentSchema: schema113.anyOf[0].allOf[1], + schema: schema114.anyOf[0].allOf[1].type, + parentSchema: schema114.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -91585,8 +91965,8 @@ function validate128( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema113.anyOf[1].allOf[0].required, - parentSchema: schema113.anyOf[1].allOf[0], + schema: schema114.anyOf[1].allOf[0].required, + parentSchema: schema114.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -91606,8 +91986,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.name, + schema: schema114.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.name, data: data17, }; if (vErrors === null) { @@ -91632,8 +92012,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.description, + schema: schema114.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.description, data: data18, }; if (vErrors === null) { @@ -91658,8 +92038,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.type, + schema: schema114.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -91682,11 +92062,11 @@ function validate128( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema113.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema114.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema113.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema113.anyOf[1].allOf[0].properties.type, + schema: schema114.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -91711,8 +92091,8 @@ function validate128( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema113.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.isPublic, + schema: schema114.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.isPublic, data: data20, }; if (vErrors === null) { @@ -91754,10 +92134,10 @@ function validate128( message: "must have required property '" + missing4 + "'", schema: - schema113.anyOf[1].allOf[0].properties.viewer.items + schema114.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema113.anyOf[1].allOf[0].properties.viewer.items, + schema114.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -91784,7 +92164,7 @@ function validate128( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[1].allOf[0].properties + schema114.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data23, }; @@ -91805,10 +92185,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[1].allOf[0].properties.viewer + schema114.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema113.anyOf[1].allOf[0].properties.viewer + schema114.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -91832,10 +92212,10 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[1].allOf[0].properties.viewer.items + schema114.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema113.anyOf[1].allOf[0].properties.viewer.items, + schema114.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -91858,8 +92238,8 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.viewer, + schema: schema114.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.viewer, data: data21, }; if (vErrors === null) { @@ -91902,10 +92282,10 @@ function validate128( message: "must have required property '" + missing5 + "'", schema: - schema113.anyOf[1].allOf[0].properties.owner.items + schema114.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema113.anyOf[1].allOf[0].properties.owner.items, + schema114.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -91933,7 +92313,7 @@ function validate128( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[1].allOf[0].properties + schema114.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data26, }; @@ -91954,10 +92334,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[1].allOf[0].properties.owner + schema114.anyOf[1].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema113.anyOf[1].allOf[0].properties.owner + schema114.anyOf[1].allOf[0].properties.owner .items.properties.url, data: data26, }; @@ -91981,10 +92361,10 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[1].allOf[0].properties.owner.items + schema114.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema113.anyOf[1].allOf[0].properties.owner.items, + schema114.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -92007,8 +92387,8 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema113.anyOf[1].allOf[0].properties.owner, + schema: schema114.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema114.anyOf[1].allOf[0].properties.owner, data: data24, }; if (vErrors === null) { @@ -92036,8 +92416,8 @@ function validate128( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema113.anyOf[1].allOf[0].type, - parentSchema: schema113.anyOf[1].allOf[0], + schema: schema114.anyOf[1].allOf[0].type, + parentSchema: schema114.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -92064,7 +92444,7 @@ function validate128( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema113.anyOf[1].allOf[1].properties.type, + parentSchema: schema114.anyOf[1].allOf[1].properties.type, data: data27, }; if (vErrors === null) { @@ -92093,7 +92473,7 @@ function validate128( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema113.anyOf[1].allOf[1].properties.experiment, + parentSchema: schema114.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -92110,8 +92490,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema113.anyOf[1].allOf[1].properties.experiment, + schema: schema114.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema114.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -92161,7 +92541,7 @@ function validate128( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[1].allOf[1].properties.services + schema114.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -92182,10 +92562,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[1].allOf[1].properties.services + schema114.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema113.anyOf[1].allOf[1].properties.services + schema114.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -92216,10 +92596,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[1].allOf[1].properties.services.items + schema114.anyOf[1].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema113.anyOf[1].allOf[1].properties.services.items + schema114.anyOf[1].allOf[1].properties.services.items .properties.serviceId, data: data32, }; @@ -92251,10 +92631,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[1].allOf[1].properties.services + schema114.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema113.anyOf[1].allOf[1].properties.services + schema114.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -92283,15 +92663,15 @@ function validate128( keyword: 'enum', params: { allowedValues: - schema113.anyOf[1].allOf[1].properties.services + schema114.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema113.anyOf[1].allOf[1].properties.services + schema114.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema113.anyOf[1].allOf[1].properties.services + schema114.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -92317,9 +92697,9 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[1].allOf[1].properties.services.items.type, + schema114.anyOf[1].allOf[1].properties.services.items.type, parentSchema: - schema113.anyOf[1].allOf[1].properties.services.items, + schema114.anyOf[1].allOf[1].properties.services.items, data: data30, }; if (vErrors === null) { @@ -92342,8 +92722,8 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema113.anyOf[1].allOf[1].properties.services, + schema: schema114.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema114.anyOf[1].allOf[1].properties.services, data: data29, }; if (vErrors === null) { @@ -92367,8 +92747,8 @@ function validate128( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema113.anyOf[1].allOf[1].type, - parentSchema: schema113.anyOf[1].allOf[1], + schema: schema114.anyOf[1].allOf[1].type, + parentSchema: schema114.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -92396,8 +92776,8 @@ function validate128( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema113.anyOf[2].allOf[0].required, - parentSchema: schema113.anyOf[2].allOf[0], + schema: schema114.anyOf[2].allOf[0].required, + parentSchema: schema114.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -92417,8 +92797,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.name, + schema: schema114.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.name, data: data34, }; if (vErrors === null) { @@ -92443,8 +92823,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.description, + schema: schema114.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.description, data: data35, }; if (vErrors === null) { @@ -92469,8 +92849,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.type, + schema: schema114.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -92493,11 +92873,11 @@ function validate128( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema113.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema114.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema113.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema113.anyOf[2].allOf[0].properties.type, + schema: schema114.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -92522,8 +92902,8 @@ function validate128( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema113.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.isPublic, + schema: schema114.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.isPublic, data: data37, }; if (vErrors === null) { @@ -92565,10 +92945,10 @@ function validate128( message: "must have required property '" + missing7 + "'", schema: - schema113.anyOf[2].allOf[0].properties.viewer.items + schema114.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema113.anyOf[2].allOf[0].properties.viewer.items, + schema114.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -92596,7 +92976,7 @@ function validate128( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[2].allOf[0].properties + schema114.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -92617,10 +92997,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[2].allOf[0].properties + schema114.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema113.anyOf[2].allOf[0].properties + schema114.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -92644,10 +93024,10 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[2].allOf[0].properties.viewer.items + schema114.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema113.anyOf[2].allOf[0].properties.viewer.items, + schema114.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -92670,8 +93050,8 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.viewer, + schema: schema114.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.viewer, data: data38, }; if (vErrors === null) { @@ -92714,10 +93094,10 @@ function validate128( message: "must have required property '" + missing8 + "'", schema: - schema113.anyOf[2].allOf[0].properties.owner.items + schema114.anyOf[2].allOf[0].properties.owner.items .required, parentSchema: - schema113.anyOf[2].allOf[0].properties.owner + schema114.anyOf[2].allOf[0].properties.owner .items, data: data42, }; @@ -92746,7 +93126,7 @@ function validate128( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[2].allOf[0].properties + schema114.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -92767,10 +93147,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[2].allOf[0].properties + schema114.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema113.anyOf[2].allOf[0].properties + schema114.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -92794,10 +93174,10 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[2].allOf[0].properties.owner.items + schema114.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema113.anyOf[2].allOf[0].properties.owner.items, + schema114.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -92820,8 +93200,8 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema113.anyOf[2].allOf[0].properties.owner, + schema: schema114.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema114.anyOf[2].allOf[0].properties.owner, data: data41, }; if (vErrors === null) { @@ -92849,8 +93229,8 @@ function validate128( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema113.anyOf[2].allOf[0].type, - parentSchema: schema113.anyOf[2].allOf[0], + schema: schema114.anyOf[2].allOf[0].type, + parentSchema: schema114.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -92877,7 +93257,7 @@ function validate128( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema113.anyOf[2].allOf[1].properties.type, + parentSchema: schema114.anyOf[2].allOf[1].properties.type, data: data44, }; if (vErrors === null) { @@ -92906,7 +93286,7 @@ function validate128( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema113.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema114.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -92923,8 +93303,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema113.anyOf[2].allOf[1].properties.codeUrl, + schema: schema114.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema114.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -92977,7 +93357,7 @@ function validate128( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[2].allOf[1].properties.services + schema114.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -92998,10 +93378,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[2].allOf[1].properties.services + schema114.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema113.anyOf[2].allOf[1].properties.services + schema114.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -93032,10 +93412,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[2].allOf[1].properties.services + schema114.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema113.anyOf[2].allOf[1].properties.services + schema114.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data49, }; @@ -93067,10 +93447,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[2].allOf[1].properties.services + schema114.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema113.anyOf[2].allOf[1].properties.services + schema114.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -93099,16 +93479,16 @@ function validate128( keyword: 'enum', params: { allowedValues: - schema113.anyOf[2].allOf[1].properties.services + schema114.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema113.anyOf[2].allOf[1].properties.services + schema114.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema113.anyOf[2].allOf[1].properties.services + schema114.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -93134,10 +93514,10 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[2].allOf[1].properties.services.items + schema114.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema113.anyOf[2].allOf[1].properties.services.items, + schema114.anyOf[2].allOf[1].properties.services.items, data: data47, }; if (vErrors === null) { @@ -93160,8 +93540,8 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema113.anyOf[2].allOf[1].properties.services, + schema: schema114.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema114.anyOf[2].allOf[1].properties.services, data: data46, }; if (vErrors === null) { @@ -93185,8 +93565,8 @@ function validate128( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema113.anyOf[2].allOf[1].type, - parentSchema: schema113.anyOf[2].allOf[1], + schema: schema114.anyOf[2].allOf[1].type, + parentSchema: schema114.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -93214,8 +93594,8 @@ function validate128( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema113.anyOf[3].allOf[0].required, - parentSchema: schema113.anyOf[3].allOf[0], + schema: schema114.anyOf[3].allOf[0].required, + parentSchema: schema114.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -93235,8 +93615,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema113.anyOf[3].allOf[0].properties.name, + schema: schema114.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.name, data: data51, }; if (vErrors === null) { @@ -93261,8 +93641,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema113.anyOf[3].allOf[0].properties.description, + schema: schema114.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.description, data: data52, }; if (vErrors === null) { @@ -93287,8 +93667,8 @@ function validate128( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema113.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema113.anyOf[3].allOf[0].properties.type, + schema: schema114.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -93311,11 +93691,11 @@ function validate128( schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema113.anyOf[3].allOf[0].properties.type.enum, + allowedValues: schema114.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema113.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema113.anyOf[3].allOf[0].properties.type, + schema: schema114.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema114.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -93340,8 +93720,8 @@ function validate128( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema113.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema113.anyOf[3].allOf[0].properties.isPublic, + schema: schema114.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.isPublic, data: data54, }; if (vErrors === null) { @@ -93383,10 +93763,10 @@ function validate128( message: "must have required property '" + missing10 + "'", schema: - schema113.anyOf[3].allOf[0].properties.viewer + schema114.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema113.anyOf[3].allOf[0].properties.viewer + schema114.anyOf[3].allOf[0].properties.viewer .items, data: data56, }; @@ -93415,7 +93795,7 @@ function validate128( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[3].allOf[0].properties + schema114.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -93436,10 +93816,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[3].allOf[0].properties + schema114.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema113.anyOf[3].allOf[0].properties + schema114.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -93463,10 +93843,10 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[3].allOf[0].properties.viewer.items + schema114.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema113.anyOf[3].allOf[0].properties.viewer.items, + schema114.anyOf[3].allOf[0].properties.viewer.items, data: data56, }; if (vErrors === null) { @@ -93489,8 +93869,8 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema113.anyOf[3].allOf[0].properties.viewer, + schema: schema114.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema114.anyOf[3].allOf[0].properties.viewer, data: data55, }; if (vErrors === null) { @@ -93535,10 +93915,10 @@ function validate128( missing11 + "'", schema: - schema113.anyOf[3].allOf[0].properties.owner + schema114.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema113.anyOf[3].allOf[0].properties.owner + schema114.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -93570,7 +93950,7 @@ function validate128( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[3].allOf[0].properties + schema114.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -93591,10 +93971,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[3].allOf[0].properties + schema114.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema113.anyOf[3].allOf[0].properties + schema114.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -93618,10 +93998,10 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[3].allOf[0].properties.owner.items + schema114.anyOf[3].allOf[0].properties.owner.items .type, parentSchema: - schema113.anyOf[3].allOf[0].properties.owner + schema114.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -93645,9 +94025,9 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[3].allOf[0].properties.owner.type, + schema: schema114.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema113.anyOf[3].allOf[0].properties.owner, + schema114.anyOf[3].allOf[0].properties.owner, data: data58, }; if (vErrors === null) { @@ -93675,8 +94055,8 @@ function validate128( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema113.anyOf[3].allOf[0].type, - parentSchema: schema113.anyOf[3].allOf[0], + schema: schema114.anyOf[3].allOf[0].type, + parentSchema: schema114.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -93703,7 +94083,7 @@ function validate128( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema113.anyOf[3].allOf[1].properties.type, + parentSchema: schema114.anyOf[3].allOf[1].properties.type, data: data61, }; if (vErrors === null) { @@ -93745,10 +94125,10 @@ function validate128( message: "must have required property '" + missing12 + "'", schema: - schema113.anyOf[3].allOf[1].properties.devices.items + schema114.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema113.anyOf[3].allOf[1].properties.devices.items, + schema114.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -93775,7 +94155,7 @@ function validate128( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema113.anyOf[3].allOf[1].properties.devices + schema114.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -93796,10 +94176,10 @@ function validate128( params: { type: 'string' }, message: 'must be string', schema: - schema113.anyOf[3].allOf[1].properties.devices + schema114.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema113.anyOf[3].allOf[1].properties.devices + schema114.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -93823,9 +94203,9 @@ function validate128( params: { type: 'object' }, message: 'must be object', schema: - schema113.anyOf[3].allOf[1].properties.devices.items.type, + schema114.anyOf[3].allOf[1].properties.devices.items.type, parentSchema: - schema113.anyOf[3].allOf[1].properties.devices.items, + schema114.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -93848,8 +94228,8 @@ function validate128( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema113.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema113.anyOf[3].allOf[1].properties.devices, + schema: schema114.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema114.anyOf[3].allOf[1].properties.devices, data: data62, }; if (vErrors === null) { @@ -93872,8 +94252,8 @@ function validate128( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema113.anyOf[3].allOf[1].type, - parentSchema: schema113.anyOf[3].allOf[1], + schema: schema114.anyOf[3].allOf[1].type, + parentSchema: schema114.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -93898,8 +94278,8 @@ function validate128( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema113.anyOf, - parentSchema: schema113, + schema: schema114.anyOf, + parentSchema: schema114, data, }; if (vErrors === null) { @@ -93908,7 +94288,7 @@ function validate128( vErrors.push(err108); } errors++; - validate128.errors = vErrors; + validate129.errors = vErrors; return false; } else { errors = _errs0; @@ -93920,11 +94300,11 @@ function validate128( } } } - validate128.errors = vErrors; + validate129.errors = vErrors; return errors === 0; } -exports.validateDeviceUpdateResponse = validate129; -const schema114 = { +exports.validateDeviceUpdateResponse = validate130; +const schema115 = { title: 'Device Update', anyOf: [ { @@ -94223,7 +94603,7 @@ const schema114 = { 'x-location': '#/components/schemas/device_update_response', 'x-schema-type': 'response', }; -function validate129( +function validate130( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -94243,8 +94623,8 @@ function validate129( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema114.anyOf[0].allOf[0].required, - parentSchema: schema114.anyOf[0].allOf[0], + schema: schema115.anyOf[0].allOf[0].required, + parentSchema: schema115.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -94264,8 +94644,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.name, + schema: schema115.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema115.anyOf[0].allOf[0].properties.name, data: data0, }; if (vErrors === null) { @@ -94290,8 +94670,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.description, + schema: schema115.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema115.anyOf[0].allOf[0].properties.description, data: data1, }; if (vErrors === null) { @@ -94316,8 +94696,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.type, + schema: schema115.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema115.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -94340,11 +94720,11 @@ function validate129( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema114.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema115.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema114.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema114.anyOf[0].allOf[0].properties.type, + schema: schema115.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema115.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -94369,8 +94749,8 @@ function validate129( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema114.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.isPublic, + schema: schema115.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema115.anyOf[0].allOf[0].properties.isPublic, data: data3, }; if (vErrors === null) { @@ -94411,10 +94791,10 @@ function validate129( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", schema: - schema114.anyOf[0].allOf[0].properties.viewer.items + schema115.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema114.anyOf[0].allOf[0].properties.viewer.items, + schema115.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -94441,7 +94821,7 @@ function validate129( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[0].allOf[0].properties.viewer + schema115.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -94462,10 +94842,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[0].allOf[0].properties.viewer + schema115.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema114.anyOf[0].allOf[0].properties.viewer + schema115.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -94489,9 +94869,9 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[0].allOf[0].properties.viewer.items.type, + schema115.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema114.anyOf[0].allOf[0].properties.viewer.items, + schema115.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -94514,8 +94894,8 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.viewer, + schema: schema115.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema115.anyOf[0].allOf[0].properties.viewer, data: data4, }; if (vErrors === null) { @@ -94558,10 +94938,10 @@ function validate129( message: "must have required property '" + missing2 + "'", schema: - schema114.anyOf[0].allOf[0].properties.owner.items + schema115.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema114.anyOf[0].allOf[0].properties.owner.items, + schema115.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -94588,7 +94968,7 @@ function validate129( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[0].allOf[0].properties.owner + schema115.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -94609,10 +94989,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[0].allOf[0].properties.owner + schema115.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema114.anyOf[0].allOf[0].properties.owner + schema115.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -94636,9 +95016,9 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[0].allOf[0].properties.owner.items.type, + schema115.anyOf[0].allOf[0].properties.owner.items.type, parentSchema: - schema114.anyOf[0].allOf[0].properties.owner.items, + schema115.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -94661,8 +95041,8 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema114.anyOf[0].allOf[0].properties.owner, + schema: schema115.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema115.anyOf[0].allOf[0].properties.owner, data: data7, }; if (vErrors === null) { @@ -94690,8 +95070,8 @@ function validate129( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema114.anyOf[0].allOf[0].type, - parentSchema: schema114.anyOf[0].allOf[0], + schema: schema115.anyOf[0].allOf[0].type, + parentSchema: schema115.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -94718,7 +95098,7 @@ function validate129( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema114.anyOf[0].allOf[1].properties.type, + parentSchema: schema115.anyOf[0].allOf[1].properties.type, data: data10, }; if (vErrors === null) { @@ -94747,7 +95127,7 @@ function validate129( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema114.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema115.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -94764,8 +95144,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema114.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema115.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema115.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -94811,7 +95191,7 @@ function validate129( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[0].allOf[1].properties.services + schema115.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data14, }; @@ -94832,10 +95212,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[0].allOf[1].properties.services.items + schema115.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema114.anyOf[0].allOf[1].properties.services.items + schema115.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -94866,10 +95246,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[0].allOf[1].properties.services.items + schema115.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema114.anyOf[0].allOf[1].properties.services.items + schema115.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data15, }; @@ -94901,10 +95281,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[0].allOf[1].properties.services.items + schema115.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema114.anyOf[0].allOf[1].properties.services.items + schema115.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -94933,15 +95313,15 @@ function validate129( keyword: 'enum', params: { allowedValues: - schema114.anyOf[0].allOf[1].properties.services + schema115.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema114.anyOf[0].allOf[1].properties.services.items + schema115.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema114.anyOf[0].allOf[1].properties.services.items + schema115.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -94966,9 +95346,9 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[0].allOf[1].properties.services.items.type, + schema115.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema114.anyOf[0].allOf[1].properties.services.items, + schema115.anyOf[0].allOf[1].properties.services.items, data: data13, }; if (vErrors === null) { @@ -94991,8 +95371,8 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema114.anyOf[0].allOf[1].properties.services, + schema: schema115.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema115.anyOf[0].allOf[1].properties.services, data: data12, }; if (vErrors === null) { @@ -95016,8 +95396,8 @@ function validate129( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema114.anyOf[0].allOf[1].type, - parentSchema: schema114.anyOf[0].allOf[1], + schema: schema115.anyOf[0].allOf[1].type, + parentSchema: schema115.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -95045,8 +95425,8 @@ function validate129( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema114.anyOf[1].allOf[0].required, - parentSchema: schema114.anyOf[1].allOf[0], + schema: schema115.anyOf[1].allOf[0].required, + parentSchema: schema115.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -95066,8 +95446,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.name, + schema: schema115.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema115.anyOf[1].allOf[0].properties.name, data: data17, }; if (vErrors === null) { @@ -95092,8 +95472,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.description, + schema: schema115.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema115.anyOf[1].allOf[0].properties.description, data: data18, }; if (vErrors === null) { @@ -95118,8 +95498,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.type, + schema: schema115.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema115.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -95142,11 +95522,11 @@ function validate129( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema114.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema115.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema114.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema114.anyOf[1].allOf[0].properties.type, + schema: schema115.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema115.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -95171,8 +95551,8 @@ function validate129( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema114.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.isPublic, + schema: schema115.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema115.anyOf[1].allOf[0].properties.isPublic, data: data20, }; if (vErrors === null) { @@ -95214,10 +95594,10 @@ function validate129( message: "must have required property '" + missing4 + "'", schema: - schema114.anyOf[1].allOf[0].properties.viewer.items + schema115.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema114.anyOf[1].allOf[0].properties.viewer.items, + schema115.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -95244,7 +95624,7 @@ function validate129( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[1].allOf[0].properties + schema115.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data23, }; @@ -95265,10 +95645,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[1].allOf[0].properties.viewer + schema115.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema114.anyOf[1].allOf[0].properties.viewer + schema115.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -95292,10 +95672,10 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[1].allOf[0].properties.viewer.items + schema115.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema114.anyOf[1].allOf[0].properties.viewer.items, + schema115.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -95318,8 +95698,8 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.viewer, + schema: schema115.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema115.anyOf[1].allOf[0].properties.viewer, data: data21, }; if (vErrors === null) { @@ -95362,10 +95742,10 @@ function validate129( message: "must have required property '" + missing5 + "'", schema: - schema114.anyOf[1].allOf[0].properties.owner.items + schema115.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema114.anyOf[1].allOf[0].properties.owner.items, + schema115.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -95393,7 +95773,7 @@ function validate129( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[1].allOf[0].properties + schema115.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data26, }; @@ -95414,10 +95794,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[1].allOf[0].properties.owner + schema115.anyOf[1].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema114.anyOf[1].allOf[0].properties.owner + schema115.anyOf[1].allOf[0].properties.owner .items.properties.url, data: data26, }; @@ -95441,10 +95821,10 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[1].allOf[0].properties.owner.items + schema115.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema114.anyOf[1].allOf[0].properties.owner.items, + schema115.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -95467,8 +95847,8 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema114.anyOf[1].allOf[0].properties.owner, + schema: schema115.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema115.anyOf[1].allOf[0].properties.owner, data: data24, }; if (vErrors === null) { @@ -95496,8 +95876,8 @@ function validate129( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema114.anyOf[1].allOf[0].type, - parentSchema: schema114.anyOf[1].allOf[0], + schema: schema115.anyOf[1].allOf[0].type, + parentSchema: schema115.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -95524,7 +95904,7 @@ function validate129( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema114.anyOf[1].allOf[1].properties.type, + parentSchema: schema115.anyOf[1].allOf[1].properties.type, data: data27, }; if (vErrors === null) { @@ -95553,7 +95933,7 @@ function validate129( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema114.anyOf[1].allOf[1].properties.experiment, + parentSchema: schema115.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -95570,8 +95950,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema114.anyOf[1].allOf[1].properties.experiment, + schema: schema115.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema115.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -95621,7 +96001,7 @@ function validate129( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[1].allOf[1].properties.services + schema115.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -95642,10 +96022,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[1].allOf[1].properties.services + schema115.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema114.anyOf[1].allOf[1].properties.services + schema115.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -95676,10 +96056,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[1].allOf[1].properties.services.items + schema115.anyOf[1].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema114.anyOf[1].allOf[1].properties.services.items + schema115.anyOf[1].allOf[1].properties.services.items .properties.serviceId, data: data32, }; @@ -95711,10 +96091,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[1].allOf[1].properties.services + schema115.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema114.anyOf[1].allOf[1].properties.services + schema115.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -95743,15 +96123,15 @@ function validate129( keyword: 'enum', params: { allowedValues: - schema114.anyOf[1].allOf[1].properties.services + schema115.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema114.anyOf[1].allOf[1].properties.services + schema115.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema114.anyOf[1].allOf[1].properties.services + schema115.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -95777,9 +96157,9 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[1].allOf[1].properties.services.items.type, + schema115.anyOf[1].allOf[1].properties.services.items.type, parentSchema: - schema114.anyOf[1].allOf[1].properties.services.items, + schema115.anyOf[1].allOf[1].properties.services.items, data: data30, }; if (vErrors === null) { @@ -95802,8 +96182,8 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema114.anyOf[1].allOf[1].properties.services, + schema: schema115.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema115.anyOf[1].allOf[1].properties.services, data: data29, }; if (vErrors === null) { @@ -95827,8 +96207,8 @@ function validate129( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema114.anyOf[1].allOf[1].type, - parentSchema: schema114.anyOf[1].allOf[1], + schema: schema115.anyOf[1].allOf[1].type, + parentSchema: schema115.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -95856,8 +96236,8 @@ function validate129( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema114.anyOf[2].allOf[0].required, - parentSchema: schema114.anyOf[2].allOf[0], + schema: schema115.anyOf[2].allOf[0].required, + parentSchema: schema115.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -95877,8 +96257,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.name, + schema: schema115.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema115.anyOf[2].allOf[0].properties.name, data: data34, }; if (vErrors === null) { @@ -95903,8 +96283,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.description, + schema: schema115.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema115.anyOf[2].allOf[0].properties.description, data: data35, }; if (vErrors === null) { @@ -95929,8 +96309,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.type, + schema: schema115.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema115.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -95953,11 +96333,11 @@ function validate129( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema114.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema115.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema114.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema114.anyOf[2].allOf[0].properties.type, + schema: schema115.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema115.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -95982,8 +96362,8 @@ function validate129( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema114.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.isPublic, + schema: schema115.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema115.anyOf[2].allOf[0].properties.isPublic, data: data37, }; if (vErrors === null) { @@ -96025,10 +96405,10 @@ function validate129( message: "must have required property '" + missing7 + "'", schema: - schema114.anyOf[2].allOf[0].properties.viewer.items + schema115.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema114.anyOf[2].allOf[0].properties.viewer.items, + schema115.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -96056,7 +96436,7 @@ function validate129( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[2].allOf[0].properties + schema115.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -96077,10 +96457,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[2].allOf[0].properties + schema115.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema114.anyOf[2].allOf[0].properties + schema115.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -96104,10 +96484,10 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[2].allOf[0].properties.viewer.items + schema115.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema114.anyOf[2].allOf[0].properties.viewer.items, + schema115.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -96130,8 +96510,8 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.viewer, + schema: schema115.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema115.anyOf[2].allOf[0].properties.viewer, data: data38, }; if (vErrors === null) { @@ -96174,10 +96554,10 @@ function validate129( message: "must have required property '" + missing8 + "'", schema: - schema114.anyOf[2].allOf[0].properties.owner.items + schema115.anyOf[2].allOf[0].properties.owner.items .required, parentSchema: - schema114.anyOf[2].allOf[0].properties.owner + schema115.anyOf[2].allOf[0].properties.owner .items, data: data42, }; @@ -96206,7 +96586,7 @@ function validate129( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[2].allOf[0].properties + schema115.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -96227,10 +96607,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[2].allOf[0].properties + schema115.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema114.anyOf[2].allOf[0].properties + schema115.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -96254,10 +96634,10 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[2].allOf[0].properties.owner.items + schema115.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema114.anyOf[2].allOf[0].properties.owner.items, + schema115.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -96280,8 +96660,8 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema114.anyOf[2].allOf[0].properties.owner, + schema: schema115.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema115.anyOf[2].allOf[0].properties.owner, data: data41, }; if (vErrors === null) { @@ -96309,8 +96689,8 @@ function validate129( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema114.anyOf[2].allOf[0].type, - parentSchema: schema114.anyOf[2].allOf[0], + schema: schema115.anyOf[2].allOf[0].type, + parentSchema: schema115.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -96337,7 +96717,7 @@ function validate129( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema114.anyOf[2].allOf[1].properties.type, + parentSchema: schema115.anyOf[2].allOf[1].properties.type, data: data44, }; if (vErrors === null) { @@ -96366,7 +96746,7 @@ function validate129( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema114.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema115.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -96383,8 +96763,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema114.anyOf[2].allOf[1].properties.codeUrl, + schema: schema115.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema115.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -96437,7 +96817,7 @@ function validate129( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[2].allOf[1].properties.services + schema115.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -96458,10 +96838,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[2].allOf[1].properties.services + schema115.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema114.anyOf[2].allOf[1].properties.services + schema115.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -96492,10 +96872,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[2].allOf[1].properties.services + schema115.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema114.anyOf[2].allOf[1].properties.services + schema115.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data49, }; @@ -96527,10 +96907,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[2].allOf[1].properties.services + schema115.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema114.anyOf[2].allOf[1].properties.services + schema115.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -96559,16 +96939,16 @@ function validate129( keyword: 'enum', params: { allowedValues: - schema114.anyOf[2].allOf[1].properties.services + schema115.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema114.anyOf[2].allOf[1].properties.services + schema115.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema114.anyOf[2].allOf[1].properties.services + schema115.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -96594,10 +96974,10 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[2].allOf[1].properties.services.items + schema115.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema114.anyOf[2].allOf[1].properties.services.items, + schema115.anyOf[2].allOf[1].properties.services.items, data: data47, }; if (vErrors === null) { @@ -96620,8 +97000,8 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema114.anyOf[2].allOf[1].properties.services, + schema: schema115.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema115.anyOf[2].allOf[1].properties.services, data: data46, }; if (vErrors === null) { @@ -96645,8 +97025,8 @@ function validate129( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema114.anyOf[2].allOf[1].type, - parentSchema: schema114.anyOf[2].allOf[1], + schema: schema115.anyOf[2].allOf[1].type, + parentSchema: schema115.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -96674,8 +97054,8 @@ function validate129( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema114.anyOf[3].allOf[0].required, - parentSchema: schema114.anyOf[3].allOf[0], + schema: schema115.anyOf[3].allOf[0].required, + parentSchema: schema115.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -96695,8 +97075,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema114.anyOf[3].allOf[0].properties.name, + schema: schema115.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema115.anyOf[3].allOf[0].properties.name, data: data51, }; if (vErrors === null) { @@ -96721,8 +97101,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema114.anyOf[3].allOf[0].properties.description, + schema: schema115.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema115.anyOf[3].allOf[0].properties.description, data: data52, }; if (vErrors === null) { @@ -96747,8 +97127,8 @@ function validate129( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema114.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema114.anyOf[3].allOf[0].properties.type, + schema: schema115.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema115.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -96771,11 +97151,11 @@ function validate129( schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema114.anyOf[3].allOf[0].properties.type.enum, + allowedValues: schema115.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema114.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema114.anyOf[3].allOf[0].properties.type, + schema: schema115.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema115.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -96800,8 +97180,8 @@ function validate129( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema114.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema114.anyOf[3].allOf[0].properties.isPublic, + schema: schema115.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema115.anyOf[3].allOf[0].properties.isPublic, data: data54, }; if (vErrors === null) { @@ -96843,10 +97223,10 @@ function validate129( message: "must have required property '" + missing10 + "'", schema: - schema114.anyOf[3].allOf[0].properties.viewer + schema115.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema114.anyOf[3].allOf[0].properties.viewer + schema115.anyOf[3].allOf[0].properties.viewer .items, data: data56, }; @@ -96875,7 +97255,7 @@ function validate129( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[3].allOf[0].properties + schema115.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -96896,10 +97276,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[3].allOf[0].properties + schema115.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema114.anyOf[3].allOf[0].properties + schema115.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -96923,10 +97303,10 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[3].allOf[0].properties.viewer.items + schema115.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema114.anyOf[3].allOf[0].properties.viewer.items, + schema115.anyOf[3].allOf[0].properties.viewer.items, data: data56, }; if (vErrors === null) { @@ -96949,8 +97329,8 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema114.anyOf[3].allOf[0].properties.viewer, + schema: schema115.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema115.anyOf[3].allOf[0].properties.viewer, data: data55, }; if (vErrors === null) { @@ -96995,10 +97375,10 @@ function validate129( missing11 + "'", schema: - schema114.anyOf[3].allOf[0].properties.owner + schema115.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema114.anyOf[3].allOf[0].properties.owner + schema115.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -97030,7 +97410,7 @@ function validate129( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[3].allOf[0].properties + schema115.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -97051,10 +97431,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[3].allOf[0].properties + schema115.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema114.anyOf[3].allOf[0].properties + schema115.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -97078,10 +97458,10 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[3].allOf[0].properties.owner.items + schema115.anyOf[3].allOf[0].properties.owner.items .type, parentSchema: - schema114.anyOf[3].allOf[0].properties.owner + schema115.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -97105,9 +97485,9 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[3].allOf[0].properties.owner.type, + schema: schema115.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema114.anyOf[3].allOf[0].properties.owner, + schema115.anyOf[3].allOf[0].properties.owner, data: data58, }; if (vErrors === null) { @@ -97135,8 +97515,8 @@ function validate129( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema114.anyOf[3].allOf[0].type, - parentSchema: schema114.anyOf[3].allOf[0], + schema: schema115.anyOf[3].allOf[0].type, + parentSchema: schema115.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -97163,7 +97543,7 @@ function validate129( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema114.anyOf[3].allOf[1].properties.type, + parentSchema: schema115.anyOf[3].allOf[1].properties.type, data: data61, }; if (vErrors === null) { @@ -97205,10 +97585,10 @@ function validate129( message: "must have required property '" + missing12 + "'", schema: - schema114.anyOf[3].allOf[1].properties.devices.items + schema115.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema114.anyOf[3].allOf[1].properties.devices.items, + schema115.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -97235,7 +97615,7 @@ function validate129( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema114.anyOf[3].allOf[1].properties.devices + schema115.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -97256,10 +97636,10 @@ function validate129( params: { type: 'string' }, message: 'must be string', schema: - schema114.anyOf[3].allOf[1].properties.devices + schema115.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema114.anyOf[3].allOf[1].properties.devices + schema115.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -97283,9 +97663,9 @@ function validate129( params: { type: 'object' }, message: 'must be object', schema: - schema114.anyOf[3].allOf[1].properties.devices.items.type, + schema115.anyOf[3].allOf[1].properties.devices.items.type, parentSchema: - schema114.anyOf[3].allOf[1].properties.devices.items, + schema115.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -97308,8 +97688,8 @@ function validate129( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema114.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema114.anyOf[3].allOf[1].properties.devices, + schema: schema115.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema115.anyOf[3].allOf[1].properties.devices, data: data62, }; if (vErrors === null) { @@ -97332,8 +97712,8 @@ function validate129( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema114.anyOf[3].allOf[1].type, - parentSchema: schema114.anyOf[3].allOf[1], + schema: schema115.anyOf[3].allOf[1].type, + parentSchema: schema115.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -97358,8 +97738,8 @@ function validate129( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema114.anyOf, - parentSchema: schema114, + schema: schema115.anyOf, + parentSchema: schema115, data, }; if (vErrors === null) { @@ -97368,7 +97748,7 @@ function validate129( vErrors.push(err108); } errors++; - validate129.errors = vErrors; + validate130.errors = vErrors; return false; } else { errors = _errs0; @@ -97380,11 +97760,11 @@ function validate129( } } } - validate129.errors = vErrors; + validate130.errors = vErrors; return errors === 0; } -exports.validateAvailabilityRuleRequest = validate130; -const schema115 = { +exports.validateAvailabilityRuleRequest = validate131; +const schema116 = { title: 'Availability Rule', type: 'object', allOf: [ @@ -97426,22 +97806,22 @@ const schema115 = { 'x-location': '#/components/schemas/availability_rule_request', 'x-schema-type': 'request', }; -function validate130( +function validate131( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (!(data && typeof data == 'object' && !Array.isArray(data))) { - validate130.errors = [ + validate131.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema115.type, - parentSchema: schema115, + schema: schema116.type, + parentSchema: schema116, data, }, ]; @@ -97457,7 +97837,7 @@ function validate130( if (errors === _errs3) { if (typeof data0 === 'string') { if (!formats22.validate(data0)) { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/start', schemaPath: '#/allOf/0/properties/start/format', @@ -97465,22 +97845,22 @@ function validate130( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema115.allOf[0].properties.start, + parentSchema: schema116.allOf[0].properties.start, data: data0, }, ]; return false; } } else { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/start', schemaPath: '#/allOf/0/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema115.allOf[0].properties.start.type, - parentSchema: schema115.allOf[0].properties.start, + schema: schema116.allOf[0].properties.start.type, + parentSchema: schema116.allOf[0].properties.start, data: data0, }, ]; @@ -97500,7 +97880,7 @@ function validate130( if (errors === _errs5) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/end', schemaPath: '#/allOf/0/properties/end/format', @@ -97508,22 +97888,22 @@ function validate130( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema115.allOf[0].properties.end, + parentSchema: schema116.allOf[0].properties.end, data: data1, }, ]; return false; } } else { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/end', schemaPath: '#/allOf/0/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema115.allOf[0].properties.end.type, - parentSchema: schema115.allOf[0].properties.end, + schema: schema116.allOf[0].properties.end.type, + parentSchema: schema116.allOf[0].properties.end, data: data1, }, ]; @@ -97537,15 +97917,15 @@ function validate130( } } } else { - validate130.errors = [ + validate131.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema115.allOf[0].type, - parentSchema: schema115.allOf[0], + schema: schema116.allOf[0].type, + parentSchema: schema116.allOf[0], data, }, ]; @@ -97561,15 +97941,15 @@ function validate130( let data2 = data.available; const _errs9 = errors; if (typeof data2 !== 'boolean') { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/available', schemaPath: '#/allOf/1/properties/available/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema115.allOf[1].properties.available.type, - parentSchema: schema115.allOf[1].properties.available, + schema: schema116.allOf[1].properties.available.type, + parentSchema: schema116.allOf[1].properties.available, data: data2, }, ]; @@ -97587,15 +97967,15 @@ function validate130( if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { let missing0; if (data3.frequency === undefined && (missing0 = 'frequency')) { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/repeat', schemaPath: '#/allOf/1/properties/repeat/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema115.allOf[1].properties.repeat.required, - parentSchema: schema115.allOf[1].properties.repeat, + schema: schema116.allOf[1].properties.repeat.required, + parentSchema: schema116.allOf[1].properties.repeat, data: data3, }, ]; @@ -97605,7 +97985,7 @@ function validate130( let data4 = data3.frequency; const _errs13 = errors; if (typeof data4 !== 'string') { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/repeat/frequency', schemaPath: @@ -97614,10 +97994,10 @@ function validate130( params: { type: 'string' }, message: 'must be string', schema: - schema115.allOf[1].properties.repeat.properties.frequency + schema116.allOf[1].properties.repeat.properties.frequency .type, parentSchema: - schema115.allOf[1].properties.repeat.properties.frequency, + schema116.allOf[1].properties.repeat.properties.frequency, data: data4, }, ]; @@ -97626,7 +98006,7 @@ function validate130( if ( !(data4 === 'HOURLY' || data4 === 'DAILY' || data4 === 'WEEKLY') ) { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/repeat/frequency', schemaPath: @@ -97634,15 +98014,15 @@ function validate130( keyword: 'enum', params: { allowedValues: - schema115.allOf[1].properties.repeat.properties.frequency + schema116.allOf[1].properties.repeat.properties.frequency .enum, }, message: 'must be equal to one of the allowed values', schema: - schema115.allOf[1].properties.repeat.properties.frequency + schema116.allOf[1].properties.repeat.properties.frequency .enum, parentSchema: - schema115.allOf[1].properties.repeat.properties.frequency, + schema116.allOf[1].properties.repeat.properties.frequency, data: data4, }, ]; @@ -97660,7 +98040,7 @@ function validate130( if (errors === _errs15) { if (typeof data5 === 'string') { if (!formats22.validate(data5)) { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/repeat/until', schemaPath: @@ -97670,14 +98050,14 @@ function validate130( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema115.allOf[1].properties.repeat.properties.until, + schema116.allOf[1].properties.repeat.properties.until, data: data5, }, ]; return false; } } else { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/repeat/until', schemaPath: @@ -97686,10 +98066,10 @@ function validate130( params: { type: 'string' }, message: 'must be string', schema: - schema115.allOf[1].properties.repeat.properties.until + schema116.allOf[1].properties.repeat.properties.until .type, parentSchema: - schema115.allOf[1].properties.repeat.properties.until, + schema116.allOf[1].properties.repeat.properties.until, data: data5, }, ]; @@ -97713,7 +98093,7 @@ function validate130( isFinite(data6) ) ) { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/repeat/count', schemaPath: @@ -97722,10 +98102,10 @@ function validate130( params: { type: 'integer' }, message: 'must be integer', schema: - schema115.allOf[1].properties.repeat.properties.count + schema116.allOf[1].properties.repeat.properties.count .type, parentSchema: - schema115.allOf[1].properties.repeat.properties.count, + schema116.allOf[1].properties.repeat.properties.count, data: data6, }, ]; @@ -97739,15 +98119,15 @@ function validate130( } } } else { - validate130.errors = [ + validate131.errors = [ { instancePath: instancePath + '/repeat', schemaPath: '#/allOf/1/properties/repeat/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema115.allOf[1].properties.repeat.type, - parentSchema: schema115.allOf[1].properties.repeat, + schema: schema116.allOf[1].properties.repeat.type, + parentSchema: schema116.allOf[1].properties.repeat, data: data3, }, ]; @@ -97760,15 +98140,15 @@ function validate130( } } } else { - validate130.errors = [ + validate131.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema115.allOf[1].type, - parentSchema: schema115.allOf[1], + schema: schema116.allOf[1].type, + parentSchema: schema116.allOf[1], data, }, ]; @@ -97777,11 +98157,11 @@ function validate130( } var valid0 = _errs7 === errors; } - validate130.errors = vErrors; + validate131.errors = vErrors; return errors === 0; } -exports.validateAvailabilityRuleResponse = validate131; -const schema116 = { +exports.validateAvailabilityRuleResponse = validate132; +const schema117 = { title: 'Availability Rule', type: 'object', allOf: [ @@ -97823,22 +98203,22 @@ const schema116 = { 'x-location': '#/components/schemas/availability_rule_response', 'x-schema-type': 'response', }; -function validate131( +function validate132( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (!(data && typeof data == 'object' && !Array.isArray(data))) { - validate131.errors = [ + validate132.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema116.type, - parentSchema: schema116, + schema: schema117.type, + parentSchema: schema117, data, }, ]; @@ -97854,7 +98234,7 @@ function validate131( if (errors === _errs3) { if (typeof data0 === 'string') { if (!formats22.validate(data0)) { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/start', schemaPath: '#/allOf/0/properties/start/format', @@ -97862,22 +98242,22 @@ function validate131( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema116.allOf[0].properties.start, + parentSchema: schema117.allOf[0].properties.start, data: data0, }, ]; return false; } } else { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/start', schemaPath: '#/allOf/0/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema116.allOf[0].properties.start.type, - parentSchema: schema116.allOf[0].properties.start, + schema: schema117.allOf[0].properties.start.type, + parentSchema: schema117.allOf[0].properties.start, data: data0, }, ]; @@ -97897,7 +98277,7 @@ function validate131( if (errors === _errs5) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/end', schemaPath: '#/allOf/0/properties/end/format', @@ -97905,22 +98285,22 @@ function validate131( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema116.allOf[0].properties.end, + parentSchema: schema117.allOf[0].properties.end, data: data1, }, ]; return false; } } else { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/end', schemaPath: '#/allOf/0/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema116.allOf[0].properties.end.type, - parentSchema: schema116.allOf[0].properties.end, + schema: schema117.allOf[0].properties.end.type, + parentSchema: schema117.allOf[0].properties.end, data: data1, }, ]; @@ -97934,15 +98314,15 @@ function validate131( } } } else { - validate131.errors = [ + validate132.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema116.allOf[0].type, - parentSchema: schema116.allOf[0], + schema: schema117.allOf[0].type, + parentSchema: schema117.allOf[0], data, }, ]; @@ -97958,15 +98338,15 @@ function validate131( let data2 = data.available; const _errs9 = errors; if (typeof data2 !== 'boolean') { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/available', schemaPath: '#/allOf/1/properties/available/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema116.allOf[1].properties.available.type, - parentSchema: schema116.allOf[1].properties.available, + schema: schema117.allOf[1].properties.available.type, + parentSchema: schema117.allOf[1].properties.available, data: data2, }, ]; @@ -97984,15 +98364,15 @@ function validate131( if (data3 && typeof data3 == 'object' && !Array.isArray(data3)) { let missing0; if (data3.frequency === undefined && (missing0 = 'frequency')) { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/repeat', schemaPath: '#/allOf/1/properties/repeat/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema116.allOf[1].properties.repeat.required, - parentSchema: schema116.allOf[1].properties.repeat, + schema: schema117.allOf[1].properties.repeat.required, + parentSchema: schema117.allOf[1].properties.repeat, data: data3, }, ]; @@ -98002,7 +98382,7 @@ function validate131( let data4 = data3.frequency; const _errs13 = errors; if (typeof data4 !== 'string') { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/repeat/frequency', schemaPath: @@ -98011,10 +98391,10 @@ function validate131( params: { type: 'string' }, message: 'must be string', schema: - schema116.allOf[1].properties.repeat.properties.frequency + schema117.allOf[1].properties.repeat.properties.frequency .type, parentSchema: - schema116.allOf[1].properties.repeat.properties.frequency, + schema117.allOf[1].properties.repeat.properties.frequency, data: data4, }, ]; @@ -98023,7 +98403,7 @@ function validate131( if ( !(data4 === 'HOURLY' || data4 === 'DAILY' || data4 === 'WEEKLY') ) { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/repeat/frequency', schemaPath: @@ -98031,15 +98411,15 @@ function validate131( keyword: 'enum', params: { allowedValues: - schema116.allOf[1].properties.repeat.properties.frequency + schema117.allOf[1].properties.repeat.properties.frequency .enum, }, message: 'must be equal to one of the allowed values', schema: - schema116.allOf[1].properties.repeat.properties.frequency + schema117.allOf[1].properties.repeat.properties.frequency .enum, parentSchema: - schema116.allOf[1].properties.repeat.properties.frequency, + schema117.allOf[1].properties.repeat.properties.frequency, data: data4, }, ]; @@ -98057,7 +98437,7 @@ function validate131( if (errors === _errs15) { if (typeof data5 === 'string') { if (!formats22.validate(data5)) { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/repeat/until', schemaPath: @@ -98067,14 +98447,14 @@ function validate131( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema116.allOf[1].properties.repeat.properties.until, + schema117.allOf[1].properties.repeat.properties.until, data: data5, }, ]; return false; } } else { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/repeat/until', schemaPath: @@ -98083,10 +98463,10 @@ function validate131( params: { type: 'string' }, message: 'must be string', schema: - schema116.allOf[1].properties.repeat.properties.until + schema117.allOf[1].properties.repeat.properties.until .type, parentSchema: - schema116.allOf[1].properties.repeat.properties.until, + schema117.allOf[1].properties.repeat.properties.until, data: data5, }, ]; @@ -98110,7 +98490,7 @@ function validate131( isFinite(data6) ) ) { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/repeat/count', schemaPath: @@ -98119,10 +98499,10 @@ function validate131( params: { type: 'integer' }, message: 'must be integer', schema: - schema116.allOf[1].properties.repeat.properties.count + schema117.allOf[1].properties.repeat.properties.count .type, parentSchema: - schema116.allOf[1].properties.repeat.properties.count, + schema117.allOf[1].properties.repeat.properties.count, data: data6, }, ]; @@ -98136,15 +98516,15 @@ function validate131( } } } else { - validate131.errors = [ + validate132.errors = [ { instancePath: instancePath + '/repeat', schemaPath: '#/allOf/1/properties/repeat/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema116.allOf[1].properties.repeat.type, - parentSchema: schema116.allOf[1].properties.repeat, + schema: schema117.allOf[1].properties.repeat.type, + parentSchema: schema117.allOf[1].properties.repeat, data: data3, }, ]; @@ -98157,15 +98537,15 @@ function validate131( } } } else { - validate131.errors = [ + validate132.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema116.allOf[1].type, - parentSchema: schema116.allOf[1], + schema: schema117.allOf[1].type, + parentSchema: schema117.allOf[1], data, }, ]; @@ -98174,11 +98554,11 @@ function validate131( } var valid0 = _errs7 === errors; } - validate131.errors = vErrors; + validate132.errors = vErrors; return errors === 0; } -exports.validateMessageRequest = validate132; -const schema117 = { +exports.validateMessageRequest = validate133; +const schema118 = { title: 'Message', type: 'object', properties: { messageType: { type: 'string' } }, @@ -98190,7 +98570,7 @@ const schema117 = { 'x-location': '#/components/schemas/message_request', 'x-schema-type': 'request', }; -function validate132( +function validate133( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -98200,15 +98580,15 @@ function validate132( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate132.errors = [ + validate133.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema117.required, - parentSchema: schema117, + schema: schema118.required, + parentSchema: schema118, data, }, ]; @@ -98217,15 +98597,15 @@ function validate132( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate132.errors = [ + validate133.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema117.properties.messageType.type, - parentSchema: schema117.properties.messageType, + schema: schema118.properties.messageType.type, + parentSchema: schema118.properties.messageType, data: data0, }, ]; @@ -98234,26 +98614,26 @@ function validate132( } } } else { - validate132.errors = [ + validate133.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema117.type, - parentSchema: schema117, + schema: schema118.type, + parentSchema: schema118, data, }, ]; return false; } } - validate132.errors = vErrors; + validate133.errors = vErrors; return errors === 0; } -exports.validateMessageResponse = validate133; -const schema118 = { +exports.validateMessageResponse = validate134; +const schema119 = { title: 'Message', type: 'object', properties: { messageType: { type: 'string' } }, @@ -98265,7 +98645,7 @@ const schema118 = { 'x-location': '#/components/schemas/message_response', 'x-schema-type': 'response', }; -function validate133( +function validate134( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -98275,15 +98655,15 @@ function validate133( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate133.errors = [ + validate134.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema118.required, - parentSchema: schema118, + schema: schema119.required, + parentSchema: schema119, data, }, ]; @@ -98292,15 +98672,15 @@ function validate133( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate133.errors = [ + validate134.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema118.properties.messageType.type, - parentSchema: schema118.properties.messageType, + schema: schema119.properties.messageType.type, + parentSchema: schema119.properties.messageType, data: data0, }, ]; @@ -98309,26 +98689,26 @@ function validate133( } } } else { - validate133.errors = [ + validate134.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema118.type, - parentSchema: schema118, + schema: schema119.type, + parentSchema: schema119, data, }, ]; return false; } } - validate133.errors = vErrors; + validate134.errors = vErrors; return errors === 0; } -exports.validateCommandMessageRequest = validate134; -const schema119 = { +exports.validateCommandMessageRequest = validate135; +const schema120 = { title: 'Command Message', allOf: [ { @@ -98351,7 +98731,7 @@ const schema119 = { 'x-location': '#/components/schemas/command_message_request', 'x-schema-type': 'request', }; -function validate134( +function validate135( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -98362,15 +98742,15 @@ function validate134( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate134.errors = [ + validate135.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema119.allOf[0].required, - parentSchema: schema119.allOf[0], + schema: schema120.allOf[0].required, + parentSchema: schema120.allOf[0], data, }, ]; @@ -98379,15 +98759,15 @@ function validate134( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate134.errors = [ + validate135.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema119.allOf[0].properties.messageType.type, - parentSchema: schema119.allOf[0].properties.messageType, + schema: schema120.allOf[0].properties.messageType.type, + parentSchema: schema120.allOf[0].properties.messageType, data: data0, }, ]; @@ -98396,15 +98776,15 @@ function validate134( } } } else { - validate134.errors = [ + validate135.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema119.allOf[0].type, - parentSchema: schema119.allOf[0], + schema: schema120.allOf[0].type, + parentSchema: schema120.allOf[0], data, }, ]; @@ -98421,15 +98801,15 @@ function validate134( (data.messageType === undefined && (missing1 = 'messageType')) || (data.command === undefined && (missing1 = 'command')) ) { - validate134.errors = [ + validate135.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema119.allOf[1].required, - parentSchema: schema119.allOf[1], + schema: schema120.allOf[1].required, + parentSchema: schema120.allOf[1], data, }, ]; @@ -98439,7 +98819,7 @@ function validate134( let data1 = data.messageType; const _errs7 = errors; if ('command' !== data1) { - validate134.errors = [ + validate135.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/1/properties/messageType/const', @@ -98447,7 +98827,7 @@ function validate134( params: { allowedValue: 'command' }, message: 'must be equal to constant', schema: 'command', - parentSchema: schema119.allOf[1].properties.messageType, + parentSchema: schema120.allOf[1].properties.messageType, data: data1, }, ]; @@ -98462,15 +98842,15 @@ function validate134( let data2 = data.command; const _errs8 = errors; if (typeof data2 !== 'string') { - validate134.errors = [ + validate135.errors = [ { instancePath: instancePath + '/command', schemaPath: '#/allOf/1/properties/command/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema119.allOf[1].properties.command.type, - parentSchema: schema119.allOf[1].properties.command, + schema: schema120.allOf[1].properties.command.type, + parentSchema: schema120.allOf[1].properties.command, data: data2, }, ]; @@ -98483,15 +98863,15 @@ function validate134( } } } else { - validate134.errors = [ + validate135.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema119.allOf[1].type, - parentSchema: schema119.allOf[1], + schema: schema120.allOf[1].type, + parentSchema: schema120.allOf[1], data, }, ]; @@ -98500,11 +98880,11 @@ function validate134( } var valid0 = _errs5 === errors; } - validate134.errors = vErrors; + validate135.errors = vErrors; return errors === 0; } -exports.validateCommandMessageResponse = validate135; -const schema120 = { +exports.validateCommandMessageResponse = validate136; +const schema121 = { title: 'Command Message', allOf: [ { @@ -98527,7 +98907,7 @@ const schema120 = { 'x-location': '#/components/schemas/command_message_response', 'x-schema-type': 'response', }; -function validate135( +function validate136( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -98538,15 +98918,15 @@ function validate135( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate135.errors = [ + validate136.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema120.allOf[0].required, - parentSchema: schema120.allOf[0], + schema: schema121.allOf[0].required, + parentSchema: schema121.allOf[0], data, }, ]; @@ -98555,15 +98935,15 @@ function validate135( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate135.errors = [ + validate136.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema120.allOf[0].properties.messageType.type, - parentSchema: schema120.allOf[0].properties.messageType, + schema: schema121.allOf[0].properties.messageType.type, + parentSchema: schema121.allOf[0].properties.messageType, data: data0, }, ]; @@ -98572,15 +98952,15 @@ function validate135( } } } else { - validate135.errors = [ + validate136.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema120.allOf[0].type, - parentSchema: schema120.allOf[0], + schema: schema121.allOf[0].type, + parentSchema: schema121.allOf[0], data, }, ]; @@ -98597,15 +98977,15 @@ function validate135( (data.messageType === undefined && (missing1 = 'messageType')) || (data.command === undefined && (missing1 = 'command')) ) { - validate135.errors = [ + validate136.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema120.allOf[1].required, - parentSchema: schema120.allOf[1], + schema: schema121.allOf[1].required, + parentSchema: schema121.allOf[1], data, }, ]; @@ -98615,7 +98995,7 @@ function validate135( let data1 = data.messageType; const _errs7 = errors; if ('command' !== data1) { - validate135.errors = [ + validate136.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/1/properties/messageType/const', @@ -98623,7 +99003,7 @@ function validate135( params: { allowedValue: 'command' }, message: 'must be equal to constant', schema: 'command', - parentSchema: schema120.allOf[1].properties.messageType, + parentSchema: schema121.allOf[1].properties.messageType, data: data1, }, ]; @@ -98638,15 +99018,15 @@ function validate135( let data2 = data.command; const _errs8 = errors; if (typeof data2 !== 'string') { - validate135.errors = [ + validate136.errors = [ { instancePath: instancePath + '/command', schemaPath: '#/allOf/1/properties/command/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema120.allOf[1].properties.command.type, - parentSchema: schema120.allOf[1].properties.command, + schema: schema121.allOf[1].properties.command.type, + parentSchema: schema121.allOf[1].properties.command, data: data2, }, ]; @@ -98659,15 +99039,15 @@ function validate135( } } } else { - validate135.errors = [ + validate136.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema120.allOf[1].type, - parentSchema: schema120.allOf[1], + schema: schema121.allOf[1].type, + parentSchema: schema121.allOf[1], data, }, ]; @@ -98676,11 +99056,11 @@ function validate135( } var valid0 = _errs5 === errors; } - validate135.errors = vErrors; + validate136.errors = vErrors; return errors === 0; } -exports.validateServiceConfigRequest = validate136; -const schema121 = { +exports.validateServiceConfigRequest = validate137; +const schema122 = { title: 'Service Config', type: 'object', properties: { @@ -98695,7 +99075,7 @@ const schema121 = { 'x-location': '#/components/schemas/service_config_request', 'x-schema-type': 'request', }; -function validate136( +function validate137( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -98709,15 +99089,15 @@ function validate136( (data.serviceId === undefined && (missing0 = 'serviceId')) || (data.remoteServiceId === undefined && (missing0 = 'remoteServiceId')) ) { - validate136.errors = [ + validate137.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema121.required, - parentSchema: schema121, + schema: schema122.required, + parentSchema: schema122, data, }, ]; @@ -98730,7 +99110,7 @@ function validate136( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate136.errors = [ + validate137.errors = [ { instancePath: instancePath + '/serviceType', schemaPath: '#/properties/serviceType/format', @@ -98738,22 +99118,22 @@ function validate136( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema121.properties.serviceType, + parentSchema: schema122.properties.serviceType, data: data0, }, ]; return false; } } else { - validate136.errors = [ + validate137.errors = [ { instancePath: instancePath + '/serviceType', schemaPath: '#/properties/serviceType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema121.properties.serviceType.type, - parentSchema: schema121.properties.serviceType, + schema: schema122.properties.serviceType.type, + parentSchema: schema122.properties.serviceType, data: data0, }, ]; @@ -98770,15 +99150,15 @@ function validate136( let data1 = data.serviceId; const _errs4 = errors; if (typeof data1 !== 'string') { - validate136.errors = [ + validate137.errors = [ { instancePath: instancePath + '/serviceId', schemaPath: '#/properties/serviceId/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema121.properties.serviceId.type, - parentSchema: schema121.properties.serviceId, + schema: schema122.properties.serviceId.type, + parentSchema: schema122.properties.serviceId, data: data1, }, ]; @@ -98793,15 +99173,15 @@ function validate136( let data2 = data.remoteServiceId; const _errs6 = errors; if (typeof data2 !== 'string') { - validate136.errors = [ + validate137.errors = [ { instancePath: instancePath + '/remoteServiceId', schemaPath: '#/properties/remoteServiceId/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema121.properties.remoteServiceId.type, - parentSchema: schema121.properties.remoteServiceId, + schema: schema122.properties.remoteServiceId.type, + parentSchema: schema122.properties.remoteServiceId, data: data2, }, ]; @@ -98815,26 +99195,26 @@ function validate136( } } } else { - validate136.errors = [ + validate137.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema121.type, - parentSchema: schema121, + schema: schema122.type, + parentSchema: schema122, data, }, ]; return false; } } - validate136.errors = vErrors; + validate137.errors = vErrors; return errors === 0; } -exports.validateServiceConfigResponse = validate137; -const schema122 = { +exports.validateServiceConfigResponse = validate138; +const schema123 = { title: 'Service Config', type: 'object', properties: { @@ -98849,7 +99229,7 @@ const schema122 = { 'x-location': '#/components/schemas/service_config_response', 'x-schema-type': 'response', }; -function validate137( +function validate138( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -98863,15 +99243,15 @@ function validate137( (data.serviceId === undefined && (missing0 = 'serviceId')) || (data.remoteServiceId === undefined && (missing0 = 'remoteServiceId')) ) { - validate137.errors = [ + validate138.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema122.required, - parentSchema: schema122, + schema: schema123.required, + parentSchema: schema123, data, }, ]; @@ -98884,7 +99264,7 @@ function validate137( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate137.errors = [ + validate138.errors = [ { instancePath: instancePath + '/serviceType', schemaPath: '#/properties/serviceType/format', @@ -98892,22 +99272,22 @@ function validate137( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema122.properties.serviceType, + parentSchema: schema123.properties.serviceType, data: data0, }, ]; return false; } } else { - validate137.errors = [ + validate138.errors = [ { instancePath: instancePath + '/serviceType', schemaPath: '#/properties/serviceType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema122.properties.serviceType.type, - parentSchema: schema122.properties.serviceType, + schema: schema123.properties.serviceType.type, + parentSchema: schema123.properties.serviceType, data: data0, }, ]; @@ -98924,15 +99304,15 @@ function validate137( let data1 = data.serviceId; const _errs4 = errors; if (typeof data1 !== 'string') { - validate137.errors = [ + validate138.errors = [ { instancePath: instancePath + '/serviceId', schemaPath: '#/properties/serviceId/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema122.properties.serviceId.type, - parentSchema: schema122.properties.serviceId, + schema: schema123.properties.serviceId.type, + parentSchema: schema123.properties.serviceId, data: data1, }, ]; @@ -98947,15 +99327,15 @@ function validate137( let data2 = data.remoteServiceId; const _errs6 = errors; if (typeof data2 !== 'string') { - validate137.errors = [ + validate138.errors = [ { instancePath: instancePath + '/remoteServiceId', schemaPath: '#/properties/remoteServiceId/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema122.properties.remoteServiceId.type, - parentSchema: schema122.properties.remoteServiceId, + schema: schema123.properties.remoteServiceId.type, + parentSchema: schema123.properties.remoteServiceId, data: data2, }, ]; @@ -98969,26 +99349,26 @@ function validate137( } } } else { - validate137.errors = [ + validate138.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema122.type, - parentSchema: schema122, + schema: schema123.type, + parentSchema: schema123, data, }, ]; return false; } } - validate137.errors = vErrors; + validate138.errors = vErrors; return errors === 0; } -exports.validateCreatePeerconnectionMessageRequest = validate138; -const schema123 = { +exports.validateCreatePeerconnectionMessageRequest = validate139; +const schema124 = { title: 'Create Peerconnection Message', allOf: [ { @@ -99042,7 +99422,7 @@ const schema123 = { 'x-location': '#/components/schemas/create_peerconnection_message_request', 'x-schema-type': 'request', }; -function validate138( +function validate139( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -99054,15 +99434,15 @@ function validate138( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate138.errors = [ + validate139.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema123.allOf[0].allOf[0].required, - parentSchema: schema123.allOf[0].allOf[0], + schema: schema124.allOf[0].allOf[0].required, + parentSchema: schema124.allOf[0].allOf[0], data, }, ]; @@ -99071,15 +99451,15 @@ function validate138( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema123.allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema123.allOf[0].allOf[0].properties.messageType, + schema: schema124.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema124.allOf[0].allOf[0].properties.messageType, data: data0, }, ]; @@ -99088,15 +99468,15 @@ function validate138( } } } else { - validate138.errors = [ + validate139.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema123.allOf[0].allOf[0].type, - parentSchema: schema123.allOf[0].allOf[0], + schema: schema124.allOf[0].allOf[0].type, + parentSchema: schema124.allOf[0].allOf[0], data, }, ]; @@ -99113,15 +99493,15 @@ function validate138( (data.messageType === undefined && (missing1 = 'messageType')) || (data.command === undefined && (missing1 = 'command')) ) { - validate138.errors = [ + validate139.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema123.allOf[0].allOf[1].required, - parentSchema: schema123.allOf[0].allOf[1], + schema: schema124.allOf[0].allOf[1].required, + parentSchema: schema124.allOf[0].allOf[1], data, }, ]; @@ -99131,7 +99511,7 @@ function validate138( let data1 = data.messageType; const _errs8 = errors; if ('command' !== data1) { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', @@ -99139,7 +99519,7 @@ function validate138( params: { allowedValue: 'command' }, message: 'must be equal to constant', schema: 'command', - parentSchema: schema123.allOf[0].allOf[1].properties.messageType, + parentSchema: schema124.allOf[0].allOf[1].properties.messageType, data: data1, }, ]; @@ -99154,15 +99534,15 @@ function validate138( let data2 = data.command; const _errs9 = errors; if (typeof data2 !== 'string') { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/command', schemaPath: '#/allOf/0/allOf/1/properties/command/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema123.allOf[0].allOf[1].properties.command.type, - parentSchema: schema123.allOf[0].allOf[1].properties.command, + schema: schema124.allOf[0].allOf[1].properties.command.type, + parentSchema: schema124.allOf[0].allOf[1].properties.command, data: data2, }, ]; @@ -99175,15 +99555,15 @@ function validate138( } } } else { - validate138.errors = [ + validate139.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema123.allOf[0].allOf[1].type, - parentSchema: schema123.allOf[0].allOf[1], + schema: schema124.allOf[0].allOf[1].type, + parentSchema: schema124.allOf[0].allOf[1], data, }, ]; @@ -99205,15 +99585,15 @@ function validate138( (data.services === undefined && (missing2 = 'services')) || (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) ) { - validate138.errors = [ + validate139.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema123.allOf[1].required, - parentSchema: schema123.allOf[1], + schema: schema124.allOf[1].required, + parentSchema: schema124.allOf[1], data, }, ]; @@ -99223,7 +99603,7 @@ function validate138( let data3 = data.command; const _errs13 = errors; if ('createPeerconnection' !== data3) { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/command', schemaPath: '#/allOf/1/properties/command/const', @@ -99231,7 +99611,7 @@ function validate138( params: { allowedValue: 'createPeerconnection' }, message: 'must be equal to constant', schema: 'createPeerconnection', - parentSchema: schema123.allOf[1].properties.command, + parentSchema: schema124.allOf[1].properties.command, data: data3, }, ]; @@ -99246,32 +99626,32 @@ function validate138( let data4 = data.connectionType; const _errs14 = errors; if (typeof data4 !== 'string') { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/connectionType', schemaPath: '#/allOf/1/properties/connectionType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema123.allOf[1].properties.connectionType.type, - parentSchema: schema123.allOf[1].properties.connectionType, + schema: schema124.allOf[1].properties.connectionType.type, + parentSchema: schema124.allOf[1].properties.connectionType, data: data4, }, ]; return false; } if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/connectionType', schemaPath: '#/allOf/1/properties/connectionType/enum', keyword: 'enum', params: { - allowedValues: schema123.allOf[1].properties.connectionType.enum, + allowedValues: schema124.allOf[1].properties.connectionType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema123.allOf[1].properties.connectionType.enum, - parentSchema: schema123.allOf[1].properties.connectionType, + schema: schema124.allOf[1].properties.connectionType.enum, + parentSchema: schema124.allOf[1].properties.connectionType, data: data4, }, ]; @@ -99289,7 +99669,7 @@ function validate138( if (errors === _errs16) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/format', @@ -99297,22 +99677,22 @@ function validate138( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema123.allOf[1].properties.connectionUrl, + parentSchema: schema124.allOf[1].properties.connectionUrl, data: data5, }, ]; return false; } } else { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema123.allOf[1].properties.connectionUrl.type, - parentSchema: schema123.allOf[1].properties.connectionUrl, + schema: schema124.allOf[1].properties.connectionUrl.type, + parentSchema: schema124.allOf[1].properties.connectionUrl, data: data5, }, ]; @@ -99350,7 +99730,7 @@ function validate138( (data7.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/services/' + i0, schemaPath: @@ -99360,9 +99740,9 @@ function validate138( message: "must have required property '" + missing3 + "'", schema: - schema123.allOf[1].properties.services.items.required, + schema124.allOf[1].properties.services.items.required, parentSchema: - schema123.allOf[1].properties.services.items, + schema124.allOf[1].properties.services.items, data: data7, }, ]; @@ -99375,7 +99755,7 @@ function validate138( if (errors === _errs23) { if (typeof data8 === 'string') { if (!formats0(data8)) { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + @@ -99389,7 +99769,7 @@ function validate138( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema123.allOf[1].properties.services.items + schema124.allOf[1].properties.services.items .properties.serviceType, data: data8, }, @@ -99397,7 +99777,7 @@ function validate138( return false; } } else { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + @@ -99410,10 +99790,10 @@ function validate138( params: { type: 'string' }, message: 'must be string', schema: - schema123.allOf[1].properties.services.items + schema124.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema123.allOf[1].properties.services.items + schema124.allOf[1].properties.services.items .properties.serviceType, data: data8, }, @@ -99431,7 +99811,7 @@ function validate138( let data9 = data7.serviceId; const _errs25 = errors; if (typeof data9 !== 'string') { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/services/' + i0 + '/serviceId', @@ -99441,10 +99821,10 @@ function validate138( params: { type: 'string' }, message: 'must be string', schema: - schema123.allOf[1].properties.services.items + schema124.allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema123.allOf[1].properties.services.items + schema124.allOf[1].properties.services.items .properties.serviceId, data: data9, }, @@ -99460,7 +99840,7 @@ function validate138( let data10 = data7.remoteServiceId; const _errs27 = errors; if (typeof data10 !== 'string') { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + @@ -99473,10 +99853,10 @@ function validate138( params: { type: 'string' }, message: 'must be string', schema: - schema123.allOf[1].properties.services.items + schema124.allOf[1].properties.services.items .properties.remoteServiceId.type, parentSchema: - schema123.allOf[1].properties.services.items + schema124.allOf[1].properties.services.items .properties.remoteServiceId, data: data10, }, @@ -99491,16 +99871,16 @@ function validate138( } } } else { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/services/' + i0, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema123.allOf[1].properties.services.items.type, + schema: schema124.allOf[1].properties.services.items.type, parentSchema: - schema123.allOf[1].properties.services.items, + schema124.allOf[1].properties.services.items, data: data7, }, ]; @@ -99513,15 +99893,15 @@ function validate138( } } } else { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema123.allOf[1].properties.services.type, - parentSchema: schema123.allOf[1].properties.services, + schema: schema124.allOf[1].properties.services.type, + parentSchema: schema124.allOf[1].properties.services, data: data6, }, ]; @@ -99537,15 +99917,15 @@ function validate138( let data11 = data.tiebreaker; const _errs29 = errors; if (typeof data11 !== 'boolean') { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/tiebreaker', schemaPath: '#/allOf/1/properties/tiebreaker/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema123.allOf[1].properties.tiebreaker.type, - parentSchema: schema123.allOf[1].properties.tiebreaker, + schema: schema124.allOf[1].properties.tiebreaker.type, + parentSchema: schema124.allOf[1].properties.tiebreaker, data: data11, }, ]; @@ -99566,15 +99946,15 @@ function validate138( !Array.isArray(data12) ) { } else { - validate138.errors = [ + validate139.errors = [ { instancePath: instancePath + '/config', schemaPath: '#/allOf/1/properties/config/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema123.allOf[1].properties.config.type, - parentSchema: schema123.allOf[1].properties.config, + schema: schema124.allOf[1].properties.config.type, + parentSchema: schema124.allOf[1].properties.config, data: data12, }, ]; @@ -99592,15 +99972,15 @@ function validate138( } } } else { - validate138.errors = [ + validate139.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema123.allOf[1].type, - parentSchema: schema123.allOf[1], + schema: schema124.allOf[1].type, + parentSchema: schema124.allOf[1], data, }, ]; @@ -99609,11 +99989,11 @@ function validate138( } var valid0 = _errs11 === errors; } - validate138.errors = vErrors; + validate139.errors = vErrors; return errors === 0; } -exports.validateCreatePeerconnectionMessageResponse = validate139; -const schema124 = { +exports.validateCreatePeerconnectionMessageResponse = validate140; +const schema125 = { title: 'Create Peerconnection Message', allOf: [ { @@ -99667,7 +100047,7 @@ const schema124 = { 'x-location': '#/components/schemas/create_peerconnection_message_response', 'x-schema-type': 'response', }; -function validate139( +function validate140( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -99679,15 +100059,15 @@ function validate139( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate139.errors = [ + validate140.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema124.allOf[0].allOf[0].required, - parentSchema: schema124.allOf[0].allOf[0], + schema: schema125.allOf[0].allOf[0].required, + parentSchema: schema125.allOf[0].allOf[0], data, }, ]; @@ -99696,15 +100076,15 @@ function validate139( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema124.allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema124.allOf[0].allOf[0].properties.messageType, + schema: schema125.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema125.allOf[0].allOf[0].properties.messageType, data: data0, }, ]; @@ -99713,15 +100093,15 @@ function validate139( } } } else { - validate139.errors = [ + validate140.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema124.allOf[0].allOf[0].type, - parentSchema: schema124.allOf[0].allOf[0], + schema: schema125.allOf[0].allOf[0].type, + parentSchema: schema125.allOf[0].allOf[0], data, }, ]; @@ -99738,15 +100118,15 @@ function validate139( (data.messageType === undefined && (missing1 = 'messageType')) || (data.command === undefined && (missing1 = 'command')) ) { - validate139.errors = [ + validate140.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema124.allOf[0].allOf[1].required, - parentSchema: schema124.allOf[0].allOf[1], + schema: schema125.allOf[0].allOf[1].required, + parentSchema: schema125.allOf[0].allOf[1], data, }, ]; @@ -99756,7 +100136,7 @@ function validate139( let data1 = data.messageType; const _errs8 = errors; if ('command' !== data1) { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', @@ -99764,7 +100144,7 @@ function validate139( params: { allowedValue: 'command' }, message: 'must be equal to constant', schema: 'command', - parentSchema: schema124.allOf[0].allOf[1].properties.messageType, + parentSchema: schema125.allOf[0].allOf[1].properties.messageType, data: data1, }, ]; @@ -99779,15 +100159,15 @@ function validate139( let data2 = data.command; const _errs9 = errors; if (typeof data2 !== 'string') { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/command', schemaPath: '#/allOf/0/allOf/1/properties/command/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema124.allOf[0].allOf[1].properties.command.type, - parentSchema: schema124.allOf[0].allOf[1].properties.command, + schema: schema125.allOf[0].allOf[1].properties.command.type, + parentSchema: schema125.allOf[0].allOf[1].properties.command, data: data2, }, ]; @@ -99800,15 +100180,15 @@ function validate139( } } } else { - validate139.errors = [ + validate140.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema124.allOf[0].allOf[1].type, - parentSchema: schema124.allOf[0].allOf[1], + schema: schema125.allOf[0].allOf[1].type, + parentSchema: schema125.allOf[0].allOf[1], data, }, ]; @@ -99830,15 +100210,15 @@ function validate139( (data.services === undefined && (missing2 = 'services')) || (data.tiebreaker === undefined && (missing2 = 'tiebreaker')) ) { - validate139.errors = [ + validate140.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema124.allOf[1].required, - parentSchema: schema124.allOf[1], + schema: schema125.allOf[1].required, + parentSchema: schema125.allOf[1], data, }, ]; @@ -99848,7 +100228,7 @@ function validate139( let data3 = data.command; const _errs13 = errors; if ('createPeerconnection' !== data3) { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/command', schemaPath: '#/allOf/1/properties/command/const', @@ -99856,7 +100236,7 @@ function validate139( params: { allowedValue: 'createPeerconnection' }, message: 'must be equal to constant', schema: 'createPeerconnection', - parentSchema: schema124.allOf[1].properties.command, + parentSchema: schema125.allOf[1].properties.command, data: data3, }, ]; @@ -99871,32 +100251,32 @@ function validate139( let data4 = data.connectionType; const _errs14 = errors; if (typeof data4 !== 'string') { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/connectionType', schemaPath: '#/allOf/1/properties/connectionType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema124.allOf[1].properties.connectionType.type, - parentSchema: schema124.allOf[1].properties.connectionType, + schema: schema125.allOf[1].properties.connectionType.type, + parentSchema: schema125.allOf[1].properties.connectionType, data: data4, }, ]; return false; } if (!(data4 === 'webrtc' || data4 === 'websocket' || data4 === 'local')) { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/connectionType', schemaPath: '#/allOf/1/properties/connectionType/enum', keyword: 'enum', params: { - allowedValues: schema124.allOf[1].properties.connectionType.enum, + allowedValues: schema125.allOf[1].properties.connectionType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema124.allOf[1].properties.connectionType.enum, - parentSchema: schema124.allOf[1].properties.connectionType, + schema: schema125.allOf[1].properties.connectionType.enum, + parentSchema: schema125.allOf[1].properties.connectionType, data: data4, }, ]; @@ -99914,7 +100294,7 @@ function validate139( if (errors === _errs16) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/format', @@ -99922,22 +100302,22 @@ function validate139( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema124.allOf[1].properties.connectionUrl, + parentSchema: schema125.allOf[1].properties.connectionUrl, data: data5, }, ]; return false; } } else { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema124.allOf[1].properties.connectionUrl.type, - parentSchema: schema124.allOf[1].properties.connectionUrl, + schema: schema125.allOf[1].properties.connectionUrl.type, + parentSchema: schema125.allOf[1].properties.connectionUrl, data: data5, }, ]; @@ -99975,7 +100355,7 @@ function validate139( (data7.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/services/' + i0, schemaPath: @@ -99985,9 +100365,9 @@ function validate139( message: "must have required property '" + missing3 + "'", schema: - schema124.allOf[1].properties.services.items.required, + schema125.allOf[1].properties.services.items.required, parentSchema: - schema124.allOf[1].properties.services.items, + schema125.allOf[1].properties.services.items, data: data7, }, ]; @@ -100000,7 +100380,7 @@ function validate139( if (errors === _errs23) { if (typeof data8 === 'string') { if (!formats0(data8)) { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + @@ -100014,7 +100394,7 @@ function validate139( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema124.allOf[1].properties.services.items + schema125.allOf[1].properties.services.items .properties.serviceType, data: data8, }, @@ -100022,7 +100402,7 @@ function validate139( return false; } } else { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + @@ -100035,10 +100415,10 @@ function validate139( params: { type: 'string' }, message: 'must be string', schema: - schema124.allOf[1].properties.services.items + schema125.allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema124.allOf[1].properties.services.items + schema125.allOf[1].properties.services.items .properties.serviceType, data: data8, }, @@ -100056,7 +100436,7 @@ function validate139( let data9 = data7.serviceId; const _errs25 = errors; if (typeof data9 !== 'string') { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/services/' + i0 + '/serviceId', @@ -100066,10 +100446,10 @@ function validate139( params: { type: 'string' }, message: 'must be string', schema: - schema124.allOf[1].properties.services.items + schema125.allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema124.allOf[1].properties.services.items + schema125.allOf[1].properties.services.items .properties.serviceId, data: data9, }, @@ -100085,7 +100465,7 @@ function validate139( let data10 = data7.remoteServiceId; const _errs27 = errors; if (typeof data10 !== 'string') { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + @@ -100098,10 +100478,10 @@ function validate139( params: { type: 'string' }, message: 'must be string', schema: - schema124.allOf[1].properties.services.items + schema125.allOf[1].properties.services.items .properties.remoteServiceId.type, parentSchema: - schema124.allOf[1].properties.services.items + schema125.allOf[1].properties.services.items .properties.remoteServiceId, data: data10, }, @@ -100116,16 +100496,16 @@ function validate139( } } } else { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/services/' + i0, schemaPath: '#/allOf/1/properties/services/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema124.allOf[1].properties.services.items.type, + schema: schema125.allOf[1].properties.services.items.type, parentSchema: - schema124.allOf[1].properties.services.items, + schema125.allOf[1].properties.services.items, data: data7, }, ]; @@ -100138,15 +100518,15 @@ function validate139( } } } else { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/services', schemaPath: '#/allOf/1/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema124.allOf[1].properties.services.type, - parentSchema: schema124.allOf[1].properties.services, + schema: schema125.allOf[1].properties.services.type, + parentSchema: schema125.allOf[1].properties.services, data: data6, }, ]; @@ -100162,15 +100542,15 @@ function validate139( let data11 = data.tiebreaker; const _errs29 = errors; if (typeof data11 !== 'boolean') { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/tiebreaker', schemaPath: '#/allOf/1/properties/tiebreaker/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema124.allOf[1].properties.tiebreaker.type, - parentSchema: schema124.allOf[1].properties.tiebreaker, + schema: schema125.allOf[1].properties.tiebreaker.type, + parentSchema: schema125.allOf[1].properties.tiebreaker, data: data11, }, ]; @@ -100191,15 +100571,15 @@ function validate139( !Array.isArray(data12) ) { } else { - validate139.errors = [ + validate140.errors = [ { instancePath: instancePath + '/config', schemaPath: '#/allOf/1/properties/config/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema124.allOf[1].properties.config.type, - parentSchema: schema124.allOf[1].properties.config, + schema: schema125.allOf[1].properties.config.type, + parentSchema: schema125.allOf[1].properties.config, data: data12, }, ]; @@ -100217,15 +100597,15 @@ function validate139( } } } else { - validate139.errors = [ + validate140.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema124.allOf[1].type, - parentSchema: schema124.allOf[1], + schema: schema125.allOf[1].type, + parentSchema: schema125.allOf[1], data, }, ]; @@ -100234,11 +100614,11 @@ function validate139( } var valid0 = _errs11 === errors; } - validate139.errors = vErrors; + validate140.errors = vErrors; return errors === 0; } -exports.validateClosePeerconnectionMessageRequest = validate140; -const schema125 = { +exports.validateClosePeerconnectionMessageRequest = validate141; +const schema126 = { title: 'Close Peerconnection Message', allOf: [ { @@ -100275,7 +100655,7 @@ const schema125 = { 'x-location': '#/components/schemas/close_peerconnection_message_request', 'x-schema-type': 'request', }; -function validate140( +function validate141( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -100287,15 +100667,15 @@ function validate140( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate140.errors = [ + validate141.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema125.allOf[0].allOf[0].required, - parentSchema: schema125.allOf[0].allOf[0], + schema: schema126.allOf[0].allOf[0].required, + parentSchema: schema126.allOf[0].allOf[0], data, }, ]; @@ -100304,15 +100684,15 @@ function validate140( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate140.errors = [ + validate141.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema125.allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema125.allOf[0].allOf[0].properties.messageType, + schema: schema126.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema126.allOf[0].allOf[0].properties.messageType, data: data0, }, ]; @@ -100321,15 +100701,15 @@ function validate140( } } } else { - validate140.errors = [ + validate141.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema125.allOf[0].allOf[0].type, - parentSchema: schema125.allOf[0].allOf[0], + schema: schema126.allOf[0].allOf[0].type, + parentSchema: schema126.allOf[0].allOf[0], data, }, ]; @@ -100346,15 +100726,15 @@ function validate140( (data.messageType === undefined && (missing1 = 'messageType')) || (data.command === undefined && (missing1 = 'command')) ) { - validate140.errors = [ + validate141.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema125.allOf[0].allOf[1].required, - parentSchema: schema125.allOf[0].allOf[1], + schema: schema126.allOf[0].allOf[1].required, + parentSchema: schema126.allOf[0].allOf[1], data, }, ]; @@ -100364,7 +100744,7 @@ function validate140( let data1 = data.messageType; const _errs8 = errors; if ('command' !== data1) { - validate140.errors = [ + validate141.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', @@ -100372,7 +100752,7 @@ function validate140( params: { allowedValue: 'command' }, message: 'must be equal to constant', schema: 'command', - parentSchema: schema125.allOf[0].allOf[1].properties.messageType, + parentSchema: schema126.allOf[0].allOf[1].properties.messageType, data: data1, }, ]; @@ -100387,15 +100767,15 @@ function validate140( let data2 = data.command; const _errs9 = errors; if (typeof data2 !== 'string') { - validate140.errors = [ + validate141.errors = [ { instancePath: instancePath + '/command', schemaPath: '#/allOf/0/allOf/1/properties/command/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema125.allOf[0].allOf[1].properties.command.type, - parentSchema: schema125.allOf[0].allOf[1].properties.command, + schema: schema126.allOf[0].allOf[1].properties.command.type, + parentSchema: schema126.allOf[0].allOf[1].properties.command, data: data2, }, ]; @@ -100408,15 +100788,15 @@ function validate140( } } } else { - validate140.errors = [ + validate141.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema125.allOf[0].allOf[1].type, - parentSchema: schema125.allOf[0].allOf[1], + schema: schema126.allOf[0].allOf[1].type, + parentSchema: schema126.allOf[0].allOf[1], data, }, ]; @@ -100435,15 +100815,15 @@ function validate140( (data.command === undefined && (missing2 = 'command')) || (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) ) { - validate140.errors = [ + validate141.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema125.allOf[1].required, - parentSchema: schema125.allOf[1], + schema: schema126.allOf[1].required, + parentSchema: schema126.allOf[1], data, }, ]; @@ -100453,7 +100833,7 @@ function validate140( let data3 = data.command; const _errs13 = errors; if ('closePeerconnection' !== data3) { - validate140.errors = [ + validate141.errors = [ { instancePath: instancePath + '/command', schemaPath: '#/allOf/1/properties/command/const', @@ -100461,7 +100841,7 @@ function validate140( params: { allowedValue: 'closePeerconnection' }, message: 'must be equal to constant', schema: 'closePeerconnection', - parentSchema: schema125.allOf[1].properties.command, + parentSchema: schema126.allOf[1].properties.command, data: data3, }, ]; @@ -100479,7 +100859,7 @@ function validate140( if (errors === _errs14) { if (typeof data4 === 'string') { if (!formats0(data4)) { - validate140.errors = [ + validate141.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/format', @@ -100487,22 +100867,22 @@ function validate140( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema125.allOf[1].properties.connectionUrl, + parentSchema: schema126.allOf[1].properties.connectionUrl, data: data4, }, ]; return false; } } else { - validate140.errors = [ + validate141.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema125.allOf[1].properties.connectionUrl.type, - parentSchema: schema125.allOf[1].properties.connectionUrl, + schema: schema126.allOf[1].properties.connectionUrl.type, + parentSchema: schema126.allOf[1].properties.connectionUrl, data: data4, }, ]; @@ -100517,15 +100897,15 @@ function validate140( } } } else { - validate140.errors = [ + validate141.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema125.allOf[1].type, - parentSchema: schema125.allOf[1], + schema: schema126.allOf[1].type, + parentSchema: schema126.allOf[1], data, }, ]; @@ -100534,11 +100914,11 @@ function validate140( } var valid0 = _errs11 === errors; } - validate140.errors = vErrors; + validate141.errors = vErrors; return errors === 0; } -exports.validateClosePeerconnectionMessageResponse = validate141; -const schema126 = { +exports.validateClosePeerconnectionMessageResponse = validate142; +const schema127 = { title: 'Close Peerconnection Message', allOf: [ { @@ -100575,7 +100955,7 @@ const schema126 = { 'x-location': '#/components/schemas/close_peerconnection_message_response', 'x-schema-type': 'response', }; -function validate141( +function validate142( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -100587,15 +100967,15 @@ function validate141( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate141.errors = [ + validate142.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema126.allOf[0].allOf[0].required, - parentSchema: schema126.allOf[0].allOf[0], + schema: schema127.allOf[0].allOf[0].required, + parentSchema: schema127.allOf[0].allOf[0], data, }, ]; @@ -100604,15 +100984,15 @@ function validate141( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate141.errors = [ + validate142.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema126.allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema126.allOf[0].allOf[0].properties.messageType, + schema: schema127.allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema127.allOf[0].allOf[0].properties.messageType, data: data0, }, ]; @@ -100621,15 +101001,15 @@ function validate141( } } } else { - validate141.errors = [ + validate142.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema126.allOf[0].allOf[0].type, - parentSchema: schema126.allOf[0].allOf[0], + schema: schema127.allOf[0].allOf[0].type, + parentSchema: schema127.allOf[0].allOf[0], data, }, ]; @@ -100646,15 +101026,15 @@ function validate141( (data.messageType === undefined && (missing1 = 'messageType')) || (data.command === undefined && (missing1 = 'command')) ) { - validate141.errors = [ + validate142.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema126.allOf[0].allOf[1].required, - parentSchema: schema126.allOf[0].allOf[1], + schema: schema127.allOf[0].allOf[1].required, + parentSchema: schema127.allOf[0].allOf[1], data, }, ]; @@ -100664,7 +101044,7 @@ function validate141( let data1 = data.messageType; const _errs8 = errors; if ('command' !== data1) { - validate141.errors = [ + validate142.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/allOf/1/properties/messageType/const', @@ -100672,7 +101052,7 @@ function validate141( params: { allowedValue: 'command' }, message: 'must be equal to constant', schema: 'command', - parentSchema: schema126.allOf[0].allOf[1].properties.messageType, + parentSchema: schema127.allOf[0].allOf[1].properties.messageType, data: data1, }, ]; @@ -100687,15 +101067,15 @@ function validate141( let data2 = data.command; const _errs9 = errors; if (typeof data2 !== 'string') { - validate141.errors = [ + validate142.errors = [ { instancePath: instancePath + '/command', schemaPath: '#/allOf/0/allOf/1/properties/command/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema126.allOf[0].allOf[1].properties.command.type, - parentSchema: schema126.allOf[0].allOf[1].properties.command, + schema: schema127.allOf[0].allOf[1].properties.command.type, + parentSchema: schema127.allOf[0].allOf[1].properties.command, data: data2, }, ]; @@ -100708,15 +101088,15 @@ function validate141( } } } else { - validate141.errors = [ + validate142.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema126.allOf[0].allOf[1].type, - parentSchema: schema126.allOf[0].allOf[1], + schema: schema127.allOf[0].allOf[1].type, + parentSchema: schema127.allOf[0].allOf[1], data, }, ]; @@ -100735,15 +101115,15 @@ function validate141( (data.command === undefined && (missing2 = 'command')) || (data.connectionUrl === undefined && (missing2 = 'connectionUrl')) ) { - validate141.errors = [ + validate142.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema126.allOf[1].required, - parentSchema: schema126.allOf[1], + schema: schema127.allOf[1].required, + parentSchema: schema127.allOf[1], data, }, ]; @@ -100753,7 +101133,7 @@ function validate141( let data3 = data.command; const _errs13 = errors; if ('closePeerconnection' !== data3) { - validate141.errors = [ + validate142.errors = [ { instancePath: instancePath + '/command', schemaPath: '#/allOf/1/properties/command/const', @@ -100761,7 +101141,7 @@ function validate141( params: { allowedValue: 'closePeerconnection' }, message: 'must be equal to constant', schema: 'closePeerconnection', - parentSchema: schema126.allOf[1].properties.command, + parentSchema: schema127.allOf[1].properties.command, data: data3, }, ]; @@ -100779,7 +101159,7 @@ function validate141( if (errors === _errs14) { if (typeof data4 === 'string') { if (!formats0(data4)) { - validate141.errors = [ + validate142.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/format', @@ -100787,22 +101167,22 @@ function validate141( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema126.allOf[1].properties.connectionUrl, + parentSchema: schema127.allOf[1].properties.connectionUrl, data: data4, }, ]; return false; } } else { - validate141.errors = [ + validate142.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema126.allOf[1].properties.connectionUrl.type, - parentSchema: schema126.allOf[1].properties.connectionUrl, + schema: schema127.allOf[1].properties.connectionUrl.type, + parentSchema: schema127.allOf[1].properties.connectionUrl, data: data4, }, ]; @@ -100817,15 +101197,15 @@ function validate141( } } } else { - validate141.errors = [ + validate142.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema126.allOf[1].type, - parentSchema: schema126.allOf[1], + schema: schema127.allOf[1].type, + parentSchema: schema127.allOf[1], data, }, ]; @@ -100834,11 +101214,11 @@ function validate141( } var valid0 = _errs11 === errors; } - validate141.errors = vErrors; + validate142.errors = vErrors; return errors === 0; } -exports.validateSignalingMessageRequest = validate142; -const schema127 = { +exports.validateSignalingMessageRequest = validate143; +const schema128 = { title: 'Signaling Message', allOf: [ { @@ -100866,7 +101246,7 @@ const schema127 = { 'x-location': '#/components/schemas/signaling_message_request', 'x-schema-type': 'request', }; -function validate142( +function validate143( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -100877,15 +101257,15 @@ function validate142( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate142.errors = [ + validate143.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema127.allOf[0].required, - parentSchema: schema127.allOf[0], + schema: schema128.allOf[0].required, + parentSchema: schema128.allOf[0], data, }, ]; @@ -100894,15 +101274,15 @@ function validate142( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate142.errors = [ + validate143.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema127.allOf[0].properties.messageType.type, - parentSchema: schema127.allOf[0].properties.messageType, + schema: schema128.allOf[0].properties.messageType.type, + parentSchema: schema128.allOf[0].properties.messageType, data: data0, }, ]; @@ -100911,15 +101291,15 @@ function validate142( } } } else { - validate142.errors = [ + validate143.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema127.allOf[0].type, - parentSchema: schema127.allOf[0], + schema: schema128.allOf[0].type, + parentSchema: schema128.allOf[0], data, }, ]; @@ -100938,15 +101318,15 @@ function validate142( (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || (data.content === undefined && (missing1 = 'content')) ) { - validate142.errors = [ + validate143.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema127.allOf[1].required, - parentSchema: schema127.allOf[1], + schema: schema128.allOf[1].required, + parentSchema: schema128.allOf[1], data, }, ]; @@ -100956,7 +101336,7 @@ function validate142( let data1 = data.messageType; const _errs7 = errors; if ('signaling' !== data1) { - validate142.errors = [ + validate143.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/1/properties/messageType/const', @@ -100964,7 +101344,7 @@ function validate142( params: { allowedValue: 'signaling' }, message: 'must be equal to constant', schema: 'signaling', - parentSchema: schema127.allOf[1].properties.messageType, + parentSchema: schema128.allOf[1].properties.messageType, data: data1, }, ]; @@ -100979,15 +101359,15 @@ function validate142( let data2 = data.signalingType; const _errs8 = errors; if (typeof data2 !== 'string') { - validate142.errors = [ + validate143.errors = [ { instancePath: instancePath + '/signalingType', schemaPath: '#/allOf/1/properties/signalingType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema127.allOf[1].properties.signalingType.type, - parentSchema: schema127.allOf[1].properties.signalingType, + schema: schema128.allOf[1].properties.signalingType.type, + parentSchema: schema128.allOf[1].properties.signalingType, data: data2, }, ]; @@ -101005,7 +101385,7 @@ function validate142( if (errors === _errs10) { if (typeof data3 === 'string') { if (!formats0(data3)) { - validate142.errors = [ + validate143.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/format', @@ -101013,22 +101393,22 @@ function validate142( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema127.allOf[1].properties.connectionUrl, + parentSchema: schema128.allOf[1].properties.connectionUrl, data: data3, }, ]; return false; } } else { - validate142.errors = [ + validate143.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema127.allOf[1].properties.connectionUrl.type, - parentSchema: schema127.allOf[1].properties.connectionUrl, + schema: schema128.allOf[1].properties.connectionUrl.type, + parentSchema: schema128.allOf[1].properties.connectionUrl, data: data3, }, ]; @@ -101047,15 +101427,15 @@ function validate142( if (errors === _errs12) { if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { } else { - validate142.errors = [ + validate143.errors = [ { instancePath: instancePath + '/content', schemaPath: '#/allOf/1/properties/content/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema127.allOf[1].properties.content.type, - parentSchema: schema127.allOf[1].properties.content, + schema: schema128.allOf[1].properties.content.type, + parentSchema: schema128.allOf[1].properties.content, data: data4, }, ]; @@ -101071,15 +101451,15 @@ function validate142( } } } else { - validate142.errors = [ + validate143.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema127.allOf[1].type, - parentSchema: schema127.allOf[1], + schema: schema128.allOf[1].type, + parentSchema: schema128.allOf[1], data, }, ]; @@ -101088,11 +101468,11 @@ function validate142( } var valid0 = _errs5 === errors; } - validate142.errors = vErrors; + validate143.errors = vErrors; return errors === 0; } -exports.validateSignalingMessageResponse = validate143; -const schema128 = { +exports.validateSignalingMessageResponse = validate144; +const schema129 = { title: 'Signaling Message', allOf: [ { @@ -101120,7 +101500,7 @@ const schema128 = { 'x-location': '#/components/schemas/signaling_message_response', 'x-schema-type': 'response', }; -function validate143( +function validate144( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -101131,15 +101511,15 @@ function validate143( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate143.errors = [ + validate144.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema128.allOf[0].required, - parentSchema: schema128.allOf[0], + schema: schema129.allOf[0].required, + parentSchema: schema129.allOf[0], data, }, ]; @@ -101148,15 +101528,15 @@ function validate143( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate143.errors = [ + validate144.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema128.allOf[0].properties.messageType.type, - parentSchema: schema128.allOf[0].properties.messageType, + schema: schema129.allOf[0].properties.messageType.type, + parentSchema: schema129.allOf[0].properties.messageType, data: data0, }, ]; @@ -101165,15 +101545,15 @@ function validate143( } } } else { - validate143.errors = [ + validate144.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema128.allOf[0].type, - parentSchema: schema128.allOf[0], + schema: schema129.allOf[0].type, + parentSchema: schema129.allOf[0], data, }, ]; @@ -101192,15 +101572,15 @@ function validate143( (data.connectionUrl === undefined && (missing1 = 'connectionUrl')) || (data.content === undefined && (missing1 = 'content')) ) { - validate143.errors = [ + validate144.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema128.allOf[1].required, - parentSchema: schema128.allOf[1], + schema: schema129.allOf[1].required, + parentSchema: schema129.allOf[1], data, }, ]; @@ -101210,7 +101590,7 @@ function validate143( let data1 = data.messageType; const _errs7 = errors; if ('signaling' !== data1) { - validate143.errors = [ + validate144.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/1/properties/messageType/const', @@ -101218,7 +101598,7 @@ function validate143( params: { allowedValue: 'signaling' }, message: 'must be equal to constant', schema: 'signaling', - parentSchema: schema128.allOf[1].properties.messageType, + parentSchema: schema129.allOf[1].properties.messageType, data: data1, }, ]; @@ -101233,15 +101613,15 @@ function validate143( let data2 = data.signalingType; const _errs8 = errors; if (typeof data2 !== 'string') { - validate143.errors = [ + validate144.errors = [ { instancePath: instancePath + '/signalingType', schemaPath: '#/allOf/1/properties/signalingType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema128.allOf[1].properties.signalingType.type, - parentSchema: schema128.allOf[1].properties.signalingType, + schema: schema129.allOf[1].properties.signalingType.type, + parentSchema: schema129.allOf[1].properties.signalingType, data: data2, }, ]; @@ -101259,7 +101639,7 @@ function validate143( if (errors === _errs10) { if (typeof data3 === 'string') { if (!formats0(data3)) { - validate143.errors = [ + validate144.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/format', @@ -101267,22 +101647,22 @@ function validate143( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema128.allOf[1].properties.connectionUrl, + parentSchema: schema129.allOf[1].properties.connectionUrl, data: data3, }, ]; return false; } } else { - validate143.errors = [ + validate144.errors = [ { instancePath: instancePath + '/connectionUrl', schemaPath: '#/allOf/1/properties/connectionUrl/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema128.allOf[1].properties.connectionUrl.type, - parentSchema: schema128.allOf[1].properties.connectionUrl, + schema: schema129.allOf[1].properties.connectionUrl.type, + parentSchema: schema129.allOf[1].properties.connectionUrl, data: data3, }, ]; @@ -101301,15 +101681,15 @@ function validate143( if (errors === _errs12) { if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { } else { - validate143.errors = [ + validate144.errors = [ { instancePath: instancePath + '/content', schemaPath: '#/allOf/1/properties/content/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema128.allOf[1].properties.content.type, - parentSchema: schema128.allOf[1].properties.content, + schema: schema129.allOf[1].properties.content.type, + parentSchema: schema129.allOf[1].properties.content, data: data4, }, ]; @@ -101325,15 +101705,15 @@ function validate143( } } } else { - validate143.errors = [ + validate144.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema128.allOf[1].type, - parentSchema: schema128.allOf[1], + schema: schema129.allOf[1].type, + parentSchema: schema129.allOf[1], data, }, ]; @@ -101342,11 +101722,11 @@ function validate143( } var valid0 = _errs5 === errors; } - validate143.errors = vErrors; + validate144.errors = vErrors; return errors === 0; } -exports.validateConfigurationMessageRequest = validate144; -const schema129 = { +exports.validateConfigurationMessageRequest = validate145; +const schema130 = { title: 'Configuration Message', allOf: [ { @@ -101372,7 +101752,7 @@ const schema129 = { 'x-location': '#/components/schemas/configuration_message_request', 'x-schema-type': 'request', }; -function validate144( +function validate145( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -101383,15 +101763,15 @@ function validate144( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate144.errors = [ + validate145.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema129.allOf[0].required, - parentSchema: schema129.allOf[0], + schema: schema130.allOf[0].required, + parentSchema: schema130.allOf[0], data, }, ]; @@ -101400,15 +101780,15 @@ function validate144( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate144.errors = [ + validate145.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema129.allOf[0].properties.messageType.type, - parentSchema: schema129.allOf[0].properties.messageType, + schema: schema130.allOf[0].properties.messageType.type, + parentSchema: schema130.allOf[0].properties.messageType, data: data0, }, ]; @@ -101417,15 +101797,15 @@ function validate144( } } } else { - validate144.errors = [ + validate145.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema129.allOf[0].type, - parentSchema: schema129.allOf[0], + schema: schema130.allOf[0].type, + parentSchema: schema130.allOf[0], data, }, ]; @@ -101442,15 +101822,15 @@ function validate144( (data.messageType === undefined && (missing1 = 'messageType')) || (data.configuration === undefined && (missing1 = 'configuration')) ) { - validate144.errors = [ + validate145.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema129.allOf[1].required, - parentSchema: schema129.allOf[1], + schema: schema130.allOf[1].required, + parentSchema: schema130.allOf[1], data, }, ]; @@ -101460,7 +101840,7 @@ function validate144( let data1 = data.messageType; const _errs7 = errors; if ('configuration' !== data1) { - validate144.errors = [ + validate145.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/1/properties/messageType/const', @@ -101468,7 +101848,7 @@ function validate144( params: { allowedValue: 'configuration' }, message: 'must be equal to constant', schema: 'configuration', - parentSchema: schema129.allOf[1].properties.messageType, + parentSchema: schema130.allOf[1].properties.messageType, data: data1, }, ]; @@ -101485,15 +101865,15 @@ function validate144( if (errors === _errs8) { if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { } else { - validate144.errors = [ + validate145.errors = [ { instancePath: instancePath + '/configuration', schemaPath: '#/allOf/1/properties/configuration/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema129.allOf[1].properties.configuration.type, - parentSchema: schema129.allOf[1].properties.configuration, + schema: schema130.allOf[1].properties.configuration.type, + parentSchema: schema130.allOf[1].properties.configuration, data: data2, }, ]; @@ -101507,15 +101887,15 @@ function validate144( } } } else { - validate144.errors = [ + validate145.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema129.allOf[1].type, - parentSchema: schema129.allOf[1], + schema: schema130.allOf[1].type, + parentSchema: schema130.allOf[1], data, }, ]; @@ -101524,11 +101904,11 @@ function validate144( } var valid0 = _errs5 === errors; } - validate144.errors = vErrors; + validate145.errors = vErrors; return errors === 0; } -exports.validateConfigurationMessageResponse = validate145; -const schema130 = { +exports.validateConfigurationMessageResponse = validate146; +const schema131 = { title: 'Configuration Message', allOf: [ { @@ -101554,7 +101934,7 @@ const schema130 = { 'x-location': '#/components/schemas/configuration_message_response', 'x-schema-type': 'response', }; -function validate145( +function validate146( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -101565,15 +101945,15 @@ function validate145( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate145.errors = [ + validate146.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema130.allOf[0].required, - parentSchema: schema130.allOf[0], + schema: schema131.allOf[0].required, + parentSchema: schema131.allOf[0], data, }, ]; @@ -101582,15 +101962,15 @@ function validate145( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate145.errors = [ + validate146.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema130.allOf[0].properties.messageType.type, - parentSchema: schema130.allOf[0].properties.messageType, + schema: schema131.allOf[0].properties.messageType.type, + parentSchema: schema131.allOf[0].properties.messageType, data: data0, }, ]; @@ -101599,15 +101979,15 @@ function validate145( } } } else { - validate145.errors = [ + validate146.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema130.allOf[0].type, - parentSchema: schema130.allOf[0], + schema: schema131.allOf[0].type, + parentSchema: schema131.allOf[0], data, }, ]; @@ -101624,15 +102004,15 @@ function validate145( (data.messageType === undefined && (missing1 = 'messageType')) || (data.configuration === undefined && (missing1 = 'configuration')) ) { - validate145.errors = [ + validate146.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema130.allOf[1].required, - parentSchema: schema130.allOf[1], + schema: schema131.allOf[1].required, + parentSchema: schema131.allOf[1], data, }, ]; @@ -101642,7 +102022,7 @@ function validate145( let data1 = data.messageType; const _errs7 = errors; if ('configuration' !== data1) { - validate145.errors = [ + validate146.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/1/properties/messageType/const', @@ -101650,7 +102030,7 @@ function validate145( params: { allowedValue: 'configuration' }, message: 'must be equal to constant', schema: 'configuration', - parentSchema: schema130.allOf[1].properties.messageType, + parentSchema: schema131.allOf[1].properties.messageType, data: data1, }, ]; @@ -101667,15 +102047,15 @@ function validate145( if (errors === _errs8) { if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { } else { - validate145.errors = [ + validate146.errors = [ { instancePath: instancePath + '/configuration', schemaPath: '#/allOf/1/properties/configuration/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema130.allOf[1].properties.configuration.type, - parentSchema: schema130.allOf[1].properties.configuration, + schema: schema131.allOf[1].properties.configuration.type, + parentSchema: schema131.allOf[1].properties.configuration, data: data2, }, ]; @@ -101689,15 +102069,15 @@ function validate145( } } } else { - validate145.errors = [ + validate146.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema130.allOf[1].type, - parentSchema: schema130.allOf[1], + schema: schema131.allOf[1].type, + parentSchema: schema131.allOf[1], data, }, ]; @@ -101706,11 +102086,11 @@ function validate145( } var valid0 = _errs5 === errors; } - validate145.errors = vErrors; + validate146.errors = vErrors; return errors === 0; } -exports.validateExperimentStatusChangedMessageRequest = validate146; -const schema131 = { +exports.validateExperimentStatusChangedMessageRequest = validate147; +const schema132 = { title: 'Experiment Status Changed Message', allOf: [ { @@ -101737,7 +102117,7 @@ const schema131 = { 'x-location': '#/components/schemas/experiment_status_changed_message_request', 'x-schema-type': 'request', }; -function validate146( +function validate147( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -101748,15 +102128,15 @@ function validate146( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate146.errors = [ + validate147.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema131.allOf[0].required, - parentSchema: schema131.allOf[0], + schema: schema132.allOf[0].required, + parentSchema: schema132.allOf[0], data, }, ]; @@ -101765,15 +102145,15 @@ function validate146( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate146.errors = [ + validate147.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema131.allOf[0].properties.messageType.type, - parentSchema: schema131.allOf[0].properties.messageType, + schema: schema132.allOf[0].properties.messageType.type, + parentSchema: schema132.allOf[0].properties.messageType, data: data0, }, ]; @@ -101782,15 +102162,15 @@ function validate146( } } } else { - validate146.errors = [ + validate147.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema131.allOf[0].type, - parentSchema: schema131.allOf[0], + schema: schema132.allOf[0].type, + parentSchema: schema132.allOf[0], data, }, ]; @@ -101807,15 +102187,15 @@ function validate146( (data.messageType === undefined && (missing1 = 'messageType')) || (data.status === undefined && (missing1 = 'status')) ) { - validate146.errors = [ + validate147.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema131.allOf[1].required, - parentSchema: schema131.allOf[1], + schema: schema132.allOf[1].required, + parentSchema: schema132.allOf[1], data, }, ]; @@ -101825,7 +102205,7 @@ function validate146( let data1 = data.messageType; const _errs7 = errors; if ('experiment-status-changed' !== data1) { - validate146.errors = [ + validate147.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/1/properties/messageType/const', @@ -101833,7 +102213,7 @@ function validate146( params: { allowedValue: 'experiment-status-changed' }, message: 'must be equal to constant', schema: 'experiment-status-changed', - parentSchema: schema131.allOf[1].properties.messageType, + parentSchema: schema132.allOf[1].properties.messageType, data: data1, }, ]; @@ -101848,15 +102228,15 @@ function validate146( let data2 = data.status; const _errs8 = errors; if (typeof data2 !== 'string') { - validate146.errors = [ + validate147.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/1/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema131.allOf[1].properties.status.type, - parentSchema: schema131.allOf[1].properties.status, + schema: schema132.allOf[1].properties.status.type, + parentSchema: schema132.allOf[1].properties.status, data: data2, }, ]; @@ -101871,15 +102251,15 @@ function validate146( let data3 = data.message; const _errs10 = errors; if (typeof data3 !== 'string') { - validate146.errors = [ + validate147.errors = [ { instancePath: instancePath + '/message', schemaPath: '#/allOf/1/properties/message/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema131.allOf[1].properties.message.type, - parentSchema: schema131.allOf[1].properties.message, + schema: schema132.allOf[1].properties.message.type, + parentSchema: schema132.allOf[1].properties.message, data: data3, }, ]; @@ -101893,15 +102273,15 @@ function validate146( } } } else { - validate146.errors = [ + validate147.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema131.allOf[1].type, - parentSchema: schema131.allOf[1], + schema: schema132.allOf[1].type, + parentSchema: schema132.allOf[1], data, }, ]; @@ -101910,11 +102290,11 @@ function validate146( } var valid0 = _errs5 === errors; } - validate146.errors = vErrors; + validate147.errors = vErrors; return errors === 0; } -exports.validateExperimentStatusChangedMessageResponse = validate147; -const schema132 = { +exports.validateExperimentStatusChangedMessageResponse = validate148; +const schema133 = { title: 'Experiment Status Changed Message', allOf: [ { @@ -101941,7 +102321,7 @@ const schema132 = { 'x-location': '#/components/schemas/experiment_status_changed_message_response', 'x-schema-type': 'response', }; -function validate147( +function validate148( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -101952,15 +102332,15 @@ function validate147( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.messageType === undefined && (missing0 = 'messageType')) { - validate147.errors = [ + validate148.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema132.allOf[0].required, - parentSchema: schema132.allOf[0], + schema: schema133.allOf[0].required, + parentSchema: schema133.allOf[0], data, }, ]; @@ -101969,15 +102349,15 @@ function validate147( if (data.messageType !== undefined) { let data0 = data.messageType; if (typeof data0 !== 'string') { - validate147.errors = [ + validate148.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/0/properties/messageType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema132.allOf[0].properties.messageType.type, - parentSchema: schema132.allOf[0].properties.messageType, + schema: schema133.allOf[0].properties.messageType.type, + parentSchema: schema133.allOf[0].properties.messageType, data: data0, }, ]; @@ -101986,15 +102366,15 @@ function validate147( } } } else { - validate147.errors = [ + validate148.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema132.allOf[0].type, - parentSchema: schema132.allOf[0], + schema: schema133.allOf[0].type, + parentSchema: schema133.allOf[0], data, }, ]; @@ -102011,15 +102391,15 @@ function validate147( (data.messageType === undefined && (missing1 = 'messageType')) || (data.status === undefined && (missing1 = 'status')) ) { - validate147.errors = [ + validate148.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema132.allOf[1].required, - parentSchema: schema132.allOf[1], + schema: schema133.allOf[1].required, + parentSchema: schema133.allOf[1], data, }, ]; @@ -102029,7 +102409,7 @@ function validate147( let data1 = data.messageType; const _errs7 = errors; if ('experiment-status-changed' !== data1) { - validate147.errors = [ + validate148.errors = [ { instancePath: instancePath + '/messageType', schemaPath: '#/allOf/1/properties/messageType/const', @@ -102037,7 +102417,7 @@ function validate147( params: { allowedValue: 'experiment-status-changed' }, message: 'must be equal to constant', schema: 'experiment-status-changed', - parentSchema: schema132.allOf[1].properties.messageType, + parentSchema: schema133.allOf[1].properties.messageType, data: data1, }, ]; @@ -102052,15 +102432,15 @@ function validate147( let data2 = data.status; const _errs8 = errors; if (typeof data2 !== 'string') { - validate147.errors = [ + validate148.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/1/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema132.allOf[1].properties.status.type, - parentSchema: schema132.allOf[1].properties.status, + schema: schema133.allOf[1].properties.status.type, + parentSchema: schema133.allOf[1].properties.status, data: data2, }, ]; @@ -102075,15 +102455,15 @@ function validate147( let data3 = data.message; const _errs10 = errors; if (typeof data3 !== 'string') { - validate147.errors = [ + validate148.errors = [ { instancePath: instancePath + '/message', schemaPath: '#/allOf/1/properties/message/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema132.allOf[1].properties.message.type, - parentSchema: schema132.allOf[1].properties.message, + schema: schema133.allOf[1].properties.message.type, + parentSchema: schema133.allOf[1].properties.message, data: data3, }, ]; @@ -102097,15 +102477,15 @@ function validate147( } } } else { - validate147.errors = [ + validate148.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema132.allOf[1].type, - parentSchema: schema132.allOf[1], + schema: schema133.allOf[1].type, + parentSchema: schema133.allOf[1], data, }, ]; @@ -102114,11 +102494,375 @@ function validate147( } var valid0 = _errs5 === errors; } - validate147.errors = vErrors; + validate148.errors = vErrors; return errors === 0; } -exports.validateConnectionStatusRequest = validate148; -const schema133 = { +exports.validateLoggingMessageRequest = validate149; +const schema134 = { + title: 'Logging Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'logging' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'content'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'LoggingMessageRequest', + 'x-location': '#/components/schemas/logging_message_request', + 'x-schema-type': 'request', +}; +function validate149( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate149.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema134.allOf[0].required, + parentSchema: schema134.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate149.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema134.allOf[0].properties.messageType.type, + parentSchema: schema134.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate149.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema134.allOf[0].type, + parentSchema: schema134.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.content === undefined && (missing1 = 'content')) + ) { + validate149.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema134.allOf[1].required, + parentSchema: schema134.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('logging' !== data1) { + validate149.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'logging' }, + message: 'must be equal to constant', + schema: 'logging', + parentSchema: schema134.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.content !== undefined) { + let data2 = data.content; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + } else { + validate149.errors = [ + { + instancePath: instancePath + '/content', + schemaPath: '#/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema134.allOf[1].properties.content.type, + parentSchema: schema134.allOf[1].properties.content, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate149.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema134.allOf[1].type, + parentSchema: schema134.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate149.errors = vErrors; + return errors === 0; +} +exports.validateLoggingMessageResponse = validate150; +const schema135 = { + title: 'Logging Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'logging' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'content'], + }, + ], + 'x-typeguard': true, + 'x-standalone': true, + 'x-name': 'LoggingMessageResponse', + 'x-location': '#/components/schemas/logging_message_response', + 'x-schema-type': 'response', +}; +function validate150( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + if (errors === _errs0) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing0; + if (data.messageType === undefined && (missing0 = 'messageType')) { + validate150.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'", + schema: schema135.allOf[0].required, + parentSchema: schema135.allOf[0], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data0 = data.messageType; + if (typeof data0 !== 'string') { + validate150.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema135.allOf[0].properties.messageType.type, + parentSchema: schema135.allOf[0].properties.messageType, + data: data0, + }, + ]; + return false; + } + } + } + } else { + validate150.errors = [ + { + instancePath, + schemaPath: '#/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema135.allOf[0].type, + parentSchema: schema135.allOf[0], + data, + }, + ]; + return false; + } + } + var valid0 = _errs0 === errors; + if (valid0) { + const _errs5 = errors; + if (errors === _errs5) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing1; + if ( + (data.messageType === undefined && (missing1 = 'messageType')) || + (data.content === undefined && (missing1 = 'content')) + ) { + validate150.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing1 }, + message: "must have required property '" + missing1 + "'", + schema: schema135.allOf[1].required, + parentSchema: schema135.allOf[1], + data, + }, + ]; + return false; + } else { + if (data.messageType !== undefined) { + let data1 = data.messageType; + const _errs7 = errors; + if ('logging' !== data1) { + validate150.errors = [ + { + instancePath: instancePath + '/messageType', + schemaPath: '#/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'logging' }, + message: 'must be equal to constant', + schema: 'logging', + parentSchema: schema135.allOf[1].properties.messageType, + data: data1, + }, + ]; + return false; + } + var valid2 = _errs7 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data.content !== undefined) { + let data2 = data.content; + const _errs8 = errors; + if (errors === _errs8) { + if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { + } else { + validate150.errors = [ + { + instancePath: instancePath + '/content', + schemaPath: '#/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema135.allOf[1].properties.content.type, + parentSchema: schema135.allOf[1].properties.content, + data: data2, + }, + ]; + return false; + } + } + var valid2 = _errs8 === errors; + } else { + var valid2 = true; + } + } + } + } else { + validate150.errors = [ + { + instancePath, + schemaPath: '#/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema135.allOf[1].type, + parentSchema: schema135.allOf[1], + data, + }, + ]; + return false; + } + } + var valid0 = _errs5 === errors; + } + validate150.errors = vErrors; + return errors === 0; +} +exports.validateConnectionStatusRequest = validate151; +const schema136 = { title: 'Connection Status', type: 'string', description: 'The status of the peerconnection.', @@ -102128,22 +102872,22 @@ const schema133 = { 'x-location': '#/components/schemas/peerconnection_status_request', 'x-schema-type': 'request', }; -function validate148( +function validate151( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate148.errors = [ + validate151.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema133.type, - parentSchema: schema133, + schema: schema136.type, + parentSchema: schema136, data, }, ]; @@ -102159,25 +102903,25 @@ function validate148( data === 'closed' ) ) { - validate148.errors = [ + validate151.errors = [ { instancePath, schemaPath: '#/enum', keyword: 'enum', - params: { allowedValues: schema133.enum }, + params: { allowedValues: schema136.enum }, message: 'must be equal to one of the allowed values', - schema: schema133.enum, - parentSchema: schema133, + schema: schema136.enum, + parentSchema: schema136, data, }, ]; return false; } - validate148.errors = vErrors; + validate151.errors = vErrors; return errors === 0; } -exports.validateConnectionStatusResponse = validate149; -const schema134 = { +exports.validateConnectionStatusResponse = validate152; +const schema137 = { title: 'Connection Status', type: 'string', description: 'The status of the peerconnection.', @@ -102187,22 +102931,22 @@ const schema134 = { 'x-location': '#/components/schemas/peerconnection_status_response', 'x-schema-type': 'response', }; -function validate149( +function validate152( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate149.errors = [ + validate152.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema134.type, - parentSchema: schema134, + schema: schema137.type, + parentSchema: schema137, data, }, ]; @@ -102218,25 +102962,25 @@ function validate149( data === 'closed' ) ) { - validate149.errors = [ + validate152.errors = [ { instancePath, schemaPath: '#/enum', keyword: 'enum', - params: { allowedValues: schema134.enum }, + params: { allowedValues: schema137.enum }, message: 'must be equal to one of the allowed values', - schema: schema134.enum, - parentSchema: schema134, + schema: schema137.enum, + parentSchema: schema137, data, }, ]; return false; } - validate149.errors = vErrors; + validate152.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionCommonRequest = validate150; -const schema135 = { +exports.validatePeerconnectionCommonRequest = validate153; +const schema138 = { type: 'object', title: 'Peerconnection Common', properties: { @@ -102252,7 +102996,7 @@ const schema135 = { 'x-location': '#/components/schemas/peerconnection_common_request', 'x-schema-type': 'request', }; -function validate150( +function validate153( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -102262,15 +103006,15 @@ function validate150( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate150.errors = [ + validate153.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema135.required, - parentSchema: schema135, + schema: schema138.required, + parentSchema: schema138, data, }, ]; @@ -102279,30 +103023,30 @@ function validate150( if (data.type !== undefined) { let data0 = data.type; if (typeof data0 !== 'string') { - validate150.errors = [ + validate153.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema135.properties.type.type, - parentSchema: schema135.properties.type, + schema: schema138.properties.type.type, + parentSchema: schema138.properties.type, data: data0, }, ]; return false; } if (!(data0 === 'local' || data0 === 'webrtc')) { - validate150.errors = [ + validate153.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema135.properties.type.enum }, + params: { allowedValues: schema138.properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema135.properties.type.enum, - parentSchema: schema135.properties.type, + schema: schema138.properties.type.enum, + parentSchema: schema138.properties.type, data: data0, }, ]; @@ -102311,26 +103055,26 @@ function validate150( } } } else { - validate150.errors = [ + validate153.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema135.type, - parentSchema: schema135, + schema: schema138.type, + parentSchema: schema138, data, }, ]; return false; } } - validate150.errors = vErrors; + validate153.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionCommonResponse = validate151; -const schema136 = { +exports.validatePeerconnectionCommonResponse = validate154; +const schema139 = { type: 'object', title: 'Peerconnection Common', properties: { @@ -102359,7 +103103,7 @@ const schema136 = { 'x-location': '#/components/schemas/peerconnection_common_response', 'x-schema-type': 'response', }; -function validate151( +function validate154( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -102373,15 +103117,15 @@ function validate151( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate151.errors = [ + validate154.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema136.required, - parentSchema: schema136, + schema: schema139.required, + parentSchema: schema139, data, }, ]; @@ -102394,7 +103138,7 @@ function validate151( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate151.errors = [ + validate154.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/format', @@ -102402,22 +103146,22 @@ function validate151( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema136.properties.url, + parentSchema: schema139.properties.url, data: data0, }, ]; return false; } } else { - validate151.errors = [ + validate154.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema136.properties.url.type, - parentSchema: schema136.properties.url, + schema: schema139.properties.url.type, + parentSchema: schema139.properties.url, data: data0, }, ]; @@ -102434,30 +103178,30 @@ function validate151( let data1 = data.type; const _errs3 = errors; if (typeof data1 !== 'string') { - validate151.errors = [ + validate154.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema136.properties.type.type, - parentSchema: schema136.properties.type, + schema: schema139.properties.type.type, + parentSchema: schema139.properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate151.errors = [ + validate154.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema136.properties.type.enum }, + params: { allowedValues: schema139.properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema136.properties.type.enum, - parentSchema: schema136.properties.type, + schema: schema139.properties.type.enum, + parentSchema: schema139.properties.type, data: data1, }, ]; @@ -102472,15 +103216,15 @@ function validate151( let data2 = data.status; const _errs5 = errors; if (typeof data2 !== 'string') { - validate151.errors = [ + validate154.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema136.properties.status.type, - parentSchema: schema136.properties.status, + schema: schema139.properties.status.type, + parentSchema: schema139.properties.status, data: data2, }, ]; @@ -102496,15 +103240,15 @@ function validate151( data2 === 'closed' ) ) { - validate151.errors = [ + validate154.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema136.properties.status.enum }, + params: { allowedValues: schema139.properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema136.properties.status.enum, - parentSchema: schema136.properties.status, + schema: schema139.properties.status.enum, + parentSchema: schema139.properties.status, data: data2, }, ]; @@ -102518,26 +103262,26 @@ function validate151( } } } else { - validate151.errors = [ + validate154.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema136.type, - parentSchema: schema136, + schema: schema139.type, + parentSchema: schema139, data, }, ]; return false; } } - validate151.errors = vErrors; + validate154.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionOverviewRequest = validate152; -const schema137 = { +exports.validatePeerconnectionOverviewRequest = validate155; +const schema140 = { title: 'Peerconnection Overview', allOf: [ { @@ -102577,7 +103321,7 @@ const schema137 = { 'x-location': '#/components/schemas/peerconnection_overview_request', 'x-schema-type': 'request', }; -function validate152( +function validate155( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -102588,15 +103332,15 @@ function validate152( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate152.errors = [ + validate155.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema137.allOf[0].required, - parentSchema: schema137.allOf[0], + schema: schema140.allOf[0].required, + parentSchema: schema140.allOf[0], data, }, ]; @@ -102605,30 +103349,30 @@ function validate152( if (data.type !== undefined) { let data0 = data.type; if (typeof data0 !== 'string') { - validate152.errors = [ + validate155.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema137.allOf[0].properties.type.type, - parentSchema: schema137.allOf[0].properties.type, + schema: schema140.allOf[0].properties.type.type, + parentSchema: schema140.allOf[0].properties.type, data: data0, }, ]; return false; } if (!(data0 === 'local' || data0 === 'webrtc')) { - validate152.errors = [ + validate155.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema137.allOf[0].properties.type.enum }, + params: { allowedValues: schema140.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema137.allOf[0].properties.type.enum, - parentSchema: schema137.allOf[0].properties.type, + schema: schema140.allOf[0].properties.type.enum, + parentSchema: schema140.allOf[0].properties.type, data: data0, }, ]; @@ -102637,15 +103381,15 @@ function validate152( } } } else { - validate152.errors = [ + validate155.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema137.allOf[0].type, - parentSchema: schema137.allOf[0], + schema: schema140.allOf[0].type, + parentSchema: schema140.allOf[0], data, }, ]; @@ -102659,15 +103403,15 @@ function validate152( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate152.errors = [ + validate155.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema137.allOf[1].required, - parentSchema: schema137.allOf[1], + schema: schema140.allOf[1].required, + parentSchema: schema140.allOf[1], data, }, ]; @@ -102679,7 +103423,7 @@ function validate152( if (errors === _errs6) { if (Array.isArray(data1)) { if (data1.length > 2) { - validate152.errors = [ + validate155.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -102687,14 +103431,14 @@ function validate152( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema137.allOf[1].properties.devices, + parentSchema: schema140.allOf[1].properties.devices, data: data1, }, ]; return false; } else { if (data1.length < 2) { - validate152.errors = [ + validate155.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -102702,7 +103446,7 @@ function validate152( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema137.allOf[1].properties.devices, + parentSchema: schema140.allOf[1].properties.devices, data: data1, }, ]; @@ -102717,7 +103461,7 @@ function validate152( if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { let missing2; if (data2.url === undefined && (missing2 = 'url')) { - validate152.errors = [ + validate155.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -102725,8 +103469,8 @@ function validate152( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema137.allOf[1].properties.devices.items.required, - parentSchema: schema137.allOf[1].properties.devices.items, + schema140.allOf[1].properties.devices.items.required, + parentSchema: schema140.allOf[1].properties.devices.items, data: data2, }, ]; @@ -102739,7 +103483,7 @@ function validate152( if (errors === _errs10) { if (typeof data3 === 'string') { if (!formats0(data3)) { - validate152.errors = [ + validate155.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -102750,7 +103494,7 @@ function validate152( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema137.allOf[1].properties.devices.items + schema140.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -102758,7 +103502,7 @@ function validate152( return false; } } else { - validate152.errors = [ + validate155.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -102768,10 +103512,10 @@ function validate152( params: { type: 'string' }, message: 'must be string', schema: - schema137.allOf[1].properties.devices.items + schema140.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema137.allOf[1].properties.devices.items + schema140.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -102783,15 +103527,15 @@ function validate152( } } } else { - validate152.errors = [ + validate155.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema137.allOf[1].properties.devices.items.type, - parentSchema: schema137.allOf[1].properties.devices.items, + schema: schema140.allOf[1].properties.devices.items.type, + parentSchema: schema140.allOf[1].properties.devices.items, data: data2, }, ]; @@ -102806,15 +103550,15 @@ function validate152( } } } else { - validate152.errors = [ + validate155.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema137.allOf[1].properties.devices.type, - parentSchema: schema137.allOf[1].properties.devices, + schema: schema140.allOf[1].properties.devices.type, + parentSchema: schema140.allOf[1].properties.devices, data: data1, }, ]; @@ -102824,15 +103568,15 @@ function validate152( } } } else { - validate152.errors = [ + validate155.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema137.allOf[1].type, - parentSchema: schema137.allOf[1], + schema: schema140.allOf[1].type, + parentSchema: schema140.allOf[1], data, }, ]; @@ -102841,11 +103585,11 @@ function validate152( } var valid0 = _errs4 === errors; } - validate152.errors = vErrors; + validate155.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionOverviewResponse = validate153; -const schema138 = { +exports.validatePeerconnectionOverviewResponse = validate156; +const schema141 = { title: 'Peerconnection Overview', allOf: [ { @@ -102898,7 +103642,7 @@ const schema138 = { 'x-location': '#/components/schemas/peerconnection_overview_response', 'x-schema-type': 'response', }; -function validate153( +function validate156( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -102913,15 +103657,15 @@ function validate153( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate153.errors = [ + validate156.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema138.allOf[0].required, - parentSchema: schema138.allOf[0], + schema: schema141.allOf[0].required, + parentSchema: schema141.allOf[0], data, }, ]; @@ -102934,7 +103678,7 @@ function validate153( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -102942,22 +103686,22 @@ function validate153( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema138.allOf[0].properties.url, + parentSchema: schema141.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema138.allOf[0].properties.url.type, - parentSchema: schema138.allOf[0].properties.url, + schema: schema141.allOf[0].properties.url.type, + parentSchema: schema141.allOf[0].properties.url, data: data0, }, ]; @@ -102974,30 +103718,30 @@ function validate153( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema138.allOf[0].properties.type.type, - parentSchema: schema138.allOf[0].properties.type, + schema: schema141.allOf[0].properties.type.type, + parentSchema: schema141.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema138.allOf[0].properties.type.enum }, + params: { allowedValues: schema141.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema138.allOf[0].properties.type.enum, - parentSchema: schema138.allOf[0].properties.type, + schema: schema141.allOf[0].properties.type.enum, + parentSchema: schema141.allOf[0].properties.type, data: data1, }, ]; @@ -103012,15 +103756,15 @@ function validate153( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema138.allOf[0].properties.status.type, - parentSchema: schema138.allOf[0].properties.status, + schema: schema141.allOf[0].properties.status.type, + parentSchema: schema141.allOf[0].properties.status, data: data2, }, ]; @@ -103036,15 +103780,15 @@ function validate153( data2 === 'closed' ) ) { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema138.allOf[0].properties.status.enum }, + params: { allowedValues: schema141.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema138.allOf[0].properties.status.enum, - parentSchema: schema138.allOf[0].properties.status, + schema: schema141.allOf[0].properties.status.enum, + parentSchema: schema141.allOf[0].properties.status, data: data2, }, ]; @@ -103058,15 +103802,15 @@ function validate153( } } } else { - validate153.errors = [ + validate156.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema138.allOf[0].type, - parentSchema: schema138.allOf[0], + schema: schema141.allOf[0].type, + parentSchema: schema141.allOf[0], data, }, ]; @@ -103080,15 +103824,15 @@ function validate153( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate153.errors = [ + validate156.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema138.allOf[1].required, - parentSchema: schema138.allOf[1], + schema: schema141.allOf[1].required, + parentSchema: schema141.allOf[1], data, }, ]; @@ -103100,7 +103844,7 @@ function validate153( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -103108,14 +103852,14 @@ function validate153( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema138.allOf[1].properties.devices, + parentSchema: schema141.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -103123,7 +103867,7 @@ function validate153( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema138.allOf[1].properties.devices, + parentSchema: schema141.allOf[1].properties.devices, data: data3, }, ]; @@ -103138,7 +103882,7 @@ function validate153( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -103146,8 +103890,8 @@ function validate153( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema138.allOf[1].properties.devices.items.required, - parentSchema: schema138.allOf[1].properties.devices.items, + schema141.allOf[1].properties.devices.items.required, + parentSchema: schema141.allOf[1].properties.devices.items, data: data4, }, ]; @@ -103160,7 +103904,7 @@ function validate153( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -103171,7 +103915,7 @@ function validate153( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema138.allOf[1].properties.devices.items + schema141.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -103179,7 +103923,7 @@ function validate153( return false; } } else { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -103189,10 +103933,10 @@ function validate153( params: { type: 'string' }, message: 'must be string', schema: - schema138.allOf[1].properties.devices.items + schema141.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema138.allOf[1].properties.devices.items + schema141.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -103204,15 +103948,15 @@ function validate153( } } } else { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema138.allOf[1].properties.devices.items.type, - parentSchema: schema138.allOf[1].properties.devices.items, + schema: schema141.allOf[1].properties.devices.items.type, + parentSchema: schema141.allOf[1].properties.devices.items, data: data4, }, ]; @@ -103227,15 +103971,15 @@ function validate153( } } } else { - validate153.errors = [ + validate156.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema138.allOf[1].properties.devices.type, - parentSchema: schema138.allOf[1].properties.devices, + schema: schema141.allOf[1].properties.devices.type, + parentSchema: schema141.allOf[1].properties.devices, data: data3, }, ]; @@ -103245,15 +103989,15 @@ function validate153( } } } else { - validate153.errors = [ + validate156.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema138.allOf[1].type, - parentSchema: schema138.allOf[1], + schema: schema141.allOf[1].type, + parentSchema: schema141.allOf[1], data, }, ]; @@ -103262,11 +104006,11 @@ function validate153( } var valid0 = _errs8 === errors; } - validate153.errors = vErrors; + validate156.errors = vErrors; return errors === 0; } -exports.validateConfiguredDeviceReferenceRequest = validate154; -const schema139 = { +exports.validateConfiguredDeviceReferenceRequest = validate157; +const schema142 = { title: 'Configured Device Reference', type: 'object', properties: { @@ -103297,7 +104041,7 @@ const schema139 = { 'x-location': '#/components/schemas/configured_device_reference_request', 'x-schema-type': 'request', }; -function validate154( +function validate157( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -103307,15 +104051,15 @@ function validate154( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.url === undefined && (missing0 = 'url')) { - validate154.errors = [ + validate157.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema139.required, - parentSchema: schema139, + schema: schema142.required, + parentSchema: schema142, data, }, ]; @@ -103328,7 +104072,7 @@ function validate154( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate154.errors = [ + validate157.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/format', @@ -103336,22 +104080,22 @@ function validate154( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema139.properties.url, + parentSchema: schema142.properties.url, data: data0, }, ]; return false; } } else { - validate154.errors = [ + validate157.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema139.properties.url.type, - parentSchema: schema139.properties.url, + schema: schema142.properties.url.type, + parentSchema: schema142.properties.url, data: data0, }, ]; @@ -103394,7 +104138,7 @@ function validate154( (data3.remoteServiceId === undefined && (missing1 = 'remoteServiceId')) ) { - validate154.errors = [ + validate157.errors = [ { instancePath: instancePath + '/config/services/' + i0, schemaPath: @@ -103404,10 +104148,10 @@ function validate154( message: "must have required property '" + missing1 + "'", schema: - schema139.properties.config.properties.services.items + schema142.properties.config.properties.services.items .required, parentSchema: - schema139.properties.config.properties.services.items, + schema142.properties.config.properties.services.items, data: data3, }, ]; @@ -103420,7 +104164,7 @@ function validate154( if (errors === _errs10) { if (typeof data4 === 'string') { if (!formats0(data4)) { - validate154.errors = [ + validate157.errors = [ { instancePath: instancePath + @@ -103434,7 +104178,7 @@ function validate154( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema139.properties.config.properties + schema142.properties.config.properties .services.items.properties.serviceType, data: data4, }, @@ -103442,7 +104186,7 @@ function validate154( return false; } } else { - validate154.errors = [ + validate157.errors = [ { instancePath: instancePath + @@ -103455,10 +104199,10 @@ function validate154( params: { type: 'string' }, message: 'must be string', schema: - schema139.properties.config.properties + schema142.properties.config.properties .services.items.properties.serviceType.type, parentSchema: - schema139.properties.config.properties + schema142.properties.config.properties .services.items.properties.serviceType, data: data4, }, @@ -103476,7 +104220,7 @@ function validate154( let data5 = data3.serviceId; const _errs12 = errors; if (typeof data5 !== 'string') { - validate154.errors = [ + validate157.errors = [ { instancePath: instancePath + @@ -103489,10 +104233,10 @@ function validate154( params: { type: 'string' }, message: 'must be string', schema: - schema139.properties.config.properties.services + schema142.properties.config.properties.services .items.properties.serviceId.type, parentSchema: - schema139.properties.config.properties.services + schema142.properties.config.properties.services .items.properties.serviceId, data: data5, }, @@ -103508,7 +104252,7 @@ function validate154( let data6 = data3.remoteServiceId; const _errs14 = errors; if (typeof data6 !== 'string') { - validate154.errors = [ + validate157.errors = [ { instancePath: instancePath + @@ -103521,11 +104265,11 @@ function validate154( params: { type: 'string' }, message: 'must be string', schema: - schema139.properties.config.properties + schema142.properties.config.properties .services.items.properties.remoteServiceId .type, parentSchema: - schema139.properties.config.properties + schema142.properties.config.properties .services.items.properties.remoteServiceId, data: data6, }, @@ -103540,7 +104284,7 @@ function validate154( } } } else { - validate154.errors = [ + validate157.errors = [ { instancePath: instancePath + '/config/services/' + i0, schemaPath: @@ -103549,10 +104293,10 @@ function validate154( params: { type: 'object' }, message: 'must be object', schema: - schema139.properties.config.properties.services.items + schema142.properties.config.properties.services.items .type, parentSchema: - schema139.properties.config.properties.services.items, + schema142.properties.config.properties.services.items, data: data3, }, ]; @@ -103565,15 +104309,15 @@ function validate154( } } } else { - validate154.errors = [ + validate157.errors = [ { instancePath: instancePath + '/config/services', schemaPath: '#/properties/config/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema139.properties.config.properties.services.type, - parentSchema: schema139.properties.config.properties.services, + schema: schema142.properties.config.properties.services.type, + parentSchema: schema142.properties.config.properties.services, data: data2, }, ]; @@ -103582,15 +104326,15 @@ function validate154( } } } else { - validate154.errors = [ + validate157.errors = [ { instancePath: instancePath + '/config', schemaPath: '#/properties/config/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema139.properties.config.type, - parentSchema: schema139.properties.config, + schema: schema142.properties.config.type, + parentSchema: schema142.properties.config, data: data1, }, ]; @@ -103604,26 +104348,26 @@ function validate154( } } } else { - validate154.errors = [ + validate157.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema139.type, - parentSchema: schema139, + schema: schema142.type, + parentSchema: schema142, data, }, ]; return false; } } - validate154.errors = vErrors; + validate157.errors = vErrors; return errors === 0; } -exports.validateConfiguredDeviceReferenceResponse = validate155; -const schema140 = { +exports.validateConfiguredDeviceReferenceResponse = validate158; +const schema143 = { title: 'Configured Device Reference', type: 'object', properties: { @@ -103654,7 +104398,7 @@ const schema140 = { 'x-location': '#/components/schemas/configured_device_reference_response', 'x-schema-type': 'response', }; -function validate155( +function validate158( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -103664,15 +104408,15 @@ function validate155( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.url === undefined && (missing0 = 'url')) { - validate155.errors = [ + validate158.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema140.required, - parentSchema: schema140, + schema: schema143.required, + parentSchema: schema143, data, }, ]; @@ -103685,7 +104429,7 @@ function validate155( if (errors === _errs1) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate155.errors = [ + validate158.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/format', @@ -103693,22 +104437,22 @@ function validate155( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema140.properties.url, + parentSchema: schema143.properties.url, data: data0, }, ]; return false; } } else { - validate155.errors = [ + validate158.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema140.properties.url.type, - parentSchema: schema140.properties.url, + schema: schema143.properties.url.type, + parentSchema: schema143.properties.url, data: data0, }, ]; @@ -103751,7 +104495,7 @@ function validate155( (data3.remoteServiceId === undefined && (missing1 = 'remoteServiceId')) ) { - validate155.errors = [ + validate158.errors = [ { instancePath: instancePath + '/config/services/' + i0, schemaPath: @@ -103761,10 +104505,10 @@ function validate155( message: "must have required property '" + missing1 + "'", schema: - schema140.properties.config.properties.services.items + schema143.properties.config.properties.services.items .required, parentSchema: - schema140.properties.config.properties.services.items, + schema143.properties.config.properties.services.items, data: data3, }, ]; @@ -103777,7 +104521,7 @@ function validate155( if (errors === _errs10) { if (typeof data4 === 'string') { if (!formats0(data4)) { - validate155.errors = [ + validate158.errors = [ { instancePath: instancePath + @@ -103791,7 +104535,7 @@ function validate155( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema140.properties.config.properties + schema143.properties.config.properties .services.items.properties.serviceType, data: data4, }, @@ -103799,7 +104543,7 @@ function validate155( return false; } } else { - validate155.errors = [ + validate158.errors = [ { instancePath: instancePath + @@ -103812,10 +104556,10 @@ function validate155( params: { type: 'string' }, message: 'must be string', schema: - schema140.properties.config.properties + schema143.properties.config.properties .services.items.properties.serviceType.type, parentSchema: - schema140.properties.config.properties + schema143.properties.config.properties .services.items.properties.serviceType, data: data4, }, @@ -103833,7 +104577,7 @@ function validate155( let data5 = data3.serviceId; const _errs12 = errors; if (typeof data5 !== 'string') { - validate155.errors = [ + validate158.errors = [ { instancePath: instancePath + @@ -103846,10 +104590,10 @@ function validate155( params: { type: 'string' }, message: 'must be string', schema: - schema140.properties.config.properties.services + schema143.properties.config.properties.services .items.properties.serviceId.type, parentSchema: - schema140.properties.config.properties.services + schema143.properties.config.properties.services .items.properties.serviceId, data: data5, }, @@ -103865,7 +104609,7 @@ function validate155( let data6 = data3.remoteServiceId; const _errs14 = errors; if (typeof data6 !== 'string') { - validate155.errors = [ + validate158.errors = [ { instancePath: instancePath + @@ -103878,11 +104622,11 @@ function validate155( params: { type: 'string' }, message: 'must be string', schema: - schema140.properties.config.properties + schema143.properties.config.properties .services.items.properties.remoteServiceId .type, parentSchema: - schema140.properties.config.properties + schema143.properties.config.properties .services.items.properties.remoteServiceId, data: data6, }, @@ -103897,7 +104641,7 @@ function validate155( } } } else { - validate155.errors = [ + validate158.errors = [ { instancePath: instancePath + '/config/services/' + i0, schemaPath: @@ -103906,10 +104650,10 @@ function validate155( params: { type: 'object' }, message: 'must be object', schema: - schema140.properties.config.properties.services.items + schema143.properties.config.properties.services.items .type, parentSchema: - schema140.properties.config.properties.services.items, + schema143.properties.config.properties.services.items, data: data3, }, ]; @@ -103922,15 +104666,15 @@ function validate155( } } } else { - validate155.errors = [ + validate158.errors = [ { instancePath: instancePath + '/config/services', schemaPath: '#/properties/config/properties/services/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema140.properties.config.properties.services.type, - parentSchema: schema140.properties.config.properties.services, + schema: schema143.properties.config.properties.services.type, + parentSchema: schema143.properties.config.properties.services, data: data2, }, ]; @@ -103939,15 +104683,15 @@ function validate155( } } } else { - validate155.errors = [ + validate158.errors = [ { instancePath: instancePath + '/config', schemaPath: '#/properties/config/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema140.properties.config.type, - parentSchema: schema140.properties.config, + schema: schema143.properties.config.type, + parentSchema: schema143.properties.config, data: data1, }, ]; @@ -103961,26 +104705,26 @@ function validate155( } } } else { - validate155.errors = [ + validate158.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema140.type, - parentSchema: schema140, + schema: schema143.type, + parentSchema: schema143, data, }, ]; return false; } } - validate155.errors = vErrors; + validate158.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionRequest = validate156; -const schema141 = { +exports.validatePeerconnectionRequest = validate159; +const schema144 = { title: 'Peerconnection', allOf: [ { @@ -104040,7 +104784,7 @@ const schema141 = { 'x-location': '#/components/schemas/peerconnection_request', 'x-schema-type': 'request', }; -function validate156( +function validate159( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -104051,15 +104795,15 @@ function validate156( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate156.errors = [ + validate159.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema141.allOf[0].required, - parentSchema: schema141.allOf[0], + schema: schema144.allOf[0].required, + parentSchema: schema144.allOf[0], data, }, ]; @@ -104068,30 +104812,30 @@ function validate156( if (data.type !== undefined) { let data0 = data.type; if (typeof data0 !== 'string') { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema141.allOf[0].properties.type.type, - parentSchema: schema141.allOf[0].properties.type, + schema: schema144.allOf[0].properties.type.type, + parentSchema: schema144.allOf[0].properties.type, data: data0, }, ]; return false; } if (!(data0 === 'local' || data0 === 'webrtc')) { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema141.allOf[0].properties.type.enum }, + params: { allowedValues: schema144.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema141.allOf[0].properties.type.enum, - parentSchema: schema141.allOf[0].properties.type, + schema: schema144.allOf[0].properties.type.enum, + parentSchema: schema144.allOf[0].properties.type, data: data0, }, ]; @@ -104100,15 +104844,15 @@ function validate156( } } } else { - validate156.errors = [ + validate159.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema141.allOf[0].type, - parentSchema: schema141.allOf[0], + schema: schema144.allOf[0].type, + parentSchema: schema144.allOf[0], data, }, ]; @@ -104122,15 +104866,15 @@ function validate156( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate156.errors = [ + validate159.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema141.allOf[1].required, - parentSchema: schema141.allOf[1], + schema: schema144.allOf[1].required, + parentSchema: schema144.allOf[1], data, }, ]; @@ -104142,7 +104886,7 @@ function validate156( if (errors === _errs6) { if (Array.isArray(data1)) { if (data1.length > 2) { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -104150,14 +104894,14 @@ function validate156( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema141.allOf[1].properties.devices, + parentSchema: schema144.allOf[1].properties.devices, data: data1, }, ]; return false; } else { if (data1.length < 2) { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -104165,7 +104909,7 @@ function validate156( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema141.allOf[1].properties.devices, + parentSchema: schema144.allOf[1].properties.devices, data: data1, }, ]; @@ -104180,7 +104924,7 @@ function validate156( if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { let missing2; if (data2.url === undefined && (missing2 = 'url')) { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -104188,8 +104932,8 @@ function validate156( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema141.allOf[1].properties.devices.items.required, - parentSchema: schema141.allOf[1].properties.devices.items, + schema144.allOf[1].properties.devices.items.required, + parentSchema: schema144.allOf[1].properties.devices.items, data: data2, }, ]; @@ -104202,7 +104946,7 @@ function validate156( if (errors === _errs10) { if (typeof data3 === 'string') { if (!formats0(data3)) { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -104213,7 +104957,7 @@ function validate156( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema141.allOf[1].properties.devices.items + schema144.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -104221,7 +104965,7 @@ function validate156( return false; } } else { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -104231,10 +104975,10 @@ function validate156( params: { type: 'string' }, message: 'must be string', schema: - schema141.allOf[1].properties.devices.items + schema144.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema141.allOf[1].properties.devices.items + schema144.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -104282,7 +105026,7 @@ function validate156( (data6.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + @@ -104301,12 +105045,12 @@ function validate156( missing3 + "'", schema: - schema141.allOf[1].properties + schema144.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema141.allOf[1].properties + schema144.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data6, @@ -104321,7 +105065,7 @@ function validate156( if (errors === _errs19) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + @@ -104340,7 +105084,7 @@ function validate156( '"', schema: 'uri', parentSchema: - schema141.allOf[1] + schema144.allOf[1] .properties.devices .items.properties .config.properties @@ -104353,7 +105097,7 @@ function validate156( return false; } } else { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + @@ -104368,14 +105112,14 @@ function validate156( params: { type: 'string' }, message: 'must be string', schema: - schema141.allOf[1] + schema144.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema141.allOf[1] + schema144.allOf[1] .properties.devices .items.properties.config .properties.services @@ -104397,7 +105141,7 @@ function validate156( let data8 = data6.serviceId; const _errs21 = errors; if (typeof data8 !== 'string') { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + @@ -104412,14 +105156,14 @@ function validate156( params: { type: 'string' }, message: 'must be string', schema: - schema141.allOf[1] + schema144.allOf[1] .properties.devices.items .properties.config .properties.services.items .properties.serviceId .type, parentSchema: - schema141.allOf[1] + schema144.allOf[1] .properties.devices.items .properties.config .properties.services.items @@ -104441,7 +105185,7 @@ function validate156( let data9 = data6.remoteServiceId; const _errs23 = errors; if (typeof data9 !== 'string') { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + @@ -104456,14 +105200,14 @@ function validate156( params: { type: 'string' }, message: 'must be string', schema: - schema141.allOf[1] + schema144.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema141.allOf[1] + schema144.allOf[1] .properties.devices .items.properties.config .properties.services @@ -104482,7 +105226,7 @@ function validate156( } } } else { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + @@ -104496,11 +105240,11 @@ function validate156( params: { type: 'object' }, message: 'must be object', schema: - schema141.allOf[1].properties + schema144.allOf[1].properties .devices.items.properties.config .properties.services.items.type, parentSchema: - schema141.allOf[1].properties + schema144.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data6, @@ -104515,7 +105259,7 @@ function validate156( } } } else { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + @@ -104528,11 +105272,11 @@ function validate156( params: { type: 'array' }, message: 'must be array', schema: - schema141.allOf[1].properties.devices + schema144.allOf[1].properties.devices .items.properties.config.properties .services.type, parentSchema: - schema141.allOf[1].properties.devices + schema144.allOf[1].properties.devices .items.properties.config.properties .services, data: data5, @@ -104543,7 +105287,7 @@ function validate156( } } } else { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -104553,10 +105297,10 @@ function validate156( params: { type: 'object' }, message: 'must be object', schema: - schema141.allOf[1].properties.devices.items + schema144.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema141.allOf[1].properties.devices.items + schema144.allOf[1].properties.devices.items .properties.config, data: data4, }, @@ -104571,15 +105315,15 @@ function validate156( } } } else { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema141.allOf[1].properties.devices.items.type, - parentSchema: schema141.allOf[1].properties.devices.items, + schema: schema144.allOf[1].properties.devices.items.type, + parentSchema: schema144.allOf[1].properties.devices.items, data: data2, }, ]; @@ -104594,15 +105338,15 @@ function validate156( } } } else { - validate156.errors = [ + validate159.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema141.allOf[1].properties.devices.type, - parentSchema: schema141.allOf[1].properties.devices, + schema: schema144.allOf[1].properties.devices.type, + parentSchema: schema144.allOf[1].properties.devices, data: data1, }, ]; @@ -104612,15 +105356,15 @@ function validate156( } } } else { - validate156.errors = [ + validate159.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema141.allOf[1].type, - parentSchema: schema141.allOf[1], + schema: schema144.allOf[1].type, + parentSchema: schema144.allOf[1], data, }, ]; @@ -104629,11 +105373,11 @@ function validate156( } var valid0 = _errs4 === errors; } - validate156.errors = vErrors; + validate159.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionResponse = validate157; -const schema142 = { +exports.validatePeerconnectionResponse = validate160; +const schema145 = { title: 'Peerconnection', allOf: [ { @@ -104706,7 +105450,7 @@ const schema142 = { 'x-location': '#/components/schemas/peerconnection_response', 'x-schema-type': 'response', }; -function validate157( +function validate160( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -104721,15 +105465,15 @@ function validate157( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate157.errors = [ + validate160.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema142.allOf[0].required, - parentSchema: schema142.allOf[0], + schema: schema145.allOf[0].required, + parentSchema: schema145.allOf[0], data, }, ]; @@ -104742,7 +105486,7 @@ function validate157( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -104750,22 +105494,22 @@ function validate157( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema142.allOf[0].properties.url, + parentSchema: schema145.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema142.allOf[0].properties.url.type, - parentSchema: schema142.allOf[0].properties.url, + schema: schema145.allOf[0].properties.url.type, + parentSchema: schema145.allOf[0].properties.url, data: data0, }, ]; @@ -104782,30 +105526,30 @@ function validate157( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema142.allOf[0].properties.type.type, - parentSchema: schema142.allOf[0].properties.type, + schema: schema145.allOf[0].properties.type.type, + parentSchema: schema145.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema142.allOf[0].properties.type.enum }, + params: { allowedValues: schema145.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema142.allOf[0].properties.type.enum, - parentSchema: schema142.allOf[0].properties.type, + schema: schema145.allOf[0].properties.type.enum, + parentSchema: schema145.allOf[0].properties.type, data: data1, }, ]; @@ -104820,15 +105564,15 @@ function validate157( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema142.allOf[0].properties.status.type, - parentSchema: schema142.allOf[0].properties.status, + schema: schema145.allOf[0].properties.status.type, + parentSchema: schema145.allOf[0].properties.status, data: data2, }, ]; @@ -104844,15 +105588,15 @@ function validate157( data2 === 'closed' ) ) { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema142.allOf[0].properties.status.enum }, + params: { allowedValues: schema145.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema142.allOf[0].properties.status.enum, - parentSchema: schema142.allOf[0].properties.status, + schema: schema145.allOf[0].properties.status.enum, + parentSchema: schema145.allOf[0].properties.status, data: data2, }, ]; @@ -104866,15 +105610,15 @@ function validate157( } } } else { - validate157.errors = [ + validate160.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema142.allOf[0].type, - parentSchema: schema142.allOf[0], + schema: schema145.allOf[0].type, + parentSchema: schema145.allOf[0], data, }, ]; @@ -104888,15 +105632,15 @@ function validate157( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate157.errors = [ + validate160.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema142.allOf[1].required, - parentSchema: schema142.allOf[1], + schema: schema145.allOf[1].required, + parentSchema: schema145.allOf[1], data, }, ]; @@ -104908,7 +105652,7 @@ function validate157( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -104916,14 +105660,14 @@ function validate157( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema142.allOf[1].properties.devices, + parentSchema: schema145.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -104931,7 +105675,7 @@ function validate157( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema142.allOf[1].properties.devices, + parentSchema: schema145.allOf[1].properties.devices, data: data3, }, ]; @@ -104946,7 +105690,7 @@ function validate157( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -104954,8 +105698,8 @@ function validate157( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema142.allOf[1].properties.devices.items.required, - parentSchema: schema142.allOf[1].properties.devices.items, + schema145.allOf[1].properties.devices.items.required, + parentSchema: schema145.allOf[1].properties.devices.items, data: data4, }, ]; @@ -104968,7 +105712,7 @@ function validate157( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -104979,7 +105723,7 @@ function validate157( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema142.allOf[1].properties.devices.items + schema145.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -104987,7 +105731,7 @@ function validate157( return false; } } else { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -104997,10 +105741,10 @@ function validate157( params: { type: 'string' }, message: 'must be string', schema: - schema142.allOf[1].properties.devices.items + schema145.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema142.allOf[1].properties.devices.items + schema145.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -105048,7 +105792,7 @@ function validate157( (data8.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + @@ -105067,12 +105811,12 @@ function validate157( missing3 + "'", schema: - schema142.allOf[1].properties + schema145.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema142.allOf[1].properties + schema145.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -105087,7 +105831,7 @@ function validate157( if (errors === _errs23) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + @@ -105106,7 +105850,7 @@ function validate157( '"', schema: 'uri', parentSchema: - schema142.allOf[1] + schema145.allOf[1] .properties.devices .items.properties .config.properties @@ -105119,7 +105863,7 @@ function validate157( return false; } } else { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + @@ -105134,14 +105878,14 @@ function validate157( params: { type: 'string' }, message: 'must be string', schema: - schema142.allOf[1] + schema145.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema142.allOf[1] + schema145.allOf[1] .properties.devices .items.properties.config .properties.services @@ -105163,7 +105907,7 @@ function validate157( let data10 = data8.serviceId; const _errs25 = errors; if (typeof data10 !== 'string') { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + @@ -105178,14 +105922,14 @@ function validate157( params: { type: 'string' }, message: 'must be string', schema: - schema142.allOf[1] + schema145.allOf[1] .properties.devices.items .properties.config .properties.services.items .properties.serviceId .type, parentSchema: - schema142.allOf[1] + schema145.allOf[1] .properties.devices.items .properties.config .properties.services.items @@ -105208,7 +105952,7 @@ function validate157( data8.remoteServiceId; const _errs27 = errors; if (typeof data11 !== 'string') { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + @@ -105223,14 +105967,14 @@ function validate157( params: { type: 'string' }, message: 'must be string', schema: - schema142.allOf[1] + schema145.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema142.allOf[1] + schema145.allOf[1] .properties.devices .items.properties.config .properties.services @@ -105249,7 +105993,7 @@ function validate157( } } } else { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + @@ -105263,11 +106007,11 @@ function validate157( params: { type: 'object' }, message: 'must be object', schema: - schema142.allOf[1].properties + schema145.allOf[1].properties .devices.items.properties.config .properties.services.items.type, parentSchema: - schema142.allOf[1].properties + schema145.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -105282,7 +106026,7 @@ function validate157( } } } else { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + @@ -105295,11 +106039,11 @@ function validate157( params: { type: 'array' }, message: 'must be array', schema: - schema142.allOf[1].properties.devices + schema145.allOf[1].properties.devices .items.properties.config.properties .services.type, parentSchema: - schema142.allOf[1].properties.devices + schema145.allOf[1].properties.devices .items.properties.config.properties .services, data: data7, @@ -105310,7 +106054,7 @@ function validate157( } } } else { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -105320,10 +106064,10 @@ function validate157( params: { type: 'object' }, message: 'must be object', schema: - schema142.allOf[1].properties.devices.items + schema145.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema142.allOf[1].properties.devices.items + schema145.allOf[1].properties.devices.items .properties.config, data: data6, }, @@ -105338,15 +106082,15 @@ function validate157( } } } else { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema142.allOf[1].properties.devices.items.type, - parentSchema: schema142.allOf[1].properties.devices.items, + schema: schema145.allOf[1].properties.devices.items.type, + parentSchema: schema145.allOf[1].properties.devices.items, data: data4, }, ]; @@ -105361,15 +106105,15 @@ function validate157( } } } else { - validate157.errors = [ + validate160.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema142.allOf[1].properties.devices.type, - parentSchema: schema142.allOf[1].properties.devices, + schema: schema145.allOf[1].properties.devices.type, + parentSchema: schema145.allOf[1].properties.devices, data: data3, }, ]; @@ -105379,15 +106123,15 @@ function validate157( } } } else { - validate157.errors = [ + validate160.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema142.allOf[1].type, - parentSchema: schema142.allOf[1], + schema: schema145.allOf[1].type, + parentSchema: schema145.allOf[1], data, }, ]; @@ -105396,11 +106140,11 @@ function validate157( } var valid0 = _errs8 === errors; } - validate157.errors = vErrors; + validate160.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionClosedEventCallbackRequest = validate158; -const schema143 = { +exports.validatePeerconnectionClosedEventCallbackRequest = validate161; +const schema146 = { title: 'Peerconnection Closed Event Callback', allOf: [ { @@ -105498,7 +106242,7 @@ const schema143 = { 'x-location': '#/components/schemas/peerconnection_closed_request', 'x-schema-type': 'request', }; -function validate158( +function validate161( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -105510,15 +106254,15 @@ function validate158( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate158.errors = [ + validate161.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema143.allOf[0].allOf[0].required, - parentSchema: schema143.allOf[0].allOf[0], + schema: schema146.allOf[0].allOf[0].required, + parentSchema: schema146.allOf[0].allOf[0], data, }, ]; @@ -105527,15 +106271,15 @@ function validate158( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema143.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema143.allOf[0].allOf[0].properties.callbackType, + schema: schema146.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema146.allOf[0].allOf[0].properties.callbackType, data: data0, }, ]; @@ -105544,15 +106288,15 @@ function validate158( } } } else { - validate158.errors = [ + validate161.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema143.allOf[0].allOf[0].type, - parentSchema: schema143.allOf[0].allOf[0], + schema: schema146.allOf[0].allOf[0].type, + parentSchema: schema146.allOf[0].allOf[0], data, }, ]; @@ -105569,15 +106313,15 @@ function validate158( (data.callbackType === undefined && (missing1 = 'callbackType')) || (data.eventType === undefined && (missing1 = 'eventType')) ) { - validate158.errors = [ + validate161.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema143.allOf[0].allOf[1].required, - parentSchema: schema143.allOf[0].allOf[1], + schema: schema146.allOf[0].allOf[1].required, + parentSchema: schema146.allOf[0].allOf[1], data, }, ]; @@ -105587,33 +106331,33 @@ function validate158( let data1 = data.callbackType; const _errs7 = errors; if (typeof data1 !== 'string') { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema143.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema143.allOf[0].allOf[1].properties.callbackType, + schema: schema146.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema146.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; return false; } if (!(data1 === 'event')) { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', keyword: 'enum', params: { allowedValues: - schema143.allOf[0].allOf[1].properties.callbackType.enum, + schema146.allOf[0].allOf[1].properties.callbackType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema143.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema143.allOf[0].allOf[1].properties.callbackType, + schema: schema146.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema146.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; @@ -105628,15 +106372,15 @@ function validate158( let data2 = data.eventType; const _errs9 = errors; if (typeof data2 !== 'string') { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema143.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema143.allOf[0].allOf[1].properties.eventType, + schema: schema146.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema146.allOf[0].allOf[1].properties.eventType, data: data2, }, ]; @@ -105649,15 +106393,15 @@ function validate158( } } } else { - validate158.errors = [ + validate161.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema143.allOf[0].allOf[1].type, - parentSchema: schema143.allOf[0].allOf[1], + schema: schema146.allOf[0].allOf[1].type, + parentSchema: schema146.allOf[0].allOf[1], data, }, ]; @@ -105676,15 +106420,15 @@ function validate158( (data.eventType === undefined && (missing2 = 'eventType')) || (data.peerconnection === undefined && (missing2 = 'peerconnection')) ) { - validate158.errors = [ + validate161.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema143.allOf[1].required, - parentSchema: schema143.allOf[1], + schema: schema146.allOf[1].required, + parentSchema: schema146.allOf[1], data, }, ]; @@ -105694,30 +106438,30 @@ function validate158( let data3 = data.eventType; const _errs13 = errors; if (typeof data3 !== 'string') { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema143.allOf[1].properties.eventType.type, - parentSchema: schema143.allOf[1].properties.eventType, + schema: schema146.allOf[1].properties.eventType.type, + parentSchema: schema146.allOf[1].properties.eventType, data: data3, }, ]; return false; } if (!(data3 === 'peerconnection-closed')) { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/enum', keyword: 'enum', - params: { allowedValues: schema143.allOf[1].properties.eventType.enum }, + params: { allowedValues: schema146.allOf[1].properties.eventType.enum }, message: 'must be equal to one of the allowed values', - schema: schema143.allOf[1].properties.eventType.enum, - parentSchema: schema143.allOf[1].properties.eventType, + schema: schema146.allOf[1].properties.eventType.enum, + parentSchema: schema146.allOf[1].properties.eventType, data: data3, }, ]; @@ -105736,7 +106480,7 @@ function validate158( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing3; if (data4.type === undefined && (missing3 = 'type')) { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -105745,9 +106489,9 @@ function validate158( params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", schema: - schema143.allOf[1].properties.peerconnection.allOf[0].required, + schema146.allOf[1].properties.peerconnection.allOf[0].required, parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[0], + schema146.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -105756,7 +106500,7 @@ function validate158( if (data4.type !== undefined) { let data5 = data4.type; if (typeof data5 !== 'string') { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -105765,10 +106509,10 @@ function validate158( params: { type: 'string' }, message: 'must be string', schema: - schema143.allOf[1].properties.peerconnection.allOf[0] + schema146.allOf[1].properties.peerconnection.allOf[0] .properties.type.type, parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[0] + schema146.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data5, }, @@ -105776,7 +106520,7 @@ function validate158( return false; } if (!(data5 === 'local' || data5 === 'webrtc')) { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -105784,15 +106528,15 @@ function validate158( keyword: 'enum', params: { allowedValues: - schema143.allOf[1].properties.peerconnection.allOf[0] + schema146.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema143.allOf[1].properties.peerconnection.allOf[0] + schema146.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[0] + schema146.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data5, }, @@ -105802,15 +106546,15 @@ function validate158( } } } else { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema143.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema143.allOf[1].properties.peerconnection.allOf[0], + schema: schema146.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema146.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -105824,7 +106568,7 @@ function validate158( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing4; if (data4.devices === undefined && (missing4 = 'devices')) { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -105833,10 +106577,10 @@ function validate158( params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'", schema: - schema143.allOf[1].properties.peerconnection.allOf[1] + schema146.allOf[1].properties.peerconnection.allOf[1] .required, parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[1], + schema146.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -105848,7 +106592,7 @@ function validate158( if (errors === _errs22) { if (Array.isArray(data6)) { if (data6.length > 2) { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -105858,7 +106602,7 @@ function validate158( message: 'must NOT have more than 2 items', schema: 2, parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[1] + schema146.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data6, }, @@ -105866,7 +106610,7 @@ function validate158( return false; } else { if (data6.length < 2) { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/peerconnection/devices', @@ -105877,7 +106621,7 @@ function validate158( message: 'must NOT have fewer than 2 items', schema: 2, parentSchema: - schema143.allOf[1].properties.peerconnection + schema146.allOf[1].properties.peerconnection .allOf[1].properties.devices, data: data6, }, @@ -105897,7 +106641,7 @@ function validate158( ) { let missing5; if (data7.url === undefined && (missing5 = 'url')) { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + @@ -105912,11 +106656,11 @@ function validate158( missing5 + "'", schema: - schema143.allOf[1].properties.peerconnection + schema146.allOf[1].properties.peerconnection .allOf[1].properties.devices.items .required, parentSchema: - schema143.allOf[1].properties.peerconnection + schema146.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data7, }, @@ -105930,7 +106674,7 @@ function validate158( if (errors === _errs26) { if (typeof data8 === 'string') { if (!formats0(data8)) { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + @@ -105947,7 +106691,7 @@ function validate158( '"', schema: 'uri', parentSchema: - schema143.allOf[1].properties + schema146.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -105957,7 +106701,7 @@ function validate158( return false; } } else { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + @@ -105970,12 +106714,12 @@ function validate158( params: { type: 'string' }, message: 'must be string', schema: - schema143.allOf[1].properties + schema146.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url.type, parentSchema: - schema143.allOf[1].properties + schema146.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -106031,7 +106775,7 @@ function validate158( (missing6 = 'remoteServiceId')) ) { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + @@ -106051,7 +106795,7 @@ function validate158( missing6 + "'", schema: - schema143.allOf[1] + schema146.allOf[1] .properties .peerconnection .allOf[1].properties @@ -106060,7 +106804,7 @@ function validate158( .properties.services .items.required, parentSchema: - schema143.allOf[1] + schema146.allOf[1] .properties .peerconnection .allOf[1].properties @@ -106091,7 +106835,7 @@ function validate158( if ( !formats0(data12) ) { - validate158.errors = + validate161.errors = [ { instancePath: @@ -106116,7 +106860,7 @@ function validate158( schema: 'uri', parentSchema: - schema143 + schema146 .allOf[1] .properties .peerconnection @@ -106137,7 +106881,7 @@ function validate158( return false; } } else { - validate158.errors = + validate161.errors = [ { instancePath: @@ -106157,7 +106901,7 @@ function validate158( message: 'must be string', schema: - schema143 + schema146 .allOf[1] .properties .peerconnection @@ -106174,7 +106918,7 @@ function validate158( .serviceType .type, parentSchema: - schema143 + schema146 .allOf[1] .properties .peerconnection @@ -106213,7 +106957,7 @@ function validate158( typeof data13 !== 'string' ) { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + @@ -106231,7 +106975,7 @@ function validate158( message: 'must be string', schema: - schema143 + schema146 .allOf[1] .properties .peerconnection @@ -106247,7 +106991,7 @@ function validate158( .serviceId .type, parentSchema: - schema143 + schema146 .allOf[1] .properties .peerconnection @@ -106284,7 +107028,7 @@ function validate158( typeof data14 !== 'string' ) { - validate158.errors = + validate161.errors = [ { instancePath: @@ -106304,7 +107048,7 @@ function validate158( message: 'must be string', schema: - schema143 + schema146 .allOf[1] .properties .peerconnection @@ -106321,7 +107065,7 @@ function validate158( .remoteServiceId .type, parentSchema: - schema143 + schema146 .allOf[1] .properties .peerconnection @@ -106350,7 +107094,7 @@ function validate158( } } } else { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + @@ -106366,7 +107110,7 @@ function validate158( }, message: 'must be object', schema: - schema143.allOf[1] + schema146.allOf[1] .properties .peerconnection .allOf[1].properties @@ -106375,7 +107119,7 @@ function validate158( .properties.services .items.type, parentSchema: - schema143.allOf[1] + schema146.allOf[1] .properties .peerconnection .allOf[1].properties @@ -106395,7 +107139,7 @@ function validate158( } } } else { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + @@ -106408,13 +107152,13 @@ function validate158( params: { type: 'array' }, message: 'must be array', schema: - schema143.allOf[1].properties + schema146.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config .properties.services.type, parentSchema: - schema143.allOf[1].properties + schema146.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config @@ -106427,7 +107171,7 @@ function validate158( } } } else { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + @@ -106440,12 +107184,12 @@ function validate158( params: { type: 'object' }, message: 'must be object', schema: - schema143.allOf[1].properties + schema146.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config.type, parentSchema: - schema143.allOf[1].properties + schema146.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config, @@ -106462,7 +107206,7 @@ function validate158( } } } else { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + @@ -106474,10 +107218,10 @@ function validate158( params: { type: 'object' }, message: 'must be object', schema: - schema143.allOf[1].properties.peerconnection + schema146.allOf[1].properties.peerconnection .allOf[1].properties.devices.items.type, parentSchema: - schema143.allOf[1].properties.peerconnection + schema146.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data7, }, @@ -106493,7 +107237,7 @@ function validate158( } } } else { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -106502,10 +107246,10 @@ function validate158( params: { type: 'array' }, message: 'must be array', schema: - schema143.allOf[1].properties.peerconnection.allOf[1] + schema146.allOf[1].properties.peerconnection.allOf[1] .properties.devices.type, parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[1] + schema146.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data6, }, @@ -106516,7 +107260,7 @@ function validate158( } } } else { - validate158.errors = [ + validate161.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', @@ -106524,9 +107268,9 @@ function validate158( params: { type: 'object' }, message: 'must be object', schema: - schema143.allOf[1].properties.peerconnection.allOf[1].type, + schema146.allOf[1].properties.peerconnection.allOf[1].type, parentSchema: - schema143.allOf[1].properties.peerconnection.allOf[1], + schema146.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -106542,15 +107286,15 @@ function validate158( } } } else { - validate158.errors = [ + validate161.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema143.allOf[1].type, - parentSchema: schema143.allOf[1], + schema: schema146.allOf[1].type, + parentSchema: schema146.allOf[1], data, }, ]; @@ -106559,11 +107303,11 @@ function validate158( } var valid0 = _errs11 === errors; } - validate158.errors = vErrors; + validate161.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionClosedEventCallbackResponse = validate159; -const schema144 = { +exports.validatePeerconnectionClosedEventCallbackResponse = validate162; +const schema147 = { title: 'Peerconnection Closed Event Callback', allOf: [ { @@ -106681,7 +107425,7 @@ const schema144 = { 'x-location': '#/components/schemas/peerconnection_closed_response', 'x-schema-type': 'response', }; -function validate159( +function validate162( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -106693,15 +107437,15 @@ function validate159( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate159.errors = [ + validate162.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema144.allOf[0].allOf[0].required, - parentSchema: schema144.allOf[0].allOf[0], + schema: schema147.allOf[0].allOf[0].required, + parentSchema: schema147.allOf[0].allOf[0], data, }, ]; @@ -106710,15 +107454,15 @@ function validate159( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema144.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema144.allOf[0].allOf[0].properties.callbackType, + schema: schema147.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema147.allOf[0].allOf[0].properties.callbackType, data: data0, }, ]; @@ -106727,15 +107471,15 @@ function validate159( } } } else { - validate159.errors = [ + validate162.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema144.allOf[0].allOf[0].type, - parentSchema: schema144.allOf[0].allOf[0], + schema: schema147.allOf[0].allOf[0].type, + parentSchema: schema147.allOf[0].allOf[0], data, }, ]; @@ -106752,15 +107496,15 @@ function validate159( (data.callbackType === undefined && (missing1 = 'callbackType')) || (data.eventType === undefined && (missing1 = 'eventType')) ) { - validate159.errors = [ + validate162.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema144.allOf[0].allOf[1].required, - parentSchema: schema144.allOf[0].allOf[1], + schema: schema147.allOf[0].allOf[1].required, + parentSchema: schema147.allOf[0].allOf[1], data, }, ]; @@ -106770,33 +107514,33 @@ function validate159( let data1 = data.callbackType; const _errs7 = errors; if (typeof data1 !== 'string') { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema144.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema144.allOf[0].allOf[1].properties.callbackType, + schema: schema147.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema147.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; return false; } if (!(data1 === 'event')) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', keyword: 'enum', params: { allowedValues: - schema144.allOf[0].allOf[1].properties.callbackType.enum, + schema147.allOf[0].allOf[1].properties.callbackType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema144.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema144.allOf[0].allOf[1].properties.callbackType, + schema: schema147.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema147.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; @@ -106811,15 +107555,15 @@ function validate159( let data2 = data.eventType; const _errs9 = errors; if (typeof data2 !== 'string') { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema144.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema144.allOf[0].allOf[1].properties.eventType, + schema: schema147.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema147.allOf[0].allOf[1].properties.eventType, data: data2, }, ]; @@ -106832,15 +107576,15 @@ function validate159( } } } else { - validate159.errors = [ + validate162.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema144.allOf[0].allOf[1].type, - parentSchema: schema144.allOf[0].allOf[1], + schema: schema147.allOf[0].allOf[1].type, + parentSchema: schema147.allOf[0].allOf[1], data, }, ]; @@ -106859,15 +107603,15 @@ function validate159( (data.eventType === undefined && (missing2 = 'eventType')) || (data.peerconnection === undefined && (missing2 = 'peerconnection')) ) { - validate159.errors = [ + validate162.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema144.allOf[1].required, - parentSchema: schema144.allOf[1], + schema: schema147.allOf[1].required, + parentSchema: schema147.allOf[1], data, }, ]; @@ -106877,30 +107621,30 @@ function validate159( let data3 = data.eventType; const _errs13 = errors; if (typeof data3 !== 'string') { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema144.allOf[1].properties.eventType.type, - parentSchema: schema144.allOf[1].properties.eventType, + schema: schema147.allOf[1].properties.eventType.type, + parentSchema: schema147.allOf[1].properties.eventType, data: data3, }, ]; return false; } if (!(data3 === 'peerconnection-closed')) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/enum', keyword: 'enum', - params: { allowedValues: schema144.allOf[1].properties.eventType.enum }, + params: { allowedValues: schema147.allOf[1].properties.eventType.enum }, message: 'must be equal to one of the allowed values', - schema: schema144.allOf[1].properties.eventType.enum, - parentSchema: schema144.allOf[1].properties.eventType, + schema: schema147.allOf[1].properties.eventType.enum, + parentSchema: schema147.allOf[1].properties.eventType, data: data3, }, ]; @@ -106923,7 +107667,7 @@ function validate159( (data4.type === undefined && (missing3 = 'type')) || (data4.status === undefined && (missing3 = 'status')) ) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -106932,9 +107676,9 @@ function validate159( params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", schema: - schema144.allOf[1].properties.peerconnection.allOf[0].required, + schema147.allOf[1].properties.peerconnection.allOf[0].required, parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0], + schema147.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -106947,7 +107691,7 @@ function validate159( if (errors === _errs18) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection/url', schemaPath: @@ -106957,7 +107701,7 @@ function validate159( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.url, data: data5, }, @@ -106965,7 +107709,7 @@ function validate159( return false; } } else { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection/url', schemaPath: @@ -106974,10 +107718,10 @@ function validate159( params: { type: 'string' }, message: 'must be string', schema: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.url.type, parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.url, data: data5, }, @@ -106995,7 +107739,7 @@ function validate159( let data6 = data4.type; const _errs20 = errors; if (typeof data6 !== 'string') { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -107004,10 +107748,10 @@ function validate159( params: { type: 'string' }, message: 'must be string', schema: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.type.type, parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data6, }, @@ -107015,7 +107759,7 @@ function validate159( return false; } if (!(data6 === 'local' || data6 === 'webrtc')) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -107023,15 +107767,15 @@ function validate159( keyword: 'enum', params: { allowedValues: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data6, }, @@ -107047,7 +107791,7 @@ function validate159( let data7 = data4.status; const _errs22 = errors; if (typeof data7 !== 'string') { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection/status', schemaPath: @@ -107056,10 +107800,10 @@ function validate159( params: { type: 'string' }, message: 'must be string', schema: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.status.type, parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.status, data: data7, }, @@ -107076,7 +107820,7 @@ function validate159( data7 === 'closed' ) ) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection/status', schemaPath: @@ -107084,15 +107828,15 @@ function validate159( keyword: 'enum', params: { allowedValues: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.status.enum, }, message: 'must be equal to one of the allowed values', schema: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.status.enum, parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[0] + schema147.allOf[1].properties.peerconnection.allOf[0] .properties.status, data: data7, }, @@ -107107,15 +107851,15 @@ function validate159( } } } else { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema144.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema144.allOf[1].properties.peerconnection.allOf[0], + schema: schema147.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema147.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -107129,7 +107873,7 @@ function validate159( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing4; if (data4.devices === undefined && (missing4 = 'devices')) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -107138,10 +107882,10 @@ function validate159( params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'", schema: - schema144.allOf[1].properties.peerconnection.allOf[1] + schema147.allOf[1].properties.peerconnection.allOf[1] .required, parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[1], + schema147.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -107153,7 +107897,7 @@ function validate159( if (errors === _errs26) { if (Array.isArray(data8)) { if (data8.length > 2) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -107163,7 +107907,7 @@ function validate159( message: 'must NOT have more than 2 items', schema: 2, parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[1] + schema147.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data8, }, @@ -107171,7 +107915,7 @@ function validate159( return false; } else { if (data8.length < 2) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection/devices', @@ -107182,7 +107926,7 @@ function validate159( message: 'must NOT have fewer than 2 items', schema: 2, parentSchema: - schema144.allOf[1].properties.peerconnection + schema147.allOf[1].properties.peerconnection .allOf[1].properties.devices, data: data8, }, @@ -107202,7 +107946,7 @@ function validate159( ) { let missing5; if (data9.url === undefined && (missing5 = 'url')) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + @@ -107217,11 +107961,11 @@ function validate159( missing5 + "'", schema: - schema144.allOf[1].properties.peerconnection + schema147.allOf[1].properties.peerconnection .allOf[1].properties.devices.items .required, parentSchema: - schema144.allOf[1].properties.peerconnection + schema147.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data9, }, @@ -107235,7 +107979,7 @@ function validate159( if (errors === _errs30) { if (typeof data10 === 'string') { if (!formats0(data10)) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + @@ -107252,7 +107996,7 @@ function validate159( '"', schema: 'uri', parentSchema: - schema144.allOf[1].properties + schema147.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -107262,7 +108006,7 @@ function validate159( return false; } } else { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + @@ -107275,12 +108019,12 @@ function validate159( params: { type: 'string' }, message: 'must be string', schema: - schema144.allOf[1].properties + schema147.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url.type, parentSchema: - schema144.allOf[1].properties + schema147.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -107336,7 +108080,7 @@ function validate159( (missing6 = 'remoteServiceId')) ) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + @@ -107356,7 +108100,7 @@ function validate159( missing6 + "'", schema: - schema144.allOf[1] + schema147.allOf[1] .properties .peerconnection .allOf[1].properties @@ -107365,7 +108109,7 @@ function validate159( .properties.services .items.required, parentSchema: - schema144.allOf[1] + schema147.allOf[1] .properties .peerconnection .allOf[1].properties @@ -107396,7 +108140,7 @@ function validate159( if ( !formats0(data14) ) { - validate159.errors = + validate162.errors = [ { instancePath: @@ -107421,7 +108165,7 @@ function validate159( schema: 'uri', parentSchema: - schema144 + schema147 .allOf[1] .properties .peerconnection @@ -107442,7 +108186,7 @@ function validate159( return false; } } else { - validate159.errors = + validate162.errors = [ { instancePath: @@ -107462,7 +108206,7 @@ function validate159( message: 'must be string', schema: - schema144 + schema147 .allOf[1] .properties .peerconnection @@ -107479,7 +108223,7 @@ function validate159( .serviceType .type, parentSchema: - schema144 + schema147 .allOf[1] .properties .peerconnection @@ -107518,7 +108262,7 @@ function validate159( typeof data15 !== 'string' ) { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + @@ -107536,7 +108280,7 @@ function validate159( message: 'must be string', schema: - schema144 + schema147 .allOf[1] .properties .peerconnection @@ -107552,7 +108296,7 @@ function validate159( .serviceId .type, parentSchema: - schema144 + schema147 .allOf[1] .properties .peerconnection @@ -107589,7 +108333,7 @@ function validate159( typeof data16 !== 'string' ) { - validate159.errors = + validate162.errors = [ { instancePath: @@ -107609,7 +108353,7 @@ function validate159( message: 'must be string', schema: - schema144 + schema147 .allOf[1] .properties .peerconnection @@ -107626,7 +108370,7 @@ function validate159( .remoteServiceId .type, parentSchema: - schema144 + schema147 .allOf[1] .properties .peerconnection @@ -107655,7 +108399,7 @@ function validate159( } } } else { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + @@ -107671,7 +108415,7 @@ function validate159( }, message: 'must be object', schema: - schema144.allOf[1] + schema147.allOf[1] .properties .peerconnection .allOf[1].properties @@ -107680,7 +108424,7 @@ function validate159( .properties.services .items.type, parentSchema: - schema144.allOf[1] + schema147.allOf[1] .properties .peerconnection .allOf[1].properties @@ -107700,7 +108444,7 @@ function validate159( } } } else { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + @@ -107713,13 +108457,13 @@ function validate159( params: { type: 'array' }, message: 'must be array', schema: - schema144.allOf[1].properties + schema147.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config .properties.services.type, parentSchema: - schema144.allOf[1].properties + schema147.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config @@ -107732,7 +108476,7 @@ function validate159( } } } else { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + @@ -107745,12 +108489,12 @@ function validate159( params: { type: 'object' }, message: 'must be object', schema: - schema144.allOf[1].properties + schema147.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config.type, parentSchema: - schema144.allOf[1].properties + schema147.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config, @@ -107767,7 +108511,7 @@ function validate159( } } } else { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + @@ -107779,10 +108523,10 @@ function validate159( params: { type: 'object' }, message: 'must be object', schema: - schema144.allOf[1].properties.peerconnection + schema147.allOf[1].properties.peerconnection .allOf[1].properties.devices.items.type, parentSchema: - schema144.allOf[1].properties.peerconnection + schema147.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data9, }, @@ -107798,7 +108542,7 @@ function validate159( } } } else { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -107807,10 +108551,10 @@ function validate159( params: { type: 'array' }, message: 'must be array', schema: - schema144.allOf[1].properties.peerconnection.allOf[1] + schema147.allOf[1].properties.peerconnection.allOf[1] .properties.devices.type, parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[1] + schema147.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data8, }, @@ -107821,7 +108565,7 @@ function validate159( } } } else { - validate159.errors = [ + validate162.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', @@ -107829,9 +108573,9 @@ function validate159( params: { type: 'object' }, message: 'must be object', schema: - schema144.allOf[1].properties.peerconnection.allOf[1].type, + schema147.allOf[1].properties.peerconnection.allOf[1].type, parentSchema: - schema144.allOf[1].properties.peerconnection.allOf[1], + schema147.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -107847,15 +108591,15 @@ function validate159( } } } else { - validate159.errors = [ + validate162.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema144.allOf[1].type, - parentSchema: schema144.allOf[1], + schema: schema147.allOf[1].type, + parentSchema: schema147.allOf[1], data, }, ]; @@ -107864,11 +108608,11 @@ function validate159( } var valid0 = _errs11 === errors; } - validate159.errors = vErrors; + validate162.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionStatusChangedEventCallbackRequest = validate160; -const schema145 = { +exports.validatePeerconnectionStatusChangedEventCallbackRequest = validate163; +const schema148 = { title: 'Peerconnection Status Changed Event Callback', allOf: [ { @@ -107966,7 +108710,7 @@ const schema145 = { 'x-location': '#/components/schemas/peerconnection_status_changed_request', 'x-schema-type': 'request', }; -function validate160( +function validate163( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -107978,15 +108722,15 @@ function validate160( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate160.errors = [ + validate163.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema145.allOf[0].allOf[0].required, - parentSchema: schema145.allOf[0].allOf[0], + schema: schema148.allOf[0].allOf[0].required, + parentSchema: schema148.allOf[0].allOf[0], data, }, ]; @@ -107995,15 +108739,15 @@ function validate160( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema145.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema145.allOf[0].allOf[0].properties.callbackType, + schema: schema148.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema148.allOf[0].allOf[0].properties.callbackType, data: data0, }, ]; @@ -108012,15 +108756,15 @@ function validate160( } } } else { - validate160.errors = [ + validate163.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema145.allOf[0].allOf[0].type, - parentSchema: schema145.allOf[0].allOf[0], + schema: schema148.allOf[0].allOf[0].type, + parentSchema: schema148.allOf[0].allOf[0], data, }, ]; @@ -108037,15 +108781,15 @@ function validate160( (data.callbackType === undefined && (missing1 = 'callbackType')) || (data.eventType === undefined && (missing1 = 'eventType')) ) { - validate160.errors = [ + validate163.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema145.allOf[0].allOf[1].required, - parentSchema: schema145.allOf[0].allOf[1], + schema: schema148.allOf[0].allOf[1].required, + parentSchema: schema148.allOf[0].allOf[1], data, }, ]; @@ -108055,33 +108799,33 @@ function validate160( let data1 = data.callbackType; const _errs7 = errors; if (typeof data1 !== 'string') { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema145.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema145.allOf[0].allOf[1].properties.callbackType, + schema: schema148.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema148.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; return false; } if (!(data1 === 'event')) { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', keyword: 'enum', params: { allowedValues: - schema145.allOf[0].allOf[1].properties.callbackType.enum, + schema148.allOf[0].allOf[1].properties.callbackType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema145.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema145.allOf[0].allOf[1].properties.callbackType, + schema: schema148.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema148.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; @@ -108096,15 +108840,15 @@ function validate160( let data2 = data.eventType; const _errs9 = errors; if (typeof data2 !== 'string') { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema145.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema145.allOf[0].allOf[1].properties.eventType, + schema: schema148.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema148.allOf[0].allOf[1].properties.eventType, data: data2, }, ]; @@ -108117,15 +108861,15 @@ function validate160( } } } else { - validate160.errors = [ + validate163.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema145.allOf[0].allOf[1].type, - parentSchema: schema145.allOf[0].allOf[1], + schema: schema148.allOf[0].allOf[1].type, + parentSchema: schema148.allOf[0].allOf[1], data, }, ]; @@ -108144,15 +108888,15 @@ function validate160( (data.eventType === undefined && (missing2 = 'eventType')) || (data.peerconnection === undefined && (missing2 = 'peerconnection')) ) { - validate160.errors = [ + validate163.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema145.allOf[1].required, - parentSchema: schema145.allOf[1], + schema: schema148.allOf[1].required, + parentSchema: schema148.allOf[1], data, }, ]; @@ -108162,30 +108906,30 @@ function validate160( let data3 = data.eventType; const _errs13 = errors; if (typeof data3 !== 'string') { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema145.allOf[1].properties.eventType.type, - parentSchema: schema145.allOf[1].properties.eventType, + schema: schema148.allOf[1].properties.eventType.type, + parentSchema: schema148.allOf[1].properties.eventType, data: data3, }, ]; return false; } if (!(data3 === 'peerconnection-status-changed')) { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/enum', keyword: 'enum', - params: { allowedValues: schema145.allOf[1].properties.eventType.enum }, + params: { allowedValues: schema148.allOf[1].properties.eventType.enum }, message: 'must be equal to one of the allowed values', - schema: schema145.allOf[1].properties.eventType.enum, - parentSchema: schema145.allOf[1].properties.eventType, + schema: schema148.allOf[1].properties.eventType.enum, + parentSchema: schema148.allOf[1].properties.eventType, data: data3, }, ]; @@ -108204,7 +108948,7 @@ function validate160( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing3; if (data4.type === undefined && (missing3 = 'type')) { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -108213,9 +108957,9 @@ function validate160( params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", schema: - schema145.allOf[1].properties.peerconnection.allOf[0].required, + schema148.allOf[1].properties.peerconnection.allOf[0].required, parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[0], + schema148.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -108224,7 +108968,7 @@ function validate160( if (data4.type !== undefined) { let data5 = data4.type; if (typeof data5 !== 'string') { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -108233,10 +108977,10 @@ function validate160( params: { type: 'string' }, message: 'must be string', schema: - schema145.allOf[1].properties.peerconnection.allOf[0] + schema148.allOf[1].properties.peerconnection.allOf[0] .properties.type.type, parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[0] + schema148.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data5, }, @@ -108244,7 +108988,7 @@ function validate160( return false; } if (!(data5 === 'local' || data5 === 'webrtc')) { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -108252,15 +108996,15 @@ function validate160( keyword: 'enum', params: { allowedValues: - schema145.allOf[1].properties.peerconnection.allOf[0] + schema148.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema145.allOf[1].properties.peerconnection.allOf[0] + schema148.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[0] + schema148.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data5, }, @@ -108270,15 +109014,15 @@ function validate160( } } } else { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema145.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema145.allOf[1].properties.peerconnection.allOf[0], + schema: schema148.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema148.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -108292,7 +109036,7 @@ function validate160( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing4; if (data4.devices === undefined && (missing4 = 'devices')) { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -108301,10 +109045,10 @@ function validate160( params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'", schema: - schema145.allOf[1].properties.peerconnection.allOf[1] + schema148.allOf[1].properties.peerconnection.allOf[1] .required, parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[1], + schema148.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -108316,7 +109060,7 @@ function validate160( if (errors === _errs22) { if (Array.isArray(data6)) { if (data6.length > 2) { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -108326,7 +109070,7 @@ function validate160( message: 'must NOT have more than 2 items', schema: 2, parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[1] + schema148.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data6, }, @@ -108334,7 +109078,7 @@ function validate160( return false; } else { if (data6.length < 2) { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/peerconnection/devices', @@ -108345,7 +109089,7 @@ function validate160( message: 'must NOT have fewer than 2 items', schema: 2, parentSchema: - schema145.allOf[1].properties.peerconnection + schema148.allOf[1].properties.peerconnection .allOf[1].properties.devices, data: data6, }, @@ -108365,7 +109109,7 @@ function validate160( ) { let missing5; if (data7.url === undefined && (missing5 = 'url')) { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + @@ -108380,11 +109124,11 @@ function validate160( missing5 + "'", schema: - schema145.allOf[1].properties.peerconnection + schema148.allOf[1].properties.peerconnection .allOf[1].properties.devices.items .required, parentSchema: - schema145.allOf[1].properties.peerconnection + schema148.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data7, }, @@ -108398,7 +109142,7 @@ function validate160( if (errors === _errs26) { if (typeof data8 === 'string') { if (!formats0(data8)) { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + @@ -108415,7 +109159,7 @@ function validate160( '"', schema: 'uri', parentSchema: - schema145.allOf[1].properties + schema148.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -108425,7 +109169,7 @@ function validate160( return false; } } else { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + @@ -108438,12 +109182,12 @@ function validate160( params: { type: 'string' }, message: 'must be string', schema: - schema145.allOf[1].properties + schema148.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url.type, parentSchema: - schema145.allOf[1].properties + schema148.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -108499,7 +109243,7 @@ function validate160( (missing6 = 'remoteServiceId')) ) { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + @@ -108519,7 +109263,7 @@ function validate160( missing6 + "'", schema: - schema145.allOf[1] + schema148.allOf[1] .properties .peerconnection .allOf[1].properties @@ -108528,7 +109272,7 @@ function validate160( .properties.services .items.required, parentSchema: - schema145.allOf[1] + schema148.allOf[1] .properties .peerconnection .allOf[1].properties @@ -108559,7 +109303,7 @@ function validate160( if ( !formats0(data12) ) { - validate160.errors = + validate163.errors = [ { instancePath: @@ -108584,7 +109328,7 @@ function validate160( schema: 'uri', parentSchema: - schema145 + schema148 .allOf[1] .properties .peerconnection @@ -108605,7 +109349,7 @@ function validate160( return false; } } else { - validate160.errors = + validate163.errors = [ { instancePath: @@ -108625,7 +109369,7 @@ function validate160( message: 'must be string', schema: - schema145 + schema148 .allOf[1] .properties .peerconnection @@ -108642,7 +109386,7 @@ function validate160( .serviceType .type, parentSchema: - schema145 + schema148 .allOf[1] .properties .peerconnection @@ -108681,7 +109425,7 @@ function validate160( typeof data13 !== 'string' ) { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + @@ -108699,7 +109443,7 @@ function validate160( message: 'must be string', schema: - schema145 + schema148 .allOf[1] .properties .peerconnection @@ -108715,7 +109459,7 @@ function validate160( .serviceId .type, parentSchema: - schema145 + schema148 .allOf[1] .properties .peerconnection @@ -108752,7 +109496,7 @@ function validate160( typeof data14 !== 'string' ) { - validate160.errors = + validate163.errors = [ { instancePath: @@ -108772,7 +109516,7 @@ function validate160( message: 'must be string', schema: - schema145 + schema148 .allOf[1] .properties .peerconnection @@ -108789,7 +109533,7 @@ function validate160( .remoteServiceId .type, parentSchema: - schema145 + schema148 .allOf[1] .properties .peerconnection @@ -108818,7 +109562,7 @@ function validate160( } } } else { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + @@ -108834,7 +109578,7 @@ function validate160( }, message: 'must be object', schema: - schema145.allOf[1] + schema148.allOf[1] .properties .peerconnection .allOf[1].properties @@ -108843,7 +109587,7 @@ function validate160( .properties.services .items.type, parentSchema: - schema145.allOf[1] + schema148.allOf[1] .properties .peerconnection .allOf[1].properties @@ -108863,7 +109607,7 @@ function validate160( } } } else { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + @@ -108876,13 +109620,13 @@ function validate160( params: { type: 'array' }, message: 'must be array', schema: - schema145.allOf[1].properties + schema148.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config .properties.services.type, parentSchema: - schema145.allOf[1].properties + schema148.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config @@ -108895,7 +109639,7 @@ function validate160( } } } else { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + @@ -108908,12 +109652,12 @@ function validate160( params: { type: 'object' }, message: 'must be object', schema: - schema145.allOf[1].properties + schema148.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config.type, parentSchema: - schema145.allOf[1].properties + schema148.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config, @@ -108930,7 +109674,7 @@ function validate160( } } } else { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + @@ -108942,10 +109686,10 @@ function validate160( params: { type: 'object' }, message: 'must be object', schema: - schema145.allOf[1].properties.peerconnection + schema148.allOf[1].properties.peerconnection .allOf[1].properties.devices.items.type, parentSchema: - schema145.allOf[1].properties.peerconnection + schema148.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data7, }, @@ -108961,7 +109705,7 @@ function validate160( } } } else { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -108970,10 +109714,10 @@ function validate160( params: { type: 'array' }, message: 'must be array', schema: - schema145.allOf[1].properties.peerconnection.allOf[1] + schema148.allOf[1].properties.peerconnection.allOf[1] .properties.devices.type, parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[1] + schema148.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data6, }, @@ -108984,7 +109728,7 @@ function validate160( } } } else { - validate160.errors = [ + validate163.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', @@ -108992,9 +109736,9 @@ function validate160( params: { type: 'object' }, message: 'must be object', schema: - schema145.allOf[1].properties.peerconnection.allOf[1].type, + schema148.allOf[1].properties.peerconnection.allOf[1].type, parentSchema: - schema145.allOf[1].properties.peerconnection.allOf[1], + schema148.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -109010,15 +109754,15 @@ function validate160( } } } else { - validate160.errors = [ + validate163.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema145.allOf[1].type, - parentSchema: schema145.allOf[1], + schema: schema148.allOf[1].type, + parentSchema: schema148.allOf[1], data, }, ]; @@ -109027,11 +109771,11 @@ function validate160( } var valid0 = _errs11 === errors; } - validate160.errors = vErrors; + validate163.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionStatusChangedEventCallbackResponse = validate161; -const schema146 = { +exports.validatePeerconnectionStatusChangedEventCallbackResponse = validate164; +const schema149 = { title: 'Peerconnection Status Changed Event Callback', allOf: [ { @@ -109149,7 +109893,7 @@ const schema146 = { 'x-location': '#/components/schemas/peerconnection_status_changed_response', 'x-schema-type': 'response', }; -function validate161( +function validate164( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -109161,15 +109905,15 @@ function validate161( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.callbackType === undefined && (missing0 = 'callbackType')) { - validate161.errors = [ + validate164.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema146.allOf[0].allOf[0].required, - parentSchema: schema146.allOf[0].allOf[0], + schema: schema149.allOf[0].allOf[0].required, + parentSchema: schema149.allOf[0].allOf[0], data, }, ]; @@ -109178,15 +109922,15 @@ function validate161( if (data.callbackType !== undefined) { let data0 = data.callbackType; if (typeof data0 !== 'string') { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/0/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema146.allOf[0].allOf[0].properties.callbackType.type, - parentSchema: schema146.allOf[0].allOf[0].properties.callbackType, + schema: schema149.allOf[0].allOf[0].properties.callbackType.type, + parentSchema: schema149.allOf[0].allOf[0].properties.callbackType, data: data0, }, ]; @@ -109195,15 +109939,15 @@ function validate161( } } } else { - validate161.errors = [ + validate164.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema146.allOf[0].allOf[0].type, - parentSchema: schema146.allOf[0].allOf[0], + schema: schema149.allOf[0].allOf[0].type, + parentSchema: schema149.allOf[0].allOf[0], data, }, ]; @@ -109220,15 +109964,15 @@ function validate161( (data.callbackType === undefined && (missing1 = 'callbackType')) || (data.eventType === undefined && (missing1 = 'eventType')) ) { - validate161.errors = [ + validate164.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema146.allOf[0].allOf[1].required, - parentSchema: schema146.allOf[0].allOf[1], + schema: schema149.allOf[0].allOf[1].required, + parentSchema: schema149.allOf[0].allOf[1], data, }, ]; @@ -109238,33 +109982,33 @@ function validate161( let data1 = data.callbackType; const _errs7 = errors; if (typeof data1 !== 'string') { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema146.allOf[0].allOf[1].properties.callbackType.type, - parentSchema: schema146.allOf[0].allOf[1].properties.callbackType, + schema: schema149.allOf[0].allOf[1].properties.callbackType.type, + parentSchema: schema149.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; return false; } if (!(data1 === 'event')) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/callbackType', schemaPath: '#/allOf/0/allOf/1/properties/callbackType/enum', keyword: 'enum', params: { allowedValues: - schema146.allOf[0].allOf[1].properties.callbackType.enum, + schema149.allOf[0].allOf[1].properties.callbackType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema146.allOf[0].allOf[1].properties.callbackType.enum, - parentSchema: schema146.allOf[0].allOf[1].properties.callbackType, + schema: schema149.allOf[0].allOf[1].properties.callbackType.enum, + parentSchema: schema149.allOf[0].allOf[1].properties.callbackType, data: data1, }, ]; @@ -109279,15 +110023,15 @@ function validate161( let data2 = data.eventType; const _errs9 = errors; if (typeof data2 !== 'string') { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/0/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema146.allOf[0].allOf[1].properties.eventType.type, - parentSchema: schema146.allOf[0].allOf[1].properties.eventType, + schema: schema149.allOf[0].allOf[1].properties.eventType.type, + parentSchema: schema149.allOf[0].allOf[1].properties.eventType, data: data2, }, ]; @@ -109300,15 +110044,15 @@ function validate161( } } } else { - validate161.errors = [ + validate164.errors = [ { instancePath, schemaPath: '#/allOf/0/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema146.allOf[0].allOf[1].type, - parentSchema: schema146.allOf[0].allOf[1], + schema: schema149.allOf[0].allOf[1].type, + parentSchema: schema149.allOf[0].allOf[1], data, }, ]; @@ -109327,15 +110071,15 @@ function validate161( (data.eventType === undefined && (missing2 = 'eventType')) || (data.peerconnection === undefined && (missing2 = 'peerconnection')) ) { - validate161.errors = [ + validate164.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema146.allOf[1].required, - parentSchema: schema146.allOf[1], + schema: schema149.allOf[1].required, + parentSchema: schema149.allOf[1], data, }, ]; @@ -109345,30 +110089,30 @@ function validate161( let data3 = data.eventType; const _errs13 = errors; if (typeof data3 !== 'string') { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema146.allOf[1].properties.eventType.type, - parentSchema: schema146.allOf[1].properties.eventType, + schema: schema149.allOf[1].properties.eventType.type, + parentSchema: schema149.allOf[1].properties.eventType, data: data3, }, ]; return false; } if (!(data3 === 'peerconnection-status-changed')) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/eventType', schemaPath: '#/allOf/1/properties/eventType/enum', keyword: 'enum', - params: { allowedValues: schema146.allOf[1].properties.eventType.enum }, + params: { allowedValues: schema149.allOf[1].properties.eventType.enum }, message: 'must be equal to one of the allowed values', - schema: schema146.allOf[1].properties.eventType.enum, - parentSchema: schema146.allOf[1].properties.eventType, + schema: schema149.allOf[1].properties.eventType.enum, + parentSchema: schema149.allOf[1].properties.eventType, data: data3, }, ]; @@ -109391,7 +110135,7 @@ function validate161( (data4.type === undefined && (missing3 = 'type')) || (data4.status === undefined && (missing3 = 'status')) ) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -109400,9 +110144,9 @@ function validate161( params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", schema: - schema146.allOf[1].properties.peerconnection.allOf[0].required, + schema149.allOf[1].properties.peerconnection.allOf[0].required, parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0], + schema149.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -109415,7 +110159,7 @@ function validate161( if (errors === _errs18) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection/url', schemaPath: @@ -109425,7 +110169,7 @@ function validate161( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.url, data: data5, }, @@ -109433,7 +110177,7 @@ function validate161( return false; } } else { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection/url', schemaPath: @@ -109442,10 +110186,10 @@ function validate161( params: { type: 'string' }, message: 'must be string', schema: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.url.type, parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.url, data: data5, }, @@ -109463,7 +110207,7 @@ function validate161( let data6 = data4.type; const _errs20 = errors; if (typeof data6 !== 'string') { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -109472,10 +110216,10 @@ function validate161( params: { type: 'string' }, message: 'must be string', schema: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.type.type, parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data6, }, @@ -109483,7 +110227,7 @@ function validate161( return false; } if (!(data6 === 'local' || data6 === 'webrtc')) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection/type', schemaPath: @@ -109491,15 +110235,15 @@ function validate161( keyword: 'enum', params: { allowedValues: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, }, message: 'must be equal to one of the allowed values', schema: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.type.enum, parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.type, data: data6, }, @@ -109515,7 +110259,7 @@ function validate161( let data7 = data4.status; const _errs22 = errors; if (typeof data7 !== 'string') { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection/status', schemaPath: @@ -109524,10 +110268,10 @@ function validate161( params: { type: 'string' }, message: 'must be string', schema: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.status.type, parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.status, data: data7, }, @@ -109544,7 +110288,7 @@ function validate161( data7 === 'closed' ) ) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection/status', schemaPath: @@ -109552,15 +110296,15 @@ function validate161( keyword: 'enum', params: { allowedValues: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.status.enum, }, message: 'must be equal to one of the allowed values', schema: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.status.enum, parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[0] + schema149.allOf[1].properties.peerconnection.allOf[0] .properties.status, data: data7, }, @@ -109575,15 +110319,15 @@ function validate161( } } } else { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema146.allOf[1].properties.peerconnection.allOf[0].type, - parentSchema: schema146.allOf[1].properties.peerconnection.allOf[0], + schema: schema149.allOf[1].properties.peerconnection.allOf[0].type, + parentSchema: schema149.allOf[1].properties.peerconnection.allOf[0], data: data4, }, ]; @@ -109597,7 +110341,7 @@ function validate161( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing4; if (data4.devices === undefined && (missing4 = 'devices')) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: @@ -109606,10 +110350,10 @@ function validate161( params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'", schema: - schema146.allOf[1].properties.peerconnection.allOf[1] + schema149.allOf[1].properties.peerconnection.allOf[1] .required, parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[1], + schema149.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -109621,7 +110365,7 @@ function validate161( if (errors === _errs26) { if (Array.isArray(data8)) { if (data8.length > 2) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -109631,7 +110375,7 @@ function validate161( message: 'must NOT have more than 2 items', schema: 2, parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[1] + schema149.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data8, }, @@ -109639,7 +110383,7 @@ function validate161( return false; } else { if (data8.length < 2) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection/devices', @@ -109650,7 +110394,7 @@ function validate161( message: 'must NOT have fewer than 2 items', schema: 2, parentSchema: - schema146.allOf[1].properties.peerconnection + schema149.allOf[1].properties.peerconnection .allOf[1].properties.devices, data: data8, }, @@ -109670,7 +110414,7 @@ function validate161( ) { let missing5; if (data9.url === undefined && (missing5 = 'url')) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + @@ -109685,11 +110429,11 @@ function validate161( missing5 + "'", schema: - schema146.allOf[1].properties.peerconnection + schema149.allOf[1].properties.peerconnection .allOf[1].properties.devices.items .required, parentSchema: - schema146.allOf[1].properties.peerconnection + schema149.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data9, }, @@ -109703,7 +110447,7 @@ function validate161( if (errors === _errs30) { if (typeof data10 === 'string') { if (!formats0(data10)) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + @@ -109720,7 +110464,7 @@ function validate161( '"', schema: 'uri', parentSchema: - schema146.allOf[1].properties + schema149.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -109730,7 +110474,7 @@ function validate161( return false; } } else { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + @@ -109743,12 +110487,12 @@ function validate161( params: { type: 'string' }, message: 'must be string', schema: - schema146.allOf[1].properties + schema149.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url.type, parentSchema: - schema146.allOf[1].properties + schema149.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.url, @@ -109804,7 +110548,7 @@ function validate161( (missing6 = 'remoteServiceId')) ) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + @@ -109824,7 +110568,7 @@ function validate161( missing6 + "'", schema: - schema146.allOf[1] + schema149.allOf[1] .properties .peerconnection .allOf[1].properties @@ -109833,7 +110577,7 @@ function validate161( .properties.services .items.required, parentSchema: - schema146.allOf[1] + schema149.allOf[1] .properties .peerconnection .allOf[1].properties @@ -109864,7 +110608,7 @@ function validate161( if ( !formats0(data14) ) { - validate161.errors = + validate164.errors = [ { instancePath: @@ -109889,7 +110633,7 @@ function validate161( schema: 'uri', parentSchema: - schema146 + schema149 .allOf[1] .properties .peerconnection @@ -109910,7 +110654,7 @@ function validate161( return false; } } else { - validate161.errors = + validate164.errors = [ { instancePath: @@ -109930,7 +110674,7 @@ function validate161( message: 'must be string', schema: - schema146 + schema149 .allOf[1] .properties .peerconnection @@ -109947,7 +110691,7 @@ function validate161( .serviceType .type, parentSchema: - schema146 + schema149 .allOf[1] .properties .peerconnection @@ -109986,7 +110730,7 @@ function validate161( typeof data15 !== 'string' ) { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + @@ -110004,7 +110748,7 @@ function validate161( message: 'must be string', schema: - schema146 + schema149 .allOf[1] .properties .peerconnection @@ -110020,7 +110764,7 @@ function validate161( .serviceId .type, parentSchema: - schema146 + schema149 .allOf[1] .properties .peerconnection @@ -110057,7 +110801,7 @@ function validate161( typeof data16 !== 'string' ) { - validate161.errors = + validate164.errors = [ { instancePath: @@ -110077,7 +110821,7 @@ function validate161( message: 'must be string', schema: - schema146 + schema149 .allOf[1] .properties .peerconnection @@ -110094,7 +110838,7 @@ function validate161( .remoteServiceId .type, parentSchema: - schema146 + schema149 .allOf[1] .properties .peerconnection @@ -110123,7 +110867,7 @@ function validate161( } } } else { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + @@ -110139,7 +110883,7 @@ function validate161( }, message: 'must be object', schema: - schema146.allOf[1] + schema149.allOf[1] .properties .peerconnection .allOf[1].properties @@ -110148,7 +110892,7 @@ function validate161( .properties.services .items.type, parentSchema: - schema146.allOf[1] + schema149.allOf[1] .properties .peerconnection .allOf[1].properties @@ -110168,7 +110912,7 @@ function validate161( } } } else { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + @@ -110181,13 +110925,13 @@ function validate161( params: { type: 'array' }, message: 'must be array', schema: - schema146.allOf[1].properties + schema149.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config .properties.services.type, parentSchema: - schema146.allOf[1].properties + schema149.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config @@ -110200,7 +110944,7 @@ function validate161( } } } else { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + @@ -110213,12 +110957,12 @@ function validate161( params: { type: 'object' }, message: 'must be object', schema: - schema146.allOf[1].properties + schema149.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config.type, parentSchema: - schema146.allOf[1].properties + schema149.allOf[1].properties .peerconnection.allOf[1] .properties.devices.items .properties.config, @@ -110235,7 +110979,7 @@ function validate161( } } } else { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + @@ -110247,10 +110991,10 @@ function validate161( params: { type: 'object' }, message: 'must be object', schema: - schema146.allOf[1].properties.peerconnection + schema149.allOf[1].properties.peerconnection .allOf[1].properties.devices.items.type, parentSchema: - schema146.allOf[1].properties.peerconnection + schema149.allOf[1].properties.peerconnection .allOf[1].properties.devices.items, data: data9, }, @@ -110266,7 +111010,7 @@ function validate161( } } } else { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection/devices', schemaPath: @@ -110275,10 +111019,10 @@ function validate161( params: { type: 'array' }, message: 'must be array', schema: - schema146.allOf[1].properties.peerconnection.allOf[1] + schema149.allOf[1].properties.peerconnection.allOf[1] .properties.devices.type, parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[1] + schema149.allOf[1].properties.peerconnection.allOf[1] .properties.devices, data: data8, }, @@ -110289,7 +111033,7 @@ function validate161( } } } else { - validate161.errors = [ + validate164.errors = [ { instancePath: instancePath + '/peerconnection', schemaPath: '#/allOf/1/properties/peerconnection/allOf/1/type', @@ -110297,9 +111041,9 @@ function validate161( params: { type: 'object' }, message: 'must be object', schema: - schema146.allOf[1].properties.peerconnection.allOf[1].type, + schema149.allOf[1].properties.peerconnection.allOf[1].type, parentSchema: - schema146.allOf[1].properties.peerconnection.allOf[1], + schema149.allOf[1].properties.peerconnection.allOf[1], data: data4, }, ]; @@ -110315,15 +111059,15 @@ function validate161( } } } else { - validate161.errors = [ + validate164.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema146.allOf[1].type, - parentSchema: schema146.allOf[1], + schema: schema149.allOf[1].type, + parentSchema: schema149.allOf[1], data, }, ]; @@ -110332,11 +111076,11 @@ function validate161( } var valid0 = _errs11 === errors; } - validate161.errors = vErrors; + validate164.errors = vErrors; return errors === 0; } -exports.validateChangedUrlRequest = validate162; -const schema147 = { +exports.validateChangedUrlRequest = validate165; +const schema150 = { type: 'string', format: 'uri', 'x-standalone': false, @@ -110344,60 +111088,7 @@ const schema147 = { 'x-location': '#/components/parameters/device_changed_url/schema_request', 'x-schema-type': 'request', }; -function validate162( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats0(data)) { - validate162.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', - parentSchema: schema147, - data, - }, - ]; - return false; - } - } else { - validate162.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema147.type, - parentSchema: schema147, - data, - }, - ]; - return false; - } - } - } - validate162.errors = vErrors; - return errors === 0; -} -exports.validateChangedUrlResponse = validate163; -const schema148 = { - type: 'string', - format: 'uri', - 'x-standalone': false, - 'x-name': 'ChangedUrlResponse', - 'x-location': '#/components/parameters/device_changed_url/schema_response', - 'x-schema-type': 'response', -}; -function validate163( +function validate165( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -110407,7 +111098,7 @@ function validate163( if (errors === 0) { if (typeof data === 'string') { if (!formats0(data)) { - validate163.errors = [ + validate165.errors = [ { instancePath, schemaPath: '#/format', @@ -110415,112 +111106,6 @@ function validate163( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema148, - data, - }, - ]; - return false; - } - } else { - validate163.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema148.type, - parentSchema: schema148, - data, - }, - ]; - return false; - } - } - } - validate163.errors = vErrors; - return errors === 0; -} -exports.validateDeviceIdRequest = validate164; -const schema149 = { - type: 'string', - format: 'uuid', - 'x-standalone': false, - 'x-name': 'DeviceIdRequest', - 'x-location': '#/components/parameters/device_id/schema_request', - 'x-schema-type': 'request', -}; -function validate164( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats258.test(data)) { - validate164.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uuid' }, - message: 'must match format "' + 'uuid' + '"', - schema: 'uuid', - parentSchema: schema149, - data, - }, - ]; - return false; - } - } else { - validate164.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'string' }, - message: 'must be string', - schema: schema149.type, - parentSchema: schema149, - data, - }, - ]; - return false; - } - } - } - validate164.errors = vErrors; - return errors === 0; -} -exports.validateDeviceIdResponse = validate165; -const schema150 = { - type: 'string', - format: 'uuid', - 'x-standalone': false, - 'x-name': 'DeviceIdResponse', - 'x-location': '#/components/parameters/device_id/schema_response', - 'x-schema-type': 'response', -}; -function validate165( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (errors === 0) { - if (errors === 0) { - if (typeof data === 'string') { - if (!formats258.test(data)) { - validate165.errors = [ - { - instancePath, - schemaPath: '#/format', - keyword: 'format', - params: { format: 'uuid' }, - message: 'must match format "' + 'uuid' + '"', - schema: 'uuid', parentSchema: schema150, data, }, @@ -110547,82 +111132,16 @@ function validate165( validate165.errors = vErrors; return errors === 0; } -exports.validateFlatGroupRequest = validate166; +exports.validateChangedUrlResponse = validate166; const schema151 = { - type: 'boolean', - default: false, - 'x-standalone': false, - 'x-name': 'FlatGroupRequest', - 'x-location': '#/components/parameters/flat_group/schema_request', - 'x-schema-type': 'request', -}; -function validate166( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'boolean') { - validate166.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema151.type, - parentSchema: schema151, - data, - }, - ]; - return false; - } - validate166.errors = vErrors; - return errors === 0; -} -exports.validateFlatGroupResponse = validate167; -const schema152 = { - type: 'boolean', - default: false, - 'x-standalone': false, - 'x-name': 'FlatGroupResponse', - 'x-location': '#/components/parameters/flat_group/schema_response', - 'x-schema-type': 'response', -}; -function validate167( - data, - { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, -) { - let vErrors = null; - let errors = 0; - if (typeof data !== 'boolean') { - validate167.errors = [ - { - instancePath, - schemaPath: '#/type', - keyword: 'type', - params: { type: 'boolean' }, - message: 'must be boolean', - schema: schema152.type, - parentSchema: schema152, - data, - }, - ]; - return false; - } - validate167.errors = vErrors; - return errors === 0; -} -exports.validateStartTimeRequest = validate168; -const schema153 = { type: 'string', - format: 'date-time', + format: 'uri', 'x-standalone': false, - 'x-name': 'StartTimeRequest', - 'x-location': '#/components/parameters/start_time/schema_request', - 'x-schema-type': 'request', + 'x-name': 'ChangedUrlResponse', + 'x-location': '#/components/parameters/device_changed_url/schema_response', + 'x-schema-type': 'response', }; -function validate168( +function validate166( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -110631,31 +111150,31 @@ function validate168( if (errors === 0) { if (errors === 0) { if (typeof data === 'string') { - if (!formats22.validate(data)) { - validate168.errors = [ + if (!formats0(data)) { + validate166.errors = [ { instancePath, schemaPath: '#/format', keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema153, + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema151, data, }, ]; return false; } } else { - validate168.errors = [ + validate166.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema153.type, - parentSchema: schema153, + schema: schema151.type, + parentSchema: schema151, data, }, ]; @@ -110663,19 +111182,19 @@ function validate168( } } } - validate168.errors = vErrors; + validate166.errors = vErrors; return errors === 0; } -exports.validateStartTimeResponse = validate169; -const schema154 = { +exports.validateDeviceIdRequest = validate167; +const schema152 = { type: 'string', - format: 'date-time', + format: 'uuid', 'x-standalone': false, - 'x-name': 'StartTimeResponse', - 'x-location': '#/components/parameters/start_time/schema_response', - 'x-schema-type': 'response', + 'x-name': 'DeviceIdRequest', + 'x-location': '#/components/parameters/device_id/schema_request', + 'x-schema-type': 'request', }; -function validate169( +function validate167( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -110684,31 +111203,31 @@ function validate169( if (errors === 0) { if (errors === 0) { if (typeof data === 'string') { - if (!formats22.validate(data)) { - validate169.errors = [ + if (!formats258.test(data)) { + validate167.errors = [ { instancePath, schemaPath: '#/format', keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema154, + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema152, data, }, ]; return false; } } else { - validate169.errors = [ + validate167.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema154.type, - parentSchema: schema154, + schema: schema152.type, + parentSchema: schema152, data, }, ]; @@ -110716,19 +111235,19 @@ function validate169( } } } - validate169.errors = vErrors; + validate167.errors = vErrors; return errors === 0; } -exports.validateEndTimeRequest = validate170; -const schema155 = { +exports.validateDeviceIdResponse = validate168; +const schema153 = { type: 'string', - format: 'date-time', + format: 'uuid', 'x-standalone': false, - 'x-name': 'EndTimeRequest', - 'x-location': '#/components/parameters/end_time/schema_request', - 'x-schema-type': 'request', + 'x-name': 'DeviceIdResponse', + 'x-location': '#/components/parameters/device_id/schema_response', + 'x-schema-type': 'response', }; -function validate170( +function validate168( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -110737,31 +111256,31 @@ function validate170( if (errors === 0) { if (errors === 0) { if (typeof data === 'string') { - if (!formats22.validate(data)) { - validate170.errors = [ + if (!formats258.test(data)) { + validate168.errors = [ { instancePath, schemaPath: '#/format', keyword: 'format', - params: { format: 'date-time' }, - message: 'must match format "' + 'date-time' + '"', - schema: 'date-time', - parentSchema: schema155, + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema153, data, }, ]; return false; } } else { - validate170.errors = [ + validate168.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema155.type, - parentSchema: schema155, + schema: schema153.type, + parentSchema: schema153, data, }, ]; @@ -110769,17 +111288,83 @@ function validate170( } } } + validate168.errors = vErrors; + return errors === 0; +} +exports.validateFlatGroupRequest = validate169; +const schema154 = { + type: 'boolean', + default: false, + 'x-standalone': false, + 'x-name': 'FlatGroupRequest', + 'x-location': '#/components/parameters/flat_group/schema_request', + 'x-schema-type': 'request', +}; +function validate169( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'boolean') { + validate169.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema154.type, + parentSchema: schema154, + data, + }, + ]; + return false; + } + validate169.errors = vErrors; + return errors === 0; +} +exports.validateFlatGroupResponse = validate170; +const schema155 = { + type: 'boolean', + default: false, + 'x-standalone': false, + 'x-name': 'FlatGroupResponse', + 'x-location': '#/components/parameters/flat_group/schema_response', + 'x-schema-type': 'response', +}; +function validate170( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (typeof data !== 'boolean') { + validate170.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'boolean' }, + message: 'must be boolean', + schema: schema155.type, + parentSchema: schema155, + data, + }, + ]; + return false; + } validate170.errors = vErrors; return errors === 0; } -exports.validateEndTimeResponse = validate171; +exports.validateStartTimeRequest = validate171; const schema156 = { type: 'string', format: 'date-time', 'x-standalone': false, - 'x-name': 'EndTimeResponse', - 'x-location': '#/components/parameters/end_time/schema_response', - 'x-schema-type': 'response', + 'x-name': 'StartTimeRequest', + 'x-location': '#/components/parameters/start_time/schema_request', + 'x-schema-type': 'request', }; function validate171( data, @@ -110825,14 +111410,14 @@ function validate171( validate171.errors = vErrors; return errors === 0; } -exports.validateClosedUrlRequest = validate172; +exports.validateStartTimeResponse = validate172; const schema157 = { type: 'string', - format: 'uri', + format: 'date-time', 'x-standalone': false, - 'x-name': 'ClosedUrlRequest', - 'x-location': '#/components/parameters/closed_url/schema_request', - 'x-schema-type': 'request', + 'x-name': 'StartTimeResponse', + 'x-location': '#/components/parameters/start_time/schema_response', + 'x-schema-type': 'response', }; function validate172( data, @@ -110843,15 +111428,15 @@ function validate172( if (errors === 0) { if (errors === 0) { if (typeof data === 'string') { - if (!formats0(data)) { + if (!formats22.validate(data)) { validate172.errors = [ { instancePath, schemaPath: '#/format', keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', parentSchema: schema157, data, }, @@ -110878,14 +111463,14 @@ function validate172( validate172.errors = vErrors; return errors === 0; } -exports.validateClosedUrlResponse = validate173; +exports.validateEndTimeRequest = validate173; const schema158 = { type: 'string', - format: 'uri', + format: 'date-time', 'x-standalone': false, - 'x-name': 'ClosedUrlResponse', - 'x-location': '#/components/parameters/closed_url/schema_response', - 'x-schema-type': 'response', + 'x-name': 'EndTimeRequest', + 'x-location': '#/components/parameters/end_time/schema_request', + 'x-schema-type': 'request', }; function validate173( data, @@ -110896,15 +111481,15 @@ function validate173( if (errors === 0) { if (errors === 0) { if (typeof data === 'string') { - if (!formats0(data)) { + if (!formats22.validate(data)) { validate173.errors = [ { instancePath, schemaPath: '#/format', keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', parentSchema: schema158, data, }, @@ -110931,14 +111516,14 @@ function validate173( validate173.errors = vErrors; return errors === 0; } -exports.validateStatusChangedUrlRequest = validate174; +exports.validateEndTimeResponse = validate174; const schema159 = { type: 'string', - format: 'uri', + format: 'date-time', 'x-standalone': false, - 'x-name': 'StatusChangedUrlRequest', - 'x-location': '#/components/parameters/status_changed_url/schema_request', - 'x-schema-type': 'request', + 'x-name': 'EndTimeResponse', + 'x-location': '#/components/parameters/end_time/schema_response', + 'x-schema-type': 'response', }; function validate174( data, @@ -110949,15 +111534,15 @@ function validate174( if (errors === 0) { if (errors === 0) { if (typeof data === 'string') { - if (!formats0(data)) { + if (!formats22.validate(data)) { validate174.errors = [ { instancePath, schemaPath: '#/format', keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', + params: { format: 'date-time' }, + message: 'must match format "' + 'date-time' + '"', + schema: 'date-time', parentSchema: schema159, data, }, @@ -110984,14 +111569,14 @@ function validate174( validate174.errors = vErrors; return errors === 0; } -exports.validateStatusChangedUrlResponse = validate175; +exports.validateClosedUrlRequest = validate175; const schema160 = { type: 'string', format: 'uri', 'x-standalone': false, - 'x-name': 'StatusChangedUrlResponse', - 'x-location': '#/components/parameters/status_changed_url/schema_response', - 'x-schema-type': 'response', + 'x-name': 'ClosedUrlRequest', + 'x-location': '#/components/parameters/closed_url/schema_request', + 'x-schema-type': 'request', }; function validate175( data, @@ -111037,14 +111622,14 @@ function validate175( validate175.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionIdRequest = validate176; +exports.validateClosedUrlResponse = validate176; const schema161 = { type: 'string', - format: 'uuid', + format: 'uri', 'x-standalone': false, - 'x-name': 'PeerconnectionIdRequest', - 'x-location': '#/components/parameters/peerconnection_id/schema_request', - 'x-schema-type': 'request', + 'x-name': 'ClosedUrlResponse', + 'x-location': '#/components/parameters/closed_url/schema_response', + 'x-schema-type': 'response', }; function validate176( data, @@ -111055,15 +111640,15 @@ function validate176( if (errors === 0) { if (errors === 0) { if (typeof data === 'string') { - if (!formats258.test(data)) { + if (!formats0(data)) { validate176.errors = [ { instancePath, schemaPath: '#/format', keyword: 'format', - params: { format: 'uuid' }, - message: 'must match format "' + 'uuid' + '"', - schema: 'uuid', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', parentSchema: schema161, data, }, @@ -111090,14 +111675,14 @@ function validate176( validate176.errors = vErrors; return errors === 0; } -exports.validatePeerconnectionIdResponse = validate177; +exports.validateStatusChangedUrlRequest = validate177; const schema162 = { type: 'string', - format: 'uuid', + format: 'uri', 'x-standalone': false, - 'x-name': 'PeerconnectionIdResponse', - 'x-location': '#/components/parameters/peerconnection_id/schema_response', - 'x-schema-type': 'response', + 'x-name': 'StatusChangedUrlRequest', + 'x-location': '#/components/parameters/status_changed_url/schema_request', + 'x-schema-type': 'request', }; function validate177( data, @@ -111108,15 +111693,15 @@ function validate177( if (errors === 0) { if (errors === 0) { if (typeof data === 'string') { - if (!formats258.test(data)) { + if (!formats0(data)) { validate177.errors = [ { instancePath, schemaPath: '#/format', keyword: 'format', - params: { format: 'uuid' }, - message: 'must match format "' + 'uuid' + '"', - schema: 'uuid', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', parentSchema: schema162, data, }, @@ -111143,14 +111728,14 @@ function validate177( validate177.errors = vErrors; return errors === 0; } -exports.validateDeviceUrlRequest = validate178; +exports.validateStatusChangedUrlResponse = validate178; const schema163 = { type: 'string', format: 'uri', 'x-standalone': false, - 'x-name': 'DeviceUrlRequest', - 'x-location': '#/components/parameters/device_url/schema_request', - 'x-schema-type': 'request', + 'x-name': 'StatusChangedUrlResponse', + 'x-location': '#/components/parameters/status_changed_url/schema_response', + 'x-schema-type': 'response', }; function validate178( data, @@ -111196,14 +111781,14 @@ function validate178( validate178.errors = vErrors; return errors === 0; } -exports.validateDeviceUrlResponse = validate179; +exports.validatePeerconnectionIdRequest = validate179; const schema164 = { type: 'string', - format: 'uri', + format: 'uuid', 'x-standalone': false, - 'x-name': 'DeviceUrlResponse', - 'x-location': '#/components/parameters/device_url/schema_response', - 'x-schema-type': 'response', + 'x-name': 'PeerconnectionIdRequest', + 'x-location': '#/components/parameters/peerconnection_id/schema_request', + 'x-schema-type': 'request', }; function validate179( data, @@ -111214,15 +111799,15 @@ function validate179( if (errors === 0) { if (errors === 0) { if (typeof data === 'string') { - if (!formats0(data)) { + if (!formats258.test(data)) { validate179.errors = [ { instancePath, schemaPath: '#/format', keyword: 'format', - params: { format: 'uri' }, - message: 'must match format "' + 'uri' + '"', - schema: 'uri', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', parentSchema: schema164, data, }, @@ -111249,8 +111834,167 @@ function validate179( validate179.errors = vErrors; return errors === 0; } -exports.validateListDevicesResponse200Request = validate180; +exports.validatePeerconnectionIdResponse = validate180; const schema165 = { + type: 'string', + format: 'uuid', + 'x-standalone': false, + 'x-name': 'PeerconnectionIdResponse', + 'x-location': '#/components/parameters/peerconnection_id/schema_response', + 'x-schema-type': 'response', +}; +function validate180( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats258.test(data)) { + validate180.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uuid' }, + message: 'must match format "' + 'uuid' + '"', + schema: 'uuid', + parentSchema: schema165, + data, + }, + ]; + return false; + } + } else { + validate180.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema165.type, + parentSchema: schema165, + data, + }, + ]; + return false; + } + } + } + validate180.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUrlRequest = validate181; +const schema166 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'DeviceUrlRequest', + 'x-location': '#/components/parameters/device_url/schema_request', + 'x-schema-type': 'request', +}; +function validate181( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate181.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema166, + data, + }, + ]; + return false; + } + } else { + validate181.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema166.type, + parentSchema: schema166, + data, + }, + ]; + return false; + } + } + } + validate181.errors = vErrors; + return errors === 0; +} +exports.validateDeviceUrlResponse = validate182; +const schema167 = { + type: 'string', + format: 'uri', + 'x-standalone': false, + 'x-name': 'DeviceUrlResponse', + 'x-location': '#/components/parameters/device_url/schema_response', + 'x-schema-type': 'response', +}; +function validate182( + data, + { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (errors === 0) { + if (typeof data === 'string') { + if (!formats0(data)) { + validate182.errors = [ + { + instancePath, + schemaPath: '#/format', + keyword: 'format', + params: { format: 'uri' }, + message: 'must match format "' + 'uri' + '"', + schema: 'uri', + parentSchema: schema167, + data, + }, + ]; + return false; + } + } else { + validate182.errors = [ + { + instancePath, + schemaPath: '#/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema167.type, + parentSchema: schema167, + data, + }, + ]; + return false; + } + } + } + validate182.errors = vErrors; + return errors === 0; +} +exports.validateListDevicesResponse200Request = validate183; +const schema168 = { type: 'array', items: { title: 'Device Overview', @@ -111304,7 +112048,7 @@ const schema165 = { '#/paths//devices/get/responses/200/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate180( +function validate183( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -111325,15 +112069,15 @@ function validate180( (data0.name === undefined && (missing0 = 'name')) || (data0.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema165.items.required, - parentSchema: schema165.items, + schema: schema168.items.required, + parentSchema: schema168.items, data: data0, }, ]; @@ -111343,15 +112087,15 @@ function validate180( let data1 = data0.name; const _errs3 = errors; if (typeof data1 !== 'string') { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0 + '/name', schemaPath: '#/items/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema165.items.properties.name.type, - parentSchema: schema165.items.properties.name, + schema: schema168.items.properties.name.type, + parentSchema: schema168.items.properties.name, data: data1, }, ]; @@ -111366,15 +112110,15 @@ function validate180( let data2 = data0.description; const _errs5 = errors; if (typeof data2 !== 'string') { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0 + '/description', schemaPath: '#/items/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema165.items.properties.description.type, - parentSchema: schema165.items.properties.description, + schema: schema168.items.properties.description.type, + parentSchema: schema168.items.properties.description, data: data2, }, ]; @@ -111389,15 +112133,15 @@ function validate180( let data3 = data0.type; const _errs7 = errors; if (typeof data3 !== 'string') { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema165.items.properties.type.type, - parentSchema: schema165.items.properties.type, + schema: schema168.items.properties.type.type, + parentSchema: schema168.items.properties.type, data: data3, }, ]; @@ -111411,15 +112155,15 @@ function validate180( data3 === 'cloud instantiable' ) ) { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema165.items.properties.type.enum }, + params: { allowedValues: schema168.items.properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema165.items.properties.type.enum, - parentSchema: schema165.items.properties.type, + schema: schema168.items.properties.type.enum, + parentSchema: schema168.items.properties.type, data: data3, }, ]; @@ -111434,15 +112178,15 @@ function validate180( let data4 = data0.isPublic; const _errs9 = errors; if (typeof data4 !== 'boolean') { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0 + '/isPublic', schemaPath: '#/items/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema165.items.properties.isPublic.type, - parentSchema: schema165.items.properties.isPublic, + schema: schema168.items.properties.isPublic.type, + parentSchema: schema168.items.properties.isPublic, data: data4, }, ]; @@ -111471,7 +112215,7 @@ function validate180( ) { let missing1; if (data6.url === undefined && (missing1 = 'url')) { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0 + '/viewer/' + i1, @@ -111484,10 +112228,10 @@ function validate180( missing1 + "'", schema: - schema165.items.properties.viewer.items + schema168.items.properties.viewer.items .required, parentSchema: - schema165.items.properties.viewer.items, + schema168.items.properties.viewer.items, data: data6, }, ]; @@ -111500,7 +112244,7 @@ function validate180( if (errors === _errs15) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + @@ -111517,7 +112261,7 @@ function validate180( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema165.items.properties.viewer + schema168.items.properties.viewer .items.properties.url, data: data7, }, @@ -111525,7 +112269,7 @@ function validate180( return false; } } else { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + @@ -111540,10 +112284,10 @@ function validate180( params: { type: 'string' }, message: 'must be string', schema: - schema165.items.properties.viewer.items + schema168.items.properties.viewer.items .properties.url.type, parentSchema: - schema165.items.properties.viewer.items + schema168.items.properties.viewer.items .properties.url, data: data7, }, @@ -111555,7 +112299,7 @@ function validate180( } } } else { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0 + '/viewer/' + i1, @@ -111564,9 +112308,9 @@ function validate180( params: { type: 'object' }, message: 'must be object', schema: - schema165.items.properties.viewer.items.type, + schema168.items.properties.viewer.items.type, parentSchema: - schema165.items.properties.viewer.items, + schema168.items.properties.viewer.items, data: data6, }, ]; @@ -111579,15 +112323,15 @@ function validate180( } } } else { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0 + '/viewer', schemaPath: '#/items/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema165.items.properties.viewer.type, - parentSchema: schema165.items.properties.viewer, + schema: schema168.items.properties.viewer.type, + parentSchema: schema168.items.properties.viewer, data: data5, }, ]; @@ -111617,7 +112361,7 @@ function validate180( ) { let missing2; if (data9.url === undefined && (missing2 = 'url')) { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0 + '/owner/' + i2, @@ -111630,10 +112374,10 @@ function validate180( missing2 + "'", schema: - schema165.items.properties.owner.items + schema168.items.properties.owner.items .required, parentSchema: - schema165.items.properties.owner.items, + schema168.items.properties.owner.items, data: data9, }, ]; @@ -111646,7 +112390,7 @@ function validate180( if (errors === _errs21) { if (typeof data10 === 'string') { if (!formats0(data10)) { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + @@ -111663,7 +112407,7 @@ function validate180( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema165.items.properties.owner + schema168.items.properties.owner .items.properties.url, data: data10, }, @@ -111671,7 +112415,7 @@ function validate180( return false; } } else { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + @@ -111686,10 +112430,10 @@ function validate180( params: { type: 'string' }, message: 'must be string', schema: - schema165.items.properties.owner.items + schema168.items.properties.owner.items .properties.url.type, parentSchema: - schema165.items.properties.owner.items + schema168.items.properties.owner.items .properties.url, data: data10, }, @@ -111701,7 +112445,7 @@ function validate180( } } } else { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0 + '/owner/' + i2, @@ -111710,9 +112454,9 @@ function validate180( params: { type: 'object' }, message: 'must be object', schema: - schema165.items.properties.owner.items.type, + schema168.items.properties.owner.items.type, parentSchema: - schema165.items.properties.owner.items, + schema168.items.properties.owner.items, data: data9, }, ]; @@ -111725,15 +112469,15 @@ function validate180( } } } else { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0 + '/owner', schemaPath: '#/items/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema165.items.properties.owner.type, - parentSchema: schema165.items.properties.owner, + schema: schema168.items.properties.owner.type, + parentSchema: schema168.items.properties.owner, data: data8, }, ]; @@ -111751,15 +112495,15 @@ function validate180( } } } else { - validate180.errors = [ + validate183.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema165.items.type, - parentSchema: schema165.items, + schema: schema168.items.type, + parentSchema: schema168.items, data: data0, }, ]; @@ -111772,26 +112516,26 @@ function validate180( } } } else { - validate180.errors = [ + validate183.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema165.type, - parentSchema: schema165, + schema: schema168.type, + parentSchema: schema168, data, }, ]; return false; } } - validate180.errors = vErrors; + validate183.errors = vErrors; return errors === 0; } -exports.validateListDevicesResponse200Response = validate181; -const schema166 = { +exports.validateListDevicesResponse200Response = validate184; +const schema169 = { type: 'array', items: { title: 'Device Overview', @@ -111851,7 +112595,7 @@ const schema166 = { '#/paths//devices/get/responses/200/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate181( +function validate184( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -111873,15 +112617,15 @@ function validate181( (data0.name === undefined && (missing0 = 'name')) || (data0.isPublic === undefined && (missing0 = 'isPublic')) ) { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema166.items.required, - parentSchema: schema166.items, + schema: schema169.items.required, + parentSchema: schema169.items, data: data0, }, ]; @@ -111894,7 +112638,7 @@ function validate181( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats0(data1)) { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/url', schemaPath: '#/items/properties/url/format', @@ -111902,22 +112646,22 @@ function validate181( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema166.items.properties.url, + parentSchema: schema169.items.properties.url, data: data1, }, ]; return false; } } else { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/url', schemaPath: '#/items/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema166.items.properties.url.type, - parentSchema: schema166.items.properties.url, + schema: schema169.items.properties.url.type, + parentSchema: schema169.items.properties.url, data: data1, }, ]; @@ -111934,15 +112678,15 @@ function validate181( let data2 = data0.name; const _errs5 = errors; if (typeof data2 !== 'string') { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/name', schemaPath: '#/items/properties/name/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema166.items.properties.name.type, - parentSchema: schema166.items.properties.name, + schema: schema169.items.properties.name.type, + parentSchema: schema169.items.properties.name, data: data2, }, ]; @@ -111957,15 +112701,15 @@ function validate181( let data3 = data0.description; const _errs7 = errors; if (typeof data3 !== 'string') { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/description', schemaPath: '#/items/properties/description/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema166.items.properties.description.type, - parentSchema: schema166.items.properties.description, + schema: schema169.items.properties.description.type, + parentSchema: schema169.items.properties.description, data: data3, }, ]; @@ -111980,15 +112724,15 @@ function validate181( let data4 = data0.type; const _errs9 = errors; if (typeof data4 !== 'string') { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema166.items.properties.type.type, - parentSchema: schema166.items.properties.type, + schema: schema169.items.properties.type.type, + parentSchema: schema169.items.properties.type, data: data4, }, ]; @@ -112002,17 +112746,17 @@ function validate181( data4 === 'cloud instantiable' ) ) { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema166.items.properties.type.enum, + allowedValues: schema169.items.properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema166.items.properties.type.enum, - parentSchema: schema166.items.properties.type, + schema: schema169.items.properties.type.enum, + parentSchema: schema169.items.properties.type, data: data4, }, ]; @@ -112027,15 +112771,15 @@ function validate181( let data5 = data0.isPublic; const _errs11 = errors; if (typeof data5 !== 'boolean') { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/isPublic', schemaPath: '#/items/properties/isPublic/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema166.items.properties.isPublic.type, - parentSchema: schema166.items.properties.isPublic, + schema: schema169.items.properties.isPublic.type, + parentSchema: schema169.items.properties.isPublic, data: data5, }, ]; @@ -112064,7 +112808,7 @@ function validate181( ) { let missing1; if (data7.url === undefined && (missing1 = 'url')) { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/viewer/' + i1, @@ -112077,10 +112821,10 @@ function validate181( missing1 + "'", schema: - schema166.items.properties.viewer.items + schema169.items.properties.viewer.items .required, parentSchema: - schema166.items.properties.viewer.items, + schema169.items.properties.viewer.items, data: data7, }, ]; @@ -112093,7 +112837,7 @@ function validate181( if (errors === _errs17) { if (typeof data8 === 'string') { if (!formats0(data8)) { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + @@ -112110,7 +112854,7 @@ function validate181( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema166.items.properties.viewer + schema169.items.properties.viewer .items.properties.url, data: data8, }, @@ -112118,7 +112862,7 @@ function validate181( return false; } } else { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + @@ -112133,10 +112877,10 @@ function validate181( params: { type: 'string' }, message: 'must be string', schema: - schema166.items.properties.viewer + schema169.items.properties.viewer .items.properties.url.type, parentSchema: - schema166.items.properties.viewer + schema169.items.properties.viewer .items.properties.url, data: data8, }, @@ -112148,7 +112892,7 @@ function validate181( } } } else { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/viewer/' + i1, @@ -112158,9 +112902,9 @@ function validate181( params: { type: 'object' }, message: 'must be object', schema: - schema166.items.properties.viewer.items.type, + schema169.items.properties.viewer.items.type, parentSchema: - schema166.items.properties.viewer.items, + schema169.items.properties.viewer.items, data: data7, }, ]; @@ -112173,15 +112917,15 @@ function validate181( } } } else { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/viewer', schemaPath: '#/items/properties/viewer/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema166.items.properties.viewer.type, - parentSchema: schema166.items.properties.viewer, + schema: schema169.items.properties.viewer.type, + parentSchema: schema169.items.properties.viewer, data: data6, }, ]; @@ -112214,7 +112958,7 @@ function validate181( data10.url === undefined && (missing2 = 'url') ) { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/owner/' + i2, @@ -112227,10 +112971,10 @@ function validate181( missing2 + "'", schema: - schema166.items.properties.owner.items + schema169.items.properties.owner.items .required, parentSchema: - schema166.items.properties.owner.items, + schema169.items.properties.owner.items, data: data10, }, ]; @@ -112243,7 +112987,7 @@ function validate181( if (errors === _errs23) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + @@ -112262,7 +113006,7 @@ function validate181( '"', schema: 'uri', parentSchema: - schema166.items.properties.owner + schema169.items.properties.owner .items.properties.url, data: data11, }, @@ -112270,7 +113014,7 @@ function validate181( return false; } } else { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + @@ -112285,10 +113029,10 @@ function validate181( params: { type: 'string' }, message: 'must be string', schema: - schema166.items.properties.owner + schema169.items.properties.owner .items.properties.url.type, parentSchema: - schema166.items.properties.owner + schema169.items.properties.owner .items.properties.url, data: data11, }, @@ -112300,7 +113044,7 @@ function validate181( } } } else { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/owner/' + i2, @@ -112310,9 +113054,9 @@ function validate181( params: { type: 'object' }, message: 'must be object', schema: - schema166.items.properties.owner.items.type, + schema169.items.properties.owner.items.type, parentSchema: - schema166.items.properties.owner.items, + schema169.items.properties.owner.items, data: data10, }, ]; @@ -112325,15 +113069,15 @@ function validate181( } } } else { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0 + '/owner', schemaPath: '#/items/properties/owner/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema166.items.properties.owner.type, - parentSchema: schema166.items.properties.owner, + schema: schema169.items.properties.owner.type, + parentSchema: schema169.items.properties.owner, data: data9, }, ]; @@ -112352,15 +113096,15 @@ function validate181( } } } else { - validate181.errors = [ + validate184.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema166.items.type, - parentSchema: schema166.items, + schema: schema169.items.type, + parentSchema: schema169.items, data: data0, }, ]; @@ -112373,26 +113117,26 @@ function validate181( } } } else { - validate181.errors = [ + validate184.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema166.type, - parentSchema: schema166, + schema: schema169.type, + parentSchema: schema169, data, }, ]; return false; } } - validate181.errors = vErrors; + validate184.errors = vErrors; return errors === 0; } -exports.validateCreateDeviceBodyRequest = validate182; -const schema167 = { +exports.validateCreateDeviceBodyRequest = validate185; +const schema170 = { title: 'Device', anyOf: [ { @@ -112702,7 +113446,7 @@ const schema167 = { '#/paths//devices/post/requestBody/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate182( +function validate185( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -112726,8 +113470,8 @@ function validate182( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema167.anyOf[0].allOf[0].required, - parentSchema: schema167.anyOf[0].allOf[0], + schema: schema170.anyOf[0].allOf[0].required, + parentSchema: schema170.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -112747,8 +113491,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.name, + schema: schema170.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.name, data: data0, }; if (vErrors === null) { @@ -112773,8 +113517,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.description, + schema: schema170.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.description, data: data1, }; if (vErrors === null) { @@ -112799,8 +113543,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.type, + schema: schema170.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -112823,11 +113567,11 @@ function validate182( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema167.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema170.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema167.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema167.anyOf[0].allOf[0].properties.type, + schema: schema170.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -112852,8 +113596,8 @@ function validate182( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema167.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.isPublic, + schema: schema170.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.isPublic, data: data3, }; if (vErrors === null) { @@ -112894,10 +113638,10 @@ function validate182( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", schema: - schema167.anyOf[0].allOf[0].properties.viewer.items + schema170.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema167.anyOf[0].allOf[0].properties.viewer.items, + schema170.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -112924,7 +113668,7 @@ function validate182( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[0].allOf[0].properties.viewer + schema170.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -112945,10 +113689,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[0].allOf[0].properties.viewer + schema170.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema167.anyOf[0].allOf[0].properties.viewer + schema170.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -112972,9 +113716,9 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[0].allOf[0].properties.viewer.items.type, + schema170.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema167.anyOf[0].allOf[0].properties.viewer.items, + schema170.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -112997,8 +113741,8 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.viewer, + schema: schema170.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.viewer, data: data4, }; if (vErrors === null) { @@ -113041,10 +113785,10 @@ function validate182( message: "must have required property '" + missing2 + "'", schema: - schema167.anyOf[0].allOf[0].properties.owner.items + schema170.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema167.anyOf[0].allOf[0].properties.owner.items, + schema170.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -113071,7 +113815,7 @@ function validate182( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[0].allOf[0].properties.owner + schema170.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -113092,10 +113836,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[0].allOf[0].properties.owner + schema170.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema167.anyOf[0].allOf[0].properties.owner + schema170.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -113119,9 +113863,9 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[0].allOf[0].properties.owner.items.type, + schema170.anyOf[0].allOf[0].properties.owner.items.type, parentSchema: - schema167.anyOf[0].allOf[0].properties.owner.items, + schema170.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -113144,8 +113888,8 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema167.anyOf[0].allOf[0].properties.owner, + schema: schema170.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema170.anyOf[0].allOf[0].properties.owner, data: data7, }; if (vErrors === null) { @@ -113173,8 +113917,8 @@ function validate182( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema167.anyOf[0].allOf[0].type, - parentSchema: schema167.anyOf[0].allOf[0], + schema: schema170.anyOf[0].allOf[0].type, + parentSchema: schema170.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -113201,7 +113945,7 @@ function validate182( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema167.anyOf[0].allOf[1].properties.type, + parentSchema: schema170.anyOf[0].allOf[1].properties.type, data: data10, }; if (vErrors === null) { @@ -113230,7 +113974,7 @@ function validate182( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema167.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema170.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -113247,8 +113991,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema167.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema170.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema170.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -113294,7 +114038,7 @@ function validate182( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[0].allOf[1].properties.services + schema170.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data14, }; @@ -113315,10 +114059,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[0].allOf[1].properties.services.items + schema170.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema167.anyOf[0].allOf[1].properties.services.items + schema170.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -113349,10 +114093,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[0].allOf[1].properties.services.items + schema170.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema167.anyOf[0].allOf[1].properties.services.items + schema170.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data15, }; @@ -113384,10 +114128,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[0].allOf[1].properties.services.items + schema170.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema167.anyOf[0].allOf[1].properties.services.items + schema170.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -113416,15 +114160,15 @@ function validate182( keyword: 'enum', params: { allowedValues: - schema167.anyOf[0].allOf[1].properties.services + schema170.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema167.anyOf[0].allOf[1].properties.services.items + schema170.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema167.anyOf[0].allOf[1].properties.services.items + schema170.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -113449,9 +114193,9 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[0].allOf[1].properties.services.items.type, + schema170.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema167.anyOf[0].allOf[1].properties.services.items, + schema170.anyOf[0].allOf[1].properties.services.items, data: data13, }; if (vErrors === null) { @@ -113474,8 +114218,8 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema167.anyOf[0].allOf[1].properties.services, + schema: schema170.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema170.anyOf[0].allOf[1].properties.services, data: data12, }; if (vErrors === null) { @@ -113499,8 +114243,8 @@ function validate182( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema167.anyOf[0].allOf[1].type, - parentSchema: schema167.anyOf[0].allOf[1], + schema: schema170.anyOf[0].allOf[1].type, + parentSchema: schema170.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -113532,8 +114276,8 @@ function validate182( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema167.anyOf[1].allOf[0].required, - parentSchema: schema167.anyOf[1].allOf[0], + schema: schema170.anyOf[1].allOf[0].required, + parentSchema: schema170.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -113553,8 +114297,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.name, + schema: schema170.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.name, data: data17, }; if (vErrors === null) { @@ -113579,8 +114323,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.description, + schema: schema170.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.description, data: data18, }; if (vErrors === null) { @@ -113605,8 +114349,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.type, + schema: schema170.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -113629,11 +114373,11 @@ function validate182( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema167.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema170.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema167.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema167.anyOf[1].allOf[0].properties.type, + schema: schema170.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -113658,8 +114402,8 @@ function validate182( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema167.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.isPublic, + schema: schema170.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.isPublic, data: data20, }; if (vErrors === null) { @@ -113701,10 +114445,10 @@ function validate182( message: "must have required property '" + missing4 + "'", schema: - schema167.anyOf[1].allOf[0].properties.viewer.items + schema170.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema167.anyOf[1].allOf[0].properties.viewer.items, + schema170.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -113731,7 +114475,7 @@ function validate182( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[1].allOf[0].properties + schema170.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data23, }; @@ -113752,10 +114496,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[1].allOf[0].properties.viewer + schema170.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema167.anyOf[1].allOf[0].properties.viewer + schema170.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -113779,10 +114523,10 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[1].allOf[0].properties.viewer.items + schema170.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema167.anyOf[1].allOf[0].properties.viewer.items, + schema170.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -113805,8 +114549,8 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.viewer, + schema: schema170.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.viewer, data: data21, }; if (vErrors === null) { @@ -113849,10 +114593,10 @@ function validate182( message: "must have required property '" + missing5 + "'", schema: - schema167.anyOf[1].allOf[0].properties.owner.items + schema170.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema167.anyOf[1].allOf[0].properties.owner.items, + schema170.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -113880,7 +114624,7 @@ function validate182( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[1].allOf[0].properties + schema170.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data26, }; @@ -113901,10 +114645,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[1].allOf[0].properties.owner + schema170.anyOf[1].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema167.anyOf[1].allOf[0].properties.owner + schema170.anyOf[1].allOf[0].properties.owner .items.properties.url, data: data26, }; @@ -113928,10 +114672,10 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[1].allOf[0].properties.owner.items + schema170.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema167.anyOf[1].allOf[0].properties.owner.items, + schema170.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -113954,8 +114698,8 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema167.anyOf[1].allOf[0].properties.owner, + schema: schema170.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema170.anyOf[1].allOf[0].properties.owner, data: data24, }; if (vErrors === null) { @@ -113983,8 +114727,8 @@ function validate182( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema167.anyOf[1].allOf[0].type, - parentSchema: schema167.anyOf[1].allOf[0], + schema: schema170.anyOf[1].allOf[0].type, + parentSchema: schema170.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -114011,7 +114755,7 @@ function validate182( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema167.anyOf[1].allOf[1].properties.type, + parentSchema: schema170.anyOf[1].allOf[1].properties.type, data: data27, }; if (vErrors === null) { @@ -114040,7 +114784,7 @@ function validate182( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema167.anyOf[1].allOf[1].properties.experiment, + parentSchema: schema170.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -114057,8 +114801,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema167.anyOf[1].allOf[1].properties.experiment, + schema: schema170.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema170.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -114108,7 +114852,7 @@ function validate182( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[1].allOf[1].properties.services + schema170.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -114129,10 +114873,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[1].allOf[1].properties.services + schema170.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema167.anyOf[1].allOf[1].properties.services + schema170.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -114163,10 +114907,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[1].allOf[1].properties.services.items + schema170.anyOf[1].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema167.anyOf[1].allOf[1].properties.services.items + schema170.anyOf[1].allOf[1].properties.services.items .properties.serviceId, data: data32, }; @@ -114198,10 +114942,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[1].allOf[1].properties.services + schema170.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema167.anyOf[1].allOf[1].properties.services + schema170.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -114230,15 +114974,15 @@ function validate182( keyword: 'enum', params: { allowedValues: - schema167.anyOf[1].allOf[1].properties.services + schema170.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema167.anyOf[1].allOf[1].properties.services + schema170.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema167.anyOf[1].allOf[1].properties.services + schema170.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -114264,9 +115008,9 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[1].allOf[1].properties.services.items.type, + schema170.anyOf[1].allOf[1].properties.services.items.type, parentSchema: - schema167.anyOf[1].allOf[1].properties.services.items, + schema170.anyOf[1].allOf[1].properties.services.items, data: data30, }; if (vErrors === null) { @@ -114289,8 +115033,8 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema167.anyOf[1].allOf[1].properties.services, + schema: schema170.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema170.anyOf[1].allOf[1].properties.services, data: data29, }; if (vErrors === null) { @@ -114314,8 +115058,8 @@ function validate182( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema167.anyOf[1].allOf[1].type, - parentSchema: schema167.anyOf[1].allOf[1], + schema: schema170.anyOf[1].allOf[1].type, + parentSchema: schema170.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -114347,8 +115091,8 @@ function validate182( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema167.anyOf[2].allOf[0].required, - parentSchema: schema167.anyOf[2].allOf[0], + schema: schema170.anyOf[2].allOf[0].required, + parentSchema: schema170.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -114368,8 +115112,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.name, + schema: schema170.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.name, data: data34, }; if (vErrors === null) { @@ -114394,8 +115138,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.description, + schema: schema170.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.description, data: data35, }; if (vErrors === null) { @@ -114420,8 +115164,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.type, + schema: schema170.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -114444,11 +115188,11 @@ function validate182( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema167.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema170.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema167.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema167.anyOf[2].allOf[0].properties.type, + schema: schema170.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -114473,8 +115217,8 @@ function validate182( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema167.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.isPublic, + schema: schema170.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.isPublic, data: data37, }; if (vErrors === null) { @@ -114516,10 +115260,10 @@ function validate182( message: "must have required property '" + missing7 + "'", schema: - schema167.anyOf[2].allOf[0].properties.viewer.items + schema170.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema167.anyOf[2].allOf[0].properties.viewer.items, + schema170.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -114547,7 +115291,7 @@ function validate182( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[2].allOf[0].properties + schema170.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -114568,10 +115312,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[2].allOf[0].properties + schema170.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema167.anyOf[2].allOf[0].properties + schema170.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -114595,10 +115339,10 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[2].allOf[0].properties.viewer.items + schema170.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema167.anyOf[2].allOf[0].properties.viewer.items, + schema170.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -114621,8 +115365,8 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.viewer, + schema: schema170.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.viewer, data: data38, }; if (vErrors === null) { @@ -114665,10 +115409,10 @@ function validate182( message: "must have required property '" + missing8 + "'", schema: - schema167.anyOf[2].allOf[0].properties.owner.items + schema170.anyOf[2].allOf[0].properties.owner.items .required, parentSchema: - schema167.anyOf[2].allOf[0].properties.owner + schema170.anyOf[2].allOf[0].properties.owner .items, data: data42, }; @@ -114697,7 +115441,7 @@ function validate182( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[2].allOf[0].properties + schema170.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -114718,10 +115462,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[2].allOf[0].properties + schema170.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema167.anyOf[2].allOf[0].properties + schema170.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -114745,10 +115489,10 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[2].allOf[0].properties.owner.items + schema170.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema167.anyOf[2].allOf[0].properties.owner.items, + schema170.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -114771,8 +115515,8 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema167.anyOf[2].allOf[0].properties.owner, + schema: schema170.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema170.anyOf[2].allOf[0].properties.owner, data: data41, }; if (vErrors === null) { @@ -114800,8 +115544,8 @@ function validate182( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema167.anyOf[2].allOf[0].type, - parentSchema: schema167.anyOf[2].allOf[0], + schema: schema170.anyOf[2].allOf[0].type, + parentSchema: schema170.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -114828,7 +115572,7 @@ function validate182( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema167.anyOf[2].allOf[1].properties.type, + parentSchema: schema170.anyOf[2].allOf[1].properties.type, data: data44, }; if (vErrors === null) { @@ -114857,7 +115601,7 @@ function validate182( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema167.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema170.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -114874,8 +115618,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema167.anyOf[2].allOf[1].properties.codeUrl, + schema: schema170.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema170.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -114928,7 +115672,7 @@ function validate182( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[2].allOf[1].properties.services + schema170.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -114949,10 +115693,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[2].allOf[1].properties.services + schema170.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema167.anyOf[2].allOf[1].properties.services + schema170.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -114983,10 +115727,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[2].allOf[1].properties.services + schema170.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema167.anyOf[2].allOf[1].properties.services + schema170.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data49, }; @@ -115018,10 +115762,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[2].allOf[1].properties.services + schema170.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema167.anyOf[2].allOf[1].properties.services + schema170.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -115050,16 +115794,16 @@ function validate182( keyword: 'enum', params: { allowedValues: - schema167.anyOf[2].allOf[1].properties.services + schema170.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema167.anyOf[2].allOf[1].properties.services + schema170.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema167.anyOf[2].allOf[1].properties.services + schema170.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -115085,10 +115829,10 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[2].allOf[1].properties.services.items + schema170.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema167.anyOf[2].allOf[1].properties.services.items, + schema170.anyOf[2].allOf[1].properties.services.items, data: data47, }; if (vErrors === null) { @@ -115111,8 +115855,8 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema167.anyOf[2].allOf[1].properties.services, + schema: schema170.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema170.anyOf[2].allOf[1].properties.services, data: data46, }; if (vErrors === null) { @@ -115136,8 +115880,8 @@ function validate182( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema167.anyOf[2].allOf[1].type, - parentSchema: schema167.anyOf[2].allOf[1], + schema: schema170.anyOf[2].allOf[1].type, + parentSchema: schema170.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -115169,8 +115913,8 @@ function validate182( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema167.anyOf[3].allOf[0].required, - parentSchema: schema167.anyOf[3].allOf[0], + schema: schema170.anyOf[3].allOf[0].required, + parentSchema: schema170.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -115190,8 +115934,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema167.anyOf[3].allOf[0].properties.name, + schema: schema170.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.name, data: data51, }; if (vErrors === null) { @@ -115216,8 +115960,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema167.anyOf[3].allOf[0].properties.description, + schema: schema170.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.description, data: data52, }; if (vErrors === null) { @@ -115242,8 +115986,8 @@ function validate182( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema167.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema167.anyOf[3].allOf[0].properties.type, + schema: schema170.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -115266,11 +116010,11 @@ function validate182( schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema167.anyOf[3].allOf[0].properties.type.enum, + allowedValues: schema170.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema167.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema167.anyOf[3].allOf[0].properties.type, + schema: schema170.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema170.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -115295,8 +116039,8 @@ function validate182( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema167.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema167.anyOf[3].allOf[0].properties.isPublic, + schema: schema170.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.isPublic, data: data54, }; if (vErrors === null) { @@ -115338,10 +116082,10 @@ function validate182( message: "must have required property '" + missing10 + "'", schema: - schema167.anyOf[3].allOf[0].properties.viewer + schema170.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema167.anyOf[3].allOf[0].properties.viewer + schema170.anyOf[3].allOf[0].properties.viewer .items, data: data56, }; @@ -115370,7 +116114,7 @@ function validate182( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[3].allOf[0].properties + schema170.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -115391,10 +116135,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[3].allOf[0].properties + schema170.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema167.anyOf[3].allOf[0].properties + schema170.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -115418,10 +116162,10 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[3].allOf[0].properties.viewer.items + schema170.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema167.anyOf[3].allOf[0].properties.viewer.items, + schema170.anyOf[3].allOf[0].properties.viewer.items, data: data56, }; if (vErrors === null) { @@ -115444,8 +116188,8 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema167.anyOf[3].allOf[0].properties.viewer, + schema: schema170.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema170.anyOf[3].allOf[0].properties.viewer, data: data55, }; if (vErrors === null) { @@ -115490,10 +116234,10 @@ function validate182( missing11 + "'", schema: - schema167.anyOf[3].allOf[0].properties.owner + schema170.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema167.anyOf[3].allOf[0].properties.owner + schema170.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -115525,7 +116269,7 @@ function validate182( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[3].allOf[0].properties + schema170.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -115546,10 +116290,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[3].allOf[0].properties + schema170.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema167.anyOf[3].allOf[0].properties + schema170.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -115573,10 +116317,10 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[3].allOf[0].properties.owner.items + schema170.anyOf[3].allOf[0].properties.owner.items .type, parentSchema: - schema167.anyOf[3].allOf[0].properties.owner + schema170.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -115600,9 +116344,9 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[3].allOf[0].properties.owner.type, + schema: schema170.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema167.anyOf[3].allOf[0].properties.owner, + schema170.anyOf[3].allOf[0].properties.owner, data: data58, }; if (vErrors === null) { @@ -115630,8 +116374,8 @@ function validate182( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema167.anyOf[3].allOf[0].type, - parentSchema: schema167.anyOf[3].allOf[0], + schema: schema170.anyOf[3].allOf[0].type, + parentSchema: schema170.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -115655,8 +116399,8 @@ function validate182( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema167.anyOf[3].allOf[1].required, - parentSchema: schema167.anyOf[3].allOf[1], + schema: schema170.anyOf[3].allOf[1].required, + parentSchema: schema170.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -115677,7 +116421,7 @@ function validate182( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema167.anyOf[3].allOf[1].properties.type, + parentSchema: schema170.anyOf[3].allOf[1].properties.type, data: data61, }; if (vErrors === null) { @@ -115719,10 +116463,10 @@ function validate182( message: "must have required property '" + missing13 + "'", schema: - schema167.anyOf[3].allOf[1].properties.devices.items + schema170.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema167.anyOf[3].allOf[1].properties.devices.items, + schema170.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -115749,7 +116493,7 @@ function validate182( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema167.anyOf[3].allOf[1].properties + schema170.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data64, }; @@ -115770,10 +116514,10 @@ function validate182( params: { type: 'string' }, message: 'must be string', schema: - schema167.anyOf[3].allOf[1].properties.devices + schema170.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema167.anyOf[3].allOf[1].properties.devices + schema170.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -115797,10 +116541,10 @@ function validate182( params: { type: 'object' }, message: 'must be object', schema: - schema167.anyOf[3].allOf[1].properties.devices.items + schema170.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema167.anyOf[3].allOf[1].properties.devices.items, + schema170.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -115823,8 +116567,8 @@ function validate182( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema167.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema167.anyOf[3].allOf[1].properties.devices, + schema: schema170.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema170.anyOf[3].allOf[1].properties.devices, data: data62, }; if (vErrors === null) { @@ -115848,8 +116592,8 @@ function validate182( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema167.anyOf[3].allOf[1].type, - parentSchema: schema167.anyOf[3].allOf[1], + schema: schema170.anyOf[3].allOf[1].type, + parentSchema: schema170.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -115874,8 +116618,8 @@ function validate182( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema167.anyOf, - parentSchema: schema167, + schema: schema170.anyOf, + parentSchema: schema170, data, }; if (vErrors === null) { @@ -115884,7 +116628,7 @@ function validate182( vErrors.push(err109); } errors++; - validate182.errors = vErrors; + validate185.errors = vErrors; return false; } else { errors = _errs0; @@ -115896,11 +116640,11 @@ function validate182( } } } - validate182.errors = vErrors; + validate185.errors = vErrors; return errors === 0; } -exports.validateCreateDeviceBodyResponse = validate183; -const schema168 = { +exports.validateCreateDeviceBodyResponse = validate186; +const schema171 = { title: 'Device', anyOf: [ { @@ -116255,7 +116999,7 @@ const schema168 = { '#/paths//devices/post/requestBody/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate183( +function validate186( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -116280,8 +117024,8 @@ function validate183( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema168.anyOf[0].allOf[0].required, - parentSchema: schema168.anyOf[0].allOf[0], + schema: schema171.anyOf[0].allOf[0].required, + parentSchema: schema171.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -116305,7 +117049,7 @@ function validate183( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema168.anyOf[0].allOf[0].properties.url, + parentSchema: schema171.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -116322,8 +117066,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.url, + schema: schema171.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -116350,8 +117094,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.name, + schema: schema171.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.name, data: data1, }; if (vErrors === null) { @@ -116376,8 +117120,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.description, + schema: schema171.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.description, data: data2, }; if (vErrors === null) { @@ -116402,8 +117146,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.type, + schema: schema171.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -116426,11 +117170,11 @@ function validate183( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema168.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema171.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema168.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema168.anyOf[0].allOf[0].properties.type, + schema: schema171.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -116455,8 +117199,8 @@ function validate183( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema168.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.isPublic, + schema: schema171.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.isPublic, data: data4, }; if (vErrors === null) { @@ -116498,10 +117242,10 @@ function validate183( message: "must have required property '" + missing1 + "'", schema: - schema168.anyOf[0].allOf[0].properties.viewer.items + schema171.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema168.anyOf[0].allOf[0].properties.viewer.items, + schema171.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -116528,7 +117272,7 @@ function validate183( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[0].allOf[0].properties + schema171.anyOf[0].allOf[0].properties .viewer.items.properties.url, data: data7, }; @@ -116549,10 +117293,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[0].allOf[0].properties.viewer + schema171.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema168.anyOf[0].allOf[0].properties.viewer + schema171.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -116576,10 +117320,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[0].allOf[0].properties.viewer.items + schema171.anyOf[0].allOf[0].properties.viewer.items .type, parentSchema: - schema168.anyOf[0].allOf[0].properties.viewer.items, + schema171.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -116602,8 +117346,8 @@ function validate183( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema168.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.viewer, + schema: schema171.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.viewer, data: data5, }; if (vErrors === null) { @@ -116646,10 +117390,10 @@ function validate183( message: "must have required property '" + missing2 + "'", schema: - schema168.anyOf[0].allOf[0].properties.owner.items + schema171.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema168.anyOf[0].allOf[0].properties.owner.items, + schema171.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -116677,7 +117421,7 @@ function validate183( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[0].allOf[0].properties + schema171.anyOf[0].allOf[0].properties .owner.items.properties.url, data: data10, }; @@ -116698,10 +117442,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[0].allOf[0].properties.owner + schema171.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema168.anyOf[0].allOf[0].properties.owner + schema171.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data10, }; @@ -116725,10 +117469,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[0].allOf[0].properties.owner.items + schema171.anyOf[0].allOf[0].properties.owner.items .type, parentSchema: - schema168.anyOf[0].allOf[0].properties.owner.items, + schema171.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -116751,8 +117495,8 @@ function validate183( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema168.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema168.anyOf[0].allOf[0].properties.owner, + schema: schema171.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema171.anyOf[0].allOf[0].properties.owner, data: data8, }; if (vErrors === null) { @@ -116781,8 +117525,8 @@ function validate183( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema168.anyOf[0].allOf[0].type, - parentSchema: schema168.anyOf[0].allOf[0], + schema: schema171.anyOf[0].allOf[0].type, + parentSchema: schema171.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -116809,7 +117553,7 @@ function validate183( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema168.anyOf[0].allOf[1].properties.type, + parentSchema: schema171.anyOf[0].allOf[1].properties.type, data: data11, }; if (vErrors === null) { @@ -116838,7 +117582,7 @@ function validate183( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema168.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema171.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -116855,8 +117599,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema168.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema171.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema171.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -116902,7 +117646,7 @@ function validate183( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[0].allOf[1].properties.services + schema171.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data15, }; @@ -116923,10 +117667,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[0].allOf[1].properties.services.items + schema171.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema168.anyOf[0].allOf[1].properties.services.items + schema171.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -116957,10 +117701,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[0].allOf[1].properties.services.items + schema171.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema168.anyOf[0].allOf[1].properties.services.items + schema171.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data16, }; @@ -116992,10 +117736,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[0].allOf[1].properties.services.items + schema171.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema168.anyOf[0].allOf[1].properties.services.items + schema171.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -117024,15 +117768,15 @@ function validate183( keyword: 'enum', params: { allowedValues: - schema168.anyOf[0].allOf[1].properties.services + schema171.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema168.anyOf[0].allOf[1].properties.services.items + schema171.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema168.anyOf[0].allOf[1].properties.services.items + schema171.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -117057,9 +117801,9 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[0].allOf[1].properties.services.items.type, + schema171.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema168.anyOf[0].allOf[1].properties.services.items, + schema171.anyOf[0].allOf[1].properties.services.items, data: data14, }; if (vErrors === null) { @@ -117082,8 +117826,8 @@ function validate183( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema168.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema168.anyOf[0].allOf[1].properties.services, + schema: schema171.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema171.anyOf[0].allOf[1].properties.services, data: data13, }; if (vErrors === null) { @@ -117107,8 +117851,8 @@ function validate183( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema168.anyOf[0].allOf[1].type, - parentSchema: schema168.anyOf[0].allOf[1], + schema: schema171.anyOf[0].allOf[1].type, + parentSchema: schema171.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -117141,8 +117885,8 @@ function validate183( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema168.anyOf[1].allOf[0].required, - parentSchema: schema168.anyOf[1].allOf[0], + schema: schema171.anyOf[1].allOf[0].required, + parentSchema: schema171.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -117166,7 +117910,7 @@ function validate183( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema168.anyOf[1].allOf[0].properties.url, + parentSchema: schema171.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -117183,8 +117927,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.url, + schema: schema171.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -117211,8 +117955,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.name, + schema: schema171.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.name, data: data19, }; if (vErrors === null) { @@ -117237,8 +117981,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.description, + schema: schema171.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.description, data: data20, }; if (vErrors === null) { @@ -117263,8 +118007,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.type, + schema: schema171.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -117287,11 +118031,11 @@ function validate183( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema168.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema171.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema168.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema168.anyOf[1].allOf[0].properties.type, + schema: schema171.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -117316,8 +118060,8 @@ function validate183( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema168.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.isPublic, + schema: schema171.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.isPublic, data: data22, }; if (vErrors === null) { @@ -117359,10 +118103,10 @@ function validate183( message: "must have required property '" + missing4 + "'", schema: - schema168.anyOf[1].allOf[0].properties.viewer.items + schema171.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema168.anyOf[1].allOf[0].properties.viewer.items, + schema171.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -117390,7 +118134,7 @@ function validate183( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[1].allOf[0].properties + schema171.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -117411,10 +118155,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[1].allOf[0].properties + schema171.anyOf[1].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema168.anyOf[1].allOf[0].properties + schema171.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -117438,10 +118182,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[1].allOf[0].properties.viewer.items + schema171.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema168.anyOf[1].allOf[0].properties.viewer.items, + schema171.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -117464,8 +118208,8 @@ function validate183( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema168.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.viewer, + schema: schema171.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.viewer, data: data23, }; if (vErrors === null) { @@ -117508,10 +118252,10 @@ function validate183( message: "must have required property '" + missing5 + "'", schema: - schema168.anyOf[1].allOf[0].properties.owner.items + schema171.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema168.anyOf[1].allOf[0].properties.owner + schema171.anyOf[1].allOf[0].properties.owner .items, data: data27, }; @@ -117540,7 +118284,7 @@ function validate183( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[1].allOf[0].properties + schema171.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -117561,10 +118305,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[1].allOf[0].properties + schema171.anyOf[1].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema168.anyOf[1].allOf[0].properties + schema171.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -117588,10 +118332,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[1].allOf[0].properties.owner.items + schema171.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema168.anyOf[1].allOf[0].properties.owner.items, + schema171.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -117614,8 +118358,8 @@ function validate183( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema168.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema168.anyOf[1].allOf[0].properties.owner, + schema: schema171.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema171.anyOf[1].allOf[0].properties.owner, data: data26, }; if (vErrors === null) { @@ -117644,8 +118388,8 @@ function validate183( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema168.anyOf[1].allOf[0].type, - parentSchema: schema168.anyOf[1].allOf[0], + schema: schema171.anyOf[1].allOf[0].type, + parentSchema: schema171.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -117672,7 +118416,7 @@ function validate183( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema168.anyOf[1].allOf[1].properties.type, + parentSchema: schema171.anyOf[1].allOf[1].properties.type, data: data29, }; if (vErrors === null) { @@ -117697,8 +118441,8 @@ function validate183( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema168.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema168.anyOf[1].allOf[1].properties.connected, + schema: schema171.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema171.anyOf[1].allOf[1].properties.connected, data: data30, }; if (vErrors === null) { @@ -117749,7 +118493,7 @@ function validate183( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema168.anyOf[1].allOf[1].properties + schema171.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -117773,11 +118517,11 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[1].allOf[1].properties + schema171.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start .type, parentSchema: - schema168.anyOf[1].allOf[1].properties + schema171.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -117816,7 +118560,7 @@ function validate183( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema168.anyOf[1].allOf[1].properties + schema171.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -117840,11 +118584,11 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[1].allOf[1].properties + schema171.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end .type, parentSchema: - schema168.anyOf[1].allOf[1].properties + schema171.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -117871,10 +118615,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[1].allOf[1].properties.announcedAvailability + schema171.anyOf[1].allOf[1].properties.announcedAvailability .items.type, parentSchema: - schema168.anyOf[1].allOf[1].properties.announcedAvailability + schema171.anyOf[1].allOf[1].properties.announcedAvailability .items, data: data32, }; @@ -117900,9 +118644,9 @@ function validate183( params: { type: 'array' }, message: 'must be array', schema: - schema168.anyOf[1].allOf[1].properties.announcedAvailability.type, + schema171.anyOf[1].allOf[1].properties.announcedAvailability.type, parentSchema: - schema168.anyOf[1].allOf[1].properties.announcedAvailability, + schema171.anyOf[1].allOf[1].properties.announcedAvailability, data: data31, }; if (vErrors === null) { @@ -117933,7 +118677,7 @@ function validate183( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[1].allOf[1].properties.experiment, + schema171.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -117950,8 +118694,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema168.anyOf[1].allOf[1].properties.experiment, + schema: schema171.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema171.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -118004,7 +118748,7 @@ function validate183( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[1].allOf[1].properties + schema171.anyOf[1].allOf[1].properties .services.items.properties.serviceType, data: data38, }; @@ -118028,10 +118772,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[1].allOf[1].properties.services + schema171.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema168.anyOf[1].allOf[1].properties.services + schema171.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -118062,10 +118806,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[1].allOf[1].properties.services + schema171.anyOf[1].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema168.anyOf[1].allOf[1].properties.services + schema171.anyOf[1].allOf[1].properties.services .items.properties.serviceId, data: data39, }; @@ -118097,10 +118841,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[1].allOf[1].properties.services + schema171.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema168.anyOf[1].allOf[1].properties.services + schema171.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -118129,17 +118873,17 @@ function validate183( keyword: 'enum', params: { allowedValues: - schema168.anyOf[1].allOf[1].properties + schema171.anyOf[1].allOf[1].properties .services.items.properties.serviceDirection .enum, }, message: 'must be equal to one of the allowed values', schema: - schema168.anyOf[1].allOf[1].properties.services + schema171.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema168.anyOf[1].allOf[1].properties.services + schema171.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -118165,10 +118909,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[1].allOf[1].properties.services.items + schema171.anyOf[1].allOf[1].properties.services.items .type, parentSchema: - schema168.anyOf[1].allOf[1].properties.services.items, + schema171.anyOf[1].allOf[1].properties.services.items, data: data37, }; if (vErrors === null) { @@ -118191,8 +118935,8 @@ function validate183( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema168.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema168.anyOf[1].allOf[1].properties.services, + schema: schema171.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema171.anyOf[1].allOf[1].properties.services, data: data36, }; if (vErrors === null) { @@ -118218,8 +118962,8 @@ function validate183( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema168.anyOf[1].allOf[1].type, - parentSchema: schema168.anyOf[1].allOf[1], + schema: schema171.anyOf[1].allOf[1].type, + parentSchema: schema171.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -118252,8 +118996,8 @@ function validate183( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema168.anyOf[2].allOf[0].required, - parentSchema: schema168.anyOf[2].allOf[0], + schema: schema171.anyOf[2].allOf[0].required, + parentSchema: schema171.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -118277,7 +119021,7 @@ function validate183( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema168.anyOf[2].allOf[0].properties.url, + parentSchema: schema171.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -118294,8 +119038,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.url, + schema: schema171.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -118322,8 +119066,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.name, + schema: schema171.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.name, data: data42, }; if (vErrors === null) { @@ -118348,8 +119092,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.description, + schema: schema171.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.description, data: data43, }; if (vErrors === null) { @@ -118374,8 +119118,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.type, + schema: schema171.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -118398,11 +119142,11 @@ function validate183( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema168.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema171.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema168.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema168.anyOf[2].allOf[0].properties.type, + schema: schema171.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -118427,8 +119171,8 @@ function validate183( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema168.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.isPublic, + schema: schema171.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.isPublic, data: data45, }; if (vErrors === null) { @@ -118470,10 +119214,10 @@ function validate183( message: "must have required property '" + missing7 + "'", schema: - schema168.anyOf[2].allOf[0].properties.viewer + schema171.anyOf[2].allOf[0].properties.viewer .items.required, parentSchema: - schema168.anyOf[2].allOf[0].properties.viewer + schema171.anyOf[2].allOf[0].properties.viewer .items, data: data47, }; @@ -118502,7 +119246,7 @@ function validate183( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[2].allOf[0].properties + schema171.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -118523,10 +119267,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[2].allOf[0].properties + schema171.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema168.anyOf[2].allOf[0].properties + schema171.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -118550,10 +119294,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[2].allOf[0].properties.viewer.items + schema171.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema168.anyOf[2].allOf[0].properties.viewer.items, + schema171.anyOf[2].allOf[0].properties.viewer.items, data: data47, }; if (vErrors === null) { @@ -118576,8 +119320,8 @@ function validate183( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema168.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema168.anyOf[2].allOf[0].properties.viewer, + schema: schema171.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema171.anyOf[2].allOf[0].properties.viewer, data: data46, }; if (vErrors === null) { @@ -118622,10 +119366,10 @@ function validate183( missing8 + "'", schema: - schema168.anyOf[2].allOf[0].properties.owner + schema171.anyOf[2].allOf[0].properties.owner .items.required, parentSchema: - schema168.anyOf[2].allOf[0].properties.owner + schema171.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -118657,7 +119401,7 @@ function validate183( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[2].allOf[0].properties + schema171.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -118678,10 +119422,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[2].allOf[0].properties + schema171.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema168.anyOf[2].allOf[0].properties + schema171.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -118705,10 +119449,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[2].allOf[0].properties.owner.items + schema171.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema168.anyOf[2].allOf[0].properties.owner + schema171.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -118732,9 +119476,9 @@ function validate183( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema168.anyOf[2].allOf[0].properties.owner.type, + schema: schema171.anyOf[2].allOf[0].properties.owner.type, parentSchema: - schema168.anyOf[2].allOf[0].properties.owner, + schema171.anyOf[2].allOf[0].properties.owner, data: data49, }; if (vErrors === null) { @@ -118763,8 +119507,8 @@ function validate183( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema168.anyOf[2].allOf[0].type, - parentSchema: schema168.anyOf[2].allOf[0], + schema: schema171.anyOf[2].allOf[0].type, + parentSchema: schema171.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -118791,7 +119535,7 @@ function validate183( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema168.anyOf[2].allOf[1].properties.type, + parentSchema: schema171.anyOf[2].allOf[1].properties.type, data: data52, }; if (vErrors === null) { @@ -118820,7 +119564,7 @@ function validate183( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema168.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema171.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -118837,8 +119581,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema168.anyOf[2].allOf[1].properties.codeUrl, + schema: schema171.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema171.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -118891,7 +119635,7 @@ function validate183( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[2].allOf[1].properties.services + schema171.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -118912,10 +119656,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[2].allOf[1].properties.services + schema171.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema168.anyOf[2].allOf[1].properties.services + schema171.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -118946,10 +119690,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[2].allOf[1].properties.services + schema171.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema168.anyOf[2].allOf[1].properties.services + schema171.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data57, }; @@ -118981,10 +119725,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[2].allOf[1].properties.services + schema171.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema168.anyOf[2].allOf[1].properties.services + schema171.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -119013,16 +119757,16 @@ function validate183( keyword: 'enum', params: { allowedValues: - schema168.anyOf[2].allOf[1].properties.services + schema171.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema168.anyOf[2].allOf[1].properties.services + schema171.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema168.anyOf[2].allOf[1].properties.services + schema171.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -119048,10 +119792,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[2].allOf[1].properties.services.items + schema171.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema168.anyOf[2].allOf[1].properties.services.items, + schema171.anyOf[2].allOf[1].properties.services.items, data: data55, }; if (vErrors === null) { @@ -119074,8 +119818,8 @@ function validate183( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema168.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema168.anyOf[2].allOf[1].properties.services, + schema: schema171.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema171.anyOf[2].allOf[1].properties.services, data: data54, }; if (vErrors === null) { @@ -119099,8 +119843,8 @@ function validate183( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema168.anyOf[2].allOf[1].type, - parentSchema: schema168.anyOf[2].allOf[1], + schema: schema171.anyOf[2].allOf[1].type, + parentSchema: schema171.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -119133,8 +119877,8 @@ function validate183( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema168.anyOf[3].allOf[0].required, - parentSchema: schema168.anyOf[3].allOf[0], + schema: schema171.anyOf[3].allOf[0].required, + parentSchema: schema171.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -119158,7 +119902,7 @@ function validate183( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema168.anyOf[3].allOf[0].properties.url, + parentSchema: schema171.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -119175,8 +119919,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema168.anyOf[3].allOf[0].properties.url, + schema: schema171.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -119203,8 +119947,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema168.anyOf[3].allOf[0].properties.name, + schema: schema171.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.name, data: data60, }; if (vErrors === null) { @@ -119229,8 +119973,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema168.anyOf[3].allOf[0].properties.description, + schema: schema171.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.description, data: data61, }; if (vErrors === null) { @@ -119255,8 +119999,8 @@ function validate183( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema168.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema168.anyOf[3].allOf[0].properties.type, + schema: schema171.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -119280,11 +120024,11 @@ function validate183( keyword: 'enum', params: { allowedValues: - schema168.anyOf[3].allOf[0].properties.type.enum, + schema171.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema168.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema168.anyOf[3].allOf[0].properties.type, + schema: schema171.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema171.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -119309,8 +120053,8 @@ function validate183( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema168.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema168.anyOf[3].allOf[0].properties.isPublic, + schema: schema171.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema171.anyOf[3].allOf[0].properties.isPublic, data: data63, }; if (vErrors === null) { @@ -119354,10 +120098,10 @@ function validate183( missing10 + "'", schema: - schema168.anyOf[3].allOf[0].properties.viewer + schema171.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema168.anyOf[3].allOf[0].properties.viewer + schema171.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -119389,7 +120133,7 @@ function validate183( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[3].allOf[0].properties + schema171.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -119413,10 +120157,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[3].allOf[0].properties + schema171.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema168.anyOf[3].allOf[0].properties + schema171.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -119440,10 +120184,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[3].allOf[0].properties.viewer + schema171.anyOf[3].allOf[0].properties.viewer .items.type, parentSchema: - schema168.anyOf[3].allOf[0].properties.viewer + schema171.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -119468,9 +120212,9 @@ function validate183( params: { type: 'array' }, message: 'must be array', schema: - schema168.anyOf[3].allOf[0].properties.viewer.type, + schema171.anyOf[3].allOf[0].properties.viewer.type, parentSchema: - schema168.anyOf[3].allOf[0].properties.viewer, + schema171.anyOf[3].allOf[0].properties.viewer, data: data64, }; if (vErrors === null) { @@ -119518,10 +120262,10 @@ function validate183( missing11 + "'", schema: - schema168.anyOf[3].allOf[0].properties.owner + schema171.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema168.anyOf[3].allOf[0].properties.owner + schema171.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -119553,7 +120297,7 @@ function validate183( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[3].allOf[0] + schema171.anyOf[3].allOf[0] .properties.owner.items.properties .url, data: data69, @@ -119578,10 +120322,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[3].allOf[0].properties + schema171.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema168.anyOf[3].allOf[0].properties + schema171.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data69, }; @@ -119605,10 +120349,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[3].allOf[0].properties.owner + schema171.anyOf[3].allOf[0].properties.owner .items.type, parentSchema: - schema168.anyOf[3].allOf[0].properties.owner + schema171.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -119633,9 +120377,9 @@ function validate183( params: { type: 'array' }, message: 'must be array', schema: - schema168.anyOf[3].allOf[0].properties.owner.type, + schema171.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema168.anyOf[3].allOf[0].properties.owner, + schema171.anyOf[3].allOf[0].properties.owner, data: data67, }; if (vErrors === null) { @@ -119664,8 +120408,8 @@ function validate183( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema168.anyOf[3].allOf[0].type, - parentSchema: schema168.anyOf[3].allOf[0], + schema: schema171.anyOf[3].allOf[0].type, + parentSchema: schema171.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -119689,8 +120433,8 @@ function validate183( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema168.anyOf[3].allOf[1].required, - parentSchema: schema168.anyOf[3].allOf[1], + schema: schema171.anyOf[3].allOf[1].required, + parentSchema: schema171.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -119711,7 +120455,7 @@ function validate183( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema168.anyOf[3].allOf[1].properties.type, + parentSchema: schema171.anyOf[3].allOf[1].properties.type, data: data70, }; if (vErrors === null) { @@ -119753,10 +120497,10 @@ function validate183( message: "must have required property '" + missing13 + "'", schema: - schema168.anyOf[3].allOf[1].properties.devices.items + schema171.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema168.anyOf[3].allOf[1].properties.devices.items, + schema171.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -119783,7 +120527,7 @@ function validate183( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema168.anyOf[3].allOf[1].properties + schema171.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data73, }; @@ -119804,10 +120548,10 @@ function validate183( params: { type: 'string' }, message: 'must be string', schema: - schema168.anyOf[3].allOf[1].properties.devices + schema171.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema168.anyOf[3].allOf[1].properties.devices + schema171.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data73, }; @@ -119831,10 +120575,10 @@ function validate183( params: { type: 'object' }, message: 'must be object', schema: - schema168.anyOf[3].allOf[1].properties.devices.items + schema171.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema168.anyOf[3].allOf[1].properties.devices.items, + schema171.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -119857,8 +120601,8 @@ function validate183( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema168.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema168.anyOf[3].allOf[1].properties.devices, + schema: schema171.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema171.anyOf[3].allOf[1].properties.devices, data: data71, }; if (vErrors === null) { @@ -119882,8 +120626,8 @@ function validate183( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema168.anyOf[3].allOf[1].type, - parentSchema: schema168.anyOf[3].allOf[1], + schema: schema171.anyOf[3].allOf[1].type, + parentSchema: schema171.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -119908,8 +120652,8 @@ function validate183( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema168.anyOf, - parentSchema: schema168, + schema: schema171.anyOf, + parentSchema: schema171, data, }; if (vErrors === null) { @@ -119918,7 +120662,7 @@ function validate183( vErrors.push(err124); } errors++; - validate183.errors = vErrors; + validate186.errors = vErrors; return false; } else { errors = _errs0; @@ -119930,11 +120674,11 @@ function validate183( } } } - validate183.errors = vErrors; + validate186.errors = vErrors; return errors === 0; } -exports.validateCreateDeviceResponse201Request = validate184; -const schema169 = { +exports.validateCreateDeviceResponse201Request = validate187; +const schema172 = { title: 'Device', anyOf: [ { @@ -120244,7 +120988,7 @@ const schema169 = { '#/paths//devices/post/responses/201/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate184( +function validate187( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -120268,8 +121012,8 @@ function validate184( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema169.anyOf[0].allOf[0].required, - parentSchema: schema169.anyOf[0].allOf[0], + schema: schema172.anyOf[0].allOf[0].required, + parentSchema: schema172.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -120289,8 +121033,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.name, + schema: schema172.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.name, data: data0, }; if (vErrors === null) { @@ -120315,8 +121059,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.description, + schema: schema172.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.description, data: data1, }; if (vErrors === null) { @@ -120341,8 +121085,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.type, + schema: schema172.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -120365,11 +121109,11 @@ function validate184( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema169.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema172.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema169.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema169.anyOf[0].allOf[0].properties.type, + schema: schema172.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -120394,8 +121138,8 @@ function validate184( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema169.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.isPublic, + schema: schema172.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.isPublic, data: data3, }; if (vErrors === null) { @@ -120436,10 +121180,10 @@ function validate184( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", schema: - schema169.anyOf[0].allOf[0].properties.viewer.items + schema172.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema169.anyOf[0].allOf[0].properties.viewer.items, + schema172.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -120466,7 +121210,7 @@ function validate184( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[0].allOf[0].properties.viewer + schema172.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -120487,10 +121231,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[0].allOf[0].properties.viewer + schema172.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema169.anyOf[0].allOf[0].properties.viewer + schema172.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -120514,9 +121258,9 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[0].allOf[0].properties.viewer.items.type, + schema172.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema169.anyOf[0].allOf[0].properties.viewer.items, + schema172.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -120539,8 +121283,8 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.viewer, + schema: schema172.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.viewer, data: data4, }; if (vErrors === null) { @@ -120583,10 +121327,10 @@ function validate184( message: "must have required property '" + missing2 + "'", schema: - schema169.anyOf[0].allOf[0].properties.owner.items + schema172.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema169.anyOf[0].allOf[0].properties.owner.items, + schema172.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -120613,7 +121357,7 @@ function validate184( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[0].allOf[0].properties.owner + schema172.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -120634,10 +121378,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[0].allOf[0].properties.owner + schema172.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema169.anyOf[0].allOf[0].properties.owner + schema172.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -120661,9 +121405,9 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[0].allOf[0].properties.owner.items.type, + schema172.anyOf[0].allOf[0].properties.owner.items.type, parentSchema: - schema169.anyOf[0].allOf[0].properties.owner.items, + schema172.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -120686,8 +121430,8 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema169.anyOf[0].allOf[0].properties.owner, + schema: schema172.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema172.anyOf[0].allOf[0].properties.owner, data: data7, }; if (vErrors === null) { @@ -120715,8 +121459,8 @@ function validate184( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema169.anyOf[0].allOf[0].type, - parentSchema: schema169.anyOf[0].allOf[0], + schema: schema172.anyOf[0].allOf[0].type, + parentSchema: schema172.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -120743,7 +121487,7 @@ function validate184( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema169.anyOf[0].allOf[1].properties.type, + parentSchema: schema172.anyOf[0].allOf[1].properties.type, data: data10, }; if (vErrors === null) { @@ -120772,7 +121516,7 @@ function validate184( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema169.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema172.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -120789,8 +121533,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema169.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema172.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema172.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -120836,7 +121580,7 @@ function validate184( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[0].allOf[1].properties.services + schema172.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data14, }; @@ -120857,10 +121601,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[0].allOf[1].properties.services.items + schema172.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema169.anyOf[0].allOf[1].properties.services.items + schema172.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -120891,10 +121635,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[0].allOf[1].properties.services.items + schema172.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema169.anyOf[0].allOf[1].properties.services.items + schema172.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data15, }; @@ -120926,10 +121670,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[0].allOf[1].properties.services.items + schema172.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema169.anyOf[0].allOf[1].properties.services.items + schema172.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -120958,15 +121702,15 @@ function validate184( keyword: 'enum', params: { allowedValues: - schema169.anyOf[0].allOf[1].properties.services + schema172.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema169.anyOf[0].allOf[1].properties.services.items + schema172.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema169.anyOf[0].allOf[1].properties.services.items + schema172.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -120991,9 +121735,9 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[0].allOf[1].properties.services.items.type, + schema172.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema169.anyOf[0].allOf[1].properties.services.items, + schema172.anyOf[0].allOf[1].properties.services.items, data: data13, }; if (vErrors === null) { @@ -121016,8 +121760,8 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema169.anyOf[0].allOf[1].properties.services, + schema: schema172.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema172.anyOf[0].allOf[1].properties.services, data: data12, }; if (vErrors === null) { @@ -121041,8 +121785,8 @@ function validate184( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema169.anyOf[0].allOf[1].type, - parentSchema: schema169.anyOf[0].allOf[1], + schema: schema172.anyOf[0].allOf[1].type, + parentSchema: schema172.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -121074,8 +121818,8 @@ function validate184( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema169.anyOf[1].allOf[0].required, - parentSchema: schema169.anyOf[1].allOf[0], + schema: schema172.anyOf[1].allOf[0].required, + parentSchema: schema172.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -121095,8 +121839,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.name, + schema: schema172.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.name, data: data17, }; if (vErrors === null) { @@ -121121,8 +121865,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.description, + schema: schema172.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.description, data: data18, }; if (vErrors === null) { @@ -121147,8 +121891,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.type, + schema: schema172.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -121171,11 +121915,11 @@ function validate184( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema169.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema172.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema169.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema169.anyOf[1].allOf[0].properties.type, + schema: schema172.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -121200,8 +121944,8 @@ function validate184( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema169.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.isPublic, + schema: schema172.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.isPublic, data: data20, }; if (vErrors === null) { @@ -121243,10 +121987,10 @@ function validate184( message: "must have required property '" + missing4 + "'", schema: - schema169.anyOf[1].allOf[0].properties.viewer.items + schema172.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema169.anyOf[1].allOf[0].properties.viewer.items, + schema172.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -121273,7 +122017,7 @@ function validate184( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[1].allOf[0].properties + schema172.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data23, }; @@ -121294,10 +122038,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[1].allOf[0].properties.viewer + schema172.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema169.anyOf[1].allOf[0].properties.viewer + schema172.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -121321,10 +122065,10 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[1].allOf[0].properties.viewer.items + schema172.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema169.anyOf[1].allOf[0].properties.viewer.items, + schema172.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -121347,8 +122091,8 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.viewer, + schema: schema172.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.viewer, data: data21, }; if (vErrors === null) { @@ -121391,10 +122135,10 @@ function validate184( message: "must have required property '" + missing5 + "'", schema: - schema169.anyOf[1].allOf[0].properties.owner.items + schema172.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema169.anyOf[1].allOf[0].properties.owner.items, + schema172.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -121422,7 +122166,7 @@ function validate184( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[1].allOf[0].properties + schema172.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data26, }; @@ -121443,10 +122187,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[1].allOf[0].properties.owner + schema172.anyOf[1].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema169.anyOf[1].allOf[0].properties.owner + schema172.anyOf[1].allOf[0].properties.owner .items.properties.url, data: data26, }; @@ -121470,10 +122214,10 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[1].allOf[0].properties.owner.items + schema172.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema169.anyOf[1].allOf[0].properties.owner.items, + schema172.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -121496,8 +122240,8 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema169.anyOf[1].allOf[0].properties.owner, + schema: schema172.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema172.anyOf[1].allOf[0].properties.owner, data: data24, }; if (vErrors === null) { @@ -121525,8 +122269,8 @@ function validate184( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema169.anyOf[1].allOf[0].type, - parentSchema: schema169.anyOf[1].allOf[0], + schema: schema172.anyOf[1].allOf[0].type, + parentSchema: schema172.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -121553,7 +122297,7 @@ function validate184( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema169.anyOf[1].allOf[1].properties.type, + parentSchema: schema172.anyOf[1].allOf[1].properties.type, data: data27, }; if (vErrors === null) { @@ -121582,7 +122326,7 @@ function validate184( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema169.anyOf[1].allOf[1].properties.experiment, + parentSchema: schema172.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -121599,8 +122343,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema169.anyOf[1].allOf[1].properties.experiment, + schema: schema172.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema172.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -121650,7 +122394,7 @@ function validate184( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[1].allOf[1].properties.services + schema172.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -121671,10 +122415,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[1].allOf[1].properties.services + schema172.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema169.anyOf[1].allOf[1].properties.services + schema172.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -121705,10 +122449,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[1].allOf[1].properties.services.items + schema172.anyOf[1].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema169.anyOf[1].allOf[1].properties.services.items + schema172.anyOf[1].allOf[1].properties.services.items .properties.serviceId, data: data32, }; @@ -121740,10 +122484,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[1].allOf[1].properties.services + schema172.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema169.anyOf[1].allOf[1].properties.services + schema172.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -121772,15 +122516,15 @@ function validate184( keyword: 'enum', params: { allowedValues: - schema169.anyOf[1].allOf[1].properties.services + schema172.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema169.anyOf[1].allOf[1].properties.services + schema172.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema169.anyOf[1].allOf[1].properties.services + schema172.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -121806,9 +122550,9 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[1].allOf[1].properties.services.items.type, + schema172.anyOf[1].allOf[1].properties.services.items.type, parentSchema: - schema169.anyOf[1].allOf[1].properties.services.items, + schema172.anyOf[1].allOf[1].properties.services.items, data: data30, }; if (vErrors === null) { @@ -121831,8 +122575,8 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema169.anyOf[1].allOf[1].properties.services, + schema: schema172.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema172.anyOf[1].allOf[1].properties.services, data: data29, }; if (vErrors === null) { @@ -121856,8 +122600,8 @@ function validate184( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema169.anyOf[1].allOf[1].type, - parentSchema: schema169.anyOf[1].allOf[1], + schema: schema172.anyOf[1].allOf[1].type, + parentSchema: schema172.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -121889,8 +122633,8 @@ function validate184( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema169.anyOf[2].allOf[0].required, - parentSchema: schema169.anyOf[2].allOf[0], + schema: schema172.anyOf[2].allOf[0].required, + parentSchema: schema172.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -121910,8 +122654,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.name, + schema: schema172.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.name, data: data34, }; if (vErrors === null) { @@ -121936,8 +122680,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.description, + schema: schema172.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.description, data: data35, }; if (vErrors === null) { @@ -121962,8 +122706,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.type, + schema: schema172.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -121986,11 +122730,11 @@ function validate184( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema169.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema172.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema169.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema169.anyOf[2].allOf[0].properties.type, + schema: schema172.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -122015,8 +122759,8 @@ function validate184( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema169.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.isPublic, + schema: schema172.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.isPublic, data: data37, }; if (vErrors === null) { @@ -122058,10 +122802,10 @@ function validate184( message: "must have required property '" + missing7 + "'", schema: - schema169.anyOf[2].allOf[0].properties.viewer.items + schema172.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema169.anyOf[2].allOf[0].properties.viewer.items, + schema172.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -122089,7 +122833,7 @@ function validate184( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[2].allOf[0].properties + schema172.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -122110,10 +122854,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[2].allOf[0].properties + schema172.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema169.anyOf[2].allOf[0].properties + schema172.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -122137,10 +122881,10 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[2].allOf[0].properties.viewer.items + schema172.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema169.anyOf[2].allOf[0].properties.viewer.items, + schema172.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -122163,8 +122907,8 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.viewer, + schema: schema172.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.viewer, data: data38, }; if (vErrors === null) { @@ -122207,10 +122951,10 @@ function validate184( message: "must have required property '" + missing8 + "'", schema: - schema169.anyOf[2].allOf[0].properties.owner.items + schema172.anyOf[2].allOf[0].properties.owner.items .required, parentSchema: - schema169.anyOf[2].allOf[0].properties.owner + schema172.anyOf[2].allOf[0].properties.owner .items, data: data42, }; @@ -122239,7 +122983,7 @@ function validate184( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[2].allOf[0].properties + schema172.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -122260,10 +123004,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[2].allOf[0].properties + schema172.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema169.anyOf[2].allOf[0].properties + schema172.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -122287,10 +123031,10 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[2].allOf[0].properties.owner.items + schema172.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema169.anyOf[2].allOf[0].properties.owner.items, + schema172.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -122313,8 +123057,8 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema169.anyOf[2].allOf[0].properties.owner, + schema: schema172.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema172.anyOf[2].allOf[0].properties.owner, data: data41, }; if (vErrors === null) { @@ -122342,8 +123086,8 @@ function validate184( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema169.anyOf[2].allOf[0].type, - parentSchema: schema169.anyOf[2].allOf[0], + schema: schema172.anyOf[2].allOf[0].type, + parentSchema: schema172.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -122370,7 +123114,7 @@ function validate184( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema169.anyOf[2].allOf[1].properties.type, + parentSchema: schema172.anyOf[2].allOf[1].properties.type, data: data44, }; if (vErrors === null) { @@ -122399,7 +123143,7 @@ function validate184( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema169.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema172.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -122416,8 +123160,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema169.anyOf[2].allOf[1].properties.codeUrl, + schema: schema172.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema172.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -122470,7 +123214,7 @@ function validate184( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[2].allOf[1].properties.services + schema172.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -122491,10 +123235,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[2].allOf[1].properties.services + schema172.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema169.anyOf[2].allOf[1].properties.services + schema172.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -122525,10 +123269,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[2].allOf[1].properties.services + schema172.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema169.anyOf[2].allOf[1].properties.services + schema172.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data49, }; @@ -122560,10 +123304,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[2].allOf[1].properties.services + schema172.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema169.anyOf[2].allOf[1].properties.services + schema172.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -122592,16 +123336,16 @@ function validate184( keyword: 'enum', params: { allowedValues: - schema169.anyOf[2].allOf[1].properties.services + schema172.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema169.anyOf[2].allOf[1].properties.services + schema172.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema169.anyOf[2].allOf[1].properties.services + schema172.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -122627,10 +123371,10 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[2].allOf[1].properties.services.items + schema172.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema169.anyOf[2].allOf[1].properties.services.items, + schema172.anyOf[2].allOf[1].properties.services.items, data: data47, }; if (vErrors === null) { @@ -122653,8 +123397,8 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema169.anyOf[2].allOf[1].properties.services, + schema: schema172.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema172.anyOf[2].allOf[1].properties.services, data: data46, }; if (vErrors === null) { @@ -122678,8 +123422,8 @@ function validate184( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema169.anyOf[2].allOf[1].type, - parentSchema: schema169.anyOf[2].allOf[1], + schema: schema172.anyOf[2].allOf[1].type, + parentSchema: schema172.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -122711,8 +123455,8 @@ function validate184( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema169.anyOf[3].allOf[0].required, - parentSchema: schema169.anyOf[3].allOf[0], + schema: schema172.anyOf[3].allOf[0].required, + parentSchema: schema172.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -122732,8 +123476,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema169.anyOf[3].allOf[0].properties.name, + schema: schema172.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.name, data: data51, }; if (vErrors === null) { @@ -122758,8 +123502,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema169.anyOf[3].allOf[0].properties.description, + schema: schema172.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.description, data: data52, }; if (vErrors === null) { @@ -122784,8 +123528,8 @@ function validate184( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema169.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema169.anyOf[3].allOf[0].properties.type, + schema: schema172.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -122808,11 +123552,11 @@ function validate184( schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema169.anyOf[3].allOf[0].properties.type.enum, + allowedValues: schema172.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema169.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema169.anyOf[3].allOf[0].properties.type, + schema: schema172.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema172.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -122837,8 +123581,8 @@ function validate184( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema169.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema169.anyOf[3].allOf[0].properties.isPublic, + schema: schema172.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.isPublic, data: data54, }; if (vErrors === null) { @@ -122880,10 +123624,10 @@ function validate184( message: "must have required property '" + missing10 + "'", schema: - schema169.anyOf[3].allOf[0].properties.viewer + schema172.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema169.anyOf[3].allOf[0].properties.viewer + schema172.anyOf[3].allOf[0].properties.viewer .items, data: data56, }; @@ -122912,7 +123656,7 @@ function validate184( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[3].allOf[0].properties + schema172.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -122933,10 +123677,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[3].allOf[0].properties + schema172.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema169.anyOf[3].allOf[0].properties + schema172.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -122960,10 +123704,10 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[3].allOf[0].properties.viewer.items + schema172.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema169.anyOf[3].allOf[0].properties.viewer.items, + schema172.anyOf[3].allOf[0].properties.viewer.items, data: data56, }; if (vErrors === null) { @@ -122986,8 +123730,8 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema169.anyOf[3].allOf[0].properties.viewer, + schema: schema172.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema172.anyOf[3].allOf[0].properties.viewer, data: data55, }; if (vErrors === null) { @@ -123032,10 +123776,10 @@ function validate184( missing11 + "'", schema: - schema169.anyOf[3].allOf[0].properties.owner + schema172.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema169.anyOf[3].allOf[0].properties.owner + schema172.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -123067,7 +123811,7 @@ function validate184( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[3].allOf[0].properties + schema172.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -123088,10 +123832,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[3].allOf[0].properties + schema172.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema169.anyOf[3].allOf[0].properties + schema172.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -123115,10 +123859,10 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[3].allOf[0].properties.owner.items + schema172.anyOf[3].allOf[0].properties.owner.items .type, parentSchema: - schema169.anyOf[3].allOf[0].properties.owner + schema172.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -123142,9 +123886,9 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[3].allOf[0].properties.owner.type, + schema: schema172.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema169.anyOf[3].allOf[0].properties.owner, + schema172.anyOf[3].allOf[0].properties.owner, data: data58, }; if (vErrors === null) { @@ -123172,8 +123916,8 @@ function validate184( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema169.anyOf[3].allOf[0].type, - parentSchema: schema169.anyOf[3].allOf[0], + schema: schema172.anyOf[3].allOf[0].type, + parentSchema: schema172.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -123197,8 +123941,8 @@ function validate184( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema169.anyOf[3].allOf[1].required, - parentSchema: schema169.anyOf[3].allOf[1], + schema: schema172.anyOf[3].allOf[1].required, + parentSchema: schema172.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -123219,7 +123963,7 @@ function validate184( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema169.anyOf[3].allOf[1].properties.type, + parentSchema: schema172.anyOf[3].allOf[1].properties.type, data: data61, }; if (vErrors === null) { @@ -123261,10 +124005,10 @@ function validate184( message: "must have required property '" + missing13 + "'", schema: - schema169.anyOf[3].allOf[1].properties.devices.items + schema172.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema169.anyOf[3].allOf[1].properties.devices.items, + schema172.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -123291,7 +124035,7 @@ function validate184( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema169.anyOf[3].allOf[1].properties + schema172.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data64, }; @@ -123312,10 +124056,10 @@ function validate184( params: { type: 'string' }, message: 'must be string', schema: - schema169.anyOf[3].allOf[1].properties.devices + schema172.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema169.anyOf[3].allOf[1].properties.devices + schema172.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -123339,10 +124083,10 @@ function validate184( params: { type: 'object' }, message: 'must be object', schema: - schema169.anyOf[3].allOf[1].properties.devices.items + schema172.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema169.anyOf[3].allOf[1].properties.devices.items, + schema172.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -123365,8 +124109,8 @@ function validate184( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema169.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema169.anyOf[3].allOf[1].properties.devices, + schema: schema172.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema172.anyOf[3].allOf[1].properties.devices, data: data62, }; if (vErrors === null) { @@ -123390,8 +124134,8 @@ function validate184( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema169.anyOf[3].allOf[1].type, - parentSchema: schema169.anyOf[3].allOf[1], + schema: schema172.anyOf[3].allOf[1].type, + parentSchema: schema172.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -123416,8 +124160,8 @@ function validate184( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema169.anyOf, - parentSchema: schema169, + schema: schema172.anyOf, + parentSchema: schema172, data, }; if (vErrors === null) { @@ -123426,7 +124170,7 @@ function validate184( vErrors.push(err109); } errors++; - validate184.errors = vErrors; + validate187.errors = vErrors; return false; } else { errors = _errs0; @@ -123438,11 +124182,11 @@ function validate184( } } } - validate184.errors = vErrors; + validate187.errors = vErrors; return errors === 0; } -exports.validateCreateDeviceResponse201Response = validate185; -const schema170 = { +exports.validateCreateDeviceResponse201Response = validate188; +const schema173 = { title: 'Device', anyOf: [ { @@ -123797,7 +124541,7 @@ const schema170 = { '#/paths//devices/post/responses/201/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate185( +function validate188( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -123822,8 +124566,8 @@ function validate185( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema170.anyOf[0].allOf[0].required, - parentSchema: schema170.anyOf[0].allOf[0], + schema: schema173.anyOf[0].allOf[0].required, + parentSchema: schema173.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -123847,7 +124591,7 @@ function validate185( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema170.anyOf[0].allOf[0].properties.url, + parentSchema: schema173.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -123864,8 +124608,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.url, + schema: schema173.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -123892,8 +124636,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.name, + schema: schema173.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.name, data: data1, }; if (vErrors === null) { @@ -123918,8 +124662,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.description, + schema: schema173.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.description, data: data2, }; if (vErrors === null) { @@ -123944,8 +124688,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.type, + schema: schema173.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -123968,11 +124712,11 @@ function validate185( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema170.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema173.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema170.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema170.anyOf[0].allOf[0].properties.type, + schema: schema173.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -123997,8 +124741,8 @@ function validate185( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema170.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.isPublic, + schema: schema173.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.isPublic, data: data4, }; if (vErrors === null) { @@ -124040,10 +124784,10 @@ function validate185( message: "must have required property '" + missing1 + "'", schema: - schema170.anyOf[0].allOf[0].properties.viewer.items + schema173.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema170.anyOf[0].allOf[0].properties.viewer.items, + schema173.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -124070,7 +124814,7 @@ function validate185( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[0].allOf[0].properties + schema173.anyOf[0].allOf[0].properties .viewer.items.properties.url, data: data7, }; @@ -124091,10 +124835,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[0].allOf[0].properties.viewer + schema173.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema170.anyOf[0].allOf[0].properties.viewer + schema173.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -124118,10 +124862,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[0].allOf[0].properties.viewer.items + schema173.anyOf[0].allOf[0].properties.viewer.items .type, parentSchema: - schema170.anyOf[0].allOf[0].properties.viewer.items, + schema173.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -124144,8 +124888,8 @@ function validate185( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema170.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.viewer, + schema: schema173.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.viewer, data: data5, }; if (vErrors === null) { @@ -124188,10 +124932,10 @@ function validate185( message: "must have required property '" + missing2 + "'", schema: - schema170.anyOf[0].allOf[0].properties.owner.items + schema173.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema170.anyOf[0].allOf[0].properties.owner.items, + schema173.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -124219,7 +124963,7 @@ function validate185( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[0].allOf[0].properties + schema173.anyOf[0].allOf[0].properties .owner.items.properties.url, data: data10, }; @@ -124240,10 +124984,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[0].allOf[0].properties.owner + schema173.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema170.anyOf[0].allOf[0].properties.owner + schema173.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data10, }; @@ -124267,10 +125011,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[0].allOf[0].properties.owner.items + schema173.anyOf[0].allOf[0].properties.owner.items .type, parentSchema: - schema170.anyOf[0].allOf[0].properties.owner.items, + schema173.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -124293,8 +125037,8 @@ function validate185( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema170.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema170.anyOf[0].allOf[0].properties.owner, + schema: schema173.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema173.anyOf[0].allOf[0].properties.owner, data: data8, }; if (vErrors === null) { @@ -124323,8 +125067,8 @@ function validate185( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema170.anyOf[0].allOf[0].type, - parentSchema: schema170.anyOf[0].allOf[0], + schema: schema173.anyOf[0].allOf[0].type, + parentSchema: schema173.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -124351,7 +125095,7 @@ function validate185( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema170.anyOf[0].allOf[1].properties.type, + parentSchema: schema173.anyOf[0].allOf[1].properties.type, data: data11, }; if (vErrors === null) { @@ -124380,7 +125124,7 @@ function validate185( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema170.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema173.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -124397,8 +125141,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema170.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema173.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema173.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -124444,7 +125188,7 @@ function validate185( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[0].allOf[1].properties.services + schema173.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data15, }; @@ -124465,10 +125209,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[0].allOf[1].properties.services.items + schema173.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema170.anyOf[0].allOf[1].properties.services.items + schema173.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -124499,10 +125243,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[0].allOf[1].properties.services.items + schema173.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema170.anyOf[0].allOf[1].properties.services.items + schema173.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data16, }; @@ -124534,10 +125278,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[0].allOf[1].properties.services.items + schema173.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema170.anyOf[0].allOf[1].properties.services.items + schema173.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -124566,15 +125310,15 @@ function validate185( keyword: 'enum', params: { allowedValues: - schema170.anyOf[0].allOf[1].properties.services + schema173.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema170.anyOf[0].allOf[1].properties.services.items + schema173.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema170.anyOf[0].allOf[1].properties.services.items + schema173.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -124599,9 +125343,9 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[0].allOf[1].properties.services.items.type, + schema173.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema170.anyOf[0].allOf[1].properties.services.items, + schema173.anyOf[0].allOf[1].properties.services.items, data: data14, }; if (vErrors === null) { @@ -124624,8 +125368,8 @@ function validate185( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema170.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema170.anyOf[0].allOf[1].properties.services, + schema: schema173.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema173.anyOf[0].allOf[1].properties.services, data: data13, }; if (vErrors === null) { @@ -124649,8 +125393,8 @@ function validate185( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema170.anyOf[0].allOf[1].type, - parentSchema: schema170.anyOf[0].allOf[1], + schema: schema173.anyOf[0].allOf[1].type, + parentSchema: schema173.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -124683,8 +125427,8 @@ function validate185( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema170.anyOf[1].allOf[0].required, - parentSchema: schema170.anyOf[1].allOf[0], + schema: schema173.anyOf[1].allOf[0].required, + parentSchema: schema173.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -124708,7 +125452,7 @@ function validate185( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema170.anyOf[1].allOf[0].properties.url, + parentSchema: schema173.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -124725,8 +125469,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.url, + schema: schema173.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -124753,8 +125497,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.name, + schema: schema173.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.name, data: data19, }; if (vErrors === null) { @@ -124779,8 +125523,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.description, + schema: schema173.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.description, data: data20, }; if (vErrors === null) { @@ -124805,8 +125549,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.type, + schema: schema173.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -124829,11 +125573,11 @@ function validate185( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema170.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema173.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema170.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema170.anyOf[1].allOf[0].properties.type, + schema: schema173.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -124858,8 +125602,8 @@ function validate185( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema170.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.isPublic, + schema: schema173.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.isPublic, data: data22, }; if (vErrors === null) { @@ -124901,10 +125645,10 @@ function validate185( message: "must have required property '" + missing4 + "'", schema: - schema170.anyOf[1].allOf[0].properties.viewer.items + schema173.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema170.anyOf[1].allOf[0].properties.viewer.items, + schema173.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -124932,7 +125676,7 @@ function validate185( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[1].allOf[0].properties + schema173.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -124953,10 +125697,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[1].allOf[0].properties + schema173.anyOf[1].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema170.anyOf[1].allOf[0].properties + schema173.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -124980,10 +125724,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[1].allOf[0].properties.viewer.items + schema173.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema170.anyOf[1].allOf[0].properties.viewer.items, + schema173.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -125006,8 +125750,8 @@ function validate185( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema170.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.viewer, + schema: schema173.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.viewer, data: data23, }; if (vErrors === null) { @@ -125050,10 +125794,10 @@ function validate185( message: "must have required property '" + missing5 + "'", schema: - schema170.anyOf[1].allOf[0].properties.owner.items + schema173.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema170.anyOf[1].allOf[0].properties.owner + schema173.anyOf[1].allOf[0].properties.owner .items, data: data27, }; @@ -125082,7 +125826,7 @@ function validate185( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[1].allOf[0].properties + schema173.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -125103,10 +125847,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[1].allOf[0].properties + schema173.anyOf[1].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema170.anyOf[1].allOf[0].properties + schema173.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -125130,10 +125874,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[1].allOf[0].properties.owner.items + schema173.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema170.anyOf[1].allOf[0].properties.owner.items, + schema173.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -125156,8 +125900,8 @@ function validate185( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema170.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema170.anyOf[1].allOf[0].properties.owner, + schema: schema173.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema173.anyOf[1].allOf[0].properties.owner, data: data26, }; if (vErrors === null) { @@ -125186,8 +125930,8 @@ function validate185( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema170.anyOf[1].allOf[0].type, - parentSchema: schema170.anyOf[1].allOf[0], + schema: schema173.anyOf[1].allOf[0].type, + parentSchema: schema173.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -125214,7 +125958,7 @@ function validate185( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema170.anyOf[1].allOf[1].properties.type, + parentSchema: schema173.anyOf[1].allOf[1].properties.type, data: data29, }; if (vErrors === null) { @@ -125239,8 +125983,8 @@ function validate185( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema170.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema170.anyOf[1].allOf[1].properties.connected, + schema: schema173.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema173.anyOf[1].allOf[1].properties.connected, data: data30, }; if (vErrors === null) { @@ -125291,7 +126035,7 @@ function validate185( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema170.anyOf[1].allOf[1].properties + schema173.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -125315,11 +126059,11 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[1].allOf[1].properties + schema173.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start .type, parentSchema: - schema170.anyOf[1].allOf[1].properties + schema173.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -125358,7 +126102,7 @@ function validate185( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema170.anyOf[1].allOf[1].properties + schema173.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -125382,11 +126126,11 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[1].allOf[1].properties + schema173.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end .type, parentSchema: - schema170.anyOf[1].allOf[1].properties + schema173.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -125413,10 +126157,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[1].allOf[1].properties.announcedAvailability + schema173.anyOf[1].allOf[1].properties.announcedAvailability .items.type, parentSchema: - schema170.anyOf[1].allOf[1].properties.announcedAvailability + schema173.anyOf[1].allOf[1].properties.announcedAvailability .items, data: data32, }; @@ -125442,9 +126186,9 @@ function validate185( params: { type: 'array' }, message: 'must be array', schema: - schema170.anyOf[1].allOf[1].properties.announcedAvailability.type, + schema173.anyOf[1].allOf[1].properties.announcedAvailability.type, parentSchema: - schema170.anyOf[1].allOf[1].properties.announcedAvailability, + schema173.anyOf[1].allOf[1].properties.announcedAvailability, data: data31, }; if (vErrors === null) { @@ -125475,7 +126219,7 @@ function validate185( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[1].allOf[1].properties.experiment, + schema173.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -125492,8 +126236,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema170.anyOf[1].allOf[1].properties.experiment, + schema: schema173.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema173.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -125546,7 +126290,7 @@ function validate185( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[1].allOf[1].properties + schema173.anyOf[1].allOf[1].properties .services.items.properties.serviceType, data: data38, }; @@ -125570,10 +126314,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[1].allOf[1].properties.services + schema173.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema170.anyOf[1].allOf[1].properties.services + schema173.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -125604,10 +126348,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[1].allOf[1].properties.services + schema173.anyOf[1].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema170.anyOf[1].allOf[1].properties.services + schema173.anyOf[1].allOf[1].properties.services .items.properties.serviceId, data: data39, }; @@ -125639,10 +126383,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[1].allOf[1].properties.services + schema173.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema170.anyOf[1].allOf[1].properties.services + schema173.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -125671,17 +126415,17 @@ function validate185( keyword: 'enum', params: { allowedValues: - schema170.anyOf[1].allOf[1].properties + schema173.anyOf[1].allOf[1].properties .services.items.properties.serviceDirection .enum, }, message: 'must be equal to one of the allowed values', schema: - schema170.anyOf[1].allOf[1].properties.services + schema173.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema170.anyOf[1].allOf[1].properties.services + schema173.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -125707,10 +126451,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[1].allOf[1].properties.services.items + schema173.anyOf[1].allOf[1].properties.services.items .type, parentSchema: - schema170.anyOf[1].allOf[1].properties.services.items, + schema173.anyOf[1].allOf[1].properties.services.items, data: data37, }; if (vErrors === null) { @@ -125733,8 +126477,8 @@ function validate185( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema170.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema170.anyOf[1].allOf[1].properties.services, + schema: schema173.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema173.anyOf[1].allOf[1].properties.services, data: data36, }; if (vErrors === null) { @@ -125760,8 +126504,8 @@ function validate185( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema170.anyOf[1].allOf[1].type, - parentSchema: schema170.anyOf[1].allOf[1], + schema: schema173.anyOf[1].allOf[1].type, + parentSchema: schema173.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -125794,8 +126538,8 @@ function validate185( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema170.anyOf[2].allOf[0].required, - parentSchema: schema170.anyOf[2].allOf[0], + schema: schema173.anyOf[2].allOf[0].required, + parentSchema: schema173.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -125819,7 +126563,7 @@ function validate185( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema170.anyOf[2].allOf[0].properties.url, + parentSchema: schema173.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -125836,8 +126580,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.url, + schema: schema173.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -125864,8 +126608,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.name, + schema: schema173.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.name, data: data42, }; if (vErrors === null) { @@ -125890,8 +126634,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.description, + schema: schema173.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.description, data: data43, }; if (vErrors === null) { @@ -125916,8 +126660,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.type, + schema: schema173.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -125940,11 +126684,11 @@ function validate185( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema170.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema173.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema170.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema170.anyOf[2].allOf[0].properties.type, + schema: schema173.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -125969,8 +126713,8 @@ function validate185( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema170.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.isPublic, + schema: schema173.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.isPublic, data: data45, }; if (vErrors === null) { @@ -126012,10 +126756,10 @@ function validate185( message: "must have required property '" + missing7 + "'", schema: - schema170.anyOf[2].allOf[0].properties.viewer + schema173.anyOf[2].allOf[0].properties.viewer .items.required, parentSchema: - schema170.anyOf[2].allOf[0].properties.viewer + schema173.anyOf[2].allOf[0].properties.viewer .items, data: data47, }; @@ -126044,7 +126788,7 @@ function validate185( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[2].allOf[0].properties + schema173.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -126065,10 +126809,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[2].allOf[0].properties + schema173.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema170.anyOf[2].allOf[0].properties + schema173.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -126092,10 +126836,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[2].allOf[0].properties.viewer.items + schema173.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema170.anyOf[2].allOf[0].properties.viewer.items, + schema173.anyOf[2].allOf[0].properties.viewer.items, data: data47, }; if (vErrors === null) { @@ -126118,8 +126862,8 @@ function validate185( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema170.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema170.anyOf[2].allOf[0].properties.viewer, + schema: schema173.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema173.anyOf[2].allOf[0].properties.viewer, data: data46, }; if (vErrors === null) { @@ -126164,10 +126908,10 @@ function validate185( missing8 + "'", schema: - schema170.anyOf[2].allOf[0].properties.owner + schema173.anyOf[2].allOf[0].properties.owner .items.required, parentSchema: - schema170.anyOf[2].allOf[0].properties.owner + schema173.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -126199,7 +126943,7 @@ function validate185( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[2].allOf[0].properties + schema173.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -126220,10 +126964,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[2].allOf[0].properties + schema173.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema170.anyOf[2].allOf[0].properties + schema173.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -126247,10 +126991,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[2].allOf[0].properties.owner.items + schema173.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema170.anyOf[2].allOf[0].properties.owner + schema173.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -126274,9 +127018,9 @@ function validate185( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema170.anyOf[2].allOf[0].properties.owner.type, + schema: schema173.anyOf[2].allOf[0].properties.owner.type, parentSchema: - schema170.anyOf[2].allOf[0].properties.owner, + schema173.anyOf[2].allOf[0].properties.owner, data: data49, }; if (vErrors === null) { @@ -126305,8 +127049,8 @@ function validate185( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema170.anyOf[2].allOf[0].type, - parentSchema: schema170.anyOf[2].allOf[0], + schema: schema173.anyOf[2].allOf[0].type, + parentSchema: schema173.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -126333,7 +127077,7 @@ function validate185( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema170.anyOf[2].allOf[1].properties.type, + parentSchema: schema173.anyOf[2].allOf[1].properties.type, data: data52, }; if (vErrors === null) { @@ -126362,7 +127106,7 @@ function validate185( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema170.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema173.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -126379,8 +127123,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema170.anyOf[2].allOf[1].properties.codeUrl, + schema: schema173.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema173.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -126433,7 +127177,7 @@ function validate185( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[2].allOf[1].properties.services + schema173.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -126454,10 +127198,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[2].allOf[1].properties.services + schema173.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema170.anyOf[2].allOf[1].properties.services + schema173.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -126488,10 +127232,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[2].allOf[1].properties.services + schema173.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema170.anyOf[2].allOf[1].properties.services + schema173.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data57, }; @@ -126523,10 +127267,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[2].allOf[1].properties.services + schema173.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema170.anyOf[2].allOf[1].properties.services + schema173.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -126555,16 +127299,16 @@ function validate185( keyword: 'enum', params: { allowedValues: - schema170.anyOf[2].allOf[1].properties.services + schema173.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema170.anyOf[2].allOf[1].properties.services + schema173.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema170.anyOf[2].allOf[1].properties.services + schema173.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -126590,10 +127334,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[2].allOf[1].properties.services.items + schema173.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema170.anyOf[2].allOf[1].properties.services.items, + schema173.anyOf[2].allOf[1].properties.services.items, data: data55, }; if (vErrors === null) { @@ -126616,8 +127360,8 @@ function validate185( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema170.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema170.anyOf[2].allOf[1].properties.services, + schema: schema173.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema173.anyOf[2].allOf[1].properties.services, data: data54, }; if (vErrors === null) { @@ -126641,8 +127385,8 @@ function validate185( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema170.anyOf[2].allOf[1].type, - parentSchema: schema170.anyOf[2].allOf[1], + schema: schema173.anyOf[2].allOf[1].type, + parentSchema: schema173.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -126675,8 +127419,8 @@ function validate185( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema170.anyOf[3].allOf[0].required, - parentSchema: schema170.anyOf[3].allOf[0], + schema: schema173.anyOf[3].allOf[0].required, + parentSchema: schema173.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -126700,7 +127444,7 @@ function validate185( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema170.anyOf[3].allOf[0].properties.url, + parentSchema: schema173.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -126717,8 +127461,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema170.anyOf[3].allOf[0].properties.url, + schema: schema173.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -126745,8 +127489,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema170.anyOf[3].allOf[0].properties.name, + schema: schema173.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.name, data: data60, }; if (vErrors === null) { @@ -126771,8 +127515,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema170.anyOf[3].allOf[0].properties.description, + schema: schema173.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.description, data: data61, }; if (vErrors === null) { @@ -126797,8 +127541,8 @@ function validate185( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema170.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema170.anyOf[3].allOf[0].properties.type, + schema: schema173.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -126822,11 +127566,11 @@ function validate185( keyword: 'enum', params: { allowedValues: - schema170.anyOf[3].allOf[0].properties.type.enum, + schema173.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema170.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema170.anyOf[3].allOf[0].properties.type, + schema: schema173.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema173.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -126851,8 +127595,8 @@ function validate185( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema170.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema170.anyOf[3].allOf[0].properties.isPublic, + schema: schema173.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema173.anyOf[3].allOf[0].properties.isPublic, data: data63, }; if (vErrors === null) { @@ -126896,10 +127640,10 @@ function validate185( missing10 + "'", schema: - schema170.anyOf[3].allOf[0].properties.viewer + schema173.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema170.anyOf[3].allOf[0].properties.viewer + schema173.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -126931,7 +127675,7 @@ function validate185( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[3].allOf[0].properties + schema173.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -126955,10 +127699,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[3].allOf[0].properties + schema173.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema170.anyOf[3].allOf[0].properties + schema173.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -126982,10 +127726,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[3].allOf[0].properties.viewer + schema173.anyOf[3].allOf[0].properties.viewer .items.type, parentSchema: - schema170.anyOf[3].allOf[0].properties.viewer + schema173.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -127010,9 +127754,9 @@ function validate185( params: { type: 'array' }, message: 'must be array', schema: - schema170.anyOf[3].allOf[0].properties.viewer.type, + schema173.anyOf[3].allOf[0].properties.viewer.type, parentSchema: - schema170.anyOf[3].allOf[0].properties.viewer, + schema173.anyOf[3].allOf[0].properties.viewer, data: data64, }; if (vErrors === null) { @@ -127060,10 +127804,10 @@ function validate185( missing11 + "'", schema: - schema170.anyOf[3].allOf[0].properties.owner + schema173.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema170.anyOf[3].allOf[0].properties.owner + schema173.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -127095,7 +127839,7 @@ function validate185( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[3].allOf[0] + schema173.anyOf[3].allOf[0] .properties.owner.items.properties .url, data: data69, @@ -127120,10 +127864,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[3].allOf[0].properties + schema173.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema170.anyOf[3].allOf[0].properties + schema173.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data69, }; @@ -127147,10 +127891,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[3].allOf[0].properties.owner + schema173.anyOf[3].allOf[0].properties.owner .items.type, parentSchema: - schema170.anyOf[3].allOf[0].properties.owner + schema173.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -127175,9 +127919,9 @@ function validate185( params: { type: 'array' }, message: 'must be array', schema: - schema170.anyOf[3].allOf[0].properties.owner.type, + schema173.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema170.anyOf[3].allOf[0].properties.owner, + schema173.anyOf[3].allOf[0].properties.owner, data: data67, }; if (vErrors === null) { @@ -127206,8 +127950,8 @@ function validate185( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema170.anyOf[3].allOf[0].type, - parentSchema: schema170.anyOf[3].allOf[0], + schema: schema173.anyOf[3].allOf[0].type, + parentSchema: schema173.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -127231,8 +127975,8 @@ function validate185( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema170.anyOf[3].allOf[1].required, - parentSchema: schema170.anyOf[3].allOf[1], + schema: schema173.anyOf[3].allOf[1].required, + parentSchema: schema173.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -127253,7 +127997,7 @@ function validate185( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema170.anyOf[3].allOf[1].properties.type, + parentSchema: schema173.anyOf[3].allOf[1].properties.type, data: data70, }; if (vErrors === null) { @@ -127295,10 +128039,10 @@ function validate185( message: "must have required property '" + missing13 + "'", schema: - schema170.anyOf[3].allOf[1].properties.devices.items + schema173.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema170.anyOf[3].allOf[1].properties.devices.items, + schema173.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -127325,7 +128069,7 @@ function validate185( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema170.anyOf[3].allOf[1].properties + schema173.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data73, }; @@ -127346,10 +128090,10 @@ function validate185( params: { type: 'string' }, message: 'must be string', schema: - schema170.anyOf[3].allOf[1].properties.devices + schema173.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema170.anyOf[3].allOf[1].properties.devices + schema173.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data73, }; @@ -127373,10 +128117,10 @@ function validate185( params: { type: 'object' }, message: 'must be object', schema: - schema170.anyOf[3].allOf[1].properties.devices.items + schema173.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema170.anyOf[3].allOf[1].properties.devices.items, + schema173.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -127399,8 +128143,8 @@ function validate185( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema170.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema170.anyOf[3].allOf[1].properties.devices, + schema: schema173.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema173.anyOf[3].allOf[1].properties.devices, data: data71, }; if (vErrors === null) { @@ -127424,8 +128168,8 @@ function validate185( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema170.anyOf[3].allOf[1].type, - parentSchema: schema170.anyOf[3].allOf[1], + schema: schema173.anyOf[3].allOf[1].type, + parentSchema: schema173.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -127450,8 +128194,8 @@ function validate185( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema170.anyOf, - parentSchema: schema170, + schema: schema173.anyOf, + parentSchema: schema173, data, }; if (vErrors === null) { @@ -127460,7 +128204,7 @@ function validate185( vErrors.push(err124); } errors++; - validate185.errors = vErrors; + validate188.errors = vErrors; return false; } else { errors = _errs0; @@ -127472,11 +128216,11 @@ function validate185( } } } - validate185.errors = vErrors; + validate188.errors = vErrors; return errors === 0; } -exports.validateGetDeviceResponse200Request = validate186; -const schema171 = { +exports.validateGetDeviceResponse200Request = validate189; +const schema174 = { title: 'Device', anyOf: [ { @@ -127786,7 +128530,7 @@ const schema171 = { '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate186( +function validate189( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -127810,8 +128554,8 @@ function validate186( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema171.anyOf[0].allOf[0].required, - parentSchema: schema171.anyOf[0].allOf[0], + schema: schema174.anyOf[0].allOf[0].required, + parentSchema: schema174.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -127831,8 +128575,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.name, + schema: schema174.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.name, data: data0, }; if (vErrors === null) { @@ -127857,8 +128601,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.description, + schema: schema174.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.description, data: data1, }; if (vErrors === null) { @@ -127883,8 +128627,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.type, + schema: schema174.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -127907,11 +128651,11 @@ function validate186( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema171.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema174.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema171.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema171.anyOf[0].allOf[0].properties.type, + schema: schema174.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -127936,8 +128680,8 @@ function validate186( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema171.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.isPublic, + schema: schema174.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.isPublic, data: data3, }; if (vErrors === null) { @@ -127978,10 +128722,10 @@ function validate186( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", schema: - schema171.anyOf[0].allOf[0].properties.viewer.items + schema174.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema171.anyOf[0].allOf[0].properties.viewer.items, + schema174.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -128008,7 +128752,7 @@ function validate186( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[0].allOf[0].properties.viewer + schema174.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -128029,10 +128773,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[0].allOf[0].properties.viewer + schema174.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema171.anyOf[0].allOf[0].properties.viewer + schema174.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -128056,9 +128800,9 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[0].allOf[0].properties.viewer.items.type, + schema174.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema171.anyOf[0].allOf[0].properties.viewer.items, + schema174.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -128081,8 +128825,8 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.viewer, + schema: schema174.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.viewer, data: data4, }; if (vErrors === null) { @@ -128125,10 +128869,10 @@ function validate186( message: "must have required property '" + missing2 + "'", schema: - schema171.anyOf[0].allOf[0].properties.owner.items + schema174.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema171.anyOf[0].allOf[0].properties.owner.items, + schema174.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -128155,7 +128899,7 @@ function validate186( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[0].allOf[0].properties.owner + schema174.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -128176,10 +128920,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[0].allOf[0].properties.owner + schema174.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema171.anyOf[0].allOf[0].properties.owner + schema174.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -128203,9 +128947,9 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[0].allOf[0].properties.owner.items.type, + schema174.anyOf[0].allOf[0].properties.owner.items.type, parentSchema: - schema171.anyOf[0].allOf[0].properties.owner.items, + schema174.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -128228,8 +128972,8 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema171.anyOf[0].allOf[0].properties.owner, + schema: schema174.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema174.anyOf[0].allOf[0].properties.owner, data: data7, }; if (vErrors === null) { @@ -128257,8 +129001,8 @@ function validate186( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema171.anyOf[0].allOf[0].type, - parentSchema: schema171.anyOf[0].allOf[0], + schema: schema174.anyOf[0].allOf[0].type, + parentSchema: schema174.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -128285,7 +129029,7 @@ function validate186( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema171.anyOf[0].allOf[1].properties.type, + parentSchema: schema174.anyOf[0].allOf[1].properties.type, data: data10, }; if (vErrors === null) { @@ -128314,7 +129058,7 @@ function validate186( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema171.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema174.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -128331,8 +129075,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema171.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema174.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema174.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -128378,7 +129122,7 @@ function validate186( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[0].allOf[1].properties.services + schema174.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data14, }; @@ -128399,10 +129143,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[0].allOf[1].properties.services.items + schema174.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema171.anyOf[0].allOf[1].properties.services.items + schema174.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -128433,10 +129177,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[0].allOf[1].properties.services.items + schema174.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema171.anyOf[0].allOf[1].properties.services.items + schema174.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data15, }; @@ -128468,10 +129212,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[0].allOf[1].properties.services.items + schema174.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema171.anyOf[0].allOf[1].properties.services.items + schema174.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -128500,15 +129244,15 @@ function validate186( keyword: 'enum', params: { allowedValues: - schema171.anyOf[0].allOf[1].properties.services + schema174.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema171.anyOf[0].allOf[1].properties.services.items + schema174.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema171.anyOf[0].allOf[1].properties.services.items + schema174.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -128533,9 +129277,9 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[0].allOf[1].properties.services.items.type, + schema174.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema171.anyOf[0].allOf[1].properties.services.items, + schema174.anyOf[0].allOf[1].properties.services.items, data: data13, }; if (vErrors === null) { @@ -128558,8 +129302,8 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema171.anyOf[0].allOf[1].properties.services, + schema: schema174.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema174.anyOf[0].allOf[1].properties.services, data: data12, }; if (vErrors === null) { @@ -128583,8 +129327,8 @@ function validate186( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema171.anyOf[0].allOf[1].type, - parentSchema: schema171.anyOf[0].allOf[1], + schema: schema174.anyOf[0].allOf[1].type, + parentSchema: schema174.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -128616,8 +129360,8 @@ function validate186( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema171.anyOf[1].allOf[0].required, - parentSchema: schema171.anyOf[1].allOf[0], + schema: schema174.anyOf[1].allOf[0].required, + parentSchema: schema174.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -128637,8 +129381,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.name, + schema: schema174.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.name, data: data17, }; if (vErrors === null) { @@ -128663,8 +129407,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.description, + schema: schema174.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.description, data: data18, }; if (vErrors === null) { @@ -128689,8 +129433,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.type, + schema: schema174.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -128713,11 +129457,11 @@ function validate186( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema171.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema174.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema171.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema171.anyOf[1].allOf[0].properties.type, + schema: schema174.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -128742,8 +129486,8 @@ function validate186( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema171.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.isPublic, + schema: schema174.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.isPublic, data: data20, }; if (vErrors === null) { @@ -128785,10 +129529,10 @@ function validate186( message: "must have required property '" + missing4 + "'", schema: - schema171.anyOf[1].allOf[0].properties.viewer.items + schema174.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema171.anyOf[1].allOf[0].properties.viewer.items, + schema174.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -128815,7 +129559,7 @@ function validate186( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[1].allOf[0].properties + schema174.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data23, }; @@ -128836,10 +129580,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[1].allOf[0].properties.viewer + schema174.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema171.anyOf[1].allOf[0].properties.viewer + schema174.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -128863,10 +129607,10 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[1].allOf[0].properties.viewer.items + schema174.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema171.anyOf[1].allOf[0].properties.viewer.items, + schema174.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -128889,8 +129633,8 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.viewer, + schema: schema174.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.viewer, data: data21, }; if (vErrors === null) { @@ -128933,10 +129677,10 @@ function validate186( message: "must have required property '" + missing5 + "'", schema: - schema171.anyOf[1].allOf[0].properties.owner.items + schema174.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema171.anyOf[1].allOf[0].properties.owner.items, + schema174.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -128964,7 +129708,7 @@ function validate186( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[1].allOf[0].properties + schema174.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data26, }; @@ -128985,10 +129729,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[1].allOf[0].properties.owner + schema174.anyOf[1].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema171.anyOf[1].allOf[0].properties.owner + schema174.anyOf[1].allOf[0].properties.owner .items.properties.url, data: data26, }; @@ -129012,10 +129756,10 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[1].allOf[0].properties.owner.items + schema174.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema171.anyOf[1].allOf[0].properties.owner.items, + schema174.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -129038,8 +129782,8 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema171.anyOf[1].allOf[0].properties.owner, + schema: schema174.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema174.anyOf[1].allOf[0].properties.owner, data: data24, }; if (vErrors === null) { @@ -129067,8 +129811,8 @@ function validate186( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema171.anyOf[1].allOf[0].type, - parentSchema: schema171.anyOf[1].allOf[0], + schema: schema174.anyOf[1].allOf[0].type, + parentSchema: schema174.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -129095,7 +129839,7 @@ function validate186( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema171.anyOf[1].allOf[1].properties.type, + parentSchema: schema174.anyOf[1].allOf[1].properties.type, data: data27, }; if (vErrors === null) { @@ -129124,7 +129868,7 @@ function validate186( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema171.anyOf[1].allOf[1].properties.experiment, + parentSchema: schema174.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -129141,8 +129885,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema171.anyOf[1].allOf[1].properties.experiment, + schema: schema174.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema174.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -129192,7 +129936,7 @@ function validate186( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[1].allOf[1].properties.services + schema174.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -129213,10 +129957,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[1].allOf[1].properties.services + schema174.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema171.anyOf[1].allOf[1].properties.services + schema174.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -129247,10 +129991,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[1].allOf[1].properties.services.items + schema174.anyOf[1].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema171.anyOf[1].allOf[1].properties.services.items + schema174.anyOf[1].allOf[1].properties.services.items .properties.serviceId, data: data32, }; @@ -129282,10 +130026,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[1].allOf[1].properties.services + schema174.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema171.anyOf[1].allOf[1].properties.services + schema174.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -129314,15 +130058,15 @@ function validate186( keyword: 'enum', params: { allowedValues: - schema171.anyOf[1].allOf[1].properties.services + schema174.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema171.anyOf[1].allOf[1].properties.services + schema174.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema171.anyOf[1].allOf[1].properties.services + schema174.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -129348,9 +130092,9 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[1].allOf[1].properties.services.items.type, + schema174.anyOf[1].allOf[1].properties.services.items.type, parentSchema: - schema171.anyOf[1].allOf[1].properties.services.items, + schema174.anyOf[1].allOf[1].properties.services.items, data: data30, }; if (vErrors === null) { @@ -129373,8 +130117,8 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema171.anyOf[1].allOf[1].properties.services, + schema: schema174.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema174.anyOf[1].allOf[1].properties.services, data: data29, }; if (vErrors === null) { @@ -129398,8 +130142,8 @@ function validate186( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema171.anyOf[1].allOf[1].type, - parentSchema: schema171.anyOf[1].allOf[1], + schema: schema174.anyOf[1].allOf[1].type, + parentSchema: schema174.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -129431,8 +130175,8 @@ function validate186( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema171.anyOf[2].allOf[0].required, - parentSchema: schema171.anyOf[2].allOf[0], + schema: schema174.anyOf[2].allOf[0].required, + parentSchema: schema174.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -129452,8 +130196,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.name, + schema: schema174.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.name, data: data34, }; if (vErrors === null) { @@ -129478,8 +130222,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.description, + schema: schema174.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.description, data: data35, }; if (vErrors === null) { @@ -129504,8 +130248,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.type, + schema: schema174.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -129528,11 +130272,11 @@ function validate186( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema171.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema174.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema171.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema171.anyOf[2].allOf[0].properties.type, + schema: schema174.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -129557,8 +130301,8 @@ function validate186( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema171.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.isPublic, + schema: schema174.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.isPublic, data: data37, }; if (vErrors === null) { @@ -129600,10 +130344,10 @@ function validate186( message: "must have required property '" + missing7 + "'", schema: - schema171.anyOf[2].allOf[0].properties.viewer.items + schema174.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema171.anyOf[2].allOf[0].properties.viewer.items, + schema174.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -129631,7 +130375,7 @@ function validate186( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[2].allOf[0].properties + schema174.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -129652,10 +130396,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[2].allOf[0].properties + schema174.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema171.anyOf[2].allOf[0].properties + schema174.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -129679,10 +130423,10 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[2].allOf[0].properties.viewer.items + schema174.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema171.anyOf[2].allOf[0].properties.viewer.items, + schema174.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -129705,8 +130449,8 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.viewer, + schema: schema174.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.viewer, data: data38, }; if (vErrors === null) { @@ -129749,10 +130493,10 @@ function validate186( message: "must have required property '" + missing8 + "'", schema: - schema171.anyOf[2].allOf[0].properties.owner.items + schema174.anyOf[2].allOf[0].properties.owner.items .required, parentSchema: - schema171.anyOf[2].allOf[0].properties.owner + schema174.anyOf[2].allOf[0].properties.owner .items, data: data42, }; @@ -129781,7 +130525,7 @@ function validate186( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[2].allOf[0].properties + schema174.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -129802,10 +130546,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[2].allOf[0].properties + schema174.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema171.anyOf[2].allOf[0].properties + schema174.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -129829,10 +130573,10 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[2].allOf[0].properties.owner.items + schema174.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema171.anyOf[2].allOf[0].properties.owner.items, + schema174.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -129855,8 +130599,8 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema171.anyOf[2].allOf[0].properties.owner, + schema: schema174.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema174.anyOf[2].allOf[0].properties.owner, data: data41, }; if (vErrors === null) { @@ -129884,8 +130628,8 @@ function validate186( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema171.anyOf[2].allOf[0].type, - parentSchema: schema171.anyOf[2].allOf[0], + schema: schema174.anyOf[2].allOf[0].type, + parentSchema: schema174.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -129912,7 +130656,7 @@ function validate186( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema171.anyOf[2].allOf[1].properties.type, + parentSchema: schema174.anyOf[2].allOf[1].properties.type, data: data44, }; if (vErrors === null) { @@ -129941,7 +130685,7 @@ function validate186( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema171.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema174.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -129958,8 +130702,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema171.anyOf[2].allOf[1].properties.codeUrl, + schema: schema174.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema174.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -130012,7 +130756,7 @@ function validate186( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[2].allOf[1].properties.services + schema174.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -130033,10 +130777,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[2].allOf[1].properties.services + schema174.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema171.anyOf[2].allOf[1].properties.services + schema174.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -130067,10 +130811,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[2].allOf[1].properties.services + schema174.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema171.anyOf[2].allOf[1].properties.services + schema174.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data49, }; @@ -130102,10 +130846,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[2].allOf[1].properties.services + schema174.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema171.anyOf[2].allOf[1].properties.services + schema174.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -130134,16 +130878,16 @@ function validate186( keyword: 'enum', params: { allowedValues: - schema171.anyOf[2].allOf[1].properties.services + schema174.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema171.anyOf[2].allOf[1].properties.services + schema174.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema171.anyOf[2].allOf[1].properties.services + schema174.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -130169,10 +130913,10 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[2].allOf[1].properties.services.items + schema174.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema171.anyOf[2].allOf[1].properties.services.items, + schema174.anyOf[2].allOf[1].properties.services.items, data: data47, }; if (vErrors === null) { @@ -130195,8 +130939,8 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema171.anyOf[2].allOf[1].properties.services, + schema: schema174.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema174.anyOf[2].allOf[1].properties.services, data: data46, }; if (vErrors === null) { @@ -130220,8 +130964,8 @@ function validate186( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema171.anyOf[2].allOf[1].type, - parentSchema: schema171.anyOf[2].allOf[1], + schema: schema174.anyOf[2].allOf[1].type, + parentSchema: schema174.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -130253,8 +130997,8 @@ function validate186( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema171.anyOf[3].allOf[0].required, - parentSchema: schema171.anyOf[3].allOf[0], + schema: schema174.anyOf[3].allOf[0].required, + parentSchema: schema174.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -130274,8 +131018,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema171.anyOf[3].allOf[0].properties.name, + schema: schema174.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.name, data: data51, }; if (vErrors === null) { @@ -130300,8 +131044,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema171.anyOf[3].allOf[0].properties.description, + schema: schema174.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.description, data: data52, }; if (vErrors === null) { @@ -130326,8 +131070,8 @@ function validate186( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema171.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema171.anyOf[3].allOf[0].properties.type, + schema: schema174.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -130350,11 +131094,11 @@ function validate186( schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema171.anyOf[3].allOf[0].properties.type.enum, + allowedValues: schema174.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema171.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema171.anyOf[3].allOf[0].properties.type, + schema: schema174.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema174.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -130379,8 +131123,8 @@ function validate186( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema171.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema171.anyOf[3].allOf[0].properties.isPublic, + schema: schema174.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.isPublic, data: data54, }; if (vErrors === null) { @@ -130422,10 +131166,10 @@ function validate186( message: "must have required property '" + missing10 + "'", schema: - schema171.anyOf[3].allOf[0].properties.viewer + schema174.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema171.anyOf[3].allOf[0].properties.viewer + schema174.anyOf[3].allOf[0].properties.viewer .items, data: data56, }; @@ -130454,7 +131198,7 @@ function validate186( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[3].allOf[0].properties + schema174.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -130475,10 +131219,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[3].allOf[0].properties + schema174.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema171.anyOf[3].allOf[0].properties + schema174.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -130502,10 +131246,10 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[3].allOf[0].properties.viewer.items + schema174.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema171.anyOf[3].allOf[0].properties.viewer.items, + schema174.anyOf[3].allOf[0].properties.viewer.items, data: data56, }; if (vErrors === null) { @@ -130528,8 +131272,8 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema171.anyOf[3].allOf[0].properties.viewer, + schema: schema174.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema174.anyOf[3].allOf[0].properties.viewer, data: data55, }; if (vErrors === null) { @@ -130574,10 +131318,10 @@ function validate186( missing11 + "'", schema: - schema171.anyOf[3].allOf[0].properties.owner + schema174.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema171.anyOf[3].allOf[0].properties.owner + schema174.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -130609,7 +131353,7 @@ function validate186( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[3].allOf[0].properties + schema174.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -130630,10 +131374,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[3].allOf[0].properties + schema174.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema171.anyOf[3].allOf[0].properties + schema174.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -130657,10 +131401,10 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[3].allOf[0].properties.owner.items + schema174.anyOf[3].allOf[0].properties.owner.items .type, parentSchema: - schema171.anyOf[3].allOf[0].properties.owner + schema174.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -130684,9 +131428,9 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[3].allOf[0].properties.owner.type, + schema: schema174.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema171.anyOf[3].allOf[0].properties.owner, + schema174.anyOf[3].allOf[0].properties.owner, data: data58, }; if (vErrors === null) { @@ -130714,8 +131458,8 @@ function validate186( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema171.anyOf[3].allOf[0].type, - parentSchema: schema171.anyOf[3].allOf[0], + schema: schema174.anyOf[3].allOf[0].type, + parentSchema: schema174.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -130739,8 +131483,8 @@ function validate186( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema171.anyOf[3].allOf[1].required, - parentSchema: schema171.anyOf[3].allOf[1], + schema: schema174.anyOf[3].allOf[1].required, + parentSchema: schema174.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -130761,7 +131505,7 @@ function validate186( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema171.anyOf[3].allOf[1].properties.type, + parentSchema: schema174.anyOf[3].allOf[1].properties.type, data: data61, }; if (vErrors === null) { @@ -130803,10 +131547,10 @@ function validate186( message: "must have required property '" + missing13 + "'", schema: - schema171.anyOf[3].allOf[1].properties.devices.items + schema174.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema171.anyOf[3].allOf[1].properties.devices.items, + schema174.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -130833,7 +131577,7 @@ function validate186( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema171.anyOf[3].allOf[1].properties + schema174.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data64, }; @@ -130854,10 +131598,10 @@ function validate186( params: { type: 'string' }, message: 'must be string', schema: - schema171.anyOf[3].allOf[1].properties.devices + schema174.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema171.anyOf[3].allOf[1].properties.devices + schema174.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -130881,10 +131625,10 @@ function validate186( params: { type: 'object' }, message: 'must be object', schema: - schema171.anyOf[3].allOf[1].properties.devices.items + schema174.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema171.anyOf[3].allOf[1].properties.devices.items, + schema174.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -130907,8 +131651,8 @@ function validate186( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema171.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema171.anyOf[3].allOf[1].properties.devices, + schema: schema174.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema174.anyOf[3].allOf[1].properties.devices, data: data62, }; if (vErrors === null) { @@ -130932,8 +131676,8 @@ function validate186( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema171.anyOf[3].allOf[1].type, - parentSchema: schema171.anyOf[3].allOf[1], + schema: schema174.anyOf[3].allOf[1].type, + parentSchema: schema174.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -130958,8 +131702,8 @@ function validate186( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema171.anyOf, - parentSchema: schema171, + schema: schema174.anyOf, + parentSchema: schema174, data, }; if (vErrors === null) { @@ -130968,7 +131712,7 @@ function validate186( vErrors.push(err109); } errors++; - validate186.errors = vErrors; + validate189.errors = vErrors; return false; } else { errors = _errs0; @@ -130980,11 +131724,11 @@ function validate186( } } } - validate186.errors = vErrors; + validate189.errors = vErrors; return errors === 0; } -exports.validateGetDeviceResponse200Response = validate187; -const schema172 = { +exports.validateGetDeviceResponse200Response = validate190; +const schema175 = { title: 'Device', anyOf: [ { @@ -131339,7 +132083,7 @@ const schema172 = { '#/paths//devices/{device_id}/get/responses/200/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate187( +function validate190( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -131364,8 +132108,8 @@ function validate187( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema172.anyOf[0].allOf[0].required, - parentSchema: schema172.anyOf[0].allOf[0], + schema: schema175.anyOf[0].allOf[0].required, + parentSchema: schema175.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -131389,7 +132133,7 @@ function validate187( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema172.anyOf[0].allOf[0].properties.url, + parentSchema: schema175.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -131406,8 +132150,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.url, + schema: schema175.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -131434,8 +132178,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.name, + schema: schema175.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.name, data: data1, }; if (vErrors === null) { @@ -131460,8 +132204,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.description, + schema: schema175.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.description, data: data2, }; if (vErrors === null) { @@ -131486,8 +132230,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.type, + schema: schema175.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -131510,11 +132254,11 @@ function validate187( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema172.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema175.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema172.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema172.anyOf[0].allOf[0].properties.type, + schema: schema175.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -131539,8 +132283,8 @@ function validate187( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema172.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.isPublic, + schema: schema175.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.isPublic, data: data4, }; if (vErrors === null) { @@ -131582,10 +132326,10 @@ function validate187( message: "must have required property '" + missing1 + "'", schema: - schema172.anyOf[0].allOf[0].properties.viewer.items + schema175.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema172.anyOf[0].allOf[0].properties.viewer.items, + schema175.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -131612,7 +132356,7 @@ function validate187( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[0].allOf[0].properties + schema175.anyOf[0].allOf[0].properties .viewer.items.properties.url, data: data7, }; @@ -131633,10 +132377,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[0].allOf[0].properties.viewer + schema175.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema172.anyOf[0].allOf[0].properties.viewer + schema175.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -131660,10 +132404,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[0].allOf[0].properties.viewer.items + schema175.anyOf[0].allOf[0].properties.viewer.items .type, parentSchema: - schema172.anyOf[0].allOf[0].properties.viewer.items, + schema175.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -131686,8 +132430,8 @@ function validate187( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema172.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.viewer, + schema: schema175.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.viewer, data: data5, }; if (vErrors === null) { @@ -131730,10 +132474,10 @@ function validate187( message: "must have required property '" + missing2 + "'", schema: - schema172.anyOf[0].allOf[0].properties.owner.items + schema175.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema172.anyOf[0].allOf[0].properties.owner.items, + schema175.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -131761,7 +132505,7 @@ function validate187( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[0].allOf[0].properties + schema175.anyOf[0].allOf[0].properties .owner.items.properties.url, data: data10, }; @@ -131782,10 +132526,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[0].allOf[0].properties.owner + schema175.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema172.anyOf[0].allOf[0].properties.owner + schema175.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data10, }; @@ -131809,10 +132553,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[0].allOf[0].properties.owner.items + schema175.anyOf[0].allOf[0].properties.owner.items .type, parentSchema: - schema172.anyOf[0].allOf[0].properties.owner.items, + schema175.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -131835,8 +132579,8 @@ function validate187( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema172.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema172.anyOf[0].allOf[0].properties.owner, + schema: schema175.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema175.anyOf[0].allOf[0].properties.owner, data: data8, }; if (vErrors === null) { @@ -131865,8 +132609,8 @@ function validate187( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema172.anyOf[0].allOf[0].type, - parentSchema: schema172.anyOf[0].allOf[0], + schema: schema175.anyOf[0].allOf[0].type, + parentSchema: schema175.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -131893,7 +132637,7 @@ function validate187( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema172.anyOf[0].allOf[1].properties.type, + parentSchema: schema175.anyOf[0].allOf[1].properties.type, data: data11, }; if (vErrors === null) { @@ -131922,7 +132666,7 @@ function validate187( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema172.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema175.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -131939,8 +132683,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema172.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema175.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema175.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -131986,7 +132730,7 @@ function validate187( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[0].allOf[1].properties.services + schema175.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data15, }; @@ -132007,10 +132751,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[0].allOf[1].properties.services.items + schema175.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema172.anyOf[0].allOf[1].properties.services.items + schema175.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -132041,10 +132785,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[0].allOf[1].properties.services.items + schema175.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema172.anyOf[0].allOf[1].properties.services.items + schema175.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data16, }; @@ -132076,10 +132820,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[0].allOf[1].properties.services.items + schema175.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema172.anyOf[0].allOf[1].properties.services.items + schema175.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -132108,15 +132852,15 @@ function validate187( keyword: 'enum', params: { allowedValues: - schema172.anyOf[0].allOf[1].properties.services + schema175.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema172.anyOf[0].allOf[1].properties.services.items + schema175.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema172.anyOf[0].allOf[1].properties.services.items + schema175.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -132141,9 +132885,9 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[0].allOf[1].properties.services.items.type, + schema175.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema172.anyOf[0].allOf[1].properties.services.items, + schema175.anyOf[0].allOf[1].properties.services.items, data: data14, }; if (vErrors === null) { @@ -132166,8 +132910,8 @@ function validate187( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema172.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema172.anyOf[0].allOf[1].properties.services, + schema: schema175.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema175.anyOf[0].allOf[1].properties.services, data: data13, }; if (vErrors === null) { @@ -132191,8 +132935,8 @@ function validate187( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema172.anyOf[0].allOf[1].type, - parentSchema: schema172.anyOf[0].allOf[1], + schema: schema175.anyOf[0].allOf[1].type, + parentSchema: schema175.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -132225,8 +132969,8 @@ function validate187( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema172.anyOf[1].allOf[0].required, - parentSchema: schema172.anyOf[1].allOf[0], + schema: schema175.anyOf[1].allOf[0].required, + parentSchema: schema175.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -132250,7 +132994,7 @@ function validate187( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema172.anyOf[1].allOf[0].properties.url, + parentSchema: schema175.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -132267,8 +133011,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.url, + schema: schema175.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -132295,8 +133039,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.name, + schema: schema175.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.name, data: data19, }; if (vErrors === null) { @@ -132321,8 +133065,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.description, + schema: schema175.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.description, data: data20, }; if (vErrors === null) { @@ -132347,8 +133091,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.type, + schema: schema175.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -132371,11 +133115,11 @@ function validate187( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema172.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema175.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema172.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema172.anyOf[1].allOf[0].properties.type, + schema: schema175.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -132400,8 +133144,8 @@ function validate187( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema172.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.isPublic, + schema: schema175.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.isPublic, data: data22, }; if (vErrors === null) { @@ -132443,10 +133187,10 @@ function validate187( message: "must have required property '" + missing4 + "'", schema: - schema172.anyOf[1].allOf[0].properties.viewer.items + schema175.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema172.anyOf[1].allOf[0].properties.viewer.items, + schema175.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -132474,7 +133218,7 @@ function validate187( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[1].allOf[0].properties + schema175.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -132495,10 +133239,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[1].allOf[0].properties + schema175.anyOf[1].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema172.anyOf[1].allOf[0].properties + schema175.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -132522,10 +133266,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[1].allOf[0].properties.viewer.items + schema175.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema172.anyOf[1].allOf[0].properties.viewer.items, + schema175.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -132548,8 +133292,8 @@ function validate187( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema172.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.viewer, + schema: schema175.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.viewer, data: data23, }; if (vErrors === null) { @@ -132592,10 +133336,10 @@ function validate187( message: "must have required property '" + missing5 + "'", schema: - schema172.anyOf[1].allOf[0].properties.owner.items + schema175.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema172.anyOf[1].allOf[0].properties.owner + schema175.anyOf[1].allOf[0].properties.owner .items, data: data27, }; @@ -132624,7 +133368,7 @@ function validate187( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[1].allOf[0].properties + schema175.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -132645,10 +133389,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[1].allOf[0].properties + schema175.anyOf[1].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema172.anyOf[1].allOf[0].properties + schema175.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -132672,10 +133416,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[1].allOf[0].properties.owner.items + schema175.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema172.anyOf[1].allOf[0].properties.owner.items, + schema175.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -132698,8 +133442,8 @@ function validate187( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema172.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema172.anyOf[1].allOf[0].properties.owner, + schema: schema175.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema175.anyOf[1].allOf[0].properties.owner, data: data26, }; if (vErrors === null) { @@ -132728,8 +133472,8 @@ function validate187( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema172.anyOf[1].allOf[0].type, - parentSchema: schema172.anyOf[1].allOf[0], + schema: schema175.anyOf[1].allOf[0].type, + parentSchema: schema175.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -132756,7 +133500,7 @@ function validate187( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema172.anyOf[1].allOf[1].properties.type, + parentSchema: schema175.anyOf[1].allOf[1].properties.type, data: data29, }; if (vErrors === null) { @@ -132781,8 +133525,8 @@ function validate187( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema172.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema172.anyOf[1].allOf[1].properties.connected, + schema: schema175.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema175.anyOf[1].allOf[1].properties.connected, data: data30, }; if (vErrors === null) { @@ -132833,7 +133577,7 @@ function validate187( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema172.anyOf[1].allOf[1].properties + schema175.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -132857,11 +133601,11 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[1].allOf[1].properties + schema175.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start .type, parentSchema: - schema172.anyOf[1].allOf[1].properties + schema175.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -132900,7 +133644,7 @@ function validate187( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema172.anyOf[1].allOf[1].properties + schema175.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -132924,11 +133668,11 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[1].allOf[1].properties + schema175.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end .type, parentSchema: - schema172.anyOf[1].allOf[1].properties + schema175.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -132955,10 +133699,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[1].allOf[1].properties.announcedAvailability + schema175.anyOf[1].allOf[1].properties.announcedAvailability .items.type, parentSchema: - schema172.anyOf[1].allOf[1].properties.announcedAvailability + schema175.anyOf[1].allOf[1].properties.announcedAvailability .items, data: data32, }; @@ -132984,9 +133728,9 @@ function validate187( params: { type: 'array' }, message: 'must be array', schema: - schema172.anyOf[1].allOf[1].properties.announcedAvailability.type, + schema175.anyOf[1].allOf[1].properties.announcedAvailability.type, parentSchema: - schema172.anyOf[1].allOf[1].properties.announcedAvailability, + schema175.anyOf[1].allOf[1].properties.announcedAvailability, data: data31, }; if (vErrors === null) { @@ -133017,7 +133761,7 @@ function validate187( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[1].allOf[1].properties.experiment, + schema175.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -133034,8 +133778,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema172.anyOf[1].allOf[1].properties.experiment, + schema: schema175.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema175.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -133088,7 +133832,7 @@ function validate187( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[1].allOf[1].properties + schema175.anyOf[1].allOf[1].properties .services.items.properties.serviceType, data: data38, }; @@ -133112,10 +133856,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[1].allOf[1].properties.services + schema175.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema172.anyOf[1].allOf[1].properties.services + schema175.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -133146,10 +133890,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[1].allOf[1].properties.services + schema175.anyOf[1].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema172.anyOf[1].allOf[1].properties.services + schema175.anyOf[1].allOf[1].properties.services .items.properties.serviceId, data: data39, }; @@ -133181,10 +133925,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[1].allOf[1].properties.services + schema175.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema172.anyOf[1].allOf[1].properties.services + schema175.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -133213,17 +133957,17 @@ function validate187( keyword: 'enum', params: { allowedValues: - schema172.anyOf[1].allOf[1].properties + schema175.anyOf[1].allOf[1].properties .services.items.properties.serviceDirection .enum, }, message: 'must be equal to one of the allowed values', schema: - schema172.anyOf[1].allOf[1].properties.services + schema175.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema172.anyOf[1].allOf[1].properties.services + schema175.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -133249,10 +133993,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[1].allOf[1].properties.services.items + schema175.anyOf[1].allOf[1].properties.services.items .type, parentSchema: - schema172.anyOf[1].allOf[1].properties.services.items, + schema175.anyOf[1].allOf[1].properties.services.items, data: data37, }; if (vErrors === null) { @@ -133275,8 +134019,8 @@ function validate187( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema172.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema172.anyOf[1].allOf[1].properties.services, + schema: schema175.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema175.anyOf[1].allOf[1].properties.services, data: data36, }; if (vErrors === null) { @@ -133302,8 +134046,8 @@ function validate187( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema172.anyOf[1].allOf[1].type, - parentSchema: schema172.anyOf[1].allOf[1], + schema: schema175.anyOf[1].allOf[1].type, + parentSchema: schema175.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -133336,8 +134080,8 @@ function validate187( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema172.anyOf[2].allOf[0].required, - parentSchema: schema172.anyOf[2].allOf[0], + schema: schema175.anyOf[2].allOf[0].required, + parentSchema: schema175.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -133361,7 +134105,7 @@ function validate187( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema172.anyOf[2].allOf[0].properties.url, + parentSchema: schema175.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -133378,8 +134122,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.url, + schema: schema175.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -133406,8 +134150,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.name, + schema: schema175.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.name, data: data42, }; if (vErrors === null) { @@ -133432,8 +134176,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.description, + schema: schema175.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.description, data: data43, }; if (vErrors === null) { @@ -133458,8 +134202,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.type, + schema: schema175.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -133482,11 +134226,11 @@ function validate187( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema172.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema175.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema172.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema172.anyOf[2].allOf[0].properties.type, + schema: schema175.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -133511,8 +134255,8 @@ function validate187( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema172.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.isPublic, + schema: schema175.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.isPublic, data: data45, }; if (vErrors === null) { @@ -133554,10 +134298,10 @@ function validate187( message: "must have required property '" + missing7 + "'", schema: - schema172.anyOf[2].allOf[0].properties.viewer + schema175.anyOf[2].allOf[0].properties.viewer .items.required, parentSchema: - schema172.anyOf[2].allOf[0].properties.viewer + schema175.anyOf[2].allOf[0].properties.viewer .items, data: data47, }; @@ -133586,7 +134330,7 @@ function validate187( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[2].allOf[0].properties + schema175.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -133607,10 +134351,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[2].allOf[0].properties + schema175.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema172.anyOf[2].allOf[0].properties + schema175.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -133634,10 +134378,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[2].allOf[0].properties.viewer.items + schema175.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema172.anyOf[2].allOf[0].properties.viewer.items, + schema175.anyOf[2].allOf[0].properties.viewer.items, data: data47, }; if (vErrors === null) { @@ -133660,8 +134404,8 @@ function validate187( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema172.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema172.anyOf[2].allOf[0].properties.viewer, + schema: schema175.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema175.anyOf[2].allOf[0].properties.viewer, data: data46, }; if (vErrors === null) { @@ -133706,10 +134450,10 @@ function validate187( missing8 + "'", schema: - schema172.anyOf[2].allOf[0].properties.owner + schema175.anyOf[2].allOf[0].properties.owner .items.required, parentSchema: - schema172.anyOf[2].allOf[0].properties.owner + schema175.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -133741,7 +134485,7 @@ function validate187( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[2].allOf[0].properties + schema175.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -133762,10 +134506,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[2].allOf[0].properties + schema175.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema172.anyOf[2].allOf[0].properties + schema175.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -133789,10 +134533,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[2].allOf[0].properties.owner.items + schema175.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema172.anyOf[2].allOf[0].properties.owner + schema175.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -133816,9 +134560,9 @@ function validate187( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema172.anyOf[2].allOf[0].properties.owner.type, + schema: schema175.anyOf[2].allOf[0].properties.owner.type, parentSchema: - schema172.anyOf[2].allOf[0].properties.owner, + schema175.anyOf[2].allOf[0].properties.owner, data: data49, }; if (vErrors === null) { @@ -133847,8 +134591,8 @@ function validate187( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema172.anyOf[2].allOf[0].type, - parentSchema: schema172.anyOf[2].allOf[0], + schema: schema175.anyOf[2].allOf[0].type, + parentSchema: schema175.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -133875,7 +134619,7 @@ function validate187( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema172.anyOf[2].allOf[1].properties.type, + parentSchema: schema175.anyOf[2].allOf[1].properties.type, data: data52, }; if (vErrors === null) { @@ -133904,7 +134648,7 @@ function validate187( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema172.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema175.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -133921,8 +134665,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema172.anyOf[2].allOf[1].properties.codeUrl, + schema: schema175.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema175.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -133975,7 +134719,7 @@ function validate187( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[2].allOf[1].properties.services + schema175.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -133996,10 +134740,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[2].allOf[1].properties.services + schema175.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema172.anyOf[2].allOf[1].properties.services + schema175.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -134030,10 +134774,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[2].allOf[1].properties.services + schema175.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema172.anyOf[2].allOf[1].properties.services + schema175.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data57, }; @@ -134065,10 +134809,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[2].allOf[1].properties.services + schema175.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema172.anyOf[2].allOf[1].properties.services + schema175.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -134097,16 +134841,16 @@ function validate187( keyword: 'enum', params: { allowedValues: - schema172.anyOf[2].allOf[1].properties.services + schema175.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema172.anyOf[2].allOf[1].properties.services + schema175.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema172.anyOf[2].allOf[1].properties.services + schema175.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -134132,10 +134876,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[2].allOf[1].properties.services.items + schema175.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema172.anyOf[2].allOf[1].properties.services.items, + schema175.anyOf[2].allOf[1].properties.services.items, data: data55, }; if (vErrors === null) { @@ -134158,8 +134902,8 @@ function validate187( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema172.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema172.anyOf[2].allOf[1].properties.services, + schema: schema175.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema175.anyOf[2].allOf[1].properties.services, data: data54, }; if (vErrors === null) { @@ -134183,8 +134927,8 @@ function validate187( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema172.anyOf[2].allOf[1].type, - parentSchema: schema172.anyOf[2].allOf[1], + schema: schema175.anyOf[2].allOf[1].type, + parentSchema: schema175.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -134217,8 +134961,8 @@ function validate187( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema172.anyOf[3].allOf[0].required, - parentSchema: schema172.anyOf[3].allOf[0], + schema: schema175.anyOf[3].allOf[0].required, + parentSchema: schema175.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -134242,7 +134986,7 @@ function validate187( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema172.anyOf[3].allOf[0].properties.url, + parentSchema: schema175.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -134259,8 +135003,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema172.anyOf[3].allOf[0].properties.url, + schema: schema175.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -134287,8 +135031,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema172.anyOf[3].allOf[0].properties.name, + schema: schema175.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.name, data: data60, }; if (vErrors === null) { @@ -134313,8 +135057,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema172.anyOf[3].allOf[0].properties.description, + schema: schema175.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.description, data: data61, }; if (vErrors === null) { @@ -134339,8 +135083,8 @@ function validate187( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema172.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema172.anyOf[3].allOf[0].properties.type, + schema: schema175.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -134364,11 +135108,11 @@ function validate187( keyword: 'enum', params: { allowedValues: - schema172.anyOf[3].allOf[0].properties.type.enum, + schema175.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema172.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema172.anyOf[3].allOf[0].properties.type, + schema: schema175.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema175.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -134393,8 +135137,8 @@ function validate187( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema172.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema172.anyOf[3].allOf[0].properties.isPublic, + schema: schema175.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema175.anyOf[3].allOf[0].properties.isPublic, data: data63, }; if (vErrors === null) { @@ -134438,10 +135182,10 @@ function validate187( missing10 + "'", schema: - schema172.anyOf[3].allOf[0].properties.viewer + schema175.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema172.anyOf[3].allOf[0].properties.viewer + schema175.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -134473,7 +135217,7 @@ function validate187( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[3].allOf[0].properties + schema175.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -134497,10 +135241,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[3].allOf[0].properties + schema175.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema172.anyOf[3].allOf[0].properties + schema175.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -134524,10 +135268,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[3].allOf[0].properties.viewer + schema175.anyOf[3].allOf[0].properties.viewer .items.type, parentSchema: - schema172.anyOf[3].allOf[0].properties.viewer + schema175.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -134552,9 +135296,9 @@ function validate187( params: { type: 'array' }, message: 'must be array', schema: - schema172.anyOf[3].allOf[0].properties.viewer.type, + schema175.anyOf[3].allOf[0].properties.viewer.type, parentSchema: - schema172.anyOf[3].allOf[0].properties.viewer, + schema175.anyOf[3].allOf[0].properties.viewer, data: data64, }; if (vErrors === null) { @@ -134602,10 +135346,10 @@ function validate187( missing11 + "'", schema: - schema172.anyOf[3].allOf[0].properties.owner + schema175.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema172.anyOf[3].allOf[0].properties.owner + schema175.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -134637,7 +135381,7 @@ function validate187( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[3].allOf[0] + schema175.anyOf[3].allOf[0] .properties.owner.items.properties .url, data: data69, @@ -134662,10 +135406,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[3].allOf[0].properties + schema175.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema172.anyOf[3].allOf[0].properties + schema175.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data69, }; @@ -134689,10 +135433,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[3].allOf[0].properties.owner + schema175.anyOf[3].allOf[0].properties.owner .items.type, parentSchema: - schema172.anyOf[3].allOf[0].properties.owner + schema175.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -134717,9 +135461,9 @@ function validate187( params: { type: 'array' }, message: 'must be array', schema: - schema172.anyOf[3].allOf[0].properties.owner.type, + schema175.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema172.anyOf[3].allOf[0].properties.owner, + schema175.anyOf[3].allOf[0].properties.owner, data: data67, }; if (vErrors === null) { @@ -134748,8 +135492,8 @@ function validate187( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema172.anyOf[3].allOf[0].type, - parentSchema: schema172.anyOf[3].allOf[0], + schema: schema175.anyOf[3].allOf[0].type, + parentSchema: schema175.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -134773,8 +135517,8 @@ function validate187( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema172.anyOf[3].allOf[1].required, - parentSchema: schema172.anyOf[3].allOf[1], + schema: schema175.anyOf[3].allOf[1].required, + parentSchema: schema175.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -134795,7 +135539,7 @@ function validate187( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema172.anyOf[3].allOf[1].properties.type, + parentSchema: schema175.anyOf[3].allOf[1].properties.type, data: data70, }; if (vErrors === null) { @@ -134837,10 +135581,10 @@ function validate187( message: "must have required property '" + missing13 + "'", schema: - schema172.anyOf[3].allOf[1].properties.devices.items + schema175.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema172.anyOf[3].allOf[1].properties.devices.items, + schema175.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -134867,7 +135611,7 @@ function validate187( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema172.anyOf[3].allOf[1].properties + schema175.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data73, }; @@ -134888,10 +135632,10 @@ function validate187( params: { type: 'string' }, message: 'must be string', schema: - schema172.anyOf[3].allOf[1].properties.devices + schema175.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema172.anyOf[3].allOf[1].properties.devices + schema175.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data73, }; @@ -134915,10 +135659,10 @@ function validate187( params: { type: 'object' }, message: 'must be object', schema: - schema172.anyOf[3].allOf[1].properties.devices.items + schema175.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema172.anyOf[3].allOf[1].properties.devices.items, + schema175.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -134941,8 +135685,8 @@ function validate187( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema172.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema172.anyOf[3].allOf[1].properties.devices, + schema: schema175.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema175.anyOf[3].allOf[1].properties.devices, data: data71, }; if (vErrors === null) { @@ -134966,8 +135710,8 @@ function validate187( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema172.anyOf[3].allOf[1].type, - parentSchema: schema172.anyOf[3].allOf[1], + schema: schema175.anyOf[3].allOf[1].type, + parentSchema: schema175.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -134992,8 +135736,8 @@ function validate187( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema172.anyOf, - parentSchema: schema172, + schema: schema175.anyOf, + parentSchema: schema175, data, }; if (vErrors === null) { @@ -135002,7 +135746,7 @@ function validate187( vErrors.push(err124); } errors++; - validate187.errors = vErrors; + validate190.errors = vErrors; return false; } else { errors = _errs0; @@ -135014,11 +135758,11 @@ function validate187( } } } - validate187.errors = vErrors; + validate190.errors = vErrors; return errors === 0; } -exports.validateUpdateDeviceBodyRequest = validate188; -const schema173 = { +exports.validateUpdateDeviceBodyRequest = validate191; +const schema176 = { title: 'Device Update', anyOf: [ { @@ -135318,7 +136062,7 @@ const schema173 = { '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate188( +function validate191( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -135338,8 +136082,8 @@ function validate188( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema173.anyOf[0].allOf[0].required, - parentSchema: schema173.anyOf[0].allOf[0], + schema: schema176.anyOf[0].allOf[0].required, + parentSchema: schema176.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -135359,8 +136103,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.name, + schema: schema176.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.name, data: data0, }; if (vErrors === null) { @@ -135385,8 +136129,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.description, + schema: schema176.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.description, data: data1, }; if (vErrors === null) { @@ -135411,8 +136155,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.type, + schema: schema176.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -135435,11 +136179,11 @@ function validate188( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema173.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema176.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema173.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema173.anyOf[0].allOf[0].properties.type, + schema: schema176.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -135464,8 +136208,8 @@ function validate188( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema173.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.isPublic, + schema: schema176.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.isPublic, data: data3, }; if (vErrors === null) { @@ -135506,10 +136250,10 @@ function validate188( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", schema: - schema173.anyOf[0].allOf[0].properties.viewer.items + schema176.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema173.anyOf[0].allOf[0].properties.viewer.items, + schema176.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -135536,7 +136280,7 @@ function validate188( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[0].allOf[0].properties.viewer + schema176.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -135557,10 +136301,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[0].allOf[0].properties.viewer + schema176.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema173.anyOf[0].allOf[0].properties.viewer + schema176.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -135584,9 +136328,9 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[0].allOf[0].properties.viewer.items.type, + schema176.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema173.anyOf[0].allOf[0].properties.viewer.items, + schema176.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -135609,8 +136353,8 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.viewer, + schema: schema176.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.viewer, data: data4, }; if (vErrors === null) { @@ -135653,10 +136397,10 @@ function validate188( message: "must have required property '" + missing2 + "'", schema: - schema173.anyOf[0].allOf[0].properties.owner.items + schema176.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema173.anyOf[0].allOf[0].properties.owner.items, + schema176.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -135683,7 +136427,7 @@ function validate188( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[0].allOf[0].properties.owner + schema176.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -135704,10 +136448,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[0].allOf[0].properties.owner + schema176.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema173.anyOf[0].allOf[0].properties.owner + schema176.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -135731,9 +136475,9 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[0].allOf[0].properties.owner.items.type, + schema176.anyOf[0].allOf[0].properties.owner.items.type, parentSchema: - schema173.anyOf[0].allOf[0].properties.owner.items, + schema176.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -135756,8 +136500,8 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema173.anyOf[0].allOf[0].properties.owner, + schema: schema176.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema176.anyOf[0].allOf[0].properties.owner, data: data7, }; if (vErrors === null) { @@ -135785,8 +136529,8 @@ function validate188( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema173.anyOf[0].allOf[0].type, - parentSchema: schema173.anyOf[0].allOf[0], + schema: schema176.anyOf[0].allOf[0].type, + parentSchema: schema176.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -135813,7 +136557,7 @@ function validate188( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema173.anyOf[0].allOf[1].properties.type, + parentSchema: schema176.anyOf[0].allOf[1].properties.type, data: data10, }; if (vErrors === null) { @@ -135842,7 +136586,7 @@ function validate188( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema173.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema176.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -135859,8 +136603,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema173.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema176.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema176.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -135906,7 +136650,7 @@ function validate188( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[0].allOf[1].properties.services + schema176.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data14, }; @@ -135927,10 +136671,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[0].allOf[1].properties.services.items + schema176.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema173.anyOf[0].allOf[1].properties.services.items + schema176.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -135961,10 +136705,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[0].allOf[1].properties.services.items + schema176.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema173.anyOf[0].allOf[1].properties.services.items + schema176.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data15, }; @@ -135996,10 +136740,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[0].allOf[1].properties.services.items + schema176.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema173.anyOf[0].allOf[1].properties.services.items + schema176.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -136028,15 +136772,15 @@ function validate188( keyword: 'enum', params: { allowedValues: - schema173.anyOf[0].allOf[1].properties.services + schema176.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema173.anyOf[0].allOf[1].properties.services.items + schema176.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema173.anyOf[0].allOf[1].properties.services.items + schema176.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -136061,9 +136805,9 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[0].allOf[1].properties.services.items.type, + schema176.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema173.anyOf[0].allOf[1].properties.services.items, + schema176.anyOf[0].allOf[1].properties.services.items, data: data13, }; if (vErrors === null) { @@ -136086,8 +136830,8 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema173.anyOf[0].allOf[1].properties.services, + schema: schema176.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema176.anyOf[0].allOf[1].properties.services, data: data12, }; if (vErrors === null) { @@ -136111,8 +136855,8 @@ function validate188( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema173.anyOf[0].allOf[1].type, - parentSchema: schema173.anyOf[0].allOf[1], + schema: schema176.anyOf[0].allOf[1].type, + parentSchema: schema176.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -136140,8 +136884,8 @@ function validate188( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema173.anyOf[1].allOf[0].required, - parentSchema: schema173.anyOf[1].allOf[0], + schema: schema176.anyOf[1].allOf[0].required, + parentSchema: schema176.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -136161,8 +136905,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.name, + schema: schema176.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.name, data: data17, }; if (vErrors === null) { @@ -136187,8 +136931,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.description, + schema: schema176.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.description, data: data18, }; if (vErrors === null) { @@ -136213,8 +136957,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.type, + schema: schema176.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -136237,11 +136981,11 @@ function validate188( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema173.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema176.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema173.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema173.anyOf[1].allOf[0].properties.type, + schema: schema176.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -136266,8 +137010,8 @@ function validate188( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema173.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.isPublic, + schema: schema176.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.isPublic, data: data20, }; if (vErrors === null) { @@ -136309,10 +137053,10 @@ function validate188( message: "must have required property '" + missing4 + "'", schema: - schema173.anyOf[1].allOf[0].properties.viewer.items + schema176.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema173.anyOf[1].allOf[0].properties.viewer.items, + schema176.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -136339,7 +137083,7 @@ function validate188( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[1].allOf[0].properties + schema176.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data23, }; @@ -136360,10 +137104,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[1].allOf[0].properties.viewer + schema176.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema173.anyOf[1].allOf[0].properties.viewer + schema176.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -136387,10 +137131,10 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[1].allOf[0].properties.viewer.items + schema176.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema173.anyOf[1].allOf[0].properties.viewer.items, + schema176.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -136413,8 +137157,8 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.viewer, + schema: schema176.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.viewer, data: data21, }; if (vErrors === null) { @@ -136457,10 +137201,10 @@ function validate188( message: "must have required property '" + missing5 + "'", schema: - schema173.anyOf[1].allOf[0].properties.owner.items + schema176.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema173.anyOf[1].allOf[0].properties.owner.items, + schema176.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -136488,7 +137232,7 @@ function validate188( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[1].allOf[0].properties + schema176.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data26, }; @@ -136509,10 +137253,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[1].allOf[0].properties.owner + schema176.anyOf[1].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema173.anyOf[1].allOf[0].properties.owner + schema176.anyOf[1].allOf[0].properties.owner .items.properties.url, data: data26, }; @@ -136536,10 +137280,10 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[1].allOf[0].properties.owner.items + schema176.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema173.anyOf[1].allOf[0].properties.owner.items, + schema176.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -136562,8 +137306,8 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema173.anyOf[1].allOf[0].properties.owner, + schema: schema176.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema176.anyOf[1].allOf[0].properties.owner, data: data24, }; if (vErrors === null) { @@ -136591,8 +137335,8 @@ function validate188( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema173.anyOf[1].allOf[0].type, - parentSchema: schema173.anyOf[1].allOf[0], + schema: schema176.anyOf[1].allOf[0].type, + parentSchema: schema176.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -136619,7 +137363,7 @@ function validate188( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema173.anyOf[1].allOf[1].properties.type, + parentSchema: schema176.anyOf[1].allOf[1].properties.type, data: data27, }; if (vErrors === null) { @@ -136648,7 +137392,7 @@ function validate188( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema173.anyOf[1].allOf[1].properties.experiment, + parentSchema: schema176.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -136665,8 +137409,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema173.anyOf[1].allOf[1].properties.experiment, + schema: schema176.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema176.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -136716,7 +137460,7 @@ function validate188( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[1].allOf[1].properties.services + schema176.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -136737,10 +137481,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[1].allOf[1].properties.services + schema176.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema173.anyOf[1].allOf[1].properties.services + schema176.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -136771,10 +137515,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[1].allOf[1].properties.services.items + schema176.anyOf[1].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema173.anyOf[1].allOf[1].properties.services.items + schema176.anyOf[1].allOf[1].properties.services.items .properties.serviceId, data: data32, }; @@ -136806,10 +137550,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[1].allOf[1].properties.services + schema176.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema173.anyOf[1].allOf[1].properties.services + schema176.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -136838,15 +137582,15 @@ function validate188( keyword: 'enum', params: { allowedValues: - schema173.anyOf[1].allOf[1].properties.services + schema176.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema173.anyOf[1].allOf[1].properties.services + schema176.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema173.anyOf[1].allOf[1].properties.services + schema176.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -136872,9 +137616,9 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[1].allOf[1].properties.services.items.type, + schema176.anyOf[1].allOf[1].properties.services.items.type, parentSchema: - schema173.anyOf[1].allOf[1].properties.services.items, + schema176.anyOf[1].allOf[1].properties.services.items, data: data30, }; if (vErrors === null) { @@ -136897,8 +137641,8 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema173.anyOf[1].allOf[1].properties.services, + schema: schema176.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema176.anyOf[1].allOf[1].properties.services, data: data29, }; if (vErrors === null) { @@ -136922,8 +137666,8 @@ function validate188( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema173.anyOf[1].allOf[1].type, - parentSchema: schema173.anyOf[1].allOf[1], + schema: schema176.anyOf[1].allOf[1].type, + parentSchema: schema176.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -136951,8 +137695,8 @@ function validate188( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema173.anyOf[2].allOf[0].required, - parentSchema: schema173.anyOf[2].allOf[0], + schema: schema176.anyOf[2].allOf[0].required, + parentSchema: schema176.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -136972,8 +137716,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.name, + schema: schema176.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.name, data: data34, }; if (vErrors === null) { @@ -136998,8 +137742,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.description, + schema: schema176.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.description, data: data35, }; if (vErrors === null) { @@ -137024,8 +137768,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.type, + schema: schema176.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -137048,11 +137792,11 @@ function validate188( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema173.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema176.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema173.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema173.anyOf[2].allOf[0].properties.type, + schema: schema176.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -137077,8 +137821,8 @@ function validate188( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema173.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.isPublic, + schema: schema176.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.isPublic, data: data37, }; if (vErrors === null) { @@ -137120,10 +137864,10 @@ function validate188( message: "must have required property '" + missing7 + "'", schema: - schema173.anyOf[2].allOf[0].properties.viewer.items + schema176.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema173.anyOf[2].allOf[0].properties.viewer.items, + schema176.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -137151,7 +137895,7 @@ function validate188( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[2].allOf[0].properties + schema176.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -137172,10 +137916,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[2].allOf[0].properties + schema176.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema173.anyOf[2].allOf[0].properties + schema176.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -137199,10 +137943,10 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[2].allOf[0].properties.viewer.items + schema176.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema173.anyOf[2].allOf[0].properties.viewer.items, + schema176.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -137225,8 +137969,8 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.viewer, + schema: schema176.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.viewer, data: data38, }; if (vErrors === null) { @@ -137269,10 +138013,10 @@ function validate188( message: "must have required property '" + missing8 + "'", schema: - schema173.anyOf[2].allOf[0].properties.owner.items + schema176.anyOf[2].allOf[0].properties.owner.items .required, parentSchema: - schema173.anyOf[2].allOf[0].properties.owner + schema176.anyOf[2].allOf[0].properties.owner .items, data: data42, }; @@ -137301,7 +138045,7 @@ function validate188( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[2].allOf[0].properties + schema176.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -137322,10 +138066,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[2].allOf[0].properties + schema176.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema173.anyOf[2].allOf[0].properties + schema176.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -137349,10 +138093,10 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[2].allOf[0].properties.owner.items + schema176.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema173.anyOf[2].allOf[0].properties.owner.items, + schema176.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -137375,8 +138119,8 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema173.anyOf[2].allOf[0].properties.owner, + schema: schema176.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema176.anyOf[2].allOf[0].properties.owner, data: data41, }; if (vErrors === null) { @@ -137404,8 +138148,8 @@ function validate188( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema173.anyOf[2].allOf[0].type, - parentSchema: schema173.anyOf[2].allOf[0], + schema: schema176.anyOf[2].allOf[0].type, + parentSchema: schema176.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -137432,7 +138176,7 @@ function validate188( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema173.anyOf[2].allOf[1].properties.type, + parentSchema: schema176.anyOf[2].allOf[1].properties.type, data: data44, }; if (vErrors === null) { @@ -137461,7 +138205,7 @@ function validate188( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema173.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema176.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -137478,8 +138222,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema173.anyOf[2].allOf[1].properties.codeUrl, + schema: schema176.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema176.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -137532,7 +138276,7 @@ function validate188( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[2].allOf[1].properties.services + schema176.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -137553,10 +138297,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[2].allOf[1].properties.services + schema176.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema173.anyOf[2].allOf[1].properties.services + schema176.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -137587,10 +138331,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[2].allOf[1].properties.services + schema176.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema173.anyOf[2].allOf[1].properties.services + schema176.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data49, }; @@ -137622,10 +138366,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[2].allOf[1].properties.services + schema176.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema173.anyOf[2].allOf[1].properties.services + schema176.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -137654,16 +138398,16 @@ function validate188( keyword: 'enum', params: { allowedValues: - schema173.anyOf[2].allOf[1].properties.services + schema176.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema173.anyOf[2].allOf[1].properties.services + schema176.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema173.anyOf[2].allOf[1].properties.services + schema176.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -137689,10 +138433,10 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[2].allOf[1].properties.services.items + schema176.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema173.anyOf[2].allOf[1].properties.services.items, + schema176.anyOf[2].allOf[1].properties.services.items, data: data47, }; if (vErrors === null) { @@ -137715,8 +138459,8 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema173.anyOf[2].allOf[1].properties.services, + schema: schema176.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema176.anyOf[2].allOf[1].properties.services, data: data46, }; if (vErrors === null) { @@ -137740,8 +138484,8 @@ function validate188( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema173.anyOf[2].allOf[1].type, - parentSchema: schema173.anyOf[2].allOf[1], + schema: schema176.anyOf[2].allOf[1].type, + parentSchema: schema176.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -137769,8 +138513,8 @@ function validate188( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema173.anyOf[3].allOf[0].required, - parentSchema: schema173.anyOf[3].allOf[0], + schema: schema176.anyOf[3].allOf[0].required, + parentSchema: schema176.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -137790,8 +138534,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema173.anyOf[3].allOf[0].properties.name, + schema: schema176.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.name, data: data51, }; if (vErrors === null) { @@ -137816,8 +138560,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema173.anyOf[3].allOf[0].properties.description, + schema: schema176.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.description, data: data52, }; if (vErrors === null) { @@ -137842,8 +138586,8 @@ function validate188( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema173.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema173.anyOf[3].allOf[0].properties.type, + schema: schema176.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -137866,11 +138610,11 @@ function validate188( schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema173.anyOf[3].allOf[0].properties.type.enum, + allowedValues: schema176.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema173.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema173.anyOf[3].allOf[0].properties.type, + schema: schema176.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema176.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -137895,8 +138639,8 @@ function validate188( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema173.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema173.anyOf[3].allOf[0].properties.isPublic, + schema: schema176.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.isPublic, data: data54, }; if (vErrors === null) { @@ -137938,10 +138682,10 @@ function validate188( message: "must have required property '" + missing10 + "'", schema: - schema173.anyOf[3].allOf[0].properties.viewer + schema176.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema173.anyOf[3].allOf[0].properties.viewer + schema176.anyOf[3].allOf[0].properties.viewer .items, data: data56, }; @@ -137970,7 +138714,7 @@ function validate188( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[3].allOf[0].properties + schema176.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -137991,10 +138735,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[3].allOf[0].properties + schema176.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema173.anyOf[3].allOf[0].properties + schema176.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -138018,10 +138762,10 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[3].allOf[0].properties.viewer.items + schema176.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema173.anyOf[3].allOf[0].properties.viewer.items, + schema176.anyOf[3].allOf[0].properties.viewer.items, data: data56, }; if (vErrors === null) { @@ -138044,8 +138788,8 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema173.anyOf[3].allOf[0].properties.viewer, + schema: schema176.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema176.anyOf[3].allOf[0].properties.viewer, data: data55, }; if (vErrors === null) { @@ -138090,10 +138834,10 @@ function validate188( missing11 + "'", schema: - schema173.anyOf[3].allOf[0].properties.owner + schema176.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema173.anyOf[3].allOf[0].properties.owner + schema176.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -138125,7 +138869,7 @@ function validate188( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[3].allOf[0].properties + schema176.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -138146,10 +138890,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[3].allOf[0].properties + schema176.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema173.anyOf[3].allOf[0].properties + schema176.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -138173,10 +138917,10 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[3].allOf[0].properties.owner.items + schema176.anyOf[3].allOf[0].properties.owner.items .type, parentSchema: - schema173.anyOf[3].allOf[0].properties.owner + schema176.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -138200,9 +138944,9 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[3].allOf[0].properties.owner.type, + schema: schema176.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema173.anyOf[3].allOf[0].properties.owner, + schema176.anyOf[3].allOf[0].properties.owner, data: data58, }; if (vErrors === null) { @@ -138230,8 +138974,8 @@ function validate188( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema173.anyOf[3].allOf[0].type, - parentSchema: schema173.anyOf[3].allOf[0], + schema: schema176.anyOf[3].allOf[0].type, + parentSchema: schema176.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -138258,7 +139002,7 @@ function validate188( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema173.anyOf[3].allOf[1].properties.type, + parentSchema: schema176.anyOf[3].allOf[1].properties.type, data: data61, }; if (vErrors === null) { @@ -138300,10 +139044,10 @@ function validate188( message: "must have required property '" + missing12 + "'", schema: - schema173.anyOf[3].allOf[1].properties.devices.items + schema176.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema173.anyOf[3].allOf[1].properties.devices.items, + schema176.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -138330,7 +139074,7 @@ function validate188( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema173.anyOf[3].allOf[1].properties.devices + schema176.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -138351,10 +139095,10 @@ function validate188( params: { type: 'string' }, message: 'must be string', schema: - schema173.anyOf[3].allOf[1].properties.devices + schema176.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema173.anyOf[3].allOf[1].properties.devices + schema176.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -138378,9 +139122,9 @@ function validate188( params: { type: 'object' }, message: 'must be object', schema: - schema173.anyOf[3].allOf[1].properties.devices.items.type, + schema176.anyOf[3].allOf[1].properties.devices.items.type, parentSchema: - schema173.anyOf[3].allOf[1].properties.devices.items, + schema176.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -138403,8 +139147,8 @@ function validate188( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema173.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema173.anyOf[3].allOf[1].properties.devices, + schema: schema176.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema176.anyOf[3].allOf[1].properties.devices, data: data62, }; if (vErrors === null) { @@ -138427,8 +139171,8 @@ function validate188( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema173.anyOf[3].allOf[1].type, - parentSchema: schema173.anyOf[3].allOf[1], + schema: schema176.anyOf[3].allOf[1].type, + parentSchema: schema176.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -138453,8 +139197,8 @@ function validate188( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema173.anyOf, - parentSchema: schema173, + schema: schema176.anyOf, + parentSchema: schema176, data, }; if (vErrors === null) { @@ -138463,7 +139207,7 @@ function validate188( vErrors.push(err108); } errors++; - validate188.errors = vErrors; + validate191.errors = vErrors; return false; } else { errors = _errs0; @@ -138475,11 +139219,11 @@ function validate188( } } } - validate188.errors = vErrors; + validate191.errors = vErrors; return errors === 0; } -exports.validateUpdateDeviceBodyResponse = validate189; -const schema174 = { +exports.validateUpdateDeviceBodyResponse = validate192; +const schema177 = { title: 'Device Update', anyOf: [ { @@ -138779,7 +139523,7 @@ const schema174 = { '#/paths//devices/{device_id}/patch/requestBody/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate189( +function validate192( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -138799,8 +139543,8 @@ function validate189( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema174.anyOf[0].allOf[0].required, - parentSchema: schema174.anyOf[0].allOf[0], + schema: schema177.anyOf[0].allOf[0].required, + parentSchema: schema177.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -138820,8 +139564,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.name, + schema: schema177.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema177.anyOf[0].allOf[0].properties.name, data: data0, }; if (vErrors === null) { @@ -138846,8 +139590,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.description, + schema: schema177.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema177.anyOf[0].allOf[0].properties.description, data: data1, }; if (vErrors === null) { @@ -138872,8 +139616,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.type, + schema: schema177.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema177.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -138896,11 +139640,11 @@ function validate189( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema174.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema177.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema174.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema174.anyOf[0].allOf[0].properties.type, + schema: schema177.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema177.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -138925,8 +139669,8 @@ function validate189( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema174.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.isPublic, + schema: schema177.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema177.anyOf[0].allOf[0].properties.isPublic, data: data3, }; if (vErrors === null) { @@ -138967,10 +139711,10 @@ function validate189( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", schema: - schema174.anyOf[0].allOf[0].properties.viewer.items + schema177.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema174.anyOf[0].allOf[0].properties.viewer.items, + schema177.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -138997,7 +139741,7 @@ function validate189( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[0].allOf[0].properties.viewer + schema177.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -139018,10 +139762,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[0].allOf[0].properties.viewer + schema177.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema174.anyOf[0].allOf[0].properties.viewer + schema177.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -139045,9 +139789,9 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[0].allOf[0].properties.viewer.items.type, + schema177.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema174.anyOf[0].allOf[0].properties.viewer.items, + schema177.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -139070,8 +139814,8 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.viewer, + schema: schema177.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema177.anyOf[0].allOf[0].properties.viewer, data: data4, }; if (vErrors === null) { @@ -139114,10 +139858,10 @@ function validate189( message: "must have required property '" + missing2 + "'", schema: - schema174.anyOf[0].allOf[0].properties.owner.items + schema177.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema174.anyOf[0].allOf[0].properties.owner.items, + schema177.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -139144,7 +139888,7 @@ function validate189( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[0].allOf[0].properties.owner + schema177.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -139165,10 +139909,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[0].allOf[0].properties.owner + schema177.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema174.anyOf[0].allOf[0].properties.owner + schema177.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -139192,9 +139936,9 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[0].allOf[0].properties.owner.items.type, + schema177.anyOf[0].allOf[0].properties.owner.items.type, parentSchema: - schema174.anyOf[0].allOf[0].properties.owner.items, + schema177.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -139217,8 +139961,8 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema174.anyOf[0].allOf[0].properties.owner, + schema: schema177.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema177.anyOf[0].allOf[0].properties.owner, data: data7, }; if (vErrors === null) { @@ -139246,8 +139990,8 @@ function validate189( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema174.anyOf[0].allOf[0].type, - parentSchema: schema174.anyOf[0].allOf[0], + schema: schema177.anyOf[0].allOf[0].type, + parentSchema: schema177.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -139274,7 +140018,7 @@ function validate189( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema174.anyOf[0].allOf[1].properties.type, + parentSchema: schema177.anyOf[0].allOf[1].properties.type, data: data10, }; if (vErrors === null) { @@ -139303,7 +140047,7 @@ function validate189( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema174.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema177.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -139320,8 +140064,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema174.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema177.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema177.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -139367,7 +140111,7 @@ function validate189( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[0].allOf[1].properties.services + schema177.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data14, }; @@ -139388,10 +140132,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[0].allOf[1].properties.services.items + schema177.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema174.anyOf[0].allOf[1].properties.services.items + schema177.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -139422,10 +140166,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[0].allOf[1].properties.services.items + schema177.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema174.anyOf[0].allOf[1].properties.services.items + schema177.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data15, }; @@ -139457,10 +140201,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[0].allOf[1].properties.services.items + schema177.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema174.anyOf[0].allOf[1].properties.services.items + schema177.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -139489,15 +140233,15 @@ function validate189( keyword: 'enum', params: { allowedValues: - schema174.anyOf[0].allOf[1].properties.services + schema177.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema174.anyOf[0].allOf[1].properties.services.items + schema177.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema174.anyOf[0].allOf[1].properties.services.items + schema177.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -139522,9 +140266,9 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[0].allOf[1].properties.services.items.type, + schema177.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema174.anyOf[0].allOf[1].properties.services.items, + schema177.anyOf[0].allOf[1].properties.services.items, data: data13, }; if (vErrors === null) { @@ -139547,8 +140291,8 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema174.anyOf[0].allOf[1].properties.services, + schema: schema177.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema177.anyOf[0].allOf[1].properties.services, data: data12, }; if (vErrors === null) { @@ -139572,8 +140316,8 @@ function validate189( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema174.anyOf[0].allOf[1].type, - parentSchema: schema174.anyOf[0].allOf[1], + schema: schema177.anyOf[0].allOf[1].type, + parentSchema: schema177.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -139601,8 +140345,8 @@ function validate189( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema174.anyOf[1].allOf[0].required, - parentSchema: schema174.anyOf[1].allOf[0], + schema: schema177.anyOf[1].allOf[0].required, + parentSchema: schema177.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -139622,8 +140366,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.name, + schema: schema177.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema177.anyOf[1].allOf[0].properties.name, data: data17, }; if (vErrors === null) { @@ -139648,8 +140392,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.description, + schema: schema177.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema177.anyOf[1].allOf[0].properties.description, data: data18, }; if (vErrors === null) { @@ -139674,8 +140418,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.type, + schema: schema177.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema177.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -139698,11 +140442,11 @@ function validate189( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema174.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema177.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema174.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema174.anyOf[1].allOf[0].properties.type, + schema: schema177.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema177.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -139727,8 +140471,8 @@ function validate189( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema174.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.isPublic, + schema: schema177.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema177.anyOf[1].allOf[0].properties.isPublic, data: data20, }; if (vErrors === null) { @@ -139770,10 +140514,10 @@ function validate189( message: "must have required property '" + missing4 + "'", schema: - schema174.anyOf[1].allOf[0].properties.viewer.items + schema177.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema174.anyOf[1].allOf[0].properties.viewer.items, + schema177.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -139800,7 +140544,7 @@ function validate189( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[1].allOf[0].properties + schema177.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data23, }; @@ -139821,10 +140565,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[1].allOf[0].properties.viewer + schema177.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema174.anyOf[1].allOf[0].properties.viewer + schema177.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -139848,10 +140592,10 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[1].allOf[0].properties.viewer.items + schema177.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema174.anyOf[1].allOf[0].properties.viewer.items, + schema177.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -139874,8 +140618,8 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.viewer, + schema: schema177.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema177.anyOf[1].allOf[0].properties.viewer, data: data21, }; if (vErrors === null) { @@ -139918,10 +140662,10 @@ function validate189( message: "must have required property '" + missing5 + "'", schema: - schema174.anyOf[1].allOf[0].properties.owner.items + schema177.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema174.anyOf[1].allOf[0].properties.owner.items, + schema177.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -139949,7 +140693,7 @@ function validate189( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[1].allOf[0].properties + schema177.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data26, }; @@ -139970,10 +140714,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[1].allOf[0].properties.owner + schema177.anyOf[1].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema174.anyOf[1].allOf[0].properties.owner + schema177.anyOf[1].allOf[0].properties.owner .items.properties.url, data: data26, }; @@ -139997,10 +140741,10 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[1].allOf[0].properties.owner.items + schema177.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema174.anyOf[1].allOf[0].properties.owner.items, + schema177.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -140023,8 +140767,8 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema174.anyOf[1].allOf[0].properties.owner, + schema: schema177.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema177.anyOf[1].allOf[0].properties.owner, data: data24, }; if (vErrors === null) { @@ -140052,8 +140796,8 @@ function validate189( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema174.anyOf[1].allOf[0].type, - parentSchema: schema174.anyOf[1].allOf[0], + schema: schema177.anyOf[1].allOf[0].type, + parentSchema: schema177.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -140080,7 +140824,7 @@ function validate189( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema174.anyOf[1].allOf[1].properties.type, + parentSchema: schema177.anyOf[1].allOf[1].properties.type, data: data27, }; if (vErrors === null) { @@ -140109,7 +140853,7 @@ function validate189( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema174.anyOf[1].allOf[1].properties.experiment, + parentSchema: schema177.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -140126,8 +140870,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema174.anyOf[1].allOf[1].properties.experiment, + schema: schema177.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema177.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -140177,7 +140921,7 @@ function validate189( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[1].allOf[1].properties.services + schema177.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -140198,10 +140942,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[1].allOf[1].properties.services + schema177.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema174.anyOf[1].allOf[1].properties.services + schema177.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -140232,10 +140976,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[1].allOf[1].properties.services.items + schema177.anyOf[1].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema174.anyOf[1].allOf[1].properties.services.items + schema177.anyOf[1].allOf[1].properties.services.items .properties.serviceId, data: data32, }; @@ -140267,10 +141011,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[1].allOf[1].properties.services + schema177.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema174.anyOf[1].allOf[1].properties.services + schema177.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -140299,15 +141043,15 @@ function validate189( keyword: 'enum', params: { allowedValues: - schema174.anyOf[1].allOf[1].properties.services + schema177.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema174.anyOf[1].allOf[1].properties.services + schema177.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema174.anyOf[1].allOf[1].properties.services + schema177.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -140333,9 +141077,9 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[1].allOf[1].properties.services.items.type, + schema177.anyOf[1].allOf[1].properties.services.items.type, parentSchema: - schema174.anyOf[1].allOf[1].properties.services.items, + schema177.anyOf[1].allOf[1].properties.services.items, data: data30, }; if (vErrors === null) { @@ -140358,8 +141102,8 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema174.anyOf[1].allOf[1].properties.services, + schema: schema177.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema177.anyOf[1].allOf[1].properties.services, data: data29, }; if (vErrors === null) { @@ -140383,8 +141127,8 @@ function validate189( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema174.anyOf[1].allOf[1].type, - parentSchema: schema174.anyOf[1].allOf[1], + schema: schema177.anyOf[1].allOf[1].type, + parentSchema: schema177.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -140412,8 +141156,8 @@ function validate189( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema174.anyOf[2].allOf[0].required, - parentSchema: schema174.anyOf[2].allOf[0], + schema: schema177.anyOf[2].allOf[0].required, + parentSchema: schema177.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -140433,8 +141177,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.name, + schema: schema177.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema177.anyOf[2].allOf[0].properties.name, data: data34, }; if (vErrors === null) { @@ -140459,8 +141203,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.description, + schema: schema177.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema177.anyOf[2].allOf[0].properties.description, data: data35, }; if (vErrors === null) { @@ -140485,8 +141229,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.type, + schema: schema177.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema177.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -140509,11 +141253,11 @@ function validate189( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema174.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema177.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema174.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema174.anyOf[2].allOf[0].properties.type, + schema: schema177.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema177.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -140538,8 +141282,8 @@ function validate189( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema174.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.isPublic, + schema: schema177.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema177.anyOf[2].allOf[0].properties.isPublic, data: data37, }; if (vErrors === null) { @@ -140581,10 +141325,10 @@ function validate189( message: "must have required property '" + missing7 + "'", schema: - schema174.anyOf[2].allOf[0].properties.viewer.items + schema177.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema174.anyOf[2].allOf[0].properties.viewer.items, + schema177.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -140612,7 +141356,7 @@ function validate189( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[2].allOf[0].properties + schema177.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -140633,10 +141377,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[2].allOf[0].properties + schema177.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema174.anyOf[2].allOf[0].properties + schema177.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -140660,10 +141404,10 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[2].allOf[0].properties.viewer.items + schema177.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema174.anyOf[2].allOf[0].properties.viewer.items, + schema177.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -140686,8 +141430,8 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.viewer, + schema: schema177.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema177.anyOf[2].allOf[0].properties.viewer, data: data38, }; if (vErrors === null) { @@ -140730,10 +141474,10 @@ function validate189( message: "must have required property '" + missing8 + "'", schema: - schema174.anyOf[2].allOf[0].properties.owner.items + schema177.anyOf[2].allOf[0].properties.owner.items .required, parentSchema: - schema174.anyOf[2].allOf[0].properties.owner + schema177.anyOf[2].allOf[0].properties.owner .items, data: data42, }; @@ -140762,7 +141506,7 @@ function validate189( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[2].allOf[0].properties + schema177.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -140783,10 +141527,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[2].allOf[0].properties + schema177.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema174.anyOf[2].allOf[0].properties + schema177.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -140810,10 +141554,10 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[2].allOf[0].properties.owner.items + schema177.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema174.anyOf[2].allOf[0].properties.owner.items, + schema177.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -140836,8 +141580,8 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema174.anyOf[2].allOf[0].properties.owner, + schema: schema177.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema177.anyOf[2].allOf[0].properties.owner, data: data41, }; if (vErrors === null) { @@ -140865,8 +141609,8 @@ function validate189( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema174.anyOf[2].allOf[0].type, - parentSchema: schema174.anyOf[2].allOf[0], + schema: schema177.anyOf[2].allOf[0].type, + parentSchema: schema177.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -140893,7 +141637,7 @@ function validate189( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema174.anyOf[2].allOf[1].properties.type, + parentSchema: schema177.anyOf[2].allOf[1].properties.type, data: data44, }; if (vErrors === null) { @@ -140922,7 +141666,7 @@ function validate189( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema174.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema177.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -140939,8 +141683,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema174.anyOf[2].allOf[1].properties.codeUrl, + schema: schema177.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema177.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -140993,7 +141737,7 @@ function validate189( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[2].allOf[1].properties.services + schema177.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -141014,10 +141758,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[2].allOf[1].properties.services + schema177.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema174.anyOf[2].allOf[1].properties.services + schema177.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -141048,10 +141792,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[2].allOf[1].properties.services + schema177.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema174.anyOf[2].allOf[1].properties.services + schema177.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data49, }; @@ -141083,10 +141827,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[2].allOf[1].properties.services + schema177.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema174.anyOf[2].allOf[1].properties.services + schema177.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -141115,16 +141859,16 @@ function validate189( keyword: 'enum', params: { allowedValues: - schema174.anyOf[2].allOf[1].properties.services + schema177.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema174.anyOf[2].allOf[1].properties.services + schema177.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema174.anyOf[2].allOf[1].properties.services + schema177.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -141150,10 +141894,10 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[2].allOf[1].properties.services.items + schema177.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema174.anyOf[2].allOf[1].properties.services.items, + schema177.anyOf[2].allOf[1].properties.services.items, data: data47, }; if (vErrors === null) { @@ -141176,8 +141920,8 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema174.anyOf[2].allOf[1].properties.services, + schema: schema177.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema177.anyOf[2].allOf[1].properties.services, data: data46, }; if (vErrors === null) { @@ -141201,8 +141945,8 @@ function validate189( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema174.anyOf[2].allOf[1].type, - parentSchema: schema174.anyOf[2].allOf[1], + schema: schema177.anyOf[2].allOf[1].type, + parentSchema: schema177.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -141230,8 +141974,8 @@ function validate189( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema174.anyOf[3].allOf[0].required, - parentSchema: schema174.anyOf[3].allOf[0], + schema: schema177.anyOf[3].allOf[0].required, + parentSchema: schema177.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -141251,8 +141995,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema174.anyOf[3].allOf[0].properties.name, + schema: schema177.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema177.anyOf[3].allOf[0].properties.name, data: data51, }; if (vErrors === null) { @@ -141277,8 +142021,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema174.anyOf[3].allOf[0].properties.description, + schema: schema177.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema177.anyOf[3].allOf[0].properties.description, data: data52, }; if (vErrors === null) { @@ -141303,8 +142047,8 @@ function validate189( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema174.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema174.anyOf[3].allOf[0].properties.type, + schema: schema177.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema177.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -141327,11 +142071,11 @@ function validate189( schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema174.anyOf[3].allOf[0].properties.type.enum, + allowedValues: schema177.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema174.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema174.anyOf[3].allOf[0].properties.type, + schema: schema177.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema177.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -141356,8 +142100,8 @@ function validate189( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema174.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema174.anyOf[3].allOf[0].properties.isPublic, + schema: schema177.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema177.anyOf[3].allOf[0].properties.isPublic, data: data54, }; if (vErrors === null) { @@ -141399,10 +142143,10 @@ function validate189( message: "must have required property '" + missing10 + "'", schema: - schema174.anyOf[3].allOf[0].properties.viewer + schema177.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema174.anyOf[3].allOf[0].properties.viewer + schema177.anyOf[3].allOf[0].properties.viewer .items, data: data56, }; @@ -141431,7 +142175,7 @@ function validate189( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[3].allOf[0].properties + schema177.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -141452,10 +142196,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[3].allOf[0].properties + schema177.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema174.anyOf[3].allOf[0].properties + schema177.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -141479,10 +142223,10 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[3].allOf[0].properties.viewer.items + schema177.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema174.anyOf[3].allOf[0].properties.viewer.items, + schema177.anyOf[3].allOf[0].properties.viewer.items, data: data56, }; if (vErrors === null) { @@ -141505,8 +142249,8 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema174.anyOf[3].allOf[0].properties.viewer, + schema: schema177.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema177.anyOf[3].allOf[0].properties.viewer, data: data55, }; if (vErrors === null) { @@ -141551,10 +142295,10 @@ function validate189( missing11 + "'", schema: - schema174.anyOf[3].allOf[0].properties.owner + schema177.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema174.anyOf[3].allOf[0].properties.owner + schema177.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -141586,7 +142330,7 @@ function validate189( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[3].allOf[0].properties + schema177.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -141607,10 +142351,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[3].allOf[0].properties + schema177.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema174.anyOf[3].allOf[0].properties + schema177.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -141634,10 +142378,10 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[3].allOf[0].properties.owner.items + schema177.anyOf[3].allOf[0].properties.owner.items .type, parentSchema: - schema174.anyOf[3].allOf[0].properties.owner + schema177.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -141661,9 +142405,9 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[3].allOf[0].properties.owner.type, + schema: schema177.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema174.anyOf[3].allOf[0].properties.owner, + schema177.anyOf[3].allOf[0].properties.owner, data: data58, }; if (vErrors === null) { @@ -141691,8 +142435,8 @@ function validate189( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema174.anyOf[3].allOf[0].type, - parentSchema: schema174.anyOf[3].allOf[0], + schema: schema177.anyOf[3].allOf[0].type, + parentSchema: schema177.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -141719,7 +142463,7 @@ function validate189( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema174.anyOf[3].allOf[1].properties.type, + parentSchema: schema177.anyOf[3].allOf[1].properties.type, data: data61, }; if (vErrors === null) { @@ -141761,10 +142505,10 @@ function validate189( message: "must have required property '" + missing12 + "'", schema: - schema174.anyOf[3].allOf[1].properties.devices.items + schema177.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema174.anyOf[3].allOf[1].properties.devices.items, + schema177.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -141791,7 +142535,7 @@ function validate189( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema174.anyOf[3].allOf[1].properties.devices + schema177.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -141812,10 +142556,10 @@ function validate189( params: { type: 'string' }, message: 'must be string', schema: - schema174.anyOf[3].allOf[1].properties.devices + schema177.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema174.anyOf[3].allOf[1].properties.devices + schema177.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -141839,9 +142583,9 @@ function validate189( params: { type: 'object' }, message: 'must be object', schema: - schema174.anyOf[3].allOf[1].properties.devices.items.type, + schema177.anyOf[3].allOf[1].properties.devices.items.type, parentSchema: - schema174.anyOf[3].allOf[1].properties.devices.items, + schema177.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -141864,8 +142608,8 @@ function validate189( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema174.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema174.anyOf[3].allOf[1].properties.devices, + schema: schema177.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema177.anyOf[3].allOf[1].properties.devices, data: data62, }; if (vErrors === null) { @@ -141888,8 +142632,8 @@ function validate189( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema174.anyOf[3].allOf[1].type, - parentSchema: schema174.anyOf[3].allOf[1], + schema: schema177.anyOf[3].allOf[1].type, + parentSchema: schema177.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -141914,8 +142658,8 @@ function validate189( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema174.anyOf, - parentSchema: schema174, + schema: schema177.anyOf, + parentSchema: schema177, data, }; if (vErrors === null) { @@ -141924,7 +142668,7 @@ function validate189( vErrors.push(err108); } errors++; - validate189.errors = vErrors; + validate192.errors = vErrors; return false; } else { errors = _errs0; @@ -141936,11 +142680,11 @@ function validate189( } } } - validate189.errors = vErrors; + validate192.errors = vErrors; return errors === 0; } -exports.validateUpdateDeviceResponse200Request = validate190; -const schema175 = { +exports.validateUpdateDeviceResponse200Request = validate193; +const schema178 = { title: 'Device', anyOf: [ { @@ -142250,7 +142994,7 @@ const schema175 = { '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate190( +function validate193( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -142274,8 +143018,8 @@ function validate190( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema175.anyOf[0].allOf[0].required, - parentSchema: schema175.anyOf[0].allOf[0], + schema: schema178.anyOf[0].allOf[0].required, + parentSchema: schema178.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -142295,8 +143039,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.name, + schema: schema178.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema178.anyOf[0].allOf[0].properties.name, data: data0, }; if (vErrors === null) { @@ -142321,8 +143065,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.description, + schema: schema178.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema178.anyOf[0].allOf[0].properties.description, data: data1, }; if (vErrors === null) { @@ -142347,8 +143091,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.type, + schema: schema178.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema178.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -142371,11 +143115,11 @@ function validate190( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema175.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema178.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema175.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema175.anyOf[0].allOf[0].properties.type, + schema: schema178.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema178.anyOf[0].allOf[0].properties.type, data: data2, }; if (vErrors === null) { @@ -142400,8 +143144,8 @@ function validate190( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema175.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.isPublic, + schema: schema178.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema178.anyOf[0].allOf[0].properties.isPublic, data: data3, }; if (vErrors === null) { @@ -142442,10 +143186,10 @@ function validate190( params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", schema: - schema175.anyOf[0].allOf[0].properties.viewer.items + schema178.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema175.anyOf[0].allOf[0].properties.viewer.items, + schema178.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -142472,7 +143216,7 @@ function validate190( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[0].allOf[0].properties.viewer + schema178.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -142493,10 +143237,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[0].allOf[0].properties.viewer + schema178.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema175.anyOf[0].allOf[0].properties.viewer + schema178.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data6, }; @@ -142520,9 +143264,9 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[0].allOf[0].properties.viewer.items.type, + schema178.anyOf[0].allOf[0].properties.viewer.items.type, parentSchema: - schema175.anyOf[0].allOf[0].properties.viewer.items, + schema178.anyOf[0].allOf[0].properties.viewer.items, data: data5, }; if (vErrors === null) { @@ -142545,8 +143289,8 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.viewer, + schema: schema178.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema178.anyOf[0].allOf[0].properties.viewer, data: data4, }; if (vErrors === null) { @@ -142589,10 +143333,10 @@ function validate190( message: "must have required property '" + missing2 + "'", schema: - schema175.anyOf[0].allOf[0].properties.owner.items + schema178.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema175.anyOf[0].allOf[0].properties.owner.items, + schema178.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -142619,7 +143363,7 @@ function validate190( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[0].allOf[0].properties.owner + schema178.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -142640,10 +143384,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[0].allOf[0].properties.owner + schema178.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema175.anyOf[0].allOf[0].properties.owner + schema178.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data9, }; @@ -142667,9 +143411,9 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[0].allOf[0].properties.owner.items.type, + schema178.anyOf[0].allOf[0].properties.owner.items.type, parentSchema: - schema175.anyOf[0].allOf[0].properties.owner.items, + schema178.anyOf[0].allOf[0].properties.owner.items, data: data8, }; if (vErrors === null) { @@ -142692,8 +143436,8 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema175.anyOf[0].allOf[0].properties.owner, + schema: schema178.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema178.anyOf[0].allOf[0].properties.owner, data: data7, }; if (vErrors === null) { @@ -142721,8 +143465,8 @@ function validate190( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema175.anyOf[0].allOf[0].type, - parentSchema: schema175.anyOf[0].allOf[0], + schema: schema178.anyOf[0].allOf[0].type, + parentSchema: schema178.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -142749,7 +143493,7 @@ function validate190( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema175.anyOf[0].allOf[1].properties.type, + parentSchema: schema178.anyOf[0].allOf[1].properties.type, data: data10, }; if (vErrors === null) { @@ -142778,7 +143522,7 @@ function validate190( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema175.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema178.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -142795,8 +143539,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema175.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema178.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema178.anyOf[0].allOf[1].properties.instantiateUrl, data: data11, }; if (vErrors === null) { @@ -142842,7 +143586,7 @@ function validate190( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[0].allOf[1].properties.services + schema178.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data14, }; @@ -142863,10 +143607,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[0].allOf[1].properties.services.items + schema178.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema175.anyOf[0].allOf[1].properties.services.items + schema178.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data14, }; @@ -142897,10 +143641,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[0].allOf[1].properties.services.items + schema178.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema175.anyOf[0].allOf[1].properties.services.items + schema178.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data15, }; @@ -142932,10 +143676,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[0].allOf[1].properties.services.items + schema178.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema175.anyOf[0].allOf[1].properties.services.items + schema178.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -142964,15 +143708,15 @@ function validate190( keyword: 'enum', params: { allowedValues: - schema175.anyOf[0].allOf[1].properties.services + schema178.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema175.anyOf[0].allOf[1].properties.services.items + schema178.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema175.anyOf[0].allOf[1].properties.services.items + schema178.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data16, }; @@ -142997,9 +143741,9 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[0].allOf[1].properties.services.items.type, + schema178.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema175.anyOf[0].allOf[1].properties.services.items, + schema178.anyOf[0].allOf[1].properties.services.items, data: data13, }; if (vErrors === null) { @@ -143022,8 +143766,8 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema175.anyOf[0].allOf[1].properties.services, + schema: schema178.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema178.anyOf[0].allOf[1].properties.services, data: data12, }; if (vErrors === null) { @@ -143047,8 +143791,8 @@ function validate190( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema175.anyOf[0].allOf[1].type, - parentSchema: schema175.anyOf[0].allOf[1], + schema: schema178.anyOf[0].allOf[1].type, + parentSchema: schema178.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -143080,8 +143824,8 @@ function validate190( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema175.anyOf[1].allOf[0].required, - parentSchema: schema175.anyOf[1].allOf[0], + schema: schema178.anyOf[1].allOf[0].required, + parentSchema: schema178.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -143101,8 +143845,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.name, + schema: schema178.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema178.anyOf[1].allOf[0].properties.name, data: data17, }; if (vErrors === null) { @@ -143127,8 +143871,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.description, + schema: schema178.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema178.anyOf[1].allOf[0].properties.description, data: data18, }; if (vErrors === null) { @@ -143153,8 +143897,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.type, + schema: schema178.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema178.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -143177,11 +143921,11 @@ function validate190( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema175.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema178.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema175.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema175.anyOf[1].allOf[0].properties.type, + schema: schema178.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema178.anyOf[1].allOf[0].properties.type, data: data19, }; if (vErrors === null) { @@ -143206,8 +143950,8 @@ function validate190( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema175.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.isPublic, + schema: schema178.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema178.anyOf[1].allOf[0].properties.isPublic, data: data20, }; if (vErrors === null) { @@ -143249,10 +143993,10 @@ function validate190( message: "must have required property '" + missing4 + "'", schema: - schema175.anyOf[1].allOf[0].properties.viewer.items + schema178.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema175.anyOf[1].allOf[0].properties.viewer.items, + schema178.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -143279,7 +144023,7 @@ function validate190( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[1].allOf[0].properties + schema178.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data23, }; @@ -143300,10 +144044,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[1].allOf[0].properties.viewer + schema178.anyOf[1].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema175.anyOf[1].allOf[0].properties.viewer + schema178.anyOf[1].allOf[0].properties.viewer .items.properties.url, data: data23, }; @@ -143327,10 +144071,10 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[1].allOf[0].properties.viewer.items + schema178.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema175.anyOf[1].allOf[0].properties.viewer.items, + schema178.anyOf[1].allOf[0].properties.viewer.items, data: data22, }; if (vErrors === null) { @@ -143353,8 +144097,8 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.viewer, + schema: schema178.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema178.anyOf[1].allOf[0].properties.viewer, data: data21, }; if (vErrors === null) { @@ -143397,10 +144141,10 @@ function validate190( message: "must have required property '" + missing5 + "'", schema: - schema175.anyOf[1].allOf[0].properties.owner.items + schema178.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema175.anyOf[1].allOf[0].properties.owner.items, + schema178.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -143428,7 +144172,7 @@ function validate190( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[1].allOf[0].properties + schema178.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data26, }; @@ -143449,10 +144193,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[1].allOf[0].properties.owner + schema178.anyOf[1].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema175.anyOf[1].allOf[0].properties.owner + schema178.anyOf[1].allOf[0].properties.owner .items.properties.url, data: data26, }; @@ -143476,10 +144220,10 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[1].allOf[0].properties.owner.items + schema178.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema175.anyOf[1].allOf[0].properties.owner.items, + schema178.anyOf[1].allOf[0].properties.owner.items, data: data25, }; if (vErrors === null) { @@ -143502,8 +144246,8 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema175.anyOf[1].allOf[0].properties.owner, + schema: schema178.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema178.anyOf[1].allOf[0].properties.owner, data: data24, }; if (vErrors === null) { @@ -143531,8 +144275,8 @@ function validate190( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema175.anyOf[1].allOf[0].type, - parentSchema: schema175.anyOf[1].allOf[0], + schema: schema178.anyOf[1].allOf[0].type, + parentSchema: schema178.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -143559,7 +144303,7 @@ function validate190( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema175.anyOf[1].allOf[1].properties.type, + parentSchema: schema178.anyOf[1].allOf[1].properties.type, data: data27, }; if (vErrors === null) { @@ -143588,7 +144332,7 @@ function validate190( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema175.anyOf[1].allOf[1].properties.experiment, + parentSchema: schema178.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -143605,8 +144349,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema175.anyOf[1].allOf[1].properties.experiment, + schema: schema178.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema178.anyOf[1].allOf[1].properties.experiment, data: data28, }; if (vErrors === null) { @@ -143656,7 +144400,7 @@ function validate190( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[1].allOf[1].properties.services + schema178.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -143677,10 +144421,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[1].allOf[1].properties.services + schema178.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema175.anyOf[1].allOf[1].properties.services + schema178.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data31, }; @@ -143711,10 +144455,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[1].allOf[1].properties.services.items + schema178.anyOf[1].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema175.anyOf[1].allOf[1].properties.services.items + schema178.anyOf[1].allOf[1].properties.services.items .properties.serviceId, data: data32, }; @@ -143746,10 +144490,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[1].allOf[1].properties.services + schema178.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema175.anyOf[1].allOf[1].properties.services + schema178.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -143778,15 +144522,15 @@ function validate190( keyword: 'enum', params: { allowedValues: - schema175.anyOf[1].allOf[1].properties.services + schema178.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema175.anyOf[1].allOf[1].properties.services + schema178.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema175.anyOf[1].allOf[1].properties.services + schema178.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data33, }; @@ -143812,9 +144556,9 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[1].allOf[1].properties.services.items.type, + schema178.anyOf[1].allOf[1].properties.services.items.type, parentSchema: - schema175.anyOf[1].allOf[1].properties.services.items, + schema178.anyOf[1].allOf[1].properties.services.items, data: data30, }; if (vErrors === null) { @@ -143837,8 +144581,8 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema175.anyOf[1].allOf[1].properties.services, + schema: schema178.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema178.anyOf[1].allOf[1].properties.services, data: data29, }; if (vErrors === null) { @@ -143862,8 +144606,8 @@ function validate190( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema175.anyOf[1].allOf[1].type, - parentSchema: schema175.anyOf[1].allOf[1], + schema: schema178.anyOf[1].allOf[1].type, + parentSchema: schema178.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -143895,8 +144639,8 @@ function validate190( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema175.anyOf[2].allOf[0].required, - parentSchema: schema175.anyOf[2].allOf[0], + schema: schema178.anyOf[2].allOf[0].required, + parentSchema: schema178.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -143916,8 +144660,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.name, + schema: schema178.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema178.anyOf[2].allOf[0].properties.name, data: data34, }; if (vErrors === null) { @@ -143942,8 +144686,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.description, + schema: schema178.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema178.anyOf[2].allOf[0].properties.description, data: data35, }; if (vErrors === null) { @@ -143968,8 +144712,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.type, + schema: schema178.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema178.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -143992,11 +144736,11 @@ function validate190( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema175.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema178.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema175.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema175.anyOf[2].allOf[0].properties.type, + schema: schema178.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema178.anyOf[2].allOf[0].properties.type, data: data36, }; if (vErrors === null) { @@ -144021,8 +144765,8 @@ function validate190( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema175.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.isPublic, + schema: schema178.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema178.anyOf[2].allOf[0].properties.isPublic, data: data37, }; if (vErrors === null) { @@ -144064,10 +144808,10 @@ function validate190( message: "must have required property '" + missing7 + "'", schema: - schema175.anyOf[2].allOf[0].properties.viewer.items + schema178.anyOf[2].allOf[0].properties.viewer.items .required, parentSchema: - schema175.anyOf[2].allOf[0].properties.viewer.items, + schema178.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -144095,7 +144839,7 @@ function validate190( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[2].allOf[0].properties + schema178.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -144116,10 +144860,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[2].allOf[0].properties + schema178.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema175.anyOf[2].allOf[0].properties + schema178.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data40, }; @@ -144143,10 +144887,10 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[2].allOf[0].properties.viewer.items + schema178.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema175.anyOf[2].allOf[0].properties.viewer.items, + schema178.anyOf[2].allOf[0].properties.viewer.items, data: data39, }; if (vErrors === null) { @@ -144169,8 +144913,8 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.viewer, + schema: schema178.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema178.anyOf[2].allOf[0].properties.viewer, data: data38, }; if (vErrors === null) { @@ -144213,10 +144957,10 @@ function validate190( message: "must have required property '" + missing8 + "'", schema: - schema175.anyOf[2].allOf[0].properties.owner.items + schema178.anyOf[2].allOf[0].properties.owner.items .required, parentSchema: - schema175.anyOf[2].allOf[0].properties.owner + schema178.anyOf[2].allOf[0].properties.owner .items, data: data42, }; @@ -144245,7 +144989,7 @@ function validate190( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[2].allOf[0].properties + schema178.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -144266,10 +145010,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[2].allOf[0].properties + schema178.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema175.anyOf[2].allOf[0].properties + schema178.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data43, }; @@ -144293,10 +145037,10 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[2].allOf[0].properties.owner.items + schema178.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema175.anyOf[2].allOf[0].properties.owner.items, + schema178.anyOf[2].allOf[0].properties.owner.items, data: data42, }; if (vErrors === null) { @@ -144319,8 +145063,8 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[2].allOf[0].properties.owner.type, - parentSchema: schema175.anyOf[2].allOf[0].properties.owner, + schema: schema178.anyOf[2].allOf[0].properties.owner.type, + parentSchema: schema178.anyOf[2].allOf[0].properties.owner, data: data41, }; if (vErrors === null) { @@ -144348,8 +145092,8 @@ function validate190( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema175.anyOf[2].allOf[0].type, - parentSchema: schema175.anyOf[2].allOf[0], + schema: schema178.anyOf[2].allOf[0].type, + parentSchema: schema178.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -144376,7 +145120,7 @@ function validate190( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema175.anyOf[2].allOf[1].properties.type, + parentSchema: schema178.anyOf[2].allOf[1].properties.type, data: data44, }; if (vErrors === null) { @@ -144405,7 +145149,7 @@ function validate190( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema175.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema178.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -144422,8 +145166,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema175.anyOf[2].allOf[1].properties.codeUrl, + schema: schema178.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema178.anyOf[2].allOf[1].properties.codeUrl, data: data45, }; if (vErrors === null) { @@ -144476,7 +145220,7 @@ function validate190( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[2].allOf[1].properties.services + schema178.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -144497,10 +145241,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[2].allOf[1].properties.services + schema178.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema175.anyOf[2].allOf[1].properties.services + schema178.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data48, }; @@ -144531,10 +145275,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[2].allOf[1].properties.services + schema178.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema175.anyOf[2].allOf[1].properties.services + schema178.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data49, }; @@ -144566,10 +145310,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[2].allOf[1].properties.services + schema178.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema175.anyOf[2].allOf[1].properties.services + schema178.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -144598,16 +145342,16 @@ function validate190( keyword: 'enum', params: { allowedValues: - schema175.anyOf[2].allOf[1].properties.services + schema178.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema175.anyOf[2].allOf[1].properties.services + schema178.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema175.anyOf[2].allOf[1].properties.services + schema178.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data50, }; @@ -144633,10 +145377,10 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[2].allOf[1].properties.services.items + schema178.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema175.anyOf[2].allOf[1].properties.services.items, + schema178.anyOf[2].allOf[1].properties.services.items, data: data47, }; if (vErrors === null) { @@ -144659,8 +145403,8 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema175.anyOf[2].allOf[1].properties.services, + schema: schema178.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema178.anyOf[2].allOf[1].properties.services, data: data46, }; if (vErrors === null) { @@ -144684,8 +145428,8 @@ function validate190( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema175.anyOf[2].allOf[1].type, - parentSchema: schema175.anyOf[2].allOf[1], + schema: schema178.anyOf[2].allOf[1].type, + parentSchema: schema178.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -144717,8 +145461,8 @@ function validate190( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema175.anyOf[3].allOf[0].required, - parentSchema: schema175.anyOf[3].allOf[0], + schema: schema178.anyOf[3].allOf[0].required, + parentSchema: schema178.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -144738,8 +145482,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema175.anyOf[3].allOf[0].properties.name, + schema: schema178.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema178.anyOf[3].allOf[0].properties.name, data: data51, }; if (vErrors === null) { @@ -144764,8 +145508,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema175.anyOf[3].allOf[0].properties.description, + schema: schema178.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema178.anyOf[3].allOf[0].properties.description, data: data52, }; if (vErrors === null) { @@ -144790,8 +145534,8 @@ function validate190( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema175.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema175.anyOf[3].allOf[0].properties.type, + schema: schema178.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema178.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -144814,11 +145558,11 @@ function validate190( schemaPath: '#/anyOf/3/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema175.anyOf[3].allOf[0].properties.type.enum, + allowedValues: schema178.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema175.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema175.anyOf[3].allOf[0].properties.type, + schema: schema178.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema178.anyOf[3].allOf[0].properties.type, data: data53, }; if (vErrors === null) { @@ -144843,8 +145587,8 @@ function validate190( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema175.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema175.anyOf[3].allOf[0].properties.isPublic, + schema: schema178.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema178.anyOf[3].allOf[0].properties.isPublic, data: data54, }; if (vErrors === null) { @@ -144886,10 +145630,10 @@ function validate190( message: "must have required property '" + missing10 + "'", schema: - schema175.anyOf[3].allOf[0].properties.viewer + schema178.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema175.anyOf[3].allOf[0].properties.viewer + schema178.anyOf[3].allOf[0].properties.viewer .items, data: data56, }; @@ -144918,7 +145662,7 @@ function validate190( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[3].allOf[0].properties + schema178.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -144939,10 +145683,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[3].allOf[0].properties + schema178.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema175.anyOf[3].allOf[0].properties + schema178.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data57, }; @@ -144966,10 +145710,10 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[3].allOf[0].properties.viewer.items + schema178.anyOf[3].allOf[0].properties.viewer.items .type, parentSchema: - schema175.anyOf[3].allOf[0].properties.viewer.items, + schema178.anyOf[3].allOf[0].properties.viewer.items, data: data56, }; if (vErrors === null) { @@ -144992,8 +145736,8 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[3].allOf[0].properties.viewer.type, - parentSchema: schema175.anyOf[3].allOf[0].properties.viewer, + schema: schema178.anyOf[3].allOf[0].properties.viewer.type, + parentSchema: schema178.anyOf[3].allOf[0].properties.viewer, data: data55, }; if (vErrors === null) { @@ -145038,10 +145782,10 @@ function validate190( missing11 + "'", schema: - schema175.anyOf[3].allOf[0].properties.owner + schema178.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema175.anyOf[3].allOf[0].properties.owner + schema178.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -145073,7 +145817,7 @@ function validate190( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[3].allOf[0].properties + schema178.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -145094,10 +145838,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[3].allOf[0].properties + schema178.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema175.anyOf[3].allOf[0].properties + schema178.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data60, }; @@ -145121,10 +145865,10 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[3].allOf[0].properties.owner.items + schema178.anyOf[3].allOf[0].properties.owner.items .type, parentSchema: - schema175.anyOf[3].allOf[0].properties.owner + schema178.anyOf[3].allOf[0].properties.owner .items, data: data59, }; @@ -145148,9 +145892,9 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[3].allOf[0].properties.owner.type, + schema: schema178.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema175.anyOf[3].allOf[0].properties.owner, + schema178.anyOf[3].allOf[0].properties.owner, data: data58, }; if (vErrors === null) { @@ -145178,8 +145922,8 @@ function validate190( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema175.anyOf[3].allOf[0].type, - parentSchema: schema175.anyOf[3].allOf[0], + schema: schema178.anyOf[3].allOf[0].type, + parentSchema: schema178.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -145203,8 +145947,8 @@ function validate190( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema175.anyOf[3].allOf[1].required, - parentSchema: schema175.anyOf[3].allOf[1], + schema: schema178.anyOf[3].allOf[1].required, + parentSchema: schema178.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -145225,7 +145969,7 @@ function validate190( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema175.anyOf[3].allOf[1].properties.type, + parentSchema: schema178.anyOf[3].allOf[1].properties.type, data: data61, }; if (vErrors === null) { @@ -145267,10 +146011,10 @@ function validate190( message: "must have required property '" + missing13 + "'", schema: - schema175.anyOf[3].allOf[1].properties.devices.items + schema178.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema175.anyOf[3].allOf[1].properties.devices.items, + schema178.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -145297,7 +146041,7 @@ function validate190( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema175.anyOf[3].allOf[1].properties + schema178.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data64, }; @@ -145318,10 +146062,10 @@ function validate190( params: { type: 'string' }, message: 'must be string', schema: - schema175.anyOf[3].allOf[1].properties.devices + schema178.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema175.anyOf[3].allOf[1].properties.devices + schema178.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data64, }; @@ -145345,10 +146089,10 @@ function validate190( params: { type: 'object' }, message: 'must be object', schema: - schema175.anyOf[3].allOf[1].properties.devices.items + schema178.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema175.anyOf[3].allOf[1].properties.devices.items, + schema178.anyOf[3].allOf[1].properties.devices.items, data: data63, }; if (vErrors === null) { @@ -145371,8 +146115,8 @@ function validate190( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema175.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema175.anyOf[3].allOf[1].properties.devices, + schema: schema178.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema178.anyOf[3].allOf[1].properties.devices, data: data62, }; if (vErrors === null) { @@ -145396,8 +146140,8 @@ function validate190( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema175.anyOf[3].allOf[1].type, - parentSchema: schema175.anyOf[3].allOf[1], + schema: schema178.anyOf[3].allOf[1].type, + parentSchema: schema178.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -145422,8 +146166,8 @@ function validate190( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema175.anyOf, - parentSchema: schema175, + schema: schema178.anyOf, + parentSchema: schema178, data, }; if (vErrors === null) { @@ -145432,7 +146176,7 @@ function validate190( vErrors.push(err109); } errors++; - validate190.errors = vErrors; + validate193.errors = vErrors; return false; } else { errors = _errs0; @@ -145444,11 +146188,11 @@ function validate190( } } } - validate190.errors = vErrors; + validate193.errors = vErrors; return errors === 0; } -exports.validateUpdateDeviceResponse200Response = validate191; -const schema176 = { +exports.validateUpdateDeviceResponse200Response = validate194; +const schema179 = { title: 'Device', anyOf: [ { @@ -145803,7 +146547,7 @@ const schema176 = { '#/paths//devices/{device_id}/patch/responses/200/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate191( +function validate194( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -145828,8 +146572,8 @@ function validate191( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema176.anyOf[0].allOf[0].required, - parentSchema: schema176.anyOf[0].allOf[0], + schema: schema179.anyOf[0].allOf[0].required, + parentSchema: schema179.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -145853,7 +146597,7 @@ function validate191( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema176.anyOf[0].allOf[0].properties.url, + parentSchema: schema179.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -145870,8 +146614,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[0].allOf[0].properties.url.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.url, + schema: schema179.anyOf[0].allOf[0].properties.url.type, + parentSchema: schema179.anyOf[0].allOf[0].properties.url, data: data0, }; if (vErrors === null) { @@ -145898,8 +146642,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[0].allOf[0].properties.name.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.name, + schema: schema179.anyOf[0].allOf[0].properties.name.type, + parentSchema: schema179.anyOf[0].allOf[0].properties.name, data: data1, }; if (vErrors === null) { @@ -145924,8 +146668,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[0].allOf[0].properties.description.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.description, + schema: schema179.anyOf[0].allOf[0].properties.description.type, + parentSchema: schema179.anyOf[0].allOf[0].properties.description, data: data2, }; if (vErrors === null) { @@ -145950,8 +146694,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[0].allOf[0].properties.type.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.type, + schema: schema179.anyOf[0].allOf[0].properties.type.type, + parentSchema: schema179.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -145974,11 +146718,11 @@ function validate191( schemaPath: '#/anyOf/0/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema176.anyOf[0].allOf[0].properties.type.enum, + allowedValues: schema179.anyOf[0].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema176.anyOf[0].allOf[0].properties.type.enum, - parentSchema: schema176.anyOf[0].allOf[0].properties.type, + schema: schema179.anyOf[0].allOf[0].properties.type.enum, + parentSchema: schema179.anyOf[0].allOf[0].properties.type, data: data3, }; if (vErrors === null) { @@ -146003,8 +146747,8 @@ function validate191( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema176.anyOf[0].allOf[0].properties.isPublic.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.isPublic, + schema: schema179.anyOf[0].allOf[0].properties.isPublic.type, + parentSchema: schema179.anyOf[0].allOf[0].properties.isPublic, data: data4, }; if (vErrors === null) { @@ -146046,10 +146790,10 @@ function validate191( message: "must have required property '" + missing1 + "'", schema: - schema176.anyOf[0].allOf[0].properties.viewer.items + schema179.anyOf[0].allOf[0].properties.viewer.items .required, parentSchema: - schema176.anyOf[0].allOf[0].properties.viewer.items, + schema179.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -146076,7 +146820,7 @@ function validate191( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[0].allOf[0].properties + schema179.anyOf[0].allOf[0].properties .viewer.items.properties.url, data: data7, }; @@ -146097,10 +146841,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[0].allOf[0].properties.viewer + schema179.anyOf[0].allOf[0].properties.viewer .items.properties.url.type, parentSchema: - schema176.anyOf[0].allOf[0].properties.viewer + schema179.anyOf[0].allOf[0].properties.viewer .items.properties.url, data: data7, }; @@ -146124,10 +146868,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[0].allOf[0].properties.viewer.items + schema179.anyOf[0].allOf[0].properties.viewer.items .type, parentSchema: - schema176.anyOf[0].allOf[0].properties.viewer.items, + schema179.anyOf[0].allOf[0].properties.viewer.items, data: data6, }; if (vErrors === null) { @@ -146150,8 +146894,8 @@ function validate191( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema176.anyOf[0].allOf[0].properties.viewer.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.viewer, + schema: schema179.anyOf[0].allOf[0].properties.viewer.type, + parentSchema: schema179.anyOf[0].allOf[0].properties.viewer, data: data5, }; if (vErrors === null) { @@ -146194,10 +146938,10 @@ function validate191( message: "must have required property '" + missing2 + "'", schema: - schema176.anyOf[0].allOf[0].properties.owner.items + schema179.anyOf[0].allOf[0].properties.owner.items .required, parentSchema: - schema176.anyOf[0].allOf[0].properties.owner.items, + schema179.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -146225,7 +146969,7 @@ function validate191( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[0].allOf[0].properties + schema179.anyOf[0].allOf[0].properties .owner.items.properties.url, data: data10, }; @@ -146246,10 +146990,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[0].allOf[0].properties.owner + schema179.anyOf[0].allOf[0].properties.owner .items.properties.url.type, parentSchema: - schema176.anyOf[0].allOf[0].properties.owner + schema179.anyOf[0].allOf[0].properties.owner .items.properties.url, data: data10, }; @@ -146273,10 +147017,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[0].allOf[0].properties.owner.items + schema179.anyOf[0].allOf[0].properties.owner.items .type, parentSchema: - schema176.anyOf[0].allOf[0].properties.owner.items, + schema179.anyOf[0].allOf[0].properties.owner.items, data: data9, }; if (vErrors === null) { @@ -146299,8 +147043,8 @@ function validate191( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema176.anyOf[0].allOf[0].properties.owner.type, - parentSchema: schema176.anyOf[0].allOf[0].properties.owner, + schema: schema179.anyOf[0].allOf[0].properties.owner.type, + parentSchema: schema179.anyOf[0].allOf[0].properties.owner, data: data8, }; if (vErrors === null) { @@ -146329,8 +147073,8 @@ function validate191( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema176.anyOf[0].allOf[0].type, - parentSchema: schema176.anyOf[0].allOf[0], + schema: schema179.anyOf[0].allOf[0].type, + parentSchema: schema179.anyOf[0].allOf[0], data, }; if (vErrors === null) { @@ -146357,7 +147101,7 @@ function validate191( params: { allowedValue: 'cloud instantiable' }, message: 'must be equal to constant', schema: 'cloud instantiable', - parentSchema: schema176.anyOf[0].allOf[1].properties.type, + parentSchema: schema179.anyOf[0].allOf[1].properties.type, data: data11, }; if (vErrors === null) { @@ -146386,7 +147130,7 @@ function validate191( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema176.anyOf[0].allOf[1].properties.instantiateUrl, + parentSchema: schema179.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -146403,8 +147147,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[0].allOf[1].properties.instantiateUrl.type, - parentSchema: schema176.anyOf[0].allOf[1].properties.instantiateUrl, + schema: schema179.anyOf[0].allOf[1].properties.instantiateUrl.type, + parentSchema: schema179.anyOf[0].allOf[1].properties.instantiateUrl, data: data12, }; if (vErrors === null) { @@ -146450,7 +147194,7 @@ function validate191( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[0].allOf[1].properties.services + schema179.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data15, }; @@ -146471,10 +147215,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[0].allOf[1].properties.services.items + schema179.anyOf[0].allOf[1].properties.services.items .properties.serviceType.type, parentSchema: - schema176.anyOf[0].allOf[1].properties.services.items + schema179.anyOf[0].allOf[1].properties.services.items .properties.serviceType, data: data15, }; @@ -146505,10 +147249,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[0].allOf[1].properties.services.items + schema179.anyOf[0].allOf[1].properties.services.items .properties.serviceId.type, parentSchema: - schema176.anyOf[0].allOf[1].properties.services.items + schema179.anyOf[0].allOf[1].properties.services.items .properties.serviceId, data: data16, }; @@ -146540,10 +147284,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[0].allOf[1].properties.services.items + schema179.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.type, parentSchema: - schema176.anyOf[0].allOf[1].properties.services.items + schema179.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -146572,15 +147316,15 @@ function validate191( keyword: 'enum', params: { allowedValues: - schema176.anyOf[0].allOf[1].properties.services + schema179.anyOf[0].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema176.anyOf[0].allOf[1].properties.services.items + schema179.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection.enum, parentSchema: - schema176.anyOf[0].allOf[1].properties.services.items + schema179.anyOf[0].allOf[1].properties.services.items .properties.serviceDirection, data: data17, }; @@ -146605,9 +147349,9 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[0].allOf[1].properties.services.items.type, + schema179.anyOf[0].allOf[1].properties.services.items.type, parentSchema: - schema176.anyOf[0].allOf[1].properties.services.items, + schema179.anyOf[0].allOf[1].properties.services.items, data: data14, }; if (vErrors === null) { @@ -146630,8 +147374,8 @@ function validate191( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema176.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema176.anyOf[0].allOf[1].properties.services, + schema: schema179.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema179.anyOf[0].allOf[1].properties.services, data: data13, }; if (vErrors === null) { @@ -146655,8 +147399,8 @@ function validate191( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema176.anyOf[0].allOf[1].type, - parentSchema: schema176.anyOf[0].allOf[1], + schema: schema179.anyOf[0].allOf[1].type, + parentSchema: schema179.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -146689,8 +147433,8 @@ function validate191( keyword: 'required', params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", - schema: schema176.anyOf[1].allOf[0].required, - parentSchema: schema176.anyOf[1].allOf[0], + schema: schema179.anyOf[1].allOf[0].required, + parentSchema: schema179.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -146714,7 +147458,7 @@ function validate191( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema176.anyOf[1].allOf[0].properties.url, + parentSchema: schema179.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -146731,8 +147475,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[1].allOf[0].properties.url.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.url, + schema: schema179.anyOf[1].allOf[0].properties.url.type, + parentSchema: schema179.anyOf[1].allOf[0].properties.url, data: data18, }; if (vErrors === null) { @@ -146759,8 +147503,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[1].allOf[0].properties.name.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.name, + schema: schema179.anyOf[1].allOf[0].properties.name.type, + parentSchema: schema179.anyOf[1].allOf[0].properties.name, data: data19, }; if (vErrors === null) { @@ -146785,8 +147529,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[1].allOf[0].properties.description.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.description, + schema: schema179.anyOf[1].allOf[0].properties.description.type, + parentSchema: schema179.anyOf[1].allOf[0].properties.description, data: data20, }; if (vErrors === null) { @@ -146811,8 +147555,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[1].allOf[0].properties.type.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.type, + schema: schema179.anyOf[1].allOf[0].properties.type.type, + parentSchema: schema179.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -146835,11 +147579,11 @@ function validate191( schemaPath: '#/anyOf/1/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema176.anyOf[1].allOf[0].properties.type.enum, + allowedValues: schema179.anyOf[1].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema176.anyOf[1].allOf[0].properties.type.enum, - parentSchema: schema176.anyOf[1].allOf[0].properties.type, + schema: schema179.anyOf[1].allOf[0].properties.type.enum, + parentSchema: schema179.anyOf[1].allOf[0].properties.type, data: data21, }; if (vErrors === null) { @@ -146864,8 +147608,8 @@ function validate191( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema176.anyOf[1].allOf[0].properties.isPublic.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.isPublic, + schema: schema179.anyOf[1].allOf[0].properties.isPublic.type, + parentSchema: schema179.anyOf[1].allOf[0].properties.isPublic, data: data22, }; if (vErrors === null) { @@ -146907,10 +147651,10 @@ function validate191( message: "must have required property '" + missing4 + "'", schema: - schema176.anyOf[1].allOf[0].properties.viewer.items + schema179.anyOf[1].allOf[0].properties.viewer.items .required, parentSchema: - schema176.anyOf[1].allOf[0].properties.viewer.items, + schema179.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -146938,7 +147682,7 @@ function validate191( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[1].allOf[0].properties + schema179.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -146959,10 +147703,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[1].allOf[0].properties + schema179.anyOf[1].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema176.anyOf[1].allOf[0].properties + schema179.anyOf[1].allOf[0].properties .viewer.items.properties.url, data: data25, }; @@ -146986,10 +147730,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[1].allOf[0].properties.viewer.items + schema179.anyOf[1].allOf[0].properties.viewer.items .type, parentSchema: - schema176.anyOf[1].allOf[0].properties.viewer.items, + schema179.anyOf[1].allOf[0].properties.viewer.items, data: data24, }; if (vErrors === null) { @@ -147012,8 +147756,8 @@ function validate191( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema176.anyOf[1].allOf[0].properties.viewer.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.viewer, + schema: schema179.anyOf[1].allOf[0].properties.viewer.type, + parentSchema: schema179.anyOf[1].allOf[0].properties.viewer, data: data23, }; if (vErrors === null) { @@ -147056,10 +147800,10 @@ function validate191( message: "must have required property '" + missing5 + "'", schema: - schema176.anyOf[1].allOf[0].properties.owner.items + schema179.anyOf[1].allOf[0].properties.owner.items .required, parentSchema: - schema176.anyOf[1].allOf[0].properties.owner + schema179.anyOf[1].allOf[0].properties.owner .items, data: data27, }; @@ -147088,7 +147832,7 @@ function validate191( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[1].allOf[0].properties + schema179.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -147109,10 +147853,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[1].allOf[0].properties + schema179.anyOf[1].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema176.anyOf[1].allOf[0].properties + schema179.anyOf[1].allOf[0].properties .owner.items.properties.url, data: data28, }; @@ -147136,10 +147880,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[1].allOf[0].properties.owner.items + schema179.anyOf[1].allOf[0].properties.owner.items .type, parentSchema: - schema176.anyOf[1].allOf[0].properties.owner.items, + schema179.anyOf[1].allOf[0].properties.owner.items, data: data27, }; if (vErrors === null) { @@ -147162,8 +147906,8 @@ function validate191( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema176.anyOf[1].allOf[0].properties.owner.type, - parentSchema: schema176.anyOf[1].allOf[0].properties.owner, + schema: schema179.anyOf[1].allOf[0].properties.owner.type, + parentSchema: schema179.anyOf[1].allOf[0].properties.owner, data: data26, }; if (vErrors === null) { @@ -147192,8 +147936,8 @@ function validate191( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema176.anyOf[1].allOf[0].type, - parentSchema: schema176.anyOf[1].allOf[0], + schema: schema179.anyOf[1].allOf[0].type, + parentSchema: schema179.anyOf[1].allOf[0], data, }; if (vErrors === null) { @@ -147220,7 +147964,7 @@ function validate191( params: { allowedValue: 'device' }, message: 'must be equal to constant', schema: 'device', - parentSchema: schema176.anyOf[1].allOf[1].properties.type, + parentSchema: schema179.anyOf[1].allOf[1].properties.type, data: data29, }; if (vErrors === null) { @@ -147245,8 +147989,8 @@ function validate191( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema176.anyOf[1].allOf[1].properties.connected.type, - parentSchema: schema176.anyOf[1].allOf[1].properties.connected, + schema: schema179.anyOf[1].allOf[1].properties.connected.type, + parentSchema: schema179.anyOf[1].allOf[1].properties.connected, data: data30, }; if (vErrors === null) { @@ -147297,7 +148041,7 @@ function validate191( message: 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema176.anyOf[1].allOf[1].properties + schema179.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -147321,11 +148065,11 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[1].allOf[1].properties + schema179.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start .type, parentSchema: - schema176.anyOf[1].allOf[1].properties + schema179.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.start, data: data33, }; @@ -147364,7 +148108,7 @@ function validate191( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema176.anyOf[1].allOf[1].properties + schema179.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -147388,11 +148132,11 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[1].allOf[1].properties + schema179.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end .type, parentSchema: - schema176.anyOf[1].allOf[1].properties + schema179.anyOf[1].allOf[1].properties .announcedAvailability.items.properties.end, data: data34, }; @@ -147419,10 +148163,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[1].allOf[1].properties.announcedAvailability + schema179.anyOf[1].allOf[1].properties.announcedAvailability .items.type, parentSchema: - schema176.anyOf[1].allOf[1].properties.announcedAvailability + schema179.anyOf[1].allOf[1].properties.announcedAvailability .items, data: data32, }; @@ -147448,9 +148192,9 @@ function validate191( params: { type: 'array' }, message: 'must be array', schema: - schema176.anyOf[1].allOf[1].properties.announcedAvailability.type, + schema179.anyOf[1].allOf[1].properties.announcedAvailability.type, parentSchema: - schema176.anyOf[1].allOf[1].properties.announcedAvailability, + schema179.anyOf[1].allOf[1].properties.announcedAvailability, data: data31, }; if (vErrors === null) { @@ -147481,7 +148225,7 @@ function validate191( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[1].allOf[1].properties.experiment, + schema179.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -147498,8 +148242,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[1].allOf[1].properties.experiment.type, - parentSchema: schema176.anyOf[1].allOf[1].properties.experiment, + schema: schema179.anyOf[1].allOf[1].properties.experiment.type, + parentSchema: schema179.anyOf[1].allOf[1].properties.experiment, data: data35, }; if (vErrors === null) { @@ -147552,7 +148296,7 @@ function validate191( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[1].allOf[1].properties + schema179.anyOf[1].allOf[1].properties .services.items.properties.serviceType, data: data38, }; @@ -147576,10 +148320,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[1].allOf[1].properties.services + schema179.anyOf[1].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema176.anyOf[1].allOf[1].properties.services + schema179.anyOf[1].allOf[1].properties.services .items.properties.serviceType, data: data38, }; @@ -147610,10 +148354,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[1].allOf[1].properties.services + schema179.anyOf[1].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema176.anyOf[1].allOf[1].properties.services + schema179.anyOf[1].allOf[1].properties.services .items.properties.serviceId, data: data39, }; @@ -147645,10 +148389,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[1].allOf[1].properties.services + schema179.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema176.anyOf[1].allOf[1].properties.services + schema179.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -147677,17 +148421,17 @@ function validate191( keyword: 'enum', params: { allowedValues: - schema176.anyOf[1].allOf[1].properties + schema179.anyOf[1].allOf[1].properties .services.items.properties.serviceDirection .enum, }, message: 'must be equal to one of the allowed values', schema: - schema176.anyOf[1].allOf[1].properties.services + schema179.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema176.anyOf[1].allOf[1].properties.services + schema179.anyOf[1].allOf[1].properties.services .items.properties.serviceDirection, data: data40, }; @@ -147713,10 +148457,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[1].allOf[1].properties.services.items + schema179.anyOf[1].allOf[1].properties.services.items .type, parentSchema: - schema176.anyOf[1].allOf[1].properties.services.items, + schema179.anyOf[1].allOf[1].properties.services.items, data: data37, }; if (vErrors === null) { @@ -147739,8 +148483,8 @@ function validate191( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema176.anyOf[1].allOf[1].properties.services.type, - parentSchema: schema176.anyOf[1].allOf[1].properties.services, + schema: schema179.anyOf[1].allOf[1].properties.services.type, + parentSchema: schema179.anyOf[1].allOf[1].properties.services, data: data36, }; if (vErrors === null) { @@ -147766,8 +148510,8 @@ function validate191( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema176.anyOf[1].allOf[1].type, - parentSchema: schema176.anyOf[1].allOf[1], + schema: schema179.anyOf[1].allOf[1].type, + parentSchema: schema179.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -147800,8 +148544,8 @@ function validate191( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema176.anyOf[2].allOf[0].required, - parentSchema: schema176.anyOf[2].allOf[0], + schema: schema179.anyOf[2].allOf[0].required, + parentSchema: schema179.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -147825,7 +148569,7 @@ function validate191( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema176.anyOf[2].allOf[0].properties.url, + parentSchema: schema179.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -147842,8 +148586,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[2].allOf[0].properties.url.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.url, + schema: schema179.anyOf[2].allOf[0].properties.url.type, + parentSchema: schema179.anyOf[2].allOf[0].properties.url, data: data41, }; if (vErrors === null) { @@ -147870,8 +148614,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[2].allOf[0].properties.name.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.name, + schema: schema179.anyOf[2].allOf[0].properties.name.type, + parentSchema: schema179.anyOf[2].allOf[0].properties.name, data: data42, }; if (vErrors === null) { @@ -147896,8 +148640,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[2].allOf[0].properties.description.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.description, + schema: schema179.anyOf[2].allOf[0].properties.description.type, + parentSchema: schema179.anyOf[2].allOf[0].properties.description, data: data43, }; if (vErrors === null) { @@ -147922,8 +148666,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[2].allOf[0].properties.type.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.type, + schema: schema179.anyOf[2].allOf[0].properties.type.type, + parentSchema: schema179.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -147946,11 +148690,11 @@ function validate191( schemaPath: '#/anyOf/2/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema176.anyOf[2].allOf[0].properties.type.enum, + allowedValues: schema179.anyOf[2].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema176.anyOf[2].allOf[0].properties.type.enum, - parentSchema: schema176.anyOf[2].allOf[0].properties.type, + schema: schema179.anyOf[2].allOf[0].properties.type.enum, + parentSchema: schema179.anyOf[2].allOf[0].properties.type, data: data44, }; if (vErrors === null) { @@ -147975,8 +148719,8 @@ function validate191( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema176.anyOf[2].allOf[0].properties.isPublic.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.isPublic, + schema: schema179.anyOf[2].allOf[0].properties.isPublic.type, + parentSchema: schema179.anyOf[2].allOf[0].properties.isPublic, data: data45, }; if (vErrors === null) { @@ -148018,10 +148762,10 @@ function validate191( message: "must have required property '" + missing7 + "'", schema: - schema176.anyOf[2].allOf[0].properties.viewer + schema179.anyOf[2].allOf[0].properties.viewer .items.required, parentSchema: - schema176.anyOf[2].allOf[0].properties.viewer + schema179.anyOf[2].allOf[0].properties.viewer .items, data: data47, }; @@ -148050,7 +148794,7 @@ function validate191( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[2].allOf[0].properties + schema179.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -148071,10 +148815,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[2].allOf[0].properties + schema179.anyOf[2].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema176.anyOf[2].allOf[0].properties + schema179.anyOf[2].allOf[0].properties .viewer.items.properties.url, data: data48, }; @@ -148098,10 +148842,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[2].allOf[0].properties.viewer.items + schema179.anyOf[2].allOf[0].properties.viewer.items .type, parentSchema: - schema176.anyOf[2].allOf[0].properties.viewer.items, + schema179.anyOf[2].allOf[0].properties.viewer.items, data: data47, }; if (vErrors === null) { @@ -148124,8 +148868,8 @@ function validate191( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema176.anyOf[2].allOf[0].properties.viewer.type, - parentSchema: schema176.anyOf[2].allOf[0].properties.viewer, + schema: schema179.anyOf[2].allOf[0].properties.viewer.type, + parentSchema: schema179.anyOf[2].allOf[0].properties.viewer, data: data46, }; if (vErrors === null) { @@ -148170,10 +148914,10 @@ function validate191( missing8 + "'", schema: - schema176.anyOf[2].allOf[0].properties.owner + schema179.anyOf[2].allOf[0].properties.owner .items.required, parentSchema: - schema176.anyOf[2].allOf[0].properties.owner + schema179.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -148205,7 +148949,7 @@ function validate191( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[2].allOf[0].properties + schema179.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -148226,10 +148970,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[2].allOf[0].properties + schema179.anyOf[2].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema176.anyOf[2].allOf[0].properties + schema179.anyOf[2].allOf[0].properties .owner.items.properties.url, data: data51, }; @@ -148253,10 +148997,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[2].allOf[0].properties.owner.items + schema179.anyOf[2].allOf[0].properties.owner.items .type, parentSchema: - schema176.anyOf[2].allOf[0].properties.owner + schema179.anyOf[2].allOf[0].properties.owner .items, data: data50, }; @@ -148280,9 +149024,9 @@ function validate191( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema176.anyOf[2].allOf[0].properties.owner.type, + schema: schema179.anyOf[2].allOf[0].properties.owner.type, parentSchema: - schema176.anyOf[2].allOf[0].properties.owner, + schema179.anyOf[2].allOf[0].properties.owner, data: data49, }; if (vErrors === null) { @@ -148311,8 +149055,8 @@ function validate191( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema176.anyOf[2].allOf[0].type, - parentSchema: schema176.anyOf[2].allOf[0], + schema: schema179.anyOf[2].allOf[0].type, + parentSchema: schema179.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -148339,7 +149083,7 @@ function validate191( params: { allowedValue: 'edge instantiable' }, message: 'must be equal to constant', schema: 'edge instantiable', - parentSchema: schema176.anyOf[2].allOf[1].properties.type, + parentSchema: schema179.anyOf[2].allOf[1].properties.type, data: data52, }; if (vErrors === null) { @@ -148368,7 +149112,7 @@ function validate191( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema176.anyOf[2].allOf[1].properties.codeUrl, + parentSchema: schema179.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -148385,8 +149129,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[2].allOf[1].properties.codeUrl.type, - parentSchema: schema176.anyOf[2].allOf[1].properties.codeUrl, + schema: schema179.anyOf[2].allOf[1].properties.codeUrl.type, + parentSchema: schema179.anyOf[2].allOf[1].properties.codeUrl, data: data53, }; if (vErrors === null) { @@ -148439,7 +149183,7 @@ function validate191( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[2].allOf[1].properties.services + schema179.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -148460,10 +149204,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[2].allOf[1].properties.services + schema179.anyOf[2].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema176.anyOf[2].allOf[1].properties.services + schema179.anyOf[2].allOf[1].properties.services .items.properties.serviceType, data: data56, }; @@ -148494,10 +149238,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[2].allOf[1].properties.services + schema179.anyOf[2].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema176.anyOf[2].allOf[1].properties.services + schema179.anyOf[2].allOf[1].properties.services .items.properties.serviceId, data: data57, }; @@ -148529,10 +149273,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[2].allOf[1].properties.services + schema179.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.type, parentSchema: - schema176.anyOf[2].allOf[1].properties.services + schema179.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -148561,16 +149305,16 @@ function validate191( keyword: 'enum', params: { allowedValues: - schema176.anyOf[2].allOf[1].properties.services + schema179.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema176.anyOf[2].allOf[1].properties.services + schema179.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection.enum, parentSchema: - schema176.anyOf[2].allOf[1].properties.services + schema179.anyOf[2].allOf[1].properties.services .items.properties.serviceDirection, data: data58, }; @@ -148596,10 +149340,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[2].allOf[1].properties.services.items + schema179.anyOf[2].allOf[1].properties.services.items .type, parentSchema: - schema176.anyOf[2].allOf[1].properties.services.items, + schema179.anyOf[2].allOf[1].properties.services.items, data: data55, }; if (vErrors === null) { @@ -148622,8 +149366,8 @@ function validate191( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema176.anyOf[2].allOf[1].properties.services.type, - parentSchema: schema176.anyOf[2].allOf[1].properties.services, + schema: schema179.anyOf[2].allOf[1].properties.services.type, + parentSchema: schema179.anyOf[2].allOf[1].properties.services, data: data54, }; if (vErrors === null) { @@ -148647,8 +149391,8 @@ function validate191( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema176.anyOf[2].allOf[1].type, - parentSchema: schema176.anyOf[2].allOf[1], + schema: schema179.anyOf[2].allOf[1].type, + parentSchema: schema179.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -148681,8 +149425,8 @@ function validate191( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema176.anyOf[3].allOf[0].required, - parentSchema: schema176.anyOf[3].allOf[0], + schema: schema179.anyOf[3].allOf[0].required, + parentSchema: schema179.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -148706,7 +149450,7 @@ function validate191( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema176.anyOf[3].allOf[0].properties.url, + parentSchema: schema179.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -148723,8 +149467,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[3].allOf[0].properties.url.type, - parentSchema: schema176.anyOf[3].allOf[0].properties.url, + schema: schema179.anyOf[3].allOf[0].properties.url.type, + parentSchema: schema179.anyOf[3].allOf[0].properties.url, data: data59, }; if (vErrors === null) { @@ -148751,8 +149495,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[3].allOf[0].properties.name.type, - parentSchema: schema176.anyOf[3].allOf[0].properties.name, + schema: schema179.anyOf[3].allOf[0].properties.name.type, + parentSchema: schema179.anyOf[3].allOf[0].properties.name, data: data60, }; if (vErrors === null) { @@ -148777,8 +149521,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[3].allOf[0].properties.description.type, - parentSchema: schema176.anyOf[3].allOf[0].properties.description, + schema: schema179.anyOf[3].allOf[0].properties.description.type, + parentSchema: schema179.anyOf[3].allOf[0].properties.description, data: data61, }; if (vErrors === null) { @@ -148803,8 +149547,8 @@ function validate191( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema176.anyOf[3].allOf[0].properties.type.type, - parentSchema: schema176.anyOf[3].allOf[0].properties.type, + schema: schema179.anyOf[3].allOf[0].properties.type.type, + parentSchema: schema179.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -148828,11 +149572,11 @@ function validate191( keyword: 'enum', params: { allowedValues: - schema176.anyOf[3].allOf[0].properties.type.enum, + schema179.anyOf[3].allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema176.anyOf[3].allOf[0].properties.type.enum, - parentSchema: schema176.anyOf[3].allOf[0].properties.type, + schema: schema179.anyOf[3].allOf[0].properties.type.enum, + parentSchema: schema179.anyOf[3].allOf[0].properties.type, data: data62, }; if (vErrors === null) { @@ -148857,8 +149601,8 @@ function validate191( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema176.anyOf[3].allOf[0].properties.isPublic.type, - parentSchema: schema176.anyOf[3].allOf[0].properties.isPublic, + schema: schema179.anyOf[3].allOf[0].properties.isPublic.type, + parentSchema: schema179.anyOf[3].allOf[0].properties.isPublic, data: data63, }; if (vErrors === null) { @@ -148902,10 +149646,10 @@ function validate191( missing10 + "'", schema: - schema176.anyOf[3].allOf[0].properties.viewer + schema179.anyOf[3].allOf[0].properties.viewer .items.required, parentSchema: - schema176.anyOf[3].allOf[0].properties.viewer + schema179.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -148937,7 +149681,7 @@ function validate191( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[3].allOf[0].properties + schema179.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -148961,10 +149705,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[3].allOf[0].properties + schema179.anyOf[3].allOf[0].properties .viewer.items.properties.url.type, parentSchema: - schema176.anyOf[3].allOf[0].properties + schema179.anyOf[3].allOf[0].properties .viewer.items.properties.url, data: data66, }; @@ -148988,10 +149732,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[3].allOf[0].properties.viewer + schema179.anyOf[3].allOf[0].properties.viewer .items.type, parentSchema: - schema176.anyOf[3].allOf[0].properties.viewer + schema179.anyOf[3].allOf[0].properties.viewer .items, data: data65, }; @@ -149016,9 +149760,9 @@ function validate191( params: { type: 'array' }, message: 'must be array', schema: - schema176.anyOf[3].allOf[0].properties.viewer.type, + schema179.anyOf[3].allOf[0].properties.viewer.type, parentSchema: - schema176.anyOf[3].allOf[0].properties.viewer, + schema179.anyOf[3].allOf[0].properties.viewer, data: data64, }; if (vErrors === null) { @@ -149066,10 +149810,10 @@ function validate191( missing11 + "'", schema: - schema176.anyOf[3].allOf[0].properties.owner + schema179.anyOf[3].allOf[0].properties.owner .items.required, parentSchema: - schema176.anyOf[3].allOf[0].properties.owner + schema179.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -149101,7 +149845,7 @@ function validate191( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[3].allOf[0] + schema179.anyOf[3].allOf[0] .properties.owner.items.properties .url, data: data69, @@ -149126,10 +149870,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[3].allOf[0].properties + schema179.anyOf[3].allOf[0].properties .owner.items.properties.url.type, parentSchema: - schema176.anyOf[3].allOf[0].properties + schema179.anyOf[3].allOf[0].properties .owner.items.properties.url, data: data69, }; @@ -149153,10 +149897,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[3].allOf[0].properties.owner + schema179.anyOf[3].allOf[0].properties.owner .items.type, parentSchema: - schema176.anyOf[3].allOf[0].properties.owner + schema179.anyOf[3].allOf[0].properties.owner .items, data: data68, }; @@ -149181,9 +149925,9 @@ function validate191( params: { type: 'array' }, message: 'must be array', schema: - schema176.anyOf[3].allOf[0].properties.owner.type, + schema179.anyOf[3].allOf[0].properties.owner.type, parentSchema: - schema176.anyOf[3].allOf[0].properties.owner, + schema179.anyOf[3].allOf[0].properties.owner, data: data67, }; if (vErrors === null) { @@ -149212,8 +149956,8 @@ function validate191( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema176.anyOf[3].allOf[0].type, - parentSchema: schema176.anyOf[3].allOf[0], + schema: schema179.anyOf[3].allOf[0].type, + parentSchema: schema179.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -149237,8 +149981,8 @@ function validate191( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema176.anyOf[3].allOf[1].required, - parentSchema: schema176.anyOf[3].allOf[1], + schema: schema179.anyOf[3].allOf[1].required, + parentSchema: schema179.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -149259,7 +150003,7 @@ function validate191( params: { allowedValue: 'group' }, message: 'must be equal to constant', schema: 'group', - parentSchema: schema176.anyOf[3].allOf[1].properties.type, + parentSchema: schema179.anyOf[3].allOf[1].properties.type, data: data70, }; if (vErrors === null) { @@ -149301,10 +150045,10 @@ function validate191( message: "must have required property '" + missing13 + "'", schema: - schema176.anyOf[3].allOf[1].properties.devices.items + schema179.anyOf[3].allOf[1].properties.devices.items .required, parentSchema: - schema176.anyOf[3].allOf[1].properties.devices.items, + schema179.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -149331,7 +150075,7 @@ function validate191( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema176.anyOf[3].allOf[1].properties + schema179.anyOf[3].allOf[1].properties .devices.items.properties.url, data: data73, }; @@ -149352,10 +150096,10 @@ function validate191( params: { type: 'string' }, message: 'must be string', schema: - schema176.anyOf[3].allOf[1].properties.devices + schema179.anyOf[3].allOf[1].properties.devices .items.properties.url.type, parentSchema: - schema176.anyOf[3].allOf[1].properties.devices + schema179.anyOf[3].allOf[1].properties.devices .items.properties.url, data: data73, }; @@ -149379,10 +150123,10 @@ function validate191( params: { type: 'object' }, message: 'must be object', schema: - schema176.anyOf[3].allOf[1].properties.devices.items + schema179.anyOf[3].allOf[1].properties.devices.items .type, parentSchema: - schema176.anyOf[3].allOf[1].properties.devices.items, + schema179.anyOf[3].allOf[1].properties.devices.items, data: data72, }; if (vErrors === null) { @@ -149405,8 +150149,8 @@ function validate191( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema176.anyOf[3].allOf[1].properties.devices.type, - parentSchema: schema176.anyOf[3].allOf[1].properties.devices, + schema: schema179.anyOf[3].allOf[1].properties.devices.type, + parentSchema: schema179.anyOf[3].allOf[1].properties.devices, data: data71, }; if (vErrors === null) { @@ -149430,8 +150174,8 @@ function validate191( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema176.anyOf[3].allOf[1].type, - parentSchema: schema176.anyOf[3].allOf[1], + schema: schema179.anyOf[3].allOf[1].type, + parentSchema: schema179.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -149456,8 +150200,8 @@ function validate191( keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema176.anyOf, - parentSchema: schema176, + schema: schema179.anyOf, + parentSchema: schema179, data, }; if (vErrors === null) { @@ -149466,7 +150210,7 @@ function validate191( vErrors.push(err124); } errors++; - validate191.errors = vErrors; + validate194.errors = vErrors; return false; } else { errors = _errs0; @@ -149478,11 +150222,11 @@ function validate191( } } } - validate191.errors = vErrors; + validate194.errors = vErrors; return errors === 0; } -exports.validateInstantiateDeviceResponse201Request = validate192; -const schema177 = { +exports.validateInstantiateDeviceResponse201Request = validate195; +const schema180 = { type: 'object', properties: { instance: { @@ -149569,7 +150313,7 @@ const schema177 = { '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate192( +function validate195( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -149582,15 +150326,15 @@ function validate192( (data.instance === undefined && (missing0 = 'instance')) || (data.deviceToken === undefined && (missing0 = 'deviceToken')) ) { - validate192.errors = [ + validate195.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema177.required, - parentSchema: schema177, + schema: schema180.required, + parentSchema: schema180, data, }, ]; @@ -149608,15 +150352,15 @@ function validate192( (data0.name === undefined && (missing1 = 'name')) || (data0.isPublic === undefined && (missing1 = 'isPublic')) ) { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance', schemaPath: '#/properties/instance/allOf/0/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema177.properties.instance.allOf[0].required, - parentSchema: schema177.properties.instance.allOf[0], + schema: schema180.properties.instance.allOf[0].required, + parentSchema: schema180.properties.instance.allOf[0], data: data0, }, ]; @@ -149626,7 +150370,7 @@ function validate192( let data1 = data0.name; const _errs4 = errors; if (typeof data1 !== 'string') { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/name', schemaPath: '#/properties/instance/allOf/0/properties/name/type', @@ -149634,9 +150378,9 @@ function validate192( params: { type: 'string' }, message: 'must be string', schema: - schema177.properties.instance.allOf[0].properties.name.type, + schema180.properties.instance.allOf[0].properties.name.type, parentSchema: - schema177.properties.instance.allOf[0].properties.name, + schema180.properties.instance.allOf[0].properties.name, data: data1, }, ]; @@ -149651,7 +150395,7 @@ function validate192( let data2 = data0.description; const _errs6 = errors; if (typeof data2 !== 'string') { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/description', schemaPath: @@ -149660,10 +150404,10 @@ function validate192( params: { type: 'string' }, message: 'must be string', schema: - schema177.properties.instance.allOf[0].properties.description + schema180.properties.instance.allOf[0].properties.description .type, parentSchema: - schema177.properties.instance.allOf[0].properties.description, + schema180.properties.instance.allOf[0].properties.description, data: data2, }, ]; @@ -149678,7 +150422,7 @@ function validate192( let data3 = data0.type; const _errs8 = errors; if (typeof data3 !== 'string') { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/type', schemaPath: @@ -149687,9 +150431,9 @@ function validate192( params: { type: 'string' }, message: 'must be string', schema: - schema177.properties.instance.allOf[0].properties.type.type, + schema180.properties.instance.allOf[0].properties.type.type, parentSchema: - schema177.properties.instance.allOf[0].properties.type, + schema180.properties.instance.allOf[0].properties.type, data: data3, }, ]; @@ -149703,7 +150447,7 @@ function validate192( data3 === 'cloud instantiable' ) ) { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/type', schemaPath: @@ -149711,14 +150455,14 @@ function validate192( keyword: 'enum', params: { allowedValues: - schema177.properties.instance.allOf[0].properties.type + schema180.properties.instance.allOf[0].properties.type .enum, }, message: 'must be equal to one of the allowed values', schema: - schema177.properties.instance.allOf[0].properties.type.enum, + schema180.properties.instance.allOf[0].properties.type.enum, parentSchema: - schema177.properties.instance.allOf[0].properties.type, + schema180.properties.instance.allOf[0].properties.type, data: data3, }, ]; @@ -149733,7 +150477,7 @@ function validate192( let data4 = data0.isPublic; const _errs10 = errors; if (typeof data4 !== 'boolean') { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/isPublic', schemaPath: @@ -149742,10 +150486,10 @@ function validate192( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema177.properties.instance.allOf[0].properties.isPublic + schema180.properties.instance.allOf[0].properties.isPublic .type, parentSchema: - schema177.properties.instance.allOf[0].properties + schema180.properties.instance.allOf[0].properties .isPublic, data: data4, }, @@ -149775,7 +150519,7 @@ function validate192( ) { let missing2; if (data6.url === undefined && (missing2 = 'url')) { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/viewer/' + i0, @@ -149788,10 +150532,10 @@ function validate192( missing2 + "'", schema: - schema177.properties.instance.allOf[0] + schema180.properties.instance.allOf[0] .properties.viewer.items.required, parentSchema: - schema177.properties.instance.allOf[0] + schema180.properties.instance.allOf[0] .properties.viewer.items, data: data6, }, @@ -149805,7 +150549,7 @@ function validate192( if (errors === _errs16) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + @@ -149820,7 +150564,7 @@ function validate192( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema177.properties.instance + schema180.properties.instance .allOf[0].properties.viewer.items .properties.url, data: data7, @@ -149829,7 +150573,7 @@ function validate192( return false; } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + @@ -149842,11 +150586,11 @@ function validate192( params: { type: 'string' }, message: 'must be string', schema: - schema177.properties.instance.allOf[0] + schema180.properties.instance.allOf[0] .properties.viewer.items.properties .url.type, parentSchema: - schema177.properties.instance.allOf[0] + schema180.properties.instance.allOf[0] .properties.viewer.items.properties .url, data: data7, @@ -149859,7 +150603,7 @@ function validate192( } } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/viewer/' + i0, @@ -149869,10 +150613,10 @@ function validate192( params: { type: 'object' }, message: 'must be object', schema: - schema177.properties.instance.allOf[0] + schema180.properties.instance.allOf[0] .properties.viewer.items.type, parentSchema: - schema177.properties.instance.allOf[0] + schema180.properties.instance.allOf[0] .properties.viewer.items, data: data6, }, @@ -149886,7 +150630,7 @@ function validate192( } } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/viewer', schemaPath: @@ -149895,10 +150639,10 @@ function validate192( params: { type: 'array' }, message: 'must be array', schema: - schema177.properties.instance.allOf[0].properties + schema180.properties.instance.allOf[0].properties .viewer.type, parentSchema: - schema177.properties.instance.allOf[0].properties + schema180.properties.instance.allOf[0].properties .viewer, data: data5, }, @@ -149929,7 +150673,7 @@ function validate192( ) { let missing3; if (data9.url === undefined && (missing3 = 'url')) { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/owner/' + i1, @@ -149942,10 +150686,10 @@ function validate192( missing3 + "'", schema: - schema177.properties.instance.allOf[0] + schema180.properties.instance.allOf[0] .properties.owner.items.required, parentSchema: - schema177.properties.instance.allOf[0] + schema180.properties.instance.allOf[0] .properties.owner.items, data: data9, }, @@ -149959,7 +150703,7 @@ function validate192( if (errors === _errs22) { if (typeof data10 === 'string') { if (!formats0(data10)) { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + @@ -149976,7 +150720,7 @@ function validate192( '"', schema: 'uri', parentSchema: - schema177.properties.instance + schema180.properties.instance .allOf[0].properties.owner.items .properties.url, data: data10, @@ -149985,7 +150729,7 @@ function validate192( return false; } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + @@ -149998,11 +150742,11 @@ function validate192( params: { type: 'string' }, message: 'must be string', schema: - schema177.properties.instance + schema180.properties.instance .allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema177.properties.instance + schema180.properties.instance .allOf[0].properties.owner.items .properties.url, data: data10, @@ -150015,7 +150759,7 @@ function validate192( } } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/owner/' + i1, @@ -150025,10 +150769,10 @@ function validate192( params: { type: 'object' }, message: 'must be object', schema: - schema177.properties.instance.allOf[0] + schema180.properties.instance.allOf[0] .properties.owner.items.type, parentSchema: - schema177.properties.instance.allOf[0] + schema180.properties.instance.allOf[0] .properties.owner.items, data: data9, }, @@ -150042,7 +150786,7 @@ function validate192( } } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/owner', schemaPath: @@ -150051,10 +150795,10 @@ function validate192( params: { type: 'array' }, message: 'must be array', schema: - schema177.properties.instance.allOf[0].properties + schema180.properties.instance.allOf[0].properties .owner.type, parentSchema: - schema177.properties.instance.allOf[0].properties + schema180.properties.instance.allOf[0].properties .owner, data: data8, }, @@ -150073,15 +150817,15 @@ function validate192( } } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance', schemaPath: '#/properties/instance/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema177.properties.instance.allOf[0].type, - parentSchema: schema177.properties.instance.allOf[0], + schema: schema180.properties.instance.allOf[0].type, + parentSchema: schema180.properties.instance.allOf[0], data: data0, }, ]; @@ -150097,7 +150841,7 @@ function validate192( let data11 = data0.type; const _errs26 = errors; if ('device' !== data11) { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/type', schemaPath: '#/properties/instance/allOf/1/properties/type/const', @@ -150106,7 +150850,7 @@ function validate192( message: 'must be equal to constant', schema: 'device', parentSchema: - schema177.properties.instance.allOf[1].properties.type, + schema180.properties.instance.allOf[1].properties.type, data: data11, }, ]; @@ -150124,7 +150868,7 @@ function validate192( if (errors === _errs27) { if (typeof data12 === 'string') { if (!formats0(data12)) { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/experiment', schemaPath: @@ -150134,7 +150878,7 @@ function validate192( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema177.properties.instance.allOf[1].properties + schema180.properties.instance.allOf[1].properties .experiment, data: data12, }, @@ -150142,7 +150886,7 @@ function validate192( return false; } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/experiment', schemaPath: @@ -150151,10 +150895,10 @@ function validate192( params: { type: 'string' }, message: 'must be string', schema: - schema177.properties.instance.allOf[1].properties + schema180.properties.instance.allOf[1].properties .experiment.type, parentSchema: - schema177.properties.instance.allOf[1].properties + schema180.properties.instance.allOf[1].properties .experiment, data: data12, }, @@ -150191,7 +150935,7 @@ function validate192( if (errors === _errs34) { if (typeof data15 === 'string') { if (!formats0(data15)) { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + @@ -150206,7 +150950,7 @@ function validate192( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema177.properties.instance.allOf[1] + schema180.properties.instance.allOf[1] .properties.services.items.properties .serviceType, data: data15, @@ -150215,7 +150959,7 @@ function validate192( return false; } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + @@ -150228,11 +150972,11 @@ function validate192( params: { type: 'string' }, message: 'must be string', schema: - schema177.properties.instance.allOf[1] + schema180.properties.instance.allOf[1] .properties.services.items.properties .serviceType.type, parentSchema: - schema177.properties.instance.allOf[1] + schema180.properties.instance.allOf[1] .properties.services.items.properties .serviceType, data: data15, @@ -150251,7 +150995,7 @@ function validate192( let data16 = data14.serviceId; const _errs36 = errors; if (typeof data16 !== 'string') { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + @@ -150264,11 +151008,11 @@ function validate192( params: { type: 'string' }, message: 'must be string', schema: - schema177.properties.instance.allOf[1] + schema180.properties.instance.allOf[1] .properties.services.items.properties .serviceId.type, parentSchema: - schema177.properties.instance.allOf[1] + schema180.properties.instance.allOf[1] .properties.services.items.properties .serviceId, data: data16, @@ -150285,7 +151029,7 @@ function validate192( let data17 = data14.serviceDirection; const _errs38 = errors; if (typeof data17 !== 'string') { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + @@ -150298,11 +151042,11 @@ function validate192( params: { type: 'string' }, message: 'must be string', schema: - schema177.properties.instance.allOf[1] + schema180.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection.type, parentSchema: - schema177.properties.instance.allOf[1] + schema180.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection, data: data17, @@ -150317,7 +151061,7 @@ function validate192( data17 === 'prosumer' ) ) { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + @@ -150329,18 +151073,18 @@ function validate192( keyword: 'enum', params: { allowedValues: - schema177.properties.instance.allOf[1] + schema180.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema177.properties.instance.allOf[1] + schema180.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection.enum, parentSchema: - schema177.properties.instance.allOf[1] + schema180.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection, data: data17, @@ -150355,7 +151099,7 @@ function validate192( } } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/services/' + i2, @@ -150365,10 +151109,10 @@ function validate192( params: { type: 'object' }, message: 'must be object', schema: - schema177.properties.instance.allOf[1].properties + schema180.properties.instance.allOf[1].properties .services.items.type, parentSchema: - schema177.properties.instance.allOf[1].properties + schema180.properties.instance.allOf[1].properties .services.items, data: data14, }, @@ -150382,7 +151126,7 @@ function validate192( } } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance/services', schemaPath: @@ -150391,10 +151135,10 @@ function validate192( params: { type: 'array' }, message: 'must be array', schema: - schema177.properties.instance.allOf[1].properties.services + schema180.properties.instance.allOf[1].properties.services .type, parentSchema: - schema177.properties.instance.allOf[1].properties + schema180.properties.instance.allOf[1].properties .services, data: data13, }, @@ -150409,15 +151153,15 @@ function validate192( } } } else { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/instance', schemaPath: '#/properties/instance/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema177.properties.instance.allOf[1].type, - parentSchema: schema177.properties.instance.allOf[1], + schema: schema180.properties.instance.allOf[1].type, + parentSchema: schema180.properties.instance.allOf[1], data: data0, }, ]; @@ -150435,15 +151179,15 @@ function validate192( let data18 = data.deviceToken; const _errs40 = errors; if (typeof data18 !== 'string') { - validate192.errors = [ + validate195.errors = [ { instancePath: instancePath + '/deviceToken', schemaPath: '#/properties/deviceToken/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema177.properties.deviceToken.type, - parentSchema: schema177.properties.deviceToken, + schema: schema180.properties.deviceToken.type, + parentSchema: schema180.properties.deviceToken, data: data18, }, ]; @@ -150456,26 +151200,26 @@ function validate192( } } } else { - validate192.errors = [ + validate195.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema177.type, - parentSchema: schema177, + schema: schema180.type, + parentSchema: schema180, data, }, ]; return false; } } - validate192.errors = vErrors; + validate195.errors = vErrors; return errors === 0; } -exports.validateInstantiateDeviceResponse201Response = validate193; -const schema178 = { +exports.validateInstantiateDeviceResponse201Response = validate196; +const schema181 = { type: 'object', properties: { instance: { @@ -150589,7 +151333,7 @@ const schema178 = { '#/paths//devices/{device_id}/post/responses/201/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate193( +function validate196( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -150602,15 +151346,15 @@ function validate193( (data.instance === undefined && (missing0 = 'instance')) || (data.deviceToken === undefined && (missing0 = 'deviceToken')) ) { - validate193.errors = [ + validate196.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema178.required, - parentSchema: schema178, + schema: schema181.required, + parentSchema: schema181, data, }, ]; @@ -150629,15 +151373,15 @@ function validate193( (data0.name === undefined && (missing1 = 'name')) || (data0.isPublic === undefined && (missing1 = 'isPublic')) ) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance', schemaPath: '#/properties/instance/allOf/0/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema178.properties.instance.allOf[0].required, - parentSchema: schema178.properties.instance.allOf[0], + schema: schema181.properties.instance.allOf[0].required, + parentSchema: schema181.properties.instance.allOf[0], data: data0, }, ]; @@ -150650,7 +151394,7 @@ function validate193( if (errors === _errs4) { if (typeof data1 === 'string') { if (!formats0(data1)) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/url', schemaPath: @@ -150660,14 +151404,14 @@ function validate193( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema178.properties.instance.allOf[0].properties.url, + schema181.properties.instance.allOf[0].properties.url, data: data1, }, ]; return false; } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/url', schemaPath: @@ -150676,9 +151420,9 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance.allOf[0].properties.url.type, + schema181.properties.instance.allOf[0].properties.url.type, parentSchema: - schema178.properties.instance.allOf[0].properties.url, + schema181.properties.instance.allOf[0].properties.url, data: data1, }, ]; @@ -150695,7 +151439,7 @@ function validate193( let data2 = data0.name; const _errs6 = errors; if (typeof data2 !== 'string') { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/name', schemaPath: @@ -150704,9 +151448,9 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance.allOf[0].properties.name.type, + schema181.properties.instance.allOf[0].properties.name.type, parentSchema: - schema178.properties.instance.allOf[0].properties.name, + schema181.properties.instance.allOf[0].properties.name, data: data2, }, ]; @@ -150721,7 +151465,7 @@ function validate193( let data3 = data0.description; const _errs8 = errors; if (typeof data3 !== 'string') { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/description', schemaPath: @@ -150730,10 +151474,10 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance.allOf[0].properties + schema181.properties.instance.allOf[0].properties .description.type, parentSchema: - schema178.properties.instance.allOf[0].properties + schema181.properties.instance.allOf[0].properties .description, data: data3, }, @@ -150749,7 +151493,7 @@ function validate193( let data4 = data0.type; const _errs10 = errors; if (typeof data4 !== 'string') { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/type', schemaPath: @@ -150758,10 +151502,10 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance.allOf[0].properties.type + schema181.properties.instance.allOf[0].properties.type .type, parentSchema: - schema178.properties.instance.allOf[0].properties.type, + schema181.properties.instance.allOf[0].properties.type, data: data4, }, ]; @@ -150775,7 +151519,7 @@ function validate193( data4 === 'cloud instantiable' ) ) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/type', schemaPath: @@ -150783,15 +151527,15 @@ function validate193( keyword: 'enum', params: { allowedValues: - schema178.properties.instance.allOf[0].properties.type + schema181.properties.instance.allOf[0].properties.type .enum, }, message: 'must be equal to one of the allowed values', schema: - schema178.properties.instance.allOf[0].properties.type + schema181.properties.instance.allOf[0].properties.type .enum, parentSchema: - schema178.properties.instance.allOf[0].properties.type, + schema181.properties.instance.allOf[0].properties.type, data: data4, }, ]; @@ -150806,7 +151550,7 @@ function validate193( let data5 = data0.isPublic; const _errs12 = errors; if (typeof data5 !== 'boolean') { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/isPublic', schemaPath: @@ -150815,10 +151559,10 @@ function validate193( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema178.properties.instance.allOf[0].properties + schema181.properties.instance.allOf[0].properties .isPublic.type, parentSchema: - schema178.properties.instance.allOf[0].properties + schema181.properties.instance.allOf[0].properties .isPublic, data: data5, }, @@ -150848,7 +151592,7 @@ function validate193( ) { let missing2; if (data7.url === undefined && (missing2 = 'url')) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/viewer/' + i0, @@ -150861,10 +151605,10 @@ function validate193( missing2 + "'", schema: - schema178.properties.instance.allOf[0] + schema181.properties.instance.allOf[0] .properties.viewer.items.required, parentSchema: - schema178.properties.instance.allOf[0] + schema181.properties.instance.allOf[0] .properties.viewer.items, data: data7, }, @@ -150878,7 +151622,7 @@ function validate193( if (errors === _errs18) { if (typeof data8 === 'string') { if (!formats0(data8)) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -150895,7 +151639,7 @@ function validate193( '"', schema: 'uri', parentSchema: - schema178.properties.instance + schema181.properties.instance .allOf[0].properties.viewer .items.properties.url, data: data8, @@ -150904,7 +151648,7 @@ function validate193( return false; } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -150917,11 +151661,11 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance + schema181.properties.instance .allOf[0].properties.viewer.items .properties.url.type, parentSchema: - schema178.properties.instance + schema181.properties.instance .allOf[0].properties.viewer.items .properties.url, data: data8, @@ -150934,7 +151678,7 @@ function validate193( } } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/viewer/' + i0, @@ -150944,10 +151688,10 @@ function validate193( params: { type: 'object' }, message: 'must be object', schema: - schema178.properties.instance.allOf[0] + schema181.properties.instance.allOf[0] .properties.viewer.items.type, parentSchema: - schema178.properties.instance.allOf[0] + schema181.properties.instance.allOf[0] .properties.viewer.items, data: data7, }, @@ -150961,7 +151705,7 @@ function validate193( } } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/viewer', schemaPath: @@ -150970,10 +151714,10 @@ function validate193( params: { type: 'array' }, message: 'must be array', schema: - schema178.properties.instance.allOf[0].properties + schema181.properties.instance.allOf[0].properties .viewer.type, parentSchema: - schema178.properties.instance.allOf[0].properties + schema181.properties.instance.allOf[0].properties .viewer, data: data6, }, @@ -151007,7 +151751,7 @@ function validate193( data10.url === undefined && (missing3 = 'url') ) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/owner/' + i1, @@ -151020,10 +151764,10 @@ function validate193( missing3 + "'", schema: - schema178.properties.instance.allOf[0] + schema181.properties.instance.allOf[0] .properties.owner.items.required, parentSchema: - schema178.properties.instance.allOf[0] + schema181.properties.instance.allOf[0] .properties.owner.items, data: data10, }, @@ -151037,7 +151781,7 @@ function validate193( if (errors === _errs24) { if (typeof data11 === 'string') { if (!formats0(data11)) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151054,7 +151798,7 @@ function validate193( '"', schema: 'uri', parentSchema: - schema178.properties.instance + schema181.properties.instance .allOf[0].properties.owner .items.properties.url, data: data11, @@ -151063,7 +151807,7 @@ function validate193( return false; } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151076,11 +151820,11 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance + schema181.properties.instance .allOf[0].properties.owner.items .properties.url.type, parentSchema: - schema178.properties.instance + schema181.properties.instance .allOf[0].properties.owner.items .properties.url, data: data11, @@ -151093,7 +151837,7 @@ function validate193( } } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/owner/' + i1, @@ -151103,10 +151847,10 @@ function validate193( params: { type: 'object' }, message: 'must be object', schema: - schema178.properties.instance.allOf[0] + schema181.properties.instance.allOf[0] .properties.owner.items.type, parentSchema: - schema178.properties.instance.allOf[0] + schema181.properties.instance.allOf[0] .properties.owner.items, data: data10, }, @@ -151120,7 +151864,7 @@ function validate193( } } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/owner', schemaPath: @@ -151129,10 +151873,10 @@ function validate193( params: { type: 'array' }, message: 'must be array', schema: - schema178.properties.instance.allOf[0].properties + schema181.properties.instance.allOf[0].properties .owner.type, parentSchema: - schema178.properties.instance.allOf[0].properties + schema181.properties.instance.allOf[0].properties .owner, data: data9, }, @@ -151152,15 +151896,15 @@ function validate193( } } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance', schemaPath: '#/properties/instance/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema178.properties.instance.allOf[0].type, - parentSchema: schema178.properties.instance.allOf[0], + schema: schema181.properties.instance.allOf[0].type, + parentSchema: schema181.properties.instance.allOf[0], data: data0, }, ]; @@ -151176,7 +151920,7 @@ function validate193( let data12 = data0.type; const _errs28 = errors; if ('device' !== data12) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/type', schemaPath: '#/properties/instance/allOf/1/properties/type/const', @@ -151185,7 +151929,7 @@ function validate193( message: 'must be equal to constant', schema: 'device', parentSchema: - schema178.properties.instance.allOf[1].properties.type, + schema181.properties.instance.allOf[1].properties.type, data: data12, }, ]; @@ -151200,7 +151944,7 @@ function validate193( let data13 = data0.connected; const _errs29 = errors; if (typeof data13 !== 'boolean') { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/connected', schemaPath: @@ -151209,10 +151953,10 @@ function validate193( params: { type: 'boolean' }, message: 'must be boolean', schema: - schema178.properties.instance.allOf[1].properties.connected + schema181.properties.instance.allOf[1].properties.connected .type, parentSchema: - schema178.properties.instance.allOf[1].properties.connected, + schema181.properties.instance.allOf[1].properties.connected, data: data13, }, ]; @@ -151246,7 +151990,7 @@ function validate193( if (errors === _errs35) { if (typeof data16 === 'string') { if (!formats22.validate(data16)) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151261,7 +152005,7 @@ function validate193( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.announcedAvailability.items .properties.start, data: data16, @@ -151270,7 +152014,7 @@ function validate193( return false; } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151283,11 +152027,11 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.announcedAvailability.items .properties.start.type, parentSchema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.announcedAvailability.items .properties.start, data: data16, @@ -151309,7 +152053,7 @@ function validate193( if (errors === _errs37) { if (typeof data17 === 'string') { if (!formats22.validate(data17)) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151326,7 +152070,7 @@ function validate193( '"', schema: 'date-time', parentSchema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.announcedAvailability .items.properties.end, data: data17, @@ -151335,7 +152079,7 @@ function validate193( return false; } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151348,11 +152092,11 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.announcedAvailability.items .properties.end.type, parentSchema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.announcedAvailability.items .properties.end, data: data17, @@ -151368,7 +152112,7 @@ function validate193( } } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151380,10 +152124,10 @@ function validate193( params: { type: 'object' }, message: 'must be object', schema: - schema178.properties.instance.allOf[1].properties + schema181.properties.instance.allOf[1].properties .announcedAvailability.items.type, parentSchema: - schema178.properties.instance.allOf[1].properties + schema181.properties.instance.allOf[1].properties .announcedAvailability.items, data: data15, }, @@ -151397,7 +152141,7 @@ function validate193( } } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/announcedAvailability', @@ -151407,10 +152151,10 @@ function validate193( params: { type: 'array' }, message: 'must be array', schema: - schema178.properties.instance.allOf[1].properties + schema181.properties.instance.allOf[1].properties .announcedAvailability.type, parentSchema: - schema178.properties.instance.allOf[1].properties + schema181.properties.instance.allOf[1].properties .announcedAvailability, data: data14, }, @@ -151430,7 +152174,7 @@ function validate193( if (errors === _errs39) { if (typeof data18 === 'string') { if (!formats0(data18)) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/experiment', schemaPath: @@ -151440,7 +152184,7 @@ function validate193( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema178.properties.instance.allOf[1].properties + schema181.properties.instance.allOf[1].properties .experiment, data: data18, }, @@ -151448,7 +152192,7 @@ function validate193( return false; } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/experiment', schemaPath: @@ -151457,10 +152201,10 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance.allOf[1].properties + schema181.properties.instance.allOf[1].properties .experiment.type, parentSchema: - schema178.properties.instance.allOf[1].properties + schema181.properties.instance.allOf[1].properties .experiment, data: data18, }, @@ -151497,7 +152241,7 @@ function validate193( if (errors === _errs46) { if (typeof data21 === 'string') { if (!formats0(data21)) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151512,7 +152256,7 @@ function validate193( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items .properties.serviceType, data: data21, @@ -151521,7 +152265,7 @@ function validate193( return false; } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151534,11 +152278,11 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items.properties .serviceType.type, parentSchema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items.properties .serviceType, data: data21, @@ -151557,7 +152301,7 @@ function validate193( let data22 = data20.serviceId; const _errs48 = errors; if (typeof data22 !== 'string') { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151570,11 +152314,11 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items.properties .serviceId.type, parentSchema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items.properties .serviceId, data: data22, @@ -151591,7 +152335,7 @@ function validate193( let data23 = data20.serviceDirection; const _errs50 = errors; if (typeof data23 !== 'string') { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151604,11 +152348,11 @@ function validate193( params: { type: 'string' }, message: 'must be string', schema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection.type, parentSchema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection, data: data23, @@ -151623,7 +152367,7 @@ function validate193( data23 === 'prosumer' ) ) { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + @@ -151635,18 +152379,18 @@ function validate193( keyword: 'enum', params: { allowedValues: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items .properties.serviceDirection.enum, }, message: 'must be equal to one of the allowed values', schema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection.enum, parentSchema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items.properties .serviceDirection, data: data23, @@ -151661,7 +152405,7 @@ function validate193( } } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/services/' + i3, @@ -151671,10 +152415,10 @@ function validate193( params: { type: 'object' }, message: 'must be object', schema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items.type, parentSchema: - schema178.properties.instance.allOf[1] + schema181.properties.instance.allOf[1] .properties.services.items, data: data20, }, @@ -151688,7 +152432,7 @@ function validate193( } } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance/services', schemaPath: @@ -151697,10 +152441,10 @@ function validate193( params: { type: 'array' }, message: 'must be array', schema: - schema178.properties.instance.allOf[1].properties + schema181.properties.instance.allOf[1].properties .services.type, parentSchema: - schema178.properties.instance.allOf[1].properties + schema181.properties.instance.allOf[1].properties .services, data: data19, }, @@ -151717,15 +152461,15 @@ function validate193( } } } else { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/instance', schemaPath: '#/properties/instance/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema178.properties.instance.allOf[1].type, - parentSchema: schema178.properties.instance.allOf[1], + schema: schema181.properties.instance.allOf[1].type, + parentSchema: schema181.properties.instance.allOf[1], data: data0, }, ]; @@ -151743,15 +152487,15 @@ function validate193( let data24 = data.deviceToken; const _errs52 = errors; if (typeof data24 !== 'string') { - validate193.errors = [ + validate196.errors = [ { instancePath: instancePath + '/deviceToken', schemaPath: '#/properties/deviceToken/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema178.properties.deviceToken.type, - parentSchema: schema178.properties.deviceToken, + schema: schema181.properties.deviceToken.type, + parentSchema: schema181.properties.deviceToken, data: data24, }, ]; @@ -151764,26 +152508,26 @@ function validate193( } } } else { - validate193.errors = [ + validate196.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema178.type, - parentSchema: schema178, + schema: schema181.type, + parentSchema: schema181, data, }, ]; return false; } } - validate193.errors = vErrors; + validate196.errors = vErrors; return errors === 0; } -exports.validateGetDeviceAvailabilityResponse200Request = validate194; -const schema179 = { +exports.validateGetDeviceAvailabilityResponse200Request = validate197; +const schema182 = { title: 'Availability', description: 'A list of time slots that the maintainer of the device announced it is available\n', @@ -151802,7 +152546,7 @@ const schema179 = { '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate194( +function validate197( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -151824,7 +152568,7 @@ function validate194( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate194.errors = [ + validate197.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/format', @@ -151832,22 +152576,22 @@ function validate194( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema179.items.properties.start, + parentSchema: schema182.items.properties.start, data: data1, }, ]; return false; } } else { - validate194.errors = [ + validate197.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema179.items.properties.start.type, - parentSchema: schema179.items.properties.start, + schema: schema182.items.properties.start.type, + parentSchema: schema182.items.properties.start, data: data1, }, ]; @@ -151867,7 +152611,7 @@ function validate194( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats22.validate(data2)) { - validate194.errors = [ + validate197.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/format', @@ -151875,22 +152619,22 @@ function validate194( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema179.items.properties.end, + parentSchema: schema182.items.properties.end, data: data2, }, ]; return false; } } else { - validate194.errors = [ + validate197.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema179.items.properties.end.type, - parentSchema: schema179.items.properties.end, + schema: schema182.items.properties.end.type, + parentSchema: schema182.items.properties.end, data: data2, }, ]; @@ -151904,15 +152648,15 @@ function validate194( } } } else { - validate194.errors = [ + validate197.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema179.items.type, - parentSchema: schema179.items, + schema: schema182.items.type, + parentSchema: schema182.items, data: data0, }, ]; @@ -151925,26 +152669,26 @@ function validate194( } } } else { - validate194.errors = [ + validate197.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema179.type, - parentSchema: schema179, + schema: schema182.type, + parentSchema: schema182, data, }, ]; return false; } } - validate194.errors = vErrors; + validate197.errors = vErrors; return errors === 0; } -exports.validateGetDeviceAvailabilityResponse200Response = validate195; -const schema180 = { +exports.validateGetDeviceAvailabilityResponse200Response = validate198; +const schema183 = { title: 'Availability', description: 'A list of time slots that the maintainer of the device announced it is available\n', @@ -151963,7 +152707,7 @@ const schema180 = { '#/paths//devices/{device_id}/availability/get/responses/200/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate195( +function validate198( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -151985,7 +152729,7 @@ function validate195( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate195.errors = [ + validate198.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/format', @@ -151993,22 +152737,22 @@ function validate195( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema180.items.properties.start, + parentSchema: schema183.items.properties.start, data: data1, }, ]; return false; } } else { - validate195.errors = [ + validate198.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema180.items.properties.start.type, - parentSchema: schema180.items.properties.start, + schema: schema183.items.properties.start.type, + parentSchema: schema183.items.properties.start, data: data1, }, ]; @@ -152028,7 +152772,7 @@ function validate195( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats22.validate(data2)) { - validate195.errors = [ + validate198.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/format', @@ -152036,22 +152780,22 @@ function validate195( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema180.items.properties.end, + parentSchema: schema183.items.properties.end, data: data2, }, ]; return false; } } else { - validate195.errors = [ + validate198.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema180.items.properties.end.type, - parentSchema: schema180.items.properties.end, + schema: schema183.items.properties.end.type, + parentSchema: schema183.items.properties.end, data: data2, }, ]; @@ -152065,15 +152809,15 @@ function validate195( } } } else { - validate195.errors = [ + validate198.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema180.items.type, - parentSchema: schema180.items, + schema: schema183.items.type, + parentSchema: schema183.items, data: data0, }, ]; @@ -152086,26 +152830,26 @@ function validate195( } } } else { - validate195.errors = [ + validate198.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema180.type, - parentSchema: schema180, + schema: schema183.type, + parentSchema: schema183, data, }, ]; return false; } } - validate195.errors = vErrors; + validate198.errors = vErrors; return errors === 0; } -exports.validateAddDeviceAvailabilityRulesBodyRequest = validate196; -const schema181 = { +exports.validateAddDeviceAvailabilityRulesBodyRequest = validate199; +const schema184 = { title: 'Availability Rules', description: 'The availability rule to be applied.', type: 'array', @@ -152153,7 +152897,7 @@ const schema181 = { '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate196( +function validate199( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -152167,15 +152911,15 @@ function validate196( let data0 = data[i0]; const _errs1 = errors; if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema181.items.type, - parentSchema: schema181.items, + schema: schema184.items.type, + parentSchema: schema184.items, data: data0, }, ]; @@ -152191,7 +152935,7 @@ function validate196( if (errors === _errs5) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/allOf/0/properties/start/format', @@ -152199,22 +152943,22 @@ function validate196( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema181.items.allOf[0].properties.start, + parentSchema: schema184.items.allOf[0].properties.start, data: data1, }, ]; return false; } } else { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/allOf/0/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema181.items.allOf[0].properties.start.type, - parentSchema: schema181.items.allOf[0].properties.start, + schema: schema184.items.allOf[0].properties.start.type, + parentSchema: schema184.items.allOf[0].properties.start, data: data1, }, ]; @@ -152234,7 +152978,7 @@ function validate196( if (errors === _errs7) { if (typeof data2 === 'string') { if (!formats22.validate(data2)) { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/allOf/0/properties/end/format', @@ -152242,22 +152986,22 @@ function validate196( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema181.items.allOf[0].properties.end, + parentSchema: schema184.items.allOf[0].properties.end, data: data2, }, ]; return false; } } else { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/allOf/0/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema181.items.allOf[0].properties.end.type, - parentSchema: schema181.items.allOf[0].properties.end, + schema: schema184.items.allOf[0].properties.end.type, + parentSchema: schema184.items.allOf[0].properties.end, data: data2, }, ]; @@ -152271,15 +153015,15 @@ function validate196( } } } else { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema181.items.allOf[0].type, - parentSchema: schema181.items.allOf[0], + schema: schema184.items.allOf[0].type, + parentSchema: schema184.items.allOf[0], data: data0, }, ]; @@ -152295,15 +153039,15 @@ function validate196( let data3 = data0.available; const _errs11 = errors; if (typeof data3 !== 'boolean') { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/available', schemaPath: '#/items/allOf/1/properties/available/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema181.items.allOf[1].properties.available.type, - parentSchema: schema181.items.allOf[1].properties.available, + schema: schema184.items.allOf[1].properties.available.type, + parentSchema: schema184.items.allOf[1].properties.available, data: data3, }, ]; @@ -152321,15 +153065,15 @@ function validate196( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing0; if (data4.frequency === undefined && (missing0 = 'frequency')) { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat', schemaPath: '#/items/allOf/1/properties/repeat/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema181.items.allOf[1].properties.repeat.required, - parentSchema: schema181.items.allOf[1].properties.repeat, + schema: schema184.items.allOf[1].properties.repeat.required, + parentSchema: schema184.items.allOf[1].properties.repeat, data: data4, }, ]; @@ -152339,7 +153083,7 @@ function validate196( let data5 = data4.frequency; const _errs15 = errors; if (typeof data5 !== 'string') { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/frequency', @@ -152349,10 +153093,10 @@ function validate196( params: { type: 'string' }, message: 'must be string', schema: - schema181.items.allOf[1].properties.repeat.properties + schema184.items.allOf[1].properties.repeat.properties .frequency.type, parentSchema: - schema181.items.allOf[1].properties.repeat.properties + schema184.items.allOf[1].properties.repeat.properties .frequency, data: data5, }, @@ -152366,7 +153110,7 @@ function validate196( data5 === 'WEEKLY' ) ) { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/frequency', @@ -152375,15 +153119,15 @@ function validate196( keyword: 'enum', params: { allowedValues: - schema181.items.allOf[1].properties.repeat.properties + schema184.items.allOf[1].properties.repeat.properties .frequency.enum, }, message: 'must be equal to one of the allowed values', schema: - schema181.items.allOf[1].properties.repeat.properties + schema184.items.allOf[1].properties.repeat.properties .frequency.enum, parentSchema: - schema181.items.allOf[1].properties.repeat.properties + schema184.items.allOf[1].properties.repeat.properties .frequency, data: data5, }, @@ -152402,7 +153146,7 @@ function validate196( if (errors === _errs17) { if (typeof data6 === 'string') { if (!formats22.validate(data6)) { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/until', @@ -152414,7 +153158,7 @@ function validate196( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema181.items.allOf[1].properties.repeat + schema184.items.allOf[1].properties.repeat .properties.until, data: data6, }, @@ -152422,7 +153166,7 @@ function validate196( return false; } } else { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/until', @@ -152432,10 +153176,10 @@ function validate196( params: { type: 'string' }, message: 'must be string', schema: - schema181.items.allOf[1].properties.repeat + schema184.items.allOf[1].properties.repeat .properties.until.type, parentSchema: - schema181.items.allOf[1].properties.repeat + schema184.items.allOf[1].properties.repeat .properties.until, data: data6, }, @@ -152460,7 +153204,7 @@ function validate196( isFinite(data7) ) ) { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/count', @@ -152470,10 +153214,10 @@ function validate196( params: { type: 'integer' }, message: 'must be integer', schema: - schema181.items.allOf[1].properties.repeat + schema184.items.allOf[1].properties.repeat .properties.count.type, parentSchema: - schema181.items.allOf[1].properties.repeat + schema184.items.allOf[1].properties.repeat .properties.count, data: data7, }, @@ -152488,15 +153232,15 @@ function validate196( } } } else { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat', schemaPath: '#/items/allOf/1/properties/repeat/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema181.items.allOf[1].properties.repeat.type, - parentSchema: schema181.items.allOf[1].properties.repeat, + schema: schema184.items.allOf[1].properties.repeat.type, + parentSchema: schema184.items.allOf[1].properties.repeat, data: data4, }, ]; @@ -152509,15 +153253,15 @@ function validate196( } } } else { - validate196.errors = [ + validate199.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema181.items.allOf[1].type, - parentSchema: schema181.items.allOf[1], + schema: schema184.items.allOf[1].type, + parentSchema: schema184.items.allOf[1], data: data0, }, ]; @@ -152532,26 +153276,26 @@ function validate196( } } } else { - validate196.errors = [ + validate199.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema181.type, - parentSchema: schema181, + schema: schema184.type, + parentSchema: schema184, data, }, ]; return false; } } - validate196.errors = vErrors; + validate199.errors = vErrors; return errors === 0; } -exports.validateAddDeviceAvailabilityRulesBodyResponse = validate197; -const schema182 = { +exports.validateAddDeviceAvailabilityRulesBodyResponse = validate200; +const schema185 = { title: 'Availability Rules', description: 'The availability rule to be applied.', type: 'array', @@ -152599,7 +153343,7 @@ const schema182 = { '#/paths//devices/{device_id}/availability/post/requestBody/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate197( +function validate200( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -152613,15 +153357,15 @@ function validate197( let data0 = data[i0]; const _errs1 = errors; if (!(data0 && typeof data0 == 'object' && !Array.isArray(data0))) { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema182.items.type, - parentSchema: schema182.items, + schema: schema185.items.type, + parentSchema: schema185.items, data: data0, }, ]; @@ -152637,7 +153381,7 @@ function validate197( if (errors === _errs5) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/allOf/0/properties/start/format', @@ -152645,22 +153389,22 @@ function validate197( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema182.items.allOf[0].properties.start, + parentSchema: schema185.items.allOf[0].properties.start, data: data1, }, ]; return false; } } else { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/allOf/0/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema182.items.allOf[0].properties.start.type, - parentSchema: schema182.items.allOf[0].properties.start, + schema: schema185.items.allOf[0].properties.start.type, + parentSchema: schema185.items.allOf[0].properties.start, data: data1, }, ]; @@ -152680,7 +153424,7 @@ function validate197( if (errors === _errs7) { if (typeof data2 === 'string') { if (!formats22.validate(data2)) { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/allOf/0/properties/end/format', @@ -152688,22 +153432,22 @@ function validate197( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema182.items.allOf[0].properties.end, + parentSchema: schema185.items.allOf[0].properties.end, data: data2, }, ]; return false; } } else { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/allOf/0/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema182.items.allOf[0].properties.end.type, - parentSchema: schema182.items.allOf[0].properties.end, + schema: schema185.items.allOf[0].properties.end.type, + parentSchema: schema185.items.allOf[0].properties.end, data: data2, }, ]; @@ -152717,15 +153461,15 @@ function validate197( } } } else { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema182.items.allOf[0].type, - parentSchema: schema182.items.allOf[0], + schema: schema185.items.allOf[0].type, + parentSchema: schema185.items.allOf[0], data: data0, }, ]; @@ -152741,15 +153485,15 @@ function validate197( let data3 = data0.available; const _errs11 = errors; if (typeof data3 !== 'boolean') { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/available', schemaPath: '#/items/allOf/1/properties/available/type', keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema182.items.allOf[1].properties.available.type, - parentSchema: schema182.items.allOf[1].properties.available, + schema: schema185.items.allOf[1].properties.available.type, + parentSchema: schema185.items.allOf[1].properties.available, data: data3, }, ]; @@ -152767,15 +153511,15 @@ function validate197( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing0; if (data4.frequency === undefined && (missing0 = 'frequency')) { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat', schemaPath: '#/items/allOf/1/properties/repeat/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema182.items.allOf[1].properties.repeat.required, - parentSchema: schema182.items.allOf[1].properties.repeat, + schema: schema185.items.allOf[1].properties.repeat.required, + parentSchema: schema185.items.allOf[1].properties.repeat, data: data4, }, ]; @@ -152785,7 +153529,7 @@ function validate197( let data5 = data4.frequency; const _errs15 = errors; if (typeof data5 !== 'string') { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/frequency', @@ -152795,10 +153539,10 @@ function validate197( params: { type: 'string' }, message: 'must be string', schema: - schema182.items.allOf[1].properties.repeat.properties + schema185.items.allOf[1].properties.repeat.properties .frequency.type, parentSchema: - schema182.items.allOf[1].properties.repeat.properties + schema185.items.allOf[1].properties.repeat.properties .frequency, data: data5, }, @@ -152812,7 +153556,7 @@ function validate197( data5 === 'WEEKLY' ) ) { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/frequency', @@ -152821,15 +153565,15 @@ function validate197( keyword: 'enum', params: { allowedValues: - schema182.items.allOf[1].properties.repeat.properties + schema185.items.allOf[1].properties.repeat.properties .frequency.enum, }, message: 'must be equal to one of the allowed values', schema: - schema182.items.allOf[1].properties.repeat.properties + schema185.items.allOf[1].properties.repeat.properties .frequency.enum, parentSchema: - schema182.items.allOf[1].properties.repeat.properties + schema185.items.allOf[1].properties.repeat.properties .frequency, data: data5, }, @@ -152848,7 +153592,7 @@ function validate197( if (errors === _errs17) { if (typeof data6 === 'string') { if (!formats22.validate(data6)) { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/until', @@ -152860,7 +153604,7 @@ function validate197( 'must match format "' + 'date-time' + '"', schema: 'date-time', parentSchema: - schema182.items.allOf[1].properties.repeat + schema185.items.allOf[1].properties.repeat .properties.until, data: data6, }, @@ -152868,7 +153612,7 @@ function validate197( return false; } } else { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/until', @@ -152878,10 +153622,10 @@ function validate197( params: { type: 'string' }, message: 'must be string', schema: - schema182.items.allOf[1].properties.repeat + schema185.items.allOf[1].properties.repeat .properties.until.type, parentSchema: - schema182.items.allOf[1].properties.repeat + schema185.items.allOf[1].properties.repeat .properties.until, data: data6, }, @@ -152906,7 +153650,7 @@ function validate197( isFinite(data7) ) ) { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat/count', @@ -152916,10 +153660,10 @@ function validate197( params: { type: 'integer' }, message: 'must be integer', schema: - schema182.items.allOf[1].properties.repeat + schema185.items.allOf[1].properties.repeat .properties.count.type, parentSchema: - schema182.items.allOf[1].properties.repeat + schema185.items.allOf[1].properties.repeat .properties.count, data: data7, }, @@ -152934,15 +153678,15 @@ function validate197( } } } else { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0 + '/repeat', schemaPath: '#/items/allOf/1/properties/repeat/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema182.items.allOf[1].properties.repeat.type, - parentSchema: schema182.items.allOf[1].properties.repeat, + schema: schema185.items.allOf[1].properties.repeat.type, + parentSchema: schema185.items.allOf[1].properties.repeat, data: data4, }, ]; @@ -152955,15 +153699,15 @@ function validate197( } } } else { - validate197.errors = [ + validate200.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema182.items.allOf[1].type, - parentSchema: schema182.items.allOf[1], + schema: schema185.items.allOf[1].type, + parentSchema: schema185.items.allOf[1], data: data0, }, ]; @@ -152978,26 +153722,26 @@ function validate197( } } } else { - validate197.errors = [ + validate200.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema182.type, - parentSchema: schema182, + schema: schema185.type, + parentSchema: schema185, data, }, ]; return false; } } - validate197.errors = vErrors; + validate200.errors = vErrors; return errors === 0; } -exports.validateAddDeviceAvailabilityRulesResponse200Request = validate198; -const schema183 = { +exports.validateAddDeviceAvailabilityRulesResponse200Request = validate201; +const schema186 = { title: 'Availability', description: 'A list of time slots that the maintainer of the device announced it is available\n', @@ -153016,7 +153760,7 @@ const schema183 = { '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate198( +function validate201( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -153038,7 +153782,7 @@ function validate198( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate198.errors = [ + validate201.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/format', @@ -153046,22 +153790,22 @@ function validate198( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema183.items.properties.start, + parentSchema: schema186.items.properties.start, data: data1, }, ]; return false; } } else { - validate198.errors = [ + validate201.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema183.items.properties.start.type, - parentSchema: schema183.items.properties.start, + schema: schema186.items.properties.start.type, + parentSchema: schema186.items.properties.start, data: data1, }, ]; @@ -153081,7 +153825,7 @@ function validate198( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats22.validate(data2)) { - validate198.errors = [ + validate201.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/format', @@ -153089,22 +153833,22 @@ function validate198( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema183.items.properties.end, + parentSchema: schema186.items.properties.end, data: data2, }, ]; return false; } } else { - validate198.errors = [ + validate201.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema183.items.properties.end.type, - parentSchema: schema183.items.properties.end, + schema: schema186.items.properties.end.type, + parentSchema: schema186.items.properties.end, data: data2, }, ]; @@ -153118,15 +153862,15 @@ function validate198( } } } else { - validate198.errors = [ + validate201.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema183.items.type, - parentSchema: schema183.items, + schema: schema186.items.type, + parentSchema: schema186.items, data: data0, }, ]; @@ -153139,26 +153883,26 @@ function validate198( } } } else { - validate198.errors = [ + validate201.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema183.type, - parentSchema: schema183, + schema: schema186.type, + parentSchema: schema186, data, }, ]; return false; } } - validate198.errors = vErrors; + validate201.errors = vErrors; return errors === 0; } -exports.validateAddDeviceAvailabilityRulesResponse200Response = validate199; -const schema184 = { +exports.validateAddDeviceAvailabilityRulesResponse200Response = validate202; +const schema187 = { title: 'Availability', description: 'A list of time slots that the maintainer of the device announced it is available\n', @@ -153177,7 +153921,7 @@ const schema184 = { '#/paths//devices/{device_id}/availability/post/responses/200/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate199( +function validate202( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -153199,7 +153943,7 @@ function validate199( if (errors === _errs3) { if (typeof data1 === 'string') { if (!formats22.validate(data1)) { - validate199.errors = [ + validate202.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/format', @@ -153207,22 +153951,22 @@ function validate199( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema184.items.properties.start, + parentSchema: schema187.items.properties.start, data: data1, }, ]; return false; } } else { - validate199.errors = [ + validate202.errors = [ { instancePath: instancePath + '/' + i0 + '/start', schemaPath: '#/items/properties/start/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema184.items.properties.start.type, - parentSchema: schema184.items.properties.start, + schema: schema187.items.properties.start.type, + parentSchema: schema187.items.properties.start, data: data1, }, ]; @@ -153242,7 +153986,7 @@ function validate199( if (errors === _errs5) { if (typeof data2 === 'string') { if (!formats22.validate(data2)) { - validate199.errors = [ + validate202.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/format', @@ -153250,22 +153994,22 @@ function validate199( params: { format: 'date-time' }, message: 'must match format "' + 'date-time' + '"', schema: 'date-time', - parentSchema: schema184.items.properties.end, + parentSchema: schema187.items.properties.end, data: data2, }, ]; return false; } } else { - validate199.errors = [ + validate202.errors = [ { instancePath: instancePath + '/' + i0 + '/end', schemaPath: '#/items/properties/end/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema184.items.properties.end.type, - parentSchema: schema184.items.properties.end, + schema: schema187.items.properties.end.type, + parentSchema: schema187.items.properties.end, data: data2, }, ]; @@ -153279,15 +154023,15 @@ function validate199( } } } else { - validate199.errors = [ + validate202.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema184.items.type, - parentSchema: schema184.items, + schema: schema187.items.type, + parentSchema: schema187.items, data: data0, }, ]; @@ -153300,26 +154044,26 @@ function validate199( } } } else { - validate199.errors = [ + validate202.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema184.type, - parentSchema: schema184, + schema: schema187.type, + parentSchema: schema187, data, }, ]; return false; } } - validate199.errors = vErrors; + validate202.errors = vErrors; return errors === 0; } -exports.validateCreateWebsocketTokenResponse200Request = validate200; -const schema185 = { +exports.validateCreateWebsocketTokenResponse200Request = validate203; +const schema188 = { type: 'string', 'x-standalone': false, 'x-name': 'createWebsocketTokenResponse200Request', @@ -153327,32 +154071,32 @@ const schema185 = { '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate200( +function validate203( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate200.errors = [ + validate203.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema185.type, - parentSchema: schema185, + schema: schema188.type, + parentSchema: schema188, data, }, ]; return false; } - validate200.errors = vErrors; + validate203.errors = vErrors; return errors === 0; } -exports.validateCreateWebsocketTokenResponse200Response = validate201; -const schema186 = { +exports.validateCreateWebsocketTokenResponse200Response = validate204; +const schema189 = { type: 'string', 'x-standalone': false, 'x-name': 'createWebsocketTokenResponse200Response', @@ -153360,32 +154104,32 @@ const schema186 = { '#/paths//devices/{device_id}/websocket/post/responses/200/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate201( +function validate204( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { let vErrors = null; let errors = 0; if (typeof data !== 'string') { - validate201.errors = [ + validate204.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema186.type, - parentSchema: schema186, + schema: schema189.type, + parentSchema: schema189, data, }, ]; return false; } - validate201.errors = vErrors; + validate204.errors = vErrors; return errors === 0; } -exports.validateSendSignalingMessageBodyRequest = validate202; -const schema187 = { +exports.validateSendSignalingMessageBodyRequest = validate205; +const schema190 = { title: 'Sig Message', anyOf: [ { @@ -153552,6 +154296,28 @@ const schema187 = { ], 'x-typeguard': true, }, + { + title: 'Logging Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'logging' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'content'], + }, + ], + 'x-typeguard': true, + }, ], 'x-standalone': false, 'x-name': 'sendSignalingMessageBodyRequest', @@ -153559,7 +154325,7 @@ const schema187 = { '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate202( +function validate205( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -153580,8 +154346,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema187.anyOf[0].allOf[0].allOf[0].required, - parentSchema: schema187.anyOf[0].allOf[0].allOf[0], + schema: schema190.anyOf[0].allOf[0].allOf[0].required, + parentSchema: schema190.anyOf[0].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -153600,8 +154366,8 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[0].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema187.anyOf[0].allOf[0].allOf[0].properties.messageType, + schema: schema190.anyOf[0].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema190.anyOf[0].allOf[0].allOf[0].properties.messageType, data: data0, }; if (vErrors === null) { @@ -153620,8 +154386,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[0].allOf[0].allOf[0].type, - parentSchema: schema187.anyOf[0].allOf[0].allOf[0], + schema: schema190.anyOf[0].allOf[0].allOf[0].type, + parentSchema: schema190.anyOf[0].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -153648,8 +154414,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema187.anyOf[0].allOf[0].allOf[1].required, - parentSchema: schema187.anyOf[0].allOf[0].allOf[1], + schema: schema190.anyOf[0].allOf[0].allOf[1].required, + parentSchema: schema190.anyOf[0].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -153670,7 +154436,7 @@ function validate202( params: { allowedValue: 'command' }, message: 'must be equal to constant', schema: 'command', - parentSchema: schema187.anyOf[0].allOf[0].allOf[1].properties.messageType, + parentSchema: schema190.anyOf[0].allOf[0].allOf[1].properties.messageType, data: data1, }; if (vErrors === null) { @@ -153695,8 +154461,8 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[0].allOf[0].allOf[1].properties.command.type, - parentSchema: schema187.anyOf[0].allOf[0].allOf[1].properties.command, + schema: schema190.anyOf[0].allOf[0].allOf[1].properties.command.type, + parentSchema: schema190.anyOf[0].allOf[0].allOf[1].properties.command, data: data2, }; if (vErrors === null) { @@ -153719,8 +154485,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[0].allOf[0].allOf[1].type, - parentSchema: schema187.anyOf[0].allOf[0].allOf[1], + schema: schema190.anyOf[0].allOf[0].allOf[1].type, + parentSchema: schema190.anyOf[0].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -153752,8 +154518,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema187.anyOf[0].allOf[1].required, - parentSchema: schema187.anyOf[0].allOf[1], + schema: schema190.anyOf[0].allOf[1].required, + parentSchema: schema190.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -153774,7 +154540,7 @@ function validate202( params: { allowedValue: 'createPeerconnection' }, message: 'must be equal to constant', schema: 'createPeerconnection', - parentSchema: schema187.anyOf[0].allOf[1].properties.command, + parentSchema: schema190.anyOf[0].allOf[1].properties.command, data: data3, }; if (vErrors === null) { @@ -153799,8 +154565,8 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[0].allOf[1].properties.connectionType.type, - parentSchema: schema187.anyOf[0].allOf[1].properties.connectionType, + schema: schema190.anyOf[0].allOf[1].properties.connectionType.type, + parentSchema: schema190.anyOf[0].allOf[1].properties.connectionType, data: data4, }; if (vErrors === null) { @@ -153817,11 +154583,11 @@ function validate202( keyword: 'enum', params: { allowedValues: - schema187.anyOf[0].allOf[1].properties.connectionType.enum, + schema190.anyOf[0].allOf[1].properties.connectionType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema187.anyOf[0].allOf[1].properties.connectionType.enum, - parentSchema: schema187.anyOf[0].allOf[1].properties.connectionType, + schema: schema190.anyOf[0].allOf[1].properties.connectionType.enum, + parentSchema: schema190.anyOf[0].allOf[1].properties.connectionType, data: data4, }; if (vErrors === null) { @@ -153851,7 +154617,7 @@ function validate202( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema187.anyOf[0].allOf[1].properties.connectionUrl, + schema190.anyOf[0].allOf[1].properties.connectionUrl, data: data5, }; if (vErrors === null) { @@ -153868,9 +154634,9 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[0].allOf[1].properties.connectionUrl.type, + schema: schema190.anyOf[0].allOf[1].properties.connectionUrl.type, parentSchema: - schema187.anyOf[0].allOf[1].properties.connectionUrl, + schema190.anyOf[0].allOf[1].properties.connectionUrl, data: data5, }; if (vErrors === null) { @@ -153920,10 +154686,10 @@ function validate202( params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", schema: - schema187.anyOf[0].allOf[1].properties.services.items + schema190.anyOf[0].allOf[1].properties.services.items .required, parentSchema: - schema187.anyOf[0].allOf[1].properties.services.items, + schema190.anyOf[0].allOf[1].properties.services.items, data: data7, }; if (vErrors === null) { @@ -153953,7 +154719,7 @@ function validate202( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema187.anyOf[0].allOf[1].properties + schema190.anyOf[0].allOf[1].properties .services.items.properties.serviceType, data: data8, }; @@ -153977,10 +154743,10 @@ function validate202( params: { type: 'string' }, message: 'must be string', schema: - schema187.anyOf[0].allOf[1].properties.services + schema190.anyOf[0].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema187.anyOf[0].allOf[1].properties.services + schema190.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data8, }; @@ -154011,10 +154777,10 @@ function validate202( params: { type: 'string' }, message: 'must be string', schema: - schema187.anyOf[0].allOf[1].properties.services + schema190.anyOf[0].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema187.anyOf[0].allOf[1].properties.services + schema190.anyOf[0].allOf[1].properties.services .items.properties.serviceId, data: data9, }; @@ -154046,10 +154812,10 @@ function validate202( params: { type: 'string' }, message: 'must be string', schema: - schema187.anyOf[0].allOf[1].properties.services + schema190.anyOf[0].allOf[1].properties.services .items.properties.remoteServiceId.type, parentSchema: - schema187.anyOf[0].allOf[1].properties.services + schema190.anyOf[0].allOf[1].properties.services .items.properties.remoteServiceId, data: data10, }; @@ -154076,10 +154842,10 @@ function validate202( params: { type: 'object' }, message: 'must be object', schema: - schema187.anyOf[0].allOf[1].properties.services.items + schema190.anyOf[0].allOf[1].properties.services.items .type, parentSchema: - schema187.anyOf[0].allOf[1].properties.services.items, + schema190.anyOf[0].allOf[1].properties.services.items, data: data7, }; if (vErrors === null) { @@ -154102,8 +154868,8 @@ function validate202( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema187.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema187.anyOf[0].allOf[1].properties.services, + schema: schema190.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema190.anyOf[0].allOf[1].properties.services, data: data6, }; if (vErrors === null) { @@ -154129,8 +154895,8 @@ function validate202( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema187.anyOf[0].allOf[1].properties.tiebreaker.type, - parentSchema: schema187.anyOf[0].allOf[1].properties.tiebreaker, + schema: schema190.anyOf[0].allOf[1].properties.tiebreaker.type, + parentSchema: schema190.anyOf[0].allOf[1].properties.tiebreaker, data: data11, }; if (vErrors === null) { @@ -154161,8 +154927,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[0].allOf[1].properties.config.type, - parentSchema: schema187.anyOf[0].allOf[1].properties.config, + schema: schema190.anyOf[0].allOf[1].properties.config.type, + parentSchema: schema190.anyOf[0].allOf[1].properties.config, data: data12, }; if (vErrors === null) { @@ -154190,8 +154956,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[0].allOf[1].type, - parentSchema: schema187.anyOf[0].allOf[1], + schema: schema190.anyOf[0].allOf[1].type, + parentSchema: schema190.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -154220,8 +154986,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'", - schema: schema187.anyOf[1].allOf[0].allOf[0].required, - parentSchema: schema187.anyOf[1].allOf[0].allOf[0], + schema: schema190.anyOf[1].allOf[0].allOf[0].required, + parentSchema: schema190.anyOf[1].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -154240,8 +155006,8 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[1].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema187.anyOf[1].allOf[0].allOf[0].properties.messageType, + schema: schema190.anyOf[1].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema190.anyOf[1].allOf[0].allOf[0].properties.messageType, data: data13, }; if (vErrors === null) { @@ -154260,8 +155026,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[1].allOf[0].allOf[0].type, - parentSchema: schema187.anyOf[1].allOf[0].allOf[0], + schema: schema190.anyOf[1].allOf[0].allOf[0].type, + parentSchema: schema190.anyOf[1].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -154288,8 +155054,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'", - schema: schema187.anyOf[1].allOf[0].allOf[1].required, - parentSchema: schema187.anyOf[1].allOf[0].allOf[1], + schema: schema190.anyOf[1].allOf[0].allOf[1].required, + parentSchema: schema190.anyOf[1].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -154311,7 +155077,7 @@ function validate202( message: 'must be equal to constant', schema: 'command', parentSchema: - schema187.anyOf[1].allOf[0].allOf[1].properties.messageType, + schema190.anyOf[1].allOf[0].allOf[1].properties.messageType, data: data14, }; if (vErrors === null) { @@ -154336,8 +155102,8 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[1].allOf[0].allOf[1].properties.command.type, - parentSchema: schema187.anyOf[1].allOf[0].allOf[1].properties.command, + schema: schema190.anyOf[1].allOf[0].allOf[1].properties.command.type, + parentSchema: schema190.anyOf[1].allOf[0].allOf[1].properties.command, data: data15, }; if (vErrors === null) { @@ -154360,8 +155126,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[1].allOf[0].allOf[1].type, - parentSchema: schema187.anyOf[1].allOf[0].allOf[1], + schema: schema190.anyOf[1].allOf[0].allOf[1].type, + parentSchema: schema190.anyOf[1].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -154390,8 +155156,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema187.anyOf[1].allOf[1].required, - parentSchema: schema187.anyOf[1].allOf[1], + schema: schema190.anyOf[1].allOf[1].required, + parentSchema: schema190.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -154412,7 +155178,7 @@ function validate202( params: { allowedValue: 'closePeerconnection' }, message: 'must be equal to constant', schema: 'closePeerconnection', - parentSchema: schema187.anyOf[1].allOf[1].properties.command, + parentSchema: schema190.anyOf[1].allOf[1].properties.command, data: data16, }; if (vErrors === null) { @@ -154442,7 +155208,7 @@ function validate202( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema187.anyOf[1].allOf[1].properties.connectionUrl, + schema190.anyOf[1].allOf[1].properties.connectionUrl, data: data17, }; if (vErrors === null) { @@ -154459,9 +155225,9 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[1].allOf[1].properties.connectionUrl.type, + schema: schema190.anyOf[1].allOf[1].properties.connectionUrl.type, parentSchema: - schema187.anyOf[1].allOf[1].properties.connectionUrl, + schema190.anyOf[1].allOf[1].properties.connectionUrl, data: data17, }; if (vErrors === null) { @@ -154486,8 +155252,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[1].allOf[1].type, - parentSchema: schema187.anyOf[1].allOf[1], + schema: schema190.anyOf[1].allOf[1].type, + parentSchema: schema190.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -154515,8 +155281,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'", - schema: schema187.anyOf[2].allOf[0].required, - parentSchema: schema187.anyOf[2].allOf[0], + schema: schema190.anyOf[2].allOf[0].required, + parentSchema: schema190.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -154535,8 +155301,8 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[2].allOf[0].properties.messageType.type, - parentSchema: schema187.anyOf[2].allOf[0].properties.messageType, + schema: schema190.anyOf[2].allOf[0].properties.messageType.type, + parentSchema: schema190.anyOf[2].allOf[0].properties.messageType, data: data18, }; if (vErrors === null) { @@ -154555,8 +155321,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[2].allOf[0].type, - parentSchema: schema187.anyOf[2].allOf[0], + schema: schema190.anyOf[2].allOf[0].type, + parentSchema: schema190.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -154585,8 +155351,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'", - schema: schema187.anyOf[2].allOf[1].required, - parentSchema: schema187.anyOf[2].allOf[1], + schema: schema190.anyOf[2].allOf[1].required, + parentSchema: schema190.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -154607,7 +155373,7 @@ function validate202( params: { allowedValue: 'signaling' }, message: 'must be equal to constant', schema: 'signaling', - parentSchema: schema187.anyOf[2].allOf[1].properties.messageType, + parentSchema: schema190.anyOf[2].allOf[1].properties.messageType, data: data19, }; if (vErrors === null) { @@ -154632,8 +155398,8 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[2].allOf[1].properties.signalingType.type, - parentSchema: schema187.anyOf[2].allOf[1].properties.signalingType, + schema: schema190.anyOf[2].allOf[1].properties.signalingType.type, + parentSchema: schema190.anyOf[2].allOf[1].properties.signalingType, data: data20, }; if (vErrors === null) { @@ -154664,7 +155430,7 @@ function validate202( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema187.anyOf[2].allOf[1].properties.connectionUrl, + schema190.anyOf[2].allOf[1].properties.connectionUrl, data: data21, }; if (vErrors === null) { @@ -154682,9 +155448,9 @@ function validate202( params: { type: 'string' }, message: 'must be string', schema: - schema187.anyOf[2].allOf[1].properties.connectionUrl.type, + schema190.anyOf[2].allOf[1].properties.connectionUrl.type, parentSchema: - schema187.anyOf[2].allOf[1].properties.connectionUrl, + schema190.anyOf[2].allOf[1].properties.connectionUrl, data: data21, }; if (vErrors === null) { @@ -154717,8 +155483,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[2].allOf[1].properties.content.type, - parentSchema: schema187.anyOf[2].allOf[1].properties.content, + schema: schema190.anyOf[2].allOf[1].properties.content.type, + parentSchema: schema190.anyOf[2].allOf[1].properties.content, data: data22, }; if (vErrors === null) { @@ -154744,8 +155510,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[2].allOf[1].type, - parentSchema: schema187.anyOf[2].allOf[1], + schema: schema190.anyOf[2].allOf[1].type, + parentSchema: schema190.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -154773,8 +155539,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema187.anyOf[3].allOf[0].required, - parentSchema: schema187.anyOf[3].allOf[0], + schema: schema190.anyOf[3].allOf[0].required, + parentSchema: schema190.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -154793,8 +155559,8 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[3].allOf[0].properties.messageType.type, - parentSchema: schema187.anyOf[3].allOf[0].properties.messageType, + schema: schema190.anyOf[3].allOf[0].properties.messageType.type, + parentSchema: schema190.anyOf[3].allOf[0].properties.messageType, data: data23, }; if (vErrors === null) { @@ -154813,8 +155579,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[3].allOf[0].type, - parentSchema: schema187.anyOf[3].allOf[0], + schema: schema190.anyOf[3].allOf[0].type, + parentSchema: schema190.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -154841,8 +155607,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'", - schema: schema187.anyOf[3].allOf[1].required, - parentSchema: schema187.anyOf[3].allOf[1], + schema: schema190.anyOf[3].allOf[1].required, + parentSchema: schema190.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -154863,7 +155629,7 @@ function validate202( params: { allowedValue: 'configuration' }, message: 'must be equal to constant', schema: 'configuration', - parentSchema: schema187.anyOf[3].allOf[1].properties.messageType, + parentSchema: schema190.anyOf[3].allOf[1].properties.messageType, data: data24, }; if (vErrors === null) { @@ -154891,9 +155657,9 @@ function validate202( params: { type: 'object' }, message: 'must be object', schema: - schema187.anyOf[3].allOf[1].properties.configuration.type, + schema190.anyOf[3].allOf[1].properties.configuration.type, parentSchema: - schema187.anyOf[3].allOf[1].properties.configuration, + schema190.anyOf[3].allOf[1].properties.configuration, data: data25, }; if (vErrors === null) { @@ -154917,8 +155683,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[3].allOf[1].type, - parentSchema: schema187.anyOf[3].allOf[1], + schema: schema190.anyOf[3].allOf[1].type, + parentSchema: schema190.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -154946,8 +155712,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing11 }, message: "must have required property '" + missing11 + "'", - schema: schema187.anyOf[4].allOf[0].required, - parentSchema: schema187.anyOf[4].allOf[0], + schema: schema190.anyOf[4].allOf[0].required, + parentSchema: schema190.anyOf[4].allOf[0], data, }; if (vErrors === null) { @@ -154966,8 +155732,8 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[4].allOf[0].properties.messageType.type, - parentSchema: schema187.anyOf[4].allOf[0].properties.messageType, + schema: schema190.anyOf[4].allOf[0].properties.messageType.type, + parentSchema: schema190.anyOf[4].allOf[0].properties.messageType, data: data26, }; if (vErrors === null) { @@ -154986,8 +155752,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[4].allOf[0].type, - parentSchema: schema187.anyOf[4].allOf[0], + schema: schema190.anyOf[4].allOf[0].type, + parentSchema: schema190.anyOf[4].allOf[0], data, }; if (vErrors === null) { @@ -155014,8 +155780,8 @@ function validate202( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema187.anyOf[4].allOf[1].required, - parentSchema: schema187.anyOf[4].allOf[1], + schema: schema190.anyOf[4].allOf[1].required, + parentSchema: schema190.anyOf[4].allOf[1], data, }; if (vErrors === null) { @@ -155036,7 +155802,7 @@ function validate202( params: { allowedValue: 'experiment-status-changed' }, message: 'must be equal to constant', schema: 'experiment-status-changed', - parentSchema: schema187.anyOf[4].allOf[1].properties.messageType, + parentSchema: schema190.anyOf[4].allOf[1].properties.messageType, data: data27, }; if (vErrors === null) { @@ -155061,8 +155827,8 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[4].allOf[1].properties.status.type, - parentSchema: schema187.anyOf[4].allOf[1].properties.status, + schema: schema190.anyOf[4].allOf[1].properties.status.type, + parentSchema: schema190.anyOf[4].allOf[1].properties.status, data: data28, }; if (vErrors === null) { @@ -155087,8 +155853,8 @@ function validate202( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema187.anyOf[4].allOf[1].properties.message.type, - parentSchema: schema187.anyOf[4].allOf[1].properties.message, + schema: schema190.anyOf[4].allOf[1].properties.message.type, + parentSchema: schema190.anyOf[4].allOf[1].properties.message, data: data29, }; if (vErrors === null) { @@ -155112,8 +155878,8 @@ function validate202( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema187.anyOf[4].allOf[1].type, - parentSchema: schema187.anyOf[4].allOf[1], + schema: schema190.anyOf[4].allOf[1].type, + parentSchema: schema190.anyOf[4].allOf[1], data, }; if (vErrors === null) { @@ -155128,28 +155894,206 @@ function validate202( } var _valid0 = _errs81 === errors; valid0 = valid0 || _valid0; + if (!valid0) { + const _errs94 = errors; + const _errs95 = errors; + if (errors === _errs95) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing13; + if (data.messageType === undefined && (missing13 = 'messageType')) { + const err60 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: "must have required property '" + missing13 + "'", + schema: schema190.anyOf[5].allOf[0].required, + parentSchema: schema190.anyOf[5].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data30 = data.messageType; + if (typeof data30 !== 'string') { + const err61 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/5/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema190.anyOf[5].allOf[0].properties.messageType.type, + parentSchema: schema190.anyOf[5].allOf[0].properties.messageType, + data: data30, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + } + } + } else { + const err62 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema190.anyOf[5].allOf[0].type, + parentSchema: schema190.anyOf[5].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + } + var valid22 = _errs95 === errors; + if (valid22) { + const _errs100 = errors; + if (errors === _errs100) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing14; + if ( + (data.messageType === undefined && (missing14 = 'messageType')) || + (data.content === undefined && (missing14 = 'content')) + ) { + const err63 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing14 }, + message: "must have required property '" + missing14 + "'", + schema: schema190.anyOf[5].allOf[1].required, + parentSchema: schema190.anyOf[5].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data31 = data.messageType; + const _errs102 = errors; + if ('logging' !== data31) { + const err64 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/5/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'logging' }, + message: 'must be equal to constant', + schema: 'logging', + parentSchema: + schema190.anyOf[5].allOf[1].properties.messageType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + var valid24 = _errs102 === errors; + } else { + var valid24 = true; + } + if (valid24) { + if (data.content !== undefined) { + let data32 = data.content; + const _errs103 = errors; + if (errors === _errs103) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + } else { + const err65 = { + instancePath: instancePath + '/content', + schemaPath: '#/anyOf/5/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema190.anyOf[5].allOf[1].properties.content.type, + parentSchema: + schema190.anyOf[5].allOf[1].properties.content, + data: data32, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid24 = _errs103 === errors; + } else { + var valid24 = true; + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema190.anyOf[5].allOf[1].type, + parentSchema: schema190.anyOf[5].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid22 = _errs100 === errors; + } + var _valid0 = _errs94 === errors; + valid0 = valid0 || _valid0; + } } } } } if (!valid0) { - const err60 = { + const err67 = { instancePath, schemaPath: '#/anyOf', keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema187.anyOf, - parentSchema: schema187, + schema: schema190.anyOf, + parentSchema: schema190, data, }; if (vErrors === null) { - vErrors = [err60]; + vErrors = [err67]; } else { - vErrors.push(err60); + vErrors.push(err67); } errors++; - validate202.errors = vErrors; + validate205.errors = vErrors; return false; } else { errors = _errs0; @@ -155161,11 +156105,11 @@ function validate202( } } } - validate202.errors = vErrors; + validate205.errors = vErrors; return errors === 0; } -exports.validateSendSignalingMessageBodyResponse = validate203; -const schema188 = { +exports.validateSendSignalingMessageBodyResponse = validate206; +const schema191 = { title: 'Sig Message', anyOf: [ { @@ -155332,6 +156276,28 @@ const schema188 = { ], 'x-typeguard': true, }, + { + title: 'Logging Message', + allOf: [ + { + title: 'Message', + type: 'object', + properties: { messageType: { type: 'string' } }, + required: ['messageType'], + additionalProperties: true, + 'x-typeguard': true, + }, + { + type: 'object', + properties: { + messageType: { const: 'logging' }, + content: { type: 'object', additionalProperties: true }, + }, + required: ['messageType', 'content'], + }, + ], + 'x-typeguard': true, + }, ], 'x-standalone': false, 'x-name': 'sendSignalingMessageBodyResponse', @@ -155339,7 +156305,7 @@ const schema188 = { '#/paths//devices/{device_id}/signaling/post/requestBody/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate203( +function validate206( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -155360,8 +156326,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema188.anyOf[0].allOf[0].allOf[0].required, - parentSchema: schema188.anyOf[0].allOf[0].allOf[0], + schema: schema191.anyOf[0].allOf[0].allOf[0].required, + parentSchema: schema191.anyOf[0].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -155380,8 +156346,8 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[0].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema188.anyOf[0].allOf[0].allOf[0].properties.messageType, + schema: schema191.anyOf[0].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema191.anyOf[0].allOf[0].allOf[0].properties.messageType, data: data0, }; if (vErrors === null) { @@ -155400,8 +156366,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[0].allOf[0].allOf[0].type, - parentSchema: schema188.anyOf[0].allOf[0].allOf[0], + schema: schema191.anyOf[0].allOf[0].allOf[0].type, + parentSchema: schema191.anyOf[0].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -155428,8 +156394,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema188.anyOf[0].allOf[0].allOf[1].required, - parentSchema: schema188.anyOf[0].allOf[0].allOf[1], + schema: schema191.anyOf[0].allOf[0].allOf[1].required, + parentSchema: schema191.anyOf[0].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -155450,7 +156416,7 @@ function validate203( params: { allowedValue: 'command' }, message: 'must be equal to constant', schema: 'command', - parentSchema: schema188.anyOf[0].allOf[0].allOf[1].properties.messageType, + parentSchema: schema191.anyOf[0].allOf[0].allOf[1].properties.messageType, data: data1, }; if (vErrors === null) { @@ -155475,8 +156441,8 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[0].allOf[0].allOf[1].properties.command.type, - parentSchema: schema188.anyOf[0].allOf[0].allOf[1].properties.command, + schema: schema191.anyOf[0].allOf[0].allOf[1].properties.command.type, + parentSchema: schema191.anyOf[0].allOf[0].allOf[1].properties.command, data: data2, }; if (vErrors === null) { @@ -155499,8 +156465,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[0].allOf[0].allOf[1].type, - parentSchema: schema188.anyOf[0].allOf[0].allOf[1], + schema: schema191.anyOf[0].allOf[0].allOf[1].type, + parentSchema: schema191.anyOf[0].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -155532,8 +156498,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", - schema: schema188.anyOf[0].allOf[1].required, - parentSchema: schema188.anyOf[0].allOf[1], + schema: schema191.anyOf[0].allOf[1].required, + parentSchema: schema191.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -155554,7 +156520,7 @@ function validate203( params: { allowedValue: 'createPeerconnection' }, message: 'must be equal to constant', schema: 'createPeerconnection', - parentSchema: schema188.anyOf[0].allOf[1].properties.command, + parentSchema: schema191.anyOf[0].allOf[1].properties.command, data: data3, }; if (vErrors === null) { @@ -155579,8 +156545,8 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[0].allOf[1].properties.connectionType.type, - parentSchema: schema188.anyOf[0].allOf[1].properties.connectionType, + schema: schema191.anyOf[0].allOf[1].properties.connectionType.type, + parentSchema: schema191.anyOf[0].allOf[1].properties.connectionType, data: data4, }; if (vErrors === null) { @@ -155597,11 +156563,11 @@ function validate203( keyword: 'enum', params: { allowedValues: - schema188.anyOf[0].allOf[1].properties.connectionType.enum, + schema191.anyOf[0].allOf[1].properties.connectionType.enum, }, message: 'must be equal to one of the allowed values', - schema: schema188.anyOf[0].allOf[1].properties.connectionType.enum, - parentSchema: schema188.anyOf[0].allOf[1].properties.connectionType, + schema: schema191.anyOf[0].allOf[1].properties.connectionType.enum, + parentSchema: schema191.anyOf[0].allOf[1].properties.connectionType, data: data4, }; if (vErrors === null) { @@ -155631,7 +156597,7 @@ function validate203( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema188.anyOf[0].allOf[1].properties.connectionUrl, + schema191.anyOf[0].allOf[1].properties.connectionUrl, data: data5, }; if (vErrors === null) { @@ -155648,9 +156614,9 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[0].allOf[1].properties.connectionUrl.type, + schema: schema191.anyOf[0].allOf[1].properties.connectionUrl.type, parentSchema: - schema188.anyOf[0].allOf[1].properties.connectionUrl, + schema191.anyOf[0].allOf[1].properties.connectionUrl, data: data5, }; if (vErrors === null) { @@ -155700,10 +156666,10 @@ function validate203( params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'", schema: - schema188.anyOf[0].allOf[1].properties.services.items + schema191.anyOf[0].allOf[1].properties.services.items .required, parentSchema: - schema188.anyOf[0].allOf[1].properties.services.items, + schema191.anyOf[0].allOf[1].properties.services.items, data: data7, }; if (vErrors === null) { @@ -155733,7 +156699,7 @@ function validate203( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema188.anyOf[0].allOf[1].properties + schema191.anyOf[0].allOf[1].properties .services.items.properties.serviceType, data: data8, }; @@ -155757,10 +156723,10 @@ function validate203( params: { type: 'string' }, message: 'must be string', schema: - schema188.anyOf[0].allOf[1].properties.services + schema191.anyOf[0].allOf[1].properties.services .items.properties.serviceType.type, parentSchema: - schema188.anyOf[0].allOf[1].properties.services + schema191.anyOf[0].allOf[1].properties.services .items.properties.serviceType, data: data8, }; @@ -155791,10 +156757,10 @@ function validate203( params: { type: 'string' }, message: 'must be string', schema: - schema188.anyOf[0].allOf[1].properties.services + schema191.anyOf[0].allOf[1].properties.services .items.properties.serviceId.type, parentSchema: - schema188.anyOf[0].allOf[1].properties.services + schema191.anyOf[0].allOf[1].properties.services .items.properties.serviceId, data: data9, }; @@ -155826,10 +156792,10 @@ function validate203( params: { type: 'string' }, message: 'must be string', schema: - schema188.anyOf[0].allOf[1].properties.services + schema191.anyOf[0].allOf[1].properties.services .items.properties.remoteServiceId.type, parentSchema: - schema188.anyOf[0].allOf[1].properties.services + schema191.anyOf[0].allOf[1].properties.services .items.properties.remoteServiceId, data: data10, }; @@ -155856,10 +156822,10 @@ function validate203( params: { type: 'object' }, message: 'must be object', schema: - schema188.anyOf[0].allOf[1].properties.services.items + schema191.anyOf[0].allOf[1].properties.services.items .type, parentSchema: - schema188.anyOf[0].allOf[1].properties.services.items, + schema191.anyOf[0].allOf[1].properties.services.items, data: data7, }; if (vErrors === null) { @@ -155882,8 +156848,8 @@ function validate203( keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema188.anyOf[0].allOf[1].properties.services.type, - parentSchema: schema188.anyOf[0].allOf[1].properties.services, + schema: schema191.anyOf[0].allOf[1].properties.services.type, + parentSchema: schema191.anyOf[0].allOf[1].properties.services, data: data6, }; if (vErrors === null) { @@ -155909,8 +156875,8 @@ function validate203( keyword: 'type', params: { type: 'boolean' }, message: 'must be boolean', - schema: schema188.anyOf[0].allOf[1].properties.tiebreaker.type, - parentSchema: schema188.anyOf[0].allOf[1].properties.tiebreaker, + schema: schema191.anyOf[0].allOf[1].properties.tiebreaker.type, + parentSchema: schema191.anyOf[0].allOf[1].properties.tiebreaker, data: data11, }; if (vErrors === null) { @@ -155941,8 +156907,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[0].allOf[1].properties.config.type, - parentSchema: schema188.anyOf[0].allOf[1].properties.config, + schema: schema191.anyOf[0].allOf[1].properties.config.type, + parentSchema: schema191.anyOf[0].allOf[1].properties.config, data: data12, }; if (vErrors === null) { @@ -155970,8 +156936,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[0].allOf[1].type, - parentSchema: schema188.anyOf[0].allOf[1], + schema: schema191.anyOf[0].allOf[1].type, + parentSchema: schema191.anyOf[0].allOf[1], data, }; if (vErrors === null) { @@ -156000,8 +156966,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'", - schema: schema188.anyOf[1].allOf[0].allOf[0].required, - parentSchema: schema188.anyOf[1].allOf[0].allOf[0], + schema: schema191.anyOf[1].allOf[0].allOf[0].required, + parentSchema: schema191.anyOf[1].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -156020,8 +156986,8 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[1].allOf[0].allOf[0].properties.messageType.type, - parentSchema: schema188.anyOf[1].allOf[0].allOf[0].properties.messageType, + schema: schema191.anyOf[1].allOf[0].allOf[0].properties.messageType.type, + parentSchema: schema191.anyOf[1].allOf[0].allOf[0].properties.messageType, data: data13, }; if (vErrors === null) { @@ -156040,8 +157006,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[1].allOf[0].allOf[0].type, - parentSchema: schema188.anyOf[1].allOf[0].allOf[0], + schema: schema191.anyOf[1].allOf[0].allOf[0].type, + parentSchema: schema191.anyOf[1].allOf[0].allOf[0], data, }; if (vErrors === null) { @@ -156068,8 +157034,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'", - schema: schema188.anyOf[1].allOf[0].allOf[1].required, - parentSchema: schema188.anyOf[1].allOf[0].allOf[1], + schema: schema191.anyOf[1].allOf[0].allOf[1].required, + parentSchema: schema191.anyOf[1].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -156091,7 +157057,7 @@ function validate203( message: 'must be equal to constant', schema: 'command', parentSchema: - schema188.anyOf[1].allOf[0].allOf[1].properties.messageType, + schema191.anyOf[1].allOf[0].allOf[1].properties.messageType, data: data14, }; if (vErrors === null) { @@ -156116,8 +157082,8 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[1].allOf[0].allOf[1].properties.command.type, - parentSchema: schema188.anyOf[1].allOf[0].allOf[1].properties.command, + schema: schema191.anyOf[1].allOf[0].allOf[1].properties.command.type, + parentSchema: schema191.anyOf[1].allOf[0].allOf[1].properties.command, data: data15, }; if (vErrors === null) { @@ -156140,8 +157106,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[1].allOf[0].allOf[1].type, - parentSchema: schema188.anyOf[1].allOf[0].allOf[1], + schema: schema191.anyOf[1].allOf[0].allOf[1].type, + parentSchema: schema191.anyOf[1].allOf[0].allOf[1], data, }; if (vErrors === null) { @@ -156170,8 +157136,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'", - schema: schema188.anyOf[1].allOf[1].required, - parentSchema: schema188.anyOf[1].allOf[1], + schema: schema191.anyOf[1].allOf[1].required, + parentSchema: schema191.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -156192,7 +157158,7 @@ function validate203( params: { allowedValue: 'closePeerconnection' }, message: 'must be equal to constant', schema: 'closePeerconnection', - parentSchema: schema188.anyOf[1].allOf[1].properties.command, + parentSchema: schema191.anyOf[1].allOf[1].properties.command, data: data16, }; if (vErrors === null) { @@ -156222,7 +157188,7 @@ function validate203( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema188.anyOf[1].allOf[1].properties.connectionUrl, + schema191.anyOf[1].allOf[1].properties.connectionUrl, data: data17, }; if (vErrors === null) { @@ -156239,9 +157205,9 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[1].allOf[1].properties.connectionUrl.type, + schema: schema191.anyOf[1].allOf[1].properties.connectionUrl.type, parentSchema: - schema188.anyOf[1].allOf[1].properties.connectionUrl, + schema191.anyOf[1].allOf[1].properties.connectionUrl, data: data17, }; if (vErrors === null) { @@ -156266,8 +157232,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[1].allOf[1].type, - parentSchema: schema188.anyOf[1].allOf[1], + schema: schema191.anyOf[1].allOf[1].type, + parentSchema: schema191.anyOf[1].allOf[1], data, }; if (vErrors === null) { @@ -156295,8 +157261,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'", - schema: schema188.anyOf[2].allOf[0].required, - parentSchema: schema188.anyOf[2].allOf[0], + schema: schema191.anyOf[2].allOf[0].required, + parentSchema: schema191.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -156315,8 +157281,8 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[2].allOf[0].properties.messageType.type, - parentSchema: schema188.anyOf[2].allOf[0].properties.messageType, + schema: schema191.anyOf[2].allOf[0].properties.messageType.type, + parentSchema: schema191.anyOf[2].allOf[0].properties.messageType, data: data18, }; if (vErrors === null) { @@ -156335,8 +157301,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[2].allOf[0].type, - parentSchema: schema188.anyOf[2].allOf[0], + schema: schema191.anyOf[2].allOf[0].type, + parentSchema: schema191.anyOf[2].allOf[0], data, }; if (vErrors === null) { @@ -156365,8 +157331,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'", - schema: schema188.anyOf[2].allOf[1].required, - parentSchema: schema188.anyOf[2].allOf[1], + schema: schema191.anyOf[2].allOf[1].required, + parentSchema: schema191.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -156387,7 +157353,7 @@ function validate203( params: { allowedValue: 'signaling' }, message: 'must be equal to constant', schema: 'signaling', - parentSchema: schema188.anyOf[2].allOf[1].properties.messageType, + parentSchema: schema191.anyOf[2].allOf[1].properties.messageType, data: data19, }; if (vErrors === null) { @@ -156412,8 +157378,8 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[2].allOf[1].properties.signalingType.type, - parentSchema: schema188.anyOf[2].allOf[1].properties.signalingType, + schema: schema191.anyOf[2].allOf[1].properties.signalingType.type, + parentSchema: schema191.anyOf[2].allOf[1].properties.signalingType, data: data20, }; if (vErrors === null) { @@ -156444,7 +157410,7 @@ function validate203( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema188.anyOf[2].allOf[1].properties.connectionUrl, + schema191.anyOf[2].allOf[1].properties.connectionUrl, data: data21, }; if (vErrors === null) { @@ -156462,9 +157428,9 @@ function validate203( params: { type: 'string' }, message: 'must be string', schema: - schema188.anyOf[2].allOf[1].properties.connectionUrl.type, + schema191.anyOf[2].allOf[1].properties.connectionUrl.type, parentSchema: - schema188.anyOf[2].allOf[1].properties.connectionUrl, + schema191.anyOf[2].allOf[1].properties.connectionUrl, data: data21, }; if (vErrors === null) { @@ -156497,8 +157463,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[2].allOf[1].properties.content.type, - parentSchema: schema188.anyOf[2].allOf[1].properties.content, + schema: schema191.anyOf[2].allOf[1].properties.content.type, + parentSchema: schema191.anyOf[2].allOf[1].properties.content, data: data22, }; if (vErrors === null) { @@ -156524,8 +157490,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[2].allOf[1].type, - parentSchema: schema188.anyOf[2].allOf[1], + schema: schema191.anyOf[2].allOf[1].type, + parentSchema: schema191.anyOf[2].allOf[1], data, }; if (vErrors === null) { @@ -156553,8 +157519,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'", - schema: schema188.anyOf[3].allOf[0].required, - parentSchema: schema188.anyOf[3].allOf[0], + schema: schema191.anyOf[3].allOf[0].required, + parentSchema: schema191.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -156573,8 +157539,8 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[3].allOf[0].properties.messageType.type, - parentSchema: schema188.anyOf[3].allOf[0].properties.messageType, + schema: schema191.anyOf[3].allOf[0].properties.messageType.type, + parentSchema: schema191.anyOf[3].allOf[0].properties.messageType, data: data23, }; if (vErrors === null) { @@ -156593,8 +157559,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[3].allOf[0].type, - parentSchema: schema188.anyOf[3].allOf[0], + schema: schema191.anyOf[3].allOf[0].type, + parentSchema: schema191.anyOf[3].allOf[0], data, }; if (vErrors === null) { @@ -156621,8 +157587,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'", - schema: schema188.anyOf[3].allOf[1].required, - parentSchema: schema188.anyOf[3].allOf[1], + schema: schema191.anyOf[3].allOf[1].required, + parentSchema: schema191.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -156643,7 +157609,7 @@ function validate203( params: { allowedValue: 'configuration' }, message: 'must be equal to constant', schema: 'configuration', - parentSchema: schema188.anyOf[3].allOf[1].properties.messageType, + parentSchema: schema191.anyOf[3].allOf[1].properties.messageType, data: data24, }; if (vErrors === null) { @@ -156671,9 +157637,9 @@ function validate203( params: { type: 'object' }, message: 'must be object', schema: - schema188.anyOf[3].allOf[1].properties.configuration.type, + schema191.anyOf[3].allOf[1].properties.configuration.type, parentSchema: - schema188.anyOf[3].allOf[1].properties.configuration, + schema191.anyOf[3].allOf[1].properties.configuration, data: data25, }; if (vErrors === null) { @@ -156697,8 +157663,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[3].allOf[1].type, - parentSchema: schema188.anyOf[3].allOf[1], + schema: schema191.anyOf[3].allOf[1].type, + parentSchema: schema191.anyOf[3].allOf[1], data, }; if (vErrors === null) { @@ -156726,8 +157692,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing11 }, message: "must have required property '" + missing11 + "'", - schema: schema188.anyOf[4].allOf[0].required, - parentSchema: schema188.anyOf[4].allOf[0], + schema: schema191.anyOf[4].allOf[0].required, + parentSchema: schema191.anyOf[4].allOf[0], data, }; if (vErrors === null) { @@ -156746,8 +157712,8 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[4].allOf[0].properties.messageType.type, - parentSchema: schema188.anyOf[4].allOf[0].properties.messageType, + schema: schema191.anyOf[4].allOf[0].properties.messageType.type, + parentSchema: schema191.anyOf[4].allOf[0].properties.messageType, data: data26, }; if (vErrors === null) { @@ -156766,8 +157732,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[4].allOf[0].type, - parentSchema: schema188.anyOf[4].allOf[0], + schema: schema191.anyOf[4].allOf[0].type, + parentSchema: schema191.anyOf[4].allOf[0], data, }; if (vErrors === null) { @@ -156794,8 +157760,8 @@ function validate203( keyword: 'required', params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'", - schema: schema188.anyOf[4].allOf[1].required, - parentSchema: schema188.anyOf[4].allOf[1], + schema: schema191.anyOf[4].allOf[1].required, + parentSchema: schema191.anyOf[4].allOf[1], data, }; if (vErrors === null) { @@ -156816,7 +157782,7 @@ function validate203( params: { allowedValue: 'experiment-status-changed' }, message: 'must be equal to constant', schema: 'experiment-status-changed', - parentSchema: schema188.anyOf[4].allOf[1].properties.messageType, + parentSchema: schema191.anyOf[4].allOf[1].properties.messageType, data: data27, }; if (vErrors === null) { @@ -156841,8 +157807,8 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[4].allOf[1].properties.status.type, - parentSchema: schema188.anyOf[4].allOf[1].properties.status, + schema: schema191.anyOf[4].allOf[1].properties.status.type, + parentSchema: schema191.anyOf[4].allOf[1].properties.status, data: data28, }; if (vErrors === null) { @@ -156867,8 +157833,8 @@ function validate203( keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema188.anyOf[4].allOf[1].properties.message.type, - parentSchema: schema188.anyOf[4].allOf[1].properties.message, + schema: schema191.anyOf[4].allOf[1].properties.message.type, + parentSchema: schema191.anyOf[4].allOf[1].properties.message, data: data29, }; if (vErrors === null) { @@ -156892,8 +157858,8 @@ function validate203( keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema188.anyOf[4].allOf[1].type, - parentSchema: schema188.anyOf[4].allOf[1], + schema: schema191.anyOf[4].allOf[1].type, + parentSchema: schema191.anyOf[4].allOf[1], data, }; if (vErrors === null) { @@ -156908,28 +157874,206 @@ function validate203( } var _valid0 = _errs81 === errors; valid0 = valid0 || _valid0; + if (!valid0) { + const _errs94 = errors; + const _errs95 = errors; + if (errors === _errs95) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing13; + if (data.messageType === undefined && (missing13 = 'messageType')) { + const err60 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/0/required', + keyword: 'required', + params: { missingProperty: missing13 }, + message: "must have required property '" + missing13 + "'", + schema: schema191.anyOf[5].allOf[0].required, + parentSchema: schema191.anyOf[5].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err60]; + } else { + vErrors.push(err60); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data30 = data.messageType; + if (typeof data30 !== 'string') { + const err61 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/5/allOf/0/properties/messageType/type', + keyword: 'type', + params: { type: 'string' }, + message: 'must be string', + schema: schema191.anyOf[5].allOf[0].properties.messageType.type, + parentSchema: schema191.anyOf[5].allOf[0].properties.messageType, + data: data30, + }; + if (vErrors === null) { + vErrors = [err61]; + } else { + vErrors.push(err61); + } + errors++; + } + } + } + } else { + const err62 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/0/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema191.anyOf[5].allOf[0].type, + parentSchema: schema191.anyOf[5].allOf[0], + data, + }; + if (vErrors === null) { + vErrors = [err62]; + } else { + vErrors.push(err62); + } + errors++; + } + } + var valid22 = _errs95 === errors; + if (valid22) { + const _errs100 = errors; + if (errors === _errs100) { + if (data && typeof data == 'object' && !Array.isArray(data)) { + let missing14; + if ( + (data.messageType === undefined && (missing14 = 'messageType')) || + (data.content === undefined && (missing14 = 'content')) + ) { + const err63 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/1/required', + keyword: 'required', + params: { missingProperty: missing14 }, + message: "must have required property '" + missing14 + "'", + schema: schema191.anyOf[5].allOf[1].required, + parentSchema: schema191.anyOf[5].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err63]; + } else { + vErrors.push(err63); + } + errors++; + } else { + if (data.messageType !== undefined) { + let data31 = data.messageType; + const _errs102 = errors; + if ('logging' !== data31) { + const err64 = { + instancePath: instancePath + '/messageType', + schemaPath: '#/anyOf/5/allOf/1/properties/messageType/const', + keyword: 'const', + params: { allowedValue: 'logging' }, + message: 'must be equal to constant', + schema: 'logging', + parentSchema: + schema191.anyOf[5].allOf[1].properties.messageType, + data: data31, + }; + if (vErrors === null) { + vErrors = [err64]; + } else { + vErrors.push(err64); + } + errors++; + } + var valid24 = _errs102 === errors; + } else { + var valid24 = true; + } + if (valid24) { + if (data.content !== undefined) { + let data32 = data.content; + const _errs103 = errors; + if (errors === _errs103) { + if ( + data32 && + typeof data32 == 'object' && + !Array.isArray(data32) + ) { + } else { + const err65 = { + instancePath: instancePath + '/content', + schemaPath: '#/anyOf/5/allOf/1/properties/content/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema191.anyOf[5].allOf[1].properties.content.type, + parentSchema: + schema191.anyOf[5].allOf[1].properties.content, + data: data32, + }; + if (vErrors === null) { + vErrors = [err65]; + } else { + vErrors.push(err65); + } + errors++; + } + } + var valid24 = _errs103 === errors; + } else { + var valid24 = true; + } + } + } + } else { + const err66 = { + instancePath, + schemaPath: '#/anyOf/5/allOf/1/type', + keyword: 'type', + params: { type: 'object' }, + message: 'must be object', + schema: schema191.anyOf[5].allOf[1].type, + parentSchema: schema191.anyOf[5].allOf[1], + data, + }; + if (vErrors === null) { + vErrors = [err66]; + } else { + vErrors.push(err66); + } + errors++; + } + } + var valid22 = _errs100 === errors; + } + var _valid0 = _errs94 === errors; + valid0 = valid0 || _valid0; + } } } } } if (!valid0) { - const err60 = { + const err67 = { instancePath, schemaPath: '#/anyOf', keyword: 'anyOf', params: {}, message: 'must match a schema in anyOf', - schema: schema188.anyOf, - parentSchema: schema188, + schema: schema191.anyOf, + parentSchema: schema191, data, }; if (vErrors === null) { - vErrors = [err60]; + vErrors = [err67]; } else { - vErrors.push(err60); + vErrors.push(err67); } errors++; - validate203.errors = vErrors; + validate206.errors = vErrors; return false; } else { errors = _errs0; @@ -156941,11 +158085,11 @@ function validate203( } } } - validate203.errors = vErrors; + validate206.errors = vErrors; return errors === 0; } -exports.validateListPeerconnectionsResponse200Request = validate204; -const schema189 = { +exports.validateListPeerconnectionsResponse200Request = validate207; +const schema192 = { type: 'array', items: { title: 'Peerconnection Overview', @@ -156989,7 +158133,7 @@ const schema189 = { '#/paths//peerconnections/get/responses/200/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate204( +function validate207( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -157007,15 +158151,15 @@ function validate204( if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { let missing0; if (data0.type === undefined && (missing0 = 'type')) { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema189.items.allOf[0].required, - parentSchema: schema189.items.allOf[0], + schema: schema192.items.allOf[0].required, + parentSchema: schema192.items.allOf[0], data: data0, }, ]; @@ -157024,32 +158168,32 @@ function validate204( if (data0.type !== undefined) { let data1 = data0.type; if (typeof data1 !== 'string') { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema189.items.allOf[0].properties.type.type, - parentSchema: schema189.items.allOf[0].properties.type, + schema: schema192.items.allOf[0].properties.type.type, + parentSchema: schema192.items.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema189.items.allOf[0].properties.type.enum, + allowedValues: schema192.items.allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema189.items.allOf[0].properties.type.enum, - parentSchema: schema189.items.allOf[0].properties.type, + schema: schema192.items.allOf[0].properties.type.enum, + parentSchema: schema192.items.allOf[0].properties.type, data: data1, }, ]; @@ -157058,15 +158202,15 @@ function validate204( } } } else { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema189.items.allOf[0].type, - parentSchema: schema189.items.allOf[0], + schema: schema192.items.allOf[0].type, + parentSchema: schema192.items.allOf[0], data: data0, }, ]; @@ -157080,15 +158224,15 @@ function validate204( if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { let missing1; if (data0.devices === undefined && (missing1 = 'devices')) { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema189.items.allOf[1].required, - parentSchema: schema189.items.allOf[1], + schema: schema192.items.allOf[1].required, + parentSchema: schema192.items.allOf[1], data: data0, }, ]; @@ -157100,7 +158244,7 @@ function validate204( if (errors === _errs8) { if (Array.isArray(data2)) { if (data2.length > 2) { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + '/' + i0 + '/devices', schemaPath: '#/items/allOf/1/properties/devices/maxItems', @@ -157108,14 +158252,14 @@ function validate204( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema189.items.allOf[1].properties.devices, + parentSchema: schema192.items.allOf[1].properties.devices, data: data2, }, ]; return false; } else { if (data2.length < 2) { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + '/' + i0 + '/devices', schemaPath: '#/items/allOf/1/properties/devices/minItems', @@ -157123,7 +158267,7 @@ function validate204( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema189.items.allOf[1].properties.devices, + parentSchema: schema192.items.allOf[1].properties.devices, data: data2, }, ]; @@ -157142,7 +158286,7 @@ function validate204( ) { let missing2; if (data3.url === undefined && (missing2 = 'url')) { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + '/' + i0 + '/devices/' + i1, @@ -157153,10 +158297,10 @@ function validate204( message: "must have required property '" + missing2 + "'", schema: - schema189.items.allOf[1].properties.devices.items + schema192.items.allOf[1].properties.devices.items .required, parentSchema: - schema189.items.allOf[1].properties.devices.items, + schema192.items.allOf[1].properties.devices.items, data: data3, }, ]; @@ -157169,7 +158313,7 @@ function validate204( if (errors === _errs12) { if (typeof data4 === 'string') { if (!formats0(data4)) { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + @@ -157186,7 +158330,7 @@ function validate204( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema189.items.allOf[1].properties + schema192.items.allOf[1].properties .devices.items.properties.url, data: data4, }, @@ -157194,7 +158338,7 @@ function validate204( return false; } } else { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + @@ -157209,10 +158353,10 @@ function validate204( params: { type: 'string' }, message: 'must be string', schema: - schema189.items.allOf[1].properties + schema192.items.allOf[1].properties .devices.items.properties.url.type, parentSchema: - schema189.items.allOf[1].properties + schema192.items.allOf[1].properties .devices.items.properties.url, data: data4, }, @@ -157224,7 +158368,7 @@ function validate204( } } } else { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + '/' + i0 + '/devices/' + i1, @@ -157234,10 +158378,10 @@ function validate204( params: { type: 'object' }, message: 'must be object', schema: - schema189.items.allOf[1].properties.devices.items + schema192.items.allOf[1].properties.devices.items .type, parentSchema: - schema189.items.allOf[1].properties.devices.items, + schema192.items.allOf[1].properties.devices.items, data: data3, }, ]; @@ -157252,15 +158396,15 @@ function validate204( } } } else { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + '/' + i0 + '/devices', schemaPath: '#/items/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema189.items.allOf[1].properties.devices.type, - parentSchema: schema189.items.allOf[1].properties.devices, + schema: schema192.items.allOf[1].properties.devices.type, + parentSchema: schema192.items.allOf[1].properties.devices, data: data2, }, ]; @@ -157270,15 +158414,15 @@ function validate204( } } } else { - validate204.errors = [ + validate207.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema189.items.allOf[1].type, - parentSchema: schema189.items.allOf[1], + schema: schema192.items.allOf[1].type, + parentSchema: schema192.items.allOf[1], data: data0, }, ]; @@ -157293,26 +158437,26 @@ function validate204( } } } else { - validate204.errors = [ + validate207.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema189.type, - parentSchema: schema189, + schema: schema192.type, + parentSchema: schema192, data, }, ]; return false; } } - validate204.errors = vErrors; + validate207.errors = vErrors; return errors === 0; } -exports.validateListPeerconnectionsResponse200Response = validate205; -const schema190 = { +exports.validateListPeerconnectionsResponse200Response = validate208; +const schema193 = { type: 'array', items: { title: 'Peerconnection Overview', @@ -157369,7 +158513,7 @@ const schema190 = { '#/paths//peerconnections/get/responses/200/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate205( +function validate208( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -157391,15 +158535,15 @@ function validate205( (data0.type === undefined && (missing0 = 'type')) || (data0.status === undefined && (missing0 = 'status')) ) { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema190.items.allOf[0].required, - parentSchema: schema190.items.allOf[0], + schema: schema193.items.allOf[0].required, + parentSchema: schema193.items.allOf[0], data: data0, }, ]; @@ -157412,7 +158556,7 @@ function validate205( if (errors === _errs4) { if (typeof data1 === 'string') { if (!formats0(data1)) { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0 + '/url', schemaPath: '#/items/allOf/0/properties/url/format', @@ -157420,22 +158564,22 @@ function validate205( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema190.items.allOf[0].properties.url, + parentSchema: schema193.items.allOf[0].properties.url, data: data1, }, ]; return false; } } else { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0 + '/url', schemaPath: '#/items/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema190.items.allOf[0].properties.url.type, - parentSchema: schema190.items.allOf[0].properties.url, + schema: schema193.items.allOf[0].properties.url.type, + parentSchema: schema193.items.allOf[0].properties.url, data: data1, }, ]; @@ -157452,32 +158596,32 @@ function validate205( let data2 = data0.type; const _errs6 = errors; if (typeof data2 !== 'string') { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema190.items.allOf[0].properties.type.type, - parentSchema: schema190.items.allOf[0].properties.type, + schema: schema193.items.allOf[0].properties.type.type, + parentSchema: schema193.items.allOf[0].properties.type, data: data2, }, ]; return false; } if (!(data2 === 'local' || data2 === 'webrtc')) { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0 + '/type', schemaPath: '#/items/allOf/0/properties/type/enum', keyword: 'enum', params: { - allowedValues: schema190.items.allOf[0].properties.type.enum, + allowedValues: schema193.items.allOf[0].properties.type.enum, }, message: 'must be equal to one of the allowed values', - schema: schema190.items.allOf[0].properties.type.enum, - parentSchema: schema190.items.allOf[0].properties.type, + schema: schema193.items.allOf[0].properties.type.enum, + parentSchema: schema193.items.allOf[0].properties.type, data: data2, }, ]; @@ -157492,15 +158636,15 @@ function validate205( let data3 = data0.status; const _errs8 = errors; if (typeof data3 !== 'string') { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0 + '/status', schemaPath: '#/items/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema190.items.allOf[0].properties.status.type, - parentSchema: schema190.items.allOf[0].properties.status, + schema: schema193.items.allOf[0].properties.status.type, + parentSchema: schema193.items.allOf[0].properties.status, data: data3, }, ]; @@ -157516,18 +158660,18 @@ function validate205( data3 === 'closed' ) ) { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0 + '/status', schemaPath: '#/items/allOf/0/properties/status/enum', keyword: 'enum', params: { allowedValues: - schema190.items.allOf[0].properties.status.enum, + schema193.items.allOf[0].properties.status.enum, }, message: 'must be equal to one of the allowed values', - schema: schema190.items.allOf[0].properties.status.enum, - parentSchema: schema190.items.allOf[0].properties.status, + schema: schema193.items.allOf[0].properties.status.enum, + parentSchema: schema193.items.allOf[0].properties.status, data: data3, }, ]; @@ -157541,15 +158685,15 @@ function validate205( } } } else { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema190.items.allOf[0].type, - parentSchema: schema190.items.allOf[0], + schema: schema193.items.allOf[0].type, + parentSchema: schema193.items.allOf[0], data: data0, }, ]; @@ -157563,15 +158707,15 @@ function validate205( if (data0 && typeof data0 == 'object' && !Array.isArray(data0)) { let missing1; if (data0.devices === undefined && (missing1 = 'devices')) { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema190.items.allOf[1].required, - parentSchema: schema190.items.allOf[1], + schema: schema193.items.allOf[1].required, + parentSchema: schema193.items.allOf[1], data: data0, }, ]; @@ -157583,7 +158727,7 @@ function validate205( if (errors === _errs12) { if (Array.isArray(data4)) { if (data4.length > 2) { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0 + '/devices', schemaPath: '#/items/allOf/1/properties/devices/maxItems', @@ -157591,14 +158735,14 @@ function validate205( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema190.items.allOf[1].properties.devices, + parentSchema: schema193.items.allOf[1].properties.devices, data: data4, }, ]; return false; } else { if (data4.length < 2) { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0 + '/devices', schemaPath: '#/items/allOf/1/properties/devices/minItems', @@ -157606,7 +158750,7 @@ function validate205( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema190.items.allOf[1].properties.devices, + parentSchema: schema193.items.allOf[1].properties.devices, data: data4, }, ]; @@ -157625,7 +158769,7 @@ function validate205( ) { let missing2; if (data5.url === undefined && (missing2 = 'url')) { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0 + '/devices/' + i1, @@ -157636,10 +158780,10 @@ function validate205( message: "must have required property '" + missing2 + "'", schema: - schema190.items.allOf[1].properties.devices.items + schema193.items.allOf[1].properties.devices.items .required, parentSchema: - schema190.items.allOf[1].properties.devices.items, + schema193.items.allOf[1].properties.devices.items, data: data5, }, ]; @@ -157652,7 +158796,7 @@ function validate205( if (errors === _errs16) { if (typeof data6 === 'string') { if (!formats0(data6)) { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + @@ -157669,7 +158813,7 @@ function validate205( 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema190.items.allOf[1].properties + schema193.items.allOf[1].properties .devices.items.properties.url, data: data6, }, @@ -157677,7 +158821,7 @@ function validate205( return false; } } else { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + @@ -157692,10 +158836,10 @@ function validate205( params: { type: 'string' }, message: 'must be string', schema: - schema190.items.allOf[1].properties + schema193.items.allOf[1].properties .devices.items.properties.url.type, parentSchema: - schema190.items.allOf[1].properties + schema193.items.allOf[1].properties .devices.items.properties.url, data: data6, }, @@ -157707,7 +158851,7 @@ function validate205( } } } else { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0 + '/devices/' + i1, @@ -157717,10 +158861,10 @@ function validate205( params: { type: 'object' }, message: 'must be object', schema: - schema190.items.allOf[1].properties.devices.items + schema193.items.allOf[1].properties.devices.items .type, parentSchema: - schema190.items.allOf[1].properties.devices.items, + schema193.items.allOf[1].properties.devices.items, data: data5, }, ]; @@ -157735,15 +158879,15 @@ function validate205( } } } else { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0 + '/devices', schemaPath: '#/items/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema190.items.allOf[1].properties.devices.type, - parentSchema: schema190.items.allOf[1].properties.devices, + schema: schema193.items.allOf[1].properties.devices.type, + parentSchema: schema193.items.allOf[1].properties.devices, data: data4, }, ]; @@ -157753,15 +158897,15 @@ function validate205( } } } else { - validate205.errors = [ + validate208.errors = [ { instancePath: instancePath + '/' + i0, schemaPath: '#/items/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema190.items.allOf[1].type, - parentSchema: schema190.items.allOf[1], + schema: schema193.items.allOf[1].type, + parentSchema: schema193.items.allOf[1], data: data0, }, ]; @@ -157776,26 +158920,26 @@ function validate205( } } } else { - validate205.errors = [ + validate208.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema190.type, - parentSchema: schema190, + schema: schema193.type, + parentSchema: schema193, data, }, ]; return false; } } - validate205.errors = vErrors; + validate208.errors = vErrors; return errors === 0; } -exports.validateCreatePeerconnectionBodyRequest = validate206; -const schema191 = { +exports.validateCreatePeerconnectionBodyRequest = validate209; +const schema194 = { title: 'Peerconnection', allOf: [ { @@ -157856,7 +159000,7 @@ const schema191 = { '#/paths//peerconnections/post/requestBody/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate206( +function validate209( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -157867,15 +159011,15 @@ function validate206( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate206.errors = [ + validate209.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema191.allOf[0].required, - parentSchema: schema191.allOf[0], + schema: schema194.allOf[0].required, + parentSchema: schema194.allOf[0], data, }, ]; @@ -157884,30 +159028,30 @@ function validate206( if (data.type !== undefined) { let data0 = data.type; if (typeof data0 !== 'string') { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema191.allOf[0].properties.type.type, - parentSchema: schema191.allOf[0].properties.type, + schema: schema194.allOf[0].properties.type.type, + parentSchema: schema194.allOf[0].properties.type, data: data0, }, ]; return false; } if (!(data0 === 'local' || data0 === 'webrtc')) { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema191.allOf[0].properties.type.enum }, + params: { allowedValues: schema194.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema191.allOf[0].properties.type.enum, - parentSchema: schema191.allOf[0].properties.type, + schema: schema194.allOf[0].properties.type.enum, + parentSchema: schema194.allOf[0].properties.type, data: data0, }, ]; @@ -157916,15 +159060,15 @@ function validate206( } } } else { - validate206.errors = [ + validate209.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema191.allOf[0].type, - parentSchema: schema191.allOf[0], + schema: schema194.allOf[0].type, + parentSchema: schema194.allOf[0], data, }, ]; @@ -157938,15 +159082,15 @@ function validate206( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate206.errors = [ + validate209.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema191.allOf[1].required, - parentSchema: schema191.allOf[1], + schema: schema194.allOf[1].required, + parentSchema: schema194.allOf[1], data, }, ]; @@ -157958,7 +159102,7 @@ function validate206( if (errors === _errs6) { if (Array.isArray(data1)) { if (data1.length > 2) { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -157966,14 +159110,14 @@ function validate206( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema191.allOf[1].properties.devices, + parentSchema: schema194.allOf[1].properties.devices, data: data1, }, ]; return false; } else { if (data1.length < 2) { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -157981,7 +159125,7 @@ function validate206( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema191.allOf[1].properties.devices, + parentSchema: schema194.allOf[1].properties.devices, data: data1, }, ]; @@ -157996,7 +159140,7 @@ function validate206( if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { let missing2; if (data2.url === undefined && (missing2 = 'url')) { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -158004,8 +159148,8 @@ function validate206( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema191.allOf[1].properties.devices.items.required, - parentSchema: schema191.allOf[1].properties.devices.items, + schema194.allOf[1].properties.devices.items.required, + parentSchema: schema194.allOf[1].properties.devices.items, data: data2, }, ]; @@ -158018,7 +159162,7 @@ function validate206( if (errors === _errs10) { if (typeof data3 === 'string') { if (!formats0(data3)) { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -158029,7 +159173,7 @@ function validate206( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema191.allOf[1].properties.devices.items + schema194.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -158037,7 +159181,7 @@ function validate206( return false; } } else { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -158047,10 +159191,10 @@ function validate206( params: { type: 'string' }, message: 'must be string', schema: - schema191.allOf[1].properties.devices.items + schema194.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema191.allOf[1].properties.devices.items + schema194.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -158098,7 +159242,7 @@ function validate206( (data6.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + @@ -158117,12 +159261,12 @@ function validate206( missing3 + "'", schema: - schema191.allOf[1].properties + schema194.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema191.allOf[1].properties + schema194.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data6, @@ -158137,7 +159281,7 @@ function validate206( if (errors === _errs19) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + @@ -158156,7 +159300,7 @@ function validate206( '"', schema: 'uri', parentSchema: - schema191.allOf[1] + schema194.allOf[1] .properties.devices .items.properties .config.properties @@ -158169,7 +159313,7 @@ function validate206( return false; } } else { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + @@ -158184,14 +159328,14 @@ function validate206( params: { type: 'string' }, message: 'must be string', schema: - schema191.allOf[1] + schema194.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema191.allOf[1] + schema194.allOf[1] .properties.devices .items.properties.config .properties.services @@ -158213,7 +159357,7 @@ function validate206( let data8 = data6.serviceId; const _errs21 = errors; if (typeof data8 !== 'string') { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + @@ -158228,14 +159372,14 @@ function validate206( params: { type: 'string' }, message: 'must be string', schema: - schema191.allOf[1] + schema194.allOf[1] .properties.devices.items .properties.config .properties.services.items .properties.serviceId .type, parentSchema: - schema191.allOf[1] + schema194.allOf[1] .properties.devices.items .properties.config .properties.services.items @@ -158257,7 +159401,7 @@ function validate206( let data9 = data6.remoteServiceId; const _errs23 = errors; if (typeof data9 !== 'string') { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + @@ -158272,14 +159416,14 @@ function validate206( params: { type: 'string' }, message: 'must be string', schema: - schema191.allOf[1] + schema194.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema191.allOf[1] + schema194.allOf[1] .properties.devices .items.properties.config .properties.services @@ -158298,7 +159442,7 @@ function validate206( } } } else { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + @@ -158312,11 +159456,11 @@ function validate206( params: { type: 'object' }, message: 'must be object', schema: - schema191.allOf[1].properties + schema194.allOf[1].properties .devices.items.properties.config .properties.services.items.type, parentSchema: - schema191.allOf[1].properties + schema194.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data6, @@ -158331,7 +159475,7 @@ function validate206( } } } else { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + @@ -158344,11 +159488,11 @@ function validate206( params: { type: 'array' }, message: 'must be array', schema: - schema191.allOf[1].properties.devices + schema194.allOf[1].properties.devices .items.properties.config.properties .services.type, parentSchema: - schema191.allOf[1].properties.devices + schema194.allOf[1].properties.devices .items.properties.config.properties .services, data: data5, @@ -158359,7 +159503,7 @@ function validate206( } } } else { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -158369,10 +159513,10 @@ function validate206( params: { type: 'object' }, message: 'must be object', schema: - schema191.allOf[1].properties.devices.items + schema194.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema191.allOf[1].properties.devices.items + schema194.allOf[1].properties.devices.items .properties.config, data: data4, }, @@ -158387,15 +159531,15 @@ function validate206( } } } else { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema191.allOf[1].properties.devices.items.type, - parentSchema: schema191.allOf[1].properties.devices.items, + schema: schema194.allOf[1].properties.devices.items.type, + parentSchema: schema194.allOf[1].properties.devices.items, data: data2, }, ]; @@ -158410,15 +159554,15 @@ function validate206( } } } else { - validate206.errors = [ + validate209.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema191.allOf[1].properties.devices.type, - parentSchema: schema191.allOf[1].properties.devices, + schema: schema194.allOf[1].properties.devices.type, + parentSchema: schema194.allOf[1].properties.devices, data: data1, }, ]; @@ -158428,15 +159572,15 @@ function validate206( } } } else { - validate206.errors = [ + validate209.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema191.allOf[1].type, - parentSchema: schema191.allOf[1], + schema: schema194.allOf[1].type, + parentSchema: schema194.allOf[1], data, }, ]; @@ -158445,11 +159589,11 @@ function validate206( } var valid0 = _errs4 === errors; } - validate206.errors = vErrors; + validate209.errors = vErrors; return errors === 0; } -exports.validateCreatePeerconnectionBodyResponse = validate207; -const schema192 = { +exports.validateCreatePeerconnectionBodyResponse = validate210; +const schema195 = { title: 'Peerconnection', allOf: [ { @@ -158523,7 +159667,7 @@ const schema192 = { '#/paths//peerconnections/post/requestBody/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate207( +function validate210( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -158538,15 +159682,15 @@ function validate207( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate207.errors = [ + validate210.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema192.allOf[0].required, - parentSchema: schema192.allOf[0], + schema: schema195.allOf[0].required, + parentSchema: schema195.allOf[0], data, }, ]; @@ -158559,7 +159703,7 @@ function validate207( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -158567,22 +159711,22 @@ function validate207( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema192.allOf[0].properties.url, + parentSchema: schema195.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema192.allOf[0].properties.url.type, - parentSchema: schema192.allOf[0].properties.url, + schema: schema195.allOf[0].properties.url.type, + parentSchema: schema195.allOf[0].properties.url, data: data0, }, ]; @@ -158599,30 +159743,30 @@ function validate207( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema192.allOf[0].properties.type.type, - parentSchema: schema192.allOf[0].properties.type, + schema: schema195.allOf[0].properties.type.type, + parentSchema: schema195.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema192.allOf[0].properties.type.enum }, + params: { allowedValues: schema195.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema192.allOf[0].properties.type.enum, - parentSchema: schema192.allOf[0].properties.type, + schema: schema195.allOf[0].properties.type.enum, + parentSchema: schema195.allOf[0].properties.type, data: data1, }, ]; @@ -158637,15 +159781,15 @@ function validate207( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema192.allOf[0].properties.status.type, - parentSchema: schema192.allOf[0].properties.status, + schema: schema195.allOf[0].properties.status.type, + parentSchema: schema195.allOf[0].properties.status, data: data2, }, ]; @@ -158661,15 +159805,15 @@ function validate207( data2 === 'closed' ) ) { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema192.allOf[0].properties.status.enum }, + params: { allowedValues: schema195.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema192.allOf[0].properties.status.enum, - parentSchema: schema192.allOf[0].properties.status, + schema: schema195.allOf[0].properties.status.enum, + parentSchema: schema195.allOf[0].properties.status, data: data2, }, ]; @@ -158683,15 +159827,15 @@ function validate207( } } } else { - validate207.errors = [ + validate210.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema192.allOf[0].type, - parentSchema: schema192.allOf[0], + schema: schema195.allOf[0].type, + parentSchema: schema195.allOf[0], data, }, ]; @@ -158705,15 +159849,15 @@ function validate207( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate207.errors = [ + validate210.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema192.allOf[1].required, - parentSchema: schema192.allOf[1], + schema: schema195.allOf[1].required, + parentSchema: schema195.allOf[1], data, }, ]; @@ -158725,7 +159869,7 @@ function validate207( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -158733,14 +159877,14 @@ function validate207( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema192.allOf[1].properties.devices, + parentSchema: schema195.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -158748,7 +159892,7 @@ function validate207( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema192.allOf[1].properties.devices, + parentSchema: schema195.allOf[1].properties.devices, data: data3, }, ]; @@ -158763,7 +159907,7 @@ function validate207( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -158771,8 +159915,8 @@ function validate207( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema192.allOf[1].properties.devices.items.required, - parentSchema: schema192.allOf[1].properties.devices.items, + schema195.allOf[1].properties.devices.items.required, + parentSchema: schema195.allOf[1].properties.devices.items, data: data4, }, ]; @@ -158785,7 +159929,7 @@ function validate207( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -158796,7 +159940,7 @@ function validate207( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema192.allOf[1].properties.devices.items + schema195.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -158804,7 +159948,7 @@ function validate207( return false; } } else { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -158814,10 +159958,10 @@ function validate207( params: { type: 'string' }, message: 'must be string', schema: - schema192.allOf[1].properties.devices.items + schema195.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema192.allOf[1].properties.devices.items + schema195.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -158865,7 +160009,7 @@ function validate207( (data8.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + @@ -158884,12 +160028,12 @@ function validate207( missing3 + "'", schema: - schema192.allOf[1].properties + schema195.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema192.allOf[1].properties + schema195.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -158904,7 +160048,7 @@ function validate207( if (errors === _errs23) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + @@ -158923,7 +160067,7 @@ function validate207( '"', schema: 'uri', parentSchema: - schema192.allOf[1] + schema195.allOf[1] .properties.devices .items.properties .config.properties @@ -158936,7 +160080,7 @@ function validate207( return false; } } else { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + @@ -158951,14 +160095,14 @@ function validate207( params: { type: 'string' }, message: 'must be string', schema: - schema192.allOf[1] + schema195.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema192.allOf[1] + schema195.allOf[1] .properties.devices .items.properties.config .properties.services @@ -158980,7 +160124,7 @@ function validate207( let data10 = data8.serviceId; const _errs25 = errors; if (typeof data10 !== 'string') { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + @@ -158995,14 +160139,14 @@ function validate207( params: { type: 'string' }, message: 'must be string', schema: - schema192.allOf[1] + schema195.allOf[1] .properties.devices.items .properties.config .properties.services.items .properties.serviceId .type, parentSchema: - schema192.allOf[1] + schema195.allOf[1] .properties.devices.items .properties.config .properties.services.items @@ -159025,7 +160169,7 @@ function validate207( data8.remoteServiceId; const _errs27 = errors; if (typeof data11 !== 'string') { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + @@ -159040,14 +160184,14 @@ function validate207( params: { type: 'string' }, message: 'must be string', schema: - schema192.allOf[1] + schema195.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema192.allOf[1] + schema195.allOf[1] .properties.devices .items.properties.config .properties.services @@ -159066,7 +160210,7 @@ function validate207( } } } else { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + @@ -159080,11 +160224,11 @@ function validate207( params: { type: 'object' }, message: 'must be object', schema: - schema192.allOf[1].properties + schema195.allOf[1].properties .devices.items.properties.config .properties.services.items.type, parentSchema: - schema192.allOf[1].properties + schema195.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -159099,7 +160243,7 @@ function validate207( } } } else { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + @@ -159112,11 +160256,11 @@ function validate207( params: { type: 'array' }, message: 'must be array', schema: - schema192.allOf[1].properties.devices + schema195.allOf[1].properties.devices .items.properties.config.properties .services.type, parentSchema: - schema192.allOf[1].properties.devices + schema195.allOf[1].properties.devices .items.properties.config.properties .services, data: data7, @@ -159127,7 +160271,7 @@ function validate207( } } } else { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -159137,10 +160281,10 @@ function validate207( params: { type: 'object' }, message: 'must be object', schema: - schema192.allOf[1].properties.devices.items + schema195.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema192.allOf[1].properties.devices.items + schema195.allOf[1].properties.devices.items .properties.config, data: data6, }, @@ -159155,15 +160299,15 @@ function validate207( } } } else { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema192.allOf[1].properties.devices.items.type, - parentSchema: schema192.allOf[1].properties.devices.items, + schema: schema195.allOf[1].properties.devices.items.type, + parentSchema: schema195.allOf[1].properties.devices.items, data: data4, }, ]; @@ -159178,15 +160322,15 @@ function validate207( } } } else { - validate207.errors = [ + validate210.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema192.allOf[1].properties.devices.type, - parentSchema: schema192.allOf[1].properties.devices, + schema: schema195.allOf[1].properties.devices.type, + parentSchema: schema195.allOf[1].properties.devices, data: data3, }, ]; @@ -159196,15 +160340,15 @@ function validate207( } } } else { - validate207.errors = [ + validate210.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema192.allOf[1].type, - parentSchema: schema192.allOf[1], + schema: schema195.allOf[1].type, + parentSchema: schema195.allOf[1], data, }, ]; @@ -159213,11 +160357,11 @@ function validate207( } var valid0 = _errs8 === errors; } - validate207.errors = vErrors; + validate210.errors = vErrors; return errors === 0; } -exports.validateCreatePeerconnectionResponse201Request = validate208; -const schema193 = { +exports.validateCreatePeerconnectionResponse201Request = validate211; +const schema196 = { title: 'Peerconnection', allOf: [ { @@ -159278,7 +160422,7 @@ const schema193 = { '#/paths//peerconnections/post/responses/201/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate208( +function validate211( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -159289,15 +160433,15 @@ function validate208( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate208.errors = [ + validate211.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema193.allOf[0].required, - parentSchema: schema193.allOf[0], + schema: schema196.allOf[0].required, + parentSchema: schema196.allOf[0], data, }, ]; @@ -159306,30 +160450,30 @@ function validate208( if (data.type !== undefined) { let data0 = data.type; if (typeof data0 !== 'string') { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema193.allOf[0].properties.type.type, - parentSchema: schema193.allOf[0].properties.type, + schema: schema196.allOf[0].properties.type.type, + parentSchema: schema196.allOf[0].properties.type, data: data0, }, ]; return false; } if (!(data0 === 'local' || data0 === 'webrtc')) { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema193.allOf[0].properties.type.enum }, + params: { allowedValues: schema196.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema193.allOf[0].properties.type.enum, - parentSchema: schema193.allOf[0].properties.type, + schema: schema196.allOf[0].properties.type.enum, + parentSchema: schema196.allOf[0].properties.type, data: data0, }, ]; @@ -159338,15 +160482,15 @@ function validate208( } } } else { - validate208.errors = [ + validate211.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema193.allOf[0].type, - parentSchema: schema193.allOf[0], + schema: schema196.allOf[0].type, + parentSchema: schema196.allOf[0], data, }, ]; @@ -159360,15 +160504,15 @@ function validate208( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate208.errors = [ + validate211.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema193.allOf[1].required, - parentSchema: schema193.allOf[1], + schema: schema196.allOf[1].required, + parentSchema: schema196.allOf[1], data, }, ]; @@ -159380,7 +160524,7 @@ function validate208( if (errors === _errs6) { if (Array.isArray(data1)) { if (data1.length > 2) { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -159388,14 +160532,14 @@ function validate208( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema193.allOf[1].properties.devices, + parentSchema: schema196.allOf[1].properties.devices, data: data1, }, ]; return false; } else { if (data1.length < 2) { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -159403,7 +160547,7 @@ function validate208( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema193.allOf[1].properties.devices, + parentSchema: schema196.allOf[1].properties.devices, data: data1, }, ]; @@ -159418,7 +160562,7 @@ function validate208( if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { let missing2; if (data2.url === undefined && (missing2 = 'url')) { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -159426,8 +160570,8 @@ function validate208( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema193.allOf[1].properties.devices.items.required, - parentSchema: schema193.allOf[1].properties.devices.items, + schema196.allOf[1].properties.devices.items.required, + parentSchema: schema196.allOf[1].properties.devices.items, data: data2, }, ]; @@ -159440,7 +160584,7 @@ function validate208( if (errors === _errs10) { if (typeof data3 === 'string') { if (!formats0(data3)) { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -159451,7 +160595,7 @@ function validate208( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema193.allOf[1].properties.devices.items + schema196.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -159459,7 +160603,7 @@ function validate208( return false; } } else { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -159469,10 +160613,10 @@ function validate208( params: { type: 'string' }, message: 'must be string', schema: - schema193.allOf[1].properties.devices.items + schema196.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema193.allOf[1].properties.devices.items + schema196.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -159520,7 +160664,7 @@ function validate208( (data6.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + @@ -159539,12 +160683,12 @@ function validate208( missing3 + "'", schema: - schema193.allOf[1].properties + schema196.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema193.allOf[1].properties + schema196.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data6, @@ -159559,7 +160703,7 @@ function validate208( if (errors === _errs19) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + @@ -159578,7 +160722,7 @@ function validate208( '"', schema: 'uri', parentSchema: - schema193.allOf[1] + schema196.allOf[1] .properties.devices .items.properties .config.properties @@ -159591,7 +160735,7 @@ function validate208( return false; } } else { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + @@ -159606,14 +160750,14 @@ function validate208( params: { type: 'string' }, message: 'must be string', schema: - schema193.allOf[1] + schema196.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema193.allOf[1] + schema196.allOf[1] .properties.devices .items.properties.config .properties.services @@ -159635,7 +160779,7 @@ function validate208( let data8 = data6.serviceId; const _errs21 = errors; if (typeof data8 !== 'string') { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + @@ -159650,14 +160794,14 @@ function validate208( params: { type: 'string' }, message: 'must be string', schema: - schema193.allOf[1] + schema196.allOf[1] .properties.devices.items .properties.config .properties.services.items .properties.serviceId .type, parentSchema: - schema193.allOf[1] + schema196.allOf[1] .properties.devices.items .properties.config .properties.services.items @@ -159679,7 +160823,7 @@ function validate208( let data9 = data6.remoteServiceId; const _errs23 = errors; if (typeof data9 !== 'string') { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + @@ -159694,14 +160838,14 @@ function validate208( params: { type: 'string' }, message: 'must be string', schema: - schema193.allOf[1] + schema196.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema193.allOf[1] + schema196.allOf[1] .properties.devices .items.properties.config .properties.services @@ -159720,7 +160864,7 @@ function validate208( } } } else { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + @@ -159734,11 +160878,11 @@ function validate208( params: { type: 'object' }, message: 'must be object', schema: - schema193.allOf[1].properties + schema196.allOf[1].properties .devices.items.properties.config .properties.services.items.type, parentSchema: - schema193.allOf[1].properties + schema196.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data6, @@ -159753,7 +160897,7 @@ function validate208( } } } else { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + @@ -159766,11 +160910,11 @@ function validate208( params: { type: 'array' }, message: 'must be array', schema: - schema193.allOf[1].properties.devices + schema196.allOf[1].properties.devices .items.properties.config.properties .services.type, parentSchema: - schema193.allOf[1].properties.devices + schema196.allOf[1].properties.devices .items.properties.config.properties .services, data: data5, @@ -159781,7 +160925,7 @@ function validate208( } } } else { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -159791,10 +160935,10 @@ function validate208( params: { type: 'object' }, message: 'must be object', schema: - schema193.allOf[1].properties.devices.items + schema196.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema193.allOf[1].properties.devices.items + schema196.allOf[1].properties.devices.items .properties.config, data: data4, }, @@ -159809,15 +160953,15 @@ function validate208( } } } else { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema193.allOf[1].properties.devices.items.type, - parentSchema: schema193.allOf[1].properties.devices.items, + schema: schema196.allOf[1].properties.devices.items.type, + parentSchema: schema196.allOf[1].properties.devices.items, data: data2, }, ]; @@ -159832,15 +160976,15 @@ function validate208( } } } else { - validate208.errors = [ + validate211.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema193.allOf[1].properties.devices.type, - parentSchema: schema193.allOf[1].properties.devices, + schema: schema196.allOf[1].properties.devices.type, + parentSchema: schema196.allOf[1].properties.devices, data: data1, }, ]; @@ -159850,15 +160994,15 @@ function validate208( } } } else { - validate208.errors = [ + validate211.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema193.allOf[1].type, - parentSchema: schema193.allOf[1], + schema: schema196.allOf[1].type, + parentSchema: schema196.allOf[1], data, }, ]; @@ -159867,11 +161011,11 @@ function validate208( } var valid0 = _errs4 === errors; } - validate208.errors = vErrors; + validate211.errors = vErrors; return errors === 0; } -exports.validateCreatePeerconnectionResponse201Response = validate209; -const schema194 = { +exports.validateCreatePeerconnectionResponse201Response = validate212; +const schema197 = { title: 'Peerconnection', allOf: [ { @@ -159945,7 +161089,7 @@ const schema194 = { '#/paths//peerconnections/post/responses/201/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate209( +function validate212( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -159960,15 +161104,15 @@ function validate209( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate209.errors = [ + validate212.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema194.allOf[0].required, - parentSchema: schema194.allOf[0], + schema: schema197.allOf[0].required, + parentSchema: schema197.allOf[0], data, }, ]; @@ -159981,7 +161125,7 @@ function validate209( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -159989,22 +161133,22 @@ function validate209( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema194.allOf[0].properties.url, + parentSchema: schema197.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema194.allOf[0].properties.url.type, - parentSchema: schema194.allOf[0].properties.url, + schema: schema197.allOf[0].properties.url.type, + parentSchema: schema197.allOf[0].properties.url, data: data0, }, ]; @@ -160021,30 +161165,30 @@ function validate209( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema194.allOf[0].properties.type.type, - parentSchema: schema194.allOf[0].properties.type, + schema: schema197.allOf[0].properties.type.type, + parentSchema: schema197.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema194.allOf[0].properties.type.enum }, + params: { allowedValues: schema197.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema194.allOf[0].properties.type.enum, - parentSchema: schema194.allOf[0].properties.type, + schema: schema197.allOf[0].properties.type.enum, + parentSchema: schema197.allOf[0].properties.type, data: data1, }, ]; @@ -160059,15 +161203,15 @@ function validate209( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema194.allOf[0].properties.status.type, - parentSchema: schema194.allOf[0].properties.status, + schema: schema197.allOf[0].properties.status.type, + parentSchema: schema197.allOf[0].properties.status, data: data2, }, ]; @@ -160083,15 +161227,15 @@ function validate209( data2 === 'closed' ) ) { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema194.allOf[0].properties.status.enum }, + params: { allowedValues: schema197.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema194.allOf[0].properties.status.enum, - parentSchema: schema194.allOf[0].properties.status, + schema: schema197.allOf[0].properties.status.enum, + parentSchema: schema197.allOf[0].properties.status, data: data2, }, ]; @@ -160105,15 +161249,15 @@ function validate209( } } } else { - validate209.errors = [ + validate212.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema194.allOf[0].type, - parentSchema: schema194.allOf[0], + schema: schema197.allOf[0].type, + parentSchema: schema197.allOf[0], data, }, ]; @@ -160127,15 +161271,15 @@ function validate209( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate209.errors = [ + validate212.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema194.allOf[1].required, - parentSchema: schema194.allOf[1], + schema: schema197.allOf[1].required, + parentSchema: schema197.allOf[1], data, }, ]; @@ -160147,7 +161291,7 @@ function validate209( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -160155,14 +161299,14 @@ function validate209( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema194.allOf[1].properties.devices, + parentSchema: schema197.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -160170,7 +161314,7 @@ function validate209( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema194.allOf[1].properties.devices, + parentSchema: schema197.allOf[1].properties.devices, data: data3, }, ]; @@ -160185,7 +161329,7 @@ function validate209( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -160193,8 +161337,8 @@ function validate209( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema194.allOf[1].properties.devices.items.required, - parentSchema: schema194.allOf[1].properties.devices.items, + schema197.allOf[1].properties.devices.items.required, + parentSchema: schema197.allOf[1].properties.devices.items, data: data4, }, ]; @@ -160207,7 +161351,7 @@ function validate209( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -160218,7 +161362,7 @@ function validate209( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema194.allOf[1].properties.devices.items + schema197.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -160226,7 +161370,7 @@ function validate209( return false; } } else { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -160236,10 +161380,10 @@ function validate209( params: { type: 'string' }, message: 'must be string', schema: - schema194.allOf[1].properties.devices.items + schema197.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema194.allOf[1].properties.devices.items + schema197.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -160287,7 +161431,7 @@ function validate209( (data8.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + @@ -160306,12 +161450,12 @@ function validate209( missing3 + "'", schema: - schema194.allOf[1].properties + schema197.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema194.allOf[1].properties + schema197.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -160326,7 +161470,7 @@ function validate209( if (errors === _errs23) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + @@ -160345,7 +161489,7 @@ function validate209( '"', schema: 'uri', parentSchema: - schema194.allOf[1] + schema197.allOf[1] .properties.devices .items.properties .config.properties @@ -160358,7 +161502,7 @@ function validate209( return false; } } else { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + @@ -160373,14 +161517,14 @@ function validate209( params: { type: 'string' }, message: 'must be string', schema: - schema194.allOf[1] + schema197.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema194.allOf[1] + schema197.allOf[1] .properties.devices .items.properties.config .properties.services @@ -160402,7 +161546,7 @@ function validate209( let data10 = data8.serviceId; const _errs25 = errors; if (typeof data10 !== 'string') { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + @@ -160417,14 +161561,14 @@ function validate209( params: { type: 'string' }, message: 'must be string', schema: - schema194.allOf[1] + schema197.allOf[1] .properties.devices.items .properties.config .properties.services.items .properties.serviceId .type, parentSchema: - schema194.allOf[1] + schema197.allOf[1] .properties.devices.items .properties.config .properties.services.items @@ -160447,7 +161591,7 @@ function validate209( data8.remoteServiceId; const _errs27 = errors; if (typeof data11 !== 'string') { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + @@ -160462,14 +161606,14 @@ function validate209( params: { type: 'string' }, message: 'must be string', schema: - schema194.allOf[1] + schema197.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema194.allOf[1] + schema197.allOf[1] .properties.devices .items.properties.config .properties.services @@ -160488,7 +161632,7 @@ function validate209( } } } else { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + @@ -160502,11 +161646,11 @@ function validate209( params: { type: 'object' }, message: 'must be object', schema: - schema194.allOf[1].properties + schema197.allOf[1].properties .devices.items.properties.config .properties.services.items.type, parentSchema: - schema194.allOf[1].properties + schema197.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -160521,7 +161665,7 @@ function validate209( } } } else { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + @@ -160534,11 +161678,11 @@ function validate209( params: { type: 'array' }, message: 'must be array', schema: - schema194.allOf[1].properties.devices + schema197.allOf[1].properties.devices .items.properties.config.properties .services.type, parentSchema: - schema194.allOf[1].properties.devices + schema197.allOf[1].properties.devices .items.properties.config.properties .services, data: data7, @@ -160549,7 +161693,7 @@ function validate209( } } } else { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -160559,10 +161703,10 @@ function validate209( params: { type: 'object' }, message: 'must be object', schema: - schema194.allOf[1].properties.devices.items + schema197.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema194.allOf[1].properties.devices.items + schema197.allOf[1].properties.devices.items .properties.config, data: data6, }, @@ -160577,15 +161721,15 @@ function validate209( } } } else { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema194.allOf[1].properties.devices.items.type, - parentSchema: schema194.allOf[1].properties.devices.items, + schema: schema197.allOf[1].properties.devices.items.type, + parentSchema: schema197.allOf[1].properties.devices.items, data: data4, }, ]; @@ -160600,15 +161744,15 @@ function validate209( } } } else { - validate209.errors = [ + validate212.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema194.allOf[1].properties.devices.type, - parentSchema: schema194.allOf[1].properties.devices, + schema: schema197.allOf[1].properties.devices.type, + parentSchema: schema197.allOf[1].properties.devices, data: data3, }, ]; @@ -160618,15 +161762,15 @@ function validate209( } } } else { - validate209.errors = [ + validate212.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema194.allOf[1].type, - parentSchema: schema194.allOf[1], + schema: schema197.allOf[1].type, + parentSchema: schema197.allOf[1], data, }, ]; @@ -160635,11 +161779,11 @@ function validate209( } var valid0 = _errs8 === errors; } - validate209.errors = vErrors; + validate212.errors = vErrors; return errors === 0; } -exports.validateCreatePeerconnectionResponse202Request = validate210; -const schema195 = { +exports.validateCreatePeerconnectionResponse202Request = validate213; +const schema198 = { title: 'Peerconnection', allOf: [ { @@ -160700,7 +161844,7 @@ const schema195 = { '#/paths//peerconnections/post/responses/202/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate210( +function validate213( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -160711,15 +161855,15 @@ function validate210( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate210.errors = [ + validate213.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema195.allOf[0].required, - parentSchema: schema195.allOf[0], + schema: schema198.allOf[0].required, + parentSchema: schema198.allOf[0], data, }, ]; @@ -160728,30 +161872,30 @@ function validate210( if (data.type !== undefined) { let data0 = data.type; if (typeof data0 !== 'string') { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema195.allOf[0].properties.type.type, - parentSchema: schema195.allOf[0].properties.type, + schema: schema198.allOf[0].properties.type.type, + parentSchema: schema198.allOf[0].properties.type, data: data0, }, ]; return false; } if (!(data0 === 'local' || data0 === 'webrtc')) { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema195.allOf[0].properties.type.enum }, + params: { allowedValues: schema198.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema195.allOf[0].properties.type.enum, - parentSchema: schema195.allOf[0].properties.type, + schema: schema198.allOf[0].properties.type.enum, + parentSchema: schema198.allOf[0].properties.type, data: data0, }, ]; @@ -160760,15 +161904,15 @@ function validate210( } } } else { - validate210.errors = [ + validate213.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema195.allOf[0].type, - parentSchema: schema195.allOf[0], + schema: schema198.allOf[0].type, + parentSchema: schema198.allOf[0], data, }, ]; @@ -160782,15 +161926,15 @@ function validate210( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate210.errors = [ + validate213.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema195.allOf[1].required, - parentSchema: schema195.allOf[1], + schema: schema198.allOf[1].required, + parentSchema: schema198.allOf[1], data, }, ]; @@ -160802,7 +161946,7 @@ function validate210( if (errors === _errs6) { if (Array.isArray(data1)) { if (data1.length > 2) { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -160810,14 +161954,14 @@ function validate210( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema195.allOf[1].properties.devices, + parentSchema: schema198.allOf[1].properties.devices, data: data1, }, ]; return false; } else { if (data1.length < 2) { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -160825,7 +161969,7 @@ function validate210( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema195.allOf[1].properties.devices, + parentSchema: schema198.allOf[1].properties.devices, data: data1, }, ]; @@ -160840,7 +161984,7 @@ function validate210( if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { let missing2; if (data2.url === undefined && (missing2 = 'url')) { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -160848,8 +161992,8 @@ function validate210( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema195.allOf[1].properties.devices.items.required, - parentSchema: schema195.allOf[1].properties.devices.items, + schema198.allOf[1].properties.devices.items.required, + parentSchema: schema198.allOf[1].properties.devices.items, data: data2, }, ]; @@ -160862,7 +162006,7 @@ function validate210( if (errors === _errs10) { if (typeof data3 === 'string') { if (!formats0(data3)) { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -160873,7 +162017,7 @@ function validate210( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema195.allOf[1].properties.devices.items + schema198.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -160881,7 +162025,7 @@ function validate210( return false; } } else { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -160891,10 +162035,10 @@ function validate210( params: { type: 'string' }, message: 'must be string', schema: - schema195.allOf[1].properties.devices.items + schema198.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema195.allOf[1].properties.devices.items + schema198.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -160942,7 +162086,7 @@ function validate210( (data6.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + @@ -160961,12 +162105,12 @@ function validate210( missing3 + "'", schema: - schema195.allOf[1].properties + schema198.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema195.allOf[1].properties + schema198.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data6, @@ -160981,7 +162125,7 @@ function validate210( if (errors === _errs19) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + @@ -161000,7 +162144,7 @@ function validate210( '"', schema: 'uri', parentSchema: - schema195.allOf[1] + schema198.allOf[1] .properties.devices .items.properties .config.properties @@ -161013,7 +162157,7 @@ function validate210( return false; } } else { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + @@ -161028,14 +162172,14 @@ function validate210( params: { type: 'string' }, message: 'must be string', schema: - schema195.allOf[1] + schema198.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema195.allOf[1] + schema198.allOf[1] .properties.devices .items.properties.config .properties.services @@ -161057,7 +162201,7 @@ function validate210( let data8 = data6.serviceId; const _errs21 = errors; if (typeof data8 !== 'string') { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + @@ -161072,14 +162216,14 @@ function validate210( params: { type: 'string' }, message: 'must be string', schema: - schema195.allOf[1] + schema198.allOf[1] .properties.devices.items .properties.config .properties.services.items .properties.serviceId .type, parentSchema: - schema195.allOf[1] + schema198.allOf[1] .properties.devices.items .properties.config .properties.services.items @@ -161101,7 +162245,7 @@ function validate210( let data9 = data6.remoteServiceId; const _errs23 = errors; if (typeof data9 !== 'string') { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + @@ -161116,14 +162260,14 @@ function validate210( params: { type: 'string' }, message: 'must be string', schema: - schema195.allOf[1] + schema198.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema195.allOf[1] + schema198.allOf[1] .properties.devices .items.properties.config .properties.services @@ -161142,7 +162286,7 @@ function validate210( } } } else { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + @@ -161156,11 +162300,11 @@ function validate210( params: { type: 'object' }, message: 'must be object', schema: - schema195.allOf[1].properties + schema198.allOf[1].properties .devices.items.properties.config .properties.services.items.type, parentSchema: - schema195.allOf[1].properties + schema198.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data6, @@ -161175,7 +162319,7 @@ function validate210( } } } else { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + @@ -161188,11 +162332,11 @@ function validate210( params: { type: 'array' }, message: 'must be array', schema: - schema195.allOf[1].properties.devices + schema198.allOf[1].properties.devices .items.properties.config.properties .services.type, parentSchema: - schema195.allOf[1].properties.devices + schema198.allOf[1].properties.devices .items.properties.config.properties .services, data: data5, @@ -161203,7 +162347,7 @@ function validate210( } } } else { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -161213,10 +162357,10 @@ function validate210( params: { type: 'object' }, message: 'must be object', schema: - schema195.allOf[1].properties.devices.items + schema198.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema195.allOf[1].properties.devices.items + schema198.allOf[1].properties.devices.items .properties.config, data: data4, }, @@ -161231,15 +162375,15 @@ function validate210( } } } else { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema195.allOf[1].properties.devices.items.type, - parentSchema: schema195.allOf[1].properties.devices.items, + schema: schema198.allOf[1].properties.devices.items.type, + parentSchema: schema198.allOf[1].properties.devices.items, data: data2, }, ]; @@ -161254,15 +162398,15 @@ function validate210( } } } else { - validate210.errors = [ + validate213.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema195.allOf[1].properties.devices.type, - parentSchema: schema195.allOf[1].properties.devices, + schema: schema198.allOf[1].properties.devices.type, + parentSchema: schema198.allOf[1].properties.devices, data: data1, }, ]; @@ -161272,15 +162416,15 @@ function validate210( } } } else { - validate210.errors = [ + validate213.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema195.allOf[1].type, - parentSchema: schema195.allOf[1], + schema: schema198.allOf[1].type, + parentSchema: schema198.allOf[1], data, }, ]; @@ -161289,11 +162433,11 @@ function validate210( } var valid0 = _errs4 === errors; } - validate210.errors = vErrors; + validate213.errors = vErrors; return errors === 0; } -exports.validateCreatePeerconnectionResponse202Response = validate211; -const schema196 = { +exports.validateCreatePeerconnectionResponse202Response = validate214; +const schema199 = { title: 'Peerconnection', allOf: [ { @@ -161367,7 +162511,7 @@ const schema196 = { '#/paths//peerconnections/post/responses/202/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate211( +function validate214( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -161382,15 +162526,15 @@ function validate211( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate211.errors = [ + validate214.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema196.allOf[0].required, - parentSchema: schema196.allOf[0], + schema: schema199.allOf[0].required, + parentSchema: schema199.allOf[0], data, }, ]; @@ -161403,7 +162547,7 @@ function validate211( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -161411,22 +162555,22 @@ function validate211( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema196.allOf[0].properties.url, + parentSchema: schema199.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema196.allOf[0].properties.url.type, - parentSchema: schema196.allOf[0].properties.url, + schema: schema199.allOf[0].properties.url.type, + parentSchema: schema199.allOf[0].properties.url, data: data0, }, ]; @@ -161443,30 +162587,30 @@ function validate211( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema196.allOf[0].properties.type.type, - parentSchema: schema196.allOf[0].properties.type, + schema: schema199.allOf[0].properties.type.type, + parentSchema: schema199.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema196.allOf[0].properties.type.enum }, + params: { allowedValues: schema199.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema196.allOf[0].properties.type.enum, - parentSchema: schema196.allOf[0].properties.type, + schema: schema199.allOf[0].properties.type.enum, + parentSchema: schema199.allOf[0].properties.type, data: data1, }, ]; @@ -161481,15 +162625,15 @@ function validate211( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema196.allOf[0].properties.status.type, - parentSchema: schema196.allOf[0].properties.status, + schema: schema199.allOf[0].properties.status.type, + parentSchema: schema199.allOf[0].properties.status, data: data2, }, ]; @@ -161505,15 +162649,15 @@ function validate211( data2 === 'closed' ) ) { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema196.allOf[0].properties.status.enum }, + params: { allowedValues: schema199.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema196.allOf[0].properties.status.enum, - parentSchema: schema196.allOf[0].properties.status, + schema: schema199.allOf[0].properties.status.enum, + parentSchema: schema199.allOf[0].properties.status, data: data2, }, ]; @@ -161527,15 +162671,15 @@ function validate211( } } } else { - validate211.errors = [ + validate214.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema196.allOf[0].type, - parentSchema: schema196.allOf[0], + schema: schema199.allOf[0].type, + parentSchema: schema199.allOf[0], data, }, ]; @@ -161549,15 +162693,15 @@ function validate211( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate211.errors = [ + validate214.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema196.allOf[1].required, - parentSchema: schema196.allOf[1], + schema: schema199.allOf[1].required, + parentSchema: schema199.allOf[1], data, }, ]; @@ -161569,7 +162713,7 @@ function validate211( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -161577,14 +162721,14 @@ function validate211( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema196.allOf[1].properties.devices, + parentSchema: schema199.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -161592,7 +162736,7 @@ function validate211( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema196.allOf[1].properties.devices, + parentSchema: schema199.allOf[1].properties.devices, data: data3, }, ]; @@ -161607,7 +162751,7 @@ function validate211( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -161615,8 +162759,8 @@ function validate211( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema196.allOf[1].properties.devices.items.required, - parentSchema: schema196.allOf[1].properties.devices.items, + schema199.allOf[1].properties.devices.items.required, + parentSchema: schema199.allOf[1].properties.devices.items, data: data4, }, ]; @@ -161629,7 +162773,7 @@ function validate211( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -161640,7 +162784,7 @@ function validate211( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema196.allOf[1].properties.devices.items + schema199.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -161648,7 +162792,7 @@ function validate211( return false; } } else { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -161658,10 +162802,10 @@ function validate211( params: { type: 'string' }, message: 'must be string', schema: - schema196.allOf[1].properties.devices.items + schema199.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema196.allOf[1].properties.devices.items + schema199.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -161709,7 +162853,7 @@ function validate211( (data8.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + @@ -161728,12 +162872,12 @@ function validate211( missing3 + "'", schema: - schema196.allOf[1].properties + schema199.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema196.allOf[1].properties + schema199.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -161748,7 +162892,7 @@ function validate211( if (errors === _errs23) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + @@ -161767,7 +162911,7 @@ function validate211( '"', schema: 'uri', parentSchema: - schema196.allOf[1] + schema199.allOf[1] .properties.devices .items.properties .config.properties @@ -161780,7 +162924,7 @@ function validate211( return false; } } else { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + @@ -161795,14 +162939,14 @@ function validate211( params: { type: 'string' }, message: 'must be string', schema: - schema196.allOf[1] + schema199.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema196.allOf[1] + schema199.allOf[1] .properties.devices .items.properties.config .properties.services @@ -161824,7 +162968,7 @@ function validate211( let data10 = data8.serviceId; const _errs25 = errors; if (typeof data10 !== 'string') { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + @@ -161839,14 +162983,14 @@ function validate211( params: { type: 'string' }, message: 'must be string', schema: - schema196.allOf[1] + schema199.allOf[1] .properties.devices.items .properties.config .properties.services.items .properties.serviceId .type, parentSchema: - schema196.allOf[1] + schema199.allOf[1] .properties.devices.items .properties.config .properties.services.items @@ -161869,7 +163013,7 @@ function validate211( data8.remoteServiceId; const _errs27 = errors; if (typeof data11 !== 'string') { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + @@ -161884,14 +163028,14 @@ function validate211( params: { type: 'string' }, message: 'must be string', schema: - schema196.allOf[1] + schema199.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema196.allOf[1] + schema199.allOf[1] .properties.devices .items.properties.config .properties.services @@ -161910,7 +163054,7 @@ function validate211( } } } else { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + @@ -161924,11 +163068,11 @@ function validate211( params: { type: 'object' }, message: 'must be object', schema: - schema196.allOf[1].properties + schema199.allOf[1].properties .devices.items.properties.config .properties.services.items.type, parentSchema: - schema196.allOf[1].properties + schema199.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -161943,7 +163087,7 @@ function validate211( } } } else { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + @@ -161956,11 +163100,11 @@ function validate211( params: { type: 'array' }, message: 'must be array', schema: - schema196.allOf[1].properties.devices + schema199.allOf[1].properties.devices .items.properties.config.properties .services.type, parentSchema: - schema196.allOf[1].properties.devices + schema199.allOf[1].properties.devices .items.properties.config.properties .services, data: data7, @@ -161971,7 +163115,7 @@ function validate211( } } } else { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -161981,10 +163125,10 @@ function validate211( params: { type: 'object' }, message: 'must be object', schema: - schema196.allOf[1].properties.devices.items + schema199.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema196.allOf[1].properties.devices.items + schema199.allOf[1].properties.devices.items .properties.config, data: data6, }, @@ -161999,15 +163143,15 @@ function validate211( } } } else { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema196.allOf[1].properties.devices.items.type, - parentSchema: schema196.allOf[1].properties.devices.items, + schema: schema199.allOf[1].properties.devices.items.type, + parentSchema: schema199.allOf[1].properties.devices.items, data: data4, }, ]; @@ -162022,15 +163166,15 @@ function validate211( } } } else { - validate211.errors = [ + validate214.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema196.allOf[1].properties.devices.type, - parentSchema: schema196.allOf[1].properties.devices, + schema: schema199.allOf[1].properties.devices.type, + parentSchema: schema199.allOf[1].properties.devices, data: data3, }, ]; @@ -162040,15 +163184,15 @@ function validate211( } } } else { - validate211.errors = [ + validate214.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema196.allOf[1].type, - parentSchema: schema196.allOf[1], + schema: schema199.allOf[1].type, + parentSchema: schema199.allOf[1], data, }, ]; @@ -162057,11 +163201,11 @@ function validate211( } var valid0 = _errs8 === errors; } - validate211.errors = vErrors; + validate214.errors = vErrors; return errors === 0; } -exports.validateGetPeerconnectionResponse200Request = validate212; -const schema197 = { +exports.validateGetPeerconnectionResponse200Request = validate215; +const schema200 = { title: 'Peerconnection', allOf: [ { @@ -162122,7 +163266,7 @@ const schema197 = { '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate212( +function validate215( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -162133,15 +163277,15 @@ function validate212( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.type === undefined && (missing0 = 'type')) { - validate212.errors = [ + validate215.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema197.allOf[0].required, - parentSchema: schema197.allOf[0], + schema: schema200.allOf[0].required, + parentSchema: schema200.allOf[0], data, }, ]; @@ -162150,30 +163294,30 @@ function validate212( if (data.type !== undefined) { let data0 = data.type; if (typeof data0 !== 'string') { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema197.allOf[0].properties.type.type, - parentSchema: schema197.allOf[0].properties.type, + schema: schema200.allOf[0].properties.type.type, + parentSchema: schema200.allOf[0].properties.type, data: data0, }, ]; return false; } if (!(data0 === 'local' || data0 === 'webrtc')) { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema197.allOf[0].properties.type.enum }, + params: { allowedValues: schema200.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema197.allOf[0].properties.type.enum, - parentSchema: schema197.allOf[0].properties.type, + schema: schema200.allOf[0].properties.type.enum, + parentSchema: schema200.allOf[0].properties.type, data: data0, }, ]; @@ -162182,15 +163326,15 @@ function validate212( } } } else { - validate212.errors = [ + validate215.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema197.allOf[0].type, - parentSchema: schema197.allOf[0], + schema: schema200.allOf[0].type, + parentSchema: schema200.allOf[0], data, }, ]; @@ -162204,15 +163348,15 @@ function validate212( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate212.errors = [ + validate215.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema197.allOf[1].required, - parentSchema: schema197.allOf[1], + schema: schema200.allOf[1].required, + parentSchema: schema200.allOf[1], data, }, ]; @@ -162224,7 +163368,7 @@ function validate212( if (errors === _errs6) { if (Array.isArray(data1)) { if (data1.length > 2) { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -162232,14 +163376,14 @@ function validate212( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema197.allOf[1].properties.devices, + parentSchema: schema200.allOf[1].properties.devices, data: data1, }, ]; return false; } else { if (data1.length < 2) { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -162247,7 +163391,7 @@ function validate212( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema197.allOf[1].properties.devices, + parentSchema: schema200.allOf[1].properties.devices, data: data1, }, ]; @@ -162262,7 +163406,7 @@ function validate212( if (data2 && typeof data2 == 'object' && !Array.isArray(data2)) { let missing2; if (data2.url === undefined && (missing2 = 'url')) { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -162270,8 +163414,8 @@ function validate212( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema197.allOf[1].properties.devices.items.required, - parentSchema: schema197.allOf[1].properties.devices.items, + schema200.allOf[1].properties.devices.items.required, + parentSchema: schema200.allOf[1].properties.devices.items, data: data2, }, ]; @@ -162284,7 +163428,7 @@ function validate212( if (errors === _errs10) { if (typeof data3 === 'string') { if (!formats0(data3)) { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -162295,7 +163439,7 @@ function validate212( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema197.allOf[1].properties.devices.items + schema200.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -162303,7 +163447,7 @@ function validate212( return false; } } else { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -162313,10 +163457,10 @@ function validate212( params: { type: 'string' }, message: 'must be string', schema: - schema197.allOf[1].properties.devices.items + schema200.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema197.allOf[1].properties.devices.items + schema200.allOf[1].properties.devices.items .properties.url, data: data3, }, @@ -162364,7 +163508,7 @@ function validate212( (data6.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + @@ -162383,12 +163527,12 @@ function validate212( missing3 + "'", schema: - schema197.allOf[1].properties + schema200.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema197.allOf[1].properties + schema200.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data6, @@ -162403,7 +163547,7 @@ function validate212( if (errors === _errs19) { if (typeof data7 === 'string') { if (!formats0(data7)) { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + @@ -162422,7 +163566,7 @@ function validate212( '"', schema: 'uri', parentSchema: - schema197.allOf[1] + schema200.allOf[1] .properties.devices .items.properties .config.properties @@ -162435,7 +163579,7 @@ function validate212( return false; } } else { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + @@ -162450,14 +163594,14 @@ function validate212( params: { type: 'string' }, message: 'must be string', schema: - schema197.allOf[1] + schema200.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema197.allOf[1] + schema200.allOf[1] .properties.devices .items.properties.config .properties.services @@ -162479,7 +163623,7 @@ function validate212( let data8 = data6.serviceId; const _errs21 = errors; if (typeof data8 !== 'string') { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + @@ -162494,14 +163638,14 @@ function validate212( params: { type: 'string' }, message: 'must be string', schema: - schema197.allOf[1] + schema200.allOf[1] .properties.devices.items .properties.config .properties.services.items .properties.serviceId .type, parentSchema: - schema197.allOf[1] + schema200.allOf[1] .properties.devices.items .properties.config .properties.services.items @@ -162523,7 +163667,7 @@ function validate212( let data9 = data6.remoteServiceId; const _errs23 = errors; if (typeof data9 !== 'string') { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + @@ -162538,14 +163682,14 @@ function validate212( params: { type: 'string' }, message: 'must be string', schema: - schema197.allOf[1] + schema200.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema197.allOf[1] + schema200.allOf[1] .properties.devices .items.properties.config .properties.services @@ -162564,7 +163708,7 @@ function validate212( } } } else { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + @@ -162578,11 +163722,11 @@ function validate212( params: { type: 'object' }, message: 'must be object', schema: - schema197.allOf[1].properties + schema200.allOf[1].properties .devices.items.properties.config .properties.services.items.type, parentSchema: - schema197.allOf[1].properties + schema200.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data6, @@ -162597,7 +163741,7 @@ function validate212( } } } else { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + @@ -162610,11 +163754,11 @@ function validate212( params: { type: 'array' }, message: 'must be array', schema: - schema197.allOf[1].properties.devices + schema200.allOf[1].properties.devices .items.properties.config.properties .services.type, parentSchema: - schema197.allOf[1].properties.devices + schema200.allOf[1].properties.devices .items.properties.config.properties .services, data: data5, @@ -162625,7 +163769,7 @@ function validate212( } } } else { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -162635,10 +163779,10 @@ function validate212( params: { type: 'object' }, message: 'must be object', schema: - schema197.allOf[1].properties.devices.items + schema200.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema197.allOf[1].properties.devices.items + schema200.allOf[1].properties.devices.items .properties.config, data: data4, }, @@ -162653,15 +163797,15 @@ function validate212( } } } else { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema197.allOf[1].properties.devices.items.type, - parentSchema: schema197.allOf[1].properties.devices.items, + schema: schema200.allOf[1].properties.devices.items.type, + parentSchema: schema200.allOf[1].properties.devices.items, data: data2, }, ]; @@ -162676,15 +163820,15 @@ function validate212( } } } else { - validate212.errors = [ + validate215.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema197.allOf[1].properties.devices.type, - parentSchema: schema197.allOf[1].properties.devices, + schema: schema200.allOf[1].properties.devices.type, + parentSchema: schema200.allOf[1].properties.devices, data: data1, }, ]; @@ -162694,15 +163838,15 @@ function validate212( } } } else { - validate212.errors = [ + validate215.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema197.allOf[1].type, - parentSchema: schema197.allOf[1], + schema: schema200.allOf[1].type, + parentSchema: schema200.allOf[1], data, }, ]; @@ -162711,11 +163855,11 @@ function validate212( } var valid0 = _errs4 === errors; } - validate212.errors = vErrors; + validate215.errors = vErrors; return errors === 0; } -exports.validateGetPeerconnectionResponse200Response = validate213; -const schema198 = { +exports.validateGetPeerconnectionResponse200Response = validate216; +const schema201 = { title: 'Peerconnection', allOf: [ { @@ -162789,7 +163933,7 @@ const schema198 = { '#/paths//peerconnections/{peerconnection_id}/get/responses/200/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate213( +function validate216( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -162804,15 +163948,15 @@ function validate213( (data.type === undefined && (missing0 = 'type')) || (data.status === undefined && (missing0 = 'status')) ) { - validate213.errors = [ + validate216.errors = [ { instancePath, schemaPath: '#/allOf/0/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema198.allOf[0].required, - parentSchema: schema198.allOf[0], + schema: schema201.allOf[0].required, + parentSchema: schema201.allOf[0], data, }, ]; @@ -162825,7 +163969,7 @@ function validate213( if (errors === _errs2) { if (typeof data0 === 'string') { if (!formats0(data0)) { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/format', @@ -162833,22 +163977,22 @@ function validate213( params: { format: 'uri' }, message: 'must match format "' + 'uri' + '"', schema: 'uri', - parentSchema: schema198.allOf[0].properties.url, + parentSchema: schema201.allOf[0].properties.url, data: data0, }, ]; return false; } } else { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/url', schemaPath: '#/allOf/0/properties/url/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema198.allOf[0].properties.url.type, - parentSchema: schema198.allOf[0].properties.url, + schema: schema201.allOf[0].properties.url.type, + parentSchema: schema201.allOf[0].properties.url, data: data0, }, ]; @@ -162865,30 +164009,30 @@ function validate213( let data1 = data.type; const _errs4 = errors; if (typeof data1 !== 'string') { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema198.allOf[0].properties.type.type, - parentSchema: schema198.allOf[0].properties.type, + schema: schema201.allOf[0].properties.type.type, + parentSchema: schema201.allOf[0].properties.type, data: data1, }, ]; return false; } if (!(data1 === 'local' || data1 === 'webrtc')) { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/type', schemaPath: '#/allOf/0/properties/type/enum', keyword: 'enum', - params: { allowedValues: schema198.allOf[0].properties.type.enum }, + params: { allowedValues: schema201.allOf[0].properties.type.enum }, message: 'must be equal to one of the allowed values', - schema: schema198.allOf[0].properties.type.enum, - parentSchema: schema198.allOf[0].properties.type, + schema: schema201.allOf[0].properties.type.enum, + parentSchema: schema201.allOf[0].properties.type, data: data1, }, ]; @@ -162903,15 +164047,15 @@ function validate213( let data2 = data.status; const _errs6 = errors; if (typeof data2 !== 'string') { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema198.allOf[0].properties.status.type, - parentSchema: schema198.allOf[0].properties.status, + schema: schema201.allOf[0].properties.status.type, + parentSchema: schema201.allOf[0].properties.status, data: data2, }, ]; @@ -162927,15 +164071,15 @@ function validate213( data2 === 'closed' ) ) { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/allOf/0/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema198.allOf[0].properties.status.enum }, + params: { allowedValues: schema201.allOf[0].properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema198.allOf[0].properties.status.enum, - parentSchema: schema198.allOf[0].properties.status, + schema: schema201.allOf[0].properties.status.enum, + parentSchema: schema201.allOf[0].properties.status, data: data2, }, ]; @@ -162949,15 +164093,15 @@ function validate213( } } } else { - validate213.errors = [ + validate216.errors = [ { instancePath, schemaPath: '#/allOf/0/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema198.allOf[0].type, - parentSchema: schema198.allOf[0], + schema: schema201.allOf[0].type, + parentSchema: schema201.allOf[0], data, }, ]; @@ -162971,15 +164115,15 @@ function validate213( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing1; if (data.devices === undefined && (missing1 = 'devices')) { - validate213.errors = [ + validate216.errors = [ { instancePath, schemaPath: '#/allOf/1/required', keyword: 'required', params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'", - schema: schema198.allOf[1].required, - parentSchema: schema198.allOf[1], + schema: schema201.allOf[1].required, + parentSchema: schema201.allOf[1], data, }, ]; @@ -162991,7 +164135,7 @@ function validate213( if (errors === _errs10) { if (Array.isArray(data3)) { if (data3.length > 2) { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/maxItems', @@ -162999,14 +164143,14 @@ function validate213( params: { limit: 2 }, message: 'must NOT have more than 2 items', schema: 2, - parentSchema: schema198.allOf[1].properties.devices, + parentSchema: schema201.allOf[1].properties.devices, data: data3, }, ]; return false; } else { if (data3.length < 2) { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/minItems', @@ -163014,7 +164158,7 @@ function validate213( params: { limit: 2 }, message: 'must NOT have fewer than 2 items', schema: 2, - parentSchema: schema198.allOf[1].properties.devices, + parentSchema: schema201.allOf[1].properties.devices, data: data3, }, ]; @@ -163029,7 +164173,7 @@ function validate213( if (data4 && typeof data4 == 'object' && !Array.isArray(data4)) { let missing2; if (data4.url === undefined && (missing2 = 'url')) { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/required', @@ -163037,8 +164181,8 @@ function validate213( params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'", schema: - schema198.allOf[1].properties.devices.items.required, - parentSchema: schema198.allOf[1].properties.devices.items, + schema201.allOf[1].properties.devices.items.required, + parentSchema: schema201.allOf[1].properties.devices.items, data: data4, }, ]; @@ -163051,7 +164195,7 @@ function validate213( if (errors === _errs14) { if (typeof data5 === 'string') { if (!formats0(data5)) { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -163062,7 +164206,7 @@ function validate213( message: 'must match format "' + 'uri' + '"', schema: 'uri', parentSchema: - schema198.allOf[1].properties.devices.items + schema201.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -163070,7 +164214,7 @@ function validate213( return false; } } else { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/url', @@ -163080,10 +164224,10 @@ function validate213( params: { type: 'string' }, message: 'must be string', schema: - schema198.allOf[1].properties.devices.items + schema201.allOf[1].properties.devices.items .properties.url.type, parentSchema: - schema198.allOf[1].properties.devices.items + schema201.allOf[1].properties.devices.items .properties.url, data: data5, }, @@ -163131,7 +164275,7 @@ function validate213( (data8.remoteServiceId === undefined && (missing3 = 'remoteServiceId')) ) { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + @@ -163150,12 +164294,12 @@ function validate213( missing3 + "'", schema: - schema198.allOf[1].properties + schema201.allOf[1].properties .devices.items.properties.config .properties.services.items .required, parentSchema: - schema198.allOf[1].properties + schema201.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -163170,7 +164314,7 @@ function validate213( if (errors === _errs23) { if (typeof data9 === 'string') { if (!formats0(data9)) { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + @@ -163189,7 +164333,7 @@ function validate213( '"', schema: 'uri', parentSchema: - schema198.allOf[1] + schema201.allOf[1] .properties.devices .items.properties .config.properties @@ -163202,7 +164346,7 @@ function validate213( return false; } } else { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + @@ -163217,14 +164361,14 @@ function validate213( params: { type: 'string' }, message: 'must be string', schema: - schema198.allOf[1] + schema201.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .serviceType.type, parentSchema: - schema198.allOf[1] + schema201.allOf[1] .properties.devices .items.properties.config .properties.services @@ -163246,7 +164390,7 @@ function validate213( let data10 = data8.serviceId; const _errs25 = errors; if (typeof data10 !== 'string') { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + @@ -163261,14 +164405,14 @@ function validate213( params: { type: 'string' }, message: 'must be string', schema: - schema198.allOf[1] + schema201.allOf[1] .properties.devices.items .properties.config .properties.services.items .properties.serviceId .type, parentSchema: - schema198.allOf[1] + schema201.allOf[1] .properties.devices.items .properties.config .properties.services.items @@ -163291,7 +164435,7 @@ function validate213( data8.remoteServiceId; const _errs27 = errors; if (typeof data11 !== 'string') { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + @@ -163306,14 +164450,14 @@ function validate213( params: { type: 'string' }, message: 'must be string', schema: - schema198.allOf[1] + schema201.allOf[1] .properties.devices .items.properties.config .properties.services .items.properties .remoteServiceId.type, parentSchema: - schema198.allOf[1] + schema201.allOf[1] .properties.devices .items.properties.config .properties.services @@ -163332,7 +164476,7 @@ function validate213( } } } else { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + @@ -163346,11 +164490,11 @@ function validate213( params: { type: 'object' }, message: 'must be object', schema: - schema198.allOf[1].properties + schema201.allOf[1].properties .devices.items.properties.config .properties.services.items.type, parentSchema: - schema198.allOf[1].properties + schema201.allOf[1].properties .devices.items.properties.config .properties.services.items, data: data8, @@ -163365,7 +164509,7 @@ function validate213( } } } else { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + @@ -163378,11 +164522,11 @@ function validate213( params: { type: 'array' }, message: 'must be array', schema: - schema198.allOf[1].properties.devices + schema201.allOf[1].properties.devices .items.properties.config.properties .services.type, parentSchema: - schema198.allOf[1].properties.devices + schema201.allOf[1].properties.devices .items.properties.config.properties .services, data: data7, @@ -163393,7 +164537,7 @@ function validate213( } } } else { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/devices/' + i0 + '/config', @@ -163403,10 +164547,10 @@ function validate213( params: { type: 'object' }, message: 'must be object', schema: - schema198.allOf[1].properties.devices.items + schema201.allOf[1].properties.devices.items .properties.config.type, parentSchema: - schema198.allOf[1].properties.devices.items + schema201.allOf[1].properties.devices.items .properties.config, data: data6, }, @@ -163421,15 +164565,15 @@ function validate213( } } } else { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/devices/' + i0, schemaPath: '#/allOf/1/properties/devices/items/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema198.allOf[1].properties.devices.items.type, - parentSchema: schema198.allOf[1].properties.devices.items, + schema: schema201.allOf[1].properties.devices.items.type, + parentSchema: schema201.allOf[1].properties.devices.items, data: data4, }, ]; @@ -163444,15 +164588,15 @@ function validate213( } } } else { - validate213.errors = [ + validate216.errors = [ { instancePath: instancePath + '/devices', schemaPath: '#/allOf/1/properties/devices/type', keyword: 'type', params: { type: 'array' }, message: 'must be array', - schema: schema198.allOf[1].properties.devices.type, - parentSchema: schema198.allOf[1].properties.devices, + schema: schema201.allOf[1].properties.devices.type, + parentSchema: schema201.allOf[1].properties.devices, data: data3, }, ]; @@ -163462,15 +164606,15 @@ function validate213( } } } else { - validate213.errors = [ + validate216.errors = [ { instancePath, schemaPath: '#/allOf/1/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema198.allOf[1].type, - parentSchema: schema198.allOf[1], + schema: schema201.allOf[1].type, + parentSchema: schema201.allOf[1], data, }, ]; @@ -163479,11 +164623,11 @@ function validate213( } var valid0 = _errs8 === errors; } - validate213.errors = vErrors; + validate216.errors = vErrors; return errors === 0; } -exports.validatePatchPeerconnectionDeviceStatusBodyRequest = validate214; -const schema199 = { +exports.validatePatchPeerconnectionDeviceStatusBodyRequest = validate217; +const schema202 = { type: 'object', properties: { status: { @@ -163500,7 +164644,7 @@ const schema199 = { '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema_request', 'x-schema-type': 'request', }; -function validate214( +function validate217( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -163510,15 +164654,15 @@ function validate214( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.status === undefined && (missing0 = 'status')) { - validate214.errors = [ + validate217.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema199.required, - parentSchema: schema199, + schema: schema202.required, + parentSchema: schema202, data, }, ]; @@ -163527,15 +164671,15 @@ function validate214( if (data.status !== undefined) { let data0 = data.status; if (typeof data0 !== 'string') { - validate214.errors = [ + validate217.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema199.properties.status.type, - parentSchema: schema199.properties.status, + schema: schema202.properties.status.type, + parentSchema: schema202.properties.status, data: data0, }, ]; @@ -163551,15 +164695,15 @@ function validate214( data0 === 'closed' ) ) { - validate214.errors = [ + validate217.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema199.properties.status.enum }, + params: { allowedValues: schema202.properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema199.properties.status.enum, - parentSchema: schema199.properties.status, + schema: schema202.properties.status.enum, + parentSchema: schema202.properties.status, data: data0, }, ]; @@ -163568,26 +164712,26 @@ function validate214( } } } else { - validate214.errors = [ + validate217.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema199.type, - parentSchema: schema199, + schema: schema202.type, + parentSchema: schema202, data, }, ]; return false; } } - validate214.errors = vErrors; + validate217.errors = vErrors; return errors === 0; } -exports.validatePatchPeerconnectionDeviceStatusBodyResponse = validate215; -const schema200 = { +exports.validatePatchPeerconnectionDeviceStatusBodyResponse = validate218; +const schema203 = { type: 'object', properties: { status: { @@ -163604,7 +164748,7 @@ const schema200 = { '#/paths//peerconnections/{peerconnection_id}/device_status/patch/requestBody/content/application/json/schema_response', 'x-schema-type': 'response', }; -function validate215( +function validate218( data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}, ) { @@ -163614,15 +164758,15 @@ function validate215( if (data && typeof data == 'object' && !Array.isArray(data)) { let missing0; if (data.status === undefined && (missing0 = 'status')) { - validate215.errors = [ + validate218.errors = [ { instancePath, schemaPath: '#/required', keyword: 'required', params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'", - schema: schema200.required, - parentSchema: schema200, + schema: schema203.required, + parentSchema: schema203, data, }, ]; @@ -163631,15 +164775,15 @@ function validate215( if (data.status !== undefined) { let data0 = data.status; if (typeof data0 !== 'string') { - validate215.errors = [ + validate218.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/properties/status/type', keyword: 'type', params: { type: 'string' }, message: 'must be string', - schema: schema200.properties.status.type, - parentSchema: schema200.properties.status, + schema: schema203.properties.status.type, + parentSchema: schema203.properties.status, data: data0, }, ]; @@ -163655,15 +164799,15 @@ function validate215( data0 === 'closed' ) ) { - validate215.errors = [ + validate218.errors = [ { instancePath: instancePath + '/status', schemaPath: '#/properties/status/enum', keyword: 'enum', - params: { allowedValues: schema200.properties.status.enum }, + params: { allowedValues: schema203.properties.status.enum }, message: 'must be equal to one of the allowed values', - schema: schema200.properties.status.enum, - parentSchema: schema200.properties.status, + schema: schema203.properties.status.enum, + parentSchema: schema203.properties.status, data: data0, }, ]; @@ -163672,21 +164816,21 @@ function validate215( } } } else { - validate215.errors = [ + validate218.errors = [ { instancePath, schemaPath: '#/type', keyword: 'type', params: { type: 'object' }, message: 'must be object', - schema: schema200.type, - parentSchema: schema200, + schema: schema203.type, + parentSchema: schema203, data, }, ]; return false; } } - validate215.errors = vErrors; + validate218.errors = vErrors; return errors === 0; } diff --git a/services/booking/src/common/src/clients/device/basicValidation.d.cts b/services/booking/src/common/src/clients/device/basicValidation.d.cts index ffc3951d..0b0f3281 100644 --- a/services/booking/src/common/src/clients/device/basicValidation.d.cts +++ b/services/booking/src/common/src/clients/device/basicValidation.d.cts @@ -122,6 +122,10 @@ export declare function validateExperimentStatusChangedMessage< T extends 'request' | 'response' | 'all', >(object: unknown): ExperimentStatusChangedMessage; +export declare function validateLoggingMessage( + object: unknown, +): LoggingMessage; + export declare function validateConnectionStatus< T extends 'request' | 'response' | 'all', >(object: unknown): ConnectionStatus; @@ -506,6 +510,14 @@ export declare function validateExperimentStatusChangedMessageResponse< T extends 'request' | 'response' | 'all', >(object: unknown): ExperimentStatusChangedMessageResponse; +export declare function validateLoggingMessageRequest< + T extends 'request' | 'response' | 'all', +>(object: unknown): LoggingMessageRequest; + +export declare function validateLoggingMessageResponse< + T extends 'request' | 'response' | 'all', +>(object: unknown): LoggingMessageResponse; + export declare function validateConnectionStatusRequest< T extends 'request' | 'response' | 'all', >(object: unknown): ConnectionStatusRequest; diff --git a/services/booking/src/common/src/clients/device/client.ts b/services/booking/src/common/src/clients/device/client.ts index d7eac077..46a0ace9 100644 --- a/services/booking/src/common/src/clients/device/client.ts +++ b/services/booking/src/common/src/clients/device/client.ts @@ -108,7 +108,7 @@ function isValidHttpUrl(string: string) { * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; + const parameterRegex = '([^/]+)'; const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); const matches = url.match(regex); @@ -1077,7 +1077,8 @@ export class Client { | Types.ClosePeerconnectionMessage<'request'> | Types.SignalingMessage<'request'> | Types.ConfigurationMessage<'request'> - | Types.ExperimentStatusChangedMessage<'request'>, + | Types.ExperimentStatusChangedMessage<'request'> + | Types.LoggingMessage<'request'>, options?: { headers?: [string, string][]; }, diff --git a/services/booking/src/common/src/clients/device/signatures.ts b/services/booking/src/common/src/clients/device/signatures.ts index 259b337f..0a17a42c 100644 --- a/services/booking/src/common/src/clients/device/signatures.ts +++ b/services/booking/src/common/src/clients/device/signatures.ts @@ -1097,7 +1097,8 @@ export type SendSignalingMessageBody = | Types.ClosePeerconnectionMessage<'request'> | Types.SignalingMessage<'request'> | Types.ConfigurationMessage<'request'> - | Types.ExperimentStatusChangedMessage<'request'>; + | Types.ExperimentStatusChangedMessage<'request'> + | Types.LoggingMessage<'request'>; /** * Typing for all possible responses to the request made by sendSignalingMessage() diff --git a/services/booking/src/common/src/clients/device/types.ts b/services/booking/src/common/src/clients/device/types.ts index b309e029..9c244751 100644 --- a/services/booking/src/common/src/clients/device/types.ts +++ b/services/booking/src/common/src/clients/device/types.ts @@ -3090,6 +3090,42 @@ export type ExperimentStatusChangedMessage< } : never; +export type LoggingMessage = + T extends 'all' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'logging'; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'logging'; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'logging'; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + /** * The status of the peerconnection. */ @@ -3756,6 +3792,20 @@ export function isExperimentStatusChangedMessage< } } +export function isLoggingMessage( + obj: unknown, + type: 'request' | 'response' | 'all' | T = 'all', +): obj is LoggingMessage { + switch (type) { + case 'request': + return BasicValidation.validateLoggingMessageRequest(obj); + case 'response': + return BasicValidation.validateLoggingMessageResponse(obj); + default: + return BasicValidation.validateLoggingMessage(obj); + } +} + export function isPeerconnection( obj: unknown, type: 'request' | 'response' | 'all' | T = 'all', diff --git a/services/booking/src/common/src/clients/schedule-service/client.ts b/services/booking/src/common/src/clients/schedule-service/client.ts index 1fb66831..f88d6c98 100644 --- a/services/booking/src/common/src/clients/schedule-service/client.ts +++ b/services/booking/src/common/src/clients/schedule-service/client.ts @@ -80,59 +80,6 @@ async function parseResponse(response: Response): Promise { } } -/** - * This function checks if a string is a valid http url. - * @param string The string to be checked. - * @returns True if the string is a valid http url. - */ -function isValidHttpUrl(string: string) { - let url; - - try { - url = new URL(string); - } catch (_) { - return false; - } - - return url.protocol === 'http:' || url.protocol === 'https:'; -} - -/** - * This function takes an url and a pattern for the requested endpoint and parses the contained path parameters. - * @param url The url to be parsed. - * @param endpoint Pattern of the requested endpoint. - * @throws {InvalidUrlError} Thrown if the provided url does not end with the provided endpoint. - * @returns An array containing all parsed path parameters in order of appearance. - * @example - * // returns ["username", "role_name"] - * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") - */ -function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; - const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); - const matches = url.match(regex); - - if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint'); - - return matches.slice(1); -} - -/** - * This function validates a given http url and parses its path parameters. - * @param url The url to be validated. - * @param endpoint Pattern of the requested endpoint. - * @throws {InvalidUrlError} Thrown if the validation of the provided url fails. - * @returns An array containing all parsed path parameters in order of appearance (see {@link parsePathParameters}). - * @example - * // returns ["username", "role_name"] - * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") - */ -function validateUrl(url: string, endpoint: string): string[] { - if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); - return parsePathParameters(url, endpoint); -} - /** * This function appends a given endpoint to an url. * @param url The url to append the endpoint to. diff --git a/services/booking/src/device-reservation/package-lock.json b/services/booking/src/device-reservation/package-lock.json index 21cbcb5d..a91fe5b1 100644 --- a/services/booking/src/device-reservation/package-lock.json +++ b/services/booking/src/device-reservation/package-lock.json @@ -16,7 +16,7 @@ "async-mutex": "^0.5.0", "dayjs": "^1.11.5", "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "typescript": "^5.5.4" }, "bin": { "crosslab-device-reservation": "app/index.js" @@ -3351,9 +3351,10 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/services/booking/src/device-reservation/scripts/test.sh b/services/booking/src/device-reservation/scripts/test.sh index 2e5b18b7..3b22f459 100755 --- a/services/booking/src/device-reservation/scripts/test.sh +++ b/services/booking/src/device-reservation/scripts/test.sh @@ -1,4 +1,21 @@ #!/bin/sh +sudo service rabbitmq-server start +sudo service mariadb start +sudo mysql -e "DROP DATABASE IF EXISTS unittest;" +sudo mysql -e "CREATE DATABASE unittest DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;" +sudo mysql -e "DROP USER IF EXISTS 'test'@localhost;" +sudo mysql -e "CREATE USER 'test'@localhost IDENTIFIED BY 'test';" +sudo mysql -e "GRANT ALL PRIVILEGES ON unittest.* to 'test'@localhost;" +sudo mysql -e "FLUSH PRIVILEGES;" + npm ci -npm test \ No newline at end of file +npm test +result=$? + +sudo mysql -e "DROP USER 'test'@localhost;" +sudo mysql -e "DROP DATABASE unittest;" +sudo service mariadb stop +sudo service rabbitmq-server stop + +exit $result \ No newline at end of file diff --git a/services/booking/src/schedule-service/package-lock.json b/services/booking/src/schedule-service/package-lock.json index 333cb27a..2a4256f7 100644 --- a/services/booking/src/schedule-service/package-lock.json +++ b/services/booking/src/schedule-service/package-lock.json @@ -22,8 +22,8 @@ "dayjs": "^1.11.5", "express": "^4.18.1", "lodash": "^4.17.21", - "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "mysql2": "^3.11.0", + "typescript": "^5.5.4" }, "bin": { "crosslab-schedule-service": "app/index.js" @@ -41,20 +41,21 @@ "name": "@cross-lab-project/api-client", "license": "ISC", "dependencies": { - "ajv-formats": "^2.1.1", + "ajv-formats": "^3.0.1", "cross-fetch": "^4.0.0" }, "devDependencies": { "@cross-lab-project/codegen-typescript-addon": "file:../../../helper/crosslab-typescript-addon", "@cross-lab-project/openapi-codegen": "file:../../../helper/openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.34.0", - "prettier": "^3.0.3", - "typedoc": "^0.25.1", - "typescript": "^5.2.2" + "@eslint/js": "^9.9.0", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "@types/eslint__js": "^8.42.3", + "@types/node": "^22.1.0", + "eslint": "^9.8.0", + "prettier": "^3.3.3", + "typedoc": "^0.26.5", + "typescript": "^5.5.4", + "typescript-eslint": "^8.1.0" } }, "../../../../helper/crosslab-typescript-addon": { @@ -66,23 +67,24 @@ }, "devDependencies": { "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", + "@eslint/js": "^9.9.0", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "@types/eslint__js": "^8.42.3", + "@types/node": "^22.1.0", + "@types/nunjucks": "^3.2.6", + "@types/seedrandom": "^3.0.8", "copyfiles": "^2.4.1", - "eslint": "^8.48.0", + "eslint": "^9.8.0", "openapi-types": "^12.1.3", - "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" + "prettier": "^3.3.3", + "tsc-watch": "^6.2.0", + "typescript": "^5.5.4", + "typescript-eslint": "^8.1.0" }, "peerDependencies": { "@cross-lab-project/openapi-codegen": "file:../openapi-codegeneration", "ajv": "^8.11.0", - "ajv-formats": "^2.1.1" + "ajv-formats": "^3.0.1" } }, "../../../../helper/openapi-codegeneration": { @@ -90,34 +92,35 @@ "license": "UNLICENSED", "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", - "ajv": "^8.12.0", - "ajv-formats": "^2.1.1", - "commander": "^11.0.0", + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", + "commander": "^12.1.0", "deterministic-json-schema-faker": "^0.5.0-rcv.46", - "glob": "^10.3.4", + "glob": "^11.0.0", "json-schema-merge-allof": "^0.8.1", - "json-schema-to-typescript": "^13.1.1", + "json-schema-to-typescript": "^15.0.0", "nunjucks": "^3.2.4", - "quicktype-core": "^23.0.75", + "quicktype-core": "^23.0.170", "seedrandom": "^3.0.5", "tiny-typed-emitter": "^2.1.0", - "yaml": "^2.3.2" + "yaml": "^2.5.0" }, "bin": { "openapi-codegen": "lib/cjs/index.js" }, "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/node": "^20.5.9", - "@types/nunjucks": "^3.2.3", - "@types/seedrandom": "^3.0.5", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", + "@eslint/js": "^9.9.0", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "@types/eslint__js": "^8.42.3", + "@types/node": "^22.1.0", + "@types/nunjucks": "^3.2.6", + "@types/seedrandom": "^3.0.8", + "eslint": "^9.8.0", "openapi-types": "^12.1.3", "prettier": "^3.0.3", - "tsc-watch": "^6.0.4", - "typescript": "^5.2.2" + "tsc-watch": "^6.2.0", + "typescript": "^5.5.4", + "typescript-eslint": "^8.1.0" } }, "../../../common": { @@ -126,27 +129,28 @@ "dependencies": { "express": "^4.18.1", "express-winston": "^4.2.0", - "fetch-retry": "^5.0.6", - "jose": "^4.14.6", + "fetch-retry": "^6.0.0", + "jose": "^5.6.3", "mysql": "^2.18.1", - "sqlite3": "^5.1.6", - "typeorm": "^0.3.17", - "uuid": "^9.0.0", - "winston": "^3.10.0", - "winston-loki": "^6.0.7" + "sqlite3": "^5.1.7", + "typeorm": "^0.3.20", + "uuid": "^10.0.0", + "winston": "^3.14.1", + "winston-loki": "^6.1.2" }, "devDependencies": { + "@eslint/js": "^9.9.0", "@trivago/prettier-plugin-sort-imports": "^4.2.0", - "@types/express": "^4.17.13", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.9", - "@types/uuid": "^9.0.3", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", - "mocha": "^10.2.0", - "prettier": "^3.0.3", - "typescript": "^5.2.2" + "@types/eslint__js": "^8.42.3", + "@types/express": "^4.17.21", + "@types/mocha": "^10.0.7", + "@types/node": "^22.1.0", + "@types/uuid": "^10.0.0", + "eslint": "^9.8.0", + "mocha": "^10.7.0", + "prettier": "^3.3.3", + "typescript": "^5.5.4", + "typescript-eslint": "^8.1.0" } }, "../common": { @@ -182,7 +186,7 @@ "dayjs": "^1.11.5", "express": "^4.18.1", "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "typescript": "^5.5.4" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.2.0", @@ -902,6 +906,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", + "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -2605,12 +2618,19 @@ "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, - "node_modules/lru-cache": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", - "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", + "node_modules/lru.min": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.1.tgz", + "integrity": "sha512-FbAj6lXil6t8z4z3j0E5mfRlPzxkySotzUHwRXjlpRh10vc6AI6WN62ehZj82VG7M20rqogJ0GLwar2Xa05a8Q==", + "license": "MIT", "engines": { - "node": ">=16.14" + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" } }, "node_modules/make-dir": { @@ -2853,15 +2873,17 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mysql2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.1.tgz", - "integrity": "sha512-6zo1T3GILsXMCex3YEu7hCz2OXLUarxFsxvFcUHWMpkPtmZLeTTWgRdc1gWyNJiYt6AxITmIf9bZDRy/jAfWew==", + "version": "3.11.3", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.11.3.tgz", + "integrity": "sha512-Qpu2ADfbKzyLdwC/5d4W7+5Yz7yBzCU05YWt5npWzACST37wJsB23wgOSo00qi043urkiRwXtEvJc9UnuLX/MQ==", + "license": "MIT", "dependencies": { + "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.6.3", "long": "^5.2.1", - "lru-cache": "^8.0.0", + "lru.min": "^1.0.0", "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", "sqlstring": "^2.3.2" @@ -4055,9 +4077,10 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/services/booking/src/schedule-service/scripts/test.sh b/services/booking/src/schedule-service/scripts/test.sh index 2e5b18b7..3b22f459 100755 --- a/services/booking/src/schedule-service/scripts/test.sh +++ b/services/booking/src/schedule-service/scripts/test.sh @@ -1,4 +1,21 @@ #!/bin/sh +sudo service rabbitmq-server start +sudo service mariadb start +sudo mysql -e "DROP DATABASE IF EXISTS unittest;" +sudo mysql -e "CREATE DATABASE unittest DEFAULT CHARSET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;" +sudo mysql -e "DROP USER IF EXISTS 'test'@localhost;" +sudo mysql -e "CREATE USER 'test'@localhost IDENTIFIED BY 'test';" +sudo mysql -e "GRANT ALL PRIVILEGES ON unittest.* to 'test'@localhost;" +sudo mysql -e "FLUSH PRIVILEGES;" + npm ci -npm test \ No newline at end of file +npm test +result=$? + +sudo mysql -e "DROP USER 'test'@localhost;" +sudo mysql -e "DROP DATABASE unittest;" +sudo service mariadb stop +sudo service rabbitmq-server stop + +exit $result \ No newline at end of file diff --git a/services/booking/src/schedule-service/src/config.ts b/services/booking/src/schedule-service/src/config.ts index 9b71859b..0a070570 100644 --- a/services/booking/src/schedule-service/src/config.ts +++ b/services/booking/src/schedule-service/src/config.ts @@ -1,4 +1,4 @@ -import { baseConfig, die } from '@crosslab/booking-service-common'; +import { baseConfig } from '@crosslab/booking-service-common'; const PORT = parseInt(process.env.PORT ?? '3006'); const DEFAULT_BASE_URL = 'http://localhost:' + PORT; diff --git a/services/booking/src/schedule-service/src/operations/index.ts b/services/booking/src/schedule-service/src/operations/index.ts index abfb5263..2563aad6 100644 --- a/services/booking/src/schedule-service/src/operations/index.ts +++ b/services/booking/src/schedule-service/src/operations/index.ts @@ -349,7 +349,7 @@ export async function getTimetables( try { await db.connect(); - let [rows, fields]: [any, any] = await db.execute( + let [rows, _fields]: [any, any] = await db.execute( 'SELECT start, end FROM reservation WHERE `device`=? AND ((`start` < ? AND `end` > ?) OR (`start` < ? AND `end` > ?) OR (`start` > ? AND `end` < ?) OR (`start` < ? AND `end` > ?)) ORDER BY `start` ASC', [ device.toString(), diff --git a/services/booking/src/test_common/package-lock.json b/services/booking/src/test_common/package-lock.json index c4243d1d..9d0cc006 100644 --- a/services/booking/src/test_common/package-lock.json +++ b/services/booking/src/test_common/package-lock.json @@ -15,7 +15,7 @@ "dayjs": "^1.11.5", "express": "^4.18.1", "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "typescript": "^5.5.4" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.2.0", @@ -59,7 +59,7 @@ "async-mutex": "^0.5.0", "dayjs": "^1.11.5", "mysql2": "^3.6.0", - "typescript": "^5.2.2" + "typescript": "^5.5.4" }, "bin": { "crosslab-device-reservation": "app/index.js" @@ -1614,9 +1614,10 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/services/device/src/clients/authentication/client.ts b/services/device/src/clients/authentication/client.ts index 3d231616..71677b02 100644 --- a/services/device/src/clients/authentication/client.ts +++ b/services/device/src/clients/authentication/client.ts @@ -108,7 +108,7 @@ function isValidHttpUrl(string: string) { * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; + const parameterRegex = '([^/]+)'; const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); const matches = url.match(regex); @@ -524,7 +524,7 @@ export class Client { ): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [user_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}'); + const [user_id] = validateUrl(new URL(url).toString(), '/users/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -600,7 +600,7 @@ export class Client { ): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [user_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}'); + const [user_id] = validateUrl(new URL(url).toString(), '/users/{}'); console.log('trying to fetch url:', url); const body = user; @@ -676,7 +676,7 @@ export class Client { ): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [user_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}'); + const [user_id] = validateUrl(new URL(url).toString(), '/users/{}'); console.log('trying to fetch url:', url); const parameters = { diff --git a/services/device/src/clients/authentication/requestValidation.ts b/services/device/src/clients/authentication/requestValidation.ts index baf65c14..583ec6dd 100644 --- a/services/device/src/clients/authentication/requestValidation.ts +++ b/services/device/src/clients/authentication/requestValidation.ts @@ -98,9 +98,8 @@ export function validateAuthOutput( return true; } - ( - validateAuthOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateAuthOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -158,9 +157,8 @@ export function validateLoginOutput( return true; } - ( - validateLoginOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateLoginOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -211,9 +209,8 @@ export function validateLogoutOutput( return true; } - ( - validateLogoutOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateLogoutOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -280,9 +277,8 @@ export function validateListUsersOutput( return true; } - ( - validateListUsersOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateListUsersOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -340,9 +336,8 @@ export function validateCreateUserOutput( return true; } - ( - validateCreateUserOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateCreateUserOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -404,9 +399,8 @@ export function validateGetUserOutput( return true; } - ( - validateGetUserOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateGetUserOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -478,9 +472,8 @@ export function validateUpdateUserOutput( return true; } - ( - validateUpdateUserOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateUpdateUserOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -535,9 +528,8 @@ export function validateDeleteUserOutput( return true; } - ( - validateDeleteUserOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateDeleteUserOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -588,9 +580,8 @@ export function validateGetIdentityOutput( return true; } - ( - validateGetIdentityOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateGetIdentityOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -652,9 +643,8 @@ export function validateUpdateIdentityOutput( return true; } - ( - validateUpdateIdentityOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateUpdateIdentityOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -692,9 +682,8 @@ export function validateCreateTokenOutput( return true; } - ( - validateCreateTokenOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateCreateTokenOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } diff --git a/services/device/src/clients/authentication/types.ts b/services/device/src/clients/authentication/types.ts index 7e4b7c7c..b42e9b26 100644 --- a/services/device/src/clients/authentication/types.ts +++ b/services/device/src/clients/authentication/types.ts @@ -76,8 +76,8 @@ export type SizedTuple< ? _SizedTuple> : TupleObject> & T[] : MAX extends number - ? _SizedTuple, true> - : T[]; + ? _SizedTuple, true> + : T[]; type _SizedTuple = ARR extends [ infer HEAD extends number, @@ -151,30 +151,30 @@ export type Credentials = [k: string]: unknown; } : T extends 'request' - ? { - /** - * Username of the user. - */ - username: string; - /** - * Password of the user. - */ - password: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Username of the user. - */ - username: string; - /** - * Password of the user. - */ - password: string; - [k: string]: unknown; - } - : never; + ? { + /** + * Username of the user. + */ + username: string; + /** + * Password of the user. + */ + password: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Username of the user. + */ + username: string; + /** + * Password of the user. + */ + password: string; + [k: string]: unknown; + } + : never; /** * Authentication method. @@ -182,10 +182,10 @@ export type Credentials = export type AuthMethod = T extends 'all' ? 'tui' | 'local' : T extends 'request' - ? 'tui' | 'local' - : T extends 'response' - ? 'tui' | 'local' - : never; + ? 'tui' | 'local' + : T extends 'response' + ? 'tui' | 'local' + : never; export type User = T extends 'all' ? { @@ -197,21 +197,21 @@ export type User = T extends ' [k: string]: unknown; } : T extends 'request' - ? { - username?: string; - password?: string; - admin?: boolean; - [k: string]: unknown; - } - : T extends 'response' - ? { - url?: string; - id?: string; - username?: string; - admin?: boolean; - [k: string]: unknown; - } - : never; + ? { + username?: string; + password?: string; + admin?: boolean; + [k: string]: unknown; + } + : T extends 'response' + ? { + url?: string; + id?: string; + username?: string; + admin?: boolean; + [k: string]: unknown; + } + : never; export function isUser( obj: unknown, diff --git a/services/device/src/clients/device/client.ts b/services/device/src/clients/device/client.ts index 92fd6fe6..46a0ace9 100644 --- a/services/device/src/clients/device/client.ts +++ b/services/device/src/clients/device/client.ts @@ -108,7 +108,7 @@ function isValidHttpUrl(string: string) { * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; + const parameterRegex = '([^/]+)'; const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); const matches = url.match(regex); @@ -395,7 +395,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -491,7 +491,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); console.log('trying to fetch url:', url); const body = deviceUpdate; @@ -577,7 +577,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -658,7 +658,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -751,11 +751,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/availability', - ); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/availability'); console.log('trying to fetch url:', url); const parameters = { @@ -845,11 +841,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/availability', - ); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/availability'); console.log('trying to fetch url:', url); const parameters = { @@ -927,11 +919,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/availability', - ); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/availability'); console.log('trying to fetch url:', url); const body = availabilityRules; @@ -1011,11 +999,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/websocket'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/websocket', - ); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/websocket'); console.log('trying to fetch url:', url); const parameters = { @@ -1101,11 +1085,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/signaling'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/signaling', - ); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/signaling'); console.log('trying to fetch url:', url); const body = sigMessage; @@ -1355,7 +1335,6 @@ export class Client { if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); const [peerconnection_id] = validateUrl( new URL(url).toString(), - this.baseUrl, '/peerconnections/{}', ); console.log('trying to fetch url:', url); @@ -1437,7 +1416,6 @@ export class Client { if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); const [peerconnection_id] = validateUrl( new URL(url).toString(), - this.baseUrl, '/peerconnections/{}', ); console.log('trying to fetch url:', url); @@ -1528,7 +1506,6 @@ export class Client { if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); const [peerconnection_id] = validateUrl( new URL(url).toString(), - this.baseUrl, '/peerconnections/{}/device_status', ); console.log('trying to fetch url:', url); diff --git a/services/device/src/clients/device/requestValidation.ts b/services/device/src/clients/device/requestValidation.ts index 0eaa0fb8..13992cce 100644 --- a/services/device/src/clients/device/requestValidation.ts +++ b/services/device/src/clients/device/requestValidation.ts @@ -53,9 +53,8 @@ export function validateListDevicesOutput( return true; } - ( - validateListDevicesOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateListDevicesOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -132,9 +131,8 @@ export function validateCreateDeviceOutput( return true; } - ( - validateCreateDeviceOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateCreateDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -205,9 +203,8 @@ export function validateGetDeviceOutput( return true; } - ( - validateGetDeviceOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateGetDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -292,9 +289,8 @@ export function validateUpdateDeviceOutput( return true; } - ( - validateUpdateDeviceOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateUpdateDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -349,9 +345,8 @@ export function validateDeleteDeviceOutput( return true; } - ( - validateDeleteDeviceOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateDeleteDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -424,9 +419,8 @@ export function validateInstantiateDeviceOutput( return true; } - ( - validateInstantiateDeviceOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateInstantiateDeviceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -510,9 +504,8 @@ export function validateGetDeviceAvailabilityOutput( return true; } - ( - validateGetDeviceAvailabilityOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateGetDeviceAvailabilityOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -569,9 +562,8 @@ export function validateDeleteDeviceAvailabilityRulesOutput( return true; } - ( - validateDeleteDeviceAvailabilityRulesOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateDeleteDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -651,9 +643,8 @@ export function validateAddDeviceAvailabilityRulesOutput( return true; } - ( - validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateAddDeviceAvailabilityRulesOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -717,9 +708,8 @@ export function validateCreateWebsocketTokenOutput( return true; } - ( - validateCreateWebsocketTokenOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateCreateWebsocketTokenOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -784,9 +774,8 @@ export function validateSendSignalingMessageOutput( return true; } - ( - validateSendSignalingMessageOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateSendSignalingMessageOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -837,9 +826,8 @@ export function validateListPeerconnectionsOutput( return true; } - ( - validateListPeerconnectionsOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateListPeerconnectionsOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -936,9 +924,8 @@ export function validateCreatePeerconnectionOutput( return true; } - ( - validateCreatePeerconnectionOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateCreatePeerconnectionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -1004,9 +991,8 @@ export function validateGetPeerconnectionOutput( return true; } - ( - validateGetPeerconnectionOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateGetPeerconnectionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -1069,9 +1055,8 @@ export function validateDeletePeerconnectionOutput( return true; } - ( - validateDeletePeerconnectionOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateDeletePeerconnectionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -1144,9 +1129,8 @@ export function validatePatchPeerconnectionDeviceStatusOutput( return true; } - ( - validatePatchPeerconnectionDeviceStatusOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validatePatchPeerconnectionDeviceStatusOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } diff --git a/services/device/src/clients/device/types.ts b/services/device/src/clients/device/types.ts index 2e0e63e3..9c244751 100644 --- a/services/device/src/clients/device/types.ts +++ b/services/device/src/clients/device/types.ts @@ -76,8 +76,8 @@ export type SizedTuple< ? _SizedTuple> : TupleObject> & T[] : MAX extends number - ? _SizedTuple, true> - : T[]; + ? _SizedTuple, true> + : T[]; type _SizedTuple = ARR extends [ infer HEAD extends number, @@ -149,26 +149,26 @@ export type AuthenticationMessage = - T extends 'all' ? { - /** - * URL of the user - */ - url: string; + messageType: string; [k: string]: unknown; - } - : T extends 'request' - ? { + } & { + messageType?: 'connection-state-changed'; + connectionUrl: string; /** - * URL of the user + * The status of the peerconnection. */ - url: string; + status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; [k: string]: unknown; } : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType?: 'connection-state-changed'; + connectionUrl: string; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } + : never; + +export type UserReference = + T extends 'all' ? { /** * URL of the user @@ -238,7 +228,23 @@ export type UserReference = url: string; [k: string]: unknown; } - : never; + : T extends 'request' + ? { + /** + * URL of the user + */ + url: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the user + */ + url: string; + [k: string]: unknown; + } + : never; export type DeviceOverview = T extends 'all' @@ -274,7 +280,98 @@ export type DeviceOverview = [k: string]: unknown; } : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } + : never; + +export type ServiceDescription = + T extends 'all' + ? { + serviceType?: string; + serviceId?: string; + serviceDirection?: 'consumer' | 'producer' | 'prosumer'; + [k: string]: unknown; + } + : T extends 'request' + ? { + serviceType?: string; + serviceId?: string; + serviceDirection?: 'consumer' | 'producer' | 'prosumer'; + [k: string]: unknown; + } + : T extends 'response' + ? { + serviceType?: string; + serviceId?: string; + serviceDirection?: 'consumer' | 'producer' | 'prosumer'; + [k: string]: unknown; + } + : never; + +export type InstantiableCloudDevice = + T extends 'all' ? { + /** + * URL of the device + */ + url: string; /** * Name of the device */ @@ -294,14 +391,125 @@ export type DeviceOverview = /** * List of users who can view the device */ - viewer?: UserReference<'request'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'request'>[]; + owner?: UserReference[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription[]; + [k: string]: unknown; + } + : T extends 'request' + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type TimeSlot = T extends 'all' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + start?: string; + end?: string; [k: string]: unknown; } : T extends 'response' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } + : never; + +/** + * A list of time slots that the maintainer of the device announced it is available + * + */ +export type Availability = + T extends 'all' + ? TimeSlot[] + : T extends 'request' + ? TimeSlot<'request'>[] + : T extends 'response' + ? TimeSlot<'response'>[] + : never; + +export type ConcreteDevice = + T extends 'all' ? { /** * URL of the device @@ -326,40 +534,111 @@ export type DeviceOverview = /** * List of users who can view the device */ - viewer?: UserReference<'response'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; - } - : never; - -export type ServiceDescription = - T extends 'all' - ? { - serviceType?: string; - serviceId?: string; - serviceDirection?: 'consumer' | 'producer' | 'prosumer'; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot[]; + experiment?: string; + services?: ServiceDescription[]; [k: string]: unknown; } : T extends 'request' - ? { - serviceType?: string; - serviceId?: string; - serviceDirection?: 'consumer' | 'producer' | 'prosumer'; - [k: string]: unknown; - } - : T extends 'response' - ? { - serviceType?: string; - serviceId?: string; - serviceDirection?: 'consumer' | 'producer' | 'prosumer'; - [k: string]: unknown; - } - : never; + ? { + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot<'response'>[]; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; -export type InstantiableCloudDevice = +export type InstantiableBrowserDevice = T extends 'all' ? { /** @@ -392,45 +671,112 @@ export type InstantiableCloudDevice[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type DeviceReference = + T extends 'all' ? { /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device + * URL of the device */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'request'>[]; + url: string; [k: string]: unknown; } - : T extends 'response' + : T extends 'request' + ? { + /** + * URL of the device + */ + url: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + [k: string]: unknown; + } + : never; + +export type DeviceGroup = + T extends 'all' ? { /** * URL of the device @@ -455,681 +801,19 @@ export type InstantiableCloudDevice[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'response'>[]; + type?: 'group'; + devices: DeviceReference[]; [k: string]: unknown; } - : never; - -export type TimeSlot = T extends 'all' - ? { - start?: string; - end?: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - start?: string; - end?: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - start?: string; - end?: string; - [k: string]: unknown; - } - : never; - -/** - * A list of time slots that the maintainer of the device announced it is available - * - */ -export type Availability = - T extends 'all' - ? TimeSlot[] : T extends 'request' - ? TimeSlot<'request'>[] - : T extends 'response' - ? TimeSlot<'response'>[] - : never; - -export type ConcreteDevice = - T extends 'all' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'device'; - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean; - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot[]; - experiment?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean; - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot<'response'>[]; - experiment?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - } - : never; - -export type InstantiableBrowserDevice = - T extends 'all' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - } - : never; - -export type DeviceReference = - T extends 'all' - ? { - /** - * URL of the device - */ - url: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * URL of the device - */ - url: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - [k: string]: unknown; - } - : never; - -export type DeviceGroup = - T extends 'all' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference<'response'>[]; - [k: string]: unknown; - } - : never; - -export type Device = T extends 'all' - ? - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'device'; - /** - * If true, the device is connected to the service and can be used. - * - */ - connected?: boolean; - /** - * A list of time slots that the maintainer of the device announced it is available - * - */ - announcedAvailability?: TimeSlot[]; - experiment?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * URL of the device - */ - url: string; - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices: DeviceReference[]; - [k: string]: unknown; - }) - : T extends 'request' - ? - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ + ? { /** * Name of the device */ @@ -1159,8 +843,46 @@ export type Device = T extends type?: 'group'; devices: DeviceReference<'request'>[]; [k: string]: unknown; - }) - : T extends 'response' + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'response'>[]; + [k: string]: unknown; + } + : never; + +export type Device = T extends 'all' ? | ({ /** @@ -1186,16 +908,16 @@ export type Device = T extends /** * List of users who can view the device */ - viewer?: UserReference<'response'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'cloud instantiable'; instantiateUrl?: string; - services?: ServiceDescription<'response'>[]; + services?: ServiceDescription[]; [k: string]: unknown; }) | ({ @@ -1222,11 +944,11 @@ export type Device = T extends /** * List of users who can view the device */ - viewer?: UserReference<'response'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'device'; @@ -1239,9 +961,9 @@ export type Device = T extends * A list of time slots that the maintainer of the device announced it is available * */ - announcedAvailability?: TimeSlot<'response'>[]; + announcedAvailability?: TimeSlot[]; experiment?: string; - services?: ServiceDescription<'response'>[]; + services?: ServiceDescription[]; [k: string]: unknown; }) | ({ @@ -1268,16 +990,16 @@ export type Device = T extends /** * List of users who can view the device */ - viewer?: UserReference<'response'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'edge instantiable'; codeUrl?: string; - services?: ServiceDescription<'response'>[]; + services?: ServiceDescription[]; [k: string]: unknown; }) | ({ @@ -1304,78 +1026,148 @@ export type Device = T extends /** * List of users who can view the device */ - viewer?: UserReference<'response'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'group'; - devices: DeviceReference<'response'>[]; + devices: DeviceReference[]; [k: string]: unknown; }) - : never; - -export type Callback = T extends 'all' - ? { - callbackType: string; - [k: string]: unknown; - } : T extends 'request' - ? { - callbackType: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - callbackType: string; - [k: string]: unknown; - } - : never; - -export type EventCallback = - T extends 'all' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } + ? + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'request'>[]; + [k: string]: unknown; + }) : T extends 'response' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } - : never; - -export type DeviceChangedEventCallback = - T extends 'all' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'device-changed'; - device: + ? | ({ /** * URL of the device @@ -1400,16 +1192,16 @@ export type DeviceChangedEventCallback[]; /** * List of users who own the device */ - owner?: UserReference[]; + owner?: UserReference<'response'>[]; [k: string]: unknown; } & { type?: 'cloud instantiable'; instantiateUrl?: string; - services?: ServiceDescription[]; + services?: ServiceDescription<'response'>[]; [k: string]: unknown; }) | ({ @@ -1436,11 +1228,11 @@ export type DeviceChangedEventCallback[]; /** * List of users who own the device */ - owner?: UserReference[]; + owner?: UserReference<'response'>[]; [k: string]: unknown; } & { type?: 'device'; @@ -1453,160 +1245,16 @@ export type DeviceChangedEventCallback[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'device'; + announcedAvailability?: TimeSlot<'response'>[]; experiment?: string; - services?: ServiceDescription<'request'>[]; + services?: ServiceDescription<'response'>[]; [k: string]: unknown; }) | ({ + /** + * URL of the device + */ + url: string; /** * Name of the device */ @@ -1626,19 +1274,23 @@ export type DeviceChangedEventCallback[]; + viewer?: UserReference<'response'>[]; /** * List of users who own the device */ - owner?: UserReference<'request'>[]; + owner?: UserReference<'response'>[]; [k: string]: unknown; } & { type?: 'edge instantiable'; codeUrl?: string; - services?: ServiceDescription<'request'>[]; + services?: ServiceDescription<'response'>[]; [k: string]: unknown; }) | ({ + /** + * URL of the device + */ + url: string; /** * Name of the device */ @@ -1658,20 +1310,68 @@ export type DeviceChangedEventCallback[]; + viewer?: UserReference<'response'>[]; /** * List of users who own the device */ - owner?: UserReference<'request'>[]; + owner?: UserReference<'response'>[]; [k: string]: unknown; } & { type?: 'group'; - devices: DeviceReference<'request'>[]; + devices: DeviceReference<'response'>[]; [k: string]: unknown; - }); + }) + : never; + +export type Callback = T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + callbackType: string; [k: string]: unknown; } : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } + : never; + +export type EventCallback = + T extends 'all' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } + : never; + +export type DeviceChangedEventCallback = + T extends 'all' ? { callbackType: string; [k: string]: unknown; @@ -1706,16 +1406,16 @@ export type DeviceChangedEventCallback[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'cloud instantiable'; instantiateUrl?: string; - services?: ServiceDescription<'response'>[]; + services?: ServiceDescription[]; [k: string]: unknown; }) | ({ @@ -1742,11 +1442,11 @@ export type DeviceChangedEventCallback[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'device'; @@ -1759,9 +1459,9 @@ export type DeviceChangedEventCallback[]; + announcedAvailability?: TimeSlot[]; experiment?: string; - services?: ServiceDescription<'response'>[]; + services?: ServiceDescription[]; [k: string]: unknown; }) | ({ @@ -1788,16 +1488,16 @@ export type DeviceChangedEventCallback[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'edge instantiable'; codeUrl?: string; - services?: ServiceDescription<'response'>[]; + services?: ServiceDescription[]; [k: string]: unknown; }) | ({ @@ -1824,20 +1524,326 @@ export type DeviceChangedEventCallback[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'group'; - devices: DeviceReference<'response'>[]; + devices: DeviceReference[]; [k: string]: unknown; }); [k: string]: unknown; } - : never; + : T extends 'request' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'device-changed'; + device: + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'request'>[]; + [k: string]: unknown; + }); + [k: string]: unknown; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'device-changed'; + device: + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + /** + * If true, the device is connected to the service and can be used. + * + */ + connected?: boolean; + /** + * A list of time slots that the maintainer of the device announced it is available + * + */ + announcedAvailability?: TimeSlot<'response'>[]; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * URL of the device + */ + url: string; + /** + * Name of the device + */ + name: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices: DeviceReference<'response'>[]; + [k: string]: unknown; + }); + [k: string]: unknown; + } + : never; export type DeviceOverviewUpdate = T extends 'all' @@ -1869,132 +1875,66 @@ export type DeviceOverviewUpdate[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } - : never; - -export type InstantiableCloudDeviceUpdate< - T extends 'request' | 'response' | 'all' = 'all', -> = T extends 'all' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } + : never; + +export type InstantiableCloudDeviceUpdate< + T extends 'request' | 'response' | 'all' = 'all', +> = T extends 'all' ? { /** * Name of the device @@ -2015,55 +1955,19 @@ export type InstantiableCloudDeviceUpdate< /** * List of users who can view the device */ - viewer?: UserReference<'response'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'cloud instantiable'; instantiateUrl?: string; - services?: ServiceDescription<'response'>[]; + services?: ServiceDescription[]; [k: string]: unknown; } - : never; - -export type ConcreteDeviceUpdate = - T extends 'all' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - } - : T extends 'request' + : T extends 'request' ? { /** * Name of the device @@ -2091,12 +1995,48 @@ export type ConcreteDeviceUpdate[]; [k: string]: unknown; } & { - type?: 'device'; - experiment?: string; + type?: 'cloud instantiable'; + instantiateUrl?: string; services?: ServiceDescription<'request'>[]; [k: string]: unknown; } : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type ConcreteDeviceUpdate = + T extends 'all' ? { /** * Name of the device @@ -2117,19 +2057,85 @@ export type ConcreteDeviceUpdate[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'device'; experiment?: string; - services?: ServiceDescription<'response'>[]; + services?: ServiceDescription[]; [k: string]: unknown; } - : never; + : T extends 'request' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; export type InstantiableBrowserDeviceUpdate< T extends 'request' | 'response' | 'all' = 'all', @@ -2167,107 +2173,6 @@ export type InstantiableBrowserDeviceUpdate< [k: string]: unknown; } : T extends 'request' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'response'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'response'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'response'>[]; - [k: string]: unknown; - } - : never; - -export type DeviceGroupUpdate = - T extends 'all' - ? { - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices?: DeviceReference[]; - [k: string]: unknown; - } - : T extends 'request' ? { /** * Name of the device @@ -2295,11 +2200,48 @@ export type DeviceGroupUpdate owner?: UserReference<'request'>[]; [k: string]: unknown; } & { - type?: 'group'; - devices?: DeviceReference<'request'>[]; + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; [k: string]: unknown; } : T extends 'response' + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + } + : never; + +export type DeviceGroupUpdate = + T extends 'all' ? { /** * Name of the device @@ -2320,248 +2262,51 @@ export type DeviceGroupUpdate /** * List of users who can view the device */ - viewer?: UserReference<'response'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'group'; - devices?: DeviceReference<'response'>[]; + devices?: DeviceReference[]; [k: string]: unknown; } - : never; - -export type DeviceUpdate = - T extends 'all' - ? - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference[]; - /** - * List of users who own the device - */ - owner?: UserReference[]; - [k: string]: unknown; - } & { - type?: 'group'; - devices?: DeviceReference[]; - [k: string]: unknown; - }) : T extends 'request' - ? - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'cloud instantiable'; - instantiateUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'device'; - experiment?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ - /** - * Name of the device - */ - name?: string; - /** - * Extended description of the device, features, etc. - */ - description?: string; - /** - * Type of the device - */ - type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; - /** - * If true, the device may be seen and used by every user. - */ - isPublic?: boolean; - /** - * List of users who can view the device - */ - viewer?: UserReference<'request'>[]; - /** - * List of users who own the device - */ - owner?: UserReference<'request'>[]; - [k: string]: unknown; - } & { - type?: 'edge instantiable'; - codeUrl?: string; - services?: ServiceDescription<'request'>[]; - [k: string]: unknown; - }) - | ({ + ? { + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference<'request'>[]; + [k: string]: unknown; + } + : T extends 'response' + ? { /** * Name of the device */ @@ -2581,18 +2326,21 @@ export type DeviceUpdate = /** * List of users who can view the device */ - viewer?: UserReference<'request'>[]; + viewer?: UserReference<'response'>[]; /** * List of users who own the device */ - owner?: UserReference<'request'>[]; + owner?: UserReference<'response'>[]; [k: string]: unknown; } & { type?: 'group'; - devices?: DeviceReference<'request'>[]; + devices?: DeviceReference<'response'>[]; [k: string]: unknown; - }) - : T extends 'response' + } + : never; + +export type DeviceUpdate = + T extends 'all' ? | ({ /** @@ -2614,16 +2362,16 @@ export type DeviceUpdate = /** * List of users who can view the device */ - viewer?: UserReference<'response'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'cloud instantiable'; instantiateUrl?: string; - services?: ServiceDescription<'response'>[]; + services?: ServiceDescription[]; [k: string]: unknown; }) | ({ @@ -2646,16 +2394,16 @@ export type DeviceUpdate = /** * List of users who can view the device */ - viewer?: UserReference<'response'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'device'; experiment?: string; - services?: ServiceDescription<'response'>[]; + services?: ServiceDescription[]; [k: string]: unknown; }) | ({ @@ -2678,16 +2426,16 @@ export type DeviceUpdate = /** * List of users who can view the device */ - viewer?: UserReference<'response'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'edge instantiable'; codeUrl?: string; - services?: ServiceDescription<'response'>[]; + services?: ServiceDescription[]; [k: string]: unknown; }) | ({ @@ -2710,18 +2458,276 @@ export type DeviceUpdate = /** * List of users who can view the device */ - viewer?: UserReference<'response'>[]; + viewer?: UserReference[]; /** * List of users who own the device */ - owner?: UserReference<'response'>[]; + owner?: UserReference[]; [k: string]: unknown; } & { type?: 'group'; - devices?: DeviceReference<'response'>[]; + devices?: DeviceReference[]; [k: string]: unknown; }) - : never; + : T extends 'request' + ? + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'request'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'request'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'request'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference<'request'>[]; + [k: string]: unknown; + }) + : T extends 'response' + ? + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'cloud instantiable'; + instantiateUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'device'; + experiment?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'edge instantiable'; + codeUrl?: string; + services?: ServiceDescription<'response'>[]; + [k: string]: unknown; + }) + | ({ + /** + * Name of the device + */ + name?: string; + /** + * Extended description of the device, features, etc. + */ + description?: string; + /** + * Type of the device + */ + type: 'device' | 'group' | 'edge instantiable' | 'cloud instantiable'; + /** + * If true, the device may be seen and used by every user. + */ + isPublic?: boolean; + /** + * List of users who can view the device + */ + viewer?: UserReference<'response'>[]; + /** + * List of users who own the device + */ + owner?: UserReference<'response'>[]; + [k: string]: unknown; + } & { + type?: 'group'; + devices?: DeviceReference<'response'>[]; + [k: string]: unknown; + }) + : never; export type AvailabilityRule = T extends 'all' @@ -2749,54 +2755,54 @@ export type AvailabilityRule = [k: string]: unknown; } : T extends 'request' - ? { - start?: string; - end?: string; - [k: string]: unknown; - } & { - available?: boolean; - /** - * If specified the time slot is repeated in a fixed offset specified by the frequency - */ - repeat?: { - frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; - /** - * Up to this date-time the time slot will be repeated. - */ - until?: string; - /** - * How often the time slot will be repeated - */ - count?: number; + ? { + start?: string; + end?: string; [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - start?: string; - end?: string; - [k: string]: unknown; - } & { - available?: boolean; - /** - * If specified the time slot is repeated in a fixed offset specified by the frequency - */ - repeat?: { - frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; - /** - * Up to this date-time the time slot will be repeated. - */ - until?: string; + } & { + available?: boolean; /** - * How often the time slot will be repeated + * If specified the time slot is repeated in a fixed offset specified by the frequency */ - count?: number; + repeat?: { + frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; + /** + * Up to this date-time the time slot will be repeated. + */ + until?: string; + /** + * How often the time slot will be repeated + */ + count?: number; + [k: string]: unknown; + }; [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; + } + : T extends 'response' + ? { + start?: string; + end?: string; + [k: string]: unknown; + } & { + available?: boolean; + /** + * If specified the time slot is repeated in a fixed offset specified by the frequency + */ + repeat?: { + frequency: 'HOURLY' | 'DAILY' | 'WEEKLY'; + /** + * Up to this date-time the time slot will be repeated. + */ + until?: string; + /** + * How often the time slot will be repeated + */ + count?: number; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; export type Message = T extends 'all' ? { @@ -2804,37 +2810,19 @@ export type Message = T extend [k: string]: unknown; } : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } - : never; - -export type CommandMessage = - T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } - : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; + ? { + messageType: string; [k: string]: unknown; } : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } + : never; + +export type CommandMessage = + T extends 'all' ? { messageType: string; [k: string]: unknown; @@ -2843,7 +2831,25 @@ export type CommandMessage = command: string; [k: string]: unknown; } - : never; + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } + : never; export type ServiceConfig = T extends 'all' @@ -2854,20 +2860,20 @@ export type ServiceConfig = [k: string]: unknown; } : T extends 'request' - ? { - serviceType: string; - serviceId: string; - remoteServiceId: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - serviceType: string; - serviceId: string; - remoteServiceId: string; - [k: string]: unknown; - } - : never; + ? { + serviceType: string; + serviceId: string; + remoteServiceId: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + serviceType: string; + serviceId: string; + remoteServiceId: string; + [k: string]: unknown; + } + : never; export type CreatePeerconnectionMessage< T extends 'request' | 'response' | 'all' = 'all', @@ -2891,60 +2897,6 @@ export type CreatePeerconnectionMessage< [k: string]: unknown; } : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } & { - command: 'createPeerconnection'; - connectionType: 'webrtc' | 'websocket' | 'local'; - connectionUrl: string; - services: ServiceConfig<'request'>[]; - tiebreaker: boolean; - config?: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } & { - command: 'createPeerconnection'; - connectionType: 'webrtc' | 'websocket' | 'local'; - connectionUrl: string; - services: ServiceConfig<'response'>[]; - tiebreaker: boolean; - config?: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; - -export type ClosePeerconnectionMessage = - T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'command'; - command: string; - [k: string]: unknown; - } & { - command: 'closePeerconnection'; - connectionUrl: string; - [k: string]: unknown; - } - : T extends 'request' ? { messageType: string; [k: string]: unknown; @@ -2953,11 +2905,39 @@ export type ClosePeerconnectionMessage[]; + tiebreaker: boolean; + config?: { + [k: string]: unknown; + }; [k: string]: unknown; } : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'command'; + command: string; + [k: string]: unknown; + } & { + command: 'createPeerconnection'; + connectionType: 'webrtc' | 'websocket' | 'local'; + connectionUrl: string; + services: ServiceConfig<'response'>[]; + tiebreaker: boolean; + config?: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; + +export type ClosePeerconnectionMessage = + T extends 'all' ? { messageType: string; [k: string]: unknown; @@ -2970,7 +2950,33 @@ export type ClosePeerconnectionMessage = T extends 'all' @@ -2987,32 +2993,32 @@ export type SignalingMessage = [k: string]: unknown; } : T extends 'request' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'signaling'; - signalingType: string; - connectionUrl: string; - content: { + ? { + messageType: string; [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'signaling'; - signalingType: string; - connectionUrl: string; - content: { + } & { + messageType: 'signaling'; + signalingType: string; + connectionUrl: string; + content: { + [k: string]: unknown; + }; [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'signaling'; + signalingType: string; + connectionUrl: string; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; export type ConfigurationMessage = T extends 'all' @@ -3027,28 +3033,28 @@ export type ConfigurationMessage = - T extends 'all' - ? { - messageType: string; - [k: string]: unknown; - } & { - messageType: 'logging'; - content: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'request' ? { messageType: string; [k: string]: unknown; } & { - messageType: 'logging'; - content: { - [k: string]: unknown; - }; + messageType: 'experiment-status-changed'; + status: string; + message?: string; [k: string]: unknown; } : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'experiment-status-changed'; + status: string; + message?: string; + [k: string]: unknown; + } + : never; + +export type LoggingMessage = + T extends 'all' ? { messageType: string; [k: string]: unknown; @@ -3118,64 +3102,43 @@ export type LoggingMessage = }; [k: string]: unknown; } - : never; + : T extends 'request' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'logging'; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : T extends 'response' + ? { + messageType: string; + [k: string]: unknown; + } & { + messageType: 'logging'; + content: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; /** * The status of the peerconnection. */ export type ConnectionStatus = T extends 'all' - ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' - : T extends 'request' - ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' - : T extends 'response' - ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' - : never; - -export type PeerconnectionCommon = - T extends 'all' - ? { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - [k: string]: unknown; - } - : T extends 'request' - ? { - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - [k: string]: unknown; - } - : never; + ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' + : T extends 'request' + ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' + : T extends 'response' + ? 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed' + : never; -export type PeerconnectionOverview = +export type PeerconnectionCommon = T extends 'all' ? { /** @@ -3191,22 +3154,41 @@ export type PeerconnectionOverview; - [k: string]: unknown; } : T extends 'request' - ? { - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - [k: string]: unknown; - } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - } - : T extends 'response' + ? { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } + : never; + +export type PeerconnectionOverview = + T extends 'all' ? { /** * URL of the peerconnection @@ -3222,10 +3204,46 @@ export type PeerconnectionOverview, 2, 2>; + devices: SizedTuple; [k: string]: unknown; } - : never; + : T extends 'request' + ? { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : never; export type ConfiguredDeviceReference = T extends 'all' @@ -3241,30 +3259,30 @@ export type ConfiguredDeviceReference[]; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the device - */ - url: string; - config?: { - services?: ServiceConfig<'response'>[]; + ? { + /** + * URL of the device + */ + url: string; + config?: { + services?: ServiceConfig<'request'>[]; + [k: string]: unknown; + }; [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; + } + : T extends 'response' + ? { + /** + * URL of the device + */ + url: string; + config?: { + services?: ServiceConfig<'response'>[]; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; export type Peerconnection = T extends 'all' @@ -3287,36 +3305,42 @@ export type Peerconnection = [k: string]: unknown; } : T extends 'request' - ? { - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - [k: string]: unknown; - } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - [k: string]: unknown; - } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - } - : never; + ? { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + } + : never; export type PeerconnectionClosedEventCallback< T extends 'request' | 'response' | 'all' = 'all', @@ -3351,58 +3375,64 @@ export type PeerconnectionClosedEventCallback< [k: string]: unknown; } : T extends 'request' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'peerconnection-closed'; - peerconnection: { - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; + ? { + callbackType: string; [k: string]: unknown; } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'peerconnection-closed'; - peerconnection: { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + callbackType: 'event'; + eventType: string; [k: string]: unknown; } & { - devices: SizedTuple, 2, 2>; + eventType: 'peerconnection-closed'; + peerconnection: { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-closed'; + peerconnection: { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; export type PeerconnectionStatusChangedEventCallback< T extends 'request' | 'response' | 'all' = 'all', @@ -3437,58 +3467,64 @@ export type PeerconnectionStatusChangedEventCallback< [k: string]: unknown; } : T extends 'request' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'peerconnection-status-changed'; - peerconnection: { - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; + ? { + callbackType: string; [k: string]: unknown; } & { - devices: SizedTuple, 2, 2>; - [k: string]: unknown; - }; - [k: string]: unknown; - } - : T extends 'response' - ? { - callbackType: string; - [k: string]: unknown; - } & { - callbackType: 'event'; - eventType: string; - [k: string]: unknown; - } & { - eventType: 'peerconnection-status-changed'; - peerconnection: { - /** - * URL of the peerconnection - */ - url: string; - /** - * Type of the peerconnection - */ - type: 'local' | 'webrtc'; - /** - * The status of the peerconnection. - */ - status: 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; + callbackType: 'event'; + eventType: string; [k: string]: unknown; } & { - devices: SizedTuple, 2, 2>; + eventType: 'peerconnection-status-changed'; + peerconnection: { + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; [k: string]: unknown; - }; - [k: string]: unknown; - } - : never; + } + : T extends 'response' + ? { + callbackType: string; + [k: string]: unknown; + } & { + callbackType: 'event'; + eventType: string; + [k: string]: unknown; + } & { + eventType: 'peerconnection-status-changed'; + peerconnection: { + /** + * URL of the peerconnection + */ + url: string; + /** + * Type of the peerconnection + */ + type: 'local' | 'webrtc'; + /** + * The status of the peerconnection. + */ + status: + | 'new' + | 'connecting' + | 'connected' + | 'disconnected' + | 'failed' + | 'closed'; + [k: string]: unknown; + } & { + devices: SizedTuple, 2, 2>; + [k: string]: unknown; + }; + [k: string]: unknown; + } + : never; export function isAuthenticationMessage( obj: unknown, diff --git a/services/device/src/clients/federation/client.ts b/services/device/src/clients/federation/client.ts index 0ba9dd47..dc5d4fdf 100644 --- a/services/device/src/clients/federation/client.ts +++ b/services/device/src/clients/federation/client.ts @@ -108,7 +108,7 @@ function isValidHttpUrl(string: string) { * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; + const parameterRegex = '([^/]+)'; const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); const matches = url.match(regex); @@ -377,11 +377,7 @@ export class Client { ): Promise { const urlSuffix = '/institutions/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [institution_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/institutions/{}', - ); + const [institution_id] = validateUrl(new URL(url).toString(), '/institutions/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -461,11 +457,7 @@ export class Client { ): Promise { const urlSuffix = '/institutions/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [institution_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/institutions/{}', - ); + const [institution_id] = validateUrl(new URL(url).toString(), '/institutions/{}'); console.log('trying to fetch url:', url); const body = institution; @@ -545,11 +537,7 @@ export class Client { ): Promise { const urlSuffix = '/institutions/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [institution_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/institutions/{}', - ); + const [institution_id] = validateUrl(new URL(url).toString(), '/institutions/{}'); console.log('trying to fetch url:', url); const parameters = { diff --git a/services/device/src/clients/federation/requestValidation.ts b/services/device/src/clients/federation/requestValidation.ts index a16456f8..2710d986 100644 --- a/services/device/src/clients/federation/requestValidation.ts +++ b/services/device/src/clients/federation/requestValidation.ts @@ -53,9 +53,8 @@ export function validateListInstitutionsOutput( return true; } - ( - validateListInstitutionsOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateListInstitutionsOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -113,9 +112,8 @@ export function validateCreateInstitutionOutput( return true; } - ( - validateCreateInstitutionOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateCreateInstitutionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -179,9 +177,8 @@ export function validateGetInstitutionOutput( return true; } - ( - validateGetInstitutionOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateGetInstitutionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -257,9 +254,8 @@ export function validateUpdateInstitutionOutput( return true; } - ( - validateUpdateInstitutionOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateUpdateInstitutionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -316,9 +312,8 @@ export function validateDeleteInstitutionOutput( return true; } - ( - validateDeleteInstitutionOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateDeleteInstitutionOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -374,9 +369,8 @@ export function validateProxyGetOutput( return true; } - ( - validateProxyGetOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateProxyGetOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -432,9 +426,8 @@ export function validateProxyPostOutput( return true; } - ( - validateProxyPostOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateProxyPostOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -490,9 +483,8 @@ export function validateProxyPutOutput( return true; } - ( - validateProxyPutOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateProxyPutOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -548,9 +540,8 @@ export function validateProxyPatchOutput( return true; } - ( - validateProxyPatchOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateProxyPatchOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -606,9 +597,8 @@ export function validateProxyDeleteOutput( return true; } - ( - validateProxyDeleteOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateProxyDeleteOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -664,9 +654,8 @@ export function validateProxyHeadOutput( return true; } - ( - validateProxyHeadOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateProxyHeadOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -722,9 +711,8 @@ export function validateProxyOptionsOutput( return true; } - ( - validateProxyOptionsOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateProxyOptionsOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -780,9 +768,8 @@ export function validateProxyTraceOutput( return true; } - ( - validateProxyTraceOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateProxyTraceOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } diff --git a/services/device/src/clients/federation/types.ts b/services/device/src/clients/federation/types.ts index 07bc6fc3..3ae5ede7 100644 --- a/services/device/src/clients/federation/types.ts +++ b/services/device/src/clients/federation/types.ts @@ -76,8 +76,8 @@ export type SizedTuple< ? _SizedTuple> : TupleObject> & T[] : MAX extends number - ? _SizedTuple, true> - : T[]; + ? _SizedTuple, true> + : T[]; type _SizedTuple = ARR extends [ infer HEAD extends number, @@ -148,19 +148,19 @@ export type Institution = [k: string]: unknown; } : T extends 'request' - ? { - name?: string; - homepage?: string; - api?: string; - apiToken?: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - url: string; - name?: string; - homepage?: string; - api?: string; - [k: string]: unknown; - } - : never; + ? { + name?: string; + homepage?: string; + api?: string; + apiToken?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + url: string; + name?: string; + homepage?: string; + api?: string; + [k: string]: unknown; + } + : never; diff --git a/services/device/src/database/model.ts b/services/device/src/database/model.ts index 265df0e6..e98c2ad0 100644 --- a/services/device/src/database/model.ts +++ b/services/device/src/database/model.ts @@ -15,7 +15,6 @@ import { ConnectionStatus, DeviceReference, ServiceDescription, - TimeSlot, } from '../generated/types.js'; export type DeviceModel = diff --git a/services/experiment/src/clients/booking-backend/client.ts b/services/experiment/src/clients/booking-backend/client.ts index 9e2759fb..a7d1aee1 100644 --- a/services/experiment/src/clients/booking-backend/client.ts +++ b/services/experiment/src/clients/booking-backend/client.ts @@ -108,7 +108,7 @@ function isValidHttpUrl(string: string) { * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; + const parameterRegex = '([^/]+)'; const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); const matches = url.match(regex); @@ -231,7 +231,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}/lock'); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}/lock'); console.log('trying to fetch url:', url); const parameters = { @@ -304,7 +304,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/lock'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}/lock'); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}/lock'); console.log('trying to fetch url:', url); const parameters = { @@ -377,11 +377,7 @@ export class Client { ): Promise { const urlSuffix = '/booking_callback/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/booking_callback/{}', - ); + const [ID] = validateUrl(new URL(url).toString(), '/booking_callback/{}'); console.log('trying to fetch url:', url); const parameters = { diff --git a/services/experiment/src/clients/booking-backend/requestValidation.ts b/services/experiment/src/clients/booking-backend/requestValidation.ts index baa00696..b5921790 100644 --- a/services/experiment/src/clients/booking-backend/requestValidation.ts +++ b/services/experiment/src/clients/booking-backend/requestValidation.ts @@ -75,9 +75,8 @@ export function validateLockBookingOutput( return true; } - ( - validateLockBookingOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateLockBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -145,9 +144,8 @@ export function validateUnlockBookingOutput( return true; } - ( - validateUnlockBookingOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateUnlockBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -203,9 +201,8 @@ export function validateBookingCallbackOutput( return true; } - ( - validateBookingCallbackOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateBookingCallbackOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } diff --git a/services/experiment/src/clients/booking-backend/types.ts b/services/experiment/src/clients/booking-backend/types.ts index 2d71aa30..8d0b0be8 100644 --- a/services/experiment/src/clients/booking-backend/types.ts +++ b/services/experiment/src/clients/booking-backend/types.ts @@ -76,8 +76,8 @@ export type SizedTuple< ? _SizedTuple> : TupleObject> & T[] : MAX extends number - ? _SizedTuple, true> - : T[]; + ? _SizedTuple, true> + : T[]; type _SizedTuple = ARR extends [ infer HEAD extends number, @@ -192,108 +192,108 @@ export type Booking = T extend [k: string]: unknown; } : T extends 'request' - ? { - /** - * Unique ID of the booking. - */ - ID: string; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: { + ? { /** - * Start time of the booking. + * Unique ID of the booking. */ - Start: string; + ID: string; /** - * End time of the booking. + * A time slot represents a slice of time used for bookings. */ - End: string; - [k: string]: unknown; - }; - Devices: string[]; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - /** - * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * - */ - Status: - | 'pending' - | 'booked' - | 'rejected' - | 'cancelled' - | 'active' - | 'active-pending' - | 'active-rejected'; - /** - * If true, this booking was done by you. - */ - You: boolean; - /** - * Shows whether the booking was done by an external institution. - */ - External: boolean; - /** - * User readable notes about the status of the booking (e.g. if devices are unknown). - */ - Message?: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Unique ID of the booking. - */ - ID: string; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: { + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; /** - * Start time of the booking. + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. */ - Start: string; + Type?: 'normal'; /** - * End time of the booking. + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ - End: string; + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; [k: string]: unknown; - }; - Devices: string[]; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - /** - * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * - */ - Status: - | 'pending' - | 'booked' - | 'rejected' - | 'cancelled' - | 'active' - | 'active-pending' - | 'active-rejected'; - /** - * If true, this booking was done by you. - */ - You: boolean; - /** - * Shows whether the booking was done by an external institution. - */ - External: boolean; - /** - * User readable notes about the status of the booking (e.g. if devices are unknown). - */ - Message?: string; - [k: string]: unknown; - } - : never; + } + : T extends 'response' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : never; /** * A device might either be a physical/virtual device or a group of device. @@ -307,22 +307,22 @@ export type Device = T extends [k: string]: unknown; } : T extends 'request' - ? { - /** - * Unique ID of the device. Contains the institution (by having an end point at that institution) - */ - ID: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Unique ID of the device. Contains the institution (by having an end point at that institution) - */ - ID: string; - [k: string]: unknown; - } - : never; + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : never; /** * An experiment describes a set of devices and how they should be connected (potentially among other metadata). @@ -341,32 +341,32 @@ export type Experiment = T ext [k: string]: unknown; } : T extends 'request' - ? { - /** - * List of devices used in experiment. - */ - Devices: Device<'request'>[]; - /** - * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * - */ - Description?: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * List of devices used in experiment. - */ - Devices: Device<'response'>[]; - /** - * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * - */ - Description?: string; - [k: string]: unknown; - } - : never; + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'request'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'response'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : never; /** * A time slot represents a slice of time used for bookings. @@ -384,27 +384,27 @@ export type Timeslot = T exten [k: string]: unknown; } : T extends 'request' - ? { - /** - * Start time of the booking. - */ - Start: string; - /** - * End time of the booking. - */ - End: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Start time of the booking. - */ - Start: string; - /** - * End time of the booking. - */ - End: string; - [k: string]: unknown; - } - : never; + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : never; diff --git a/services/experiment/src/clients/booking-frontend/client.ts b/services/experiment/src/clients/booking-frontend/client.ts index 49dfb92d..719ff403 100644 --- a/services/experiment/src/clients/booking-frontend/client.ts +++ b/services/experiment/src/clients/booking-frontend/client.ts @@ -108,7 +108,7 @@ function isValidHttpUrl(string: string) { * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; + const parameterRegex = '([^/]+)'; const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); const matches = url.match(regex); @@ -336,7 +336,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -412,7 +412,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -485,7 +485,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl(new URL(url).toString(), this.baseUrl, '/booking/{}'); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -558,11 +558,7 @@ export class Client { ): Promise { const urlSuffix = '/booking/{}/destroy'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [ID] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/booking/{}/destroy', - ); + const [ID] = validateUrl(new URL(url).toString(), '/booking/{}/destroy'); console.log('trying to fetch url:', url); const parameters = { diff --git a/services/experiment/src/clients/booking-frontend/requestValidation.ts b/services/experiment/src/clients/booking-frontend/requestValidation.ts index aa856d68..bf388f61 100644 --- a/services/experiment/src/clients/booking-frontend/requestValidation.ts +++ b/services/experiment/src/clients/booking-frontend/requestValidation.ts @@ -63,9 +63,8 @@ export function validateNewBookingOutput( return true; } - ( - validateNewBookingOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateNewBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -159,9 +158,8 @@ export function validateUpdateBookingOutput( return true; } - ( - validateUpdateBookingOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateUpdateBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -229,9 +227,8 @@ export function validateDeleteBookingOutput( return true; } - ( - validateDeleteBookingOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateDeleteBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -300,9 +297,8 @@ export function validateGetBookingOutput( return true; } - ( - validateGetBookingOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateGetBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } @@ -370,9 +366,8 @@ export function validateDestroyBookingOutput( return true; } - ( - validateDestroyBookingOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateDestroyBookingOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } diff --git a/services/experiment/src/clients/booking-frontend/types.ts b/services/experiment/src/clients/booking-frontend/types.ts index 2d71aa30..8d0b0be8 100644 --- a/services/experiment/src/clients/booking-frontend/types.ts +++ b/services/experiment/src/clients/booking-frontend/types.ts @@ -76,8 +76,8 @@ export type SizedTuple< ? _SizedTuple> : TupleObject> & T[] : MAX extends number - ? _SizedTuple, true> - : T[]; + ? _SizedTuple, true> + : T[]; type _SizedTuple = ARR extends [ infer HEAD extends number, @@ -192,108 +192,108 @@ export type Booking = T extend [k: string]: unknown; } : T extends 'request' - ? { - /** - * Unique ID of the booking. - */ - ID: string; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: { + ? { /** - * Start time of the booking. + * Unique ID of the booking. */ - Start: string; + ID: string; /** - * End time of the booking. + * A time slot represents a slice of time used for bookings. */ - End: string; - [k: string]: unknown; - }; - Devices: string[]; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - /** - * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * - */ - Status: - | 'pending' - | 'booked' - | 'rejected' - | 'cancelled' - | 'active' - | 'active-pending' - | 'active-rejected'; - /** - * If true, this booking was done by you. - */ - You: boolean; - /** - * Shows whether the booking was done by an external institution. - */ - External: boolean; - /** - * User readable notes about the status of the booking (e.g. if devices are unknown). - */ - Message?: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Unique ID of the booking. - */ - ID: string; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: { + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; /** - * Start time of the booking. + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. */ - Start: string; + Type?: 'normal'; /** - * End time of the booking. + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ - End: string; + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; [k: string]: unknown; - }; - Devices: string[]; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - /** - * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * - */ - Status: - | 'pending' - | 'booked' - | 'rejected' - | 'cancelled' - | 'active' - | 'active-pending' - | 'active-rejected'; - /** - * If true, this booking was done by you. - */ - You: boolean; - /** - * Shows whether the booking was done by an external institution. - */ - External: boolean; - /** - * User readable notes about the status of the booking (e.g. if devices are unknown). - */ - Message?: string; - [k: string]: unknown; - } - : never; + } + : T extends 'response' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : never; /** * A device might either be a physical/virtual device or a group of device. @@ -307,22 +307,22 @@ export type Device = T extends [k: string]: unknown; } : T extends 'request' - ? { - /** - * Unique ID of the device. Contains the institution (by having an end point at that institution) - */ - ID: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Unique ID of the device. Contains the institution (by having an end point at that institution) - */ - ID: string; - [k: string]: unknown; - } - : never; + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : never; /** * An experiment describes a set of devices and how they should be connected (potentially among other metadata). @@ -341,32 +341,32 @@ export type Experiment = T ext [k: string]: unknown; } : T extends 'request' - ? { - /** - * List of devices used in experiment. - */ - Devices: Device<'request'>[]; - /** - * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * - */ - Description?: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * List of devices used in experiment. - */ - Devices: Device<'response'>[]; - /** - * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * - */ - Description?: string; - [k: string]: unknown; - } - : never; + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'request'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'response'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : never; /** * A time slot represents a slice of time used for bookings. @@ -384,27 +384,27 @@ export type Timeslot = T exten [k: string]: unknown; } : T extends 'request' - ? { - /** - * Start time of the booking. - */ - Start: string; - /** - * End time of the booking. - */ - End: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Start time of the booking. - */ - Start: string; - /** - * End time of the booking. - */ - End: string; - [k: string]: unknown; - } - : never; + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : never; diff --git a/services/experiment/src/clients/device/client.ts b/services/experiment/src/clients/device/client.ts index 92fd6fe6..46a0ace9 100644 --- a/services/experiment/src/clients/device/client.ts +++ b/services/experiment/src/clients/device/client.ts @@ -108,7 +108,7 @@ function isValidHttpUrl(string: string) { * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; + const parameterRegex = '([^/]+)'; const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); const matches = url.match(regex); @@ -395,7 +395,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -491,7 +491,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); console.log('trying to fetch url:', url); const body = deviceUpdate; @@ -577,7 +577,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -658,7 +658,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl(new URL(url).toString(), this.baseUrl, '/devices/{}'); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}'); console.log('trying to fetch url:', url); const parameters = { @@ -751,11 +751,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/availability', - ); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/availability'); console.log('trying to fetch url:', url); const parameters = { @@ -845,11 +841,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/availability', - ); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/availability'); console.log('trying to fetch url:', url); const parameters = { @@ -927,11 +919,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/availability', - ); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/availability'); console.log('trying to fetch url:', url); const body = availabilityRules; @@ -1011,11 +999,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/websocket'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/websocket', - ); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/websocket'); console.log('trying to fetch url:', url); const parameters = { @@ -1101,11 +1085,7 @@ export class Client { ): Promise { const urlSuffix = '/devices/{}/signaling'.split('{}').at(-1) ?? ''; if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); - const [device_id] = validateUrl( - new URL(url).toString(), - this.baseUrl, - '/devices/{}/signaling', - ); + const [device_id] = validateUrl(new URL(url).toString(), '/devices/{}/signaling'); console.log('trying to fetch url:', url); const body = sigMessage; @@ -1355,7 +1335,6 @@ export class Client { if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); const [peerconnection_id] = validateUrl( new URL(url).toString(), - this.baseUrl, '/peerconnections/{}', ); console.log('trying to fetch url:', url); @@ -1437,7 +1416,6 @@ export class Client { if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); const [peerconnection_id] = validateUrl( new URL(url).toString(), - this.baseUrl, '/peerconnections/{}', ); console.log('trying to fetch url:', url); @@ -1528,7 +1506,6 @@ export class Client { if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix); const [peerconnection_id] = validateUrl( new URL(url).toString(), - this.baseUrl, '/peerconnections/{}/device_status', ); console.log('trying to fetch url:', url); diff --git a/services/experiment/src/clients/schedule-service/client.ts b/services/experiment/src/clients/schedule-service/client.ts index 1fb66831..f88d6c98 100644 --- a/services/experiment/src/clients/schedule-service/client.ts +++ b/services/experiment/src/clients/schedule-service/client.ts @@ -80,59 +80,6 @@ async function parseResponse(response: Response): Promise { } } -/** - * This function checks if a string is a valid http url. - * @param string The string to be checked. - * @returns True if the string is a valid http url. - */ -function isValidHttpUrl(string: string) { - let url; - - try { - url = new URL(string); - } catch (_) { - return false; - } - - return url.protocol === 'http:' || url.protocol === 'https:'; -} - -/** - * This function takes an url and a pattern for the requested endpoint and parses the contained path parameters. - * @param url The url to be parsed. - * @param endpoint Pattern of the requested endpoint. - * @throws {InvalidUrlError} Thrown if the provided url does not end with the provided endpoint. - * @returns An array containing all parsed path parameters in order of appearance. - * @example - * // returns ["username", "role_name"] - * parsePathParameters("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") - */ -function parsePathParameters(url: string, endpoint: string): string[] { - const parameterRegex = '([a-zA-Z0-9-:]+)'; - const regex = new RegExp(endpoint.replaceAll('{}', parameterRegex) + '(?:.(?!\\\\))?$'); - const matches = url.match(regex); - - if (!matches) throw new InvalidUrlError('Url does not end with the provided endpoint'); - - return matches.slice(1); -} - -/** - * This function validates a given http url and parses its path parameters. - * @param url The url to be validated. - * @param endpoint Pattern of the requested endpoint. - * @throws {InvalidUrlError} Thrown if the validation of the provided url fails. - * @returns An array containing all parsed path parameters in order of appearance (see {@link parsePathParameters}). - * @example - * // returns ["username", "role_name"] - * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") - */ -function validateUrl(url: string, endpoint: string): string[] { - if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); - return parsePathParameters(url, endpoint); -} - /** * This function appends a given endpoint to an url. * @param url The url to append the endpoint to. diff --git a/services/experiment/src/clients/schedule-service/requestValidation.ts b/services/experiment/src/clients/schedule-service/requestValidation.ts index a0b51f66..8803e553 100644 --- a/services/experiment/src/clients/schedule-service/requestValidation.ts +++ b/services/experiment/src/clients/schedule-service/requestValidation.ts @@ -93,9 +93,8 @@ export function validateScheduleOutput( return true; } - ( - validateScheduleOutput as FunctionWithErrors - ).errors = `Response status ${response.status} is unexpected`; + (validateScheduleOutput as FunctionWithErrors).errors = + `Response status ${response.status} is unexpected`; return false; } diff --git a/services/experiment/src/clients/schedule-service/types.ts b/services/experiment/src/clients/schedule-service/types.ts index 2d71aa30..8d0b0be8 100644 --- a/services/experiment/src/clients/schedule-service/types.ts +++ b/services/experiment/src/clients/schedule-service/types.ts @@ -76,8 +76,8 @@ export type SizedTuple< ? _SizedTuple> : TupleObject> & T[] : MAX extends number - ? _SizedTuple, true> - : T[]; + ? _SizedTuple, true> + : T[]; type _SizedTuple = ARR extends [ infer HEAD extends number, @@ -192,108 +192,108 @@ export type Booking = T extend [k: string]: unknown; } : T extends 'request' - ? { - /** - * Unique ID of the booking. - */ - ID: string; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: { + ? { /** - * Start time of the booking. + * Unique ID of the booking. */ - Start: string; + ID: string; /** - * End time of the booking. + * A time slot represents a slice of time used for bookings. */ - End: string; - [k: string]: unknown; - }; - Devices: string[]; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - /** - * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * - */ - Status: - | 'pending' - | 'booked' - | 'rejected' - | 'cancelled' - | 'active' - | 'active-pending' - | 'active-rejected'; - /** - * If true, this booking was done by you. - */ - You: boolean; - /** - * Shows whether the booking was done by an external institution. - */ - External: boolean; - /** - * User readable notes about the status of the booking (e.g. if devices are unknown). - */ - Message?: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Unique ID of the booking. - */ - ID: string; - /** - * A time slot represents a slice of time used for bookings. - */ - Time: { + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; /** - * Start time of the booking. + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. */ - Start: string; + Type?: 'normal'; /** - * End time of the booking. + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * */ - End: string; + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; [k: string]: unknown; - }; - Devices: string[]; - /** - * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. - */ - Type?: 'normal'; - /** - * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. - * - */ - Status: - | 'pending' - | 'booked' - | 'rejected' - | 'cancelled' - | 'active' - | 'active-pending' - | 'active-rejected'; - /** - * If true, this booking was done by you. - */ - You: boolean; - /** - * Shows whether the booking was done by an external institution. - */ - External: boolean; - /** - * User readable notes about the status of the booking (e.g. if devices are unknown). - */ - Message?: string; - [k: string]: unknown; - } - : never; + } + : T extends 'response' + ? { + /** + * Unique ID of the booking. + */ + ID: string; + /** + * A time slot represents a slice of time used for bookings. + */ + Time: { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + }; + Devices: string[]; + /** + * Type of booking. Currently, only one type is defined, but others might follow (e.g. priority booking). If empty, 'normal' is assumed. + */ + Type?: 'normal'; + /** + * Current status of the booking. While the booking is pending, it can not be used. Will change automatically and can not be set by user. 'rejected' is set when the initial booking failed, 'cancelled' when the booking was deleted / cancelled after it was once active. The 'active-*' will be used when a device was added after the booking was locked. + * + */ + Status: + | 'pending' + | 'booked' + | 'rejected' + | 'cancelled' + | 'active' + | 'active-pending' + | 'active-rejected'; + /** + * If true, this booking was done by you. + */ + You: boolean; + /** + * Shows whether the booking was done by an external institution. + */ + External: boolean; + /** + * User readable notes about the status of the booking (e.g. if devices are unknown). + */ + Message?: string; + [k: string]: unknown; + } + : never; /** * A device might either be a physical/virtual device or a group of device. @@ -307,22 +307,22 @@ export type Device = T extends [k: string]: unknown; } : T extends 'request' - ? { - /** - * Unique ID of the device. Contains the institution (by having an end point at that institution) - */ - ID: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Unique ID of the device. Contains the institution (by having an end point at that institution) - */ - ID: string; - [k: string]: unknown; - } - : never; + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Unique ID of the device. Contains the institution (by having an end point at that institution) + */ + ID: string; + [k: string]: unknown; + } + : never; /** * An experiment describes a set of devices and how they should be connected (potentially among other metadata). @@ -341,32 +341,32 @@ export type Experiment = T ext [k: string]: unknown; } : T extends 'request' - ? { - /** - * List of devices used in experiment. - */ - Devices: Device<'request'>[]; - /** - * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * - */ - Description?: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * List of devices used in experiment. - */ - Devices: Device<'response'>[]; - /** - * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. - * - */ - Description?: string; - [k: string]: unknown; - } - : never; + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'request'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * List of devices used in experiment. + */ + Devices: Device<'response'>[]; + /** + * User provided description, for example might be a reason for the booking (e.g. maintenance) or a link to the experiment. Might be empty or missing. + * + */ + Description?: string; + [k: string]: unknown; + } + : never; /** * A time slot represents a slice of time used for bookings. @@ -384,27 +384,27 @@ export type Timeslot = T exten [k: string]: unknown; } : T extends 'request' - ? { - /** - * Start time of the booking. - */ - Start: string; - /** - * End time of the booking. - */ - End: string; - [k: string]: unknown; - } - : T extends 'response' - ? { - /** - * Start time of the booking. - */ - Start: string; - /** - * End time of the booking. - */ - End: string; - [k: string]: unknown; - } - : never; + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : T extends 'response' + ? { + /** + * Start time of the booking. + */ + Start: string; + /** + * End time of the booking. + */ + End: string; + [k: string]: unknown; + } + : never; diff --git a/services/experiment/src/methods/experimentStatus/book.ts b/services/experiment/src/methods/experimentStatus/book.ts index ee07f32c..0b4e7cc0 100644 --- a/services/experiment/src/methods/experimentStatus/book.ts +++ b/services/experiment/src/methods/experimentStatus/book.ts @@ -66,18 +66,15 @@ export async function bookExperiment(experimentModel: ExperimentModel) { }); // TEMPORARY HOTFIX: wait for booking to have status "booked" - await new Promise(async resolve => { - for (let i = 0; i < 10; i++) { - const updatedBooking = await clients.booking.frontend.getBooking(booking.BookingID); + for (let i = 0; i < 10; i++) { + const updatedBooking = await clients.booking.frontend.getBooking(booking.BookingID); - if (updatedBooking.Booking.Status === 'booked') { - resolve(); - break; - } - - await new Promise(resolve => setTimeout(resolve, 1000)); + if (updatedBooking.Booking.Status === 'booked') { + break; } - }); + + await new Promise(resolve => setTimeout(resolve, 1000)); + } callbackHandler.addListener('booking', booking.BookingID, experimentModel.uuid); diff --git a/services/lti/src/clients/authentication/client.ts b/services/lti/src/clients/authentication/client.ts index 9c57f368..b5e90ff7 100644 --- a/services/lti/src/clients/authentication/client.ts +++ b/services/lti/src/clients/authentication/client.ts @@ -1,3 +1,18 @@ + + + + + + + + + + + + + + + /** * This file was automatically generated by openapi-codegeneration. * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, @@ -497,7 +512,7 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [user_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}') + const [user_id,] = validateUrl(new URL(url).toString(), '/users/{}') console.log("trying to fetch url:", url); @@ -568,7 +583,7 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [user_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}') + const [user_id,] = validateUrl(new URL(url).toString(), '/users/{}') console.log("trying to fetch url:", url); const body = user @@ -638,7 +653,7 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/users/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [user_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/users/{}') + const [user_id,] = validateUrl(new URL(url).toString(), '/users/{}') console.log("trying to fetch url:", url); diff --git a/services/lti/src/clients/device/client.ts b/services/lti/src/clients/device/client.ts index 02336a33..629531e9 100644 --- a/services/lti/src/clients/device/client.ts +++ b/services/lti/src/clients/device/client.ts @@ -1,3 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /** * This file was automatically generated by openapi-codegeneration. * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, @@ -129,23 +159,9 @@ function parsePathParameters(url: string, endpoint: string): string[] { * // returns ["username", "role_name"] * validateUrl("https://api.example.com/users/username/roles/role_name", "/users/{}/roles/{}") */ -function validateUrl(url: string, baseUrl: string, endpoint: string): string[] { - if (!isValidHttpUrl(url)) - throw new InvalidUrlError('Provided url is not a valid http url'); - if (!url.startsWith(baseUrl)) - throw new InvalidUrlError('Provided url does not start with the provided base url'); - const pathParameters = parsePathParameters(url, endpoint); - - let extendedBaseUrl = baseUrl + endpoint; - - pathParameters.forEach(pathParameter => { - extendedBaseUrl = extendedBaseUrl.replace('{}', pathParameter); - }); - - if (url !== extendedBaseUrl) - throw new InvalidUrlError('Provided url does not match extended base url'); - - return pathParameters; +function validateUrl(url: string, endpoint: string): string[] { + if (!isValidHttpUrl(url)) throw new InvalidUrlError('Provided url is not a valid http url') + return parsePathParameters(url, endpoint) } /** @@ -175,10 +191,11 @@ export class Client { private fixedHeaders: [string, string][] private fetch = async (url: RequestInfo | URL, init: RequestInit) => { let raw_response; + const parsedUrl = new URL(url.toString()) try { if ( - url.toString().startsWith(this.baseUrl) || - url.toString().startsWith(this.serviceUrl) + parsedUrl.toString().startsWith(this.baseUrl) || + parsedUrl.toString().startsWith(this.serviceUrl) ) { raw_response = await fetch(url, init); } else { @@ -209,12 +226,8 @@ export class Client { baseUrl: string, options: { serviceUrl?: string; accessToken?: string, fixedHeaders?: [string, string][] }, ) { - this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl; - this.serviceUrl = options.serviceUrl - ? options.serviceUrl.endsWith('/') - ? options.serviceUrl.slice(0, -1) - : options.serviceUrl - : this.baseUrl; + this.baseUrl = new URL(baseUrl).toString().slice(0, -1); + this.serviceUrl = new URL(options.serviceUrl ?? this.baseUrl).toString().slice(0, -1); this.accessToken = options.accessToken ?? ''; this.fixedHeaders = options.fixedHeaders ?? []; } @@ -241,6 +254,7 @@ export class Client { options?: { headers?: [string, string][],url?: string}): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, "/devices") + console.log("trying to fetch url:", url); @@ -254,7 +268,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -314,6 +329,7 @@ export class Client { options?: { headers?: [string, string][],changedUrl?: string,url?: string}): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, "/devices") + console.log("trying to fetch url:", url); const body = device @@ -335,7 +351,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "POST", headers: [ ["Content-Type", "application/json"], @@ -388,7 +405,8 @@ export class Client { headers?: [string, string][],flat_group?: boolean,}): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(url, this.baseUrl, '/devices/{}') + const [device_id,] = validateUrl(new URL(url).toString(), '/devices/{}') + console.log("trying to fetch url:", url); @@ -411,7 +429,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -467,12 +486,13 @@ export class Client { * @returns * The JSON Representation of the changed device. */ - public async updateDevice(url: string,deviceUpdate: Types.DeviceUpdate<"request">, + public async updateDevice(url: string,deviceUpdate: Types.DeviceUpdate<"request"> | undefined, options?: { headers?: [string, string][],changedUrl?: string,}): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(url, this.baseUrl, '/devices/{}') + const [device_id,] = validateUrl(new URL(url).toString(), '/devices/{}') + console.log("trying to fetch url:", url); const body = deviceUpdate @@ -495,7 +515,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "PATCH", headers: [ ["Content-Type", "application/json"], @@ -546,7 +567,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(url, this.baseUrl, '/devices/{}') + const [device_id,] = validateUrl(new URL(url).toString(), '/devices/{}') + console.log("trying to fetch url:", url); @@ -563,7 +585,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "DELETE", headers: [ ["Content-Type", "application/json"], @@ -620,7 +643,8 @@ export class Client { headers?: [string, string][],changedUrl?: string,}): Promise { const urlSuffix = '/devices/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(url, this.baseUrl, '/devices/{}') + const [device_id,] = validateUrl(new URL(url).toString(), '/devices/{}') + console.log("trying to fetch url:", url); @@ -643,7 +667,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "POST", headers: [ ["Content-Type", "application/json"], @@ -697,7 +722,8 @@ export class Client { headers?: [string, string][],startTime?: string,endTime?: string,}): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(url, this.baseUrl, '/devices/{}/availability') + const [device_id,] = validateUrl(new URL(url).toString(), '/devices/{}/availability') + console.log("trying to fetch url:", url); @@ -724,7 +750,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -774,7 +801,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(url, this.baseUrl, '/devices/{}/availability') + const [device_id,] = validateUrl(new URL(url).toString(), '/devices/{}/availability') + console.log("trying to fetch url:", url); @@ -791,7 +819,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "DELETE", headers: [ ["Content-Type", "application/json"], @@ -836,12 +865,13 @@ export class Client { * @returns * The JSON Representation of the changed availability. */ - public async addDeviceAvailabilityRules(url: string,availabilityRules: (Types.AvailabilityRule<"request">)[], + public async addDeviceAvailabilityRules(url: string,availabilityRules: (Types.AvailabilityRule<"request">)[] | undefined, options?: { headers?: [string, string][],}): Promise { const urlSuffix = '/devices/{}/availability'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(url, this.baseUrl, '/devices/{}/availability') + const [device_id,] = validateUrl(new URL(url).toString(), '/devices/{}/availability') + console.log("trying to fetch url:", url); const body = availabilityRules @@ -858,7 +888,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "POST", headers: [ ["Content-Type", "application/json"], @@ -909,7 +940,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/devices/{}/websocket'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(url, this.baseUrl, '/devices/{}/websocket') + const [device_id,] = validateUrl(new URL(url).toString(), '/devices/{}/websocket') + console.log("trying to fetch url:", url); @@ -926,7 +958,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "POST", headers: [ ["Content-Type", "application/json"], @@ -978,7 +1011,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/devices/{}/signaling'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [device_id,] = validateUrl(url, this.baseUrl, '/devices/{}/signaling') + const [device_id,] = validateUrl(new URL(url).toString(), '/devices/{}/signaling') + console.log("trying to fetch url:", url); const body = sigMessage @@ -995,7 +1029,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "POST", headers: [ ["Content-Type", "application/json"], @@ -1043,6 +1078,7 @@ export class Client { options?: { headers?: [string, string][],url?: string}): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, "/peerconnections") + console.log("trying to fetch url:", url); @@ -1056,7 +1092,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -1112,6 +1149,7 @@ export class Client { options?: { headers?: [string, string][],closedUrl?: string,statusChangedUrl?: string,url?: string}): Promise { const url = appendToUrl(options?.url ?? this.baseUrl, "/peerconnections") + console.log("trying to fetch url:", url); const body = peerconnection @@ -1137,7 +1175,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "POST", headers: [ ["Content-Type", "application/json"], @@ -1188,7 +1227,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [peerconnection_id,] = validateUrl(url, this.baseUrl, '/peerconnections/{}') + const [peerconnection_id,] = validateUrl(new URL(url).toString(), '/peerconnections/{}') + console.log("trying to fetch url:", url); @@ -1205,7 +1245,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "GET", headers: [ ["Content-Type", "application/json"], @@ -1256,7 +1297,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/peerconnections/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [peerconnection_id,] = validateUrl(url, this.baseUrl, '/peerconnections/{}') + const [peerconnection_id,] = validateUrl(new URL(url).toString(), '/peerconnections/{}') + console.log("trying to fetch url:", url); @@ -1273,7 +1315,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) , { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) ); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) , { method: "DELETE", headers: [ ["Content-Type", "application/json"], @@ -1331,7 +1374,8 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/peerconnections/{}/device_status'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [peerconnection_id,] = validateUrl(url, this.baseUrl, '/peerconnections/{}/device_status') + const [peerconnection_id,] = validateUrl(new URL(url).toString(), '/peerconnections/{}/device_status') + console.log("trying to fetch url:", url); @@ -1354,7 +1398,8 @@ export class Client { const authorization: string = `Bearer ${this.accessToken}` - const response = await this.fetch(url.replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { + console.log("trying to fetch url:", new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query)); + const response = await this.fetch(new URL(url).toString().replace(this.baseUrl, this.serviceUrl) + '?' + new URLSearchParams(query), { method: "PATCH", headers: [ ["Content-Type", "application/json"], diff --git a/services/lti/src/clients/experiment/client.ts b/services/lti/src/clients/experiment/client.ts index 2bd261a1..be6359c3 100644 --- a/services/lti/src/clients/experiment/client.ts +++ b/services/lti/src/clients/experiment/client.ts @@ -1,3 +1,21 @@ + + + + + + + + + + + + + + + + + + /** * This file was automatically generated by openapi-codegeneration. * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file, @@ -377,7 +395,7 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/experiments/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [experiment_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/experiments/{}') + const [experiment_id,] = validateUrl(new URL(url).toString(), '/experiments/{}') console.log("trying to fetch url:", url); @@ -451,7 +469,7 @@ export class Client { headers?: [string, string][],changedURL?: string,}): Promise { const urlSuffix = '/experiments/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [experiment_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/experiments/{}') + const [experiment_id,] = validateUrl(new URL(url).toString(), '/experiments/{}') console.log("trying to fetch url:", url); const body = experimentUpdate @@ -527,7 +545,7 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/experiments/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [experiment_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/experiments/{}') + const [experiment_id,] = validateUrl(new URL(url).toString(), '/experiments/{}') console.log("trying to fetch url:", url); @@ -726,7 +744,7 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/templates/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [template_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/templates/{}') + const [template_id,] = validateUrl(new URL(url).toString(), '/templates/{}') console.log("trying to fetch url:", url); @@ -798,7 +816,7 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/templates/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [template_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/templates/{}') + const [template_id,] = validateUrl(new URL(url).toString(), '/templates/{}') console.log("trying to fetch url:", url); const body = templateUpdate @@ -868,7 +886,7 @@ export class Client { headers?: [string, string][],}): Promise { const urlSuffix = '/templates/{}'.split('{}').at(-1) ?? '' if (urlSuffix && !url.endsWith(urlSuffix)) url = appendToUrl(url, urlSuffix) - const [template_id,] = validateUrl(new URL(url).toString(), this.baseUrl, '/templates/{}') + const [template_id,] = validateUrl(new URL(url).toString(), '/templates/{}') console.log("trying to fetch url:", url); From 2a2d40bf7f71923e462aae1f1c9a21ad51d4cf9f Mon Sep 17 00:00:00 2001 From: lassertos Date: Mon, 4 Nov 2024 11:06:33 +0000 Subject: [PATCH 79/79] add build-spec script for booking services --- .jobs.yml | 16 ++++++++ services/booking/scripts/build-spec.sh | 41 ++++++++++++++++++- .../src/booking-backend/scripts/build-spec.sh | 13 ++++++ .../booking-frontend/scripts/build-spec.sh | 13 ++++++ .../schedule-service/scripts/build-spec.sh | 13 ++++++ 5 files changed, 95 insertions(+), 1 deletion(-) mode change 120000 => 100755 services/booking/scripts/build-spec.sh create mode 100755 services/booking/src/booking-backend/scripts/build-spec.sh create mode 100755 services/booking/src/booking-frontend/scripts/build-spec.sh create mode 100755 services/booking/src/schedule-service/scripts/build-spec.sh diff --git a/.jobs.yml b/.jobs.yml index 735e3fc1..d786ec2c 100644 --- a/.jobs.yml +++ b/.jobs.yml @@ -138,6 +138,9 @@ services/booking/src/common: - helper/crosslab-typescript-addon:build - helper/openapi-codegeneration:build - services/booking:build-spec + - services/booking/src/booking-backend:build-spec + - services/booking/src/booking-frontend:build-spec + - services/booking/src/schedule-service:build-spec - services/device:build-spec - clients/api/js:build @@ -161,6 +164,9 @@ services/booking/src/test_common: - services/booking/src/device-reservation:build services/booking/src/booking-backend: + - script: build-spec + paths: + - ./api - script: build dependencies: - services/booking:build-spec @@ -175,6 +181,9 @@ services/booking/src/booking-backend: - services/booking/src/booking-backend:build services/booking/src/booking-frontend: + - script: build-spec + paths: + - ./api - script: build dependencies: - services/booking:build-spec @@ -189,6 +198,9 @@ services/booking/src/booking-frontend: - services/booking/src/booking-frontend:build services/booking/src/schedule-service: + - script: build-spec + paths: + - ./api - script: build dependencies: - services/booking:build-spec @@ -259,6 +271,10 @@ services/experiment: - script: build dependencies: - services/experiment:build-spec + - services/booking/src/booking-backend:build-spec + - services/booking/src/booking-frontend:build-spec + - services/booking/src/schedule-service:build-spec + - services/booking:build-spec - services/common:build - helper/crosslab-typescript-addon:build - helper/openapi-codegeneration:build diff --git a/services/booking/scripts/build-spec.sh b/services/booking/scripts/build-spec.sh deleted file mode 120000 index b1d0ad49..00000000 --- a/services/booking/scripts/build-spec.sh +++ /dev/null @@ -1 +0,0 @@ -../../../common/spec/scripts/build.sh \ No newline at end of file diff --git a/services/booking/scripts/build-spec.sh b/services/booking/scripts/build-spec.sh new file mode 100755 index 00000000..9b1fd530 --- /dev/null +++ b/services/booking/scripts/build-spec.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +current=$(pwd) + +mkdir -p dist +mkdir -p src/booking-backend/dist +mkdir -p src/booking-frontend/dist +mkdir -p src/schedule-service/dist + +rm -f dist/openapi.yml +echo "# This file was automatically generated by documentation-and-generation.fish - all changes will be lost\n" > dist/openapi.yml +echo "# This file was automatically generated by documentation-and-generation.fish - all changes will be lost\n" > src/schedule-service/dist/openapi.yml +echo "# This file was automatically generated by documentation-and-generation.fish - all changes will be lost\n" > src/booking-frontend/dist/openapi.yml +echo "# This file was automatically generated by documentation-and-generation.fish - all changes will be lost\n" > src/booking-backend/dist/openapi.yml + +cat api/openapi_start.yml >> dist/openapi.yml +cat src/schedule-service/api/component.yml >> dist/openapi.yml +cat src/booking-frontend/api/component.yml >> dist/openapi.yml +cat src/booking-backend/api/component.yml >> dist/openapi.yml +cat api/types.yml >> dist/openapi.yml + +cat src/schedule-service/api/openapi_start.yml >> src/schedule-service/dist/openapi.yml +cat src/schedule-service/api/component.yml >> src/schedule-service/dist/openapi.yml +cat api/types.yml >> src/schedule-service/dist/openapi.yml + +cat src/booking-frontend/api/openapi_start.yml >> src/booking-frontend/dist/openapi.yml +cat src/booking-frontend/api/component.yml >> src/booking-frontend/dist/openapi.yml +cat api/types.yml >> src/booking-frontend/dist/openapi.yml + +cat src/booking-backend/api/openapi_start.yml >> src/booking-backend/dist/openapi.yml +cat src/booking-backend/api/component.yml >> src/booking-backend/dist/openapi.yml +cat api/types.yml >> src/booking-backend/dist/openapi.yml + +npx @redocly/cli bundle dist/openapi.yml --output dist/openapi.json + +npx @redocly/cli bundle src/schedule-service/dist/openapi.yml --output src/schedule-service/dist/openapi.json +npx @redocly/cli bundle src/booking-frontend/dist/openapi.yml --output src/booking-frontend/dist/openapi.json +npx @redocly/cli bundle src/booking-backend/dist/openapi.yml --output src/booking-backend/dist/openapi.json + +cd $current diff --git a/services/booking/src/booking-backend/scripts/build-spec.sh b/services/booking/src/booking-backend/scripts/build-spec.sh new file mode 100755 index 00000000..6e3a90d7 --- /dev/null +++ b/services/booking/src/booking-backend/scripts/build-spec.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +mkdir -p dist + +rm -f dist/openapi.yml +echo "# This file was automatically generated by documentation-and-generation.fish - all changes will be lost\n" > dist/openapi.yml + +cat api/openapi_start.yml >> dist/openapi.yml +cat api/component.yml >> dist/openapi.yml +cat api/types.yml >> dist/openapi.yml +cat ../../api/types.yml >> dist/openapi.yml + +npx @redocly/cli bundle dist/openapi.yml --output dist/openapi.json diff --git a/services/booking/src/booking-frontend/scripts/build-spec.sh b/services/booking/src/booking-frontend/scripts/build-spec.sh new file mode 100755 index 00000000..6e3a90d7 --- /dev/null +++ b/services/booking/src/booking-frontend/scripts/build-spec.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +mkdir -p dist + +rm -f dist/openapi.yml +echo "# This file was automatically generated by documentation-and-generation.fish - all changes will be lost\n" > dist/openapi.yml + +cat api/openapi_start.yml >> dist/openapi.yml +cat api/component.yml >> dist/openapi.yml +cat api/types.yml >> dist/openapi.yml +cat ../../api/types.yml >> dist/openapi.yml + +npx @redocly/cli bundle dist/openapi.yml --output dist/openapi.json diff --git a/services/booking/src/schedule-service/scripts/build-spec.sh b/services/booking/src/schedule-service/scripts/build-spec.sh new file mode 100755 index 00000000..6e3a90d7 --- /dev/null +++ b/services/booking/src/schedule-service/scripts/build-spec.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +mkdir -p dist + +rm -f dist/openapi.yml +echo "# This file was automatically generated by documentation-and-generation.fish - all changes will be lost\n" > dist/openapi.yml + +cat api/openapi_start.yml >> dist/openapi.yml +cat api/component.yml >> dist/openapi.yml +cat api/types.yml >> dist/openapi.yml +cat ../../api/types.yml >> dist/openapi.yml + +npx @redocly/cli bundle dist/openapi.yml --output dist/openapi.json